Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79948 invoked from network); 12 Aug 2016 18:40:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 18:40:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=fsb@thefsb.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=fsb@thefsb.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thefsb.org designates 173.203.187.123 as permitted sender) X-PHP-List-Original-Sender: fsb@thefsb.org X-Host-Fingerprint: 173.203.187.123 smtp123.iad3a.emailsrvr.com Received: from [173.203.187.123] ([173.203.187.123:52861] helo=smtp123.iad3a.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/B2-55605-F281EA75 for ; Fri, 12 Aug 2016 14:40:47 -0400 Received: from smtp32.relay.iad3a.emailsrvr.com (localhost [127.0.0.1]) by smtp32.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 6012BC083A; Fri, 12 Aug 2016 14:40:45 -0400 (EDT) X-Auth-ID: fsb@thefsb.org Received: by smtp32.relay.iad3a.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id 41D20C0837; Fri, 12 Aug 2016 14:40:45 -0400 (EDT) X-Sender-Id: fsb@thefsb.org Received: from yossy.local (c-66-30-62-12.hsd1.ma.comcast.net [66.30.62.12]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:587 (trex/5.7.1); Fri, 12 Aug 2016 14:40:45 -0400 To: =?UTF-8?Q?Lauri_Kentt=c3=a4?= , internals@lists.php.net, Leigh References: <3d8be1faf8d4d3e5add3768d7a8eb16c@k-piste.dy.fi> Message-ID: <08ad472d-45d6-f8a8-0774-2b5c93aabfb7@thefsb.org> Date: Fri, 12 Aug 2016 14:40:44 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <3d8be1faf8d4d3e5add3768d7a8eb16c@k-piste.dy.fi> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: mt_srand with array seed? From: fsb@thefsb.org (Tom Worster) On 8/11/16 10:13 AM, Lauri Kenttä wrote: > Hello, > > Any thoughts about supporting a longer seed array for mt_srand? Does > anyone really need it? Should it be in mt_srand or mt_srand_array? > > See: https://bugs.php.net/bug.php?id=32145 The second question is controversial. People have asserted that nobody does statistical work in PHP, or that if they do it's not a "legitimate" use of PHP. There were demands for evidence that anyone has ever legitimately needed to seed an RNG in PHP. I disagree. #32145 in itself is sufficient for me. For statistical work 2^32 starting positions is not enough. MT's period is Vast, like Dennett's Vast with a capital V. Nobody needs *that* much but if MT is what we've got then it seems reasonable to allow access to more of it. mt_srand() will work. But what would be in the array? Integers from which the upper 32 bits, if they exist, are discarded? Tom