Date: Mon, 26 Feb 2001 23:15:15 -0800 From: Kris Kennaway <kris@FreeBSD.ORG> To: Terry Lambert <tlambert@primenet.com> Cc: "Jacques A. Vidrine" <n@nectar.com>, arch@FreeBSD.ORG Subject: Re: rand(3) (was Re: cvs commit: ports/astro/xglobe/files patch-random) Message-ID: <20010226231515.B94159@citusc17.usc.edu> In-Reply-To: <200102270622.XAA13867@usr05.primenet.com>; from tlambert@primenet.com on Tue, Feb 27, 2001 at 06:22:42AM %2B0000 References: <20010226202701.A13175@hub.freebsd.org> <200102270622.XAA13867@usr05.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 27, 2001 at 06:22:42AM +0000, Terry Lambert wrote: > > > Can someone put forth a use for rand() which requires this change > > > to permit the use to employe rand() instead of its own code? > >=20 > > Parse error. >=20 > What won't work without the change? >=20 > What is the technical reason the change is necessary? See the commit which is still in the subject line of this message. There are really only two possibilities for addressing this: 1) Change rand() to work better and/or 2) Make rand() yell louder when people use it Some people are opposed to both solutions (mainly you for 1). Frankly, I think your objections are the weaker of the two sets, since the number of people who would be affected by changing rand() is small (simulations which need to be replicable across platforms -- dangerous anyway -- or across time) and this set is easily taken care of by those people using a private copy of the 1-line function which is currently called rand(). I'm sure we could even make a libweakrand port for those people to relink against. Okay, now I'm annoyed. I just looked at glibc, and it already does what is being discussed here, namely aliasing rand() to random() (which appears to be the same algorithm we use for random()). There goes your "pseudo-standardization" argument out the window, which means you obviously hadn't checked your facts and were just describing the state of your internal fantasy universe. Thanks for wasting everyone's time with this silly thread. Kris --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6m1QCWry0BWjoQKURAnC9AKDtsT62g4BastcBGCOem7LBelXRpgCeL1LM ZNU8+bKpn5UwcnZw/gZj13g= =QOo4 -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010226231515.B94159>