Rain

Rain is a two-dimensional fungeoidal esoteric programming language invented in 2017 by dok with the goal of being difficult to write while remaining possible to compile.

Concepts
Rain is a two-dimensional language, the code can be read in only two directions either up or down, left and right direction are used for function call. It is a stack-based language, so all operations are performed on a stack. In addition to the arithmetic stack a function call stack can be used to store information as one value can be stored and retrieved per function context. In a way each column can be considered as a method, thus libraries can be created and used with the necessity of doing the proper "placing and routing".

Code execution
Rain can be executed in two directions, from top to bottom or from bottom to top. The main program start out at (0,0), i.e. the top-left of the file. It initially moves down. Execution will not stop until a  instruction is met (on the main program), or an error occurs. Trying to execute a space instruction will raise an error, trying to execute an instruction outside of the program bounds will raise an error too.

In the following example, the Instruction Pointer moves downwards, make a jump to the right  , upwards   and return  to the main program and stops. : ; > | ;

Instructions
Rain has the following commands:

Hello, world!
: + ; : 5  : 5   : 0   > |   ;

Factorial
Asks for a number, and outputs it's factorial. Assumes the input is a non-negative integer. & ; ^ > | ? 1 ) ! ^ ? > | ; # : ^ 5 : 1 5 : - + | < $  * ;   ;

Fibonacci sequence
Asks for a number, and outputs all the Fibonacci numbers up to  , with   starting at   with   and. 0 ;  ;   1 > | <   & : .,   1 : : +   + : , _   > | 0 > | 5   ) \ ^ 5   ? . # +   ; - " $   , 1   ;   > | "     ;   $         ;

Ackermann function
Ask for two numbers an return the result of the Ackermann function.

& ;  ; & > | < ; > | _ : + # : . : 1 5 :, : ` 5 : ? : \ + : > : | $ : , : ; : ? :   : ; :   1 ^ :   - . :   1 , :   ` ? :   | < :     , :     ? :     ; :     _ :     \ :     1 :     - :     > |     \ :     1 :     - :     \ :     > |      ;

Pascal's Triangle
Ask for a number  and print the Pascal's Triangle up to   row

1       1       ; & ; ;   > | | <,   ; . ^ : > | ? , 0 : + . ~ # ) : 5 > | 8 ? : 5 , : 4 ! , . $ : * > 1 | ; : $ 1 > | < | < - . _ |   , ^ : + :   ; 0 : . : ) : ~ : ^ : 1 : ? : = : ; : ? : ? : > | ! : ,   > | ;   ;

print string
This method can be used to print the stack as characters up to the first null value. ; call-> | < ^ :       ? $        ; :        > |        ;

stack reverse
This method can be used to reverse the entire the stack. ; ; call-> | < , . | <       ~ : ?        1 : =        = : 1        ? : ~        > | .       , : \        > > |        ; ;

which is the same as : public void reverse(Stack st) { int m = (int)st.Pop; if (st.Count != 1) reverse(st); Push(st, m); } public void Push(Stack st, int a) { int m = (int)st.Pop; if (st.Count != 0) Push(st, a); else st.Push(a); st.Push(m); }