
Crafting Interpreters
Robert Nystrom · 2021
Programming and computer science › Compilers and interpreters
#46 most recommended
Hacker News
521
mentions by 397 people · top 0.4% of 15,732 books
Open Library
4.50★★★★★★★★★★
2 ratings · 26 want to read
Wikipedia
—
No article yet
About the book
Crafting Interpreters is a free-to-read programming book that walks through building a complete programming language, Lox, from scratch. It is split into two implementations: a tree-walking interpreter written in Java, and a bytecode virtual machine written in C. Topics include scanning, parsing, expression evaluation, variables, functions, closures, classes, inheritance, garbage collection and the design of a stack-based VM. Nystrom's premise is that language implementation is not a black art reserved for compiler specialists, and that a working interpreter can be built by an ordinary programmer by writing it step by step. The book teaches by having the reader type in and run real code at each stage, rather than by formal theory or tool-generated parsers. It also contrasts the two designs, showing how a simple tree-walker gives way to a faster bytecode VM, and why the performance and memory trade-offs lead to the choices real languages make.
Written by Claude from what it knows of this book.
What Hacker News says 74% recommend · 1% critical
In the commenters’ own words
I've been deeply fascinated by the idea of literate programming, but every time I dive into the programs themselves, they leave something to be desired…
As someone who has been designing a language since late 2012 (and it's about to have its first public release early next year O.o), here are some thoughts…
What Open Library readers say 4.50 from 2 ratings
- 51
- 41
- 30
- 20
- 10
- 26 want to read
- 2 reading
- 5 have read
Only 2 ratings: treat the average as a hint.
What critics say, via Wikipedia
No Wikipedia article about this book yet, so no critics to quote.
Reddit communities — coming later
The threads it came up in
- Ask HN: What are some of the best books you have read in 2022?
- Ask HN: What language-agnostic programming books should I read?
- Ask HN: What is one book you would recommend everyone to read?
- Ask HN: Do you recall any book or course that made a topic finally click?
- Ask HN: What books have been worth your time?
- Ask HN: Most interesting, mildly impractical, well-written books on software?
- Ask HN: I'm looking for a good book on the fundamentals of CS
- Ask HN: What Are You Reading?
Details
- First published
- 2021
- ISBN
- 9780990582939
- Editions known
- 6 at Open Library
- Open Library
- OL26124818W
Computer scienceComputer softwareComputers
Read next: its neighbours on the mosaic
Writing An Interpreter In GoThorsten Ball · 2018 · recommended by 73 people · 18 people recommended both
Writing A Compiler In GoThorsten Ball · 2018 · recommended by 33 people · 8 people recommended both
Game Programming PatternsRobert Nystrom · 2011 · recommended by 120 people · 21 people recommended both
Engineering a compilerKeith D. Cooper · 2004 · recommended by 39 people · 9 people recommended both
Language Implementation PatternsTerence Parr · 2009 · recommended by 18 people · 3 people recommended both
Writing a C CompilerNora Sandler · 2023 · recommended by 7 people · 3 people recommended both
Ray Tracer ChallengeJamis Buck · 2019 · recommended by 21 people · 5 people recommended both
Compilers, principles, techniques, and toolsAlfred V. Aho · 1986 · recommended by 195 people · 7 people recommended both
Structure and Interpretation of Computer ProgramsHarold Abelson · 1984 · recommended by 347 people · 11 people recommended both
Parsing TechniquesDick Grune · 2007 · recommended by 16 people · 2 people recommended both
The Little SchemerDaniel P. Friedman · 1995 · recommended by 288 people · 7 people recommended both
Essentials of CompilationJeremy G. Siek · 2023 · recommended by 17 people · 3 people recommended both
Clean CodeRobert C. Martin · 2008 · recommended by 298 people · 7 people recommended both
Lisp in Small PiecesChristian Queinnec · 1996 · recommended by 101 people · 5 people recommended both
Introduction to Compilers and Language DesignDouglas Thain · 2019 · recommended by 4 people · similar by subject and what people say about it
The Rust Programming LanguageSteve Klabnik · 2018 · recommended by 170 people · 6 people recommended both
The architecture of open source applicationsAmy Brown · 2011 · recommended by 204 people · 9 people recommended both
Writing Interpreters and Compilers for the Raspberry Pi Using PythonAnthony Dos Reis · 2018 · recommended by 3 people · similar by subject and what people say about it
Building GitJames Coglan · 2021 · recommended by 19 people · 2 people recommended both
Modern compiler implementation in MLAndrew W. Appel · 1997 · recommended by 24 people · 2 people recommended both
Programming RustJim Blandy · 2021 · recommended by 64 people · 4 people recommended both
Programming Language PragmaticsMichael L. Scott · 1999 · recommended by 31 people · 2 people recommended both
Ruby under a microscopePat Shaughnessy · 2014 · recommended by 32 people · named together in 2 comments
Elements of programmingAlexander A. Stepanov · 2009 · recommended by 31 people · 2 people recommended both