Now using the rng for export
authorFrank Duncan <frank@kank.net>
Sun, 7 Jun 2015 03:02:03 +0000 (22:02 -0500)
committerFrank Duncan <frank@kank.net>
Sun, 7 Jun 2015 03:02:03 +0000 (22:02 -0500)
src/main/main.lisp
src/main/nvm.lisp
src/main/package.lisp
src/main/random.lisp

index b9f46707a1a5671c236f9a3ba4821c2bdd1411db..6ae3bc0ff10c70341d2506cbf56cdb3215167d83 100644 (file)
@@ -16,7 +16,8 @@
        while str
        do (p (e (r str)))))
 
-(defun boot ())
+(defun boot ()
+ (cl-nl.random:set-seed 15))
 
 (defun run-commands (cmds)
  (eval (cl-nl.transpiler:transpile-command-block (cl-nl.parser:parse  (cl-nl.lexer:lex cmds)))))
index 49c5980b2b1c2b3bdf35564b4c28801462ca210b..3ea76d9309c681662c6f35e686348dc8212fc812 100644 (file)
@@ -9,7 +9,7 @@
  (format nil "~{~A~%~}"
   (list
    (format nil "~S" "RANDOM STATE")
-   "\"0 0 -1727483681 624 0.0 false 15 1416695020 654306947 590492850 1239419966 -173306912 1371515797 -193141397 1910712848 -761679426 -286505829 -1273731069 1002213745 559012514 1169814520 -1111719348 893200086 314759295 741630253 484862932 426311352 -842729811 -1116049220 -2066339571 2011183619 -1198525213 2029979103 131276465 -1802578703 1660227324 1419726575 882475525 -1857554151 158448328 306952458 86792981 550579309 373808166 1278488868 -219729728 665032727 210784316 -1316764714 1469363919 186801522 1856954407 1778173228 1987698672 -1031515323 1571770575 -435478664 1989754554 1747243771 138741463 398836233 1343971012 -202977039 -1904217677 -123137009 851662071 373929135 26144840 234050726 299318205 -1760708911 -217772928 809831153 -156284328 -1905260245 -1288073614 -1476451722 -1304122357 -1788366635 -110308324 -2041755771 1081440142 -465784137 1518392657 1009514718 -1147535899 -772617357 -1816579199 288845313 -490475592 -994727909 -1958204979 176244225 -1451350084 -1606656946 457774677 1495026915 -1082308731 -2140833889 1985361486 -1556302711 2002689590 1115740947 -946794373 1901311930 1836552234 1098900571 2132754919 -1226631644 1367085925 1141910236 -379834726 947733447 555891950 2006935634 1593676844 932350767 -74051334 337179565 -302335822 -912746681 84087367 317666679 641582952 2045662334 -1984410222 -701978040 -1925557488 -873109356 1558975246 -658535321 208660465 -824345709 1165086799 -394072762 1703184826 -1558418871 455414554 177173446 -1577606237 -760498165 1802757039 189985326 -493475153 2093539942 1631285806 534262807 1691212960 -458148589 1119846367 -133349082 1494909226 46266761 -2083470176 1929791102 1051510704 -422053626 -1835275120 1495038002 838055864 -931072974 1994756336 1706698929 520633869 -707759937 1286936267 69867602 1843231483 -1274589372 -1556562623 864061203 -813468124 -399934199 1871622041 1282121632 139076654 1474225360 1629167648 -1597221199 -1377238964 943250804 -1692503181 1390544197 2094626949 -1629015866 1873486343 434348818 378665167 661057889 678503676 -732793820 -2050903268 -65488496 -938089798 -435784519 -568748001 1262747594 -1203466538 -1152922012 -40696577 730846254 1569543401 -1114986420 2112365963 661891640 -1102962465 -1783087879 959406800 1598246106 397116978 -455428986 1619486278 1259887057 -581189665 2112056988 -1556633150 -754075246 -609234936 385873963 -67572532 1838757249 -1315726249 809053025 -1167325410 1580255974 1176939774 -1362118537 -1998756858 -436561294 -1113823116 634805614 -1684751545 885575707 1599442570 -271146821 -2135432835 -290328831 -970367311 14524194 -1551434925 -873037601 -1187343433 -753195947 377576667 163042901 -275903112 -895539849 302046133 -304247717 1592489899 1939222790 1169102776 -472556045 -469532505 -1984592468 -1997939553 1872695275 1353417293 1014568184 -624558379 -2057825940 -1626030235 -1922128989 1738455174 -770699963 1549382561 -639336668 759368296 -455293938 1214205736 85339445 2019832818 251300585 361660408 -478399004 640345136 -2141603842 -21007493 -1097087128 -1122801693 -1100585513 -1883755748 411963882 -318157721 -985094006 530239524 846422860 1857935893 -1322795266 -1295567225 -1100435307 -1376814160 1116475480 879826236 429817292 1835912861 1713897646 -1896944338 1298407296 1709406218 -632733571 1037820125 1965096281 -352318239 1880623188 742639540 579411760 471465757 898837663 843756266 1839059330 -1292385056 -297033636 -213770834 649218933 451699550 -2147318964 1482984701 -637371228 876711452 1705905734 -1690262978 -1762255128 -703894129 -1628035718 393347479 32862419 956002176 375291586 -1268001331 278930159 174633104 -1246053866 650911531 -1989980097 1204440666 524066353 -1024875616 741657499 -1492694924 -1897873956 2102966245 631607876 628431397 -986439957 1785879259 -1515027626 -285096583 481768568 1856236719 1092059134 1438513140 -1588071933 -1036254016 630144331 -899853580 1090055121 186079855 749016619 -1255423144 893730276 -206802857 -311343480 -566347460 535318081 2018421260 -1302000247 2028649536 -450752497 559596071 2110159311 320818611 -271354867 -605402891 -348884866 -1420933182 1887965234 733917330 -1162359538 -1298967759 369827733 1599943744 1518561309 -1319956347 -783366723 1276687217 1708506284 -1274607938 1216628138 1898250486 -1411477005 -1803514218 -1190038042 -986281865 -1464472760 -1850314825 -2001407761 1456268296 -316814827 1283490359 1272727256 1270945320 522760377 -223364214 -1217376357 857164268 875788204 -116571027 -1562583304 88982581 1864484733 -1334242943 683148613 -867237168 -76281385 47601213 -362697557 1451689955 -173273146 -1951029418 1484978626 464184974 -1783564890 -1446924459 530628085 231084108 -269411424 928982004 -1368210198 -2130716369 -1134246551 -883611680 -1507444423 1985095922 1224291467 -818571745 1480406714 -175264650 -983389991 1111443891 491149036 565745871 -1723592097 -1573255834 1669506602 -593128530 -1357522439 -1625074496 -627424188 -1621626690 -760571928 -1274563468 -573089204 -1854674454 -1337953720 1587327731 741612860 1893246575 1804372266 -2012798276 -1751489348 1493528253 1586187764 1465966706 -126150103 1488440925 -763910120 250136436 -658520430 -1092357628 1922937902 1592672092 -344799613 -1107111341 1709266121 2042461373 682021890 -178997087 -2052486206 1240327321 -631731758 2003188304 -1799267119 -1195668452 -1127458892 92865197 -1875401439 -179772496 -2055101823 -1045284206 -1835026919 -1338749556 -1996121876 -1534151219 -1740471405 1872593694 -30845915 -1184855319 -1109683293 1594452338 -297130163 -1385414219 1524751907 636147547 -362566695 2067822837 1607880248 -1359454350 -819947226 -170640752 773376247 638876268 -460580202 -1147978812 -159544038 -675672614 -1698719333 1442413660 294049713 -1518873642 -1553004378 1391079095 408802770 1160822751 1241219740 -1754558728 -1379322710 -1910001583 692714953 -1618955432 -1388843378 -611447991 706416704 -1977636017 -1673147279 488126064 750742594 -431814115 -1481699862 400139933 -1387019513 -1500733424 -274543822 -464624274 -919577829 -562312557 1345191148 620404894 -1020793228 379569682 1887881530 -344262296 -1393841063 1924445450 -1921297797 504974562 -598849200 -714777882 -2031850623 -1438873640 1032537388 1143658631 1181820170 -20741500 -1448230799 -1263568242 -1683732628 -1374941545 1621262331 242174421 557719613 -93429946 -1788181137 -1771504840 -596432358 1302724374 631371085 -1236861284 -2036923246 -889856243 -1463713596 799786589 1685588465 1715297777 -16023054 28000088 685643772 -229026639 -730878336 -1643579658 -698481524 1467045300 -628641869 -497188165 -1931408156 1727737611 -1903432896 1692935513 821745160 -910640263 176964468 26981143 -1897531033 -520784850 1161686295 954814981 -1424684207 362931480 -1876869934 274223211 214826899 1276150364 -1529727473 2083998336 238448709 -344835430 731644351 1370810814 95449535 1538595264 964850827 1419993150 145732163 -1752419880 636704620 650005511 670351407 -743310344 -1930510475 -823575710\""
+   (format nil "~S" (cl-nl.random:export))
    ""
    (format nil "~S" "GLOBALS")
    "\"min-pxcor\",\"max-pxcor\",\"min-pycor\",\"max-pycor\",\"perspective\",\"subject\",\"nextIndex\",\"directed-links\",\"ticks\","
index 1e6592b423c1b620dece1ad9ebe3787a7bca470d..642d2f00668455e3fddfff718fcf698303d9123e 100644 (file)
@@ -8,7 +8,7 @@
 (defpackage #:cl-nl.random
  (:use :common-lisp)
  (:shadow #:export)
- (:export #:set-seed #:next-int #:next-double))
+ (:export #:export #:set-seed #:next-int #:next-double))
 
 (defpackage #:cl-nl.transpiler
  (:use :common-lisp)
index 44a1a2af0531f6d48e40109cbfa04f9283369bc1..508cb6b798681abaced12cfa0a3e2b813928c394 100644 (file)
@@ -27,6 +27,6 @@
      'list
      (lambda (x) (if (logbitp (1- 32) x) (dpb x (byte 32 0) -1) x))
      (mt19937::random-state-state mt19937:*random-state*))))
-  (format nil "0 ~A ~A ~A 0.0 false ~{~A~^ ~}"
+  (format nil "0 ~A ~A ~A 0.0 false ~{~A~^ ~}"
    (first state) (second state) (third state)
-   (nthcdr 4 state))))
+   (nthcdr 3 state))))