catseye/Funge-98

Inconsistent delta for high/low

cwesson opened this issue ยท 5 comments

The program flow section states that h is delta <- (0,0,1) and l is delta <- (0,0,-1), whereas the quick reference states the opposite.

I can't believe I've never noticed that before. And unfortunately that has resulted in some inconsistency in the various Trefunge implementations. It looks like Rc/Funge and Fungi interpret h as (0,0,1) and l as (0,0,-1), while PyFunge has them the other way around.

BeQunge also uses h as (0,0,1), which I noticed while implementing BeQunge compatibility on by own interpreter, which uses h as (0,0,-1).

Running into this with my own interpreter right now. Even going back to the initial commit (HTML spec dated 2004) the inconsistency exists. FBBI never implemented trefunge, and I don't think mycology covers trefunge either.

How fun. I'll see if I can dig up an even older version of the spec somewhere.
Update: RcFunge has the 1998 version, and it has the same inconsistency: https://www.rcfunge98.com/spec98.html
Somehow I doubt Chris will let us know which one he originally meant ๐Ÿ˜›

h being +z would be more probable if we assume the quick reference was an afterthought, but h being -z would also make sense if we consider 'go low' analogous to 'go down'.

The description and quick reference for m (High-Low If) is consistent with h = -z, l = +z, so I'm inclined to go with that, however if RcFunge does it the other way around, it seems some sort of switch to flip the z axis might be appropriate.

Somehow I doubt Chris will let us know which one he originally meant ๐Ÿ˜›

"he"? "meant"?? What is this gibberish? Funge-98 was strictly a committee effort; any supposed intent on behalf of any individual was efficiently eliminated by the sheer, pummeling bureaucracy of the specification process.

If it helps, I do think that one can, in general, reasonably assume that anything calling itself a "quick reference" is more or less advertising itself as having been distilled from something else, rather than having been the basis for something else.

And if the goal is to be compatible with the millions and millions of lines of mission-critical legacy Trefunge code out there in the wild, then yes, implementing a command-line switch or similar contrivance to support both possibilities is indeed a prudent notion.