emacs-devel
[Top][All Lists]
Advanced

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

Re: random doesn't feel very random


From: Stefan Monnier
Subject: Re: random doesn't feel very random
Date: Sun, 02 Sep 2012 09:08:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

>>> One thing that wasn't discussed was how to set the
>>> seed, for people who want to do debugging and who want
>>> repeatable random sequences.
>> I don't think it's a good idea to be able to change the global PRNG
>> state in general.
> For some uses of pseudo-random numbers, repeatability is desirable.

Other than debugging, such repeatability needs generally imply the need
to use a separate PRNG, rather than the global one.

> Not every problem that requires randomness involves security.

Lack of repeatability is a feature that's not only needed by security,
but by the need to behave differently each time, otherwise the user
gets bored.
And AFAICT, all uses of `random' in Elisp currently fall in this camp.


        Stefan



reply via email to

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