<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span style="font-size: 12pt;">Hi all,</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">sorry for the long delay on this issue. I'm attaching a new version of the changeset including the following changes:</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">*</span><span style="font-size: 12pt;"> Use DynamicVariables for storing the active variable states</span></p>
<p><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">*</span><span style="font-size: 12pt;"> Refactor and reduce the visibility of active variable accessors on Object</span></p>
<p><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">*</span><span style="font-size: 12pt;"> Clean up implementations of #activeHand and #primaryHand</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">@Dave I think associating these objects to Process is an implementation detail of DynamicVariables which I would not like to denigrate in general.</span><br>
</p>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">> <span style="font-size:12pt">It's true that in Morphic there </span><span style="font-size:12pt">is one distinct Process associated with the user interface for each Morphic </span><span style="font-size:12pt">world.</span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size:12pt"><br>
</span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size:12pt">I'm not so sure about this. You can always do</span><span style="font-size: 12pt;"> forks within UI code, so sometimes there are also multiple Processes within one Morphic world.
 Just think about Shout's background process or debugging processes, and please keep in mind that Jakob justifiably proposed to renew the process handling for non-modal dialogs, which maybe could also result in multiple processes being active at the same time.</span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;">A world can have multiple hands, for example, RemoteHandMorphs (Nebraska), event-simulating hands (EventRecorder), or just multiple plain HandMorphs as demonstrated by Tony recently in
 his <span>PostmarketOS implementation. There is no reason for these hands to run on the same process. Analogously, I don't see why we should restrict a hand not to be thread-safe, so the hand-event relation is 1:n again.</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;"><span><br>
</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;"><span>PS: Thanks for the hint to the new wiki page!</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;"><span><br>
</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;"><span>Best,</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size: 12pt;"><span>Christoph</span></span></div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><span style="font-size:12pt"><br>
</span></div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von David T. Lewis <lewis@mail.msen.com><br>
<b>Gesendet:</b> Montag, 14. September 2020 17:49:34<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Changeset: Eliminating global state from Morphic</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">On Mon, Sep 14, 2020 at 11:17:53AM +0000, Thiede, Christoph wrote:<br>
> Hi Dave,<br>
> <br>
> <br>
> I agree that could try to place the active variables at better places than the most generic Object class. Still, I am not sure whether you are arguing against the thread-local storage of their values - which I do find pretty important for enabling concurrency.<br>
> <br>
> <br>
> Of course, we could move my proposed implementation #activeWorld down to Project, and on Object, forward the request to "Project current activeWorld". Still, I do not think that an instance variable would be the right way to store the world, because it is
 not thread-local. If you would like to do this, we should implement some kind of PluggableThreadLocalVariable as proposed below, and store an instance of this class in Project.<br>
> <br>
> <br>
> What do you think?<br>
> <br>
<br>
Hi Christoph,<br>
<br>
The thing that I like (a lot) about your changes is that they make it<br>
much easier to see and understand the accesses to the global variables.<br>
The references now all go through a small number of methods in Object,<br>
so that you can see what they do now.<br>
<br>
Clearly we would want to leave this logic in Object, since we don't<br>
want to add more clutter to its protocol. But you have collected the logic<br>
in one place now, which makes it easier to think about where it ultimately<br>
should go, and that's great.<br>
<br>
But where do these things actually belong?  Thinking in terms of the<br>
responsiblities of objects in the system [1], I don't think that associating<br>
them with a Process seems to be a good fit. It's true that in Morphic there<br>
is one distinct Process associated with the user interface for each Morphic<br>
world. So you can make things work by associating these variables with<br>
a Process, but it seems like an unnatural fit to me. A Morphic world has<br>
a process, but a Process is not responsible for knowing the state of<br>
the Morphic world.<br>
<br>
Dave<br>
<br>
[1] <a href="https://en.wikipedia.org/wiki/Responsibility-driven_design#:~:text=Responsibility%2Ddriven%20design%20is%20a,information%20that%20the%20object%20shares">
https://en.wikipedia.org/wiki/Responsibility-driven_design#:~:text=Responsibility%2Ddriven%20design%20is%20a,information%20that%20the%20object%20shares</a>.<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>