<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Eliot,</p>
<p><br>
</p>
<p>I just noticed your request right now only, apparently Marcel has already done the work.</p>
<p><br>
</p>
<p>I am never sure about reparenting my proposals' diffs to the original ancestor versus forming my own implicit branch of deltas. The former can be
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
compared </span>more easier to the Trunk, the latter is more helpful to watch how a proposal evolves over time ... This has been discussed a lot of times, ending up with identifying an insufficient tool infrastructure for this domain (at least IMHO). If it's
 easier for the merger, I will try to use the Reparent button more often, but still, it's an imperfect solution for me. :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="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="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="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>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Gesendet:</b> Sonntag, 1. November 2020 20:02:19<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Kernel-ct.1359.mcz</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-size:large">Hi Christoph,<br>
</div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">    can you please submit a merge of your changes here with Kernel-eem.1359 and then we can move your contribution to trunk.  Always submitting deltas to other inbox versions means one of us has to merge and
 that could be perceived as a little passive aggressive ;-).</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Nov 1, 2020 at 10:51 AM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
A new version of Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Kernel-ct.1359.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Kernel-ct.1359.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1359<br>
Author: ct<br>
Time: 1 November 2020, 7:50:24.183428 pm<br>
UUID: 3b12b316-79f3-de41-8765-8296d964b821<br>
Ancestors: Kernel-mt.1353<br>
<br>
Revise and extend Context #runSimulated: implementation. Remove restriction to blocks that do not have a method return. Add support for exception signaling during the execution, which caused unterminated simulation of the calling process in the past. Support
 argless contextAtEachStep blocks.<br>
<br>
Benchmarks:<br>
        code:<br>
                [Context runSimulated: [100@100 corner: 200@200]] bench<br>
        before:<br>
                16.7 ms/run<br>
        after:<br>
                19.8 ms/run<br>
I think this should be okay, given the fact that the primary purpose of simulation is providing explorability but not efficiency ...<br>
<br>
=============== Diff against Kernel-mt.1353 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Context class>>runSimulated: (in category 'simulation') -----<br>
  runSimulated: aBlock<br>
+       "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns."<br>
-       "Simulate the execution of the argument, current. Answer the result it <br>
-       returns."<br>
<br>
        ^ thisContext sender<br>
                runSimulated: aBlock<br>
+               contextAtEachStep: []<br>
-               contextAtEachStep: [:ignored]<br>
<br>
        "Context runSimulated: [Pen new defaultNib: 5; go: 100]"!<br>
<br>
Item was changed:<br>
  ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') -----<br>
+ runSimulated: aBlock contextAtEachStep: anotherBlock<br>
+       "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction
 executed. Answer the simulated value of aBlock."<br>
+ <br>
+       | current resume ensure |<br>
+       resume := false.<br>
- runSimulated: aBlock contextAtEachStep: block2<br>
-       "Simulate the execution of the argument, aBlock, until it ends. aBlock <br>
-       MUST NOT contain an '^'. Evaluate block2 with the current context <br>
-       prior to each instruction executed. Answer the simulated value of aBlock."<br>
-       | current |<br>
-       aBlock hasMethodReturn<br>
-               ifTrue: [self error: 'simulation of blocks with ^ can run loose'].<br>
        current := aBlock asContext.<br>
+       ensure := current insertSender: (Context contextEnsure: [resume := true]).<br>
+       ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead."<br>
+       <br>
+       (anotherBlock numArgs = 0<br>
+               ifTrue: ["optimized" [resume]]<br>
+               ifFalse: ["stop execution on time, don't expose simulation details to caller"<br>
+                       [current == ensure or: <br>
+                               ["Context >> #resume:"<br>
+                               current size >= 2 and: <br>
+                                       [(current at: 2) == ensure]]]   ])<br>
-       current pushArgs: Array new from: self.<br>
-       [current == self]<br>
                whileFalse:<br>
+                       [anotherBlock cull: current.<br>
-                       [block2 value: current.<br>
                        current := current step].<br>
+       <br>
+       ^ current jump!<br>
-       ^self pop!<br>
<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div><span style="font-size:small;border-collapse:separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</body>
</html>