TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Clean Lisp implementation for study?

18 pointsby vu3rddover 15 years ago
I am currently learning Common Lisp and would like to study a well written Lisp Implementation for study to look inside how Lisp is implemented and also to learn the idioms of the language. What would the readers suggest? Thanks.

12 comments

mahmudover 15 years ago
T 3.0<p><a href="http://mumble.net/~jar/tproject/t3.0.tar.gz" rel="nofollow">http://mumble.net/~jar/tproject/t3.0.tar.gz</a><p>The most beautiful compiler for <i>any</i> language.<p>P.S. Why not ask the specialists? the people hacking Lisp compilers for the love of it; unpaid and unsung heroes? Drop by #lisp or #scheme in Freenode and see who is there. Most competent Lisp compiler hackers wouldn't be caught dead in this neck of the woods; it's just us web guys, blowhards and joe nobodies.
评论 #870626 未加载
dravenover 15 years ago
I'm far from being an expert but "Lisp in small pieces" is frequently recommended.<p>There are a lot of free/opensource implementations to study. SBCL is widely used and ppl working on it are available in #lisp. It may be the same for ClozureCL.
评论 #869355 未加载
jlwjrover 15 years ago
If you just want to understand the basics, Andru Luvisi has written an interpreter in less than 400 lines: <a href="http://www.sonoma.edu/users/l/luvisi/sl5.c" rel="nofollow">http://www.sonoma.edu/users/l/luvisi/sl5.c</a> and an interpreter I threw together based off his design adding garbage collection &#38; more ops in 500 (though the macro system is non-standard and maybe broken): <a href="http://codepad.org/sQvOeqN9" rel="nofollow">http://codepad.org/sQvOeqN9</a>
brianmover 15 years ago
Probably better to ask this question on lambda the ultimate ( <a href="http://lambda-the-ultimate.org/" rel="nofollow">http://lambda-the-ultimate.org/</a> )
clordover 15 years ago
If you just want to understand Lisp, and not platform-specific stuff, I recommend tackling it at a higher level.<p>Haskell is a great language to implement other languages in:<p><a href="http://www.defmacro.org/ramblings/lisp-in-haskell.html" rel="nofollow">http://www.defmacro.org/ramblings/lisp-in-haskell.html</a>
sunkencityover 15 years ago
i think this article is great, i read it, then downloaded the source to jscheme, and ported a portion of it to ruby. then i understood more about how lisp works, i got to a working repl that had + implemented.<p><a href="http://berlinbrowndev.blogspot.com/2008/07/simple-lisp-implementation-in-java-ode.html" rel="nofollow">http://berlinbrowndev.blogspot.com/2008/07/simple-lisp-imple...</a><p>then half a year later I thought what the hell and sneaked in a production app written in clojure to one of our tomcats. for me learning something new is always about porting it to something familiar to grok the basics and then force myself to write real code, then there's no avoidance of those important details
fogusover 15 years ago
I wrote a version of McCarthy's original Lisp in Python if you want to study the roots of Lisp.<p><a href="http://github.com/fogus/lithp" rel="nofollow">http://github.com/fogus/lithp</a>
评论 #869407 未加载
vaneklover 15 years ago
<a href="http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf" rel="nofollow">http://www.softwarepreservation.org/projects/LISP/book/LISP%...</a><p>Appendix B.
rufiusover 15 years ago
LispKit lisp is a pretty good example. A good description exists in "Functional Programming: Application and Implementation" by Peter Henderson.
kbobover 15 years ago
Scheme 9 from Empty Space is both a small Scheme implementation and a book describing the source code. I read 60% of the book this summer, and wasn't disappointed.<p>Written in portable C, it implements bignums, garbage collection, (nonhygienic) macros, hashed environments.<p><a href="http://www.bcl.hamilton.ie/~nmh/t3x.org/zzz/" rel="nofollow">http://www.bcl.hamilton.ie/~nmh/t3x.org/zzz/</a>
CyberFonicover 15 years ago
I actually like newLisp - not exactly Common Lisp, but I find the implementation easy to follow. check it out on www.newlisp.org. Compiles just about anywhere and comes with a nice testing framework so you can regression test your changes, etc.
vu3rddover 15 years ago
Thanks for the comments. I have started looking at the provided pointers.