[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Patch to use better PRNG on BSD's
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] Patch to use better PRNG on BSD's |
Date: |
Wed, 11 Apr 2012 09:27:20 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Apr 11, 2012 at 08:49:32AM +0300, Timo Myyrä wrote:
> Ah, I checked the manual pages of NetBSD-current and it lists
> arc4random_uniform.
Now that's odd, I checked online as well but there was none:
http://netbsd.gw.com/cgi-bin/man-cgi?arc4random_uniform++NetBSD-current
> Apparently its not in the current release versions, my bad.
No problem!
> > I think a cleaner and more robust way is to actually put a PRNG inside
> > Chicken itself. That way all platforms benefit from a good random
> > generator instead of it being a hit-and-miss situation. Chicken ought
> > to provide as good an abstraction over nasty annoying OS details as it
> > can.
>
> Whats the problem of using hosts PRNG. I'd assume every host OS would
> have decent PRNG.
We'd need to add different calls for each supported OS with many
#ifdefs. That makes debugging very hard, since if some OS has problems
it's hard to reproduce in another OS. With one canonical implementation
we can know what the performance and statistical behavior of the
implementation are. This can then be guaranteed for all OSes.
And I'm not so sure the assumption that every OS has a proper PRNG is
even valid.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
- [Chicken-hackers] Patch to use better PRNG on BSD's, Timo Myyrä, 2012/04/10
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, Peter Bex, 2012/04/10
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, John Cowan, 2012/04/10
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, Peter Bex, 2012/04/10
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, Jim Ursetto, 2012/04/10
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, Timo Myyrä, 2012/04/11
- Re: [Chicken-hackers] Patch to use better PRNG on BSD's, John Cowan, 2012/04/11
Re: [Chicken-hackers] Patch to use better PRNG on BSD's, Aleksej Saushev, 2012/04/14