Hacker News new | past | comments | ask | show | jobs | submit login

I was really stoked to buy this since I've always toyed with the idea of creating my own language but this is disheartening to hear.

Do you have any recommendations for books in a similar vein?




If you have the stomach for it, find a used copy of the "dragon book" [1]. I have the red one.

LLVM is a modern "compiler infrastructure" project. It's textual intermediate language is relatively easy to write. If you can write a program that accepts user input, and generates LLVM IR, then you've got a compiler of sorts.

[1] http://en.m.wikipedia.org/wiki/Dragon_Book


Those aren't "books in a similar vein", those are the things that this book is (as far as I can tell) aimed to disrupt.

It's like this thing is selling an ATM, and the parent comment is asking "well, I live in Nicaragua, is there an ATM there?" and your answer is "there is an ATM in Nicaragua, it is called a bank."

The Dragon Book is the reason more people don't write compilers. It's old and thorough and formal and really feels like you were handed an "Installing Your Model HJ-3660PF Nuclear Hydraulic Reactor" manual, more than an approachable guide. This isn't necessarily a bad thing, if you're forced through it for a class--you'll learn more, and what you learn will have a more stable foundation--but it's a shame for people who are just curious, and would learn something from a friendlier presentation where the more formal approach would lose them.

Writing a compiler is pretty fundamental to being able to form an understanding of platform semantics as separate from language syntax. It's something everyone can do--but it's treated so formally that it feels like one of those weird advanced-level things only to be attempted after you've learned everything else, like creating your own magic spells in D&D. If it felt more like some "Create Potion"-level magic, maybe more people would have tried it, and figured out that there's really no magic going on at all. :)


I actually skipped the course, but grabbed my used copy from the old Powell's Tech before it closed, as well as the O'Reilly Flex and Bison book. It felt like I had the nuclear reactor manual! I also got really into writing interpreters, mainly in Ruby, after reading probably too many ICFP papers on the subject (and even shipped one to solve an ad targeting problem.)

I always try to dive headlong into literature for concepts like this, knowing I won't understand everything right away. Implementing the concepts with my tools of choice has always been a great way to prove my understanding, and push myself.


I think one can use antlr to build the compiler front-end and use LLVM for the backend, Seems like a good idea. I am going to go try it out




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: