Re: Mersenne Twister Seeding and UUIDs

2012-06-13 Thread Andrew Talbot
Regarding the mass production of random UUIDs, I believe that one would have to provide a seed that was at least 128 bits (or 16 ubyteS) wide in order to have uniform probability of generating any one random UUID from the entire set of 2^128 possible values. (If I read the following web page

Re: Mersenne Twister Seeding and UUIDs

2012-06-13 Thread Era Scarecrow
On Sunday, 10 June 2012 at 08:20:37 UTC, Andrew Talbot wrote: Andrew Talbot wrote: which I presume gives it 232 starting points, whereas I believe there should also be an alternative option to seed it with an array of up to 624 uintS, so that potentially it can be started in any one of its

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 6/11/12 12:32 PM, Joseph Rushton Wakeling wrote: On 11/06/12 18:15, Johannes Pfau wrote: Could someone who's familiar with RNGs answer this question? This seems to be important for st.uuid, we

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jens Mueller
Johannes Pfau wrote: Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 6/11/12 12:32 PM, Joseph Rushton Wakeling wrote: On 11/06/12 18:15, Johannes Pfau wrote: Could someone who's familiar with RNGs answer this question? This seems to

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jonathan M Davis
On Tuesday, June 12, 2012 11:48:11 Jens Mueller wrote: Johannes Pfau wrote: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would that break the API? What

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Jens Mueller
Jonathan M Davis wrote: On Tuesday, June 12, 2012 11:48:11 Jens Mueller wrote: Johannes Pfau wrote: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 11:48:11 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template as well, so seedRange could be named seed, or would that break the API? What do

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 13:14:23 +0200 schrieb Johannes Pfau nos...@example.com: Am Tue, 12 Jun 2012 11:48:11 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: * As seed is a normal function right now, I can't overload it with a template. Is it safe to make the original seed a template

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Johannes Pfau
Am Mon, 11 Jun 2012 13:09:26 -0500 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: We should have the same in std.random. Could anyone please initiate a pull request? Thanks, Andrei https://github.com/D-Programming-Language/phobos/pull/627

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Joseph Rushton Wakeling
On 11/06/12 19:09, Andrei Alexandrescu wrote: We should have the same in std.random. Could anyone please initiate a pull request? I'll see what I can do. Is it OK to pretty much copy the Boost code, bar D-ifying it a bit? The licence is identical, so this shouldn't be an issue AFAICS.

Re: Mersenne Twister Seeding and UUIDs

2012-06-12 Thread Joseph Rushton Wakeling
On 12/06/12 13:15, Joseph Rushton Wakeling wrote: I'll see what I can do. Is it OK to pretty much copy the Boost code, bar D-ifying it a bit? The licence is identical, so this shouldn't be an issue AFAICS. ... hit Reply before all the other overnight (for me) emails arrived. D'oh. :-\

Re: Mersenne Twister Seeding and UUIDs

2012-06-11 Thread Johannes Pfau
Am Sun, 10 Jun 2012 00:24 +0100 schrieb Andrew Talbot andrew.tal...@talbotville.com: Forgive what may be the unintelligible ramblings of an ignorant hobbyist, but, if I am not mistaken, the Mersenne Twister implementation in std.random currently can be seeded only with a 32-bit unsigned

Re: Mersenne Twister Seeding and UUIDs

2012-06-11 Thread Joseph Rushton Wakeling
On 11/06/12 18:15, Johannes Pfau wrote: Am Sun, 10 Jun 2012 00:24 +0100 schrieb Andrew Talbotandrew.tal...@talbotville.com: Forgive what may be the unintelligible ramblings of an ignorant hobbyist, but, if I am not mistaken, the Mersenne Twister implementation in std.random currently can be

Re: Mersenne Twister Seeding and UUIDs

2012-06-11 Thread Andrei Alexandrescu
On 6/11/12 12:32 PM, Joseph Rushton Wakeling wrote: On 11/06/12 18:15, Johannes Pfau wrote: Could someone who's familiar with RNGs answer this question? This seems to be important for st.uuid, we should get this right. In the Boost C++ implementation it certainly accepts a range as input:

Re: Mersenne Twister Seeding and UUIDs

2012-06-10 Thread Andrew Talbot
Andrew Talbot wrote: which I presume gives it 2^32 starting points, whereas I believe there should also be an alternative option to seed it with an array of up to 624 uintS, so that potentially it can be started in any one of its 19,937 internal states. Of course I meant ...in any one of its

Mersenne Twister Seeding and UUIDs

2012-06-09 Thread Andrew Talbot
Forgive what may be the unintelligible ramblings of an ignorant hobbyist, but, if I am not mistaken, the Mersenne Twister implementation in std.random currently can be seeded only with a 32-bit unsigned integer, which I presume gives it 2^32 starting points, whereas I believe there should also