7 Apr
2010
7 Apr
'10
1 p.m.
Delete the tuc file with 'context --purgeall'.
This does not work! I get allways the same.
Delete
\startluacode math.randomseed(os.time()) \stopluacode
in your file.
Now it works. But WHY? Wolfgang
7 Apr
7 Apr
1:05 p.m.
New subject: randomize
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. Arthur
5398
Age (days ago)
5398
Last active (days ago)
1 comments
2 participants
participants (2)
-
Arthur Reutenauer
-
Wolfgang Werners-Lucchini