I understand (I think ...) what :once-asked *does*, I want to know what it *means*.
In other words, the other two options seem to answer the question "when is this cell lazy?" Well, an :always cell is always lazy -- it's not recalculated until and unless you ask for it. An :until-asked cell is lazy until you query it once, then it's non-lazy from then on.
"once-asked" seems to answer a *different* question, "when is this cell evaluated?" It's evaluated once, when created, and then only when queried.
Is there any single "question" that all three answer, or are they just inconsistent?
Thanks!
-- L
Larry Clapp wrote:
I understand (I think ...) what :once-asked *does*, I want to know what it *means*.
In other words, the other two options seem to answer the question "when is this cell lazy?" Well, an :always cell is always lazy -- it's not recalculated until and unless you ask for it. An :until-asked cell is lazy until you query it once, then it's non-lazy from then on.
"once-asked" seems to answer a *different* question, "when is this cell evaluated?" It's evaluated once, when created, and then only when queried.
Is there any single "question" that all three answer, or are they just inconsistent?
Once-asked would be "un-lazy until you query it once" (ie, consistent) but it also looks to be vestigial: all code seems to treat it the same as always.
If I missed it in my brief scan of the code, it would have to do with model instance initialization. Normal cells get evaluated and observed very soon after initialize-instance, during md-awaken. An always lazy cell just sits there until someone actually reads the corresponding slot-value, then resumses sitting and not reacting to dependencies. An until-asked cell likewise just sits there until the slot is read, but then recalculates when any dependency changes. A once-asked cell would calculate during md-awaken but then be lazy ever after.
So there may be a gap in the code or maybe I missed it. Lazy stuff does not get a lot of use so it is possible there is a hole there.
kt
Kenny Tilton wrote:
Larry Clapp wrote:
I understand (I think ...) what :once-asked *does*, I want to know what it *means*.
In other words, the other two options seem to answer the question "when is this cell lazy?" Well, an :always cell is always lazy -- it's not recalculated until and unless you ask for it. An :until-asked cell is lazy until you query it once, then it's non-lazy from then on.
"once-asked" seems to answer a *different* question, "when is this cell evaluated?" It's evaluated once, when created, and then only when queried.
Is there any single "question" that all three answer, or are they just inconsistent?
Once-asked would be "un-lazy until you query it once" (ie, consistent) but it also looks to be vestigial: all code seems to treat it the same as always.
If I missed it in my brief scan of the code, it would have to do with model instance initialization.
Yeah, looks like I missed it, because the code looks for other than :once-asked to break off initialization and I was just searching on once-asked.
kt
On Fri, Aug 29, 2008 at 07:40:03AM -0400, Kenny Tilton wrote:
Kenny Tilton wrote:
Larry Clapp wrote:
I understand (I think ...) what :once-asked *does*, I want to know what it *means*.
In other words, the other two options seem to answer the question "when is this cell lazy?" Well, an :always cell is always lazy -- it's not recalculated until and unless you ask for it. An :until-asked cell is lazy until you query it once, then it's non-lazy from then on.
"once-asked" seems to answer a *different* question, "when is this cell evaluated?" It's evaluated once, when created, and then only when queried.
Is there any single "question" that all three answer, or are they just inconsistent?
Once-asked would be "un-lazy until you query it once" (ie, consistent) but it also looks to be vestigial: all code seems to treat it the same as always.
If I missed it in my brief scan of the code, it would have to do with model instance initialization.
Yeah, looks like I missed it, because the code looks for other than :once-asked to break off initialization and I was just searching on once-asked.
Ah, so they all *do* answer the same question, "when is this cell lazy?", but with the clarification that creation => asking.
once-asked: Lazy once you ask for it (creating asks) until-asked: Lazy until you ask for it (creating does not ask) always: Lazy always (creating does not ask)
This is probably one of those things that would have become clear once I got more experience with Cells, but I'm lazy, so I asked. :)
Thanks for the quick answer!
-- L