[cells-devel] proposed refinement of lazy cells
Kenny Tilton
ktilton at nyc.rr.com
Mon Sep 27 23:34:52 UTC 2004
I have been working on Cello and seem to have run into a problem arising
from the Cells sub-system, specifically the "awakening" process which
forces all non-lazy cells to be evaluated.
I have a slot which cannot be evaluated just any old time, it needs the
right active OpenGL context (the containing window's). I /could/ have an
"active" cell on the window itself and turn it on during GLUT callbacks,
but that would be inefficient and a silly way to achieve something more
elegantly (I think) conceived of as laziness: do not calculate this
until asked. (The specific is the building of the OpenGL display list
for a widget.)
Unfortunately, the lazy option as currently set up will not work,
because the slot never gets sampled if no containg widget is forced to
rebuild its own display list. (the neat thing is that simply rebuilding
the named display list causes the Right Thing to happen when the
containing display list next gets kicked off.)
Currenty laziness has two manifestations: cells are not awakened
artificially, and change propagation stops at them. display-lists need
to avoid the artificial awakening but not change propagation.
Since I can imagine another cell requiring awakening but not change
propagation, I am considering making the lazy boolean into a code, with
legal values:
:until-asked do not awaken artifically, but once asked stop
being lazy
:after-awakening awaken artificially, but do not propagate change
automatically
:always, or t current semantics, aka both
I guess i will just go ahead since I am not breaking anything, but
comments/questions are welcome.
kt
--
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
More information about the cells-devel
mailing list