[HN Gopher] Crafting Interpreters - Web Version
___________________________________________________________________
Crafting Interpreters - Web Version
Author : Thursday24
Score : 129 points
Date : 2022-02-14 14:26 UTC (8 hours ago)
(HTM) web link (craftinginterpreters.com)
(TXT) w3m dump (craftinginterpreters.com)
| e67f70028a46fba wrote:
| This 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.
| KptMarchewa wrote:
| Just ordered it. I've read a parts of it when it was still
| being worked on and it was a delight. Can't wait to read it
| all.
| munificent wrote:
| I 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.
| karpierz wrote:
| Unrelated, but I did want to thank you for _Game Programming
| Patterns_ ; it's made game development much much less
| stressful for me.
| munificent wrote:
| That's great to hear!
| iainctduncan wrote:
| Which way of buying the print books is best for you? I've
| been meaning to pick both these up!
| shepherdjerred wrote:
| Wow thanks so much for writing both of these! Game
| Programming Patterns helped me so much when I wrote a game
| engine my senior year. I read the book online and bought the
| physical book when I saw how useful it was. I immediately
| bought Crafting Interpreters when it first came out and I
| hope to give it a proper read through when I have some time.
| klaussilveira wrote:
| Crafting Interpreters was an amazing experience and the
| printed version is just beautiful. Thank you! :)
| throw_m239339 wrote:
| Thanks. This book helped me a lot in my projects.
|
| I'd like to see more books in the future about crafting
| relational databases (server or not). I know it's a huge
| endeavor, but I find techniques related to efficient file
| writing, data persistence, partitioning, indexing and
| effective datafile querying fascinating. After all, databases
| are also "mini" file systems.
| zellyn wrote:
| It turns out the type in the print edition is small enough to
| trouble my ageing eyes, but I'm more than happy to have
| bought a copy to support such a labor of love!
| munificent wrote:
| Aw, darn. I'm sorry to hear that. My eyes definitely aren't
| what they used to be either, and I tried to typeset the
| book as readably as possible (which is a big part of why
| the page size is larger than most other technical books).
| marai2 wrote:
| I totally agree. If you're into computers and computer-sciency
| interests and interpreters/compilers, try going through the
| Dragon book and try going through Bob's book. You'll realize
| that even though the Dragon book sells for something like $160,
| the Crafting Interpreters book is worth many times over for its
| pedagogy. (Of course both books have very different aims so
| it's not an apples-to-apples comparison, one is a good book for
| an overall Compilers course and the other gets you right in to
| writing your own interpreter with just enough theory to see how
| things fit together).
| Derbasti wrote:
| This 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)
| m00dy wrote:
| I will read this book some day. It is always in my mind but, I'm
| too busy these days.
| tluyben2 wrote:
| Well worth paying for it as pdf or book by the way.
| agumonkey wrote:
| The layout and typography is frankly superb.
| orthoxerox wrote:
| We're waiting for Crafting Typecheckers, Bob!
| j_ham3 wrote:
| It'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
| frakt0x90 wrote:
| Chelsea 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/
| Thursday24 wrote:
| Robert Nystrom has generously made the entirety of his "Crafting
| Interpreters" available for free.
| b3morales wrote:
| This 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 wrote:
| Wow, 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 _(6 months ago |
| 118 comments)_
|
| * https://news.ycombinator.com/item?id=22788738 _(2 years ago |
| 74 comments)_
|
| * https://news.ycombinator.com/item?id=13406081 _(5 years ago |
| 75 comments)_
| vishnugupta wrote:
| Related. 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
| munificent wrote:
| You'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...
| endorphine wrote:
| I was so excited for this, then I realized it uses C (which I'm
| not familiar with).
| wulfmann wrote:
| The 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 wrote:
| The 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 wrote:
| The 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-...
| mamcx wrote:
| I 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 or using
| https://github.com/search?q=lox+interpreter).
| stevekemp wrote:
| The golang based https://interpreterbook.com/ project might be
| interesting to you instead, then?
___________________________________________________________________
(page generated 2022-02-14 23:02 UTC)