[PHP-DEV] Re: RFC [Discussion]: Randomizer Additions

2022-11-07 Thread Joshua Rüsweg via internals
Hi You can find the RFC at: https://wiki.php.net/rfc/randomizer_additions Proof of concept implementation is in: * https://github.com/php/php-src/pull/9664 * https://github.com/php/php-src/pull/9679 we believe we resolved all open questions with the RFC and there was no recent feedback wit

Re: [PHP-DEV] RFC [Discussion]: Randomizer Additions

2022-10-28 Thread Joshua Rüsweg via internals
Hello! [As Larry kindly pointed out to me, I only sent the email to Larry and not to the mailing list.] "Alphabet" here still, to me, implies a character set, not a byte stream. Maybe getBytesFromString? getBytesFromList? getBytesFrom() (because you're getting it "from" the string that's

[PHP-DEV] Re: RFC [Discussion]: Randomizer Additions

2022-10-28 Thread Joshua Rüsweg via internals
Hi You can find the RFC at: https://wiki.php.net/rfc/randomizer_additions Tim Düsterhus and I have updated the RFC and have broadly adopted the proposals. Firstly we have renamed the `getBytesFromAlphabet` to `getBytesFromString` as Larry Garfield suggested. Secondly, we have extended t

Re: [PHP-DEV] RFC [Discussion]: Randomizer Additions

2022-10-15 Thread Joshua Rüsweg via internals
Hi For completeness, it would be good to have nextBool() as well. I'm just wondering if that's really necessary. Generating a boolean is trivial with the nextFloat method (see example 1. Simulate a coinflip from the RFC). No, IMO. Mathematically it doesn't really make sense and talking abo

[PHP-DEV] RFC [Discussion]: Randomizer Additions

2022-10-13 Thread Joshua Rüsweg via internals
Hi Tim Düsterhus and I have created an RFC to add new methods that solve commonly encountered use cases to \Random\Randomizer. Specifically creating a random string consisting of specific bytes and generating random floating point values. You can find the RFC at: https://wiki.php.net/rfc/ra

[PHP-DEV] Pre RFC - Additions to the randomizer

2022-10-05 Thread Joshua Rüsweg via internals
Hi I would like to introduce a new method for the new Randomizer class [1]. I would like to have a function that generates a random string for me based on a given alphabet. This function is useful as a building block, as many use cases require generating random strings with a specified list o