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

inequality chaining causes non-intuitive result with junctions #534

Closed
p6rt opened this issue Dec 24, 2008 · 4 comments
Closed

inequality chaining causes non-intuitive result with junctions #534

p6rt opened this issue Dec 24, 2008 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 24, 2008

Migrated from rt.perl.org#61676 (status was 'rejected')

Searchable as RT61676$

@p6rt
Copy link
Author

p6rt commented Dec 24, 2008

From dwhipp@nvidia.com

Error case​:

  say "improper collapse" if 10 < (5|25) < 20;

--> rakudo 34339​: OUTPUT«improper collapse␤»

The conditional evaluates to true (and thus prints the message)! For a chained inequality term, such as this, I would expect transitive behavior to hold for a junction’s values.

I also noted that there’s a SEGV if I replace C<say> with C<die>.


This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.


@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @bbkr

(Kiev build)
[13​:58] <bbkr> rakudo​: say "improper collapse" if 10 < (5|25) < 20;
[13​:58] <p6eval> rakudo 261eb2​: OUTPUT«improper collapse␤»
[13​:59] <jnthn> bbkr​: Is that junction one actually wrong?
[14​:00] <jnthn> 10 < 25 and 5 < 20
[14​:00] <masak> jnthn​: agree.
[14​:00] <jnthn> And it's certainly defined as two calls to <
[14​:00] <jnthn> Not some kind of list infix.
[14​:01] <masak> jnthn​: it's a bit of a hybrid, I'd say. :) but your
argument still holds.
[14​:02] <masak> bbkr​: rejected.
[14​:02] <masak> bbkr​: transitive behavior does not hold when junctions
are involved.
[14​:03] <masak> junctions stubbornly refuse to do more than they were
built to do :)

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

@bbkr - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Jun 30, 2010
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

1 participant