Esoteric Programming Languages

Dr. Mathias Elsner

Remaining sane in insane times

Beware Befunge!

Befunge can be addictive. Befunge robs life. Befunge may impair your ability to drive. Once hooked, your mental and physical health are at peril. You risk disruption of your professional and personal lives. You have been warned.


WTF is befunge?

Befunge is a stack-based programming language. The code is executed on a two-dimensional field (usually 80 x 25 characters, corresponding to the classic terminal window). Befunge code can be self-modifying. Together with the possibility of random changes of direction, this makes the language practically uncompilable. Befunge is best explained by observation.


Befunge is available even for Windows users.

The above link leads to a collection of very promising tools, which I have not yet tested myself due to the lack of a Windows computer.


The easiest way to try out Befunge commands is using an online interpreter. To save you long searches, I have deployed a simple

javascript environment

here. Beware.

Befunge Instructuions

Excerpt of peculiars:

  • >
    (moves pointer to the right)
  • <
    (moves pointer to the left)
  • ^
    (moves pointer upwards)
  • v
    (moves pointer, your guess?)
  • ?
    (random change of direction)
  • @
    (end of program execution)
  • _
    (horizontal IF)
  • |
    (vertikal IF)
  • "
    (string mode on/off)
  • .
    (POP stack as integer)
  • ,
    (POP stack as ASCII)
  • p
    (PUT ASCII to stack)

Impressum ©2020 mathias.elsner

Sorry, these pages don't scale well on mobile devices...

Valid XHTML | CSS

I'm en route to extinction