There's no need for this left-over example. It does not parse anymore and there is a proper Math/Rand lib.
patch attached. trac is way too slow for me today. -- Reini Urban
>From 9182c8e0e526d391f5b3cb958866f9d75452a623 Mon Sep 17 00:00:00 2001 From: Reini Urban <[email protected]> Date: Fri, 16 Sep 2011 17:56:35 +0200 Subject: [PATCH] remove random_lib.pir It does not parse anymore and there is a proper Math/Rand lib --- MANIFEST | 1 - runtime/parrot/library/random_lib.pir | 37 --------------------------------- 2 files changed, 0 insertions(+), 38 deletions(-) delete mode 100644 runtime/parrot/library/random_lib.pir diff --git a/MANIFEST b/MANIFEST index 3ddd0a1..ff87646 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1178,7 +1178,6 @@ runtime/parrot/library/pcore.pir [library] runtime/parrot/library/pcre.pir [library] runtime/parrot/library/postgres.declarations [library] runtime/parrot/library/postgres.pir [library] -runtime/parrot/library/random_lib.pir [library] runtime/parrot/library/uuid.pir [library] runtime/parrot/library/yaml_dumper.pir [library] src/atomic/gcc_x86.c [] diff --git a/runtime/parrot/library/random_lib.pir b/runtime/parrot/library/random_lib.pir deleted file mode 100644 index f96fb57..0000000 --- a/runtime/parrot/library/random_lib.pir +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2005-2009, Parrot Foundation. -# used by examples/shootout/random.pir and others -# by Joshua Isom - -.const int IM = 139968 -.const int IA = 3877 -.const int IC = 29573 - -.sub init :load :anon - .local pmc last - last = new 'Integer' - last = 42 - global "_last_seed" = last -.end - -.sub gen_random - .param num max - .local pmc last - last = global "_last_seed" - $I0 = last - $I0 *= IA - $I0 += IC - $I0 %= IM - last = $I0 - $N0 = $I0 - $N1 = IM - $N0 *= max - $N0 /= $N1 - .return($N0) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: -- 1.7.5.1
_______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
