logoalt Hacker News

chombiertoday at 4:25 PM1 replyview on HN

If you ever wondered how to write a programming language, this is probably the best resource to get started (and then of course Crafting Interpreters).

See also part 2 https://norvig.com/lispy2.html


Replies

embedding-shapetoday at 7:10 PM

I've always found MAL ("Make-A-Lisp" https://github.com/kanaka/mal) a bit more approachable, probably because I was out after creating my own programming language before I've written much Python. It's language agnostic, and really easy to follow along with most programming languages out there, explaining everything as you progress.

That it's language agnostic and somehow matters feels weird now a lot of time (and experience I suppose) afterwards, but back when I only knew 1-2 languages by heart, also having to face understanding Python at the same time from Norvigs guide/reference made it slightly more complicated for me.

I use this as a litmus test now when coming across new languages (implementing MAL in the new language), as it's such an easy approach to practically test large parts of the new language, and there is always host-language-specific tricks you can learn along the way.