Hi all,<br><br>I've not been very good at keeping up with my reports. Here's some random stuff to assuage my guilt...<br><br>Linux random devices. We talked about /dev/random and /dev/urandom. The difference being simply that urandom doesn't wait for there to be enough entropy in the pool before continuing, so it's pseudo-random. random OTOH, does wait. Sounds pretty abstract but you can actually view it.<br>
<br>You can view the amount of entropy in the pool with:<br><br>cat /proc/sys/kernel/random/entropy_avail<br><br>The shuf command randomly picks something from a file, and you can specify its random source, so if you do:<br>
<br>while true; do cat /proc/sys/kernel/random/entropy_avail; shuf -n 1 /usr/share/dict/words --random-source=/dev/urandom; done<br><br>You'll see it churn through the dictionary file and you'll see that the number in entropy_avail never really drops. Compare with:<br>
<br>while true; do cat /proc/sys/kernel/random/entropy_avail; shuf -n 1 /usr/share/dict/words --random-source=/dev/random; done<br><br>(which is exactly the same except using "random" instead of "urandom"). Note the number drops and it stops when it runs out. If you want it to continue, try wiggling your mouse about!<br>
<br>On the subject of randomness, we also had a brief mention of Bell's Theorem:<br><br><a href="http://en.wikipedia.org/wiki/Bell%27s_theorem">http://en.wikipedia.org/wiki/Bell%27s_theorem</a><br><br>Cheers, Seumas<br clear="all">
-- <br>Seumas Mackinnon<br>"It is in truth not for glory, nor riches, nor honours that we are fighting,<br>but for freedom -- for that alone, which no honest man gives up but with <br>life itself." -- Declaration of Arbroath, 1320 <br>