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

something goes wrong with loose postfixes in Rakudo #2990

Open
p6rt opened this issue Dec 7, 2012 · 3 comments
Open

something goes wrong with loose postfixes in Rakudo #2990

p6rt opened this issue Dec 7, 2012 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 7, 2012

Migrated from rt.perl.org#116010 (status was 'open')

Searchable as RT116010$

@p6rt
Copy link
Author

p6rt commented Dec 7, 2012

From @masak

<masak> rn​: sub postfix​:<+>($a) is looser(&infix​:<+>) { $a; 77 }; say +6+ +8+
<p6eval> rakudo 53daef​: OUTPUT«83␤»
<p6eval> ..niecza v24-5-g599cbcb​: OUTPUT«77␤»
<masak> hah!
<diakopter> :D
<diakopter> masak wins
* masak submits rakudobug
<moritz> should be 77
<masak> then Niecza is right.
<moritz> in case of no spaces, postfix wins over infix
<jnthn> 6+ trigers the postfix
<masak> so does 8+
<jnthn> So we get 77
<masak> oh, I see what you mean.
<jnthn> We look for an infix next
<jnthn> grr, this is hard to think about :P
* moritz still isn't convinced
<moritz> how is this beast parsed?
* masak grins
<jnthn> Well, I can see what's going on easy enough up to the final postfix.
<moritz> ((+6)+ + (+8))+
<moritz> that's how I'd expect it
<moritz> and I guess that niecza does it that way
<masak> right.
<masak> and gets 77.
<moritz> since the final postfix is looser than the infix, I'd argue
that's correct
<masak> I can get behind that.
<masak> so, rakudobug.
<masak> moritz​: no, (((+6)+) + 8)+
<masak> there are only two pluses between the 6 and the 8.
<masak> so the second one must be an infix.
<moritz> right
<moritz> but still,the result should be 77
<masak> aye.

@p6rt
Copy link
Author

p6rt commented Aug 28, 2017

From @AlexDaniel

Still not 77.
On 2012-12-07 02​:55​:44, masak wrote​:

<masak> rn​: sub postfix​:<+>($a) is looser(&infix​:<+>) { $a; 77 }; say
+6+ +8+
<p6eval> rakudo 53daef​: OUTPUT«83␤»
<p6eval> ..niecza v24-5-g599cbcb​: OUTPUT«77␤»
<masak> hah!
<diakopter> :D
<diakopter> masak wins
* masak submits rakudobug
<moritz> should be 77
<masak> then Niecza is right.
<moritz> in case of no spaces, postfix wins over infix
<jnthn> 6+ trigers the postfix
<masak> so does 8+
<jnthn> So we get 77
<masak> oh, I see what you mean.
<jnthn> We look for an infix next
<jnthn> grr, this is hard to think about :P
* moritz still isn't convinced
<moritz> how is this beast parsed?
* masak grins
<jnthn> Well, I can see what's going on easy enough up to the final
postfix.
<moritz> ((+6)+ + (+8))+
<moritz> that's how I'd expect it
<moritz> and I guess that niecza does it that way
<masak> right.
<masak> and gets 77.
<moritz> since the final postfix is looser than the infix, I'd argue
that's correct
<masak> I can get behind that.
<masak> so, rakudobug.
<masak> moritz​: no, (((+6)+) + 8)+
<masak> there are only two pluses between the 6 and the 8.
<masak> so the second one must be an infix.
<moritz> right
<moritz> but still,the result should be 77
<masak> aye.

@p6rt
Copy link
Author

p6rt commented Aug 28, 2017

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

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant