On Mon, Apr 12, 2010 at 1:55 PM, Larry Wall <la...@wall.org> wrote:

> On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote:
> : > 1. do all implementations of Perl6 generate the same sequence, given
> the
> : > same initial seed.
> :
> : I don't think they should. If you want that, use confuse a RNG with a
> : sequence generator that it is not.
> While I agree that the default should be non-reproducable, the
> approach taken in Perl 5 is nice to the extent that if you *do*
> seed the built-in RNG with a consistent value, you get a reproducable
> result.  And reproducable trees of random sequences can be generated
> by controlling the seeds of each node in the tree.

I think that what this conversation is boiling down to is: an RNG is just a
role that wraps an iterator factory and provides some passable defaults, to
be implemented as the default class or classes for Perl's core. That's fine,
but the idea of non-reproducible defaults worries me. If, by this, you mean
that whatever seed is provided to "srand" is to be aggregated with another
source (e.g. XORed with output from the system's entropy source), then I
would love to hear from someone who has experience with the last 10 years of
PRNG work who thinks that's not opening us up to some sort of strange
edge-case risk.

PRNGs are often misrepresented as frivolous, but as I'm sure you know from
your work at JPL, high quality random sequences are much-prized, and any
language that starts off with some poor assumptions will ultimately pay for

Some good reading for recent work:


Aaron Sherman
Email or GTalk: a...@ajs.com

Reply via email to