<div dir="ltr">Hi, <span style="font-family:arial,sans-serif;font-size:13px">Davide --</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Dan's original Fabrik does a topological sort before evaluating connections when I'm not mistaken.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Lively's approach is much simpler: If a connection is active it is marked as such (as kind of a dynamic variable) and subsequent activations won't trigger dependencies.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">When you look at AttributeConnection>>update </span><span style="font-family:arial,sans-serif;font-size:13px">(eval</span></div><div><font face="arial, sans-serif"> $world.browseCode("lively.bindings.Core", "AttributeConnection", "lively.bindings.Core");</font></div><div><font face="arial, sans-serif">in Lively) then the first line does the activation check.</font></div><div><br></div><div><font face="arial, sans-serif">Best,</font></div><div><font face="arial, sans-serif">Robert</font></div><div><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 4:10 PM, Davide Della Casa <span dir="ltr"><<a href="mailto:davidedc@gmail.com" target="_blank">davidedc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">In the Celsius - Fahrenheit example, each text box is connected to the other one.<div><br></div><div>So changing the Celsius calculates the Fahrenheit and vice-versa.</div><div><br></div><div>Question is: why does it not go in infinite updates between the two text boxes?</div><div><br></div><div>I’m going through the code and “How connect works” and can’t figure out what’s preventing the infinite updates. The original Ingalls 1988 Fabrik paper mentions that this loop can/should/is avoided but it doesn’t give specifics (“with some care” and “bidirectionality…shorthand for multiple paths” page 5). There doesn’t seem to be a check in “connect” or “update” or the setter. The setter seems to do an update, so why doesn’t changing the C box cause the setter of F to invoke updates on C again?</div><div><br></div><div>Also tried to look for “loop” in source code <a href="https://github.com/LivelyKernel/LivelyKernel/search?utf8=✓&q=loop&type=Code" target="_blank">https://github.com/LivelyKernel/LivelyKernel/search?utf8=%E2%9C%93&q=loop&type=Code</a> but nothing jumps to the eye.</div><div><br></div><div>What’s the trick I’m missing?</div><div><br></div><div><div>(BTW the edit/select/move-cursor behaviour in the text boxes when they are connected is glitchy)</div></div><div><br></div><div>Cheers,</div><div>Davide Della Casa</div><div><br></div><div><div><br></div></div></div><br>_______________________________________________<br>
lively-kernel mailing list<br>
<a href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a><br>
<a href="http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel" target="_blank">http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel</a><br>
<br></blockquote></div><br></div>