Monday, November 23, 2009

Format, define-syntax (rules)

Just a few updates:

Format

The format form:

(format specification-string rest-list)

Now works for all internal types, including all collexions. Formatting of tries, vectors, strings, and lists is supported. There are (generally) two types of formatting for each object: display form and write form; the two types correspond to their top-level forms. The switch is case: lower case is display, upper is write. So, "~t" displays a t(able | rie) as display would, whereas "~T" displays it as write would.

Syntax rules

I've fixed pattern matching in define-syntax so that you can use the usual forms:

(let ((name . val) ...) . body)

Will expand exactly how you expect (unlike before...).

More to come
I've started to bring Ceres & Enyo up to where Vesta is currently; even though Vesta is almost the same speed as TinyScheme, this isn't really fast enough for many applications. Ceres is a SECD-like VM, and Enyo has some neat tricks in it. Hopefully they can be made production ready before year's end.

Tuesday, November 3, 2009

Trie functions

A quick update: tries are a fundamental data structure in Vesta, and used as the backing store to dictionaries. Since tries have many useful properties, it would be great to expose these properties to the "user". I just committed the partial-key? and keys forms to the core foundation. partial-key? returns #t if 100% of the string is within the dictionary, #f if none is and N (which is an integer) for a matching subset. keys on the other hand, does what it sounds like: it returns all keys within a dictionary structure. Now, on top of the set/bag library, I'll also include a simple semantic processing library with the default build.