Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish you wouldn't broadcast the sentiment contained in the first paragraph. Compilers lack the ability to consistently perform many basic optimizations to an embarrassing extent. Including even the ones you would think would be the first optimizations you'd implement when writing a compiler. Open up Godbolt and tell me if you still think the compiler knows best. I try to submit at least one issue to LLVM every time I look at the assembly it gives me. I say "try to" because sometimes it's too much to deal with.

And by the way, probably the absolute worst things the compiler does are the "smart" things. I write my code knowing what the emit should look like, and the compiler sometimes thinks it has a better idea than how I wrote the code and makes the emit a lot more convoluted and slower than it would be if it just did what I said. Actually, I do know the machine decently well, thank you.

Saying "centuries of engineering" is misleading. A lot of those centuries are people arguing about theoretical optimizations of dubious value while we still haven't even finished on the most basic optimizations that are obviously beneficial.

The second paragraph making it sound all mysterious that compilers are even more awful at interpreters than normal code really speaks to a complete lack of exposure to the subject matter. This stuff is only esoteric because you couldn't be bothered to look at godbolt.org. Which is totally fine by the way, just don't go telling me how high quality compilers are if you've never even looked.

That would be like me telling web developers that Dreamweaver produces phenomenal HTML and CSS, without ever looking at what it emits.

Sorry for the rant but it just bothers me how much praise is heaped upon compilers like they are some kind of gift from God, forged by monks, wizards, and unrivaled geniuses. A compiler is just a tool. There is no magic.



> Sorry for the rant

No problem here. I deleted a rant turning into a screed about blog articles superimposing "The Book of Dragon" and "The Dragon Book", but after some consideration found this link:

https://en.wikipedia.org/wiki/File:Graham%27s_Hierarchy_of_D...

With respect to "refuting the central point", if in the OP it is "Performance engineering should be about knowledge and science, not superstition and myth. (Godbolt not Godwin?)", then I agree. See:

https://ocw.mit.edu/courses/6-172-performance-engineering-of...

[I think Graham's hierarchy of disagreement ought to be used to color down votes, especially here.]


"Any sufficiently advanced technology is indistinguishable from magic."

When people call themselves engineers, without placing their feets on an engineering school, with compiler development degrees, rather a six weeks bootcamp, their compilers feel like a sufficient advanced technology.


You really don't need a degree for this stuff. A typical degree has 1 class about this, and half of it is dedicated to formal language theory or the unfortunate practice of using parser generators.


Then my degree was atypical, as we had several classes about this, scattered around two years of other stuff.

The theoritical stuff, history and evolution of programming languages, compiler and language design, the actuall toy language implementation all the way to native code.

30 years ago, maybe the quality of teaching went down, I guess.


Any good 2 week bootcamp for mastering PLT??


Get Modern Compiler Implementation in C [0] (with Java and ML versions also available),or the Kaleidoscope LLVM tutorial [1], and do the whole thing in 2 weeks, as starting point.

[0] - https://www.cs.princeton.edu/~appel/modern/c/

[1] - https://llvm.org/docs/tutorial/




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: