Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115346 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64122 invoked from network); 7 Jul 2021 12:19:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jul 2021 12:19:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B2D1D1804D0 for ; Wed, 7 Jul 2021 05:41:36 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 7 Jul 2021 05:41:36 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id p21so3762675lfj.13 for ; Wed, 07 Jul 2021 05:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZrhFlsCW6fCG/5JAY2Qy/ngWp2kBMeBRS4/+KyKwp84=; b=g8jCcR7wmJY7NOH0FEKMPUZzrxkv5DvoimkjHdSnFsKTgTSBIfq43FB6JeaRWvGuQg cafi6YhB8+C6JSRVt1t3trvYCk18ns0eDCT64khg6KRFxQZ7R1UEVp8GAAupnbYm1vKz poiuff1HOz3VYSPa1f4bE4K5pVGM43B1UhER3dbhr56ptmYcafbMEUEHS/pbcFo+xQHc Mofor6616dm3hrvTG+ijkb8zECDizSZRtHEFd/pKcCQz/h5X6/YmSpqaN7jOpDs/+kWt slCyJpJ5HF8nifmBhnAwt1uUPNjWifU04za0mYWg9+09ABrPjj5nlqyD0L5yevVLtMx2 lEGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZrhFlsCW6fCG/5JAY2Qy/ngWp2kBMeBRS4/+KyKwp84=; b=BH1ZXc6+1EQuglCXoI8JVI3mc6+HelTmwTU0NbSB5keVRe/8uzGxC02cJzH8erYWZ5 01hvBPR36kIUOSxxzQEvx5pI9IalDPUDH558+YgCIbBXjc3+lSxcppRqeaZQcFA8iFM7 JmSSzU8CGErrKSjpkdq7RJ5H7rv3MAOqxTBUgH1YDpg7InLA2ioRtRM/+T+MjXfuUOmj aX/WJGW3swx3dD4juiUKNFONl4bUQFKZL8JaPdBfXftVRa4HP8UkuCAOKh/v1A3TeG03 1dSUOJ8qMPfPB3zfpF1jMfDPObiHZoAVvF5FRh/jb7FAKr3mQ67gspuDpUAdTThsOXf3 HM9w== X-Gm-Message-State: AOAM530ahb7JorxdzH9Ns5GYutommKK+5T/7h+OUuC1UH/LQi50+AlvB ha+VW7/PN5q3fXuXNNDLGdmeaYv+zeE6Id445Jg= X-Google-Smtp-Source: ABdhPJw19byTDr+vEBUb2LQZEiFoII5Ew7l/BymC046L5Twc4ExpALDRbPbgQFXYJkerPHwPHUbacqONrLGEf3gX07w= X-Received: by 2002:a05:6512:50e:: with SMTP id o14mr17523366lfb.286.1625661693913; Wed, 07 Jul 2021 05:41:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 7 Jul 2021 14:41:17 +0200 Message-ID: To: Go Kudo Cc: PHP internals , Remi Collet Content-Type: multipart/alternative; boundary="000000000000ca6dbe05c687dbc5" Subject: Re: [PHP-DEV] [RFC] Add Random Extension (before: Add Random class) From: nikita.ppv@gmail.com (Nikita Popov) --000000000000ca6dbe05c687dbc5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 7, 2021 at 2:33 PM Go Kudo wrote: > Incidentally, what would be the preferred name for the ext/standard rando= m? > I was going to rename it to random_func, but I have a feeling that would > be controversial. > > - random_func.c / php_random_func.h / RANDOM_FUNC_G / > php_random_func_bytes() / php_random_func_int() > - std_random.c ... > - standard_random.c ... > > Which would be better? > We already have another php_rand.h header, so I think you can just merge them. Name of the C file shouldn't matter. Regards, Nikita > 2021=E5=B9=B47=E6=9C=887=E6=97=A5(=E6=B0=B4) 19:32 Nikita Popov : > >> On Tue, Jul 6, 2021 at 4:38 PM Go Kudo wrote: >> >>> > 1st >>> >>> This is to avoid conflicts with the implementation in ext/standard. I >>> don't >>> want to do it this way either, but I have to do it this way. >>> Since random in ext/standard does not use namespaces, I would like to >>> change the ext/standard side. >>> >> >> To clarify, are you referring to the php_random.h header in ext/standard= ? >> I agree with Remi that the extension should be in ext/random, not >> ext/random_ext. We can rename the ext/standard header. >> >> Alternatively, you could also use ext/rng, with names RNG\Random, >> RNG\NumberGenerator\XorShift128Plus etc. >> >> Regards, >> Nikita >> >> >>> > 2nd >>> >>> Although it goes back quite a long time, this implementation was >>> originally >>> based on an extension I submitted to PECL. >>> >>> https://pecl.php.net/package/orng >>> >>> After I posted this to PECL, I found that an object scope RNG had been >>> proposed in the past in the Internals ML, and there was positive feedba= ck >>> about it. >>> >>> https://externals.io/message/112525 >>> >>> However, the proposal never actually took place. This RFC is a >>> realization >>> of that proposal. >>> >>> Is that what you asked? >>> >>> Regards, >>> Go Kudo >>> >>> 2021=E5=B9=B47=E6=9C=886=E6=97=A5(=E7=81=AB) 22:46 Remi Collet : >>> >>> > Le 26/06/2021 =C3=A0 02:39, Go Kudo a =C3=A9crit : >>> > > Hello Internals. >>> > > >>> > > RFC has been reorganized for finalization. >>> > > >>> > > https://wiki.php.net/rfc/rng_extension >>> > >>> > 1st I dislike the name "random_ext", why this "_ext" part ? >>> > >>> > 2nd why not following the standard process ? >>> > >>> > 1/ publish on pecl >>> > 2/ merge in php-src if enough success and good feedback >>> > >>> > >>> > Remi >>> > >>> > -- >>> > PHP Internals - PHP Runtime Development Mailing List >>> > To unsubscribe, visit: https://www.php.net/unsub.php >>> > >>> > >>> >> --000000000000ca6dbe05c687dbc5--