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
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.)
Post a comment