esolang

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

Expected: abc

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.

nDoes
1Print X as a Unicode character, give X
2X + 1
31
4Do X, then Y; give Y
5While X is not 0, do Y
6Set variable X to Y
7The value of variable X (0 if never set)
8X − 1
9If X is not 0 do Y, else Z
10Read 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

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 unreadable

Source

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