Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
019444d597
Also uncovered a bug in convert-braces, which helps see a simpler close-offset. Instead of all that crap with first incrementing then waiting for counter to return to 0, just wait for counter to go to -1. |
||
---|---|---|
edit.arc.t | ||
edit.mu | ||
factorial.mu | ||
fork.mu | ||
highlights | ||
horizon | ||
mu.arc | ||
mu.arc.t | ||
mu.arc.t.html | ||
Readme | ||
render.vim | ||
scratch.vim | ||
x.mu |
== Taking mu for a spin Prerequisites: Racket from http://racket-lang.org $ cd mu $ git clone http://github.com/arclanguage/anarki Now try a test program. $ cat x.mu # simple example to add two numbers (main ((x integer) <- copy (1 literal)) ((y integer) <- copy (3 literal)) ((z integer) <- add (x integer) (y integer)) ) $ ./anarki/arc mu.arc x.mu #hash((1 . 1) (2 . 3) (3 . 4)) # state of simulated memory after executing x.mu Location z contains the sum of locations x and y. (You have to imagine that location 3 maps to 'z' for now, sorry..) Another example, this time with concurrency. $ ./anarki/arc mu.arc fork.mu Notice that it repeatedly prints either '34' or '35' at random. Hit ctrl-c to stop. == Now dive in Try running the tests: $ ./anark/arc mu.arc.t #t # all tests passed! Now start reading mu.arc.t. The html rendering mu.arc.t.html might be easier to read in your browser.