smotslang
Crumble, climb, dash, spike and spring. A cell machine whose words come from a corner of Celeste modding.
Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
smotslang is built around words from smots gaming, a niche corner of the community that mods the indie game Celeste. Under the words sits a plain machine with numbered memory cells, one of them current. You store a number with crumble, move to another cell with dash, print with retry and loop with jump markers, which spike and spring aim at.
Read the story
The specification writes its name in lower case. Its official interpreter is in Node.js.
The machine
| Word | Does |
|---|---|
crumble v | Store v in the current cell |
climb fall | Add or subtract 1 |
dash v wind v | Make cell v current; copy the current cell to cell v |
debug reload | Print numbers; print characters |
retry run | Print the current cell; the same with a line feed |
jump n | Set marker n |
spike n | If the cell is 0, skip ahead to jump n |
trigspike v n | If the cell is not v, skip ahead to jump n |
spring n | If the cell is not 0, go back to marker n |
spinner | Set the cell to 1 one time in three, else 0 |
smots5 | Halt |
A value is ^72 for a number, 'H for a character, $^2 for the cell at 2 and @madeline for a number read from the input. A word that starts with -- opens a comment, and the next word with -- in it closes it. The specification does not explain these four values; the meanings used are the ones its examples need. campaign, which runs another file, stops with an error.
Example
The Hello World switches to characters with reload and prints one crumble at a time.
The Hello World switches to characters with reload and prints one crumble at a time.
The truth machine from the official examples. On 0 spike 8 skips the loop and prints once. On 1 spring 7 keeps going back to marker 7.
A countdown, with spring going back while the cell is not 0.
The coin flip calls spinner twice until the two cells differ, which gives fair odds. The spinner draws from a fixed seed so that a run replays, and the coin flip always lands on Heads.
Further
See also
Cell-based
Write your own in Run Convert a program from smotslang
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: smotslang.
Command line
shib run smotslang -e ' -- by: nilrem --
crumble @madeline
spike 8
jump 7
run
spring 7
jump 8
run' --input '0'shib manual smotslangSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/smotslang.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org