logoalt Hacker News

yetihehetoday at 7:13 PM3 repliesview on HN

Maybe then LLM's will switch to outputting raw machine code?


Replies

Topfitoday at 7:27 PM

A great future for us all to look forward to. Human readability gone, any changes must go through a providers API so cost+restrictions are a constant and we'll need far more tokens for even simple operations. Call me old fashioned, still like to understand the code I merge, especially since I've seen Fable and Sol make sometimes utterly egregious mistakes in simple, well scoped requests that erode any trust I can muster...

applfanboysbgontoday at 7:26 PM

No. This conveys a fundamental misunderstanding of how anything pertaining to programming works. This will never happen, ever. For example, take...

  printf("Hello, world");
vs. a plausible illustration of how it might be compiled down to machine code...

  48 65 6C 6C 6F 2C 20 77 6F 72 6C 64
  48 83 EC 28
  48 8D 0D F5 0F 00 00
  E8 F0 00 00 00
  33 C0
  48 83 C4 28
  C3
The latter now takes up 10x as many tokens (= 10x the cost/time, + context penalties), and is now architecture-specific, impossible to apply non-brittle program-wide optimizations to, etc. There is absolutely zero reason to ever have the LLM act as a compiler no matter how fast it is. Even if you believe LLMs will reach a state where they can actually generate good code at this level, you would be better off having them generate the compiler they would use.
show 2 replies
imtringuedtoday at 8:16 PM

That still requires a specification language to constrain the generated code even if the implementation is produced directly.

Why? Because you are defining the implementation based on its observable behaviour rather than as a rule set to be followed.