logoalt Hacker News

salawattoday at 2:47 AM1 replyview on HN

Excuse me. I curse at compiler writer's on a regular goddamn basis. There are these things called "optimizations" that I assume they spend a bunch of time hmmming and hawwwing over, but will regularly take a shit on how the structure of how the resulting assembly comes out. It is downright infuriating.

Maybe you don't build or tinker with things enough to have warranted making a dartboard out of the gcc contributor graph, but damnit, some of us do. That compiler is not magic, continually floats around, and when you're just trying to get something from the stage of "doesn't exist at all" to "exists", does absolutely throw curve balls your way. I start wit -O0 -g and then crank up the optimization level once everything works. Otherwise come debug time, shit's missing, stuff happens at weird times, etc. If you don't treat the compiler as spooky, you haven't paid enough attention to it.


Replies

overgardtoday at 3:16 AM

While I agree undefined behavior is annoying and a huge UX issue, end of the day the bug is in your code not in the compiler.

Also having an -O0 debug build is standard practice.

My point isn't that compilers are super easy to use and never frustrating, my point is that the notion that LLMs "compile" english to code is a bad analogy. Compilation is a translation from one formal representation to another. LLMs are an interpretation of informal language into a formal language. They just are not at all the same thing.