[PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-27 Thread Go Kudo
2022年6月14日(火) 9:01 Go Kudo : > Hello internals. > > Voting began on 2022-06-14 00:00:00 (UTC) and will end on 2022-06-28 > 00:00:00 (UTC). > > https://wiki.php.net/rfc/rng_extension > > The implementation is not yet complete and has some issues. > See TODO in Pull Request for details. > >

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月18日(土) 4:16 Tim Düsterhus : > Hi > > On 6/17/22 20:37, Go Kudo wrote: > > For the reasons stated above, we will abandon the addition of new > methods. > > sorry. > > Okay, that's fine for me, no problem. > > > `str_shuffle()` and `shuffleString()` already have similar problems. So > >

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Tim Düsterhus
Hi On 6/17/22 20:37, Go Kudo wrote: For the reasons stated above, we will abandon the addition of new methods. sorry. Okay, that's fine for me, no problem. `str_shuffle()` and `shuffleString()` already have similar problems. So perhaps an alternative method name for `str_shuffle()` might be

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月18日(土) 3:13 Tim Düsterhus : > Hi > > On 6/17/22 19:46, Go Kudo wrote: > > I was fundamentally wrong, I understand now. > > As you said, there was no interoperability with `pickArrayKey()` in the > > first place... > > > >> stringFromAlphabet() > > > > Hmmm. I guess randomString would be

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Tim Düsterhus
Hi On 6/17/22 19:46, Go Kudo wrote: I was fundamentally wrong, I understand now. As you said, there was no interoperability with `pickArrayKey()` in the first place... stringFromAlphabet() Hmmm. I guess randomString would be better then. At the same time, it would be nice to have an array

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月18日(土) 2:37 Tim Düsterhus : > Hi > > On 6/17/22 19:28, Go Kudo wrote > >> I don't think that ->pickString() is a good name > > > > I see. But I think `randomString()` is ambiguous with `getBytes()`. > > > > `stringFromCharset(string $string, int $num): string` solves that, but I > > think

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Tim Düsterhus
Hi On 6/17/22 19:28, Go Kudo wrote I don't think that ->pickString() is a good name I see. But I think `randomString()` is ambiguous with `getBytes()`. `stringFromCharset(string $string, int $num): string` solves that, but I think it is possible that the meaning of "char" is not well known

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月18日(土) 2:14 Tim Düsterhus : > 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

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Tim Düsterhus
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

[PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月14日(火) 9:01 Go Kudo : > Hello internals. > > Voting began on 2022-06-14 00:00:00 (UTC) and will end on 2022-06-28 > 00:00:00 (UTC). > > https://wiki.php.net/rfc/rng_extension > > The implementation is not yet complete and has some issues. > See TODO in Pull Request for details. > >

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Tim Düsterhus
Hi On 6/17/22 14:52, Go Kudo wrote: (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.)

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月16日(木) 22:37 Tim Düsterhus : > Hi > > On 6/16/22 14:52, Tim Düsterhus wrote: > > (3) Naming of PCG64: > > > > I must admit that the fact that PCG is a full family of similar, but not > > identical generators is one thing that made me (and still makes me) > > prefer the xoshiro family which

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-17 Thread Go Kudo
2022年6月16日(木) 19:56 Guilliam Xavier : > Hi, > > > https://wiki.php.net/rfc/random_extension_improvement > > Thanks; some editorial remarks: > > - I think "Engine is not final" should rather be "Engine > implementations are not final", and similarly in the text: "Even if > the native class is

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-16 Thread Tim Düsterhus
Hi On 6/16/22 14:52, Tim Düsterhus wrote: (3) Naming of PCG64: I must admit that the fact that PCG is a full family of similar, but not 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

Re: [PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-16 Thread Tim Düsterhus
Hi On 6/16/22 12:14, Go Kudo wrote: If the content is acceptable, we would like to change the status of the RFC to Under Discussion and make an announcement thread to internals ML. Can anyone review the content? (1) Engines should be final: That was my suggestion and that paragraph looks

[PHP-DEV] Re: [RFC] [VOTE] Random Extension 5.x

2022-06-16 Thread Go Kudo
2022年6月14日(火) 9:01 Go Kudo : > Hello internals. > > Voting began on 2022-06-14 00:00:00 (UTC) and will end on 2022-06-28 > 00:00:00 (UTC). > > https://wiki.php.net/rfc/rng_extension > > The implementation is not yet complete and has some issues. > See TODO in Pull Request for details. > >