News for hackers. Stuff that matters.
Re:Clang/LLVM using the built in assembler builds all of Fre... by sedachv on Saturday October 30, 2010 @02:26PM (#1851465)
Most Lisp compilers have intermediate representations too, although these IRs are still technically Lisp code (although they may not be executable). There's a really good series of blog posts about the IR of the SBCL compiler by Roman Marynchak:

http://insidelisp.blogspot.com/search/label/python-book

Re:Clang/LLVM using the built in assembler builds all of Fre... by pjscott on Saturday October 30, 2010 @03:38PM (#1851613)
It sometimes fun to take some random Lisp code and fully expand the macros:

    (macroexpand '(loop for x in list minimize (sin x)))
The output depends on your Lisp compiler, but it can get pretty wild. This is why we have the macroexpand-1 function, to just expand the first macro it finds and stop before all collapses into madness.

A compiler writer could get a lot of mileage out of this sort of thing. For example, a LET special form could be implemented as a macro that expands to a call to an anonymous function. All the looping forms could be turned into lambdas and recursion. As long as the compiler can handle that sort of thing nicely, this could really simplify the compiler code.