8 ms·
One of the great advantages of Shen is that it is built on top of a very simple Lisp called KL of which you can (at least basically working) implement an interp
by tluyben2 12y ago
One of the great advantages of Shen is that it is built on top of a very simple Lisp called KL of which you can (at least basically working) implement an interpreter or compiler in any language in a day. And when you did that, Shen will run on it. That's why there are so many targets and that's why most targets are not mature. I find it a great advantage though; you can make a compiler or runtime embedded in whatever you are doing really fast and then optimise it as you go.
Edit: I would say, if you want to practice on implementing a compiler & runtime (or VM with JIT or LLVM frontend etc) KL is a good place to start. It's so easy (again, to get something working; to optimise etc is obviously just as painful as with any other language implementation) that it is a lot of fun and you learn a lot if you never did it before.
- 616c 12y agoIs there any good introductory info on K lambda? I did some quick Googling and Wikipedia searching, I did not find a singular article about this, not general lamdba calculus or something useful to a complete novice like me.
- doublec 12y agoI think this from the Shen site describes it: http://www.shenlanguage.org/learn-shen/shendoc.htm#Kl http://www.shenlanguage.org/learn-shen/shendoc.htm#Kl
- tluyben2 12y agoYes, you would use that doc to implement it and then the Shen distribution to test if it works as expected. Unlike Shen, K lambda is quite a simple Lisp implementation, if you know a bit of Lisp it should all look pretty straight forward. It doesn't have any advanced stuff built in; that's all done on top.