emd: emotional damage
AI loves em dashes.
We made them executable.
A formally specified, deliberately unreadable programming
language written entirely in Unicode dashes.
No keywords. No identifiers. No mercy.
Eight dashes.
An unreasonable amount
of commitment.
All programming languages have their quirks. Ours are indistinguishable.
Two symbols make an instruction. One wrong code point makes a very different afternoon.
32instructions.
Zero helpful names.
64possible pairs.
32 ways to be wrong.
0spaces allowed.
Not even at the end.
32 code points per line. Break anywhere, even inside an instruction. Every newline disappears before decoding. The layout means nothing ↗
Yes, this is code.
We checked.
A tiny instruction walkthrough.
Four instructions. Eight characters.
One deeply unnecessary way to get three.
One instruction per pair. Room to think.
Same energy as 1 + 2. Considerably more Unicode. Your turn →
A familiar greeting.
An unfamiliar feeling.
This is the actual Hello World program.
Not a texture. Not a corrupted font.
-‐-−‑‑-‒‑--−‑‑-‑‑-—‐-‑-−‑‑-−‑‑-‒
‑-—‐-‑-−‑‑-‐‑--−‑‑-‒‑-—‐-‑-−‑‑-‐
‑--−‑‑-‒‑-—‐-‑-−‑‑-‐‑--−‑‑-―‑-—‐
-―-−‑‑-‑‑-—‐-–-−‑‑-–‑-—‐-‑-−‑‑-‒
‑--−‑‑—‐-‑-−‑‑-‐‑--−‑‑-―‑-—‐-‑-−
‑‑-‑‑--−‑‑-‑‑-—‐-‑-−‑‑-‐‑--−‑‑-‒
‑-—‐-‑-−‑‑-−‑‑-‑‑-—‐-–-−‑‑-—‑-—‐
-‐-−‑‑-‒‑-—‐–‒
Unreasonable syntax.
Reasonable tools.
An analyzer, a debugger that goes backward, a C backend and a Neovim studio.
Unfortunately, we kept building.
Find trouble before you run it
Static analysis tracks value sets, intervals, memory and branch relations across inputs. It rules out selected faults and tells you what remains unknown.
emd analyze examples/brainfuck.emdDebug in both directions
Step forward or backward, reverse-continue, set breakpoints and find the step that last wrote a memory cell.
emd debug examples/functions.emdCompile the damage to C
Generate C with the VM's checked arithmetic, limits and faults. Your questionable program can become a native binary.
emd c examples/hello.emd > hello.cA whole Neovim studio
Source, instructions, analysis, stack, memory, output and a clickable keyboard in one workspace. Step, rewind or let it play.
:EmdStudioAlso: profiles, control-flow graphs, a program reducer and emd slop, which tries to run the dashes hiding in your prose.
A bad idea.
Precisely specified.
The joke is the syntax.
The specification is quite serious.
A real little machine
A stack, indexed memory, arithmetic, conditional jumps, CALL and RET. Byte I/O and a Rust VM.
Two formal models
Lean 4 and Rocq. Determinism, layout and direct Turing universality are proved, on the models. The Rust is checked within bounds and against the models, not proved equal to them.
An escape hatch for humans
Write readable assembly. Compile it to dashes. Pretend that makes it better.
A keyboard, regrettably
Eight letters, or a mouse. Type dashes and run them here, with the real VM.
A semi-serious language. Two papers.
We have put the questionable decisions in writing.
Your terminal deserves
a little emotional damage.
Prefer a prebuilt CLI? Check releases for Linux, macOS and Windows ↗. Packages include examples and the manual.
From a local checkout of the emd repository, with Rust installed:
cargo install --path crates/emd-cli$ emd run examples/hello.emdTake it from the top ↗Backed by people
who hate em dashes.
Both of them are also me. This is a very independent operation.
They asked for fewer em dashes. I built a compiler.
