[cells-devel] initial stab at using Cells
Ken Tilton
kentilton at gmail.com
Mon Apr 10 02:38:27 UTC 2006
On 4/9/06, Jack Unrue <jdunrue at gmail.com> wrote:
>
> 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 :-)
it is pretty clear to me as an old Cells hand. I am toast right now, but
I'll send some comments tomorrow. One Q: where does game-shape-data get
called, in some imperative logic responding to events, that detects that a
shape has been placed?
ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20060409/1aadc561/attachment.html>
More information about the cells-devel
mailing list