Live data from Hacker News

Crafting Interpreters: A Review

chidiwilliams.com

121–130 of 155 posts

Re: Crafting Interpreters: A Review

#121

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…

Could you please consider this book?

Compiler Construction Using Java, JavaCC, and Yacc[0]

In my opinion, this has been underrated book. I learned a lot from this book. I enjoyed it and plan to read it again.

If you could check it out. It contains solid explanation from theory to implementation. I'm not affiliated with the author, I just wanted to show I'm grateful for his work.

[0] - https://onlinelibrary.wiley.com/doi/book/10.1002/97811181127...

Re: Crafting Interpreters: A Review

#122
The literature on interpreters (vs. compilers) is pretty thin. I enjoyed reading these:

1. Peter John Brown. 1979. Writing Interactive Compilers and Interpreters.

2. Timothy Budd. 1987. A Little Smalltalk.

3. Ralph E. Griswold. 2000. The Icon Programming Language, 3e.

4. Pat Shaughnessy. 2013. Ruby Under a Microscope: An Illustrated Guide to Ruby Internals.

This is a new one I haven't read yet, but it looks very practical:

5. Clinton L. Jeffery. 2021. Build Your Own Programming Language: A Programmer's Guide to Designing Compilers, Interpreters, and DSLs for Solving Modern Computing Problems.

I don't know anything about this one, but people have told me they prefer the first edition:

6. Ronald Mak. 1991. Writing Compilers and Interpreters: An Applied Approach.

Re: Crafting Interpreters: A Review

#123
I think this book is ever so slightly overrated when it comes to actually implementing programming languages, but it contains such a nice introduction to parsing that I have for years been using it as my goto "You're not ready yet, read this" book when it comes go guiding people going down the dark unhappy path of working on language implementations.

Re: Crafting Interpreters: A Review

#124
post #74
post #52

I hesitated a little bit before deciding to purchase and go through the book. Had already read many glowing reviews then, but was not sure if the choice of language (Java) for the first half of the book would be a hindrance (it's not the stack I am most familiar with). Decided to buy it anyway, primarily because the two implementations of the toy language piqued my interest (most other books only go through one imple…

Does the book go into more „modern“ parser architectures ala Roslyn Red Green Trees?

If you're interested in Roslyn inspired compiler writing, Immo Landwerth who works on as a Program Manager on .NET made a Youtube series about writing a compiler, and my understanding from the part I watched is his work is heavily inspired by Roslyn.

https://www.youtube.com/playlist?list=PLRAdsfhKI4OWNOSfS7EUu...

Re: Crafting Interpreters: A Review

#126
post #52

I hesitated a little bit before deciding to purchase and go through the book. Had already read many glowing reviews then, but was not sure if the choice of language (Java) for the first half of the book would be a hindrance (it's not the stack I am most familiar with). Decided to buy it anyway, primarily because the two implementations of the toy language piqued my interest (most other books only go through one imple…

> was not sure if the choice of language (Java) for the first half of the book would be a hindrance I think it is refreshing he uses a "boring" language.

The way you phrase that makes it sound like you're implying there isn't an overwhelming dominance in terms of 'boring languages' and tutorials/content/books/training material. HN presumably doesn't upvote Java book #10^6 unless it is quite unique otherwise.

Re: Crafting Interpreters: A Review

#127

Earlier quoted context omitted.

Bob, your continued love of synths gives me hope we will see you take a real leap of faith and give us a ‘Crafting Real-time Audio via custom digital Synthesizers’. I would genuinely love a beginner friendly guide to audio programming in the style you developed for Crafting Interpreters. Help me get my friends into digital instrument programming Bob, it’s not like it would take that long!

I would love to write about audio programming. I've done some and am slowly learning more, but it's a real uphill battle. I get a lot of it, but the math behind filters is really hard for me.

If you can find a copy of Computer Music by Charles Dodge and Thomas Jerse, it's a relatively low-math high-practical walkthrough of lots of stuff including filters.

Re: Crafting Interpreters: A Review

#128

I'm in the middle of this book at the moment and I have mixed feelings on it. It's definitely well-written and you can feel the love and care that went into producing it. But I think it would have been stronger had Nystrom skipped the Java version and spent those pages on theory instead before jumping into the C implementation. While going through the Java stuff (implementing in C# instead because I have an emetic re…

Eh, you don't have to use Java for the first part. I didn't, and I've seen many other people in discussions of the book say they didn't either. It's readable enough, and the explanations are clear enough, that you can follow along in any other memory-managed language that you're comfortable with.

Re: Crafting Interpreters: A Review

#129

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…

These look great, and judging by other people's comments, are instances of a class of book I will poorly describe as "lovingly-crafted works of art on highly technical CS topics", a genre that I am always on the lookout for more examples of. From my own experience, some examples might be: - SICP, by Abelson and Sussman - Paradigms of Artificial Intelligence Programming, by Norvig By general acclaim, some examples mig…

It's not really CS, but alongside the books you have listed (I have most of those physically and as eBooks!) I absolutely adore "The Art of Electronics" as the Bible to electronics. It's definitely helped me out immensely.

Re: Crafting Interpreters: A Review

#130
post #52

I hesitated a little bit before deciding to purchase and go through the book. Had already read many glowing reviews then, but was not sure if the choice of language (Java) for the first half of the book would be a hindrance (it's not the stack I am most familiar with). Decided to buy it anyway, primarily because the two implementations of the toy language piqued my interest (most other books only go through one imple…

Any trouble with the Rust implementation? I wanted to give the book a go using Rust, but have been sitting on it because I don't want to get halfway through it only to find that Rust's intentional design and limitations might make it difficult to build an interpreter via the assumptions in the book.

You can do it pretty much verbatim, with dynamic dispatch using enums and lots of pattern matching.

It gets a bit trickier when you are nesting environments for closures and the like, but certainly nothing insurmountable without a few things from the standard library.

Post reply on HN