The Brink of Insanity

From Esolang
Jump to navigation Jump to search

The Brink of Insanity is an esolang created by Infinite Hexagon designed to be totally heinous, despicable, and utterly chaotic.

This is still a work in progress. It may be changed in the future.

Syntax

Creating New Functions

To create new functions, you start with "rule" followed by the name of the function and a semicolon. Here is an example

rule dec: 
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++
+++++++++++++++++ 
+++++++++++++++++
+

Instructions / Programs

Command Description
> Move the pointer right - Same as > in brainfuck.
: Go to the first cell in the memory pointer.
{ Conditional branch - Jump back to the matching conditional branch "{" when the cell under the pointer is not equal to 255 or 0.
} Input / output - If the cell under the pointer is equal to the amount of "}"s in the program, then take input. If the cell under the pointer is equal to the amount of "{"s in the program, then output the cell under the memory pointer. If the cell under the memory pointer equals the amount of "{" and "}"s in the program, then act as a no-op.
+ Increment - Same as + in brainfuck.
- Decrement - Same as - in brainfuck.

Programs

One Time Cat

rule cat:
:+}{-{++}

Explanation:

rule cat:      Define a new function called cat.
:+             Go to the first cell, then increment by 1.
}              One IO branch and cell equals one, so take input.
{-{            Decrement cell by one to zero, so don't jump.
++}            Increment cell by two, and two conditional branches equals two, so output the input