OT: Lisp (Was: Re: Is metaprogramming useful?)

Georg Wrede georg.wrede at nospam.org
Wed Nov 29 14:27:48 PST 2006


Lutger wrote:
> Georg Wrede wrote:
>> Brad Anderson wrote:
>>
>>> Greenspun's 10th Rule of Programming:  Any sufficiently complicated C or
>>> Fortran program contains an ad hoc, informally-specified, bug-ridden, 
>>> slow implementation of half of Common Lisp.
>>
>> It's not a coincidence that I installed Allegro Common Lisp (from 
>> Franz Inc, a demo version of an excellent commercial implementation) 
>> on my Fedora last week. And dLISP for comparison.
> 
> Sorry to ask it here, but how do you evaluate dLISP? Is it complete enough?

Well, it's a toy, almost like a proof of concept. It's not robust at 
all, so a lot of errors, especially in the input, simply crash it. And 
no documentation to brag with. And the version on dsource is broken, it 
doesn't even compile.

I've fixed mine, with hints from the discussion forum (thread heading 
"Ping") and some additional fixes.

Anyway, I wouldn't recommend it for learning, since I believe that one 
should always learn with good tools. Get Allegro instead. It's free for 
private use!

There exists a complete package for anybody who really wants to learn 
Common Lisp, called Lispbox. (http://www.gigamonkeys.com/lispbox/)

It's an all-in-one package that's ready to use right "off the box". 
While the download is big (80Megs), it runs fine on my 800MHz 256MB 
Linux laptop. There are downloads for Linux, OS-X, and Windows.

> I'm learning lisp atm, it sounds attractive to embed a lisp interpreter 
> in D programs and use them together. This should be very easy with dLISP 
> I think.

dLISP is a good choice if one wants to embed Lisp in one's own 
application. It's got the basics, and whatever you need more you can 
write in D or Lisp.

(I said earlier that it's not robust. But the code is clear, logical, 
and it looks final. The lack of robustness has more to do with not 
having error checking than bugs, probably because this may have been a 
proof of concept type effort.)

It's little and lightweight, and the source code is small enough to let 
you study and comprehend it "in full", which always leads to a better 
and more robust end result for your embedding project.

dLISP is easily capable of handling what you'd need, say, as the macro 
language in your own text editor, game logic, smarter user interfaces to 
your existing programs, and such.



More information about the Digitalmars-d mailing list