[NCLUG] Python v.s. Ruby, and PRNGs

Stephen Warren swarren at wwwdotorg.org
Thu Apr 10 09:27:25 MDT 2008


On Thu, April 10, 2008 12:19 am, Chad Perrin wrote:
> Considering that both Ruby and Python use the Mersenne Twister as PRNG
> algorithm, it's not surprising that they end up with roughly equivalent
> results for apparent randomness

Makes even more sense then!

Sean is looking into /dev/random numbers. I also wanted to try the C
library's rand() function, but it seems like that isn't currently exposed
in Python; I guess the random module is preferred. I'll see if I can hook
into it using ctypes if I get time.




More information about the NCLUG mailing list