

John Fremlin's blog: Conformance of Common Lisp implementations
source link: http://john.freml.in/bugs-in-common-lisp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

John Fremlin's blog: Conformance of Common Lisp implementations
Waiting for updates: connected
Posted 2009-09-05 05:49:00 GMT
Over the last few weeks, I have been writing another memory mapped datastore for Common Lisp, to replace anardb. The basic idea is to escape from the Lisp memory management and store things in mmaps. Apparently ITA Software were doing something roughly similar in 2001. Our system is called manardb and uses the Meta-Object Protocol to allow persistent mmap'd objects stored on disk to be treated the same way as normal Lisp class instances. On the way to writing it, I found bugs in all the Lisp implementations I tried: Allegro, Lispworks, SBCL and ClozureCL.
Common Lisp is in many ways a compromise standard, held back by implementers that couldn't see their way clear to modifying their Lisps to support obviously sensible features. (There should really be a new effort to update the standard to compete with contemporary languages — adding basic things like value semantics, a less crippled type system that could express "a list of animals", user control of and feedback from type inference, all before getting mixed up in fashionable areas like XML and concurrency and so on.)
One problem with making manardb is that the Meta-Object Protocol is not as well thought through as the Lisp standard, and there are some irritations (for example compute-effective-slot-definition-initargs not being specified and having a number of different protocols in different Lisp implementations, and effective-slot-definition-class not taking the relevant direct-slots as an argument). However, the only Lisp implementation to struggle with manardb's use of the MOP was ClozureCL (I was able to make a quick and dirty fix).
The basic failures I discovered were in Lispworks: inlining functions with a non-null lexical environment causes awful things to happen, and Allegro, where using the in evaluated mode causes errors if the type is not a type that can be passed to typep — though the should accept it. Their evaluated version of the has a hack that tries to avoid passing types to typep if they are too specific, but it doesn't look through deftypes. This bug has been in their implementation for ten years and they think it might be complicated to fix it (bitrot anybody?).
ClozureCL had another bug with asserts that was fixed very quickly.
SBCL had a problem with slot-value not working but that was already fixed in an upstream release, and manardb is fine with 1.0.31. (Unfortunately, the binaries haven't been updated for a while.)
So all in all, I think that the evidence suggests that SBCL, which is definitely the best performing, is also the most correct implementation, and that if you care about using an actively maintained Lisp with responsive support you should go with ClozureCL.
(Just to make clear that these are my views and nothing to do with MSI.)
Recommend
-
10
John Fremlin's blog: How to optimise Common Lisp under SBCL: introductionWaiting for updates: connectedPosted 2009-12-21 11:44:00 GMTPeople occasionally ask me vague...
-
11
John Fremlin's blog: Emacs lisp: run recommended commandWaiting for updates: connectedPosted 2009-03-02 23:00:00 GMTThere's little point in using emacs if you're not...
-
2
John Fremlin's blog: A lisp study in mathematical bugsWaiting for updates: connectedPosted 2013-01-21 21:30:00 GMTOn the way to yesterday's Bay Area Lisp meet-up, which w...
-
11
John Fremlin's blog: Common Common Lisp myths about declaimWaiting for updates: connectedPosted 2009-07-25 07:19:00 GMTThere are some unfortunate myths and misunderstandi...
-
6
John Fremlin's blog: Three unique features of Lisp in 2010Waiting for updates: connectedPosted 2010-05-14 22:00:00 GMTLisp's (and especially Scheme's) greatness is i...
-
9
John Fremlin's blog: How to optimise Common Lisp under SBCL: planningWaiting for updates: connectedPosted 2009-12-21 11:43:00 GMTPlanning the architecture — Your...
-
7
John Fremlin's blog: How to optimise Common Lisp under SBCL: builtinsWaiting for updates: connectedPosted 2009-12-23 23:00:00 GMTCommon Lisp exports nearly a thousand sym...
-
14
John Fremlin's blog: More on Lisp in 2010Waiting for updates: connectedPosted 2010-08-16 22:00:00 GMTAfter more than fifty years, and fifteen years of being an ANSI stand...
-
16
John Fremlin's blog: Dynamic Lisp blog entry demo: rationalizeWaiting for updates: connectedPosted 2014-03-13 07:00:00 GMTGiven a floating point number, how to go to...
-
13
Lisp interview at Lisp, the Universe and EverythingJohn Fremlin's blog: Lisp interview at Lisp, the Universe and EverythingWaiting for updates: connectedPosted 2013-01-03 1...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK