Derpian



Derpian is a derivative of Ook! and as such has only three distinct elements of syntax, Derp, Herp, and Muffin, which are combined into groups of two to define eight different commands. There are no line breaks.



A Derpian program has an implicit byte pointer, called "the pointer", which is free to move around within an array of 30000 bytes, initially all set to zero. The pointer itself is initialized to point to the beginning of this array.



The following is the entire language, eight commands. (What do you expect for something used by ponies?) The syntax elements are separated by spaces.



* Derp Herp:

Move the Memory Pointer to the next array cell.



* Herp Derp

Move the Memory Pointer to the previous array cell.



* Derp Derp

Increment the array cell pointed at by the Memory Pointer.



* Muffin Muffin

Decrement the array cell pointed at by the Memory Pointer.



* Derp Muffin

Read a character from STDIN and put its ASCII value into the cell pointed at by the Memory Pointer.



* Muffin Derp

Print the character with ASCII value equal to the value in the cell pointed at by the Memory Pointer.



* Muffin Herp

Move to the command following the matching Herp Muffin if the value in the cell pointed at by the Memory Pointer is zero. Note that Muffin Herp and Herp Muffin commands nest like pairs of parentheses, and matching pairs are defined in the same way as for parentheses.



* Herp Muffin

Move to the command following the matching Muffin Herp if the value in the cell pointed at by the Memory Pointer is non-zero.





A derpian program is thus many times longer than its Ook equivalent. A converter to both Ook and BF, its ultimate ancestor is a trivial affair.



Derpian is somewhat difficult to write in due to the limited number of commands, for example one could output the letter 'p' by incrementing the value in an array cell 112 times before outputting it. If anything, this gives an appreciation of just how much groundwork more complex programming languages do for you.