[lisp-interface-library-devel] Curating libraries

Faré fahree at gmail.com
Wed Oct 31 06:43:27 UTC 2012


> My "box" was implemented as a CSTM transactional-class with one slot: VALUE.
> I used this as a container for the root node of a pure functional tree to
> effect a transactionally mutable variant of that structure.  A transaction
> would be to replace the root node in this box with the root node of the
> updated tree on commit.
>
That would be a nice thing to add to interface/box.lisp
and to use with the define-mutating-interface macro
to automatically deduce shared-mutable objects
from pure interfaces.

> I forked LIL and placed some sources taken from my wb and rb trees into
> contrib if you're interested to take a look at where I'm starting from.
> It's the majority of the core treeish stuff but pruned to the basic
> routines.   Naturally it is just for reference and doesn't compile in this
> state.
>
Forking is fine. I'd rather the work be committed to master
in steps that don't involve breaking the workingness of the system
(i.e. compiles and passes tests) or importing non-working files
(there are a few in funds/ already).

But I prefer working code to non-working code,
even if there is some ugly commit history.

> The implementation is mostly based on Adams purely functional data
> structures, plus a couple other papers mentioned in the weight balanced
> file.  One good thing is that it seems like it should be straightforward to
> translate my use of layers into interfaces, at least at the moment.
>
Any link to Adams?
We should probably maintain a bibliography somewhere.

> I see the AVL trees do "post-balanced" where balancing occurs in the
> stateful interface-- is that correct and is that technique something I
> should try to replicate?
>
For stateful trees, I believe this works great.
For pure trees, I have so far overridden the node method.
I'm wondering if state-passing :post and :pre method combinators
wouldn't be better instead.
And of course I eventually want both pure & stateful
from a single linear logic specification.

> It would be nice if my binary trees conformed with
> your AVL as much as possible I think but on the other hand maybe there is
> some value in the Adams approach?

> OTOH your way results in a truly mutable
> structure in stateful, where my approach was just to have a mutable "box"
> containing the current root node.
>
IIUC, that approach is what my "mutating" macro gives you automatically
from a pure interface.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
To most Christians, the Bible is like a software license. Nobody
actually reads it. They just scroll to the bottom and click "I agree."




More information about the lisp-interface-library-devel mailing list