???

From Esolang
Jump to navigation Jump to search

??? is an esoteric programming language created by Stack Exchange users Alex A. and BrainSteel. It uses the punctuation within a literary work to perform operations akin to those of Brainfuck.

The name “???” was chosen so that it would be hard to tell that a program in an unknown language was written in this language. The name is hard to search for, and ironically matches the “???” text meaning “language not yet identified” in the programming challenge that inspired it.

Language overview

Like Brainfuck, ??? operates on an array of memory cells, also referred to as the tape, each initially set to zero. There is a pointer, initially pointing to the first memory cell. The commands are:

Command Description
; Move the pointer to the right
- Move the pointer to the left
. Increment the memory cell under the pointer
, Decrement the memory cell under the pointer
! Output the character signified by the cell at the pointer
? Input a character and store it in the cell at the pointer
" Jump to the matching " if the cell under the pointer is 0
' Toggles whether subsequent " commands (in the source) start or end a loop

All other characters do not affect execution and can be regarded as comments.

This language is very similar to a TrivialBrainfuckSubstitution; nested loops can be implemented using the ' command to specify which double quotes match which other double quotes.

Initially, " begins a loop.

Programs

Cat Program

?"!",'"?"

Hello World

..........";.......;..........;...---,'";..!;.!.......!!...!;..!--...............!;!...!,,,,,,!,,,,,,,,!;.!

External resources