Bug#537952: Use more random random seed than localtime

Don Armstrong don at donarmstrong.com
Tue Jul 28 16:26:43 UTC 2009


On Tue, 28 Jul 2009, gregor herrmann wrote:
> On Tue, 21 Jul 2009 16:03:48 -0700, Don Armstrong wrote:
> > Math::Random has its random number only based on localtime:
> 
> I'm a bit confused about the state of this bug/package; Don has
> provided a patch, Jonathan has committed it with, there was a
> discussion about some aspects of the patch between Don, Jonathan, and
> Damyan -- is there any consensus on how to proceed?

From where I sit, the prefered method to proceed is to:

1) Fix the test failures from the patch that I provided originally. [I
ran the tests, and it doesn't fail for me on amd64, ppc, or i386 so
I've no idea what failed.]

2) Require 5.8.1

alternatively, instead of #2, provide a fallback method to less-random
data in cases where Perl_seed isn't implemented as detailed in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537952#60 point #3
along with a warning (or use the implementation in
List::Util::shuffle()).

The current use of salph is suboptimal because it wastes entropy (and
does non-obvious things to the input data, which in the case of data
which is known to be uniform can be shoved directly into the two seeds
of rand.c.)

That said, I'm personally not too concerned if a different method is
chosen, as after examining the underlying code quality I plan on
migrating my code to GSL instead.


Don Armstrong

-- 
S: Make me a sandwich
B: What? Make it yourself.
S: sudo make me a sandwich
B: Okay.
 -- xkcd http://xkcd.com/c149.html

http://www.donarmstrong.com              http://rzlab.ucr.edu





More information about the pkg-perl-maintainers mailing list