21 votes

Has anybody followed along with Crafting Interpreters?

12 comments

  1. a_sharp_soprano_sax
    Link
    Yes! I'm reading it right now. I just finished the functions chapter for the tree-walker interpreter. Though I'm using C# instead of Java.

    Yes! I'm reading it right now. I just finished the functions chapter for the tree-walker interpreter. Though I'm using C# instead of Java.

    2 votes
  2. [2]
    DeAngeloVickers
    Link
    Im a huge fan of crafting interpreters, especially the second half! I do wish there was some mention of how to add a simple static type system to the language.

    Im a huge fan of crafting interpreters, especially the second half!

    I do wish there was some mention of how to add a simple static type system to the language.

    2 votes
    1. ch1n3du
      Link Parent
      I had this same issue I wanted to try something new so I wrote a custom language for the second half but the type checker is relatively simple. I took a lot of inspiration from the chapter on...

      I had this same issue I wanted to try something new so I wrote a custom language for the second half but the type checker is relatively simple. I took a lot of inspiration from the chapter on semantic analysis and this great blog post also I made a list of nice compiler resources here on my blog and I'm very open to answer any questions about the code

      edit: I used rust instead of Java

      1 vote
  3. Liru
    Link
    My book arrived literally today. I'm going to eventually go through it so that I can learn how to properly make an interpreter, then I'm going to try to make a native Wren interpreter in Rust...

    My book arrived literally today. I'm going to eventually go through it so that I can learn how to properly make an interpreter, then I'm going to try to make a native Wren interpreter in Rust instead of having one bound via FFI. I tried making one a long time ago and failed to get around to it again because Life Happened(TM).

    2 votes
  4. [3]
    rmgr
    Link
    If you did, tell me about your weird diy languages!

    If you did, tell me about your weird diy languages!

    1 vote
    1. [2]
      isopod
      Link Parent
      I got really tired of LaTeX for mathematical typesetting, diagrams, and so forth, so I actually started building a language where the built-in types and syntax represented a document and all the...

      I got really tired of LaTeX for mathematical typesetting, diagrams, and so forth, so I actually started building a language where the built-in types and syntax represented a document and all the stuff in it. Executing the program meant outputting the document. I never did finish because it turns out that diagrams and pictures are very hard, but I have the source code around here somewhere... maybe I should dust it off.

      I feel like there are so many programming languages that are trying to do the same thing, that if you're going to build your own, you might as well target something really specific, y'know?

      3 votes
      1. rmgr
        Link Parent
        That's super cool! I love the idea of building my own tooling for a specific task!

        That's super cool! I love the idea of building my own tooling for a specific task!

  5. puida
    Link
    I did read though it all, but most of the concepts went right over my head (I think I just didn't pay enough attention). I've been wanting to read it again with more care sometime in the future.

    I did read though it all, but most of the concepts went right over my head (I think I just didn't pay enough attention). I've been wanting to read it again with more care sometime in the future.

    1 vote
  6. ducc
    (edited )
    Link
    It's on my bucket list! I've been working on a hobby kernel & operating system (duckOS) for the past 5 years or so, and a language seems like the next step for it. Specifically, I’d like to write...

    It's on my bucket list! I've been working on a hobby kernel & operating system (duckOS) for the past 5 years or so, and a language seems like the next step for it. Specifically, I’d like to write a simple language for defining IPC message schemas, and one for basic scripting. Unfortunately, free time is the limiting factor here.

    1 vote
  7. jonah
    Link
    I was just thinking about this the other day! I loved following along with the first half. The second half, I got too busy to follow along with, but perhaps I will start back up here soon! For...

    I was just thinking about this the other day! I loved following along with the first half. The second half, I got too busy to follow along with, but perhaps I will start back up here soon! For years I've been very interested in programming languages and how they work. This was the first resource that made me feel like the fog was lifted.

  8. tjf
    Link
    It's on my list, and probably the first resource I'll check out on compilers (I've seen the "Dragon Book" often recommended, but CI seems more approachable). On a side note: what format of CI do...

    It's on my list, and probably the first resource I'll check out on compilers (I've seen the "Dragon Book" often recommended, but CI seems more approachable). On a side note: what format of CI do people prefer? Print, e-book, PDF, web? Generally I prefer to buy or borrow physical books. But for something I'd be using alongside a computer, one of the digital formats seems sensible.