On Mon, Aug 27, 2012 at 2:50 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Therefore the PRNG should be seeded once at start-up, from a good
> source of entropy.
IIRC Emacs fails to seed its PRNG at start (IOW it is seeded with
a constant), which is why many packages use (random t).
So I think the right thing to do now is to do seed it at startup, then
make (random t) a no-op.
We could consider adding a way to get the PRNG state and reset it later,
but since the PRNG state is Emacs-wide and Emacs is more like an OS than
like an application w.r.t its packages, such an interface would need to
allow several named PRNGs, so you'd call (random N <id>) to get the next
"random" number from <id>'s stream.