Full description not available
I**N
Great hands-on interpreter implementation book for beginners
Excellent book!It takes a hands-on approach to implementing an interpreter. While it covers the basics of theory, it also walks you through two complete implementations of an interpreter for the Lox language (a language designed specifically for this book). The book is not heavy on theory and is an excellent choice for someone who knows nothing about interpreters and wants to learn by doing or for someone who also wants to be able to say, "I wrote an interpreter."It is also beautifully designed, full of nice illustrations, and is written with humor.
J**A
well crafted writing
recommend for your next read
R**Y
a gem for those who wish to learn about and build compilers
This book is a gem for those who wish to learn about and build compilers. It gets the balance between teaching you concepts and then showing you how to do it. It builds both the concepts and the code necessary step by step, and each step is easy to consume. Before you know it, you've already mastered and coded up what would have seem like a daunting task. The choice of teaching you to build the compiler twice, first in a higher level language to get you familiar with the end to end process, and the second exposes you to very advanced techniques in C such as byte code single pass generation and execution, garbage collection, efficient implementation of closures, etc., also dramatically simplified the overall learning experience.
R**.
Useful information for writing a small interpreter
A lot of this reminds me of when I studied from the Dragon Book in school, and what I remember is very helpful, but this book is more on a practical tack of actually use it. (Best thing for me was a suggestion that I take as never mind getting the elegant and difficult way of doing what I want and just get started and I can add the hard to use tools later.) Uses examples that seem of trivial use but clear examples and well describes the techniques needed.
A**E
Good book, printing quality ok (read on).
This is not an Ai review.I used the book as an intro to writing my own compiler. Yes, it is about interpreters, but there are a lot of common techniques. The author explains along as he codes with the reader a simple version of a scripting language in Java and a more sophisticated and performant version in C. He names shortcuts, simplifications, reasons to take a certain way over alternatives because there's only so much space in a book, and in the end you have made your interpreter.It was said that the printing quality is bad because some lines fade: this is on purpose, to show where in existing code (faded lines) a new snipped (bold lines) belongs. At no time I had a problem reading, and my eyes are not the best.The only critique I have: would have been perfect if there was a list of literature on the subject languages, interpreters, compilers.Strongly recommended with 4.8 rounded up to 5 stars for people who like a hands on approach.
J**Z
Good option
Gift for my aunt -helpful for her craft
J**
Excellent!
Bought this for my son and he's thrilled with it.
A**.
A marvel of technical writing crippled by a few flaws.
This is a hard book to review because on the surface it's a fantastic feat of technical writing, but when you dig deeper it has fundamental flaws that ruin the experience.The first flaw is that the first 200ish pages are spent implementing a tree-walk interpreter in Java which results in a slow, unusable interpreter that is academic but not practical. I think he would have been better off cutting that out and dedicating fifty pages or so to explaining the high level overview of how one works to lay the foundation for the rest of the book.The second flaw is that he wrote the book such that every single line of code present in the implementation is also in the book, and everything is built up slowly jumping across multiple files and functions. The trouble with programming books is that the example code often has typos or errors because the author has to copy from their code editor, paste into a document without syntax highlighting, edit for formatting, and then update the book code later if they make changes. Nystrom got around this issue by writing his own tools that automatically keep the book text and the source code in sync (Donald Knuth called it Literate Programming, and the book Physically Based Rendering does the same thing).In theory this sounds wonderful because it means you can follow along with him and know exactly where to insert every line of code that he demonstrates. But I instead found it hard to understand the big picture because my brain had to constantly shift from English explanations to code minutiae.That method of presentation means that it's hard to re-read bits for further understanding. Instead you've got to wade through mountains of code snippets with bits of explanation strewn throughout. It also means that he'll present a code snippet that references functions or variables that haven't been shown/explained yet. And it also means that he must sometimes insert temporary stub code only to replace the contents later.His system of keeping the code in sync is present in the book's GitHub repository, so exploring the code in its entirety means wading through comments that exist solely for his generation tools. I would have much preferred the traditional approach of verbose English explanations and diagrams with small code snippets that occasionally have errors in them, but supplemented with a code repository on GitHub with tags per chapter so you can see things build up over time.The third flaw is related to the second flaw in that the code is hard to understand. I think this is likely due to the fact that he had to write the code in such a way that it could be displayed in small chunks in the text. That results in the repeating pattern of multiple singletons that have their contents modified by functions that take no arguments but change the state of the program.He says in the text that he uses the singletons so that he can save on book space and not pass a variable around to different functions, which is fine in principle when done sparingly, but it makes it hard to learn from the code snippets because you see a call to "advance()" repeatedly and forget what exactly that function does. This is related to another issue I have with the style which is many small functions that have maybe one or two lines. Something like "advance()", for example, does nothing more than increment a pointer (which is inside of a singleton).My preference is for more explicit and verbose code as I find it more readable, but that goes against the sort of code required for a book where every single line of code is present in the text. He needed to create a bunch of tiny functions to save on space.In short, the book is a marvel of technical writing in that it is very readable and enjoyable. He writes well and his drawings are charming (though I could do with fewer marginal anecdotes personally). He explains things well when he's using English. But I think the book is difficult to understand and falls apart at the actual code level which is unfortunate.I would still recommend the book because it does more right than it does wrong.Note: The entire book is free online and Nystrom should be commended for that.
Trustpilot
2 months ago
1 month ago