From: RG on
Surely someone has written one by now? What do you recommend? This
looked promising:

http://www.cliki.net/fare-utils

But I couldn't find any documentation for it nor could I
reverse-engineer the API. Anyone had success with this, or
found/written something better?

rg
From: Nicolas Neuss on
RG <rNOSPAMon(a)flownet.com> writes:

> Surely someone has written one by now? What do you recommend? This
> looked promising:
>
> http://www.cliki.net/fare-utils
>
> But I couldn't find any documentation for it nor could I
> reverse-engineer the API. Anyone had success with this, or
> found/written something better?
>
> rg

Maybe Scott Burson's Fset-library? What do you need precisely?

Nicolas
From: RG on
In article <87iq8uf0yf.fsf(a)ma-patru.mathematik.uni-karlsruhe.de>,
Nicolas Neuss <lastname(a)kit.edu> wrote:

> RG <rNOSPAMon(a)flownet.com> writes:
>
> > Surely someone has written one by now? What do you recommend? This
> > looked promising:
> >
> > http://www.cliki.net/fare-utils
> >
> > But I couldn't find any documentation for it nor could I
> > reverse-engineer the API. Anyone had success with this, or
> > found/written something better?
> >
> > rg
>
> Maybe Scott Burson's Fset-library?

That looks good. Thanks for the pointer.

> What do you need precisely?

For now just an associative map that's O(logN) for inserts and lookups
on ordered keys. But I figured as long as I was looking I'd fill out my
collection as completely as possible in anticipation of future needs.

rg
From: Alex Mizrahi on
??>> What do you need precisely?

R> For now just an associative map that's O(logN) for inserts and lookups
R> on ordered keys. But I figured as long as I was looking I'd fill out my
R> collection as completely as possible in anticipation of future needs.

I was looking for a sane library which implements binary tree-based
associative container, but wasn't able to find any :(.
There are some tree implementations, but they lack iterators and stuff like
that.

If you're looking for a general data structures library, cl-containers [1]
is supposed to be it, but quality is lacking -- API is not consistent,
documentation is auto-generated (basically, it is a list of functions), some
things just do not work. But, I think, all code is there, it just needs some
cleanup.

[1]: http://common-lisp.net/project/cl-containers/

From: Karol Skocik on
On Mar 18, 9:13 am, RG <rNOSPA...(a)flownet.com> wrote:
> Surely someone has written one by now?  What do you recommend?  This
> looked promising:
>
> http://www.cliki.net/fare-utils
>
> But I couldn't find any documentation for it nor could I
> reverse-engineer the API.  Anyone had success with this, or
> found/written something better?
>
> rg

There is also http://github.com/ks/X.FDATATYPES
It's a port of Clojure's datastructures (w/o the transient stuff added
later).
The docs are missing, but API is described in package.lisp like this:

;; FSET
"FSET" ;; constructor
"FSET-EX" ;; constructor
"COERCE-FSET" ;; converts data type to fset
"FSET-LIST" ;; converts fset to list
"FSET-DIFFERENCE" ;; fset difference
"FSET-EXCLUSIVE-OR";; fset exlusive or
"FSET-UNION" ;; fset union
"ADD-KEY" ;; adds key to fset
"ADD-KEY*" ;; adds more keys to fset
"HAS-KEY" ;; tests if key is in fset
"HAS-KEY*" ;; tests more keys at once

;; FTAB
"FTAB" ;; constructor
"FTAB-EX" ;; constructor
"COERCE-FTAB" ;; converts data type to ftab
"FTAB-ALIST" ;; converts ftab to alist

;; FVEC
"FVEC" ;; constructor
"COERCE-FVEC" ;; converts data type to fvec
"FVEC-LIST" ;; converts fvec to list
"FVEC-VECTOR" ;; converts fvec to vector
"FVEC-IOTA" ;; creates fvec with contents from start to n by step
"UPDATE" ;; replaces value at index (slow but sometimes useful
operation)
"UPDATE*" ;; replaces values at indices in one go (slow but
sometimes useful operation)
"ADD-TAIL" ;; adds value to the end - a LOT faster than add* on
fvec - use this to add stuff to fvec
"ADD-TAIL*" ;; adds more values to the end in one go - a LOT faster
than add* on fvec
"DEL-TAIL" ;; removes element from tail - a LOT faster than del on
fvec
"DEL-TAIL*" ;; removes more values from tail - s LOT faster than
del* on fvec

;; FSET FTAB
"KEYS" ;; returns keys as list

;; FTAB FVEC
"VALS" ;; returns values of container as list

;; *
"SIZE" ;; number of elements/associations in fvec/ftab
"EMPTY" ;; empty predicate
"ADD" ;; adds value with key/index to container (use add-tail for
fvec for efficiency)
"ADD*" ;; adds more key/index value pairs to container (use add-
tail* for fvec for efficiency)
"REF" ;; gets value at key/index, error if not found
"REF*" ;; gets more values at keys/indexes as list, error if not
found
"REF-OPT" ;; gets value at key/index, returns optional if not found
"REF-OPT*" ;; gets more values at keys/indexes as list, returns
optional if not found
"REF-OPT-FN*" ;; gets more values at keys/indexes as list, calls
function if not found
"DEL" ;; removes element from container (use del-tail for fvec for
effeciency if you can)
"DEL*" ;; removes more elements from container in one go (use del-
tail* for fvec for effeciency if you can)
"FMAP" ;; maps function over container, returns new container
"FMAP-TO" ;; maps function over container, returns type supplied as
argument (nil, list, vector, bit-vector, ...)
"FOLD" ;; fold function over container
"FILTER" ;; filter function over container, returns new container

I live in impression that it should be enough to start using it.