5 ms·
Let me see your Lisp implementation. Here's mine.
- krig 15y agoIt seemed appropriate to post this today. Did this while learning lisp about two years ago. Nothing special, a pretty straight forward implementation of the original LISP paper written while reading the paper, basically. It's difficult to describe the feeling when it clicks and the eval function comes together. All of the complexity of writing a language and an interpreter, reduced to what is basically one function that fits in a page. That is mind blowing. Edit: I realised this works as a homage to Dennis Richie as well, as it's written in C. I did use glib for some support functions, other than that it's ANSI C. R.I.P.
- fogus 15y agohttp://github.com/fogus/lithp http://github.com/fogus/lithp
- groovy2shoes 15y agohttp://github.com/baguette/lemma http://github.com/baguette/lemma
- akkartik 15y agohttp://github.com/akkartik/wart http://github.com/akkartik/wart Arc-like names, python-like keyword args and indent-sensitivity.
- lclarkmichalek 15y agoI've been working on a MACLISP interpreter based on 80's manual I found on my fathers bookshelf. It's quite fun working backward, and seeing how the dialect influenced modern lisp.
- Scriptor 15y agohttps://github.com/Scriptor/pharen https://github.com/Scriptor/pharen (Lisp -> PHP) It's been a while since I worked on it, but I think I might start again pretty soon.
- rictic 15y agohttps://github.com/rictic/twerp-h https://github.com/rictic/twerp-h Tiny stackless lisp with continuations, written in Haskell. ~150 lines of interpreter, ~40 lines of parser.
- nakkaya 15y agohttp://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-implemented-in-c/ http://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-implem...
- sjs 15y agohttps://github.com/samsonjs/lake https://github.com/samsonjs/lake Just a half-baked implementation of a simple Scheme in C.
- bitsai 15y agohttps://github.com/bitsai/lisp-in-clojure https://github.com/bitsai/lisp-in-clojure
- pavelludiq 15y agoIf only all the toy lisps were instead patches for sbcl, abcl, ccl, clisp, clojure, racket, chicken or gambit...
- wanorris 15y agoImplementing a tiny Lisp is an exercise in learning to be a better programmer by teaching yourself how language implementations work. Creating a patch for someone else's Lisp interpreter is not a reasonable substitute.
- technomancy 15y agoI would be terrified if patches of the same quality as my toy lisp were actually applied to a project like sbcl or clojure.
- rayiner 15y agoDoing a toy Lisp is a really great way to figure out how to write a compiler without getting caught up in type systems and whatnot.
- coffeeaddicted 15y agoHm, not really sure if I really understood Lisp, but at least I tried once implementing one which kinda worked (basically I was using it for ini-files and it's coded in c++). http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.h http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.h http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.cc http://www.michaelzeilfelder.de/bin/GrowTime/src/Lisp.cc http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.h http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.h http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.cc http://www.michaelzeilfelder.de/bin/GrowTime/src/LispFuncs.c... http://www.michaelzeilfelder.de/bin/GrowTime/src/TestLispMain.cc http://www.michaelzeilfelder.de/bin/GrowTime/src/TestLispMai...
- jacquesm 15y agoWarts and all: http://ww.com/ascheme.c.txt http://ww.com/ascheme.c.txt It's not quite finished (and it's patterned after scheme rather than lisp, but that's close enough) but it runs the towers of Hanoi sucessfully. Lots of stuff still missing, tail call optimization, gc and a whole bunch of other must haves. There are likely lots of bugs too and things that don't work the way they should such as the '. My understanding of the language is still patchy enough that it probably doesn't work in the way you expect it if you are a schemer. One of these days I hope to do a proper job of finishing it (too much stuff to do) and do a write-up on it. Writing this helped me tremendously in understanding the lisp family of languages. Don't laugh too hard at the definition of >
- kingkilr 15y agohttps://bitbucket.org/pypy/lang-scheme/ https://bitbucket.org/pypy/lang-scheme/ I haven't personally worked on it per-se, but I've worked on the compiler, JIT, and GC for the language it's implemented it :)
- gyepi 15y agohttps://github.com/gyepisam/perl-lisp https://github.com/gyepisam/perl-lisp Initially started off as a toy implementation and eventually fleshed out into a pretty nice system, used in a production environment for several years as a DSL in a perl based system.
- nostrademons 15y agoTwo of them: http://jonathan.tang.name/files/scheme_in_48/tutorial/overview.html http://jonathan.tang.name/files/scheme_in_48/tutorial/overvi... http://jonathan.tang.name/files/arclite/ http://jonathan.tang.name/files/arclite/
- sjs 15y agoThanks a bunch for that tutorial! It demystified language implementation and taught me a little Haskell along the way. Oh and showed me the beauty of parser combinators. (I didn't run very far with it but here's my code if anyone is curious: https://github.com/samsonjs/elschemo/blob/master/lisp.hs https://github.com/samsonjs/elschemo/blob/master/lisp.hs)
- adam-a 15y agoI remember seeing your tutorial before and thinking it looked like a great exercise. Do you think it would be worthwhile for someone with a moderate Haskell background who wants to learn some Scheme? Or is it best to go into it the other way round?
- nostrademons 15y agoI think it might be quicker to read some Scheme programs to get a feel for the language. It's usually harder to understand exactly what a program is doing by looking at the source code than it is to look at the output of the program and figure out how it got there. (This is also why I always ask for demos and changelist descriptions that explain the intent of the change when I do code reviews at work.) Some time, it might be fun to write a Haskell interpreter in Scheme. :-) There're all sorts of cool challenges involving type inference there.
- ricree 15y agoI was thinking about pointing out that tutorial. Until I went through it, I'd mostly just played with Haskell for Project Euler and other small problems. That tutorial really helped get the feel for larger projects in the language. But at the same time, it shows off some of the elegance of lisp. It's simple enough that you can implement it as a beginner tutorial, but the end result is a surprisingly solid language. One of the beauties of lisp is how much is possible just from some simple building blocks. That tutorial did an excellent job displaying it from the side of a language implementer rather than a language user. Thanks a ton for it, it was really a pleasure to use.
- pwpwp 15y agohttps://github.com/manuel/edgelisp https://github.com/manuel/edgelisp (Lisp->JavaScript compiler) https://github.com/manuel/ell https://github.com/manuel/ell (Lisp->C compiler) https://github.com/manuel/schampignon https://github.com/manuel/schampignon (Kernel interpreter in JS)
- spacemanaki 15y agoI was currently working through "An incremental approach to compiler construction" in Clojure, so this isn't done: https://github.com/spacemanaki/incremental-compiler https://github.com/spacemanaki/incremental-compiler Previously, in C and to C, for the end of SICP: https://github.com/spacemanaki/lisp-in-c https://github.com/spacemanaki/lisp-in-c
- jcoglan 15y agoTwo variants of Scheme, with shared libraries: http://github.com/jcoglan/heist http://github.com/jcoglan/heist http://fargo.jcoglan.com http://fargo.jcoglan.com If it weren't for Lisp it would never have been so easy for total noobs like me to get into language hacking.
- mhewett 15y agoLisp implemented in Java. Fairly complete set of datatypes and functions, but no objects. Has been available for 10 years. http://jatha.sourceforge.net/ http://jatha.sourceforge.net/
- shaunxcode 15y agoliterally just wrote this last night and pushed it live this morning before hearing the news. I had just changed my gmail status to "season of the lisp" as I go through a seasonal fixation w/ lisp every year starting in october - when an old colleague messaged me to inform me of his passing. https://github.com/ORDER-OF-NO/scphpeme https://github.com/ORDER-OF-NO/scphpeme (CONS (QUOTE R) (LIST (QUOTE I) (QUOTE P)))
- Jasber 15y agoPort of Peter Norvig's Lispy to CoffeScript: https://github.com/bradjasper/lispy.coffee/ https://github.com/bradjasper/lispy.coffee/
- technomancy 15y agoMine, uh, has the distinction of being the only one implemented entirely while riding the bus: https://github.com/technomancy/bus-scheme https://github.com/technomancy/bus-scheme
- antoinehersen 15y agohttps://github.com/antoinehersen/petitML https://github.com/antoinehersen/petitML Lambda calculus to PPC assembly.
- AndresNavarro 15y agoA Kernel interpreter in C: http://www.bitbucket.org/AndresNavarro/klisp http://www.bitbucket.org/AndresNavarro/klisp Just this week I got my first fork and a bunch of nice contributions.
- doelie_ 15y agohttp://zwizwa.be/-/libprim/ http://zwizwa.be/-/libprim/ Lisp in 3 stages: primitive data, composite data, composite functions.
- willurd 15y agojs-lisp: https://github.com/willurd/js-lisp https://github.com/willurd/js-lisp unit tests: http://williambowers.net/projects/js-lisp/tests/ http://williambowers.net/projects/js-lisp/tests/ and for some face time with the repl: http://williambowers.net/projects/js-lisp/examples/repl/ http://williambowers.net/projects/js-lisp/examples/repl/ R.I.P John McCarthy
- syncopate 15y agoPeter Norvig's lispy ported to 800 lines of C: https://github.com/sck/clispy https://github.com/sck/clispy There's also a new version I've been working on that's more R5RS compatible and will support compilation to x64_86: https://github.com/sck/ponzi https://github.com/sck/ponzi RIP John ...
- eliben 15y agoCool idea :-) Here's mine: http://code.google.com/p/bobscheme/ http://code.google.com/p/bobscheme/ Bob is a suite of implementations of the Scheme language in Python. It currently includes: - A Scheme interpreter - An implementation of a stack-based virtual machine called the "Bob VM" - A compiler from Scheme to Bob VM bytecode - A serializer and deserializer for Bob VM bytecode - An alternative, functionally-equivalent implementation of the VM in C++ - BareVM
- wsxiaoys 15y agohttp://github.com/wsxiaoys/carc http://github.com/wsxiaoys/carc An implementation try introducing arc style first-class macro.
- leppie 15y agohttp://ironscheme.codeplex.com http://ironscheme.codeplex.com
- inimino 15y agoHere's mine in JavaScript, done as exercise 51 of Chapter 5 of SICP: http://boshi.inimino.org/3box/inimino/projects/SICP/chap_5/Ex51/src/test.html http://boshi.inimino.org/3box/inimino/projects/SICP/chap_5/E... It's an incomplete toy level Scheme subset with bugs, but it has HTML5 canvas support and some cute features like showing you the progress of the VM instead of hanging the browser, and call/cc. I'd like to finish it someday.
- yoklov 15y agohttps://gist.github.com/1311342 https://gist.github.com/1311342 I started this a few weeks ago after rereading sicp chapter 4 and realizing that it made more sense this time around. Some of the most fun I've ever had with programming (though I haven't been doing it very long). Never got around to doing the cool stuff at the end of SICP though, I should really get on that...
- lisper 15y agohttps://github.com/rongarret/Ciel https://github.com/rongarret/Ciel Implemented in C++. Makes extensive use of C++ features and libraries to produce a lot of lisp in a small number of LOC. Includes exceptions, a full numeric tower (including unlimited-precision floats, courtesy of CLN), vectors and dictionaries (courtesy of the STL), and dynamic code loading (courtesy of dlopen). Uses the Boehm GC. Still buggy, not quite ready for prime time, but it does work.
- GrooveStomp 15y agoPretty warty implementation. You have to pass strings and their lengths to a C function. Ah well, it's the intention that counts. :) https://github.com/GrooveStomp/SnakeEyes https://github.com/GrooveStomp/SnakeEyes
- pabloPXL 15y agoA very cheap, still in progress implementation in js :) https://github.com/pabloPXL/jils https://github.com/pabloPXL/jils
- tikhonj 15y agoHere's mine, in JavaScript: https://github.com/TikhonJelvis/js-scheme https://github.com/TikhonJelvis/js-scheme Live here: http://inst.eecs.berkeley.edu/~tikhon/scheme http://inst.eecs.berkeley.edu/~tikhon/scheme I never got macros to work :( Still, the basics like lambdas do work. The really cute bit is that it lets you include <script language="scheme"> blocks in your html and actually parses them. It even lets the scheme code access JavaScript objects using some special syntax. There's one of those blocks in the source of the page; be sure to check it out.
- hasenj 15y agoArc interpreter in coffee-script https://github.com/hasenj/jsarc/blob/master/arc.coffee https://github.com/hasenj/jsarc/blob/master/arc.coffee
- gredman 15y agohttps://bitbucket.org/gr3dman/lishp https://bitbucket.org/gr3dman/lishp In Haskell. Has partial application, but is otherwise terrible.
- lautis 15y agohttps://github.com/lautis/lisp-prolog/blob/master/lisp.pl https://github.com/lautis/lisp-prolog/blob/master/lisp.pl Tiny lisp written in Prolog in exchange for some course credits.
- grouzen 15y agoThis is mine implementation on C -> https://github.com/grouzen/fflisp https://github.com/grouzen/fflisp I wrote it after I read original LISP 1.5 book (%.
- jsn 15y agohttps://github.com/jsn/sillyscheme https://github.com/jsn/sillyscheme My scheme implementation, written in C a year ago, just for fun. Took me a week or so, 942 C LoC. From the README: "lexical scoping, Fixnum and floating point arithmetics, unhygienic macros, tail-call elimination, reentrant continuations, and automatic memory management (garbage collection)".
- minopret 15y agoMine is in Python with several usual and some less usual influences: John McCarthy "Recursive Functions of..." by way of Paul Graham "The Roots of Lisp"; Peter Norvig "(How to Write..." and tail recursion from his "(An ((Even Better)..."; quoted-printable encoding of characters; Wikipedia & Knuth's enthusiasm for the balanced ternary number base. I have gone a very short way to start translating Lisp programs to Python code. Also I have gone a very short way to do relevant proofs in Coq in the manner of Benjamin C. Pierce, et al. "Software Foundations". My notions are to implement the Calculus of Constructions in the simplified form found in Claudio S. Coen, "Mathematical Libraries as Proof Assistant Environments", and natural deduction on top of that. And a TR SECD machine. Oh, and algorithms from Artificial Intelligence: A Modern Approach. And a pony... http://github.com/minopret/minopret-lisp http://github.com/minopret/minopret-lisp