Befunge is a stack-based, reflective, esoteric fungeoid programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, right, up or down, and loops are constructed by sending the control flow in a circle.
p command allows for self-modifying code. Nevertheless, a number of compilers have subsequently been written. A number of extensions to the original "Befunge-93" specification also exist, including Funge-98, which extends the concept to an arbitrary number of dimensions and can be multithreaded, with multiple instruction pointers operating simultaneously on the same space. Befunge-extensions and variants are called Fungeoids or just Funges.
The Befunge-93 specification restricts each valid program to a grid of 80 instructions horizontally by 25 instructions vertically. Program execution which exceeds these limits "wraps around" to a corresponding point on the other side of the grid; a Befunge program is in this manner topologically equivalent to a torus. Since a Befunge-93 program can only have a single stack and its storage array is bounded, the Befunge-93 language is, unlike most machine languages, not Turing-complete. The later Funge-98 specification provides Turing-completeness by removing the size restrictions on the program; rather than wrapping around at a fixed limit, the movement of a Funge-98 instruction pointer follows a model dubbed "Lahey-space" after its originator, Chris Lahey. In this model, the grid behaves like a torus of finite size with respect to wrapping, while still allowing itself to be extended indefinitely.
More on [ Befunge ]
Intercal :: Languages
Procedural :: Interpreted
Obfuscated :: Languages
Procedural :: Languages
Reflective :: Languages

Program - Three-line chunk of source code written by Tim Gilbert.
Befunge CPAN Module - Official Perl extension for interpreting Befunge.
500
Cat's Eye Technologies' Befunge-93 - The official web site for the Befunge-93 programming language; maintained by Chris Pressey, the creator of Befunge.
Dictionary of Programming Languages Befunge Page - Brief language fact sheet, complete with links to conceptually related languages.
Dufflebunk's - Two Funge implementations. JavaScript Funge: Funge-98 in JavaScript. Object-Oriented Funge.
Meta Description: [ Dufflebunk's site about Funge, object oriented Funge, and various other projects by Dufflebunk. ]
Funge-98 Final Specification - The official specification for the 1998 revision to Befunge-93.
404
Mooz's Befunge Programs - A number of programs written in and related to Befunge. Includes an interpreter for the TI-86 calculator and an example of how to do floating point division in Befunge.
Ninety-Nine Bottles of Beer - Befunge version of the infamous beer song program.
Tim's Befunge Compiler - This pseudo-compiler will create an ANSI C program from a Befunge-93 source file. Programs can still be self-modifying even after they are compiled.
VSync's Funge Stuff - Features a portable Befunge-93 pseudocompiler and several other compilers and interpreters. Demonstrates how to use Befunge as a CGI scripting language.
500
Wierd - Absolutely sick Befunge-descendant language.
Yabi93 - Yet Another Befunge93 Interpreter, for the esoteric programming language, coded in Java 1.5, uses Swing for graphical interface. YABI supports a multilanguage GUI.
ZBefunge - A Befunge-93 interpreter written in Inform, and runnable on just about anything.
| Pixel City - Procedurally generated city | |
| Next Video | |