caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@inria.fr, Lauri Alanko <la@iki.fi>
Subject: Re: [Caml-list] Generating random generators
Date: Tue, 11 May 2010 09:01:21 -0700 (PDT)	[thread overview]
Message-ID: <868399.72933.qm@web111507.mail.gq1.yahoo.com> (raw)
In-Reply-To: <20100509100728.GA23132@ruuvi.it.helsinki.fi>

Hi,

> However, random numbers are tricky, and I'm suspicious of just
> adding a new operation ad hoc when I don't understand how the
> underlying PRNG works. Hence, I'd appreciate if anyone could
> offer some insight on whether the above approach has any hidden
> pitfalls (i.e. some sort of regularity that might appear when the
> values from two generated streams are combined in a particular
> fashion), or if there is a faster way of generating new generators
> robustly. Random.State.make invokes Digest.string for every int of
> the seed, so it seems like overkill.

Have you considered using Cryptokit's Random module?  It offers
many generators, one of which meets your determinism criteria.

Cheers,
Dario Teixeira






      reply	other threads:[~2010-05-11 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09 10:07 Lauri Alanko
2010-05-11 16:01 ` Dario Teixeira [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868399.72933.qm@web111507.mail.gq1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=la@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).