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.
Thanks 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.
Once 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.
Are 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:
Yes. 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.
Addendum: Hell, I should add that I'd be happy with a book on any statically-typed language, for example a statically-typed version of this Monkey language that people are writing tutorials for.
A statically-typed functional language with pattern matching, closures, tail-call elimination, etc. would be even better, but there's a huge dearth of practical books on creating even basic statically-typed languages and type checkers. Meanwhile, we get a new book on interpreters for some dynamically-typed language every week. I think we have enough of those, unless you're just writing it for your own edification!
I also recommend Robert Nystrom's book Crafting Interpreters (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/)
13 comments
[ 3.3 ms ] story [ 27.6 ms ] threadI'm currently reading "Compiler Design in C" by Allen I. Holub, 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.
The connection to the server was reset while the page was loading.
Looking forward to the compiler one!
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.
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.
A statically-typed functional language with pattern matching, closures, tail-call elimination, etc. would be even better, but there's a huge dearth of practical books on creating even basic statically-typed languages and type checkers. Meanwhile, we get a new book on interpreters for some dynamically-typed language every week. I think we have enough of those, unless you're just writing it for your own edification!