» Wednesday, 19 March A.D. 2008

new trees release

Long ago, when I was still tweaking my blog software, I decided I wanted to eschew databases. Instead, I wrote a simple binary tree package for an in-memory database of sorts (my blog was getting to large to deal with linear lists and I wanted things sorted by date at the very least). It worked for me and didn't seem to erase my hard drive, so I released it to the world as TREES. I marveled at my contribution to Lisp software.

However, over the years, bug reports came trickling in, mostly saying, “Hey, I tried AVL trees and deleting elements from AVL trees goes into an infinite loop.” Like a negligent maintainer, I paid little attention to the reports, as I used red-black trees and they Worked For Me (tm). Not the greatest contribution to Lisp, eh?

I recently decided that life is too short to have buggy software with one's name floating around. Over the past month or so, I have been rewriting TREES and released version 0.10 yesterday, with improved interfaces, more efficient code, and a real testsuite. I thought I'd share a few lessons from my grand rewrite:

I still have things to fix; I took out DO-TREE-RANGE and WITH-TREE-ITERATOR because my code didn't need them, but they should probably go back in--especially WITH-TREE-ITERATOR. But I wanted to get the code out the door; two years between releases is long enough!

posted by Nate @ 8:44PM