Unreadable
Only two characters, ' and ", and in many fonts " looks exactly like ''.
TehZ, 2010 · Turing complete: yes · ●●● hard · esolangs.org
Tested with 4 known programs · Hello World on Try It Online: identical · Test method
Run it
The idea
TehZ made Unreadable in 2010 to be unreadable on purpose. Every command is a ' followed by some number of ", and the count picks the command. Its arguments follow directly, in prefix notation, with no brackets or spaces. In a font where " and '' look the same, as in Arial, you cannot even count.
Read the story
Underneath is a small, ordinary language with numbers without bounds, numbered variables, a loop and an if. Every command gives back a value, so the whole program is one big expression.
The machine
A command is ' and n quotes, then its arguments.
| n | Does |
|---|---|
| 1 | Print X as a Unicode character, give X |
| 2 | X + 1 |
| 3 | 1 |
| 4 | Do X, then Y; give Y |
| 5 | While X is not 0, do Y |
| 6 | Set variable X to Y |
| 7 | The value of variable X (0 if never set) |
| 8 | X − 1 |
| 9 | If X is not 0 do Y, else Z |
| 10 | Read one character, −1 at the end |
There are no number literals. 72 is '"" written 71 times around '""", which is why a hello world runs to thousands of quotes.
Example
A cat.
A cat. Written out it is while (v1 = read + 1) print(v1 - 1). Adding 1 turns the −1 at the end of the input into a 0, which ends the loop.
Patterns it teaches
- Hostile design: the syntax is fine, the alphabet is the enemy.
- Turing completeness: the specification shows how any brainfuck program translates, with variable 1 as the tape pointer.
Further
See also
Also in Hostile
Write your own in Run Convert a program from Unreadable
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: unreadable.
Command line
shib run unreadable -e ''\''"""""'\''""""""'\''"""'\''""'\''""""""""""'\''"'\''""""""""'\''"""""""'\''"""' --input 'abc'shib manual unreadableSource
- Module
langs/tio/ports.js- Interpreter
langs/tio/unreadable.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org