cfunge

cfunge is a small, fast and standard conforming Befunge98 interpreter in C.
Download

cfunge Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL v3
  • Price:
  • FREE
  • Publisher Name:
  • Arvid Norlander
  • Publisher web site:
  • http://rage.kuonet.org/~anmaster/cfunge/

cfunge Tags


cfunge Description

cfunge is a small, fast and standard conforming Befunge98 interpreter in C. cfunge is a small, fast and standard conforming Befunge93/98/08 interpreter in C.cfunge aims to be fast and standard conforming. cfunge also aims to never crash. This may seem an odd statement, surely every software aims for that? But cfunge aims to never crash on any input except possibly due to out of memory error (and even then the "crash" should be "graceful", as in a message telling what happened). Sadly it is common for other Funge interpreters to crash on obscure input (division by zero in some fingerprint, not checking array bounds, and so on). cfunge has not yet reached the point of never crashing but we are aiming for it. FingerprintsIt is planned to implement most or all of the existing fingerprints, with some exceptions:? FNGR - Contradicts with 98 standard.? IMAP - Too intrusive.? MODE - Intrusive into IP handling.? TRDS - Exceedingly complex and intrusive.? WIND - Too complex to implement and not portable.Short descriptions of implemented fingerprints:? BASE I/O for numbers in other bases? DIRF Directory functions extension (not available in sandbox mode)? MODU Modulo Arithmetic Extension? NULL Funge-98 Null Fingerprint? ORTH Orthogonal Easement Library? REFC Referenced Cells Extension? ROMA Funge-98 Roman Numerals? SUBR Subroutine extensionFor more details please see the specs for each fingerprint. In cases of undefined behaviour in fingerprints, cfunge mostly tries to do the same thing as CCBI.Undefined behaviourThe Befunge98 standard leaves some things undefined, here is what we do for some of those cases:? y pushes time in UTC not local time.? k with a negative argument reflects.? # across edge of funge-space may or may not skip first char after wrapping depending on exact situation.? ( and ) with a negative count reflects and doesn't pop any fingerprint. Loaded fingerprints are inherited to child IPs at split (t).stdout is only flushed at:? Newline (line feed, ASCII 10) printed using , instruction.? Any input instructions.? End of program.Input buffering works as in CCBI.Notes on different standardsThe option -s 93 does not prevent the program from accessing outside the first 80x25 cells. Nor does it disallow instructions that didn't exist in 93. It does however change space behaviour to match 93 style.If a program depends on a instruction that is undefined in 93 to reflect, it should be easy to replace such instructions with a r for reflect or any in the range A-Z (and not load any fingerprint).Further division by zero always returns 0 in all modes, though the Befunge93 specs says the interpreter should ask the user what result he/she wants in that situation.Usage: cfunge A fast Befunge interpreter in C -F Disable all fingerprints. -f Show list of features and fingerprints supported in this binary. -h Show this help and exit. -S Enable sandbox mode (see README for details). -s standard Use the given standard (one of 93, 98 and 08). -t level Use given trace level. Default 0. -V Show version information and exit. -W Show warnings. Requirements: · Boehm-Demers-Weiser Conservative Garbage Collector What's New in This Release: · Bug fix: In a file with CR line endings and lines with leading spaces, the leading spaces were lost. · Bug fix: When j was used to jump backwads (negative argument) to a cell directly on the edge of the current bounding box of the Funge Space, it would incorrectly wrap. Fix this by peforming the normal moving forward of the IP before the jump in j instead of after as usual for most other instructions. · Minor Bug fix: Hypens were incorrectly escaped when generating man pages in tools/gen_fprint_list.sh. Fix and update man page to reflect.


cfunge Related Software