Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117976 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15168 invoked from network); 17 Jun 2022 11:04:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2022 11:04:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 13C8F1804AF for ; Fri, 17 Jun 2022 05:52:51 -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-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (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 ; Fri, 17 Jun 2022 05:52:50 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-317710edb9dso41573397b3.0 for ; Fri, 17 Jun 2022 05:52:50 -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=LhyULMfTZkvK4kDF0Ui6CleqHpglMQC//dzX0WeGlGo=; b=cJ/M5Sh/1yLbWOBJDP3skHB+wwVTSNpjDqJ4pb4G7UaXaQdc8QhrGlNaEJAi30Jwps ww2ijXHWxy4T6aSMH5eQBEJHl/+bItTVIpmZri22fBbZix2BK8Z1UG8ZlkVCScucHIAS u0DF0CcusD+s+gJwe1MSkRxnewRFK5bVNgTUAGr+QWMhYTaTWprXjBLWut0w6iSVzjdK +BeVlZRFejRC9Lc5gNnoD6dtypujPDwd1cf8Sywdex33dJLLF9e3p2fm9SLInZ+SVzNJ cHf+2yXNTcOtwyV3vQj0Uc+zqrKqeREtn62S8tDMt6U2y1tYJIfpih+Pim5yzWR4G504 Y3MQ== 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=LhyULMfTZkvK4kDF0Ui6CleqHpglMQC//dzX0WeGlGo=; b=NnliWZiYJU48f6ixYLHSGn5QYtFVtmgKFKjq9+YM6P4x/58QO0S+D9X+8rqXML07NU zQvZb2NS2pL+1M5G8kUc1gt9D1M9V60lXi2K4xYFV30j1YwkJn69M8J1dVSo8qwSwmNx vTGv9n0gJZp6ePl0r1Qzp5FD3seNIJ4La5kVN1xVdaGRshqvji1VuDLTsoehWdMp45OU kTXj8ScPfZ5cFSInvJ7KzvDFpLNW9rLMIF7OVxkGH7UeIix2erzT62B5CLaIN2rJWpvy HE+b7MonnWj87HrmP+vpBPqLksWU9uDWoeVFSDdH0T66Ccb2knngI+GA3WxqT1PjF4RA 1sCA== X-Gm-Message-State: AJIora9eOnefbZIafGawqWZjmWGj2L6kJ89lAytgDsquq/qSsCcc5YdL 8MXNxky+ImyAvNirkoVMn2JWO61UGfeS3k5fLKZRm7R7VYo8ckQ= X-Google-Smtp-Source: AGRyM1uWhKgo3U6QnLnwY0oQb/P8OkRXOhtJ4UHhaDTiMFNK4qan8nVBw2K9n/rTPe1tZE/v023dUQD0X2eniEA49yg= X-Received: by 2002:a81:2594:0:b0:310:6b:47b0 with SMTP id l142-20020a812594000000b00310006b47b0mr11700764ywl.14.1655470369811; Fri, 17 Jun 2022 05:52:49 -0700 (PDT) MIME-Version: 1.0 References: <1717d744-b7df-b39d-f280-83283c11ec7b@bastelstu.be> In-Reply-To: <1717d744-b7df-b39d-f280-83283c11ec7b@bastelstu.be> Date: Fri, 17 Jun 2022 21:52:39 +0900 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000054454e05e1a43bc5" Subject: Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x From: g-kudo@colopl.co.jp (Go Kudo) --00000000000054454e05e1a43bc5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2022=E5=B9=B46=E6=9C=8816=E6=97=A5(=E6=9C=A8) 22:37 Tim D=C3=BCsterhus : > Hi > > On 6/16/22 14:52, Tim D=C3=BCsterhus wrote: > > (3) Naming of PCG64: > > > > I must admit that the fact that PCG is a full family of similar, but no= t > > identical generators is one thing that made me (and still makes me) > > prefer the xoshiro family which has clearer names for its variants. > > > > It was also pretty hard to find the PCG definitions on the PCG website, > > but I believe that it refers to this: > > > > https://www.pcg-random.org/using-pcg-c.html#low-level-api? > > > > In that case PCG64S would be consistent with the upstream high level AP= I > > name. I am not sure if Pcg64s would be more readable, though. > > > > It would definitely need a good explanation in the documentation which > > exact variant it is, though. > > I've now had a look at the Paper [1], because I wanted to find out what > the various bits and pieces within the full oneseq-128-xsl-rr-64 name > mean and in the paper I came across section "6.3 Specific > Implementations" which notes: > > > The library provides named generators based on > > their properties, not their underlying implementations (e.g., > pcg32_unique for a > > general-purpose 32-bit generator with a unique stream). That way, when > future family > > members that perform even better are discovered and added (hopefully du= e > to the > > discoveries of others), users can switch seamlessly over to them. > > This implies that the official Pcg64s name might refer to a different > implementation in the future. This makes it hard for PHP to keep the > compatibility guarantee that a specific engine will always refer to a > specific well-defined RNG. This implies that the engine needs to be > named "PcgOneseq128XslRr64" to accurately describe the implementation. > This - of course - is absolutely unwieldy. Note sure what the best > course of action is here. > > [1] https://www.pcg-random.org/pdf/hmc-cs-2014-0905.pdf > > Best regards > Tim D=C3=BCsterhus > Hello Tim Thank you for your continued support. (1) Thanks! (2) You are indeed correct. I renamed it to pickArrayKey(). (3) This is a very tricky problem. As you point out, it took me a while to figure out PCG64 too. However, after statistical testing PCG64 (pcg_oneseq-128-xsl-rr-64) seems to do a good job. (Though Xoshiro256** does as well, and has a more obvious name.) Regarding the naming issue, I have looked at implementations in other languages (Python's NumPy and Rust) and none of them seem to be very clear. I agree with you about keeping the names clear. Although it is complicated, I don't think anyone would be particularly bothered by the name PcgOneseq128XslRr64. However, some people may continue to use MT because they don't understand it well. I think the possible options are as follows A. Rename PCG64 to PcgOneseq128XslRr64 B. Rename PCG64 to PcgOneseq128XslRr64 and then re-implement the more obvious Xoshiro256StarStar C. Remove PCG64 and re-implement Xoshiro256StarStart Personally, I think B is the best. What do you think? Regards Go Kudo --00000000000054454e05e1a43bc5--