From: Chad Perrin Date: 2008-04-11T04:00:47+09:00 Subject: Re: C rand() in Ruby --iFRdW5/EC4oqxDHL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 11, 2008 at 03:27:53AM +0900, ara.t.howard wrote: >=20 > On Apr 10, 2008, at 10:20 AM, Chad Perrin wrote: > >Is there some simple way to make use of C's rand() from within Ruby? > >The daughter of someone I know is writing some toy scripts to compare > >PRNG results for a science fair project . . . >=20 > you mean other than just using >=20 > rand >=20 > ?? Yes, other than that -- since that uses Ruby's PRNG, and not C's. >=20 > you *can* directly call the C function using ruby/dl (see examples in =20 > dist) Thanks. --=20 CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Patrick J. LoPresti: "Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!" --iFRdW5/EC4oqxDHL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkf+Y9EACgkQ9mn/Pj01uKUnXQCfXpuFmqrLC+eMlp5pyoc5s7P3 aToAn21198u8IagPQvxZIkSyZhOkcRzu =h1hy -----END PGP SIGNATURE----- --iFRdW5/EC4oqxDHL--