A quick prototype/toy with which I try to think about robustness-first computing
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
lem.asd
lem.lisp
package.lisp

README.md

Lem

Kind of like Ulam, but named after a different Stanislaw.

Quick Console Demo

; SLIME 2.19
CL-USER> (ql:quickload :lem)
To load "lem":
  Load 1 ASDF system:
    lem
; Loading "lem"
.
(:LEM)
CL-USER> (defparameter +grid+ (lem:make-grid 30 10))
+GRID+
CL-USER> (lem:seed! +grid+ 29 1 (lem:ray))
NIL
CL-USER> (lem:seed! +grid+ 24 3 (lem:line))
NIL
CL-USER> (lem:show! +grid+)
..............................
.............................+
..............................
........................+.....
..............................
..............................
..............................
..............................
..............................
..............................


NIL
CL-USER> (lem:sshow! +grid+)
..............................
............................++
..............................
.......................++.....
..............................
..............................
..............................
..............................
..............................
..............................


NIL
CL-USER> (lem:sshow! +grid+)
..............................
...........................+++
..............................
......................+++.....
..............................
..............................
..............................
..............................
..............................
..............................


NIL
CL-USER> (lem:seed! +grid+ 29 5 (lem:line))
NIL
CL-USER> (lem:seed! +grid+ 18 8 (lem:ray))
NIL
CL-USER> (lem:play! +grid+)
..............................
..........................++++
..............................
.....................++++.....
..............................
............................++
..............................
..............................
.................++...........
..............................


..............................
.........................+++++
..............................
....................+++++.....
..............................
...........................+++
..............................
..............................
................+++...........
..............................


..............................
........................++++++
..............................
...................++++++.....
..............................
..........................++++
..............................
..............................
...............++++...........
..............................


..............................
.......................+++++++
..............................
..................+++++++.....
..............................
.........................+++++
..............................
..............................
..............+++++...........
..............................


..............................
......................++++++++
..............................
.................++++++++.....
..............................
........................++++++
..............................
..............................
.............++++++...........
..............................


..............................
.....................+++++++++
..............................
................+++++++++.....
..............................
.......................+++++++
..............................
..............................
............+++++++...........
..............................


..............................
....................++++++++++
..............................
...............++++++++++.....
..............................
......................++++++++
..............................
..............................
...........++++++++...........
..............................


..............................
...................+++++++++++
..............................
..............+++++++++++.....
..............................
.....................+++++++++
..............................
..............................
..........+++++++++...........
..............................


..............................
..................++++++++++++
..............................
..............+++++++++++.....
..............................
....................++++++++++
..............................
..............................
.........++++++++++...........
..............................


..............................
.................+++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
........+++++++++++...........
..............................


..............................
................++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
.......++++++++++++...........
..............................


..............................
...............+++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
......+++++++++++++...........
..............................


..............................
..............++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
.....++++++++++++++...........
..............................


..............................
.............+++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
....+++++++++++++++...........
..............................


..............................
............++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
...++++++++++++++++...........
..............................


..............................
...........+++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
..+++++++++++++++++...........
..............................


..............................
..........++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
.++++++++++++++++++...........
..............................


..............................
.........+++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


..............................
........++++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


..............................
.......+++++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


..............................
......++++++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


..............................
.....+++++++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


..............................
....++++++++++++++++++++++++++
..............................
..............+++++++++++.....
..............................
...................+++++++++++
..............................
..............................
+++++++++++++++++++...........
..............................


; Evaluation aborted on NIL.
CL-USER>

Basic Notes

A unit is a behavior function with some state. The function takes the state, and a neighborhood (with the current unit at the center), and does stuff. It can arbitrarily mutate the neighborhood and state, but should not be able to loop forever (that can be implemented either by a reduced language, or by having the scheduler cut off the computation after some set number of seconds).