Hello Nikita.
> In addition to the functions you already list, I'd add
>function rng_bytes(RNGInterface $rng, int $length): string;
>function rng_between(RNGInterface $rng, int $min, int $max): int;
Certainly these are useful. I've added this to the RFC in TypeC.
> Just to share another
On Tue, Jan 5, 2021 at 6:40 PM Go Kudo wrote:
> Thanks Nikita.
>
> Thanks for the input. This looks like a very smart solution.
> I've edited the RFC and added a new proposal as TypeC.
>
> https://wiki.php.net/rfc/object_scope_prng
>
In addition to the functions you already list, I'd add
Thanks Nikita.
Thanks for the input. This looks like a very smart solution.
I've edited the RFC and added a new proposal as TypeC.
https://wiki.php.net/rfc/object_scope_prng
However, I have a couple of concerns. The first is that users will have to
be careful with RNG instances (for better or
On Thu, Dec 24, 2020 at 5:12 PM zeriyoshi wrote:
> I updated the RFC draft and changed it to a proposal to bifurcate the
> interface.
>
> https://wiki.php.net/rfc/object_scope_prng
>
> At the same time, I was looking into the RNG problem in Swoole and found
> out that the problem was actually
On 01.01.21 20:22, Go Kudo wrote:
> Hi Marc, and sorry for the late reply. Email has been marked as spam...
>
>> I would expect the Random number generator to implement from Iterator
> using an integer for current() value
>> and providing utility functions (simple functions or methods of another
Unfortunately, there is not much feedback on this proposal.
To remedy the situation, we have updated the RFC and implemented it.
https://wiki.php.net/rfc/object_scope_prng
https://github.com/php/php-src/pull/6568
Currently, it seems to work generally as expected, although it has failed
to be
Hi Marc, and sorry for the late reply. Email has been marked as spam...
> I would expect the Random number generator to implement from Iterator
using an integer for current() value
> and providing utility functions (simple functions or methods of another
class) for shuffle, random array entry
Hi zeriyoshi,
On 23.12.20 14:41, zeriyoshi wrote:
> Thanks tyson.
>
>> This would also make it easier to use those generators in brand new
> algorithms that weren't in the initial RFC.
>> (or in algorithms written by users in PHP)
> This suggestion seems to make sense. Maybe the RNG should only
I updated the RFC draft and changed it to a proposal to bifurcate the
interface.
https://wiki.php.net/rfc/object_scope_prng
At the same time, I was looking into the RNG problem in Swoole and found
out that the problem was actually occurring.
https://www.easyswoole.com/En/Other/random.html
The
Thanks tyson.
> This would also make it easier to use those generators in brand new
algorithms that weren't in the initial RFC.
> (or in algorithms written by users in PHP)
This suggestion seems to make sense. Maybe the RNG should only focus on
generating random numbers and not anything else.
HiĀ Go Kudo,
**A possible alternative that is widely used in other programming languages is
to limit the interface API to only generating bytes/integers,**
and to provide global functions that would use generic random number generator
objects (from internal or user-provided code) in their
Thanks. I have edited the RFC based on your question.
> Method names: you don't need to emulate the conventions from non-OOP
code, e.g. string_shuffle() --> strShuffle and array_rand() -->
arrayRand(). Use a more naturally readable convention like shuffleString().
As mentioned in the RFC, it is
On Sun, Dec 20, 2020 at 6:45 AM zeriyoshi wrote:
> Thanks cmb. I have created a first draft of an RFC. I think I've covered
> all the necessary requirements, but I'd like to know if there are any
> problems.
> https://wiki.php.net/rfc/object_scope_prng
A few IMHO comments:
* Namespaces are
On 20.12.2020 at 04:45, zeriyoshi wrote:
> On 19.12.2020 at 11:26, Christoph M. Becker wrote:
>
>> RFC karma granted. Best of luck with the RFC! :)
>
> Thanks cmb. I have created a first draft of an RFC. I think I've covered
> all the necessary requirements, but I'd like to know if there are any
On 19.12.2020 at 11:26, Christoph M. Becker wrote:
> RFC karma granted. Best of luck with the RFC! :)
Thanks cmb. I have created a first draft of an RFC. I think I've covered
all the necessary requirements, but I'd like to know if there are any
problems.
On 19.12.2020 at 07:33, zeriyoshi wrote:
> On Wed, Dec 16, 2020 at 8:46 AM zeriyoshi wrote:
>
> I have created an account on the PHP.net wiki to create an RFC about this.
> Can you grant me editing privileges?
RFC karma granted. Best of luck with the RFC! :)
Christoph
--
PHP Internals - PHP
On Wed, Dec 16, 2020 at 8:46 AM zeriyoshi wrote:
Hello.
I have created an account on the PHP.net wiki to create an RFC about this.
Can you grant me editing privileges?
As for suggestion two, I sent a PR to php-src on GitHub.
https://github.com/php/php-src/pull/6520
Fortunately, Nikita seems
17 matches
Mail list logo