On Tue, 25 Feb 2003, gabriele renzi wrote:

> It seems to me that I noticed something about this thing in your web
> site.
> Could we hope you just did some work and could integrate it with the
> actual MT implementation?
>
Yes, most of the needed code is in RandomR. Needs to be integrated with
random.c in ruby src though.

> Having a PRNG class would be cool, and marshaling ( seen has
> seed-saving) would be good too.
> It would even be cool to have a choice, cause (I seem to remeber)
> that MT is not a *secure* algorithm.
>
> And..  this hypotethical module could support underlying OS's RNG
> (at least on some ) ..
> We could benefit of powerful alghoritms on modern OSes, such as Yarrow
> , and even get the fast native implementation.
>
Yarrow is much too complex for the ruby src distribution imho (needs
lots of code for crypting state etc). But sure, a natural consequence
of objectifying mt is that we could make it pluggable (ie rand calls
 $DEFAULT_RNG.rand
and srand(s) does
 $DEFAULT_RNG = $DEFAULT_RNG_CLASS.new(s)
).

Regards,

/Robert