6 Dec 2006 crhodes   » (Master)

As I discussed previously, I submitted a document (CDR 3)to the Common Lisp Document Repository. It's now getting closer to the time when that document needs to be finalized or withdrawn; I have some minor changes to make to it, but if there are any other issues with it they need to be brought up soon. (There has been some discussion on the cdr-discuss mailing list, as well as some discussion of CDR 2: this is encouraging).

The work that inspired that CDR submission was work I've been doing to allow extensions of the sequence type in SBCL. I've now merged a preliminary version of that work into SBCL's CVS. It's currently undocumented; although I expect the final version of this to be very close to what is in CVS now, I'd like to verify that other people find it possible to use the protocol.

Instead of documentation, which will be forthcoming once some details about publication are sorted out, I posted an example of using the protocol to the development mailing list. The basic idea is that there are five protocol generic functions which need methods for a new sequence class; once those methods are implemented, all of the Common Lisp sequence functionality will work on instances of the class (so functions like find, position, delete-duplicates – in fact, all functions from the Sequences Dictionary, as well as a few stragglers (the quantifiers such as some and every, and the read-sequence and write-sequence I/O functions).

However, the default implementation of iteration over sequences in my protocol is based on accessing the sequence by index; for sequence types such as a doubly-linked list, both forward- and backward-iteration can be implemented more efficiently; there are some extensible generic functions for performing that optimization. Additionally, some standard functions (like nreverse on doubly-linked lists) can be implemented more efficiently than through the iterator protocol, so there are likewise some extensible generic functions for expressing that.

I look forward to receiving feedback, both on the CDR and on the extensible sequence facility...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!