On Thu Sep 09 08:57:52 2010, [email protected] wrote:
> [17:43] <bbkr> rakudo: callframe.perl # known_and_NYI or should I
> report it as
> TODO? in STD this is valid syntax.
> [17:43] <p6eval> rakudo 859f2d: OUTPUT«Method 'perl' not found for
> invocant of
> class 'ParrotInterpreter' in <anon> at line 1237:CORE.setting
> in 'Any::join' at line 1 in 'Mu::attribs' at line
> 1238:CORE.setting
> in 'Mu::perl' at line 1242:CORE.setting in main program body at line
> 22:/tmp/cb8i19zxRz»
>
> [17:44] <pmichaud> bbkr: it's TODO
> [17:44] <bbkr> pmichaud: but is it already in RT queue? I cannot find
> it.
> [17:45] <pmichaud> bbkr: and I'm not sure that callframe will have a
> .perl
> method anyway
> [17:45] <pmichaud> at least, not something that gives you a complete
> serialization of the current call state.
> [17:47] <bbkr> pmichaud: I can imagine how hard to implement this
> would be.
> but if not - then still error message is LTA.
> [17:47] <pmichaud> why?
> [17:47] <pmichaud> it's exactly correct. :)
> [17:47] <pmichaud> it's saying the .perl method doesn't exist. :)
> [17:51] <masak> :)
>
> [17:52] <moritz_> adding a method perl() { fail "Can't serialize
> callframes" }
> would be pretty easy too
>
> [17:52] <bbkr> pmichaud: because "callframe.WHAT" is "CallFrame"
> not "ParrotInterpreter". and CallFrame has .perl method.
>
> [17:53] <pmichaud> then callframe.perl should work
> [17:53] <pmichaud> does CallFrame have a perl method?
> [17:53] <moritz_> no
> [17:53] <pmichaud> I didn't think so. :)
> [17:53] <pmichaud> bbkr: why do you claim CallFrame has a .perl
> method?
> [17:53] <bbkr> rakudo: CallFrame.new.perl
> [17:53] <p6eval> rakudo 859f2d: ( no output )
> [17:54] <pmichaud> rakudo: say callframe.WHAT;
> [17:54] <moritz_> the problem is that callframes can be asked for any
> information in caller frammes
> [17:54] <p6eval> rakudo 859f2d: OUTPUT«CallFrame()»
> [17:54] <pmichaud> rakudo: say callframe.perl;
> [17:54] <p6eval> rakudo 859f2d: OUTPUT«Method 'perl' not found for
> invocant of
> class 'ParrotInterpreter' in <anon> at line 1237:CORE.setting
> in 'Any::join' at line 1 in 'Mu::attribs' at line
> 1238:CORE.setting
> in 'Mu::perl' at line 1242:CORE.setting in main program body at
> line
> 22:/tmp/gpGpYkiUr1»
>
>
> [17:54] <pmichaud> okay, I'll accept that the error message is wrong
> here.
> [17:55] * bbkr reports LTA message in callframe.perl
Now generates something that is probably reasonable:
02:48 <[Coke]> rakudo: callframe.WHAT.say
02:48 <camelia> rakudo-jvm e8cea1: OUTPUT«(timeout)»
02:48 <camelia> ..rakudo-parrot e8cea1, rakudo-moar e8cea1: OUTPUT«(CallFrame)»
02:48 <[Coke]> rakudo: callframe.perl.say
02:49 <camelia> rakudo-jvm e8cea1: OUTPUT«(timeout)»
02:49 <camelia> ..rakudo-parrot e8cea1: OUTPUT«CallFrame.new(level => Int,
annotations => ("file" => "/tmp/tmpfile", "line" => 1).hash, my
=> EnumMap.new("\$!", Nil, "\$/", Nil, "\$_", Nil, "GLOBALish",
GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE",
GLOBAL, "\$=pod", Array.new(), "!UNI…»
02:49 <camelia> ..rakudo-moar e8cea1: OUTPUT«CallFrame.new(level => 2,
annotations => ("file" => "/tmp/tmpfile", "line" => "1").hash,
my => EnumMap.new("\$!", Nil, "\$/", Nil, "\$_", Nil,
"GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL,
"::?PACKAGE", GLOBAL, "\$=pod", Array.new(), "!UNIT_…»
Closable with tests.
--
Will "Coke" Coleda