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.jakime...@gmail.com wrote:
> 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 <l...@dijkmat.nl> wrote:
> > > On 01 Jun 2014, at 12:05, perl6 via RT <perl6-bugs-
> > > follo...@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-follo...@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

Reply via email to