Sus
Brainfuck with every cell already set to the letter a, and the output held back until the end.
iGottic, 2022 · Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
iGottic made Sus in 2022, first on Roblox and later in Lua for the LÖVE framework. It is a brainfuck alternative with 7 symbols. Every cell starts at 97, the code of a, so a letter is a few steps away from the start and a counter has to be cleared first. Nothing is printed while the program runs. The output is gathered and printed once the code has been read to its end.
Read the story
Every other character is ignored. The specification uses that for a program that prints "sus" with its 25 commands hidden in a braille drawing 26 lines high.
The machine
| Symbol | Does |
|---|---|
> < | Move the pointer one cell forward or back |
+ - | Add 1 to the cell or take 1 from it |
$ | Skip past the next ! if the cell is 0 |
! | Go back to the previous $ |
\| | Add the cell's character to the output |
The specification says "next" and "previous", so this implementation takes them as written. A ! belongs to the nearest $ before it, and loops do not nest. Printing a cell outside 0 to 255 is an error.
Example
The Hello world gives each letter a cell and steps it from 97.
The Hello world gives each letter a cell and steps it from 97. <<| goes back for the o that is already there.
A loop clears the second cell in 97 rounds, then counts down from 5 while the first cell prints and steps from a to e.
Patterns it teaches
- Turing tarpit: seven commands on a tape.
Further
See also
Sus builds on Brainfuck.
Brainfuck derivatives
Cell-based
Write your own in Run Convert a program from Sus
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: sus.
Command line
shib run sus -e '-------------------------|>++++|>+++++++++++||>++++++++++++++|>-----------------------------------------------------------------|
>++++++++++++++++++++++|<<|>>>+++++++++++++++++|<<<<|>>>>>+++|>----------------------------------------------------------------|'shib manual susSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/sus.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org