Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yeah! 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. Lots of example programs at http://rosettacode.org/wiki/Category:Wart.


Take 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.


Assembly? Hell, I did mine in microcode, VHDL, and telepathy using a tachyon-driven IDE. It was done before I started.


What about this guy who created universe where life evolved and wrote lisp interpreter for him. That is low level my friend.


I am constantly being outclassed


Funny you should say that:

https://github.com/marcpaq/arpilisp


That is beautifully well documented. Are you planning to extend it further or do any similar projects?


Thanks. 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: