Mu is an open source programming language created in 2014 by Kartik K. Agaram.
#408on PLDB | 10Years Old |
git clone https://github.com/akkartik/mu
Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
# dump stack from bottom to top
fn emit-stack-from-bottom _self: (addr grapheme-stack), out: (addr stream byte) {
var self/esi: (addr grapheme-stack) <- copy _self
var data-ah/edi: (addr handle array code-point-utf8) <- get self, data
var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
var data/edi: (addr array code-point-utf8) <- copy _data
var top-addr/ecx: (addr int) <- get self, top
var i/eax: int <- copy 0
{
compare i, *top-addr
break-if->=
var g/edx: (addr code-point-utf8) <- index data, i
write-code-point-utf8 out, *g
i <- increment
loop
}
}
Feature | Supported | Example | Token |
---|---|---|---|
Comments | ✓ | # A comment | |
Line Comments | ✓ | # A comment | # |
Semantic Indentation | X |