掉爆子脑
Brainfuck in eight Chinese characters, each one swapped for its opposite.
PSTF, 2024 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
PSTF made 掉爆子脑 in 2024 as the reverse of 脑子爆掉, a brainfuck written in Chinese characters. The name is 脑子爆掉 read backwards, and every command is the opposite word of the one in 脑子爆掉. Right stands for left, down for up, write for read and end for start. So 左, left, moves the pointer right, and 终, end, opens a loop.
The machine
| Character | Means | Brainfuck |
|---|---|---|
右 | right | < |
左 | left | > |
下 | down | + |
上 | up | - |
写 | write | , |
读 | read | . |
终 | end | [ |
始 | start | ] |
This implementation runs it as the Python interpreter on the specification does. The tape has 1,000,000 byte cells that wrap, and as in Python a move left of the first cell reaches the last ones. 写 gives 0 at the end of the input. The Python reads the program from standard input, which leaves no input for 写, so this implementation keeps the program and its input apart.
Example
The first is the cat, ,[.,], which reads as write, end, read, write, start.
The first is the cat, ,[.,], which reads as write, end, read, write, start. The second is the brainfuck ++++++++[>++++++++<-]>+. put through the table. It multiplies 8 by 8, adds 1 and prints 65.
Patterns it teaches
- Turing tarpit: brainfuck under another alphabet.
- Encoding tricks: each command is the opposite of what it says.
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: u6389-7206-5b50-8111.
Command line
shib run u6389-7206-5b50-8111 -e '写终读写始' --input 'hi'shib manual u6389-7206-5b50-8111Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/u6389-7206-5b50-8111.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org