Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118069 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16032 invoked from network); 23 Jun 2022 09:29:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jun 2022 09:29:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C653D180384 for ; Thu, 23 Jun 2022 04:18:53 -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,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 23 Jun 2022 04:18:52 -0700 (PDT) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-3176d94c236so190808607b3.3 for ; Thu, 23 Jun 2022 04:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=colopl.co.jp; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=wJo8DgjdweX9t+8J6h9fDOCIvPZCHX7Cajzm0+gjPuI=; b=NP4gIXkb4rwnwPj3y2CJIyAWRInMzL/mPQpUeLLJlPSTQ5kSawcy2DWvw2+KNE27TM XZ+fuFk66UJuhToizfvq8QuU2/PNy+frcpHr3HMFLmm3uSdZ2hq0cIdeteAZbkm+KjRw 7niEwdrvdxLjDF/iU+KsSlSIEv3rGgNy1+1AJ4YnLICvUDuaX1ck3VW1KrONAUFnHNXi MCExfM2Kz80+rOeb+kVL20y6Okrjn18k+JrsM0DKN8rXMKVYYcLFGhdh8UEp1Atnj/1K MxAY47uPY1ABotA/klFNHl5Khi1vlMV3ehsyGkFdmFGCyS1ptOYFWPgZaXSKI0ZX9skJ rARQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=wJo8DgjdweX9t+8J6h9fDOCIvPZCHX7Cajzm0+gjPuI=; b=su1leOMlJhzs6hgOfQ822/Ww3PsDZkFRs2dP63hQ3hSs27Q6M/FKOnCZts6kRAcW2D Ron8uPHmRyUJ3RvoE579ZTiq7QUQUzssnEJg2ze9oMgiV5yuhxsQcLehFmNp1iFUffCE beuV67wKgPR131nyiIGiPuxiRFw17U+6Giul6TrxDGpVbzkMKKRU2MIP6dWHJddbJhTf 70hl+x05Uv0+Ddw9k9vBGfCZom0Upm9IBNExwseE1JYJWvmw05G6pM65zhHX//qd9s5p z0maTukdHhSqm2lx94xWvn2eniVtXfE6RH9GB1xMt46BFcPh9xeWaheDMB21mUoYqUv0 lurA== X-Gm-Message-State: AJIora8UhFygLa8KYQBpjoQ1fv/KQIGvmShb3XTki2QoAJ9uP7vwB5sb WbLZK4a4FYd6/rnWtCkvyzQIRIHMadJzkiFdpTRL/vj65G9UNBilag== X-Google-Smtp-Source: AGRyM1sgeqtXbw8PbJUjIvnUSu8Gjj+oyE9OAk59UPB+4nQlO9wFtHKfrqZfj3TtCOPvNF55NDy080ZK8Opl302DcBw= X-Received: by 2002:a0d:cc0f:0:b0:317:9c38:a0a6 with SMTP id o15-20020a0dcc0f000000b003179c38a0a6mr10004839ywd.58.1655983132305; Thu, 23 Jun 2022 04:18:52 -0700 (PDT) MIME-Version: 1.0 References: <2dde46be-bc0d-b0dd-90d9-1128757cfe82@bastelstu.be> In-Reply-To: <2dde46be-bc0d-b0dd-90d9-1128757cfe82@bastelstu.be> Date: Thu, 23 Jun 2022 20:18:41 +0900 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000005b01ed05e21b9e5c" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Random Extension Improvement From: g-kudo@colopl.co.jp (Go Kudo) --0000000000005b01ed05e21b9e5c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2022=E5=B9=B46=E6=9C=8823=E6=97=A5(=E6=9C=A8) 0:02 Tim D=C3=BCsterhus : > Hi > > On 6/22/22 16:35, Go Kudo wrote: > > No additional comments seemed to be forthcoming, so the RFC was upgrade= d > to > > 1.5. > > The following changes have been made > > > > https://wiki.php.net/rfc/random_extension_improvement > > > > 1. Add: `Refine classnames` > > 2. Add: `Random\SerializableEngine is outdated` > > 3. Add `Add Randomizer::pickArrayKeys(array $array, int $num): array > > method` *1 > > 4. Add `Random\SerializableEngine is outdated` > > 5. Remove: `PCG64 is ambiguous` (replaced by 1) > > 6. Remove: `Mersenne Twister is ambiguous` (replaced by 1) > > 7. Remove: `Randomizer lacks array_rand() replacement method` (replaced > by > > 3) > > > > *1: Added with a little sample code. > > Thank you for the update. The grouping makes sense to me and it looks > very organized. > > Let me just propose some wording changes: > > a) > > > Random\SerializableEngine is outdated > > I would rename the headline to "Random\SerializableEngine is not > useful", that's a little more fitting. > > b) > > > CombinedLCG is outdated > > I would rename the headline to "Random\Engine\CombinedLCG is low > quality", that's a little more accurate. > > c) > > In the "Refine classnames" section: > > > To make it more readable and regular, the class name is changed as > follows: > > I would reword this as: > > To clearly identify the implemented algorithm the PCG64 and > MersenneTwister twister engines should be renamed to their canonical > upstream name: > > The issue with the previous wording is it's not clear what "more > regular" means. > > d) > > For the vote titles I propose the following changes for a more > consistent wording that succinctly describes the change to avoid voter > confusion: > > Engine implementations to final > to > Make all implemented engines 'final'? > > Remove Random\SerializableEngine > to > Remove the SerializableEngine interface? > > Drop Random\Engine\CombinedLCG > to > Remove the CombinedLCG engine? > > Add Random\Randomizer::pickArrayKeys(array $array, int $num): array > to > Add the pickArrayKeys() method to the Randomizer? > > Rename Random\Randomizer::shuffleString() to > Random\Randomizer::shuffleBytes() > to > Rename Randomizer::shuffleString() to Randomizer::shuffleBytes()? > > Change classnames > to > Rename PCG64 and MersenneTwister? > > Implement Random\Engine\Xoshiro256StarStar > to > Add the Xoshiro256StarStar engine? > > Best regards > Tim D=C3=BCsterhus > Hi Tim Thanks for the suggestion! It looked much better to me and I have reflected it in the RFC. "Remove the CombinedLCG engine?" replaced by "Remove the CombinedLCG class?". The reason is that the implementation will still remain for backward compatibility. (only the class will be removed). Regards Go Kudo --0000000000005b01ed05e21b9e5c--