Crypten
Sixteen commands, one per hex digit, packed four to a character.
Ϫ, 2025 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Ϫ made Crypten in 2025, after the "X bits X bytes" languages, and calls it a code golfer's best nightmare. Underneath it is brainfuck on a grid. A pointer moves over cells in four directions, and there are commands to change a cell, loop, read and print.
Read the story
The catch is how a program is written. Every command is one hex digit, and four digits together are the code point of one Unicode character. The cat 00EB is written ë, and the adder is an Arabic letter followed by a Korean syllable.
The machine
| Digit | Does |
|---|---|
0 | Nothing |
1 2 | Add or take 1 from the cell |
3 4 5 6 | Move left, up, right or down |
7 | Go back to the top-left corner |
8 9 | 8 goes back to the last 9 when the cell is 0 |
A E | Read a number, or a character |
B C | Print the cell as a character, or as a number |
D | Add the cell to the one below it and clear it |
F | End the program |
The grid has a top-left corner and goes on forever right and down. When A gets something that is not a number it prints THAT AIN'T A NUMBER, SONNY. instead.
Example
The cat ë is 0 0 E B, which reads a character and prints it.
The cat ë is 0 0 E B, which reads a character and prints it.
The adder ڤ구 is 06A4 AD6C. It moves down and reads a number, moves up and reads another, adds the upper one into the lower with D, moves down and prints.
The truth machine A291 C28F reads a number and takes 1. Then it adds 1, prints and takes 1 again, in a loop that 8 repeats while the cell is 0. So 0 prints 0 once and 1 prints 1 forever. The specification writes its second character as U+C29F, which has a 9 where the 8 should be and prints 1 only once; either way 0 gives 0.
The doubler only doubles if 8 goes back while the cell is not 0, which is the opposite of the rule and of the truth machine. This implementation follows the rule as written, so on 5 the doubler prints 2.
Patterns it teaches
- Encoding tricks: the program text is a number written in base 65,536.
Further
See also
Matrix-based
Write your own in Run Convert a program from Crypten
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: crypten.
Command line
shib run crypten -e 'ë' --input 'x'shib manual cryptenSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/crypten.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org