Thomas F. Burdick wrote:
Kenny Tilton writes:
OK, the Cells CVS repository has been cleaned up and I am on the verge of making my first changes to Cells, so (a) beware and (b) anyone with a standalone tarball will soon be diverging from the official code.
Well, the released code, anyway. I think the moral of the story is: version 2.1 is coming in the not-too-distant future.
Yeah, the Semi-Grand Unification of Synapses and Cells will rate a full tenth.
My first change will be an oddity: ephemeral cells, when reset, do not get the corresponding slot value reset. I have not made this change yet, so maybe it was that way for a reason? Hard to imagine.
I have a vague memory of talking about this, but I don't remember why. Either way, it only affects the non-cells view of the object, right?
Yep, but after marrying Cells to AllegroStore I became quite sensitive to the need for a value to occupy its slot, because a lot of AStore's magic relies on that.
Second will be repairing the damage done to Synapses. Well, overall the change was good, it just broke Synapses. I am starting to see how the same change done properly will simplify Cells a little:
Synapses always had two rules: should I fire, and what value should I pass along? Normal Cells only had the "what value?" rule, with a hard-coded (kinda) test "has it changed?" to decide whether or not to fire. The default changed test EQL could be overridden, but that was it.
I really should remember to use this feature sometime. I think the name "synapse" is too clever for me: I never remember what it means, and end out not using them where they're appropriate.
heh-heh. I name all canned synapses f-something, for "filter".
In the change that broke Synapses, I simply eliminated Synapses as a separate data structure and implemented them with Cell structures, the fire test and value rules being combined in one lambda for the Cell value rule. Goofy mistake since the standard Cell was still being controlled by the "unchanged" rule.
So the Deep Fix will be to meet half-way, and now enhance standard Cells to work like Synapses, by moving the "unchanged" test into a "fire?" mechanism. This is not the unification of Gravity with Electromagnetism, but it should simplify the code some.
Sounds good. Hey, if it's available as a keyword option to c-formula, I might actually see it and use it :-)
The first thing called will be the "firep" function, which decides if a Cell should propagate to others once someone else has propagated to it. If so, the fire-value function is called to determine the value to respond with when sampled.
Current Cells behavior is to decide its new value and then decide whether to propagate by calling c-unchanged-p or some such. This can be expressed in the new scheme as:
-- firep decides a new value and caches it as the new value to return when sampled. -- It then uses c-unchanged-p (?) to get its return value (indicating firep).
kt