hatemath
One variable that is nothing, a letter or a number, and no way to compute with it.
Saketh Suresh, 2018 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Saketh Suresh made hatemath in 2018. It has one variable, X, and eight commands. Three set the type of X, four change it and one prints it. What a change does depends on the type, so + counts an integer up and * moves a character along the alphabet. There are no loops, no input and no comparisons, so a program prints the same text every time.
The machine
| Command | Does |
|---|---|
[ | X becomes None |
< | X becomes the character space |
> | X becomes the integer 0 |
+ - | Add 1 to the integer or take 1 away |
* / | Step the character forward or back |
] | Print X |
The characters form a ring of 27, a space and then a to z, and after z comes the space again. Printing None prints the word None. The Python interpreter fails on + or - when X is not an integer, and so does this implementation. Every other character is passed over.
Example
The specification calls the second program its Hello, World!, but X has no capitals and no punctuation,…
The specification calls the second program its Hello, World!, but X has no capitals and no punctuation, so it prints hello world. It walks the ring both ways, back from h to e, and back from the space through z, y and x to w.
Further
See also
Also in Jokes
Write your own in Run Convert a program from hatemath
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: hatemath.
Command line
shib run hatemath -e '[>++++++]<]*]*]]'shib manual hatemathSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/hatemath.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org