Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Random numbers are not random enough on Windows

by BrowserUk (Patriarch)
on Oct 28, 2009 at 13:36 UTC ( [id://803674]=note: print w/replies, xml ) Need Help??


in reply to Re: Random numbers are not random enough on Windows
in thread Random numbers are not random enough on Windows

I know that one shouldn't use the built-in PRNG for any 'serious' work...

And that's pretty much why the MS C built-in PRNG has never been improved. If they improved it sufficiently that it was no longer glaringly obvious that it is useless, then someone, and probably many someones, would try to use it for critical purposes and then blame them when it all came unravelled.

And whilst I've never seen it written anywhere, that might also be a good reason for Perl not providing a better PRNG built-in. If it is sufficiently better to be worth while including, someone is going to assume it is sufficient for purposes for which it isn't.

That said, it would be nice to have a good--in the simulation sense rather than the crypto sense--PRNG as a part of the core. Preferably such that if enabled through a use (or pragma), and seeded with a known value, it would produce consistant sequences across platforms. It would be a considerable boon for testing purposes.

The MT would probably do that, but would forcing the users to explicitly select it for use be sufficient to prevent the blame game when people use it for the wrong purposes?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Random numbers are not random enough on Windows
by Anonymous Monk on Oct 28, 2009 at 15:53 UTC
    Why not just go around crippling all kinds of methods on Linux in addition to Windows, just so that it is painfully obvious that no one should try to do anything with any built-ins? Clearly doing a shabby job is not the answer.
      Why not

      Why? What purpose would that serve?

      just go around crippling

      Who? Me? You? MS? Everyone? Retroactively?

      all kinds of methods

      Just PRNGs? What else would you include?

      on Linux in addition to Windows

      What about Solaris? HP? z/OS?

      just so that it is painfully obvious that no one should try to do anything with any built-ins?

      are these Perl built-ins you are talking about?

      Clearly doing a shabby job is not the answer.

      "the answer" to what?

      Are you attempting to critique MS for the PRNG in their C runtimes?

      Or the Perlish authors for not correcting it?

      Or me for suggesting that maybe the MT PRNG could be added to the core; even if only as an "approved extension" if it was felt adding it as a built-in carried some kind of risk?

      You display muddy thinking, perhaps the reason you chose to post anonymously.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://803674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found