Mal – Make a Lisp, implemented in 79 languages
github.com
github.com
The documentation in my opinion is fantastic, because I could jump in and start implementing it without feeling like I was just translating prose and diagrams to code (need to actually understand what you're implementing), or ever feeling completely lost. The end product still feels like 'my' interpreter.
If you'd like to learn more about lisp and interpreters/compilers, or just get more familiar with a language to implement it in: I can absolutely fully recommend implementing mal.
Edit: Oh, and if you do implement it yourself. Don't look at existing code. If I wasn't sure on the exact expected behavior at any point, I used the online JS implementation of mal as a black-box to see how it behaves: https://kanaka.github.io/mal/
Are there any other projects like this that let you compare implementations using many different languages (e.g., Rosetta Code)?
[1] https://github.com/munificent/craftinginterpreters/wiki/Lox-...
Unlike many of the Linux-based implementations I used C# in Visual Studio, and I never managed to get the automated test-suite to work. I tried very hard not to cheat but did have to refer to the reference C# implementation a couple of times. The implementation of macros was the hardest part, not helped by a month where I got almost no coding done and a couple of silly errors in an earlier step (which one of the tests I’d missed would have uncovered). I made what I thought were a couple of improvements to the base language, including better error handling, multi-line forms and multi-form lines.
For this winter’s project, I’m going to see if I can take source code for the original Elisa chatbot and re-implement it in MAL. I’m also tempted to see if I can build a simple IDE for MAL.
[0] https://www.non-kinetic-effects.co.uk/blog/2019/04/28/MAL-5
2015: https://news.ycombinator.com/item?id=9121448
One comment from 2016: https://news.ycombinator.com/item?id=12720777
https://github.com/kanaka/mal/blob/master/examples/clojurewe...