3 ms·
I'm working through this right now and it's awesome. I've completed the Java interpreter and I'm halfway through the C bytecode stack-based interpreter[1]. I'd
by thundergolfer 5y ago
I'm working through this right now and it's awesome. I've completed the Java interpreter and I'm halfway through the C bytecode stack-based interpreter[1]. I'd estimate I've spent around 30-40 hours with the book.
Throughout I've used both the website and the dead-tree version of the book. The website is great with 2 monitors, but you might be too tempted to copy-paste the code.
The one thing the book doesn't mandate is the use of the Lox test suite, but I think it should be incorporated into the book. It's easier to hack on your implementation when there's a test suite to validate that everything still works as it should at Chapter X.
1. https://github.com/thundergolfer/uni/tree/main/books/crafting_interpreters https://github.com/thundergolfer/uni/tree/main/books/craftin...
- spinningslate 5y ago> I'm working through this right now and it's awesome. Hard agree. This is one of my favourite technical books ever. As an amateur language design junkie, I've been through a raft of books. Just counted and there are 10 on my bookshelf, including the Dragon book [0]. This is my favourite. It's beautifully written, very approachable but definitely not trivial. A really impressive piece of work. [0]: https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniq...
- bogomipz 5y agoIt seems like many people agree CI is very engaging. Would you recommend any of those other language design books on your bookshelf as similarly fun and engaging? If so which ones?
- JohnDeHope 5y agoUp until Robert's book, my favorite was Building Parsers with Java by Steven John Metsker. I'm a high level garbage collected language programmer by trade. I can't simultaneously learn a very technical topic and also keep up with my pointers. Having guidance in how to do this in Java or some other similar language makes it tractable for me. I know you probably wouldn't want to implement or use a programming language built on top of another GC'd language. But for learning it's helpful.
- mjaniczek 5y agoOh yeah, I'm going through the book also. Perhaps one mistake I made was to implement (in a very different language, to boot) while I am reading. This makes me only advance a few pages everytime I pick the book up. I think that after I finish the interpreter from the first half of the book in this way, I'll go read the C bytecode part without writing any code quickly, and then have a second pass while implementing on the side.
- thundergolfer 5y agoI tried to implement Rust interpreter (rlox) alongside my reading and implementing of the C interpreter (clox). It slowed my progress to a crawl, because I'm not at all a competent Rust programmer. I think I could manage doing Python alongside C though. Implementing in a different language will slow down progress a lot, but I think it greatly helps with comprehension and retention.