So I came up with this, which seems slightly better than parsing out the
seconds portion of time$.  It gives a larger range of numbers and uses a
little less code.  Still seems like a terrible way to get a pseudo random
number though.

100 FOR I=1 TO PEEK(63791):J=RND(1):NEXT

63791 is some sort of clock-related counter that keeps cycling down from
125 to 0.


On Wed, Jan 31, 2018 at 1:54 PM, Josh Malone <josh.mal...@gmail.com> wrote:

> You only need to see once I think. RND is basically terrible on these
> tiny machines, but.. hey what to you expect in 10 lines :)
>
> On Wed, Jan 31, 2018 at 1:44 PM, Kevin Becker <ke...@kevinbecker.org>
> wrote:
> > Now that I haver Virtual T running, I hit my first snag on the first
> line of
> > my program.
> >
> > Is there a good way to seed the random number generator in M100 BASIC?
> The
> > only method I've found so far is to do a for loop based on the "seconds"
> > portion of the current time.  That seems inefficient, especially in a 10
> > line program.
> >
> > On Wed, Jan 31, 2018 at 1:15 PM, Kevin Becker <ke...@kevinbecker.org>
> wrote:
> >>
> >> I hadn't found CloudT before but that is very cool.
> >>
> >> I got the precompiled VirtualT binary working on Fedora 27 by
> downloading
> >> the source from http://ijg.org and compiling it myself and then,
> instead of
> >> doing a "make install", I just copied the single libjpeg.so.9 binary to
> >> /usr/local/lib64/ and added that path with ldconfig.
> >>
> >> It's working now.
> >>
> >>
> >> On Wed, Jan 31, 2018 at 11:56 AM, John R. Hogerhuis <jho...@pobox.com>
> >> wrote:
> >>>
> >>>
> >>> On Wed, Jan 31, 2018 at 8:48 AM Kevin Becker <ke...@kevinbecker.org>
> >>> wrote:
> >>>>
> >>>> So I gave it a go on a fresh Fedora 27 VM and the binary is
> complaining
> >>>> that it wants libjpeg.so.9 and I have libjpeg.so.62.  I tried a
> symlink but
> >>>> it really wants that specific version.
> >>>>
> >>>
> >>> Well when you decide to give the build a shot again I suggest asking on
> >>> the list for help from another Fedora user. VirtualT build is always a
> >>> little bit of messing about to build but it always comes together after
> >>> figuring out what packages and make command line to use.
> >>>
> >>> But I will say I’ve never had much luck with the canned binary except
> in
> >>> Windows.
> >>>
> >>> Also if you just want to play in BASIC I created a JavaScript emulator
> >>>
> >>> http://bitchin100.com/CloudT
> >>>
> >>> — John.
> >>
> >>
> >
>

Reply via email to