[Squeakfoundation]Re: Trouble with 5150UUID-fix
Thu, 02 Jan 2003 15:19:51 -0500
(Sorry about not responding recently on this (or on the other recent fixes), but I am now back from xmas break. I will post this afternoon with a quick summary of the few other remaining issues/fixes for 3.4beta before it goes gamma.)
Cees de Groot wrote:
> I fear I have lost the context of this discussion; but if the issue can
> be cleanly fixed by publishing a class from SqueakMap, which is quite
> likely going to land in the distribution image anyway, and that fix is
> cleaner/better than mine (which is quite possible, because my fix
> squarely sits in the 'quick hack' category), I'm all for it.
Actually, the class from SqueakMap (the TimeStamp class) is not currently in the image and is required by your fix, it doesn't replace or otherwise improve your fix. :-)
Okay, after poking around with 5150UUID-fix and Time and TimeStamp, it looks like we can remove the dependency on TimeStamp (as Tim suggested) and keep the same behavior by simply replacing "TimeStamp current asSeconds" with "Time totalSeconds" in UUIDGenerator>>makeSeed. So, we should probably just do that.
I guess there was also the problem with #makeUnixSeed trying to access /dev/urandom on non-Unix machines, which Andreas pointed out. But Tim's fix to this (posted 12/20) looks reasonable, and it works for me on Windows.
Also, I'm a little suspicious of #makeSeedFromSound. Are we sure that this will always generate a random number for all platforms, even if the machine has no sound input/microphone? I tried unplugging my microphone on my Windows machine and it did seem to generate a different number each time, so that's good. Still, using a Date/Time/millisecond-based seed seems more reliable to me.
Göran, I was wondering if you were seeing a problem with the millisecond-based seed and you wanted this fix for that reason, or if you just wanted this fix because it flushes the default generator on startup (which I agree is a good thing). If the latter, maybe we should get rid of #makeSeedFromSound just to be safe?
(For purposes of this discussion, remember that we are talking about a very short-term/simple fix for the upcoming 3.4 release, not a more general UUID solution for 3.5alpha and beyond.)
> Scott Wallace wrote:
> > Cees, Doug, Tim, and all,
> > Gentlemen, how do you wish to proceed on this?
> > Thanks,
> > -- Scott
> > At 9:50 AM -0800 12/24/02, Tim Rowledge wrote:
> >> In message <firstname.lastname@example.org>
> >> Scott Wallace <email@example.com> wrote:
> >>> I presume that the appropriate fix at this point is to publish the
> >>> TimeStamp class, which is currently in the SqueakMap code, to the
> >>> 3.4b update stream. Any objections?
> >> Weel we could use the alternative approach and remove the dependency on
> >> said class; what effect would that have on the usefulness of the uuid
> >> value?
> >> tim
> >> tim