<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Chris,</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 6, 2019 at 3:54 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">> On Sat, Jan 05, 2019 at 08:53:52PM -0800, Eliot Miranda wrote:<br>
> > Hi David,<br>
> ><br>
> > > On Jan 5, 2019, at 8:17 PM, David T. Lewis <<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>> wrote:<br>
> > ><br>
> > > I don't think that this has a practical impact, but I will mention it<br>
> > > in case I am overlooking something. The hash for a DateAndTime in a<br>
> > > 64-bit image will be different from the hash for the same DateAndTime<br>
> > > in a 32-bit image, because the utcMicroseconds value in a 64-bit Spur<br>
> > > image is a SmallInteger, and in a 32-bit image it is a LargePositiveInteger.<br>
> ><br>
> > This was taken care of for this kind of scenario in<br>
> ><br>
> > Name: Kernel-eem.1198<br>
> > Author: eem<br>
> > Time: 24 November 2018, 1:44:47.526422 pm<br>
> > UUID: 100137c4-2514-4b7f-9064-3dcdfe7d8cc9<br>
> > Ancestors: Kernel-eem.1197<br>
> ><br>
> > Redefine LargePositiveInteger hash for compatibility between 32-bit<br>
> > and 64-bit systems.<br>
<br>
Shouldn't the condition should be  ^self digitLength <= 4, instead of 8?<br></blockquote><div><br></div><div>Of c course not.  It should be that all integers of 64-bits or less are their rowen hashes.</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>
See?<br>
<br>
32-bit image<br>
   1073741824 hash =    230045764<br>
<br>
64-bit image<br>
   1073741824 hash  = 1073741824<br></blockquote><div><br></div><div>No.  You must be using an un-updated image.  Here's what I get:</div><div><br></div><div>Smalltalk wordSize 4</div><div>(2 raisedTo: 63) hash = (2 raisedTo: 63) true</div><div>(SmallInteger maxVal + 1) hash = (SmallInteger maxVal + 1) true</div><div><br></div><div><br></div><div>Smalltalk wordSize 8</div><div>(2 raisedTo: 63) hash = (2 raisedTo: 63) true</div><div>(SmallInteger maxVal + 1) hash = (SmallInteger maxVal + 1) true</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>
I must be missing something.  I can't believe we didn't notice this<br>
and went into trunk before asking this question...<br></blockquote><div><br></div><div>Um, please.  I /did/ ask the question, I /did/ test.  I /do know/ that the idea is for integers of 64-bits or less be their own hashes.  Your result clearly indicates that you're using some erroneous configuration.</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>
> Ah, right, I forgot about that update. I was looking at an outdated 32-bit image.<br>
><br>
> Thanks!<br>
> Dave<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></div>