From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 14932BC57 for ; Tue, 11 May 2010 18:01:24 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwDAKEc6UtDww+pi2dsb2JhbACDF44egy2JWQEBAQoLCgcPBR+rTjmCAIUsiHwBBAQBgSCBPYFEagSDQA X-IronPort-AV: E=Sophos;i="4.53,208,1272837600"; d="scan'208";a="51027678" Received: from web111507.mail.gq1.yahoo.com ([67.195.15.169]) by mail2-smtp-roc.national.inria.fr with SMTP; 11 May 2010 18:01:23 +0200 Received: (qmail 73150 invoked by uid 60001); 11 May 2010 16:01:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1273593681; bh=RWNSoKkln6+aUvcHYwqucyVVHEQFUZCal7aiDz68RKo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=uVrl4jSKk9v5JRKpWs3j3S+ROhzBTQ7kyBvCxNN/rHf+3WvdtQodKXSbeuywcdKnXjCKKj/YXo8IOMzoK1QCymAJ9PMAJQXfiUMxQJ6SbXpn6NP1Kh4Wezz7aGIVuuiyYW+leZivvXbgit/EPGkKL/DLre8tnsrQaYGPHuQSegg= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bBd0gLoy/eF3zRQCpWS6/zmlmLBDqivUgQ6ISV7D/Vp8hctlsCr5Y6SBrPfgsMb6WMjvhS1zzyNQidKHduHt7NBw/DBAQZi1JomVE64C4nyob3ZVvCXSLwRBrSFAFx7w9xtSSgwNTqYNXc2RAN09CR35Omm5FAwL6YgUE4kEbbc=; Message-ID: <868399.72933.qm@web111507.mail.gq1.yahoo.com> X-YMail-OSG: 86Me864VM1mY2OYZ5i2S8lDB2ZoXmlYun0Am5.JMEdP7KO7 tl3iIgEdzcKR6xvT1_jYS01kK3UcacMYty2ia5AcpDhPuq7G5imI2xLOSttC 1cd7ttGNj6M8fjhZOji8_QXoS8MxW8lDV6MtZ3F25o.zrpsvd2xfneV3mjXS 7I13uhY85mBrv4oc8Ft5djF1G8JfEIoZEwK3dWHwYXB.P4cIC.A6SBHmfAxT 7bnVeft4nwEF1JOcxFhrDzb6qxoKXMYfUye3gtm.6v6odjhsgWambEaWRfbE b0LgCUoipSxT4_YJUSA3THJdxgs2i2H5eMFDqX.U8uXRZzb6jCvJOq7o- Received: from [213.205.71.54] by web111507.mail.gq1.yahoo.com via HTTP; Tue, 11 May 2010 09:01:21 PDT X-Mailer: YahooMailClassic/11.0.8 YahooMailWebService/0.8.103.269680 Date: Tue, 11 May 2010 09:01:21 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Generating random generators To: caml-list@inria.fr, Lauri Alanko In-Reply-To: <20100509100728.GA23132@ruuvi.it.helsinki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; prng:01 pitfalls:01 invokes:01 overkill:01 cheers:01 caml-list:01 digest:01 int:01 string:02 seems:03 module:03 hoc:03 tricky:04 generated:05 i'd:06 Hi,=0A=0A> However, random numbers are tricky, and I'm suspicious of just= =0A> adding a new operation ad hoc when I don't understand how the=0A> unde= rlying PRNG works. Hence, I'd appreciate if anyone could=0A> offer some ins= ight on whether the above approach has any hidden=0A> pitfalls (i.e. some s= ort of regularity that might appear when the=0A> values from two generated = streams are combined in a particular=0A> fashion), or if there is a faster = way of generating new generators=0A> robustly. Random.State.make invokes Di= gest.string for every int of=0A> the seed, so it seems like overkill.=0A=0A= Have you considered using Cryptokit's Random module? It offers=0Amany gene= rators, one of which meets your determinism criteria.=0A=0ACheers,=0ADario = Teixeira=0A=0A=0A=0A