Posted by wossname on 09:07:00 12-07-2002
The challenge:
Program a ``lisp'' interpreter compatible with the basic words and specification as provided in the following link:
http://renoir.vill.edu/~dmatusze/resources/lisp/intro_to_lisp/lisp.html
Do so in at most 512 bytes. No need for a garbage collector (unless you feel crazy).
It's impressive in that size-opt way no matter what system you write it for, but i'm writing for DOS. Linux is good too, etc.
Hopefully this shouldn't take too long to complete...
If you have any recommended additions (or clarifications) to the spec, please post them.. Just remember, it's 512b, so extra bloated words aren't exactly needed
Posted by MooKeen on 12:09:00 12-07-2002
<rant>
Quote:
Program a ``lisp'' interpreter compatible with the basic words and specification as provided in the following link:
Lisp doesn't have ``words''. You're thinking Forth. I'm assuming you mean the basic constructs (i.e. those used McCarthy's original Lisp); lambda, cons, car, cdr, set, and friends (with which most of the rest of Lisp can be built)
Quote:
Do so in at most 512 bytes
Why, so we can build the nastiest, evilest, wrongest, most bletcherously disgusting Lisp in existance? Gack! *clue-stick bashing*
Quote:
No need for a garbage collector (unless you feel crazy).
Lisp is not Lisp without garbage collection, and garbage collection = GOOD. This is silly. *more clue-stick bashing*
I would recommend reading Paul Graham's _ANSI Common Lisp_ for starters, and not writing a pile-of-sh*t with no previous knowledge. Actually, I would more than reccommend it; I beg thee!
If you've used an imperative language all of your life, you will not know how to use nifty (and very commonly used) things like closures and higher-order functions, let alone, how to implement them. Please, read a good book on the subject.
</rant>
[ This Message was edited by: MooKeen on 2002-12-07 12:20 ]
Posted by MoX on 18:51:00 12-07-2002
well, maybe you, Mookeen, confused this forum with the projects forum, but considering the fact that this is a pure contest, with a task that should be accomplished within a short time, I do not think that a seriously great lisp is expected to be the result.
The whole specification and size limitation mentioned by wossname are just the rules of this contest and not what wossname considers the perfect lisp.
[addsig]
Posted by wossname on 01:31:00 12-08-2002
-->Why, so we can build the nastiest, evilest, -->wrongest, most bletcherously disgusting -->Lisp in existance? Gack! *clue-stick bashing*
But of course!
I'm considering killing string support, it takes up too many of the 512 bytes.. Maybe we really don't need cons or cdr either, those are mostly useless...
Posted by MooKeen on 05:15:00 12-08-2002
Quote:
well, maybe you, Mookeen, confused this forum with the projects forum, but considering the fact that this is a pure contest, with a task that should be accomplished within a short time, I do not think that a seriously great lisp is expected to be the result.
What wossname proposes can not necessarilly be considered a Lisp; Lisp is not defined by it's s-expressions (FYI, there are several other Lisps that do not use s-expressions, old and new). Also, it is silly to go about doing something with not even the tiniest bit of previous knowledge.
Quote:
I'm considering killing string support, it takes up too many of the 512 bytes.. Maybe we really don't need cons or cdr either, those are mostly useless...
You can implement a Lisp without strings, but you can NOT implement one without conses or cdr. And I'll tell you why, too-- Lisp programs are made up of lists, which are made up of cons cells. You can't /write/ a Lisp program without conses because Lisp programs are of the cons datatype. And you can't /implement/ a Lisp without knowing this. And without car and cdr, you have no way of accessing the parts of a cons. Read a book first!
Posted by wossname on 05:18:00 12-08-2002
hehe, you're easy to troll