Show HN: Crafting Interpreters – A handbook for making programming languages
51–60 of 77 posts
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#52Earlier quoted context omitted.
There's nothing more "advanced" about statically typed languages. Static typing and type inference are straightforward and can make implementation details simpler than dynamic languages (because you're greatly reducing or removing the unknowns you have to deal with at runtime). This is assuming you're making a batch-style compiler, as most implementors do, and not an interactive system. If you're focused on benchmark…
I meant "advanced static-typing" (e.g, like System F, which is advanced to someone learning PL). Not that it was more advanced, although I think in fact it is from a learner's point of view. It's incredibly simple to throw together a Scheme, or even a more complex interpreted dynamic language. Add in a static typing, type inferencing, and type checking, and that all becomes much more complicated, at least from this l…
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.
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#53Really looking forward to this! A much less involved language-building tutorial that's available now is Beautiful Racket.[0] Racket is a Scheme, but it's also specially outfitted to be a language workbench.
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#54I've been reading http://beautifulracket.com/ and its a really good introduction on making interprets.
Scheme/lisp based languages and Haskell are a great choice for this kind of project.
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#55Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#56That'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?
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#57That'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?
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#58Seems to be a hot topic, a friend and colleague published this in December 2016 and I can thoroughly recommend it (Uses Go as an implementation language): - https://interpreterbook.com
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#59Looking 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
Nice project. What do all the //> SomeName not-yet in the code mean? Are they meant for some kind of automatic processing? Its a bit hard to read with all of them there...
I know it makes the code hard to read. I should probably slap together a little script to strip them out.
Re: Show HN: Crafting Interpreters – A handbook for making programming languages
#60Earlier quoted context omitted.
> See also Lua's upvalues for a way to optimize closure variable access Yes! In fact, that's how the C version of the interpreter in my book implements closures. It's pretty brilliant. <3 those Lua folks.
Will you cover anything about LuaJIT's "NaN-coding"? Or perhaps do you have a link about how it works?