PNID

PNID means "Previous, Next, Increment, Decrement" and is a superset of Brainfuck.

Language overview
As Brainfuck, PNID 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:

For compatibility with brainfuck, the commands  are also accepted instead of.

Interpreter
The Interpreter accept the following commands:

If the execution enters a loop or a deadlock, you can break out of it by pressing.

Hello, World!
This program prints out the words Hello, World!: "Hello, World!"^(.n)

Hello, name!
This program asks for your name, then greats you: "What's your name? "^(wn)c^$n"Hello, "p(p)n(wn)^(wn)'!w

Coin toss
Every time you executes this program, it will give heads or tails: i%^(n"heads"ppppp(wn))^d(c^"tails"^(wn))

Memory and wrapping
In the current implementation of the C# interpreter, the memory has  cells, each of has   size.

Related languages

 * Brainfuck.
 * pbrain is a brainfuck extension that supports procedures.
 * cbrain is a derivative of pbrain as implemented in pbrain.c, adding integers and operators.
 * RUM stands for "bRainfUck iMproved." and adds procedures, strings and repetition.
 * Toadskin is a brainfuck variant that supports procedures, but uses a stack instead of a tape.
 * Brainfork adds a Y command to fork the current thread.
 * Fm edits a string on alphabet {0,1,...,m-1} (m >= 2).
 * FRAK assemble instructions to brainfuck code.
 * FukYorBrane and BF Joust pit two Brainfuck-like programs against each other, as in Core War (see Redcode).
 * Smallfuck operates only on bits and has no input- or output-commands.
 * Spoon uses a Huffman coded set of instructions corresponding to Brainfuck's commands.
 * BrainDuino BF port on Arduino HW platform (based on Atmel's ATMega). Extended by two special I/O operations and special overflow protection.
 * Puzzlang turns every program into an exercise in patience and logic puzzle skills. The lone X operator becomes any of brainfuck's instructions, depending on the surrounding characters.
 * Alarm Clock Radio throws away the instructions to decrement the memory pointer or memory value.
 * Portal and Portal 2 allows code-level pointer manipulation and theoretically implements the Wang-B Machine.
 * tbf is a language that can be compiled to Brainfuck. It includes variables, strings, macros and improved loops.
 * Grin adds more efficient arithmetic functions to Brainfuck.
 * tinyBF and its variant RISBF are brainfuck equivalents with only 4 opcodes.

Some other funny variants:


 * Ook! works exactly like brainfuck, except the syntax is in Orangutan.
 * Blub is the same for fish.
 * Matisse uses colors to merge brainfuck codes and program comments.
 * Brainloller has the same commands as brainfuck, except they're read from a png image.
 * COW is like Ook!, except with a bovine syntax.
 * Pi obfuscates Brainfuck instructions in random errors in pi digits.

Some languages inspired by brainfuck, but with more major differences:


 * Aura requires data to be stored in the code space.
 * PATH and SNUSP attempt to combine brainfuck with Befunge.
 * Wierd arose out of an earlier attempt to combine brainfuck with Befunge.

External resources

 * PNID Interpreter in C#.