BrainCube

BrainCube is an esoteric programming language inspired by brainfuck, that uses a 3D memory cube instead of brainfuck's memory tape. In addition to the memory cube, BrainCube also adds user-declared pointers, and control flow structures.

Pointers
To declare a new pointer, write the pointer's name, surrounded by white space. Example:

To execute commands using a pointer, write the pointer's name followed by a sequence of pointer commands in parentheses. Example:

Control flow
If statements will execute if the target of the given pointer is a non-zero value. Syntax: (pointer_name){More BrainCube code}

While statements will repeatedly execute while the target of the given pointer has a non-zero value. Syntax: (pointer_name)[More BrainCube code]

Repeat statements will execute n times, with n being the initial value of the pointer's target cell, or a number literal written in place of the given pointer. Syntax: (pointer_name OR number_literal)(More BrainCube code)

Hello, World!
/** Initialization **/ ~ch~ ch(XXXXXXX) /*Move to [7][0][0]. The first 256 cells of the tape at [7][0] will hold ASCII values.*/ /** Set cells [7][0][0]..[7][0][255] to 0..255 **/ ch(>+)         /*Set [7][0][1] to 1*/ (ch)[ (ch)(        ch(>+<) /*Increase the cell to the left of the current cell by one.*/     )           /*The result of this repeat loop is setting the cell to the left of ch to the value of ch*/ ch(>+)     /*Move ch to the left, and increment that cell's value, setting the value of [7][0][n] to n*/ ]              /*This loop exits after the value of ch overflows back to zero.*/ ch(<) (ch)[ch(<)]    /*Go back to [7][0][0]*/ /** Print "Hello, World!" followed by null terminator and newline **/ /*    Each line moves ch to [7][0][the number in the parentheses], prints the value as a character, and moves back to [7][0][0] */ (072)(ch(>))ch(.)(ch)[ch(<)] /* H */ (101)(ch(>))ch(.)(ch)[ch(<)] /* e */ (108)(ch(>))ch(.)(ch)[ch(<)] /* l */ (108)(ch(>))ch(.)(ch)[ch(<)] /* l */ (111)(ch(>))ch(.)(ch)[ch(<)] /* o */ (044)(ch(>))ch(.)(ch)[ch(<)] /*, */ (032)(ch(>))ch(.)(ch)[ch(<)] /*   */ (087)(ch(>))ch(.)(ch)[ch(<)] /* W */ (111)(ch(>))ch(.)(ch)[ch(<)] /* o */ (114)(ch(>))ch(.)(ch)[ch(<)] /* r */ (108)(ch(>))ch(.)(ch)[ch(<)] /* l */ (100)(ch(>))ch(.)(ch)[ch(<)] /* d */ (033)(ch(>))ch(.)(ch)[ch(<)] /* ! */ (000)(ch(>))ch(.)(ch)[ch(<)] /* \0 */ (010)(ch(>))ch(.)(ch)[ch(<)] /* \n */

External Resources

 * Official GitHub Repository
 * Interpreter Written in C++