Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
Go to file
Kartik K. Agaram 371925c3d5 322 2014-11-24 22:43:47 -08:00
charterm 308 - temporarily inline charterm dependency 2014-11-23 09:56:55 -08:00
Readme 309 - publish to github 2014-11-23 10:03:45 -08:00
edit.arc.t 314 - better syntax for functions 2014-11-24 21:12:23 -08:00
edit.mu 314 - better syntax for functions 2014-11-24 21:12:23 -08:00
factorial.mu 314 - better syntax for functions 2014-11-24 21:12:23 -08:00
fork.mu 314 - better syntax for functions 2014-11-24 21:12:23 -08:00
highlights 210 - go over mu.arc.t narrative 2014-11-01 15:06:31 -07:00
horizon 154 - current stretch goal is to parse the horizon file 2014-10-24 10:39:26 -07:00
mu.arc 321 - before/after can now come anywhere 2014-11-24 22:37:35 -08:00
mu.arc.t 322 2014-11-24 22:43:47 -08:00
mu.arc.t.html 310 2014-11-24 15:22:06 -08:00
render.vim 303 2014-11-23 06:30:53 -08:00
scratch.vim 266 - update html 2014-11-09 18:23:05 -08:00
tangle.mu 321 - before/after can now come anywhere 2014-11-24 22:37:35 -08:00
x.mu 314 - better syntax for functions 2014-11-24 21:12:23 -08:00

Readme

Mu: a world where any manual test can be easily automated

  keyboard input
  printing to screen
  disk filling up
  performance metrics
  race conditions
  fault tolerance
  ...

Collecting all possible scenarios considered will hopefully make the global
structure of programs more apparent. More details: http://akkartik.github.io/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. A colorized copy of it is at mu.arc.t.html and
http://akkartik.github.io/mu.