about summary refs log tree commit diff stats
path: root/029tools.cc
Commit message (Expand)AuthorAgeFilesLines
* 5001 - drop the :(scenario) DSLKartik Agaram2019-03-121-21/+42
* 4993Kartik Agaram2019-03-031-1/+4
* 4987 - support `browse_trace` tool in SubXKartik Agaram2019-02-251-16/+2
* 4418Kartik Agaram2018-07-261-1/+1
* 4264Kartik Agaram2018-06-171-0/+316
* 4259Kartik Agaram2018-06-161-316/+0
* 4139Kartik K. Agaram2017-12-051-5/+1
* 4138Kartik K. Agaram2017-12-051-1/+1
* 3877Kartik K. Agaram2017-05-261-1/+1
* 3694Kartik K. Agaram2016-11-261-37/+0
* 3691Kartik K. Agaram2016-11-251-3/+3
* 3671 - support text in '$print'Kartik K. Agaram2016-11-121-0/+1
* 3669Kartik K. Agaram2016-11-111-5/+5
* 3561Kartik K. Agaram2016-10-221-6/+6
* 3522Kartik K. Agaram2016-10-191-6/+6
* 3380Kartik K. Agaram2016-09-171-2/+2
* 3374Kartik K. Agaram2016-09-161-3/+3
* 3163Kartik K. Agaram2016-08-091-3/+7
* 3120Kartik K. Agaram2016-07-211-2/+2
* 3101 - purge .traces/ dir from repo historyKartik K. Agaram2016-07-051-2/+2
* 2998Kartik K. Agaram2016-05-241-3/+7
* 2990Kartik K. Agaram2016-05-201-6/+6
* 2954 - bugfix: $systemKartik K. Agaram2016-05-111-1/+4
* 2932Kartik K. Agaram2016-05-061-1/+1
* 2850Kartik K. Agaram2016-04-201-0/+18
* 2803Kartik K. Agaram2016-03-211-2/+2
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-6/+6
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-5/+5
* 2712Kartik K. Agaram2016-02-261-8/+8
* 2704 - eradicate all mention of warnings from coreKartik K. Agaram2016-02-251-2/+0
* 2685Kartik K. Agaram2016-02-191-2/+2
* 2623 - bugfix: editing sandboxesKartik K. Agaram2016-02-011-1/+1
* three bugs fixedKartik K. Agaram2015-12-151-0/+26
* 2490Kartik K. Agaram2015-11-281-1/+1
* 2475 - allow addresses to be converted to numbersKartik K. Agaram2015-11-271-2/+1
* 2445 - dispatch between shape-shifting variantsKartik K. Agaram2015-11-151-0/+1
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-20/+20
* 2347Kartik K. Agaram2015-11-021-0/+2
* 2313Kartik K. Agaram2015-10-291-2/+2
* 2272Kartik K. Agaram2015-10-191-2/+18
* 2271 - bugfix: traces cross-contaminating errorsKartik K. Agaram2015-10-191-1/+1
* 2260 - start tracing by depth rather than labelKartik K. Agaram2015-10-061-7/+6
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-21/+21
* 2253 - start reorganizing tracesKartik K. Agaram2015-10-051-31/+0
* 2232Kartik K. Agaram2015-10-011-0/+44
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-7/+7
* 2225Kartik K. Agaram2015-10-011-18/+30
* 2199 - stop printing numbers in scientific notationKartik K. Agaram2015-09-141-2/+2
* 2095Kartik K. Agaram2015-08-281-1/+0
* 2079Kartik K. Agaram2015-08-261-20/+0
))]) (main . [def (main screen keyboard) (life screen)]) (liferes . [define liferes 8]) (life . [def (life screen) with (w (/ (width screen) liferes) h (/ (height screen) liferes)) with (g1 (grid w h 0) g2 (grid w h 0)) isetgrid g1 w/2 h/2-1 1 isetgrid g1 w/2+1 h/2-1 1 isetgrid g1 w/2-1 h/2 1 isetgrid g1 w/2 h/2 1 isetgrid g1 w/2 h/2+1 1 renderlife screen g1 while 1 steplife g1 g2 screen renderlife screen g2 steplife g2 g1 screen renderlife screen g1]) (steplife . [def (steplife old new screen) ++lifetime with (h (len old) w (len (index old 0))) for x 0 (< x w) ++x for y 0 (< y h) ++y fill_rect screen x*liferes y*liferes x+1*liferes y+1*liferes 0 with (curr (indexgrid old x y) n (neighbors old x y w h) ) isetgrid new x y (if (= n 2) curr (if (= n 3) 1 0))]) (renderlife . [def (renderlife screen g) with (w (width screen) h (height screen)) for y 0 (< y h) y+=liferes for x 0 (< x w) x+=liferes (fill_rect screen x y x+liferes y+liferes (if (0 = (indexgrid g x/liferes y/liferes)) 3 # (1 + lifetime%15) 0))]) (neighbors . [def (neighbors g x y w h) ret result 0 when (y > 0) when (x > 0) result += (indexgrid g x-1 y-1) result += (indexgrid g x y-1) when (x < w-1) result += (indexgrid g x+1 y-1) when (x > 0) result += (indexgrid g x-1 y) when (x < w-1) result += (indexgrid g x+1 y) when (y < h-1) when (x > 0) result += (indexgrid g x-1 y+1) result += (indexgrid g x y+1) when (x < w-1) result += (indexgrid g x+1 y+1)]) (lifetime . [define lifetime 0]) )) (sandbox . [life screen]) )