4 ms·
I have never used Swift, but I can confirm that writing a Lisp is a lot of fun in something like C or Go. I especially like the fact that you can build in so mu
by ue_ 10y ago
I have never used Swift, but I can confirm that writing a Lisp is a lot of fun in something like C or Go. I especially like the fact that you can build in so much raw power by implementing Lisp macros for example.
- akkartik 10y agoYeah! Even more so if you have first-class macros (fexprs) like say Kernel does. I had a lot of fun building a fexpr-based lisp-1 with quasiquote (which Kernel eschews) and also with a first-class apply that works on both functions and macros. Not even Kernel can do that. $ git clone https://github.com/akkartik/wart $ cd wart $ ./wart ready! type in an expression, then hit enter twice. ctrl-d exits. mac (foo x) `(+ ,x 1) => (object function {sig, body}) (foo 3) => 4 (foo @(list 3)) # apply analogous to the ,@ splice operator => 4 (foo @'(3)) => 4 More info at http://akkartik.name/post/wart http://akkartik.name/post/wart. Lots of example programs at http://rosettacode.org/wiki/Category:Wart http://rosettacode.org/wiki/Category:Wart.
- deleted 10y ago[deleted]
- nickynickell 10y agoTake it a step lower and do one in assembly and it is even more fun. I almost have enough code together to say that I'm doing one in RISC-V assembly. At this point I have already accidentally picked up a more intuitive understanding of how a lisp compiler works.
- tomcam 10y agoAssembly? Hell, I did mine in microcode, VHDL, and telepathy using a tachyon-driven IDE. It was done before I started.
- mirekrusin 10y agoWhat about this guy who created universe where life evolved and wrote lisp interpreter for him. That is low level my friend.
- tomcam 10y agoI am constantly being outclassed
- marcpaq 10y agoFunny you should say that: https://github.com/marcpaq/arpilisp https://github.com/marcpaq/arpilisp
- nickynickell 10y agoThat is beautifully well documented. Are you planning to extend it further or do any similar projects?
- marcpaq 10y agoThanks. The inspiration was jonesforth. I have no plans to extend it. A similar project I've considered: write an Algol compiler in assembly. Algol is another elegant, influential language originally implemented in assembly.