Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Kartik K. Agaram 9cbaad0811 obsolete argument 6 months ago
..
apps rename grapheme to code-point-utf8 8 months ago
bootstrap obsolete argument 6 months ago
browse rename grapheme to code-point-utf8 8 months ago
tile keep 'grapheme-stack' 8 months ago
000init.subx 7842 - new directory organization 1 year ago
100.txt . 1 year ago
101_write.subx start throwing error on duplicate label 10 months ago
102test.subx start throwing error on duplicate label 10 months ago
103kernel-string-equal.subx start throwing error on duplicate label 10 months ago
104new-segment.subx start throwing error on duplicate label 10 months ago
105string-equal.subx start throwing error on duplicate label 10 months ago
106stream.subx 7842 - new directory organization 1 year ago
107trace.subx . 11 months ago
108write.subx 7842 - new directory organization 1 year ago
109stream-equal.subx 7842 - new directory organization 1 year ago
110stop.subx . 11 months ago
111read.subx . 11 months ago
112read-byte.subx . 11 months ago
113write-stream.subx . 11 months ago
114error.subx 7842 - new directory organization 1 year ago
115write-byte.subx . 11 months ago
116write-buffered.subx 7842 - new directory organization 1 year ago
117write-int-hex.subx 7842 - new directory organization 1 year ago
118parse-hex-int.subx . 11 months ago
119error-byte.subx . 11 months ago
120allocate.subx start throwing error on duplicate label 10 months ago
121new-stream.subx . 11 months ago
122read-line.subx . 11 months ago
123slice.subx . 11 months ago
124next-token.subx 7842 - new directory organization 1 year ago
125write-stream-data.subx 7842 - new directory organization 1 year ago
126write-int-decimal.subx rename grapheme to code-point-utf8 8 months ago
127next-word.subx support non-line-oriented processing in next-word 11 months ago
128subx-words.subx 7867 1 year ago
129emit-hex.subx 7842 - new directory organization 1 year ago
130emit.subx 7867 1 year ago
131table.subx start throwing error on duplicate label 10 months ago
132slurp.subx . 11 months ago
133subx-widths.subx 7842 - new directory organization 1 year ago
134emit-hex-array.subx 7842 - new directory organization 1 year ago
135next-word-or-string.subx 7842 - new directory organization 1 year ago
200.txt . 1 year ago
201register-names.subx 7842 - new directory organization 1 year ago
202write-int.subx . 11 months ago
203stack.subx . 11 months ago
300.txt 7842 - new directory organization 1 year ago
301array-equal.subx 7842 - new directory organization 1 year ago
302stack_allocate.subx 7842 - new directory organization 1 year ago
303kernel-string.subx 7842 - new directory organization 1 year ago
304screen.subx rename grapheme to code-point-utf8 8 months ago
305keyboard.subx rename grapheme to code-point-utf8 8 months ago
306files.subx . 1 year ago
307size.subx 7842 - new directory organization 1 year ago
308allocate-array.subx 7842 - new directory organization 1 year ago
309stream.subx 7842 - new directory organization 1 year ago
310copy-bytes.subx 7842 - new directory organization 1 year ago
311decimal-int.subx . 1 year ago
312copy.subx 7842 - new directory organization 1 year ago
313index-bounds-check.subx always check for null in 'index' instructions 1 year ago
314divide.subx 7842 - new directory organization 1 year ago
315slice.subx 7842 - new directory organization 1 year ago
400.mu rename grapheme to code-point-utf8 8 months ago
401test.mu update vocabulary documentation 1 year ago
402time.mu 7842 - new directory organization 1 year ago
403unicode.mu rename grapheme to code-point-utf8 8 months ago
404stream.mu update vocabulary documentation 1 year ago
405screen.mu rename grapheme to code-point-utf8 8 months ago
406int32.mu 7842 - new directory organization 1 year ago
407right-justify.mu rename grapheme to code-point-utf8 8 months ago
408float.mu 7842 - new directory organization 1 year ago
409print-float-hex.mu 7842 - new directory organization 1 year ago
410file.mu 7842 - new directory organization 1 year ago
411string.mu rename grapheme to code-point-utf8 8 months ago
412print-float-decimal.mu update vocabulary documentation 1 year ago
README.md . 12 months ago
assort start throwing error on duplicate label 10 months ago
assort.subx . 11 months ago
braces start throwing error on duplicate label 10 months ago
braces.subx . 11 months ago
branches.mu support checking overflow flag everywhere 1 year ago
branches.out support checking overflow flag everywhere 1 year ago
calls start throwing error on duplicate label 10 months ago
calls.subx . 11 months ago
dquotes start throwing error on duplicate label 10 months ago
dquotes.subx . 11 months ago
help make online help more obvious 1 year ago
hex start throwing error on duplicate label 10 months ago
hex.subx . 11 months ago
labels_baremetal start throwing error on labels too far for /disp8 10 months ago
labels_baremetal.subx start throwing error on labels too far for /disp8 10 months ago
mu rename grapheme to code-point-utf8 8 months ago
mu-init-test.subx 7842 - new directory organization 1 year ago
mu-init.subx 7842 - new directory organization 1 year ago
mu.subx rename grapheme to code-point-utf8 8 months ago
pack start throwing error on duplicate label 10 months ago
pack.subx . 11 months ago
sigils start throwing error on duplicate label 10 months ago
sigils.subx . 11 months ago
stack_array.subx . 1 year ago
stats.txt . 1 year ago
subx-params.subx 7842 - new directory organization 1 year ago
subx_debugging.md 7847 1 year ago
survey_baremetal start throwing error on duplicate label 10 months ago
survey_baremetal.subx start throwing error on duplicate label 10 months ago
survey_elf start throwing error on duplicate label 10 months ago
survey_elf.subx start throwing error on duplicate label 10 months ago
test_apps start throwing error on duplicate label 10 months ago
test_apps_emulated . 11 months ago
tests start throwing error on duplicate label 10 months ago
tests.subx . 11 months ago
translate 7842 - new directory organization 1 year ago
translate_debug 7842 - new directory organization 1 year ago
translate_emulated 7842 - new directory organization 1 year ago
translate_subx 7842 - new directory organization 1 year ago
translate_subx_debug 7842 - new directory organization 1 year ago
translate_subx_emulated 7842 - new directory organization 1 year ago
vocabulary.md rename grapheme to code-point-utf8 8 months ago
x86_approx.md . 10 months ago

README.md

This directory contains Mu programs and infrastructure that require a Linux kernel. To run programs under this directory, you must first cd into it.

$ cd linux/
$ ./translate apps/hello.mu      # generates a.elf
$ ./a.elf
Hello world!

See the shared vocabulary of data types and functions shared by Mu programs running on Linux. Mu programs can transparently call low-level functions written in SubX.

Some programs to try out:

  • tile: An experimental live-updating postfix shell environment that updates as you type. Prototype. Look at this to see what is currently possible, not how I recommend building software.

    tile app
  • browse: A text-mode browser for a tiny subset of Markdown.

  • apps/ex*: small stand-alone examples that don't need any of the shared code at the top-level. They each have a simple pedagogical goal. Read these first.

  • apps/factorial*: A simple program to compute factorials in 5 versions, showing all the different syntax sugars and what they expand to.

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
  • Mu->SubX compiler: mu. Compiles most statements to a single instruction of machine code.

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 .subx file. The binary should also be natively runnable on a Linux system running on Intel x86 processors, either 32- or 64-bit. If either of these invariants is violated, it's a bug.