Live data from Hacker News

Crafting Interpreters: A Review

chidiwilliams.com

101–110 of 155 posts

Re: Crafting Interpreters: A Review

#101
post #75

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…

Any defining book for databases? I'm interested in going deeper into the query planner and indexes.

Look up Designing Data-Intensive Applications by O'Reilly.

Re: Crafting Interpreters: A Review

#102
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…

Question for you on Rust for part 2. Did you skip the data structure implementations part, did you use unsafe, or did you do shenanigans like Ids instead of pointers with backing vecs to handle them?

Re: Crafting Interpreters: A Review

#103

Earlier quoted context omitted.

> Though I do feel the author ran out of steam with respect to the lovely, quirky artwork in the book. Definitely true. I was hoping to write the book in two years and it took me six. By the end (which was also during the pandemic) I was pretty fried and it was hard to summon much energy for whismy. I tried to pack as many illustrations in as I could, but by later chapters I was really just trying to get it done. Als…

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'd be surprised if there isn't some beginner-friendly guide to audio programming, albeit not in the same author's style. Anyone have a favorite?

Re: Crafting Interpreters: A Review

#104
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.

Re: Crafting Interpreters: A Review

#105
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…

Using Java was a poor choice (especially without the latest improvements such as records and switch expressions): * new books should use more modern popular languages to age well and to attract younger audience * on the JVM there are languages better suited for the topic (e.g. Scala by a large margin) * There's already the "Language Implementation Patterns" book ( https://www.amazon.com/Language-Implementation-Patter…

Didn't think I'd see 'attract younger audience' and 'Scala' in the same sentence.

A lot of young people know Java because it's what they learned in school and because a lot of employers use it so it's the first thing they learn on the job.

In my opinion, the language is designed in a way that makes it easy to pick up for beginners. The lack of obfuscated operators and foot guns is a plus, and the language forces you to avoid doing 'clever' code golf things, too.

Re: Crafting Interpreters: A Review

#106
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…

I wrote the first one in Python without issue. I guess any sufficiently expressive language should be fairly easy to “adjust the recipe to” while still following the book.

Re: Crafting Interpreters: A Review

#107
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…

I wrote the first one in Python without issue. I guess any sufficiently expressive language should be fairly easy to “adjust the recipe to” while still following the book.

How was the performance?

Re: Crafting Interpreters: A Review

#108

Earlier quoted context omitted.

I wrote the first one in Python without issue. I guess any sufficiently expressive language should be fairly easy to “adjust the recipe to” while still following the book.

How was the performance?

Pythonic.

(I didn’t measure nor care about performance. That wasn’t the goal of the exercise)

Re: Crafting Interpreters: A Review

#109
I keep meaning to pick this back up. It was my go-to project during air travel and train travel for a while, but I stopped going in to the office so much and command line only projects have trouble competing for mind space with visual stuff, at least for me.
Post reply on HN