From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57927 Path: news.gmane.org!not-for-mail From: "Wolfgang Werners-Lucchini" Newsgroups: gmane.comp.tex.context Subject: Re: randomize Date: Wed, 07 Apr 2010 01:10:56 +0200 Message-ID: <4BBBDBA0.24928.3206752@wwl.musensturm.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1270595355 13608 80.91.229.12 (6 Apr 2010 23:09:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Apr 2010 23:09:15 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 07 01:09:14 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NzHtO-0007JJ-Qj for gctc-ntg-context-518@m.gmane.org; Wed, 07 Apr 2010 01:09:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 668FCC9CFA; Wed, 7 Apr 2010 01:09:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id t-j+bWR50y0E; Wed, 7 Apr 2010 01:09:10 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0D49FC9D0C; Wed, 7 Apr 2010 01:09:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 63C3BC9D0C for ; Wed, 7 Apr 2010 01:09:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sYPdEC9oJh-0 for ; Wed, 7 Apr 2010 01:09:01 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by balder.ntg.nl (Postfix) with ESMTP id 30A40C9CFA for ; Wed, 7 Apr 2010 01:09:01 +0200 (CEST) Original-Received: from [192.168.178.23] (p4FC794B8.dip0.t-ipconnect.de [79.199.148.184]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LxLzO-1NRbrF2Bis-016Qx4; Wed, 07 Apr 2010 01:08:59 +0200 Priority: normal In-reply-to: X-mailer: Pegasus Mail for Windows (4.41, DE v4.41 R1) Content-description: Mail message body X-Provags-ID: V01U2FsdGVkX18qiQ74gr9gfIce3oTPNUTFSqeQCc7NH5DjctQ r/EpFpeZoF9QvVDAmaAuATNKcOO81Wnd7Od9zfFpPC7fJZXif5 YpXfSU1d//Iw9RLv5tmFA== X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:57927 Archived-At: > Am 06.04.10 00:21, schrieb Wolfgang Werners-Lucchini: > > Hallo, > > > > I get allways (10 times at least) the same result: > > ------------------------------------------------------------- > > \starttext > > \startluacode > > math.randomseed(os.time()) > > \stopluacode > > > > Encode your Name and Surname as a > > \startluacode > > local a = {'null-terminated', 'dollar-terminated', 'Pascal'} > > context('%s string', a[math.random(1,3)]) > > \stopluacode > > \stoptext > > ------------------------------------------------------------- > > How can I randomize this? > > > ConTeXt saves the random value in the tuc file to get the same > output in > each run. > > Delete the tuc file with 'context --purgeall'. This does not work! I get allways the same. And shouldn't the tuc-seed be overwriten from my os.time-seed? 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 ___________________________________________________________________________________