Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117865 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77120 invoked from network); 7 Jun 2022 13:38:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jun 2022 13:38:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7F88E180384 for ; Tue, 7 Jun 2022 08:24:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 7 Jun 2022 08:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1654615472; bh=baPfv006DSq4X+WLhu3gR/UeAEtmdI7t4GJxr3pMdQg=; h=Date:Subject:To:References:From:In-Reply-To:From; b=O2qoNoUHSxGIjhbyJl8JABCTIqzC7IW3yvV/ogmQ5lBq7P5Btm6Gy5vnmQ5+GfXpi PspAMfTpNaKGTn5ZbTTDYdaMB24+jCLg7focSG1K1JHP1nWBg5t0WJDLJKidsiWCKt WrFtiTMD6teDXgzxAZZglJUiqBQ7n/njb133HxS/bpUWzw7FQOkZMWTy4Ge5jSxxC4 F/MDM7wN13pgyKx28EeCyTzs0Evj5OYP6VPVXegol8vGyMBYGPP6L7naMvbsREHvOc TobiYzMmqEEssPkwCRCM7ye3cfxnxmGL7cgOhcCsuo2jn9gyuAP96bLMh/Qy5n6HNO iK//aO0dgGJQA== Message-ID: <77a67ec1-2b32-0e86-3714-9b2600691c18@bastelstu.be> Date: Tue, 7 Jun 2022 17:24:32 +0200 MIME-Version: 1.0 Content-Language: en-US To: Go Kudo , internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [Vote] Pre-vote announcement for Random Extension 5.x From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 5/31/22 11:54, Go Kudo wrote: > - More detailed description in RFC > a) For the Random\Engine interface I suggest to clarify that the returned bytestring will be interpreted as a little endian integer. b) I'm still missing an explanation of the guarantees the Randomizer implementation will make (last bullet point in https://externals.io/message/117295#117299). To me the guarantees is the most important thing about this RFC. As a user of the API I need to know what of the behavior can and what cannot change in future PHP versions. I don't really care whether the RNG is PCG64 or some Xoshiro. Both are great. The Engine part is pretty solid: They implement a well-defined RNG and any numbers are returned as little endian integers (see (a)). Either the implementation is correct or it is not. This is not likely to change in the future. However the Randomizer part is pretty undefined: As an example: ->getInt() will return an integer uniformly selected from the given range. But there's more than one way to perform this uniform selection. Will the algorithm stay the safe in future PHP versions? There are more examples in my previous emails. Best regards Tim Düsterhus