3 ms·
If you go with (hygenic) fexprs instead of macros, they're both easier to implement and more expressive, at the expense of performance. Check out John Shutt's
by tree_of_item 9y ago
If you go with (hygenic) fexprs instead of macros, they're both easier to implement and more expressive, at the expense of performance.
Check out John Shutt's thesis for more information on hygenic fexprs: https://web.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unrestricted/jshutt.pdf https://web.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unr...
- sago 9y agoThanks for the tip. If it wasn't the end of the weekend, I'd be tempted to break out emacs.
- sparkie 9y agoHere's a small implementation of Kernel in around 700 lines of Haskell [https://github.com/vito/hummus/tree/master/src/Hummus https://github.com/vito/hummus/tree/master/src/Hummus]. Note that it's not Kernel proper, as it uses delimited continuations instead of the guarded undelimited continuations in the Kernel report, plus there's a few other differences and some bugs. Anyone looking for a more complete implementation, check out klisp [http://klisp.org http://klisp.org]. It's not 100%, but has some stuff not included in the Kernel report, some of it lifted from R6RS. The main thing it's missing which it desperately needs is an FFI.
- radarsat1 9y agoOn the subject of Haskell, what's the shortest Haskell (possibly Haskell subset) interpreter anyone has written?