Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What happens when "the other side" of a cell is also its "north" or "south" side? #4

Open
Quuxplusone opened this issue Apr 23, 2019 · 1 comment

Comments

@Quuxplusone
Copy link

Quuxplusone commented Apr 23, 2019

Maybe these rules are intentional, but without explicit calling-out in the README, it feels like they might have been oversights (of the kind that reduce fun more than increase it).

The p term evaluates to the north to get an x coordinate, then to the south to get a y coordinate. It then evaluates what is on the other side of it to get a value.

Does this imply that

|   v<
|   #+@
|   1#
|   p1
|   6g
|    6
= Result: 6

because the 6 south of the p is evaluated twice — once as the y coordinate and then again as the "what is on the other side of" the p?

Similarly:

The \ term takes what to the south of it evaluates to, and uses that as the argument as it "applies" the "one-argument" "function" on the other side of it.

|   v\@
|   \2
|   >*
|    :
= Result: 8

because the second slash first evaluates "to the south" (2*:) to get the value 4, and then uses 4 as the argument to the function "on the other side of it" (identically 2*:) to get 2*4=8.

I'm generally surprised by the fixed cardinal directions in Flobnar, btw. It would feel much more "Befungey" if you had made

|  1+2
|   ^@
= Hypothetical Result: 3

(whereas with the fixed north/south rule, my understanding is that this program should produce infinite-recursion-and-crash while trying to evaluate the north operand of +).

@cpressey
Copy link
Member

cpressey commented Nov 3, 2023

What happens when "the other side" of a cell is also its "north" or "south" side?

It's not an oversight. "The north side" (or "the south side") and "the other side" can refer to the same cell. If a rule says they are both evaluated, then that cell is evaluated twice.

I don't really see anything in the spec that would lead me to believe that some other interpretation would apply in that situation, or any suggestion as to what that alternate interpretation might be.

If a patch was submitted to add a clarifying statement such as the above one to the spec, though, I would consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants