<html><head></head><body>  <div><br></div><div dir="auto"><caret></caret><br></div>On Wed, Mar 1, 2023 at 14:18, Jakob Reschke <<a href="mailto:jakres+squeak@gmail.com" class="">jakres+squeak@gmail.com</a>> wrote:<blockquote class="protonmail_quote" type="cite">  <div dir="ltr">Event-loop based UI development is usually a good strategy. It is how Windows works at the foundations... I know that this will sound rather like an argument against it for some people. ;-P</div></blockquote>lol! Certainement! Yet they built the Midori eventual sending OS [1].<caret></caret><br><blockquote class="protonmail_quote" type="cite"><div dir="auto"><div dir="auto">The question is whether it is convenient to program like that. All parts involved must account for the asynchronicity. It may be more convenient to just send a Smalltalk message rather than using addDeferredUiMessage: and wrapping your intent in a block, but the code that comes after that line looks different, too. </div></div></blockquote>Yes indeed. The EST: Eventual Sending Style.<div dir="auto"><br></div><div dir="auto">    ((an object eventual <span style="color: var(--text-color); background: var(--bg-color);" dir="auto">send: #identityHash)</span></div><div dir="auto"><span style="color: var(--text-color); background: var(--bg-color);" dir="auto">        then: [:code | code * 10])</span></div><div dir="auto">            then: [:codeMag | Transcript cr; show: β€˜code order of magnitude = β€˜, codeMag].</div><div dir="auto"><br></div><div dir="auto">Looking into sugar, with ESqueak, where EAbstract>>#doesNotUnderstand: eventually sends the msg like a trampoline:</div><div dir="auto"><br></div><div dir="auto">    (anObject eventual identityHash</div><div dir="auto">        >>: [:code | code * 10]</div><div dir="auto">        >>: [:codeMag | <span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;">Transcript cr; show: β€˜code order of magnitude </span><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto">= β€˜, codeMag].</span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto"><br></span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto">Where the as yet unimplemented ENearPromise>>#>>:>>: would be</span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto"><br></span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto">    ^ (self then: reactor1)</span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto">        then: reactor2.</span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto"><br></span></div><div dir="auto"><span style="  San Francisco", Helvetica, Arial, sans-serif;     letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;  -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px;  text-decoration: none; display: inline !important; float: none;" dir="auto">Of course instead of a block the reactor could be (an anonymous) subclass of WhenResolvedReactor and set a closure object in initialize.</span></div><div dir="auto"><br><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div dir="auto">Especially if you need a result/response to continue your overall computation.</div></div></blockquote>I was thinking of a possible marking of a closure as #immediate to turn all eventual sending within as immediate calls.<caret></caret><br><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div dir="auto">You may be inclined to use Promises there, where you would not do that otherwise, for example.</div></div></blockquote>Right.<caret></caret><br><blockquote class="protonmail_quote" type="cite"><div dir="auto"><div>In my opinion right now it is more convenient to develop in a synchronous manner in Squeak because the debugger in its current state is better suited for that. It does not support you very well with Promises, deferred UI messages, spawned processes and the like... And when some of the tools that you are used to do not support you well anymore, it does not feel good.</div></div></blockquote>An excellent observation, Jakob! Tool support for eventual sending would be a must, specifically the debugger. </div><div dir="auto"><br></div><div dir="auto">I think this exposes the coordination problem, I guess we could call it. How does one intrepid souk debug control flow among independent event processes?</div><div dir="auto"><br></div><div dir="auto">Given success with these issue, does it make sense to keep eventual sending as a candidate?</div><div dir="auto"><br></div><div dir="auto">Would it not allow controller / view / model interactions to be thought about clearly?</div><div dir="auto"><br></div><div dir="auto">Thanks for your consideration.<caret></caret></div><div dir="auto"><br></div><div dir="auto">🐰</div><div dir="auto"><blockquote class="protonmail_quote" type="cite"><div dir="auto"><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 1. MΓ€rz 2023 um 19:40 Uhr schrieb rabbit <<a href="mailto:rabbit@callistohouse.org">rabbit@callistohouse.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>  <div dir="auto">Awesome! Jecel, I’m quite curious to hear your thoughts on eventual sending. EVERYBODIES thoughts, really. Is event-loop eventual sending a feasible style / function for UI development?</div><div dir="auto"><br></div><div dir="auto">🐰</div><div dir="auto"><u></u><u></u><br></div><div id="m_6041824441368197938protonmail_signature_block"><div>β€”<br>Have a good one; keep it, light.<br>Kindly, rabbit . .. β€¦ β€˜β€¦^,^ πŸ‡πŸ‡πŸ‡<br><br>Sent from Callisto House mobile - Ganymede<br>:: decentralized mobile homeless solutions ::</div></div> <div><br></div><div><br></div>  <div><br></div><div><br></div>On Wed, Mar 1, 2023 at 13:00, Jecel Assumpcao Jr <<a href="mailto:jecel@merlintec.com">jecel@merlintec.com</a>> wrote:<blockquote type="cite">  David T. Lewis wrote on Tue, 28 Feb 2023 20:39:54 -0500<br>> In MVC, each Controller has its own Process, and those processes are<br>> scheduled when needed as windows are activated. In Morphic, there is<br>> a single UI process.<br><br>True, but misleading. Just like the VM has a single OS thread that it<br>multiplexes between image level processes, the single Morphic thread<br>pretends to run each morph in parallel at a known rate by repeated<br>sending #step to them.<br><br>Because we know that only when #step for one morph is finished that<br>#step will be sent to the next morph, we have been programming as it<br>morphs did not execute in parallel even though that is what the model<br>was supposed to be. That is why we get in trouble when things happen<br>outside of the GUI scheduler.<br><br>In Self you have have more than one Morphic window and each gets its own<br>GUI thread, but they are unlikely to share the same objects so we don't<br>notice the problem. You can also have multiple windows in different<br>machines viewing the same "world" and in that case they all share a<br>single GUI thread.<br><br>-- Jecel<br><br></blockquote></div><br>
</blockquote></div>
</blockquote></div></body></html>