Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117986 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53311 invoked from network); 17 Jun 2022 15:26:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2022 15:26:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 62AA4180506 for ; Fri, 17 Jun 2022 10:14:38 -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 ; Fri, 17 Jun 2022 10:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1655486076; bh=MwTVY5LhNu7UuVvHow7E2NFFfqmVtdxN2adJVua3s8Y=; h=Date:Subject:To:References:From:In-Reply-To:From; b=MQCK8ckzteLt/zSEcxHsGdSgsH33X4p2d7rop3yAqQg7QubOXRmJyK2giGqvw2C6r mvJpUmvxllccOGbIbDeC1gK2PxjkQ54gn2moiO9xq1l7I09fKOvCA4BXO5JhkpyeSA e8owmRZXfnJRT22Lr1anwfIZ+TlhoI757jnOGFEAn5w9OYN5VwJPcdvPSyIDPBQBGE b21k8P0Rv6EYEzNEaRPnSebY8enDd5l/BkxIuE2zu9ZPu2pk04m8GBQThJhgOH31ph r8p+rU34xFatWwOdExnN67o/cwiRFxIvYr3PYsHxEPDyZelVrFOc7DaBNPb4U686+s HdBKx1L41zUGQ== Message-ID: <77a64074-875c-cfd6-5811-24b9d445f550@bastelstu.be> Date: Fri, 17 Jun 2022 19:14:35 +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] Re: [RFC] [VOTE] Random Extension 5.x From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 6/17/22 19:04, Go Kudo wrote: > RFC has been updated. Includes corrections to areas pointed out by Tim and > changes MersenneTwister to MT19937. > I also made it possible to vote for each item. I suggest to split the "PCG is not so famous" vote into 2 votes to make it clear how exactly the majority is calculated and to have a clear primary vote as indicated in https://wiki.php.net/rfc/voting#required_majority > https://wiki.php.net/rfc/random_extension_improvement > > How about it? > > for Tim: > >> I believe you missed my suggestion (4) > > My apologies! I had completely missed that. > That new feature sounds good to me. But, I think the method name > `pickString()` would be better. (It is interoperable with `pickArrayKey()`) I don't think that ->pickString() is a good name, because it is not really comparable to pickArrayKey(): pickArrayKey() will return each key only once. It is more comparable to: substr($r->shuffleString('0123456789abcdef'), 0, 6) My proposed ->randomString() must be able to return a character multiple times. If you don't like ->randomString(), I have an alternative suggestion: ->stringFromCharset() Best regards Tim Düsterhus