7 ms·
Crafting Interpreters – Web Version
- poushkar 5y agoI only started reading it, but I absolutely love the author's style! I wish I could write this well...
- Thursday24 5y agoRobert Nystrom has generously made the entirety of his "Crafting Interpreters" available for free.
- b3morales 5y agoThis was the original format; it was published on the web as it was being written, long before availability in print. (Not to say that it's not excellent of him to make and keep it freely available; it is!)
- asicsp 5y agoWow, that's a wonderful gesture from the author. I haven't read it yet, but I've seen so many great reviews on HN and other social media sites. Here's some of the past discussions: * https://news.ycombinator.com/item?id=27997167 https://news.ycombinator.com/item?id=27997167 (6 months ago | 118 comments) * https://news.ycombinator.com/item?id=22788738 https://news.ycombinator.com/item?id=22788738 (2 years ago | 74 comments) * https://news.ycombinator.com/item?id=13406081 https://news.ycombinator.com/item?id=13406081 (5 years ago | 75 comments)
- e67f70028a46fba 5y agoThis is a book that, if you can afford it, should be bought on general principle. There are very few books that show how recursive descent works and this one is incredibly well done. The fact he gives it away for free is amazing.
- munificent 5y agoI feel compelled to point that while I do give the book away for free which benefits lots of people, it also apparently benefits me too. Sales of the book (and my first book, Game Programming Patterns which is also online for free) have been way better than I ever expected. I think a large part of that comes from the web edition making the book better known that it would be otherwise. So this seems to be a strategy where everyone wins. People who can't afford it get to read it. People who can but want to see if they like it first can do that. Others who can afford it support my writing. I get a lot of readers and sales. I stumbled onto this model completely randomly, but it seems to have worked out really well for me.
- iainctduncan 5y agoWhich way of buying the print books is best for you? I've been meaning to pick both these up!
- munificent 5y agoThank you for asking. :) I think I technically make the most of you buy it from Amazon, but I'm not picky. You can also call your local bookstore and ask them to order a copy. I won't make quite as much, but you support a local business, which is always good.
- iainctduncan 5y agoNo problem, I used to work in the book biz! As I don't think we have a store on my tiny island that is hooked up to regular new book distributors, I'll go with Amazon. Thanks for making these.
- iainctduncan 5y agoordered and looking forward to them! :-)
- karpierz 5y agoUnrelated, but I did want to thank you for Game Programming Patterns; it's made game development much much less stressful for me.
- m00dy 5y agoI will read this book some day. It is always in my mind but, I'm too busy these days.
- tluyben2 5y agoWell worth paying for it as pdf or book by the way.
- endorphine 5y agoI was so excited for this, then I realized it uses C (which I'm not familiar with).
- wulfmann 5y agoThe first implementation is in java and the second is in c. Even if you don’t know C you should give this book a shot!
- marai2 5y agoThe book has two interpreters. The first one is in Java. The second one uses C. If you're familiar with Java then it makes for a great learning experience to contrast the Java version with the C version. (I think it's worth it to learn just enough C to be able to go through this second version. It makes for an awesome learning experience!)
- munificent 5y agoThe first half of the book uses Java, which you might be more familiar with. The C it uses is fairly vanilla. You shouldn't have to be a C expert to understand it. Also, all of the code in the book has been ported to a large number of languages: https://github.com/munificent/craftinginterpreters/wiki/Lox-Implementations https://github.com/munificent/craftinginterpreters/wiki/Lox-...
- stevekemp 5y agoThe golang based https://interpreterbook.com/ https://interpreterbook.com/ project might be interesting to you instead, then?
- mamcx 5y agoI hate, HAAAAAAATEEEE, C. But his C is so clean. Is readable as far as is possible, imho. Plus, exist some many implementations of this in as languages are, so you can go along (https://github.com/search?q=crafting+interpreters https://github.com/search?q=crafting+interpreters or using https://github.com/search?q=lox+interpreter https://github.com/search?q=lox+interpreter).
- j_ham3 5y agoIt's a great book! I really liked how it guides step-by-step, always having something working building up to the full interpreter for Lox. I haven't yet gotten around to the 2nd part of the book (the C based interpreter/vm) because I got carried away with adding extra features to my Kotlin Lox implementation (including a JVM backend)! https://github.com/mrjameshamilton/klox https://github.com/mrjameshamilton/klox
- orthoxerox 5y agoWe're waiting for Crafting Typecheckers, Bob!
- vishnugupta 5y agoRelated. The author's love for their craft oozes through their work. If I'm not wrong every single illustration in the book is hand-drawn; like literally. Take a look: https://www.youtube.com/watch?v=iN1MsCXkPSA https://www.youtube.com/watch?v=iN1MsCXkPSA
- munificent 5y agoYou're correct. Hand lettered too, because I am apparently obsessive. I talk about it more here: http://journal.stuffwithstuff.com/2021/07/29/640-pages-in-15-months/ http://journal.stuffwithstuff.com/2021/07/29/640-pages-in-15...
- agumonkey 5y agoThe layout and typography is frankly superb.
- Derbasti 5y agoThis book was absolutely amazing! It is astonishingly well-written, almost actually exciting to read at times, and chock full of fascinating insights and anecdotes. Oh, and its main text was really useful as well, uncovering so many programming language behaviors I had seen many times before, but never figured out why things were as they are. Truly, I can't recommend this book enough, if the topic is at all interesting to you! (And follow it up with Code, by Charles Petzold, to see how a processor works, and Operating Systems, Three Easy Pieces by Arpaci-Dusseau for how OSs work)
- frakt0x90 5y agoChelsea Troy, a Staff Engineer at Mozilla, keeps a blog where a lot of her posts work through various aspects of this book. I've really enjoyed reading them. https://chelseatroy.com/ https://chelseatroy.com/