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

Owner: Nobody
Requestors: elizabeth <liz [at] dijkmat.nl>
Cc:
AdminCc:

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



Date: Sun, 1 Jun 2014 12:05:03 +0200
To: rakudobug [...] perl.org
Subject: Spooky capture with native int
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
[07:39:51] <Timbus> m: sub a(int $i) is cached { return unless $i; a($i-1) }; say a(4); [07:39:53] <+camelia> rakudo-moar ce6acf: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤ in method gist at src/gen/m-CORE.setting:7121␤ in block at src/gen/m-CORE.setting:3357␤ in any enter at src/gen/m-Metamodel.nqp:3089␤ in method postcircumfix:<( )> at src/gen/m-C…» [11:52:00] <lizmat> Timbus: seems there is some confusion as to what gets passed to the sub [11:52:13] <lizmat> is cached uses the gist of the signature to creata a key [11:52:22] <lizmat> for caching the return value [11:52:34] <lizmat> m: sub a(int $i) is cached { return unless $i; a(($i-1).Int) }; say a(4) [11:52:35] <+camelia> rakudo-moar ce6acf: OUTPUT«(Any)␤» [11:53:00] <lizmat> either defining $i as an Int, or making sure we pass an Int, is a workaround for now [11:56:39] <Timbus> yeah. just thought it was an odd one Feels like the Capture is not set up at all with a recursive call. Any direct calls seem to work ok.
Subject: Re: [perl #122004] AutoReply: Spooky capture with native int
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Date: Sun, 1 Jun 2014 12:07:56 +0200
To: perl6-bugs-followup [...] perl.org
Download (untitled) / with headers
text/plain 1.8k
On 01 Jun 2014, at 12:05, perl6 via RT <perl6-bugs-followup@perl.org> wrote: Show quoted text
> Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Spooky capture with native int", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [perl #122004]. > > Please include the string: > > [perl #122004] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > perl6-bugs-followup@perl.org > > ------------------------------------------------------------------------- > [07:39:51] <Timbus> m: sub a(int $i) is cached { return unless $i; a($i-1) }; say a(4); > [07:39:53] <+camelia> rakudo-moar ce6acf: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤ in method gist at src/gen/m-CORE.setting:7121␤ in block at src/gen/m-CORE.setting:3357␤ in any enter at src/gen/m-Metamodel.nqp:3089␤ in method postcircumfix:<( )> at src/gen/m-C…» > [11:52:00] <lizmat> Timbus: seems there is some confusion as to what gets passed to the sub > [11:52:13] <lizmat> is cached uses the gist of the signature to creata a key > [11:52:22] <lizmat> for caching the return value > [11:52:34] <lizmat> m: sub a(int $i) is cached { return unless $i; a(($i-1).Int) }; say a(4) > [11:52:35] <+camelia> rakudo-moar ce6acf: OUTPUT«(Any)␤» > [11:53:00] <lizmat> either defining $i as an Int, or making sure we pass an Int, is a workaround for now > [11:56:39] <Timbus> yeah. just thought it was an odd one > > Feels like the Capture is not set up at all with a recursive call. Any direct calls seem to work ok.
As a further datapoint: it only happens on Moar and JVM, not on parrot.
Date: Sun, 1 Jun 2014 12:12:11 +0200
To: perl6-bugs-followup [...] perl.org
Subject: Re: [perl #122004] AutoReply: Spooky capture with native int
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
On 01 Jun 2014, at 12:07, Elizabeth Mattijsen <liz@dijkmat.nl> wrote: Show quoted text
> On 01 Jun 2014, at 12:05, perl6 via RT <perl6-bugs-followup@perl.org> wrote:
>> Greetings, >> >> This message has been automatically generated in response to the >> creation of a trouble ticket regarding: >> "Spooky capture with native int", >> a summary of which appears below. >> >> There is no need to reply to this message right now. Your ticket has been >> assigned an ID of [perl #122004]. >> >> Please include the string: >> >> [perl #122004] >> >> in the subject line of all future correspondence about this issue. To do so, >> you may reply to this message. >> >> Thank you, >> perl6-bugs-followup@perl.org >> >> ------------------------------------------------------------------------- >> [07:39:51] <Timbus> m: sub a(int $i) is cached { return unless $i; a($i-1) }; say a(4); >> [07:39:53] <+camelia> rakudo-moar ce6acf: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤ in method gist at src/gen/m-CORE.setting:7121␤ in block at src/gen/m-CORE.setting:3357␤ in any enter at src/gen/m-Metamodel.nqp:3089␤ in method postcircumfix:<( )> at src/gen/m-C…» >> [11:52:00] <lizmat> Timbus: seems there is some confusion as to what gets passed to the sub >> [11:52:13] <lizmat> is cached uses the gist of the signature to creata a key >> [11:52:22] <lizmat> for caching the return value >> [11:52:34] <lizmat> m: sub a(int $i) is cached { return unless $i; a(($i-1).Int) }; say a(4) >> [11:52:35] <+camelia> rakudo-moar ce6acf: OUTPUT«(Any)␤» >> [11:53:00] <lizmat> either defining $i as an Int, or making sure we pass an Int, is a workaround for now >> [11:56:39] <Timbus> yeah. just thought it was an odd one >> >> Feels like the Capture is not set up at all with a recursive call. Any direct calls seem to work ok.
> > As a further datapoint: it only happens on Moar and JVM, not on parrot.
[12:09:15] <Timbus> its an optimizer thing [12:11:23] <lizmat> Timbus: ah, indeed, with MVM_SPESH_DISABLE=1 no problems
We no longer seem to care about “is cached”, so… I don't think we should reject this (because it may be a nice test case once we start supporting cached trait), but at the same time this ticket is kinda useless.

On 2014-06-01 03:12:32, elizabeth wrote:
Show quoted text
> On 01 Jun 2014, at 12:07, Elizabeth Mattijsen <liz@dijkmat.nl> wrote:
> > On 01 Jun 2014, at 12:05, perl6 via RT <perl6-bugs-followup@perl.org>
> > wrote:
> >> Greetings,
> >>
> >> This message has been automatically generated in response to the
> >> creation of a trouble ticket regarding:
> >> "Spooky capture with native int",
> >> a summary of which appears below.
> >>
> >> There is no need to reply to this message right now. Your ticket
> >> has been
> >> assigned an ID of [perl #122004].
> >>
> >> Please include the string:
> >>
> >> [perl #122004]
> >>
> >> in the subject line of all future correspondence about this issue.
> >> To do so,
> >> you may reply to this message.
> >>
> >> Thank you,
> >> perl6-bugs-followup@perl.org
> >>
> >> -------------------------------------------------------------------------
> >> [07:39:51] <Timbus> m: sub a(int $i) is cached { return unless $i;
> >> a($i-1) }; say a(4);
> >> [07:39:53] <+camelia> rakudo-moar ce6acf: OUTPUT«Cannot find
> >> method 'gist': no method cache and no .^find_method␤ in method gist
> >> at src/gen/m-CORE.setting:7121␤ in block at src/gen/m-
> >> CORE.setting:3357␤ in any enter at src/gen/m-Metamodel.nqp:3089␤
> >> in method postcircumfix:<( )> at src/gen/m-C…»
> >> [11:52:00] <lizmat> Timbus: seems there is some confusion as to
> >> what gets passed to the sub
> >> [11:52:13] <lizmat> is cached uses the gist of the signature to
> >> creata a key
> >> [11:52:22] <lizmat> for caching the return value
> >> [11:52:34] <lizmat> m: sub a(int $i) is cached { return unless $i;
> >> a(($i-1).Int) }; say a(4)
> >> [11:52:35] <+camelia> rakudo-moar ce6acf: OUTPUT«(Any)␤»
> >> [11:53:00] <lizmat> either defining $i as an Int, or making sure
> >> we pass an Int, is a workaround for now
> >> [11:56:39] <Timbus> yeah. just thought it was an odd one
> >>
> >> Feels like the Capture is not set up at all with a recursive call.
> >> Any direct calls seem to work ok.
> >
> > As a further datapoint: it only happens on Moar and JVM, not on
> > parrot.
>
> [12:09:15] <Timbus> its an optimizer thing
> [12:11:23] <lizmat> Timbus: ah, indeed, with MVM_SPESH_DISABLE=1
> no problems


Well, it was clearly wrong to say that we don't care about it, sorry about that. Maybe it's not the top priority thing (for example, there is a module to do this: https://github.com/azawawi/perl6-memoize), but there are still plans to get it done eventually.

I'll change the title a little bit so that it is easier to find this ticket.

On 2017-08-28 15:17:02, alex.jakimenko@gmail.com wrote:
Show quoted text
> We no longer seem to care about “is cached”, so… I don't think we
> should reject
> this (because it may be a nice test case once we start supporting
> cached
> trait), but at the same time this ticket is kinda useless.
>
> On 2014-06-01 03:12:32, elizabeth wrote:
> > On 01 Jun 2014, at 12:07, Elizabeth Mattijsen <liz@dijkmat.nl> wrote:
> > > On 01 Jun 2014, at 12:05, perl6 via RT <perl6-bugs-
> > > followup@perl.org>
> > > wrote:
> > >> Greetings,
> > >>
> > >> This message has been automatically generated in response to the
> > >> creation of a trouble ticket regarding:
> > >> "Spooky capture with native int",
> > >> a summary of which appears below.
> > >>
> > >> There is no need to reply to this message right now. Your ticket
> > >> has been
> > >> assigned an ID of [perl #122004].
> > >>
> > >> Please include the string:
> > >>
> > >> [perl #122004]
> > >>
> > >> in the subject line of all future correspondence about this issue.
> > >> To do so,
> > >> you may reply to this message.
> > >>
> > >> Thank you,
> > >> perl6-bugs-followup@perl.org
> > >>
> > >> -------------------------------------------------------------------------
> > >> [07:39:51] <Timbus> m: sub a(int $i) is cached { return unless $i;
> > >> a($i-1) }; say a(4);
> > >> [07:39:53] <+camelia> rakudo-moar ce6acf: OUTPUT«Cannot find
> > >> method 'gist': no method cache and no .^find_method␤ in method
> > >> gist
> > >> at src/gen/m-CORE.setting:7121␤ in block at src/gen/m-
> > >> CORE.setting:3357␤ in any enter at src/gen/m-Metamodel.nqp:3089␤
> > >> in method postcircumfix:<( )> at src/gen/m-C…»
> > >> [11:52:00] <lizmat> Timbus: seems there is some confusion as to
> > >> what gets passed to the sub
> > >> [11:52:13] <lizmat> is cached uses the gist of the signature to
> > >> creata a key
> > >> [11:52:22] <lizmat> for caching the return value
> > >> [11:52:34] <lizmat> m: sub a(int $i) is cached { return unless $i;
> > >> a(($i-1).Int) }; say a(4)
> > >> [11:52:35] <+camelia> rakudo-moar ce6acf: OUTPUT«(Any)␤»
> > >> [11:53:00] <lizmat> either defining $i as an Int, or making sure
> > >> we pass an Int, is a workaround for now
> > >> [11:56:39] <Timbus> yeah. just thought it was an odd one
> > >>
> > >> Feels like the Capture is not set up at all with a recursive call.
> > >> Any direct calls seem to work ok.
> > >
> > > As a further datapoint: it only happens on Moar and JVM, not on
> > > parrot.
> >
> > [12:09:15] <Timbus> its an optimizer thing
> > [12:11:23] <lizmat> Timbus: ah, indeed, with MVM_SPESH_DISABLE=1
> > no problems




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