Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2014 14:21:10 +0800
From:      Chenguang Li <horus.li@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   On changing rand(3) to random(3) in awk(1)
Message-ID:  <F70B9462-0898-47EF-AF83-47509F21F84E@gmail.com>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Below is a summary of my previous posts to freebsd-questions:

Since the original rand(3) could not provide a fair, "one-shot" randomness in awk(1),
I am writing this to suggest that we change *rand(3) to *random(3), which only requires
modifying a few lines of code[1], but will result in better random number generation.
BTW, OSX & gawk already have this. Previous discussion can be found here[2].

What do you think?

[1] My quick patch: https://gist.github.com/horus/03c3d7c17703536033c1
[2] https://lists.freebsd.org/pipermail/freebsd-questions/2014-August/260534.html

Chenguang Li

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJT/spWAAoJELG4cS+11lRhDp8QAMY6p/qdZNkhSQw0wlYKRCES
KlcD9uGpNKnfN/Y+ihMnMYK/xZg7YO4DbxSSUNEW4z5gcI53W8TxkZJuvO68GCMj
oNTxgpEl1OCmYAVNWxklyGvMp5YvEWpUrKkhWSPcB+JKS0s4QQuPGwidXfFEBq2n
aS2dIZW5KhSzdx3PZ9qa81fxmB4uDHuw7wVxh4UWrvEbOe9BHQWbIGV9LIn30cLt
3VKmxk+WBdPTCF1Z+Jttrv7snU8oloNbGZXYX7FQBD+MlmPEWFSulSXoav3xT127
+9pKXCy9NpFem7lb+pEYyZ9XwAWp+xicNBNeIk0vG4G1lIllVx10qBDB5Gmqdtq8
OoZBVb4bhDDlWI7VsNzmbXQJOE8d0qpHKAeU7bNzbrbW/E9Zh4KytXho2tgigiMw
htY6ljGXee2J4hH8NJ2+WewnTDJM/v1EHz6MWxjpdw25jiGJCuwuVxa03buuOvNa
ZPLXpp+9UG48TxIeXbb2pDxGjKD+rIiA9K4bwK2888Of6tyANex9kNdLYnpxRejP
VZzP2erTfF6xQY/9W3R2JigzR9ZsTsPJXBcQTf2bBO+9wUENh5ugF/Mna/mwaKf5
c0BmAW7IGqKCbbXY3y8tZvAHu5z2j826WQRvaXr3hjXM1ACRq1PyBR8mMlgM/yG+
/t/et/A01N3FoD4VOUJk
=ihl+
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F70B9462-0898-47EF-AF83-47509F21F84E>