Hacker News new | past | comments | ask | show | jobs | submit login
Self-hosting Lisp-to-C compiler in 384 lines of Lisp (github.com/darius)
66 points by abecedarius on Nov 29, 2010 | hide | past | favorite | 10 comments



Compared to other recent Lisp posts, this one implements the nitty-gritty like garbage collection itself, not depending so much on the implementation language.


If you think that's cool, check out Darius' old site:

http://www.accesscom.com/~darius/

He's a pretty prolific hacker.


PS, "ichbins" = "I can hardly believe it's not Scheme!".

For a while I thought it was [["Ich bin"s]], => "I AM"s auf deutsch.

Good to see abecedarius is finally un-dead'd.


"Ich bins" with the 's' actually does mean "It's me" in German (I'm told). Manuel Simoni pointed out the pun when he saw an earlier attempt called 'icbins'.


Is there a problem around lines 87 or 88? Or is it just with the syntax highlighting?

ETA: Thanks!


Syntax highlighting. Github thinks it's Scheme when it's really its own dialect of Lisp, with \c for a character literal instead of #\c. (Part of the fanatical simplification.)


just the highlighting... it doesn't understand the \" escape


"Lisp compiler in (arbitrary language) in (arbitrary number lines."

Why not just metaprogram this?


Metaprogramming isn't free. Trivial conversion from lang A to lang B, even less so.

I dare you to write a program that compiles arbitrary Java code to awk. They're both Turing-complete, so it's guaranteed to be possible! Cheers!


Brucee used to assign "Lisp in C" and "C in Lisp" when he was teaching.

when he wasn't messing with people :

http://en.wikipedia.org/wiki/Mark_V_Shaney




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: