Insanity

From Esolang
Jump to navigation Jump to search

Insanity is an esolang conceived by User:PythonshellDebugwindow and finalized by User:A. It’s based on Einstein’s definition of insanity—doing the same thing over and over again and expecting a different result.

Program structure

The whole program is wrapped in an infinite loop, because in the body of the infinite loop the same thing is repeated over and over again. However, since there are mutable variables, you can expect a different result on every iteration of the loop, making you at least partially sane.

In the first line a set of variables is defined and is assigned to a specific value. Different variables are separated with commas. E.g.

1,1+2,5

They are assigned to a, b, and c, respectively. All assignable variables are a-z and A-Z, and operators are + - * /.

In the remaining lines an infinite loop is set to iterate these variables.

Example programs

Fibonacci sequence

0, 1
b, a+b