Back to the bookshelf

Typographic jacket · original cover not fetched

FROM THE SHARED SHELF · 2006–2026 SAMPLE

Crafting Interpreters

Robert Nystrom

19 readers recommend it across 13 discussions

Topics are model-inferred labels.

Keep it on your reading list

THE WORD OF MOUTH

What made it worth passing on?

Original Hacker News comments, in the readers’ own words.

stevekemp
Crafting Interpreters is a good recommendation, and in the same spirit "Writing an Interpreter in Go" (and it's followup about writing a virtual machine) is a good addition. A lot of the complexity and front-work of these kinda things is the parsing step though, so you can follow MAL (or any other make a lisp tutorial) though that won't necessarily help with other languages it frees you to jump to the interesting parts. FORTH, mentioned in another comment, has that same appeal. I wrote a quick tutorial here, back in the day: https://github.com/skx/foth
markus_zhang
Crafting interpreters. Very well written and free of cost, but ofc I’d recommend purchasing a copy. If you find it a bit hard to chew, there is a simpler book using Python: https://www.amazon.ca/Anthony-J-Dos-Reis/e/B001KE4SU8/ref=dp... (https://www.amazon.ca/Anthony-J-Dos-Reis/e/B001KE4SU8/ref=dp_byline_cont_book_1) Another book: Game Scripting Mastery.

Also recommended in this reply

optymizer
I would split the books into two categories: those that improve the way you structure your code and deliver a software solution, and those that improve your technical understanding of the software platform and the computer you're using. The first are books like Pragmatic Programmer, Mythical Man Month, Code Complete, Design Patterns, talks by Alan Kay on software systems and OOP, even Game Engine Architecture etc. A lot of the content there is distilled experience which is much faster to learn from a book than gain the hard way on the job. The other books are practical deep dives. Here I would recommend a variety of books like Inside the Machine by Stokes, Computer Architecture by Hennessy, 21st Century C by Klemens, Crafting Interpreters by Nystrom, Compilers by Aho, Effective Java, Nature of Code by Shiffman, Ray Tracing Challenge by Buck, Hands on Hacking by Hickey, and others, depending on your interest and area of focus.
nindalf
The books that taught me computer science - Operating Systems: Three Easy Pieces ( https://pages.cs.wisc.edu/~remzi/OSTEP/) - Designing Data Intensive Applications by Martin Kleppmann (https://dataintensive.net) - Crafting Interpreters by Robert Nystrom (http://craftinginterpreters.com)
dgb23
I have done the same thing! Read Crafting Interpreters but wrote the first half in Clojure instead of Java. I think it's a good method for experienced programmers, who are self-taught (like me) or just want to brush up some skills and knowledge. Yes, you stay engaged, but there is also something to be said about porting code between different languages. The differences, strengths, weaknesses etc. stand out more, similarities become more clear and things that seem different, but are analogous emerge.
agomez314
A New History of Modern Computing gave me a huge perspective on computers that I felt I lacked vs others who are older. Crafting Interpreters (Nystrom) makes compilers/interpreters not spooky and fun. Operating Systems: 3 Easy pieces and the xv6 OS manual are also great introductory books that got me interested in OS dev.
guilhermeasg
The Feynman Lectures on Computation, Goedel's Proof, maybe Crafting Interpreters? I've been following the development of http://browser.engineering/ and it's so much fun to go through. Highly recommended! Mazes for Programmers is on my bookshelf. I've gone through the first few chapters coding along in Go and going on weird diversions. It's totally pointless, and I love it. There's also "The Ray Tracer Challenge" by the same author, which looks phenomenal.

Also recommended in this reply

KineticLensman
Concur with this recommendation. Coincidentally, I started this project just recently, having really enjoyed completing Make a Lisp [0] a couple of years ago, and now needing something to do while I recover from a medical condition. I'm really impressed with Nystrom's writing style and Interpreter development process. My long term goal - which should keep me going for absolutely ages - is to use something like Nystrom's byte-code virtual machine as a basis for having another go at MAL. I completed MAL using C#, and am currently using Visual Studio / C# to complete Nystrom's stuff (rather than the Java / C combo that he uses). But I'm just about to restart Nystrom using a different language (again, perhaps Rust) to give myself more of a challenge. [0] https://github.com/kanaka/mal/blob/master/process/guide.md
tompark
It's possible to work through Bob Nystrom's Crafting Interpreters[1] using any language you want. On GitHub just search for "crafting interpreters"[2] and add a filter for the programming language you're interested in, and you'll find at least a couple repos for the entire book. There are over a dozen complete repos in Rust. Since everyone breaks out each chapter in a separate folder, it's easy to follow along with the book, even though the book's first interpreter is written in Java and the second compiler was written in C. I did this, it's basically how I learned Rust. [1] https://www.craftinginterpreters.com [2] https://github.com/search?q=crafting+interpreters
nindalf
I'm planning to read - Structure and Interpretation of Computer Programs (SICP). A classic. - Crafting Interpreters. Intro to compilers for me. - Deep Learning for Coders with Fastai and PyTorch. There's some other books in there too, but I'd be really happy if I finished these. I don't have a degree in CS, and most of what I know is self taught. My goal here is to fill in gaps in my knowledge as best I can.