Yik Yak icon
Join communities on Yik Yak Download
Why do all the latest models write code that genuinely looks like these old stock images of “code”
57 upvotes, 4 comments. Yik Yak image post by Anonymous in Computer Science. "Why do all the latest models write code that genuinely looks like these old stock images of “code”"
upvote 57 downvote

default user profile icon
Anonymous 19h

saves token count

upvote 1 downvote
default user profile icon
Anonymous 9h

If you write code in a block like above, it’s far more efficient to run. For whatever reason carriage returns have some kinda pause factor, while this just runs seamlessly. So it’s not token count in the traditional sense, but that it’s physically easier to parse for the program.

upvote 1 downvote
default user profile icon
Anonymous replying to -> #1 15h

I can’t imagine cutting out white space would really save that many tokens right?

upvote 1 downvote
default user profile icon
Anonymous replying to -> #2 8h

Perhaps I’m missing something here but in most languages the lexer will remove whitespace such that the compiled/interpreted machine code is equivalent (i.e. executes the same at runtime). I’m not trying to be rude here, have you taken your university’s “programming languages” course (or something of the like)? You can go super in-depth on how the code you write actually gets translated to machine code and executed, but one undergrad class is enough to demystify a lot of things

upvote 1 downvote