Re: [Pharo-dev] Random is not random at startup

2016-05-22 Thread Martin McClure
On 05/21/2016 01:56 PM, stepharo wrote: I checked and CMWC Marsaglia is part of polymath PMNumberGenerator allSubclasses an OrderedCollection(PMBernoulliGenerator PMBinomialGenerator PMConstantGenerator PMExponentialGenerator PMGaussianGenerator PMPoissonGenerator) PMRandomGenerator

Re: [Pharo-dev] Random is not random at startup

2016-05-21 Thread stepharo
I checked and CMWC Marsaglia is part of polymath PMNumberGenerator allSubclasses an OrderedCollection(PMBernoulliGenerator PMBinomialGenerator PMConstantGenerator PMExponentialGenerator PMGaussianGenerator PMPoissonGenerator) PMRandomGenerator allSubclasses an

Re: [Pharo-dev] Random is not random at startup

2016-05-21 Thread stepharo
Though this only works on Unix, so on Windows it uses the current time as a seed. It might get better results using #microsecondClockValue instead of #millisecondClockValue. And I'd think about just taking the microsecond value and sending it #hashMultiply instead of the weird things it's

Re: [Pharo-dev] Random is not random at startup

2016-05-19 Thread Martin McClure
On 05/18/2016 10:42 PM, Sven Van Caekenberghe wrote: Martin, Would you be willing to contribute your implementation to Pharo ? Possibly with some tests ? I'll ask GemTalk management if they're OK with that. I imagine it'll be OK. But you might be better off taking the Squeak implementation,

Re: [Pharo-dev] Random is not random at startup

2016-05-18 Thread David T. Lewis
On Thu, May 19, 2016 at 07:57:37AM +0800, Ben Coman wrote: > On Thu, May 19, 2016 at 7:05 AM, Peter Uhn??k wrote: > > > > Not so random??? not random at all. > > Obligitory cartoon... > https://xkcd.com/221/ > Perfect :-)

Re: [Pharo-dev] Random is not random at startup

2016-05-18 Thread Martin McClure
On 05/18/2016 04:05 PM, Peter Uhnák wrote: My questions: 1) do we really want to have global fixed seed? No! 2) Random new should actually setup a usable seed so I don't need to first run it N times before I can use the value Yes. 3) Should we switch to what UUIDGenerator is using…

Re: [Pharo-dev] Random is not random at startup

2016-05-18 Thread Ben Coman
On Thu, May 19, 2016 at 7:05 AM, Peter Uhnák wrote: > Hi, > > (cc-ing Robert Withers as he seems to be working with cryptography and > security... as this seems related and may have some implications, but I am > likely wrong about the implications) > > yesterday I've

[Pharo-dev] Random is not random at startup

2016-05-18 Thread Peter Uhnák
Hi, (cc-ing Robert Withers as he seems to be working with cryptography and security... as this seems related and may have some implications, but I am likely wrong about the implications) yesterday I've encountered a very surprising behavior I executed the same script `10 atRandom` on the same