[elephant-devel] map ?
Ben
ben at medianstrip.net
Mon Sep 6 17:18:41 UTC 2004
not yet. i plan on filling out the btree functionality with cursors,
secondary indices and higher-order functions soon -- it's next on my
list after making more tests. if people have ideas on what they'd
like this interface to be like, let me know. i'm leaning towards a
"maphash" type interface. i guess "with-hash-table-iterator" can be
made on top of that with symbol-macrolet. i don't want to get into
java-esque iterator protocols unless people really want it.
right now i'm testing whether or not it is worth it (performance-wise)
to try to implement secondary indices "in Sleepycat", using their
"DB->associate" interface. the hard part about this is it requires
some finesse with callback functions. the docs seem to indicate that
there is no benefit, but it's worth testing.
in other news andrew says he is working on revising how the MOP stuff
works. it shouldn't affect most people, but the syntax for declaring
slots transient might change.
i'll keep people updated with info as i get it. thanks for your
interest.
B
On Mon, 6 Sep 2004, Nicolas Lamirault wrote:
>
> hi,
> i read the elephant's tutorial, and i would like to know if it is
> possible to have a map function with btree ?
> an example :
>
> CL-USER> (use-package "ELE")
> T
> CL-USER> (defvar friends-birthdays (make-instance 'btree))
> FRIENDS-BIRTHDAYS
> CL-USER> (add-to-root "friends-birthdays" friends-birthdays)
> #<BTREE {A0F7259}>
> CL-USER> (setf (get-value "Andrew" friends-birthdays) "12/22/1976")
> "12/22/1976"
> CL-USER> (get-value "Andrew" friends-birthdays)
> "12/22/1976"
> T
> CL-USER> (setf (get-value "lam" friends-birthdays) "01/01/1976")
> "01/01/1976"
> CL-USER> (get-value "lam" friends-birthdays)
> "01/01/1976"
> T
>
> and a mapbtree function :
>
> (mapbtree #'(lambda (key value)
> (format t "~A : ~A~%" key value))
> friends-birthdays)
>
> --
> Nicolas Lamirault
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
>
More information about the elephant-devel
mailing list