Our random number system has had quite a few updates.
In Zyn 2.2.1 it used the system rand() function. This is not guaranteed to be
particularly random and is not thread safe. However it is pretty much cross
When Cal created the Yoshimi fork he stripped out all the Windows code, as he
was focused specifically on Linux (this in itself improved stability). Later, he
also moved to using random_r() which has better randomisation, is thread safe,
but not cross-platform.
At some point, he also considerably increased the number of re-seeds. However,
he used the random number generator itself to do the reseeding, and I'm a bit
concerned that under some circumstances this could generate repeating patterns.
More recently, BSD builds have used random() - note no '_r'. This is not thread
safe, so has possible unpleasant implications.
Finally, in the past we've had breakages completely outside our control which
have meant we've had to scramble to find work-rounds. Indeed there is one now
that prevents building some debian BSD variations, and it's *way* down the
dependency stack :(
This all came to a head recently when discussing with another dev the problem of
making accurate comparisons across versions. I hit upon the idea of having the
ability to completely disable randomness for test purposes. That is now in
At the same time I decided try to find a way to resolve my previous doubts and
came across the PRNG we're using at the moment.
It's thread safe.
It has high quality and extremely long repeat time.
Being built in, it has no third-party dependency and is cross platform.
It seems to mess with some highly detailed patches.
That's what has put the brakes on. I'm actually hoping I've made a mistake in
Will J Godfrey
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx