Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118251 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3080 invoked from network); 12 Jul 2022 10:27:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Jul 2022 10:27:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DF587180544 for ; Tue, 12 Jul 2022 05:21:40 -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-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (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 ; Tue, 12 Jul 2022 05:21:40 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id 75so12341398ybf.4 for ; Tue, 12 Jul 2022 05:21:40 -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=vmTcxMPkxSU/9oq038TGgBuGu/85rSm+VNjNw9XHQYY=; b=EjpVAYxFZ3CYQctF/Acuml+7BSu7Kg4ymQyWBB40K9+/cP/T8AMxc1FQ2N75nv9Tvu gpQXNLmCNcT9TJhuxvtrOCykcwhtD7SEye5uqBsuUTbxFnK+S+QVKifoxgjFUnfCpRSc X9fwkxs2knFdG70vF7MH7i04e57xz5hbiGc97Jet6rUQaCYHe64cxJ5l5P5F4IFWWIvE cFaabDeUNtd9JkMM6H6R6k/avnh+L5b1tV81YnDlCweNAod64AbUxOGRttfy2mqoGaQm rOX/uHw2uJie9Yc2KMAa7bB7XA2bO42sukWkPSqF0P0vL9XJmnBlBC2J3WPsiLh445Wb jrnQ== 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=vmTcxMPkxSU/9oq038TGgBuGu/85rSm+VNjNw9XHQYY=; b=SSCl+mOsHEV+buQ0FSrtj4dl6nbarexl0NGpW9XevwBYLdzCDnUVrzOUxttHBIL/uX kGy91SCR8P/ZqfVjWtSx7kwlCi8G5TsLnJ9E+mY53r/5ts/peHPVekTsSTxoyg7Wm2iT FmM9saXX16mGvu+FIWFDIsTvcSKnGITA+7lyYfaJhOZPBsHL73vA/Goa+ADipX1Rj3V+ WFyHhOHXeCB2ZGcu/cnJBo85E79w7WLRzW+ugRPPyC9rbnFTIXnBckp0eT+2a+1ktt6F PYthKXg8tLCRFSEHyeW20jhJhiXOmUaQLAEOnlFiJSGhL4wobykH8syI1lXmtE5LNIUR iXWg== X-Gm-Message-State: AJIora+h5BaoPcwD+gL9hsqI2o4rdt0qMH/NJZOf/zDl6b68BCciVVQL 8foZZe+nqa7Siez/NJc6nO4u/ZOe+REauejRDE2/ X-Google-Smtp-Source: AGRyM1srsHnL8Bx66UDgnqCSRg5ouhwW65rFAKcVB+tEqOsvbWCVox5yqQ2uIVNUtxDQUFcgWrT++6rPTxeeUYlwbdY= X-Received: by 2002:a25:2f87:0:b0:66f:1147:766b with SMTP id v129-20020a252f87000000b0066f1147766bmr11437932ybv.566.1657628499737; Tue, 12 Jul 2022 05:21:39 -0700 (PDT) MIME-Version: 1.0 References: <9dc8105d-a26e-18e7-a858-a6360e78b1a6@bastelstu.be> In-Reply-To: <9dc8105d-a26e-18e7-a858-a6360e78b1a6@bastelstu.be> Date: Tue, 12 Jul 2022 21:21:29 +0900 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000e5998105e39ab52f" Subject: Re: [PHP-DEV] [VOTE] Random Extension Improvement From: g-kudo@colopl.co.jp (Go Kudo) --000000000000e5998105e39ab52f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2022=E5=B9=B47=E6=9C=888=E6=97=A5(=E9=87=91) 1:44 Tim D=C3=BCsterhus : > Hi > > On 7/7/22 17:52, Go Kudo wrote: > > Implementation is now proceeding. > > It includes fixes to some of the issues that were pointed out previousl= y. > > > > https://github.com/php/php-src/pull/8094 > > > > `Randomizer::arrayPickKeys()` is currently not implemented for now, sin= ce > > it is most likely to be rejected. > > (Of course, we are ready to revert to the other items if they are also > > rejected.) > > > > I want to see if it looks good to you. > > I've reviewed the current implementation of the engines with a specific > focus on the tests. > > 1. I have verified the Xoshiro256** tests against a pure PHP > implementation (which I verified against the C reference implementation > [1]). > > 2. I have verified the Pcg64OneseqXslRr64 pcgoneseq128xslrr64_value.phpt > test against the reference C implementation [2] with the attached > pcg-verification.c. > > 3. I have verified the Mt19937 mt_value.phpt test against the C++ > standard library implementation [3] with the attached mt-verification.cc. > > The three engines do what they are supposed to do. I'm not qualified to > review with regard to PHP Internals best practices. It would be good if > someone with the necessary expertise could proceed with that part of the > review. > > Best regards > Tim D=C3=BCsterhus > > [1] https://prng.di.unimi.it/xoshiro256starstar.c > [2] https://www.pcg-random.org/download.html#c-implementation > [3] > https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine Hi Tim. Sorry for the late reply. Thanks for the verification. I changed the serialization format to hex string as you pointed out earlier. You should now be able to validate your PHP implementation. Regards, Go Kudo --000000000000e5998105e39ab52f--