On Tue, Feb 15, 2005 at 09:00:45AM -0500, Sean Davis wrote:
> On Tue, Feb 15, 2005 at 12:38:59PM +0000, Dr Robert Sanderson wrote:
> > 
> > >asked before. I wonder if anyone who is familiar with the source code 
> > >and randomisation techniques can tell me how it stacks up against other 
> > >mathematical 'random' number generator in simulating unpredictable 
> > >reuslts.
> > 
> > AFAIK, it just calls out to the operating system's rand() function.
> > So it's as good as your operating system's implementation.
> 
> What's surprising to me is that the MOO server is written to prefer
> {l,s}rand48(3) over {,s}random(3), even though autoconf sets HAVE_RANDOM.
> the {,s}random(3) functions are only used if {l,s}rand48(3) are unavailable,
> for some reason. My suspicion is that this dates back to the Heydey of
> LambdaMOO on old Unices - for example, the same reason that LambdaMOO still
> had code for "/dev/tcp" on Solaris in it. I'll be fixing this in LambdaMOO
> 1.8.1+foo as soon as I finish sending this mail. We're not quite caught up
> to LambdaMOO CVS as far as things like WROGUE go - I haven't even started
> merging that in - but the network code, at least, has been almost totally
> redone. No reason that the random code shouldn't be brought out of the stone
> age as well :-)

(Replying to myself here)

Fixing it so that it used random(3) with a 256-byte state was rather easy.
Unfortunately, though it compiles, the Lambda+foo MOO server doesn't work on
Solaris (this is a known problem, it's been this way ever since I rewrote
most of network.c to POSIXify things). If the problem is what I think it is,
it shouldn't be too much of a pain to fix. The only issue is that the only
Solaris-running machines I have access to are the ungodly slow sourceforge
compile farm servers, so I haven't had the motivation to sit down and fix it
yet.

Tested to compile/work with no warnings on Linux, NetBSD/i386, and
NetBSD/sparc64, so far. I'll toss a new release of the codebase out the door
as soon as I get it working on Solaris again.

- Sean

--
 _
( ) ASCII Ribbon Campaign
 X
/ \ For Plain Text Email

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <moo-cows@the-b.org>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to  <[EMAIL PROTECTED]>

Reply via email to