Live data from Hacker News

Show HN: Crafting Interpreters – A handbook for making programming languages

craftinginterpreters.com

71–77 of 77 posts

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#71
post #32
post #6

Another great-looking book on making dynamic languages. There's been some good ones recently, and this one looks like another good one covering how to make a basic, interpreted language. Some of us have written 1 or 2 dynamic, interpreted languages, feel pretty comfortable with those concepts, and are interested in transiting to more advanced, static type systems and writing a good type checker. Anyone up for writing…

I want this too, but is weird to me that is a huge chasm in this area, where a lot of material stop at the most basic, and then it cover a niche that is complicated (like for example, type inference). If I wanna to implement a dialect of ML, I haven't' find a simple explanation in how implement product/sum types, modules & pattern matching. Yet, tons of type inference and other less common things. ie: The basics stop…

> If I wanna to implement a dialect of ML, I haven't' find a simple explanation in how implement product/sum types, modules & pattern matching.

Exactly. I mean, how in the world to implement pattern matching in ML-like languages? And ADTs? These are exactly the kind of subjects I'd like to see covered in a more advanced book on building interpreters or compilers for statically-typed languages.

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#72
post #5

Thank you so much for the book, please, continue! I am currently working on Scheme R5RS implementation in Java. It is a hobby project, but I'm really enjoying it. It is somewhat enlightening. Look forward to reading the Optimization chapter: I couldn't find much useful and practical info on that. I think it is quite easy to implement your interpreter, but it is really difficult (at least for me) to make it fast. Can…

Take a look at Nils Holm's http://www.lulu.com/shop/nils-m-holm/lightweight-compiler-te...

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#73
post #29

Looking forward to the chapters about the C interpreter. Meanwhile, it looks like both interpreters are available to study now in the Git repo. [1] [1]: https://github.com/munificent/craftinginterpreters

Me too; I'm looking for a way to learn more about building data-structures in C.

Hanson's C Interfaces and Implementations [0] is one of the best books on the subject.

Strongly complemented by Sedgewick's Algorithms in C.

[0] https://www.amazon.com/Interfaces-Implementations-Techniques...

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#75
post #56

That's so cool! Learning to make a programming language is in my life's todo list, just as doing my own (super simple) operating system. Thank's for contributing with a free book, I very much appreciate it. Does anybody know of something similar but for operating systems?

Not quite but this is a good read. https://littleosbook.github.io/

This is good! It will definitely do.

Thank you very much!

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#76
post #68
post #52

Earlier quoted context omitted.

dearth of learning materials for things like Hindley-Milner What's wrong with the original paper [1]? It's really basic and boiled down to the essence (in true Milner style). I give it to all my students interested in typing systems as first paper. (There is a typo on Page 211.) [1] L. Damas, R. Milner, Principal type-schemes for functional programs.

Eric Lippert[0] is doing an "excessive explanation" of this paper[1], where he breaks the entire paper down, line by line, with examples that C#/Java people would recognize. It's nice for people like myself who are strong on concepts, but weak on notation. ex: map : ∀α ∀β ((α → β) → (α list → β list)) Which I previously couldn't read, but I could easily explain the concept. [0] - Former C# language designer, Roslyn c…

Thank you, that's an interesting point.

The thought that somebody would not be able to understand the type of map had not occurred to me, because I'm surrounded by people with a strong maths/FP background. Shows just how narrow-minded I am.

Re: Show HN: Crafting Interpreters – A handbook for making programming languages

#77
post #73
post #29

Earlier quoted context omitted.

Me too; I'm looking for a way to learn more about building data-structures in C.

Hanson's C Interfaces and Implementations [0] is one of the best books on the subject. Strongly complemented by Sedgewick's Algorithms in C . [0] https://www.amazon.com/Interfaces-Implementations-Techniques...

I added both to my wish-list; Thanks!
Post reply on HN