Befreak is a purely reversible two-dimensional programming language. It was inspired by the Chris Pressey’s Befunge programming language. Like Befunge, all Befreak instructions are written as a single character, and execution can flow north, south, east, and west.
The thing that makes Befreak special is its reversibility. Every instruction in Befreak is by its very nature reversible. At any point during execution, if you’d like, you can pause the system, toggle the “reverse” flag, and then upon resuming, the program will run itself backwards from its current state, eventually ending up at the very beginning, where it started. This feature is not accomplished by keeping a history of past states, but simply by virtue of the fact that each individual instruction is reversible. This means that Befreak contains no instructions that can destroy information; this can make programming in the language both challenging and interesting.
Example program (prints prime numbers):
/1)@(1\ >)1=1(< \'(v?)/ >'%s(\ ^ >*s)=/ >=< ( /s'0v^?w23(v`s]:(48\ [ ( ) + ) = = 4 0 c c 8 1 = = ) % ) ( w \01(^ ^)01*01(/