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

Wrong junction autothreading evaluation order in Rakudo #2511

Closed
p6rt opened this issue Oct 11, 2011 · 5 comments
Closed

Wrong junction autothreading evaluation order in Rakudo #2511

p6rt opened this issue Oct 11, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Oct 11, 2011

Migrated from rt.perl.org#101124 (status was 'resolved')

Searchable as RT101124$

@p6rt
Copy link
Author

p6rt commented Oct 11, 2011

From @masak

<tadzik> b​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤Bool​::True␤»
<grondilu> rakudo​: say ?(0|1 == 0&1), ?(0&1 == 0|1)
<p6eval> rakudo 38907e​: OUTPUT«Bool​::FalseBool​::True␤»
<masak> 0|1 == 0&1 means any(0,1) == all(0,1) means all(any(0,1) == 0,
any(0,1) == 1) means all(any(0 == 0, 1 == 0), any(0 == 1, 1 == 1))
<masak> which is true, AFAICS.
* masak submits rakudobug

In other words, the result of ?(0|1 == 0&1) should be Bool​::True,
because (intuitively) 0 and 1 is equal to 0 or 1. Other
implementations agree.

<grondilu> perl6​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> pugs​: OUTPUT«1␤1␤»
<p6eval> ..rakudo 38907e​: OUTPUT«Bool​::False␤Bool​::True␤»
<p6eval> ..niecza v10-40-ga57ed3d​: OUTPUT«Bool​::True␤Bool​::True␤»

@p6rt
Copy link
Author

p6rt commented May 11, 2013

From @coke

On Tue Oct 11 00​:23​:29 2011, masak wrote​:

<tadzik> b​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤Bool​::True␤»
<grondilu> rakudo​: say ?(0|1 == 0&1), ?(0&1 == 0|1)
<p6eval> rakudo 38907e​: OUTPUT«Bool​::FalseBool​::True␤»
<masak> 0|1 == 0&1 means any(0,1) == all(0,1) means all(any(0,1) == 0,
any(0,1) == 1) means all(any(0 == 0, 1 == 0), any(0 == 1, 1 == 1))
<masak> which is true, AFAICS.
* masak submits rakudobug

In other words, the result of ?(0|1 == 0&1) should be Bool​::True,
because (intuitively) 0 and 1 is equal to 0 or 1. Other
implementations agree.

<grondilu> perl6​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> pugs​: OUTPUT«1␤1␤»
<p6eval> ..rakudo 38907e​: OUTPUT«Bool​::False␤Bool​::True␤»
<p6eval> ..niecza v10-40-ga57ed3d​: OUTPUT«Bool​::True␤Bool​::True␤»

Works again.

01​:03 <[Coke]> r​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
01​:03 <camelia> rakudo bfd850​: OUTPUT«True␤True␤»

Closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented May 11, 2013

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

@p6rt
Copy link
Author

p6rt commented Jan 17, 2014

From @coke

On Fri May 10 22​:08​:08 2013, coke wrote​:

On Tue Oct 11 00​:23​:29 2011, masak wrote​:

<tadzik> b​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤Bool​::True␤»
<grondilu> rakudo​: say ?(0|1 == 0&1), ?(0&1 == 0|1)
<p6eval> rakudo 38907e​: OUTPUT«Bool​::FalseBool​::True␤»
<masak> 0|1 == 0&1 means any(0,1) == all(0,1) means all(any(0,1) == 0,
any(0,1) == 1) means all(any(0 == 0, 1 == 0), any(0 == 1, 1 == 1))
<masak> which is true, AFAICS.
* masak submits rakudobug

In other words, the result of ?(0|1 == 0&1) should be Bool​::True,
because (intuitively) 0 and 1 is equal to 0 or 1. Other
implementations agree.

<grondilu> perl6​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
<p6eval> pugs​: OUTPUT«1␤1␤»
<p6eval> ..rakudo 38907e​: OUTPUT«Bool​::False␤Bool​::True␤»
<p6eval> ..niecza v10-40-ga57ed3d​: OUTPUT«Bool​::True␤Bool​::True␤»

Works again.

01​:03 <[Coke]> r​: say ?(0|1 == 0&1); say ?(0&1 == 0|1)
01​:03 <camelia> rakudo bfd850​: OUTPUT«True␤True␤»

Closable with tests.

Tests added to S03-junctions/misc.t

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 17, 2014

@coke - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant