<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<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 think I see your point, but I'm not sure whether we really want to restrict the logging features of Squeak by defining an edge case like this. Without being aware of all the background, one could wonder "why quit 1 has been logged but quit 2 has not been"
 until you discover that you did not compile any code during the second session. However, that's just a loose thought trying to keep the complexity in the image as low as possible.</p>
<p><br>
</p>
<p>As an alternative, couldn't you disable the whole changes file in your REPL process via a script, or maybe even via a VM parameter? Another option would be making the changes file read-only if you do not need to manipulate it anyway. Squeak displays a warning
 in this situation, but you can still do everything that does not involve compiling afaik.</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> Samstag, 12. September 2020 16:31:27<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] a few small quit issues I want to note</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Christoph,</div>
<div dir="ltr"><br>
<blockquote type="cite">On Sep 12, 2020, at 5:05 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>which entries in the changes file are we talking about in detail?</p>
<p>Allow me to describe one certain use case of the changes file I frequently apply to one of my images: I have a FreshTrunk.image file that I only utilize in order to reproduce bugs or similar stuff but never save changes made to it. However, sometimes I make
 some experiments in it, i. e. compile a few methods, and at some time I also need to revert these changes later. Because I never overwrite the image file itself, the first entry in the "browse far as back as ..." dialog already lies several months in past.
 In this particular situation, it is really helpful for me to filter-type '...' into the changes browser, select the latest item, and press Enter to quickly jump to the latest changes made but not saved to the image.</p>
</div>
</div>
</blockquote>
<div><br>
</div>
That makes sense.  So we do want the QUIT/NO SAVE indication written to the changes file if anything is written to the changes file because we know that when doing crash recovery we want to ignore everything before QUIT/NO SAVE.  So, Chris Muller’s objections
 aside, I would argue that if the changes file is undisturbed (nothing written to it in the current session) when the system is about to quit without saving, it should do so without writing the QUIT/NO SAVE stamp.
<div><br>
</div>
<div>Chris, does this work for you or do you still see benefit in the QUIT/NO SAVE stamp when nothing has been logged?  Why?<br>
<blockquote type="cite">
<div dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>It would be great if this option would not be lost.</p>
</div>
</div>
</blockquote>
<div><br>
</div>
I’m most interested in not disturbing the changes file unnecessarily for the REPL image used in vm development and in the packaged app I’m working on (Terf), in our git repository.</div>
<div><br>
</div>
<div>With the REPL image if it starts up and evaluates an expression of two (which are not logged) and then quits nothing has changed but the QUIT/NO SAVE has been written, and now my reproducible image/changes pair is no longer in exactly the same state; the
 changes file has grown.</div>
<div><br>
</div>
<div>If I run the app image, launch the app, quit the app and then quit the image nothing has changed except that the QUIT/NO SAVE stamp has been written to the changes.  And gif tells me I have a modified file.  But I have modified nothing.</div>
<div><br>
</div>
<div>So Chris, can you live with having the system not write the QUIT/NO SAVE stamp if the changes file is the same size it was at startup?</div>
<div>
<blockquote type="cite">
<div 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;">Apart from that, accelerating image startup + shutdown sounds reasonable of course!</span></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> Samstag, 12. September 2020 03:02:15<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] a few small quit issues I want to note</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 5:19 PM Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</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">
Hi Eliot, may I recommend the "flat-line your image" hot key?  It's<br>
really useful for that and other use cases like debugging shutdown<br>
code, or when Morphic gets slammed with events due to a bug that<br>
disrupts the UI.  It calls Smalltalk quitPrimitive, so skips all<br>
shutdown processing and logging.  It's one of the global command keys,<br>
Cmd+Shift+_.<br>
</blockquote>
<div><br>
</div>
<div>Thanks.  However quitting via quitPrimitive is a bad idea.  Soon enough we will have a system with ephemerons around files and could expect file vuffers etc to be flushed before exit.  So we will want to run pending finalization actions, etc.  exiting
 via the quit primitive without running these activities could well break some applications.</div>
<div> </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">
<br>
Another tip to avoid git fake dirty .changes file is, upon launching<br>
the image, immediately Save as... a "_test" image that'll be excluded<br>
from your repository.<br>
</blockquote>
<div><br>
</div>
<div>Not the use case I'm thinking of.</div>
<div> </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">
With those two easily-accessible paths to a non-logging exit for the<br>
user, I hope we won't rush into changing the logging of<br>
exit-without-save.  That's a pretty legacy feature that I do use<br>
occasionally to help me keep track of which images I'm looking at,<br>
without wanting to change their .image file timestamp.<br>
</blockquote>
<div><br>
</div>
<div>OK, I abandon the idea.  Forget I said anything.</div>
<div> </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">
That SoundPlugin one does sound like one to optimize, but for the<br>
Form, I think you want that processing because it's about what bits<br>
you want to record in the image file, regardless whether continuing<br>
the session.<br>
</blockquote>
<div><br>
</div>
<div>No, the Form thing is compressing forms so they take less space in the image file.  A complete waste of time if one is merely quitting.</div>
<div> </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">
<br>
<br>
<br>
<br>
<br>
 - Chris<br>
<br>
On Fri, Sep 11, 2020 at 12:27 PM Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
> Hi All,<br>
><br>
>     there are a handful of issues on quitting, especially quitting without saving, that bother me.  I'm not suggesting we fix these right away but I do want to put them on the list to be fixed.  Fast system startup and exit are important, especially in a
 scripting context.<br>
><br>
> The first is that I *hate* the QUIT/NO SAVE notice being written to the changes file.  This seems entirely unnecessary.  Why if one enters the image, doesn't do anything and then quits, must the changes file be written to?  This causes minor pain when one
 has an image/changes under git and one has to revert the changes occasionally (but not the image).<br>
><br>
> Another issue is that we waste time shutting down the SoundPlugin via primSoundStop in stopPlayerProcess, whether the SOundPlugin is loaded or not.  So what happens is that the Vm loads the SoundPlugin just to turn it off.  A waste of effort.  We could check
 whether the plugin has been loaded first.<br>
><br>
> Similarly, Symbol class>>shutDown: anf Form class>>shutDown: do unnecessary processing if the system is just exiting, and not snapshotting and then exiting.<br>
> _,,,^..^,,,_<br>
> best, Eliot<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>
</div>
<span></span><br>
</div>
</blockquote>
</div>
</div>
</body>
</html>