Funge-98 Clarifications

See Funge–98 final specification for official one. This page tries to track its interpretations and clarifications.

Introduction

The Funge Virtual Machine

Code and Data

What size exactly is left up to the implementer. It doesn’t prohibit arbitrary-precision integer. But as you can see, otherwise the spec is too vague for such case. PyFunge uses arbitrary-precision integer from Python.

Funge-Space

Stack Stack

Funge Source File Format

There is no enforced convention for what any given Funge–98 source file name ends in […], but .b98 is a good choice for Befunge–98 sources - “standard” example programs use this suffix. The spec doesn’t give explicit suffix for Unefunge–98 and Trefunge–98 sources. Maybe .u98 and .t98? > PyFunge uses these prefixes.

The Funge–98 character set overlays the ASCII subset used by Befunge–93 and may have characters greater than 127 present in it (and greater than 255 on systems where characters are stored in multiple bytes; but no greater than 2,147,483,647.) The source encoding is not specified, and any program relys on it is not portable. But every supported encoding should be ASCII-compatible, so UTF–16 cannot be used. PyFunge treats every source code as ASCII, not ISO–8859–1 nor UTF–8.

Subsequent lines in Unefunge are simply appended to the first, and the end of the source file indicates the end of the (single) line. End-of-line markers are never copied into Funge-Space. In the other words, Unefunge code can be split into several lines and they are concatenated before loading.

In Trefunge–98, the Form Feed (12) character increments the z coordinate and resets the x and y coordinates to zero. It is expected that form feed in Befunge–98 should be treated as like newline in Unefunge–98, but it is unclear.

Code: Program Flow

Instruction Pointer

Instructions

Direction Changing

Wrapping

Flow Control

The # “Trampoline” instruction moves the IP one position beyond the next Funge-Space cell in its path. It is unclear what is the next Funge-space cell exactly.

; is truly ethereal; like space, it cannot ever be truly executed, in the sense of it taking up a tick and doing something. This means, if one IP’s path contains only ;s, it will block while finding next instruction, not marker.


ikiwiki를 씁니다.
마지막 수정