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

On a related note: What's a good introduction to compiler design ? Has the dragon book been superseded by something yet? Ideally you'd be able to write a decent compiler for your own language after going through it.



The 2nd edition of the Dragon Book is quite good. I don't think it's been surpassed. For myself, I prefer it with respect to compilers much more than I prefer Computer Architecture A Quantitative Approach with respect to computer architecture.


Second edition, as in the first "Compilers: Principles, Techniques, and Tools", or the second ?



What's wrong with the Dragon Book? Obviously, the older versions won't cover SSA. However, in general, for a hobby project, single-static assignment and abstract interpretation (the modern bits) are only going to help with a very tiny part of the compiler (the optimizer). By the time you need a "lot" of SSA (LICM, SCEV, PEO-register assignment, etc.), you're looking at an easy 10-years of effort, so there'd be no need for an "intro" book at that point...


For a lot of us, the optimizer is not the tiny part. It's the biggest and most important part.

It does not take 10 years to implement an SSA compiler with LICM, SCEV, and good register allocation. (No idea why you'd want Professional Employer Organizations as part of your RA, but that's just me.) For example, WebKit's B3 compiler took 4 months to write. It's not hard to write it if you know what to write. Hence the need for a good book. Maybe the reason why you think it takes ten years and Professional Employer Organizations is that you never read a good book on the subject!


Could you recommend a good book/reference?


I can’t! :-(

I learned by interning on a team that knew how to do it right and learning from them and then learning more by word of mouth - asking folks who architected compilers how/why they did things.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: