Hi 4tH-ers!
Someone had asked me to add a Lisp interpreter to 4tH. Well, there is a slight problem with that: I don't know the language too well. However, I came across a tiny implementation that was so vanilla that I had to try it. And it worked. I simply yanked a whole bunch of Forth compatibility layers in (didn't even convert the file I/O), added the locals library and off we go.
Sure, I encountered some bumps, but not too many, so it was running within minutes. I think I'm missing out stuff but I really rely on you guys to add it. Note it does a whole bunch of allocations and never frees anything so at some point in time you may run out of memory. Well, at least you can now write stuff like:
(define twice
(lambda (x)
(+ x x)))
(display (twice (twice 1)))
Or:
(define fac
(lambda (n)
(cond ((eq? n 1)
1)
(t
(* n (fac (- n 1)))))))
(display (fac 5))
As far as I understand, you could even turn it into a library and sent strings to be interpreted to this implementation. Source in SVN.
Hans Bezemer