1 This directory contains Mu programs and infrastructure that require a Linux
2 kernel. To run programs under this directory, you must first `cd` into it.
6 $ ./translate apps/hello.mu # generates a.elf
11 See the [shared vocabulary](vocabulary.md) of data types and functions shared
12 by Mu programs running on Linux. Mu programs can transparently call low-level
13 functions written in SubX.
15 Some programs to try out:
17 * `tile`: [An experimental live-updating postfix shell environment](https://mastodon.social/@akkartik/105108305362341204)
18 that updates as you type. Prototype. Look at this to see what is currently
19 possible, not how I recommend building software.
21 <img alt='tile app' src='../html/rpn5.png' width='500px'>
23 * `browse`: [A text-mode browser for a tiny subset of Markdown](https://mastodon.social/@akkartik/104845344081779025).
25 * `apps/ex*`: small stand-alone examples that don't need any of the shared code at
26 the top-level. They each have a simple pedagogical goal. Read these first.
28 * `apps/factorial*`: A simple program to compute factorials in 5 versions,
29 showing all the different syntax sugars and what they expand to.
31 The Mu compiler toolchain is also here in the following phases:
33 * Bare SubX: `hex`, `survey_elf`, `pack`, `dquotes`, `assort`, `tests`
34 * Syntax sugar for SubX: `sigils`, `calls`, `braces`
35 * Mu->SubX compiler: `mu`. Compiles [most statements](http://akkartik.github.io/mu/html/mu_instructions.html)
36 to a single instruction of machine code.
38 The toolchain includes binaries in the repo. At any commit, the binary should
39 be identical bit for bit with the result of translating the corresponding
40 `.subx` file. The binary should also be natively runnable on a Linux system
41 running on Intel x86 processors, either 32- or 64-bit. If either of these
42 invariants is violated, it's a bug.