???
Brainfuck written in punctuation, where one quote mark is both ends of a loop.
ararslan, 2015 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 4 known programs · Hello World on Try It Online: identical · Test method
Run it
The idea
??? swaps brainfuck's eight commands for punctuation, so a program looks like the stray marks of a sentence. The interesting part is the loop. There is only ", and it opens a loop until a ' has been seen; after an odd number of ', a " closes one instead. So brainfuck's ] is written '"', a quote flipped in and back out.
The machine
3,000 byte cells that wrap and a pointer that cannot go left of cell 0. This implementation follows the C++ interpreter in the repository ararslan/qqq-lang, which is what TIO runs.
| ??? | brainfuck | Does |
|---|---|---|
; - | > < | Move right; left, staying at cell 0 |
. , | + - | Add 1; take 1 |
! | . | Print the cell |
? | , | Read a character, skipping blanks |
" | [ or ] | Open a loop, or close one after an odd number of ' |
! prints a character from space to ~ as itself and any other value as 0x and its hex, so a newline shows as 0xa. The cells are signed, so 255 shows as 0xffffffff.
Example
The first program is brainfuck's ++++++++[>++++++++<-]>+..
The first program is brainfuck's ++++++++[>++++++++<-]>+.. The loop closes with '"'.
Patterns it teaches
- Turing tarpit: a letter for letter brainfuck.
- Camouflage: code that looks like leftover punctuation.
Further
- The interpreter, in C++
See also
??? builds on Brainfuck.
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: qqq.
Command line
shib run qqq -e '!,!'shib manual qqqSource
- Module
langs/tio/ports.js- Interpreter
langs/tio/qqq.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org