Description #
Befunge-98 is a two-dimensional esoteric programming language where the instruction pointer moves in multiple directions across a grid of instructions, allowing self-modifying and highly unconventional code flow.
History #
Befunge was created in 1993 by Chris Pressey to challenge conventional programming paradigms by making code flow two-dimensional rather than linear. Befunge-98 is a standardized version released in 1998 with additional features and clarifications.
Hello World Code #
0"!dlroW ,olleH">:#,_@
How to Run #
Option 1: Online
Run code at Try It Online – Befunge.
Option 2: Local
- Install a Befunge interpreter like
befunge98
- Run code with:
befunge98 hello.bf
Key Concepts #
- Two-dimensional instruction pointer movement
- Supports self-modifying code
- Uses a stack-based execution model
- Instructions include arithmetic, flow control, and I/O
- Supports multiple directions (up, down, left, right)
- Programs are represented on a 2D grid of characters
- Uses
@
as program end - Can create complex behaviors with minimal code
- Limited practical use; mostly for exploration and puzzles
- Part of the esolang community challenges
Try It Online #
Fun Facts #
- Befunge code looks like ASCII art due to its 2D layout.
- The language allows the instruction pointer to wrap around edges of the code grid.
- Befunge was designed to be difficult to compile, highlighting language design limits.
- Befunge-98 introduced string-mode, multiple instruction pointers, and other extensions.
- It inspired other esoteric languages focusing on non-linear execution flows.