5 ms·
The sequel to Writing an Interpreter in Go is coming this summer
- fabrik42 8y agoI read the first part and can highly recommend it!
- stephen82 8y ago10 days ago, I finished the first book and now I can't wait to get in my hands this second book about compilers! I'm currently reading "Compiler Design in C" by Allen I. Holub, https://holub.com/compiler/ https://holub.com/compiler/, and so far I like it. But to use Go in place of C would be a nice alternative as well! I can't wait to read the new book.
- skybrian 8y agoFor a VM interpreter loop, you do pay a performance price in Go versus C. I ported the Wren interpreter to Go for fun and it was about 2.8x slower.
- stcredzero 8y agoSecure Connection Failed The connection to the server was reset while the page was loading. The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem.
- misternugget 8y agoThanks for notifying me, but I'm sorry to say that I can't reproduce the problem. It's hosted on Netlify, who also take care of the certificate, so I'll let them know.
- stcredzero 8y agohttps://i.imgur.com/i5wrCrR.jpg https://i.imgur.com/i5wrCrR.jpg
- nappy-doo 8y agoI read this book -- typing/modifying the code as I went, and enjoyed it immensely. Like others in the thread, I'd recommend this book.
- scboffspring 8y agoLooks neat! I just bought the previous one. Had a very quick read through it, it looks really good. Looking forward to the compiler one!
- jnbiche 8y agoOnce again, I'm put out a plea for a modern programming language book written similar to this one, but for a statically-typed functional language. Like a basic ML or mini-Haskell. Yes, I know there are some examples in PlZoo and similar, but I'd love to follow a step-by-step book instead of a lump of code, or a dense research paper. I'd pay good money for such a book, if it was well-written. Stephen Diehl was on the way to writing such a book, but he stopped before he got to type checking and pattern matching, which are exactly what I've tended to struggle with. I can write a lisp or other dynamically-typed lambda calculus-based language with ease. The hard part is the type checker and (to a lesser extent) Hindley-Milner. I've managed to figure out Hindley-Milner but am stuck on how to write the pattern matcher and certain aspects of the type checker. There are also one or two dense academic books from the 1970s that I found hard to follow. The one that's helped me get the furthest is Pierce's Types and Programming Languages, which is dense and academic but also well-written and with good examples. But I'd really love such a book written in a similar style to this "Compiler Book", "Writing an Interpreter in Go", etc. Also, a general complaint about recent compiler/interpreter books: Most of these books go deep into parsing (the easiest part) and ASTs, but then they spend relatively little time on codegen and type checking, which are far more difficult.
- NathanCollins 8y agoAre you aware of /The Implementation of Functional Programming Languages/ by Simon Peyton Jones, the main person behind the front end of the GHC Haskell Compiler? The full book is available free on his web site as PDF: https://www.microsoft.com/en-us/research/publication/the-implementation-of-functional-programming-languages/ https://www.microsoft.com/en-us/research/publication/the-imp... It has two chapters on pattern matching, two chapters on type checking, and several chapters related to execution. I have not read it.
- jnbiche 8y agoYes. I appreciate that he released it as a PDF, but that book is one of the old, dense, academic books I described. I should try it again, but it's very different from the step-by-step books posted above, or the partial book by Stephen Diehl.
- otterpro 8y agoI also recommend Robert Nystrom's book Crafting Interpreters (http://www.craftinginterpreters.com/ http://www.craftinginterpreters.com/) for learning about interpreters. While it is still work-in-progress, the quality is great, and it is free to read online. The author also wrote one of my favorite book, Game Programming Patterns (http://gameprogrammingpatterns.com/ http://gameprogrammingpatterns.com/)