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

Cannot return junctions from .classify blocks in Rakudo #2841

Open
p6rt opened this issue Jul 26, 2012 · 7 comments
Open

Cannot return junctions from .classify blocks in Rakudo #2841

p6rt opened this issue Jul 26, 2012 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 26, 2012

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

Searchable as RT114276$

@p6rt
Copy link
Author

p6rt commented Jul 26, 2012

From @masak

<felher> And now for something completely different​:
<felher> r​: say [[1,2,0]].classify​: -> $rpn { $rpn eqv [1,2,0]|[2,0,1] };
<p6eval> rakudo ed269f​: OUTPUT«Cannot assign to a readonly variable or
a value [...]
<moritz> r​: say [1,2,0] eqv [1,2,0]|[2,0,1]
<p6eval> rakudo ed269f​: OUTPUT«any(True, False)␤»
<moritz> felher​: ah, might be easy to fix
<moritz> maybe just some variable that needs a Mu type instead of Any
<felher> :)
* masak submits rakudobug
<masak> r​: say [[1,2,0]].classify​: -> $rpn { $rpn eqv [1,2,0] }
<p6eval> rakudo ed269f​: OUTPUT«True 1 2 0␤»
<masak> r​: say [1,2,3,4,5].classify​: -> $rpn { $rpn eqv 1|3 }
<p6eval> rakudo ed269f​: OUTPUT«Cannot assign to a readonly variable or
a value [...]
<moritz> r​: say (1, 2).classify​: -> $x { 1|2 }
<p6eval> rakudo ed269f​: OUTPUT«Cannot assign to a readonly variable or
a value [...]
<masak> moritz++
<masak> it's probably returning the junction out of the .classify
block that causes trouble.
<moritz> masak​: correct

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

From @moritz

What behavior do you expect? I can only fix it if I know what it should
look like after the fix :-)

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

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

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

From @masak

On Tue Aug 07 03​:36​:11 2012, moritz wrote​:

What behavior do you expect? I can only fix it if I know what it should
look like after the fix :-)

The immediate expectation is for the error "Cannot assign to a readonly
variable or a value" not to occur. That's the observable -- sorry for
being less-than-clear on that. :)

Then again, I see the problem in deciding what should happen. The
conservative thing would be to have .classify barf on junctions as keys.
Or -- if it makes sense -- have the junction be stringified and use the
string as the key.

@p6rt
Copy link
Author

p6rt commented Oct 21, 2015

From @usev6

Current failure mode​:

$ perl6-m -e 'say (1, 2).classify​: -> $x { 1|2 }'
P6opaque​: no such attribute '$!reified'
  in block <unit> at -e​:1

$ perl6-m --version
This is perl6 version 2015.09-431-g5d83db3 built on MoarVM version 2015.09-79-gee9fc2b

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 21, 2015

From @usev6

Current failure mode​:

$ perl6-m -e 'say (1, 2).classify​: -> $x { 1|2 }'
P6opaque​: no such attribute '$!reified'
  in block <unit> at -e​:1

$ perl6-m --version
This is perl6 version 2015.09-431-g5d83db3 built on MoarVM version 2015.09-79-gee9fc2b

@p6rt
Copy link
Author

p6rt commented Jun 23, 2018

From @dogbert17

On Tue, 20 Oct 2015 23​:06​:02 -0700, bartolin@​gmx.de wrote​:

Current failure mode​:

$ perl6-m -e 'say (1, 2).classify​: -> $x { 1|2 }'
P6opaque​: no such attribute '$!reified'
in block <unit> at -e​:1

$ perl6-m --version
This is perl6 version 2015.09-431-g5d83db3 built on MoarVM version
2015.09-79-gee9fc2b

Things have changed yet again​:

$ perl6-m -e 'say (1, 2).classify​: -> $x { 1|2 }'
{1 => [1 2], 2 => [1 2]}

$ perl6-m -v
This is Rakudo version 2018.06-24-gc441d8d built on MoarVM version 2018.06
implementing Perl 6.c.

@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