Re: Pike 8.0 beta
"Stephen R. van den Berg" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.devel,gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAHzxr=N5jEkmQquReV-U_AhWvrMEJ0fdZ4bf4mjnP9VuyCOiaQ@mail.gmail.com> |
On Mon, Jan 4, 2016 at 7:33 AM, Lahtinen Kimmo (Valtori) <kimmo.lahtinen-N3IFWEfzI/[email protected]> wrote: > 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? Historically, the random() function has always served a dual purpose (if that is a good thing, is debatable). This was due to the fact that it always used to be gemerated by a pseudo-random-generator. So historically, the expectation is thus: a. When not setting random_seed(), simply generate the best random sequence you can, preferably different for each run. b. random_seed() was never intended to increase randomness, instead it was used to generate predictable random sequences in order to get repeatable results when needed. That random_seed() was intended to increase randomness is a common misconception though. -- Stephen.