diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-10-14 17:21:39 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-10-14 17:26:28 -0700 |
commit | 2c0a6696a99407cd72b945bb270937dfe130bd48 (patch) | |
tree | 370f77c54f4bdd37b38b02dbbf934204090ca476 | |
parent | 93ddcc744b91cf1bf3550024e9b8c9fd80c2571b (diff) | |
download | mu-2c0a6696a99407cd72b945bb270937dfe130bd48.tar.gz |
145 - delete random programs
They need a type table to work, but I'm keeping type tables next to the tests. Everything needs to be a test from now on. (But first some fixes to the terminal primitives.)
-rw-r--r-- | Readme | 11 | ||||
-rw-r--r-- | edit.mu | 17 | ||||
-rw-r--r-- | fork.mu | 12 | ||||
-rw-r--r-- | mu.arc | 3 | ||||
-rw-r--r-- | x.mu | 6 |
5 files changed, 1 insertions, 48 deletions
diff --git a/Readme b/Readme index 614b6058..8b554d50 100644 --- a/Readme +++ b/Readme @@ -4,15 +4,4 @@ Prerequisites: Racket from http://racket-lang.org $ cd mu $ git clone http://github.com/arclanguage/anarki -$ cat x.mu -(main - ((x integer) <- literal 1) - ((y integer) <- literal 3) - ((z integer) <- add (x integer) (y integer)) -) - -$ ./anarki/arc mu.arc x.mu -hash((x . 1) (y . 3) (z . 4)) # state of simulated memory after executing x.mu -# location z contains the sum of locations x and y - $ ./anark/arc mu.arc.t # automated tests; start reading here diff --git a/edit.mu b/edit.mu index 05ada379..56aee23d 100644 --- a/edit.mu +++ b/edit.mu @@ -1,20 +1,3 @@ -(main - (cls) - (cursor (10 literal) (5 literal)) - (print ("Hello, " literal)) - (bold-mode) - (print ("you" literal)) - (non-bold-mode) - (print ("." literal)) - (cursor (1 literal) (1 literal)) - (print ("Press a key..." literal)) - ((key string) <- getc) - (console-off) - (print ("You pressed: " literal)) - (print (key string)) - (print ("\n" literal)) -) - ; a screen is an array of pointers to lines, in turn arrays of characters (new-screen diff --git a/fork.mu b/fork.mu deleted file mode 100644 index 42f1956b..00000000 --- a/fork.mu +++ /dev/null @@ -1,12 +0,0 @@ -(main - (fork (thread2 fn)) - ((1 integer) <- literal 34) - (print (1 integer)) - (jmp (-2 offset)) -) - -(thread2 - ((2 integer) <- literal 35) - (print (2 integer)) - (jmp (-2 offset)) -) diff --git a/mu.arc b/mu.arc index 8b7dd768..774c815e 100644 --- a/mu.arc +++ b/mu.arc @@ -392,7 +392,7 @@ non-bold-mode (do1 nil ($.charterm-normal)) console-on - (do1 nil (if ($.current-charterm) ($.open-charterm))) + (do1 nil (if (no ($.current-charterm)) ($.open-charterm))) console-off (do1 nil (if ($.current-charterm) ($.close-charterm))) @@ -601,7 +601,6 @@ (reset) (awhen cdr.argv (map add-fns:readfile it) - ($.open-charterm) (run 'main) (if ($.current-charterm) ($.close-charterm)) (prn memory*)) diff --git a/x.mu b/x.mu deleted file mode 100644 index 1a3c3175..00000000 --- a/x.mu +++ /dev/null @@ -1,6 +0,0 @@ -(main - ((x integer) <- literal 1) - ((y integer) <- literal 3) - ((z integer) <- add (x integer) (y integer)) - (print (x integer) (y integer) (z integer)) -) |