Thursday, January 25, 2007

SBCL doesn't thread on the mac

I just realized (once again) that SBCL doesn't do threading on the mac. Which means hunchentoot doesn't work. Which means I can't use SBCL. Time to try OpenMCL...

Wednesday, January 24, 2007

Starting up with SBCL

I've recently started working with SBCL on an intel Mac OS X machine. SBCL has come a long way since the last time I had attempted using it, two years ago. It has a different set of quirks from Allegro CL, which I've been using for many years now. My baseline for considering SBCL usable was whether I could get FReT to work. Happily I have succeeded. Version 0.3.1 doesn't work, version 0.3.2 (or the current svn head) will.

The most difficult task in porting FReT was odd bugs that came up in CLOS. FReT does a lot of CLOS mangling. And while I find CLOS to be one of the most powerful and capable OO systems I've used, it is also one of the most mysterious. I was defining and redefining classes, and using their prototypes for selecting generic function methods to execute. In addition, I had added default initialization forms in class definitions to signal errors if certain slots were not supplied, like so:
(defclass test-object ()
((start-time :initform (get-universal-time) :reader test-start-time)
(state :initform :init :accessor test-state)
(runner :initarg :runner :initform (error-required 'runner 'test-object) :reader test-runner)))

SBCL, it turns out, applies slot initialization on prototype instances when a class is redefined, but not when the class is initially defined. This is apparently allowed by the ANSI standard. I'm not that great at following the minutiae of standards, so I am not going to try and explain why this is possible. The solution turned out to be including an error handler in an :around method for update-instance-for-redefined-class.

I'm presently satisfied that SBCL is usable, though not necessarily immediately comprehensible. Suitable for my hacking needs.

Experiences with IkeWiki

I have gotten my hands on IkeWiki, installed it on my mac, and have been testing it. IkeWiki is a pretty good piece of work, though I find it a bit un-wiki-like. The author, Sebastian Schaffert, is quite responsive on the mailing list.

IkeWiki is quite wiki-like when it comes to editing articles. You can add an article, put in links to pages that don't yet exist, and fill in content as you go through the web site. Authoring can be either using wiki syntax, or through HTML if wiki syntax doesn't satisfy your needs. For any interesting formatting, you have to resort to HTML, as the wiki syntax is much less elaborate than say for MediaWiki. This is not surprising, but certainly not a show stopper.

Semantic annotation though is not very wiki-like. You cannot invent relations (also called properties in OWL) on the fly, or namespaces, or any other type of content. Relations cannot be embedded in the wiki syntax. You have to use a separate annotation mode. All annotations are always with respect to the current document. This may not seem like a big deal, but it really takes away the feeling of easy content creation you have when you typically use a wiki. You do end up with a more consistent knowledge base, but it doesn't really get at the questions that I want answered.

There are other things I want from a semantic wiki that aren't handled in IkeWiki. You cannot describe content about multiple resources in a single article. The resource and the document about the resource are confounded. There isn't enough documentation on how to work with IkeWiki. Ultimately, this is not the semantic wiki I want. But do I really want to write my own semantic wiki? Well, IkeWiki is GPL, which means if I want to do anything non-open with IkeWiki, I will have to produce my own semantic wiki.