diff options
-rw-r--r-- | linux/README.md | 21 | ||||
-rw-r--r-- | linux/ex6.subx | 6 | ||||
-rw-r--r-- | linux/tile/README.md | 3 |
3 files changed, 18 insertions, 12 deletions
diff --git a/linux/README.md b/linux/README.md index 5eabd571..ca003d28 100644 --- a/linux/README.md +++ b/linux/README.md @@ -1,8 +1,14 @@ -A set of standard libraries for building programs that run with just a Linux -kernel. Most programs here read from stdin and write to stdout. One of these -programs is the Mu compiler ([colorized sources](http://akkartik.github.io/mu/html/apps/mu.subx.html)). +This directory contains Mu programs and infrastructure that require a Linux +kernel. To run programs under this directory, you must first `cd` into it. -Other apps beyond the Mu toolchain: + ```sh + $ cd linux/ + $ ./translate hello.mu # generates a.elf + $ ./a.elf + Hello world! + ``` + +Some programs to try out: * `tile`: [An experimental live-updating postfix shell environment](https://mastodon.social/@akkartik/105108305362341204) that updates as you type. Prototype. Look at this to see what is currently @@ -18,10 +24,11 @@ Other apps beyond the Mu toolchain: * `factorial*`: A simple program to compute factorials in 5 versions, showing all the different syntax sugars and what they expand to. -The Mu toolchain is also here in the following phases: -* Core SubX: `hex`, `survey_elf`, `pack`, `dquotes`, `assort`, `tests` +The Mu compiler toolchain is also here in the following phases: + +* Bare SubX: `hex`, `survey_elf`, `pack`, `dquotes`, `assort`, `tests` * Syntax sugar for SubX: `sigils`, `calls`, `braces` -* More ambitious translator for a memory-safe language (in progress): `mu` +* Mu->SubX compiler: `mu` The toolchain includes binaries in the repo. At any commit, the binary should be identical bit for bit with the result of translating the corresponding diff --git a/linux/ex6.subx b/linux/ex6.subx index 32f10ab3..2d1625f8 100644 --- a/linux/ex6.subx +++ b/linux/ex6.subx @@ -27,9 +27,9 @@ Entry: == data Size: # size of string - 0x0e/imm32 # 14 + 0x0d/imm32 # 13 X: # string to print - 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 0a 00 -# H e l l o , ␣ w o r l d ! newline null + 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 0a 00 +# H e l l o ␣ w o r l d ! newline null # . . vim:nowrap:textwidth=0 diff --git a/linux/tile/README.md b/linux/tile/README.md index 602b1466..e8b96d09 100644 --- a/linux/tile/README.md +++ b/linux/tile/README.md @@ -24,8 +24,7 @@ $ ./a.elf type ## hacking -Unlike the top-level directory, this is just a prototype so far. There are no -tests. +This is just a prototype. There are no tests. To add a new primitive you'll need to hard-code it into the `evaluate` function (apps/tile/rpn.mu). |