Re: Pike 8.0 beta

Marc dirix <[email protected]>
Newsgroups gmane.comp.lang.pike.user,gmane.comp.lang.pike.devel
Message-ID <CAERi-x38PMe49YOrqWgQeQAw612YP_Ct3R5DWRHoyz9jUhbA_g@mail.gmail.com>
FWIW, in Matlab "rand" always generates a pseudo-random-sequence using the
same random numbers. After a Matlab restart the output of rand is exactly
the same. I often rely on it to return the same numbers when the a script
is executed twice. (Using rng('default') the sequence can also be restarted
from the beginning during script execution).

As such I would also like for pike to have a simillar pseudo random number
generator, where random_seed() (or any other name) should always return the
same sequence at either 1. fresh start of pike 2. given a specific seed.

/M


Op ma 4 jan. 2016 om 18:28 schreef Lahtinen Kimmo (Valtori) <
[email protected]>:

>
> I think I can understand the need for your request, but I am wondering is
> the random function correct for that kind of purpose. I think the main
> function is to generate random sequence and more random is better. I think
> the random seed was invented to solve the problem of not enough randomness?
>
> Kimmo
>
> I'd say it would be prudent to switch to a predictable
> pseudo-random-sequence as soon as someone has called random_seed() with a
> non-zero parameter.  If random_seed() is not being called, then it does not
> matter, and faster and more random is better.
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.