<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi David,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 24, 2021 at 8:10 AM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.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">I like this proposal. It has no effect on the ProcessBrowser, and is<br>
helpful when looking at processes elsewhere.<br>
<br>
Most processes do not have a name, but all processes respond in a concise<br>
and useful way to #name.<br>
<br>
  Process>>name<br>
      ^name ifNil: [ self hash asString forceTo: 5 paddingStartWith: $ ]<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">5 is too short.  The identityHash in Spur has 7 digits of significance and hash => scaledIdentityHash => identityHash * 256.  Also asString is lazy; it just calls printString. I wouldn't contract at all:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium">Process>>name</span><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium">      ^name ifNil: [self hash printString]</span><br></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium"><br></span></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>
So +1 from me<br>
<br>
Dave<br>
<br>
On Sun, Jan 24, 2021 at 03:28:20PM +0000, Thiede, Christoph wrote:<br>
> Hi Eliot,<br>
> <br>
> <br>
> thanks for the feedback! I actually intended to print their short hash if they don't have a real name because this can still be very helpful in order to differentiate between multiple processes each suspended in the same method. It would also help me to identify a process from the process browser somewhere else. Do you get my point? :-)<br>
> <br>
> <br>
> Best,<br>
> <br>
> Christoph<br>
> <br>
> <<a href="http://www.hpi.de/" rel="noreferrer" target="_blank">http://www.hpi.de/</a>><br>
> ________________________________<br>
> Von: Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> im Auftrag von Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>><br>
> Gesendet: Sonntag, 24. Januar 2021 15:55:42<br>
> An: <a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a><br>
> Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1368.mcz<br>
> <br>
> Hi Christoph,<br>
> <br>
>     only a few processes have a name.  Surely this should test from there being a name and not print some noise if it doesn???t have a name.<br>
> <br>
> _,,,^..^,,,_ (phone)<br>
> <br>
> > On Jan 24, 2021, at 6:19 AM, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
> ><br>
> > ???A new version of Kernel was added to project The Inbox:<br>
> > <a href="http://source.squeak.org/inbox/Kernel-ct.1368.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Kernel-ct.1368.mcz</a><br>
> ><br>
> > ==================== Summary ====================<br>
> ><br>
> > Name: Kernel-ct.1368<br>
> > Author: ct<br>
> > Time: 24 January 2021, 3:19:48.003384 pm<br>
> > UUID: c62a6062-b240-9149-a2ed-78fdc1079dfd<br>
> > Ancestors: Kernel-mt.1364<br>
> ><br>
> > Proposal: Always include process name into its print string. This facilitates debugging/inspecting of multiprocess scenarios.<br>
> ><br>
> > =============== Diff against Kernel-mt.1364 ===============<br>
> ><br>
> > Item was changed:<br>
> >  ----- Method: Process>>longPrintOn: (in category 'printing') -----<br>
> >  longPrintOn: stream<br>
> ><br>
> >      | ctxt |<br>
> >      super printOn: stream.<br>
> > +    stream<br>
> > +        nextPut: $(;<br>
> > +        nextPutAll: self name;<br>
> > +        nextPut: $).<br>
> >      stream cr.<br>
> >      ctxt := self suspendedContext.<br>
> >      [ctxt == nil] whileFalse: [<br>
> >          stream space.<br>
> >          ctxt printOn: stream.<br>
> >          stream cr.<br>
> >          ctxt := ctxt sender.<br>
> >      ].<br>
> >  !<br>
> ><br>
> > Item was changed:<br>
> >  ----- Method: Process>>printOn: (in category 'printing') -----<br>
> >  printOn: aStream<br>
> ><br>
> >      super printOn: aStream.<br>
> > +    aStream<br>
> > +        nextPut: $(;<br>
> > +        nextPutAll: self name;<br>
> > +        nextPut: $).<br>
> >      aStream nextPutAll: ' in '.<br>
> >      suspendedContext printOn: aStream!<br>
> ><br>
> ><br>
> <br>
<br>
> <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>