Hacker Newsnew | past | comments | ask | show | jobs | submit | anta40's commentslogin

Any recommendation for a more realistic book?

I think hacking GCC/LLVM can be pretty challenging, but hey they are real, production-grade compilers and not just typical academic projects.


there are no good modern compiler books - everything that's been written down pales in comparison to what GCC/LLVM really involve. recently i found Engineering a Compiler by Cooper and Torczon when reviewing/prepping for interviews - it wasn't bad. also there's now LLVM Code Generation by Quentin Colombet but that's basically a code walk-through of LLVM (it doesn't cover any of the algos). and it was probably out of the date the second it got published lol (not really but maybe). the truth is that trying to learn how to build a compiler from a single book is like trying to learn how to build a skyscraper from a single book.

> the truth is that trying to learn how to build a compiler from a single book

I think you conflate “learning to build a compiler for a toy language” with “being effective at working on a modern optimizing compiler suite like GCC/LLVM”

The book is perfectly fine for the first use case, and never claims to touch upon the latter.


Respectfully, I think what you mean is that there are no books which give you the experience of hacking on LLVM for several years.

Is Dragon book still relevant? Do you recommend any other learning resources other than reading the source and contributing to llvm?

IMHO absolutely. The basics of lexer and parser are still there. Some of the optimizations are also relevant. You just cannot expect to read the book and be able to write GCC or LLVM from scratch().

For learning deeper about other advanced topics there is:

https://www.cs.cornell.edu/courses/cs6120/2025fa/

and

https://mcyoung.xyz/2025/10/21/ssa-1/

So maybe writing a compiler with exactly one FE (for a simple language) and one BE (for a simple architecture), with say 80% of the optimizations could be a doable project.

() We should define what we mean by that, because there are thousands of front-ends and back-ends.


I taught in the past and still like the trilogy of books

> Modern Compiler Implementation by Andrew W. Appel

It comes in three flavors C, ML (Meta Language), and Java

https://www.cs.princeton.edu/~appel/modern/

Writing a compiler in Standard ML is as natural as writing a grammar and denotational semantics.

Compiler writing is becoming an extinct art.


I heard that new volume is updated with newer stuffs like data flow analysis, garbage collection, etc. Anyway the book doesn't teach you how to build a basic working compiler, so need to consult another materials.

Try Andrew Appel's "Modern Compiler implementation in Java/C/ML" or Writing a C Compiler (https://norasandler.com/book) which is much more recent.

Eventually, you'd want to hack GCC/LLVM because they are production-grade compilers.


I think PHP in general is still popular... even though some of the devs switch to Go...

A bunch of corn videos... well what else? :D

Hmmm what about this: https://ziglang.org/learn/why_zig_rust_d_cpp/

Convincing enough?


So what do Android users on that area use, then? Telegram? Signal? FB Messenger?

Mostly FB Messenger, or SMS/MMS

For typical end users, kernel on its own is useless. So this an example of OS which uses Ironclad kernel:

https://codeberg.org/Ironclad/Gloire


Hmmm nice to see the OS is still under development.

First time I saw it was during undergraduate days.... 2006 or 2007?


Hmm doesn't work. Here's the error log (I'm on Mac M2):

https://gist.github.com/anta40/60f62c803a091ad0415d60f8cac55...


Maybe throw in a -framework CoreFoundation


Even better if build steps are provided


Xcode's upload process is painful? I think it's pretty nice. At least Android Studio doesn't have the feature, so you gotta upload the APK/AAB manually via web browser.

Disclaimer: I work on RN nowadays.


It's so bad that Apple has created a in-house third party tool to bypass it.


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

Search: