啊!
Ook! in Chinese. Every word is 啊, "ah", and only the mark after it changes.
Turing complete: yes · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
The specification says 啊! is the same as Ook!. Ook! spells brainfuck in pairs of Ook., Ook? and Ook!. The word is 啊, "ah", with a Chinese full stop, question mark or exclamation mark after it. Two words make one command, so the nine pairs give brainfuck's eight commands and one that does nothing.
The machine
| Pair | Brainfuck | Does |
|---|---|---|
啊。啊? | > | Move right |
啊?啊。 | < | Move left |
啊。啊。 | + | Add 1 |
啊!啊! | - | Take 1 away |
啊。啊! | , | Read a byte |
啊!啊。 | . | Print the cell |
啊!啊? | [ | Skip past the matching 啊?啊! if the cell is 0 |
啊?啊! | ] | Go back to the matching 啊!啊? if it is not |
啊?啊? | Nothing |
The rest is as in the Python interpreter by None1. Whitespace is removed and what is left is read four characters at a time, so anything that is not one of the nine pairs is an error before the run starts. The tape has 1,000,000 byte cells that wrap, and 啊。啊! stores 0 at the end of the input. The specification says 啊?啊? waits one second; the Python does not wait, and neither does this implementation.
Example
The Hello, world program is 199 pairs on 22 lines.
The Hello, world program is 199 pairs on 22 lines. Each letter is built from the one before, with a small loop for the big steps; 8 times 8 plus 8 is 72, an H.
The cat is brainfuck's ,[.,], five pairs.
Patterns it teaches
- Encoding tricks: three marks after one word, read in pairs, give nine commands.
- Turing tarpit: brainfuck's eight commands and nothing more.
Further
See also
啊! builds on Brainfuck.
CJK
Brainfuck equivalents
Write your own in Run Convert a program from 啊!
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: u554a-ff01.
Command line
shib run u554a-ff01 -e '啊?啊?'shib manual u554a-ff01Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/u554a-ff01.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org