Got egnufeB?
News News
Befunge Befunge
   - Programs
   - Compilers
   - Interpreters
   - Documentation

Doom Doom
Inform Inform
Quake Quake
Misc Misc
Links Links
Contact Contact

Befunge-98 'TURT' fingerprint quine

(tquine.bf, 2,915 bytes)

As far as I know this is the first quine of its kind - one that draws itself using the Funge-98 'TURT' (Grahpics turtle) fingerprint. The output should look something like this:

quine output
(As produced by !Befunge; also available as a Draw File for viewing on RISC OS or with Oak Draw on a PC)

The program layout is relatively simple, but squeezing it into the space it takes was a bit of a challenge. Consequently the letters aren't always well-formed, as can be seen in this close-up.

The top line of the program up to 'N0C' is the initialisation code. From then on it scans the fungespace one cell at a time, looking up the resulting character in the table below. Execution will then branch down into the table entry, and then get filtered down to the bottom-left of the program either via the row of '>'s near the bottom or via re-entry into the table header (Which will cause all lookups to fail and the letter to be classed as unclassified). Once all cells have been scanned and output, the program will display the results and exit.

Note that the output it produces is very small (each letter is only 8 units wide, IIRC), so you may need an option in your interpreter to scale up the output.

Page last modified 03/03/2005