🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #599

Best way to randomize an array?

#599
From: Daniel Finster
Date: Fri, 29 Dec 1995 00:00
14 lines
1159 bytes
Hi there.  I have a 128x128 array of bits which I would like to
randomize in a reasonably efficient way.  Currently, I'm doing it in
what is probably the stupidest way possible: I'm calling RANDOM 16384
times and storing the results individually--this takes about 2
seconds.

I've contemplated randomizing a huge bignum and slicing 16384 bits out
of it, but I can't figure out how to efficiently map those bits onto
the array elements.

Anyone have any ideas, suggestions, etc on how to solve my problem?
I'm running a 3640 under Genera 8.1.1.

Thanks for any input.  SMBX forever.
Technical Details
Message-ID: <820283724.11936@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,1d63b1a33624d80a,start
X-Google-Attributes: gid10077e,public
From: Daniel Finster <DF@SDF.LONESTAR.ORG>
Subject: Best way to randomize an array?
Date: 1995/12/29
Message-ID: <820283724.11936@news.Colorado.EDU>
X-Deja-AN: 123146641
distribution: cu
sender: daemon@lace.colorado.edu
x-note1: message-id generated by recnews
x-note2: mail msgid was   <m0tVoNB-0000akC@SDF.LONESTAR.ORG>
organization: University of Colorado at Boulder
reply-to: <DF@SDF.LONESTAR.ORG>
newsgroups: cu.slug