now if we can just have it for C please... :)
Caveat, no GC. Although that could probably be added easily using the Boehm GC. I plan to do so at some point assuming nobody beats me to it.
41–44 of 44 posts
now if we can just have it for C please... :)
Caveat, no GC. Although that could probably be added easily using the Boehm GC. I plan to do so at some point assuming nobody beats me to it.
Earlier quoted context omitted.
It's still a worthwhile effort even if all he did was aggregate them.
Looking at the coding style he certainly wrote every single bit by his own. The code itself is standard of the shelf lisp introduction as done by good universities in the last decades. (SICP, Lisp in Small Pieces, ...). But bringing this simple code to the masses who just known C, python, perl, java, php or ruby is the interesting part. They can now relate to eval, tailcalls or an env.
Obligatory cloc reading to see which implementations were shortest: ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Rust 17 294 155 3919 C 18 446 383 3356 C# 19 472 235 3314 Visual Basic 17 322 131 2945 Java 17 322 134 2872 Go 17 299 147 2636 Bourne Shell 16 304 241 2308 Pe…
- forth
- mal itself (e.g. self-hosting: all implementations can run this)
- miniMAL (Lisp interpreter in - PostScript
- R
- Racket
now if we can just have it for C please... :)
mal C implementation: https://github.com/kanaka/mal/tree/master/c Caveat, no GC. Although that could probably be added easily using the Boehm GC. I plan to do so at some point assuming nobody beats me to it.
(although having a C implementation is awesome, even with the caveat)
lisps are great as an instruction on the subject because of the clean and elegant design, but a C compiler requires tackling all kinds of very nasty problems...
i'm sure it would be very valuable for people wanting to go even further with gaining a practical understanding of programming language/library implementation