If you have been following the drama, i broke Lars's chat log with this rule (somewhat revised):<br><br>  (chat-log:accessor chat-log<br>        :initform (c? (concatenate 'string<br>                            (or .cache "")
<br>                            (some 'speech-of (participants-of self)))))<br><br>SOME stops at the first non-nil speech, establishing no dependencies on the speech of any participant farther down the "participants-of" list.
<br><br>This is a problem, because speech-of is an ephemeral. It gets set to nil /without/ propagating after any non-nil value gets set and propagated. That is what ephemerals are all about, and I think that much is solid....... maybe not. We'll come back to this. Anyway, if someone farther down the list now says something, the rule does not run because it has no dependency on their speech. And the log misses an entry.
<br><br>Now I could just call this a user error ("Hey, Kenny! No dependency, no re-calc!") and wipe my hands of the whole mess, but I have been doing Cells for ten years and I had to debug in the internals for the first time in a lonnng time to figure this one out, so I think an unwritten law is being violated: normal, healthy Lisp code should transparently maintain dependencies automatically.
<br><br>deep background: if there is no way around this, so be it, we have an entry for a "gotchas" FAQ. But one thing that ruins supercool libraries is exactly this sort of violation of the principle of least surprise. So I want to see if the above code can be made to work.
<br><br>What I was thinking (until just now) was that any time a rule encountered an ephemeral, just after the ephemeral got reset, the rule should be rerun just to establish dependencies, not for its value. The code would be simple (famous last words): after resetting an ephemeral, iterate over all dependents of the ephemeral and call their rule, ignoring the return value. Weird, but I bet it works.
<br><br>The alternative is to implement the "reset ephemeral step" actually as a proper datapulse in which the ephemeral is set to NIL. Full propagation, including observers of the ephemeral. Boy, that sure weakens the ephemerality metaphor. :)
<br><br>Thoughts? Meanwhile, I will canvas real-world uses of ephemeral cells for inspiration.<br><br>cheers, kenneth<br><br><br>