QO


 * The title of this article may well be qo, due to typically being lowercased except, often, at the start of a sentence.

qo is an esoteric programming language inspired by Brainfuck and made by SplittyDev. qo is like a stack-based Brainfuck.

Language overview
qo operates on an array of memory cells, also referred to as the tape, each initially set to zero. It also has a stack. There is a pointer, initially pointing to the first memory cell. The commands are:

All characters other than  should be considered comments and ignored.

History
qo was invented by SplittyDev in 2015, and is a weird little programming language, extending brainfuck with interesting new features and a stack. Even though it is derived from brainfuck and even compatible with it, it would be wrong to say that it is just another brainfuck clone. It's something completely new, with endless possibilities.

It is a wonderful language with a terrible syntax, made to counter the language JacobFck.

Hello, World!
This program prints out the words Hello World!:

Hello           ' push 'H' 'e' 'l' 'l' 'o' on the stack ++****:         ' push a space char on the stack (0x20) world! ' push 'w' 'o' 'r' 'l' 'd' '!' on the stack @               ' reverse the stack contents [               ' loop until cell value is 0 >;.         ' switch to another cell, pop a letter and print it     <-           ' switch to the counter cell and decrement its value ]               ' end loop
 * 1)                ' count the elements on the stack

The same program in minimised form:

Hello++****:world!@#[>;.<-]

Move value
This code piece moves the value of the current cell (cell0) two cells to the right (cell2): :[-]>>;

With indentation and comments the same code looks like this: Code:  Pseudo code: :      Pushes the value of cell0 to the stack [-]    Set cell0 to 0 >>     Move the pointer to cell2 ;      Pops the stack and sets the cell to its value

Cat
A cat program writes its input directly to its output. As there is not a standard way to handle EOF in qo, there are four versions of the program below, labelled by how they match common implementations of the interpreter. (see Implementation issues).

EOF returns 0: ,[.,]

EOF returns -1: ,+[-.,+]

No change on EOF, or EOF returns 0: ,[.[-],]

No change on EOF, or EOF returns -1: ,+[-.[-]-,+]

Memory and wrapping
The memory should have a size of at least 30,000 32-bit integers. The stack should have a size of at least 512 32-bit integers. The source code should be treated as Unicode character stream if possible, ASCII otherwise. Ignore everything starting from a ' character until encountering line feed. Don't wrap cells by default, but provide an option to do so.

Algorithms
See Brainfuck algorithms, Brainfuck constants.