[cells-devel] initial stab at using Cells

Jack Unrue jdunrue at gmail.com
Sun Apr 9 18:43:39 UTC 2006


Well, I've gotten through my first round of experimenting with
Cells, and I have to say I like it a lot. If you want to see some
code, take a look at:

http://common-lisp.net/websvn/filedetails.php?repname=graphic-forms&path=%2Ftrunk%2Fsrc%2Fdemos%2Funblocked%2Funblocked-model.lisp&rev=0&sc=0

which is the data model for a simple game where you click
on blocks to score points (and where the remaining blocks
fall down to fill in the hole(s)). The game gets progressively
harder as you pass from one level to the next. The UI displays
the current level, current score, and points needed for the
next level. Screenshot here:

http://sourceforge.net/project/screenshots.php?group_id=163034&ssid=31548

If you look at the model, there is a shape-data slot that really
ought to be ephemeral based on how the score slot's formula
depends on it (the 'shape' score should only be added to the
overall score tally once, no matter how many times the UI asks
for the score). But I was seeing some intermittent behavior
where it seemed like the shape-data value had already been
propagated (and thus cleared) by the time that my UI code asked
for the score. So I took the :ephemeral attribute off until I get some
more time to figure that out. I'm sure this is a bug in my understanding,
not in Cells.

It would be good to document some typical strategies for dealing
with self-referential slots (circularity) but in thinking about how I
would describe what I did, I can see how it would be hard to explain
to someone else :-)

--
Jack Unrue



More information about the cells-devel mailing list