Live data from Hacker News

Crafting Interpreters: A Review

chidiwilliams.com

31–40 of 155 posts

Re: Crafting Interpreters: A Review

#31
post #27
post #4

This book is a work of art. It's one of the best technical books I've ever read. Truly a masterpiece along every dimension.

As the footer on the online version of the book says "Handcrafted by Robert Nystorm" - it really is lovingly hand crafted . It shows that the author went over the content many, many times polishing it with every go. The content builds up really well as it goes along. On a minor note, whenever I read a technical book I always come across some mistake in the copy-editing, a missed article, a misplaced article, a typo.…

I’m pretty involved in Dart these days which is what Bob works on full time now, it’s one of my favourite things about the language, there are so many freaking smart people on a totally different level doing some very cool stuff behind the scenes there with the same level of love and care that went into that book.

Re: Crafting Interpreters: A Review

#33
post #3

I've been wanting to read this book, but I'm not sure how I should go about it. Are you supposed to read and type out the code examples? I'm just wondering if I will learn anything that way?

The way that worked better for me was doing the book in a different language (I did it in Crystal and Rust). I had to fully understand the intent being every code example so I could translate it correctly. This adds another layer of difficulty, depending on how comfortable you are with Java and the language of your choice, but it was the way that worked better for me. I truly felt that I created a language, not just…

I would also vouch for this approach, it's what I did and it helped force me to understand instead of just copying. Honestly, working through this book was the most fun I've had programming in years.

It also helps to have a practical application that you're working towards - I was in the process of building a game server in Node and wanted a way to modify the state at runtime, so I used this book to build an embedded language for debug builds.

Re: Crafting Interpreters: A Review

#34
post #18

Following a slightly different path, "Modern compiler implementation" goes over several topics mentioned in the review (lexing, parsing, type checking, code optimization and generation, runtime environments aspects e.g. garbage collection). There exists various flavors of the book (in ML, Java, and C).

The only worthwhile version is the ML one though, see https://assignments.lrde.epita.fr/tools/modern_compiler_impl...

Re: Crafting Interpreters: A Review

#35
Without a doubt one of the best technical books I have ever read.

To me, it was a missing piece of the big puzzle of "how do computers 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.

Re: Crafting Interpreters: A Review

#36
post #23

What other books are of the same caliber that HN would recommend?

The programming meme books that you must have on your shelf (reading optional) are: - The C Programming Language (original C book) - The Art of Computer Programming (TAOCP) - Structure and Interpretation of Computer Programs (SICP) - Compilers: Principles, Techniques, and Tools (Dragon book) - Don't Make Me Think (design) - Zen and the Art of Motorcycle Maintenance

I'd also recommend (inter alia -- there's a lot of great works out there!) Friedman et al.'s Schemer books, Petzold's "Code" and "The Annotated Turing," McConnell's "Code Complete," Pierce's "Types and Programming Languages," and Warren's "Hacker's Delight."

Re: Crafting Interpreters: A Review

#37
post #3

I've been wanting to read this book, but I'm not sure how I should go about it. Are you supposed to read and type out the code examples? I'm just wondering if I will learn anything that way?

The way that worked better for me was doing the book in a different language (I did it in Crystal and Rust). I had to fully understand the intent being every code example so I could translate it correctly. This adds another layer of difficulty, depending on how comfortable you are with Java and the language of your choice, but it was the way that worked better for me. I truly felt that I created a language, not just…

Another vote for doing it like this. I chose to learn Haskell by working through this book and they were a perfect match. One thing that really helped was trying to build things using a few different language constructs and seeing which ones worked well and which ones didn't. Really helped me independently arrive at a lot of concepts as I searched around trying to figure out how to make things work (a big one being an understanding of the kinds of ways you need to structure your code for a typesystem like Haskell vs. Java)

Re: Crafting Interpreters: A Review

#40

highly, highly recommend this book when i was given a compilers class to teach i wanted to teach hand-written recursive descent because it is simple, elegant and makes the recursive nature of grammars so readily apparent without hiding concepts behind obscure tools i was despairing that there were no good books around on recursive descent, but stumbled on crafting interpreters before it was even released as a book an…

This is one thing I find funny about this book. Despite the name, it's a great intro to compilers in general.
Post reply on HN