
Crafting Interpreters
by Robert Nystrom · first published 2021
521mentions
295recommended by
397HN commenters
2017–2026first – last mentioned
74% recommend25% neutral1% critical
Why HN recommends it
Hands-on, free-to-read walkthrough of building two interpreters from scratch, covering scanning, parsing, tree evaluation and a stack VM. Praised for intuitive teaching that suits self-taught and non-CS readers.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







…work". I read many a book to answer this question, and came away with three books: - CODE by Charles Petzold explains the CPU - Operating Systems: Three Easy Pieces by Arpaci-Dusseau explain OSes - Crafting Interpreters by Robert Nystrom explains programming languages Masterfully done.
on “Crafting Interpreters: A Review” ↗Main updates as of May 2020: Computer Architecture: added Computer Systems: A Programmer's Perspective as first recommendation over nand2tetris. Compilers: Crafting Interpreters added as first recommendation over dragon book. Distributed Systems: added Designing Data-Intensive Applications as first recommendation over Distributed Systems. Online availability of some video lectures…
on “Teach Yourself Computer Science” ↗…to see people experimenting with languages! I'm doing a similar thing with wheel-lang [0], which started as pretty purely imperative, but is starting to grow some object-oriented features. Nystrom's Crafting Interpreters is a great resource; I've also liked Compiling to Assembly From Scratch [1] and Write You a Haskell [2]. [0] https://github.com/DylanSp/wheel-lang/ [1] https://keleshev.com/compiling-to-assembly-from-scratch/…
on “Show HN: Learning Project: building an imperative language” ↗Read 'Crafting Interpreters' by Bob Nystrom (free online). It teaches step by step how to write a compiler/interpreter, very approachable without dumbing down.
on “Launch HN: CodeCrafters (YC S22) – Practice writing complex software” ↗Crafting Interpreters by Robert Nystrom
on “Ask HN: What are the best tech books you read in 2021?” ↗I saw from your most recent email that this book will be longer than Moby Dick. I've been following your progress since the beginning and I really appreciate the work you've done. Crafting Interpreters was really helpful for me when I began building my own language.
on “Crafting Interpreters: Calls and Functions” ↗…Bradfield School of Computer Science which teach about as fast as possible (https://bradfieldcs.com/) and their self-study guide (https://teachyourselfcs.com/). I also got a lot out of Bob Nystrom's "Crafting Interpreters" book
on “Ask HN: Can build CRUD apps, what now?” ↗I would recommend reading/implementing the below: 1. 'Write a Interpreter in Go' by Thorsten Ball 2. 'Write a Compiler in Go' by Thorsten Ball 3. 'Crafting Interpreters' by Bob Nystrom 4. 'Ruby under a Microscope' by Pat Shaughnessy
on “Ask HN: Technical Summer Reading List” ↗…astronomical. This includes papers and books about complex topics! I don't know where we got the inane idea that you have to be extremely dry and boring to present a complex idea. Bob Nystrom's book Crafting Interpreters is not only a joy to read, it also teaches an incredibly complex topic. 3blue1brown makes amazing animations that explain very deep topics. If you're going to invest a large portion of your life into…
on “A man who uploaded 2M videos to YouTube [video]” ↗Most anything by Bob Nystrom. Some (all?) of his books are available for free on the Web. I recommend starting with Crafting Interpreters.
on “Ask HN: Examples of good technical writing?” ↗Crafting Interpreters by Nystrom. It's great because of how accessible it makes compilers to average programmers, and, as a bonus, it also throws shade at the overly dense compiler textbooks: "Classic compiler books read…
on “Great Works in Programming Languages (2004)” ↗…doubt that I'll ever develop a large following. But that's not the point. I wanted to put this out there simply because I thought that it should exist. Also worth noting: This is not a copy of the "Crafting Interpreters" book by Robert Nystrom, although I think it's a great book!
on “I Posted on YouTube Consistently for 1 Month. This Is What Happened” ↗…(homoiconicity). If you aren’t interested in the interpretation of computer programs part of SICP, then this book isn’t for you. If you are interested in the ICP part but Scheme doesn’t work for you, check out Crafting Interpreters. It’s truly excellent and you can read it for free at the author’s website.
on “Sussman Explains the End of SICP” ↗…presented in the book are dead-ends that should be avoided. It is definitely NOT a useful for those who want to learn the proper way to implement a Lisp, especially a non-toy one. Good alternatives are Crafting Interpreters by Robert Nystrom and MAL (Make your own Lisp). Here is also a good-short tutorial how to write one in OCaml: https://bernsteinbear.com/blog/lisp/00_fundamentals/
on “Contents • Build Your Own Lisp” ↗I had to change the scope of my desires. I don't want to make the next Python. Not even the next Zig or Nim. I just like fiddling with compilers and interpreters. Someone else mentioned Crafting Interpreters and I'll bring it up, too. I've been following along in C# and occasionally come back to my C#Lox implementation and work through another chapter. It is quite a lot of fun.
on “Building a Programming Language in Twenty-Four Hours” ↗