ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Werners-Lucchini" <wwl@musensturm.de>
To: ntg-context@ntg.nl
Subject: Re: randomize
Date: Wed, 07 Apr 2010 15:42:06 +0200	[thread overview]
Message-ID: <4BBCA7CE.1241.F1ED2A@wwl.musensturm.de> (raw)
In-Reply-To: <mailman.376.1270641896.4277.ntg-context@ntg.nl>

> > Now it works. But WHY?
> 
>   Because that's the way random number generators works.  They're
> not
> random at all, they generate completely predictable number
> sequences
> from a "seed": each time you use the same seed, you get the exact
> same
> sequence.  In your case, you used os.time() as a seed, which is an
> integral number of seconds elapsed since some fixed date, and the
> fact
> you saw the same number ten times simply means your code was ran
> ten
> times within the same second.

I know this and I have triggerd this by hand. So there is a lot of 
time between. I have purged files between every run and I got the 
same result if I wait 1 second, 1 minute or 1 day.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


       reply	other threads:[~2010-04-07 13:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.376.1270641896.4277.ntg-context@ntg.nl>
2010-04-07 13:42 ` Wolfgang Werners-Lucchini [this message]
2010-04-07 13:56   ` randomize Arthur Reutenauer
     [not found] <mailman.390.1270654736.4277.ntg-context@ntg.nl>
2010-04-08  7:28 ` randomize Wolfgang Werners-Lucchini
2010-04-08  7:41   ` randomize Arthur Reutenauer
2010-04-08  7:49     ` randomize Wolfgang Schuster
2010-04-08  8:00       ` randomize Arthur Reutenauer
     [not found] <mailman.1.1270634402.10942.ntg-context@ntg.nl>
2010-04-07 11:00 ` randomize Wolfgang Werners-Lucchini
2010-04-07 11:05   ` randomize Arthur Reutenauer
     [not found] <mailman.371.1270609971.4277.ntg-context@ntg.nl>
2010-04-07  9:40 ` randomize Wolfgang Werners-Lucchini
     [not found] <mailman.349.1270527943.4277.ntg-context@ntg.nl>
2010-04-06 23:10 ` randomize Wolfgang Werners-Lucchini
2010-04-07  6:58   ` randomize Wolfgang Schuster
2010-04-05 22:21 randomize Wolfgang Werners-Lucchini
2010-04-05 22:49 ` randomize Wolfgang Schuster
2010-04-07  3:05 ` randomize Aditya Mahajan
2010-04-07  7:17   ` randomize Hans Hagen
2010-04-07  7:45   ` randomize luigi scarso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BBCA7CE.1241.F1ED2A@wwl.musensturm.de \
    --to=wwl@musensturm.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).