4 ms·
Crafting Interpreters
- Cwizard 4y agoI coded along with the code in the book and can really recommend it. It is well written and well explained.
- recursivedoubts 4y agoabsolute gem of a book, I use it for my compilers class: https://grugbrain.dev/#grug-on-parsing https://grugbrain.dev/#grug-on-parsing recursive descent parsing is simple, beautiful, intuitive, flexible, shows the correspondence between recursion and grammars and it's how most production compilers are built this book is the best (and one of the only) books to cover it in depth it belongs on every programmers shelf
- UltimateEdge 4y agoI love your site :D it made me smile
- marcosdumay 4y agoIs that page increasing with new content? Anyway, recursive parsers are too resource hungry to run on a PDP-11. That's why nobody teaches them. If you don't expect them to run on a PDP-11, then yes, all of that is true. (Our academic institutions are stuck at the 70's, while our commercial institutions are stuck ignoring anything that is more than 10 years old. It's hard to train new developers on those conditions.)
- macintux 4y agoOne of the many things I miss about working at Basho: the engineers had a deep respect for the academic underpinnings of distributed systems. Leslie Lamport might as well have been a former employee considering how much we talked about, and leveraged, his work.
- avgcorrection 4y agohttps://news.ycombinator.com/item?id=34410776 https://news.ycombinator.com/item?id=34410776
- intrepidhero 4y ago> best weapon against complexity spirit demon is magic word: "no" This is going up on every vertical surface at the office.
- kaba0 4y agoWhat’s your opinion on parsing generators, though? One advantage of them is that they give a specification of the grammar as well.
- recursivedoubts 4y agofrom the site: > unfortunately many big brain school teach only parser generator tool. here grug usual love of tool is not: parser generator tool generate code of awful snakes nest: impossible understand, bottom up, what? hide recursive nature of grammar from grug and debug impossible, very bad according grug! Depending on your language, creating a grammar and then creating a recursive descent parser based on it is a perfectly reasonable approach, and that's what most major programming languages do. For experimental stuff like https://hyperscript.org https://hyperscript.org I wing it a bit more, but that's the flavor of that language.
- runevault 4y agoI went through the first half in c# back around the time that part was finished. Need to go back and do part 2 which my current intent is do it with Rust. Probably means I skip implementing a bunch of the data structures stuff but that isn't my main interest so not a huge loss.
- Prometheus_Lodi 4y agogood to know. I think my bookshelf stopped growing circa Aho and Uhlman.
- veggiebyte 4y agoAho, just learned about him from Unix Memoir book written by Kernighan. Awesome dude.
- dilap 4y agoOne of my all-time favorites. Highly recommended.
- coreyp_1 4y agoLoved the book. Inspired me to create my own language (definitely not a copy, though), and put the whole experience on YouTube. (Playlist link in my profile.) Technically, I had already written a language twice, but this book convinced me that it might be beneficial to do it again (and fix the things that I didn't like from the previous 2 incarnations) and put it out there for everyone else to see and hopefully benefit from. The book was very well done, both in artwork, writing style, and explanations.
- sqs 4y agoWriting An Interpreter In Go (https://interpreterbook.com https://interpreterbook.com) is also great.
- munificent 4y agoYes, Thorsten's books are great.
- munificent 4y agoAuthor here! It's been so unbelievably gratifying seeing how many people this book resonates with.
- agubelu 4y agoIt was my Christmas present this year and I'm enjoying it and learning a lot, thanks for your dedication!
- munificent 4y agoMerry Christmas!
- satvikpendem 4y agoThanks Bob, great book! Do you have any recommendations on going from learning about interpreters to learning about compilers, ie making a language go all the way from the high level to machine code / binary? I'm looking for something at the same level of quality as your book, which is to say, very high.
- munificent 4y agoGoing all the way to native code is hard. I would probably recommend both of: * Compilers, Principles, and Tools (the Dragon Book) * Engineering a Compiler You can skim a lot of the Dragon Book, but it will introduce you to a lot of the basics around type checking and generating code. Then Engineering a Compiler (which roughly assumes you have some familiarity with compilers already) does a very good job of walking through all of the key algorithms behind control flow analysis, register allocation, instruction selection, optimization, etc.
- satvikpendem 4y agoAwesome, thank you!
- 4y ago
- abnercoimbre 4y agoTo anyone interested we interviewed Bob recently [0] at Handmade Seattle: The Craft behind Crafting Interpreters Great author but also a fun conversationalist :) [0] https://guide.handmade-seattle.com/c/2022/behind-crafting-interpreters/ https://guide.handmade-seattle.com/c/2022/behind-crafting-in...