upvote
That's not quite right - source expresses the idea relative to a language syntax and grammar, whereas machine code (or assembler) implements the idea against a specific target machine, for a specific set of circumstances.

So as an example, there are a bunch of different ways a for or while loop can be implemented in compiled code, but there are also situations where two quite different source constructs can result in the same machine code sequence.

Machine code certainly won't teach an LLM much about how to write good source code.

reply
Being deterministic, a binary executable is just a compressed version of source code.
reply
Compressed doesn't sound quite right. Source code contains abstractions which are often then expanded out into many variants in an executable (most obviously by function inlining, but at a smaller scope also by things like loop unrolling etc)
reply
Lossy compression.
reply
No, it goes the other way. Source code is a lossy compression of the billions of machine operations it can be compiled into. Abstraction is a way of compressing, both in the mechanical LoC sense, as well as in comprehension.
reply
Many things also expand significantly in binary form. Heavy use of templating, for example.
reply
deleted
reply
deleted
reply
Is plate of spaghetti a compressed version of a recipe?

Executables are often larger than their source code.

A toolchain that creates repeatable binary builds is difficult to create. And a nonrepeatable build is potentially nondeterministic, in the sense that uncontrolled or hidden inputs impact the output.

reply
This is very analogous to vector vs raster graphics. In a way, the vector format is strictly more powerful than the raster format as it can be rendered smoothly at any size. Thus the raster graphic, despite being larger in size, is a lossy distillation of the vector graphic.

Also it _is_ possible to gzip a file and get a larger file, there’s an inflection point based on the distribution of symbols in the source where the same compression algorithm produces a larger file than the original

reply