Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38681 invoked from network); 2 Feb 2017 03:48:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2017 03:48:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:38126] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/28-51557-11CA2985 for ; Wed, 01 Feb 2017 22:48:35 -0500 Received: (qmail 23584 invoked by uid 89); 2 Feb 2017 03:48:30 -0000 Received: from unknown (HELO mail-qt0-f169.google.com) (yohgaki@ohgaki.net@209.85.216.169) by 0 with ESMTPA; 2 Feb 2017 03:48:30 -0000 Received: by mail-qt0-f169.google.com with SMTP id v23so8166120qtb.0 for ; Wed, 01 Feb 2017 19:48:29 -0800 (PST) X-Gm-Message-State: AIkVDXJjl6m+teLyA7ubcnPG4GZu7uICoptHs87ndBMugeK6HVXEC7rEt/Ac5b55B3GDOScJZbwsV01iN//fUg== X-Received: by 10.55.153.130 with SMTP id b124mr5991707qke.82.1486007303717; Wed, 01 Feb 2017 19:48:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.19.232 with HTTP; Wed, 1 Feb 2017 19:47:43 -0800 (PST) In-Reply-To: References: <0D26A03B-6BEB-4730-8E4B-0F7D6835E683@thefsb.org> <8991137d8dd8ba915bcacd4fbc1fe88f@gmail.com> Date: Thu, 2 Feb 2017 12:47:43 +0900 X-Gmail-Original-Message-ID: Message-ID: To: =?UTF-8?Q?Lauri_Kentt=C3=A4?= Cc: Tom Worster , "internals@lists.php.net" , Leigh , Nikita Popov Content-Type: multipart/alternative; boundary=94eb2c07b19c790ee705478409a8 Subject: Re: [PHP-DEV] Re: Improving mt_rand() seed From: yohgaki@ohgaki.net (Yasuo Ohgaki) --94eb2c07b19c790ee705478409a8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, On Mon, Jan 30, 2017 at 7:54 PM, Yasuo Ohgaki wrote: > On Mon, Jan 30, 2017 at 7:47 PM, Yasuo Ohgaki wrote: > >> On Mon, Jan 30, 2017 at 7:41 PM, Lauri Kentt=C3=A4 >> wrote: >> >>> On 2017-01-30 04:25, Yasuo Ohgaki wrote: >>> >>>> I'll prepare patch that allows int array >>>> initialization for mt_srand() so that whole state buffer can be >>>> initialized as user specifies. >>>> >>> >>> Don't. >>> >>> See these: >>> https://github.com/php/php-src/pull/2089 >>> https://www.mail-archive.com/internals@lists.php.net/msg87590.html >> >> >> Nice! >> >> Thank you for letting me know. >> BTW, do you have good idea for the seeding issue? >> > > I got it now. Object based PRNG sounds nice. I may write it, but > I have long todo lists already. > > Anyway, we have to take care existing API and make usable. > We must have MT rand reseed API somehow. > > Ideas are appreciated. > Posting RFC draft before discussion https://wiki.php.net/rfc/improve_predictable_prng_random This RFC includes results of recent PRNG related discussions. I would like to keep it simple, but basic object feature will be implemented. Methods could raise exceptions for invalid operations rather than ignoring. Comments? -- Yasuo Ohgaki yohgaki@ohgaki.net --94eb2c07b19c790ee705478409a8--