guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve `seed->random-state' in stable-2.0?


From: David Kastrup
Subject: Re: Improve `seed->random-state' in stable-2.0?
Date: Sat, 21 Jan 2012 08:38:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> Can't we just make a clean break now?  2.0 is still not widely
> deployed, so now is a great time to assert our right to change the
> PRNG at will.  As you say, it's unlikely that anyone is relying on
> this anyway.  If anyone is, wouldn't it be better to deal with that
> now?

For unique identifier generation, you want a PRNG that has a period
equal to the size of the generated identifier set and generates the same
next value given the current value in order to avoid the birthday
paradoxon.  That is actually different from what one considers a "good
PRNG", so it might make sense to have a home-brewn "bad PRNG" for this
purpose.

Actually, you don't need a PRNG at all.  Generate a _good_ random
starting value, and count sequentially from there.  The probability of
collision is the same as with a pseudo-random sequence, but if there
happens to be a problem at any time, it becomes much easier to diagnose.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]