esolang

操脑

Brainfuck in eight Chinese characters, each of which looks like a command and does its opposite.

None1, 2024 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: cat

The idea

None1 made 操脑 in 2024. It is ReverseFuck in Chinese, and ReverseFuck is brainfuck with every command turned around. In Chinese 脑 means brain and 操 means fuck, so the name is brainfuck read backwards. It is also the reverse of 脑操.

Read the story

Each character looks like a brainfuck command and does the opposite one. 十 looks like a plus and subtracts 1, 一 looks like a minus and adds 1, 《 points left and moves right. The loop opens with a closing bracket and closes with an opening one.

The machine

CharacterLooks likeBrainfuck
一-+
十+-
《<>
》><
。.,
,,.
))[
((]

This implementation runs it as the Python interpreter on the specification does. The specification's table puts , beside the brainfuck , and 。 beside ., but its Python and both its programs print with , and read with 。. The tape has 1,000,000 byte cells that wrap, and reading past the end of the input stops the run with an error, as it does in the Python.

Example

The cat is ,[.,] in brainfuck.

The cat is ,[.,] in brainfuck. It reads with 。, opens the loop with ), prints with ,, reads again and closes the loop with (. After the last character it reads past the end of the input and stops with an error, as the Python does.

Hello, World! is the best known brainfuck Hello World, put through the table. It prints Hello World! and a line feed.

Expected: Hello World!

Patterns it teaches

Further

操脑 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: u64cd-8111.

Command line

shib run u64cd-8111 -e '。),。(' --input 'hi'
shib manual u64cd-8111

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/u64cd-8111.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org