Unefunge and Trefunge
Befunge’s commands on a line (Unefunge) and in three dimensions (Trefunge), from the Funge-98 family.
Chris Pressey, 1998 · esolangs.org
Tested with 6 examples and 8 known programs · Test method
Run it
Hello World: Unefunge (93 instruction set)
Expected output
Hello World!
Output
What it is
Unefunge (93 instruction set) (langs/grid). the Funge family on one engine: Befunge-93 80x25, Unefunge 1D, Trefunge-lite 3D with form-feed layers
Read the story
Trefunge-lite (langs/grid). the Funge family on one engine: Befunge-93 80x25, Unefunge 1D, Trefunge-lite 3D with form-feed layers
How its machine works
Its machine has a stack of values, a page whose edges wrap.
Examples
Hello World: Unefunge (93 instruction set)
Expected output
Hello World!
Output
Example: Unefunge (93 instruction set)
Expected output
abc
Output
Hello World: Trefunge-lite
Expected output
Hello World!
Output
Hello World: Trefunge-lite
Expected output
Hello World!
Output
Hello World: Trefunge-lite
Expected output
Hello World!
Output
Quirks
- Trefunge-lite implements part of the language, as described above.
- A run stops after 3,000,000 steps.
See also
Multi-dimensional languages
Self-modifying
Write your own in Run Convert a program from Unefunge and Trefunge
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: unefunge.
Command line
shib run unefunge -e '&&+.@' --input '3 4'shib manual unefungeSource
- Module
langs/grid/index.js- Interpreter
langs/grid/funge.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org