Home Befunge
News News
Befunge Befunge
   - Programs
   - Compilers
   - Interpreters
   - Documentation

Doom Doom
Inform Inform
Quake Quake
RISC OS RISC OS
Misc Misc
Links Links
Contact Contact

Stuff in this part of the site


Befunge programs

Befunge binary quine

Befunge binary quine

This quine will output itself in binary:

:0g:84*-!#@_801p0>_#":2%86*+\2/01g1-:01p0\#"_$$,,,,,,,,1+
Befunge-98 'TURT' fingerprint quine

Befunge-98 'TURT' fingerprint quine

A quine for Befunge-98 interpreters which support the 'TURT' fingerprint. It will draw itself using the turtle device.

Befunge-93 compatability tool

Befunge-93 compatability tool

A Befunge-93 program that performs a set of specification compliancy tests on your interpreter.

Befunge-in-befunge interpreters

Befunge-in-befunge interpreters

A set of Befunge interpreters written in Befunge, in varying states of usefulness.

Befunge-in-unefunge interpreter

Befunge-in-unefunge interpreter

A Befunge interpreter written in Unefunge.

BefungeWars

BefungeWars

My incomplete fusion of CoreWars and Befunge.

Division tester

Division tester

A befunge-93 program to verify the behaviour of the division and remainder instructions.

'Fungus' Funge-98 diagnostics tool

'Fungus' Funge-98 diagnostics tool

A suite of programs and auto-loader to test for a plethora of features that a spec-compliant funge-98 interpreter should support.

Hamming code generator

Hamming code generator

An inefficient program to generate the Hamming code of the supplied hex string.

Obligatory factorial program

Obligatory factorial program

":rebmun a retne esaelP">:#,_$1&>: #v_$\:#v_$.@
                                ^-1:<^00 *<
Suicide programs

Suicide programs

Just for fun, I wrote a couple of 'suicide' programs that erase themselves:

96*0>_#"84*\:0\1-:0\1+#"_$$ pppppppppppppppppppppppppp

... and a shorter version ...

"2"0>_#"84*\1-:0\:0\#"_$$ppppppppppppppppppppppppp
Roller programs

Roller programs

A variation of the troll programs (see below), these ones move around fungespace by 'rolling' themselves.

sudoku1.bf
(sudoku1.bf, 3,476 bytes)

Sudoku solver

A fairly inefficient program to solve Sudoku puzzles. The puzzle can theoretically be any size, the program will detect it itself. Needs a graphical interpreter so you can view the result.

Troll programs

Troll programs

A set of programs that copy/move themselves around fungespace.

ytest.bf
(ytest.bf, 507 bytes)

Y-test

A smallish Befunge-98 program to display the output of the Y command. Only works on interpreters that implement all the Y variables, since the full set is requested.


Interpreters

For Befunge-in-Befunge/Unefunge interpreters, see above.

"!Befunge" RISC OS WIMP Funge-98 interpreter

"!Befunge" RISC OS WIMP Funge-98 interpreter

All-singing, all-dancing Funge-98 interpreter for RISC OS. Can also be compiled as a console app for non-RISC OS machines.

bepro.pro
(bepro.pro, 6,646 bytes)

Befunge-93 in Prolog interpreter

A simple Befunge-93 interpreter written in Prolog.

It doesn't entirely obey the spec (in particular integers are read as terms and so must end in a full stop (and could even be entered as floating point numbers)), but it should work OK.

"bef1k" 1k ARM code Befunge-93 interpreter

"bef1k" 1k ARM code Befunge-93 interpreter

A Befunge interpreter written in 1K of ARM assembler.

interfunge.zip
(interfunge.zip, 9,015 bytes)

Interfunge

A Befunge-93 interpreter written in INTERCAL.

Apologies for making the code so readable, but this was my first INTERCAL program. When the interpreter is started it reads the Befunge program from standard input; enter a blank line to signify the end of fungespace. Currently number IO is performed using WRITE IN and READ OUT, this may change to decimal character IO if decimals aren't proven to be a new-age fad. The interpreter should mostly work, if you find something that doesn't then have fun fixing it. Code is now licensed under the GPL v2.


Compilers

Befunge-93-to-almost-anything compiler, written in Prolog

Befunge-93-to-almost-anything compiler, written in Prolog

My first attempt at compiling Befunge programs. Doesn't support self modifying code, but can perform some simple optimisations on the output.

Befunge-98-to-almost-anything compiler, written in Befunge-98

Befunge-98-to-almost-anything compiler, written in Befunge-98

A new compiler, developed from the one presented above. Doesn't support self-modifying code, the full Befunge-98 spec, or any optimisations, but is probably the only Befunge compiler written in Befunge. Can compile itself.

Befunge-98-to-C compiler, written in C

Befunge-98-to-C compiler, written in C

A more sensible version of the above compiler. Supports more of the Befunge-98 spec, and can optimise the resulting code.

C-to-Befunge compiler

C-to-Befunge compiler

My perpetually work-in-progress attempt at converting C code to Befunge.


Documentation

dynafing.txt
(dynafing.txt, 10,154 bytes)

Dynamic Fingerprint Specification

This page details the dynamic fingerprint system I've implemented in my Funge-98 interpreter !Befunge. It's based around the systems used by the PJSF, zfunge, and RC/Funge-98 interpreters, so fingerprints should be fairly cross-compatible. However it also implements several improvements, such as fingerprints loading fingerprints, file access, simpler controls over the 'haunted' IP, etc.



Page last modified 11/03/2008