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

Bang operator behavior #67

Open
heuripedes opened this issue May 30, 2020 · 3 comments
Open

Bang operator behavior #67

heuripedes opened this issue May 30, 2020 · 3 comments

Comments

@heuripedes
Copy link

heuripedes commented May 30, 2020

From Orca's README:

  • bang: Bangs neighboring operands

In both Orca and Orca-c the bang operator * actually only bangs the western and northern neighbors. Other bang sources such as D and F, even when wired with J or Y, as well as a Held * seem to behave in ways similar to the documented in the Orca README.

Input:

11111
1.n.1
1w*e1
1.s.1
11111

Expected output after one tick/frame:

11111
1.*.1
1*.*1
1.*.1
11111

Actual output after one tick/frame:

11111
1.*.1
1*.e1
1.s.1
11111

Disclaimer: I'm writing a clean room (no code from the original) minimal Orca clone with no support for integration with other programs.

@eelfroth
Copy link
Contributor

@heuripedes interesting corner case. it makes sense though when taking into account that orca is executed sequentially from top/left to bottom/right. in your example, n and w execute before the *. then * erases itself, and by the time e and s execute there is no more bang to trigger them.

@heuripedes
Copy link
Author

The way you describe the behavior makes it seem to me that all the * does is delete itself when executed and it's the surrounding cells responsibility to self-bang when near a *, but if that was the case one wouldn't be able to bang : from the left as by the time it gets executed the bang no longer exists.

    .D.
     *:abcde

@npisanti
Copy link
Collaborator

D, F and U lock their outputs so * can't disappear (it is deleted by those operator when the output should be empty)

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

3 participants