I love the way Squeak uses the random number generator in the collection class. This hugely simplifies a lot of things. I have run into some portability issues with this, however. Squeak uses truncation for 'asInteger', Dolphin uses rounding. This can make a big difference. Does anyone know what the ANSI standard for 'asInteger' should be? Regardless of this, I think it may be less ambiguous to use 'truncated' rather than asInteger.
index := (aGenerator next * self size) asInteger + 1.
index := (aGenerator next * self size) truncated + 1.
The other thing I noticed is that atRandom and atRandom: aRNG duplicate a lot of code. Why not implement atRandom as this:
atRandom ^self atRandom: RandomForPicking
Peter....
I was doing
10000 factorial
and
Display onFileNamed: 'screenshot.GIF'
at the same time when the Squeak disappears -:) Is it expected? I was runing
SqueakVM-2.2-sparc-solaris-2.5.1 -display unix:0 -xshm -memory 10m Squeak2.2.image
Also, it seems that I missed the post somewhere -- How to specify memory size for Windows VM?
-- John (Zhijiang)
squeak-dev@lists.squeakfoundation.org