Skip Menu |
Report information
Id: 111164
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: moritz <moritz.lenz+perl [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Cannot slice a Range that is bound to an array variable
Date: Mon, 20 Feb 2012 16:10:28 +0100
To: rakudobug [...] perl.org
From: Moritz Lenz <moritz [...] faui2k3.org>
Download (untitled) / with headers
text/plain 432b
16:06 < moritz> nom: my @a := 1..*; @a := @a[1, 3 ... *].list 16:06 <+p6eval> nom 4130f6: OUTPUT«Method 'gimme' not found for invocant of class 'Range'␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1159␤ in block <anon> at /tmp/dJ08aEvIzI:1␤␤» Since ~~ Positional in Rakudo, I see no reason why this shouldn't work, much less with such an obscure error message.
Download (untitled) / with headers
text/plain 624b
On Mon Feb 20 07:10:45 2012, moritz wrote: Show quoted text
> 16:06 < moritz> nom: my @a := 1..*; @a := @a[1, 3 ... *].list > 16:06 <+p6eval> nom 4130f6: OUTPUT«Method 'gimme' not found for
invocant of Show quoted text
> class 'Range'␤ in method postcircumfix:<[ ]> at > src/gen/CORE.setting:1159␤ in block <anon> at > /tmp/dJ08aEvIzI:1␤␤» > > Since ~~ Positional in Rakudo, I see no reason why this shouldn't
work, Show quoted text
> much less with such an obscure error message.
now it times out. 19:16 <diakopter> r: my @a := 1..*; @a := @a[1, 3 ... *].list 19:16 <p6eval> rakudo 024843: OUTPUT«(timeout)»
Download (untitled) / with headers
text/plain 786b
Shouldn't it timeout, in this case? @a[0] is @a[1] is @a[3] is @a[7] is @a[5]… On Tue May 29 17:16:40 2012, diakopter wrote: Show quoted text
> On Mon Feb 20 07:10:45 2012, moritz wrote:
> > 16:06 < moritz> nom: my @a := 1..*; @a := @a[1, 3 ... *].list > > 16:06 <+p6eval> nom 4130f6: OUTPUT«Method 'gimme' not found for
> invocant of
> > class 'Range'␤ in method postcircumfix:<[ ]> at > > src/gen/CORE.setting:1159␤ in block <anon> at > > /tmp/dJ08aEvIzI:1␤␤» > > > > Since ~~ Positional in Rakudo, I see no reason why this shouldn't
> work,
> > much less with such an obscure error message.
> > now it times out. > > 19:16 <diakopter> r: my @a := 1..*; @a := @a[1, 3 ... *].list > 19:16 <p6eval> rakudo 024843: OUTPUT«(timeout)»
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 878b
On Sun Feb 08 22:55:34 2015, Mouq wrote: Show quoted text
> Shouldn't it timeout, in this case? @a[0] is @a[1] is @a[3] is @a[7] > is @a[5]… > > On Tue May 29 17:16:40 2012, diakopter wrote:
> > On Mon Feb 20 07:10:45 2012, moritz wrote:
> > > 16:06 < moritz> nom: my @a := 1..*; @a := @a[1, 3 ... *].list > > > 16:06 <+p6eval> nom 4130f6: OUTPUT«Method 'gimme' not found for
> > invocant of
> > > class 'Range'␤ in method postcircumfix:<[ ]> at > > > src/gen/CORE.setting:1159␤ in block <anon> at > > > /tmp/dJ08aEvIzI:1␤␤» > > > > > > Since ~~ Positional in Rakudo, I see no reason why this shouldn't
> > work,
> > > much less with such an obscure error message.
> > > > now it times out. > > > > 19:16 <diakopter> r: my @a := 1..*; @a := @a[1, 3 ... *].list > > 19:16 <p6eval> rakudo 024843: OUTPUT«(timeout)»
Currently still times out in glr branch. -- Will "Coke" Coleda
As of (2017.11, HEAD(5929887)) it errors out:

Code:
say (1..*)[1, 3 … *]

Result:
Cannot .elems a lazy list
  in block <unit> at -e line 1


Is the intention of the OP that it should work? I don't think so.

On 2015-08-27 06:01:23, coke wrote:
Show quoted text
> On Sun Feb 08 22:55:34 2015, Mouq wrote:
> > Shouldn't it timeout, in this case? @a[0] is @a[1] is @a[3] is @a[7]
> > is @a[5]…
> >
> > On Tue May 29 17:16:40 2012, diakopter wrote:
> > > On Mon Feb 20 07:10:45 2012, moritz wrote:
> > > > 16:06 < moritz> nom: my @a := 1..*; @a := @a[1, 3 ... *].list
> > > > 16:06 <+p6eval> nom 4130f6: OUTPUT«Method 'gimme' not found for
> > > invocant of
> > > > class 'Range'␤ in method postcircumfix:<[ ]> at
> > > > src/gen/CORE.setting:1159␤ in block <anon> at
> > > > /tmp/dJ08aEvIzI:1␤␤»
> > > >
> > > > Since ~~ Positional in Rakudo, I see no reason why this shouldn't
> > > work,
> > > > much less with such an obscure error message.
> > >
> > > now it times out.
> > >
> > > 19:16 <diakopter> r: my @a := 1..*; @a := @a[1, 3 ... *].list
> > > 19:16 <p6eval> rakudo 024843: OUTPUT«(timeout)»
>
> Currently still times out in glr branch.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org