[perl #65900] 'my ($a is readonly) = 5' should be allowed, but assigning to it afterward should be disallowed; '(my $a is readonly) = 5' should also be disallowed... in Rakudo
On Wed Jun 30 07:14:21 2010, bbkr wrote: $ perl6 -e 'my ($a is readonly) = 5; say $a; $a = 42; say $a' Cannot assign to readonly value in 'infix:=' at line 1 in main program body at line 1 So it dies properly now. But test file is not working due to := not implemented in earlier tests. Good news: fudged the test and added it to t/spectest.data so it's run. Bad news: I had to fudge these tests too. -- Will Coke Coleda
[perl #75718] [BUG] Null PMC access when smartmatching on a subtype of Hash in Rakudo
On Fri Jul 02 14:29:14 2010, masak wrote: Actually, it's smartmatching against a subtype of any role that causes a Null PMC access. (Hash is a role.) masak rakudo: role R {}; subset S of R; 1 ~~ S p6eval rakudo 3d2cb8: OUTPUT«Null PMC access in invoke() in 'ACCEPTS' [...] 15:43 [Coke] rakudo: role R {}; subset S of R; 1 ~~ S; say eek 15:43 +p6eval rakudo 012e26: OUTPUT«eek» Seems to work now. Closable with tests. -- Will Coke Coleda
[perl #73768] [BUG] Maybe prefix:~ should have a warning just like prefix:+ does on undefined values in Rakudo
On Tue Mar 23 08:11:23 2010, masak wrote: masak rakudo: say ~(my $a) p6eval rakudo db0f85: OUTPUT«Any()» masak moritz_: were you saying this should generate a warning? moritz_ masak: I think so... the specs are rather quiet on warnings * masak submits rakudobug masak Justin Case. moritz_ rakudo: say +(my $a) p6eval rakudo db0f85: OUTPUT«Use of type object as value in numeric context [...] * moritz_ tries to remove that error altogether masak I think it'd merit a warning, but not an error. moritz_ the current implementation tries to be very clever moritz_ it does a FAIL() moritz_ but the coercion to Int on the failure object immediatly throws the exception that's supposed to remain unthrown for now 15:45 [Coke] rakudo: say ~(my $a) 15:45 +p6eval rakudo 012e26: OUTPUT«Use of uninitialized value in string context» 15:46 [Coke] rakudo: say +(my $a) 15:46 +p6eval rakudo 012e26: OUTPUT«Use of uninitialized value in numeric context0» We complain now. need tests. -- Will Coke Coleda
[perl #69991] Exceptions from io.pir not being properly thrown
chdir still isn't throwing a CATCHable error. It now lives in src/core/IO.pm proto sub chdir(|$) { * } multi sub chdir($path as Str) { try { pir::new__PS('OS').chdir($path) } $! ?? fail($!) !! True } -- Will Coke Coleda
[perl #74016] [BUG] Internal Parrot error when using Associative or Positional instances for element access in Rakudo
On Fri Apr 02 17:27:56 2010, masak wrote: sorear rakudo: say Associative.new{'x'} p6eval rakudo 3469ff: OUTPUT�get_pmc_keyed() not implemented in class '' [...] masak :) * masak submits rakudobug lue so, role is good for the vanilla implementation, to allow people to not be stupid. masak rakudo: say Positional.new[42] p6eval rakudo 3469ff: OUTPUT�get_pmc_keyed() not implemented in class '' [...] These no longer generate parrot-level exceptions: 15:55 [Coke] rakudo: say Associative.new{'x'} 15:55 +p6eval rakudo 012e26: OUTPUT«Method 'at_key' not found for invocant of class 'Associative' in method postcircumfix:{ } at src/gen/CORE.setting:1018 in block anon at /tmp/A_sMK6Tc_G:1 in anon at /tmp/A_sMK6Tc_G:1» 15:56 [Coke] rakudo: say Positional.new[42] 15:56 +p6eval rakudo 012e26: OUTPUT«.[42] out of range for type Positional-2533370447223611077 in method at_pos at src/gen/CORE.setting:1000 in method postcircumfix:[ ] at src/gen/CORE.setting:982 in block anon at /tmp/qm2Y7I2TeZ:1 in anon at /tmp/qm2Y7I2TeZ:1» -- Will Coke Coleda
[perl #73992] [BUG] Null PMC access when assigning to a lexical in a CHECK or an INIT phaser block in Rakudo
On Fri Apr 02 04:49:04 2010, masak wrote: masak rakudo: my $a; CHECK { $a = 42 } p6eval rakudo 63ff06: OUTPUT�Null PMC access in getprop() [...] masak rakudo: my $a; INIT { $a = 42 } p6eval rakudo 63ff06: OUTPUT�Null PMC access in getprop() [...] * masak submits rakudobug Current behavior: 15:57 [Coke] rakudo: my $a; CHECK { $a = 42 } 15:57 +p6eval rakudo 88c5a5: OUTPUT«===SORRY!===Could not locate compile-time value for symbol StaticLexPad» 15:57 [Coke] rakudo: my $a; INIT { $a = 42 } 15:57 +p6eval rakudo 88c5a5: ( no output ) -- Will Coke Coleda
[perl #73396] [BUG] Null PMC access when calling .WHAT on the thing that Perl6::Compiler.compile returns in Rakudo
On Sun Mar 07 08:07:49 2010, masak wrote: masak rakudo: say Perl6::Compiler.compile('say 42').WHAT p6eval rakudo e9c185: OUTPUT�Null PMC access in find_method('WHAT') [...] * masak submits rakudobug masak rakudo: Perl6::Compiler.compile('say 42').WHAT p6eval rakudo e9c185: OUTPUT�Null PMC access in find_method('WHAT') [...] I think this ticket may no longer be relevant: 15:58 [Coke] rakudo: say Perl6::Compiler.compile('say 42').WHAT 15:58 +p6eval rakudo 88c5a5: OUTPUT«Could not find symbol 'Perl6::Compiler' in block anon at /tmp/5COYJ4ssO5:1 in anon at /tmp/5COYJ4ssO5:1» -- Will Coke Coleda
[perl #76400] [BUG] Null PMC access when doing 'say $foo::' (which shouldn't even parse) in Rakudo
On Tue Jul 06 09:19:10 2010, masak wrote: p6eval std 31559: OUTPUT«ok 00:01 111m» TimToady I didn't expect that to work :) masak std bug. * TimToady bug TimToady I'm not entirely sure how it parsed... TimToady oh, morename allows a final :: component, but that's not quite what you want here TimToady std: $defeat-the-name-checker:: p6eval std 31559: OUTPUT«ok 00:01 108m» masak rakudo: $foo::; say alive p6eval rakudo 04a918: OUTPUT«alive» * masak submits rakudobug TimToady rakudo: $foo:: = 42; say $foo::; p6eval rakudo 04a918: OUTPUT«Null PMC access in getprop() [...] masak ok, that goes in the same ticket :) * masak upgrades the ticket to a Null PMC access masak rakudo: say $foo:: p6eval rakudo 04a918: OUTPUT«Null PMC access in type() [...] No more NPAs: 16:01 [Coke] rakudo: $foo:: = 42; say $foo::; 16:01 +p6eval rakudo 88c5a5: OUTPUT«42» 16:01 [Coke] rakudo: say $foo:: 16:01 +p6eval rakudo 88c5a5: OUTPUT«Any()» Closable with tests. -- Will Coke Coleda
[perl #74412] [BUG] Null PMC access when accessing a variable in a class package through its long name in Rakudo
On Fri Apr 16 01:26:52 2010, masak wrote: masak alpha: class A { my $b; method c { $A::b = 5; say $A::b } }; A.new.c p6eval alpha 30e0ed: OUTPUT«5» masak rakudo: class A { my $b; method c { $A::b = 5; say $A::b } }; A.new.c p6eval rakudo 78faa0: OUTPUT«Null PMC access in getprop() [...] * masak submits rakuodbug I'm no longer sure that this syntax will actually give me access to the variable, but even if it doesn't the error shouldn't be a Null PMC access. 16:04 [Coke] rakudo: class A { my $b; method c { $A::b = 5; say $A::b } }; A.new.c 16:04 +p6eval rakudo 88c5a5: OUTPUT«5» Closable with tests. -- Will Coke Coleda
[perl #73396] [BUG] Null PMC access when calling .WHAT on the thing that Perl6::Compiler.compile returns in Rakudo
Verified, closing ticket. -- Will Coke Coleda
[perl #77922] [BUG] Can't modify the elements of a Hash created with Hash.new in Rakudo
On Sun Sep 19 06:33:09 2010, masak wrote: Kodi rakudo: my $x = Hash.new(a = 1); $xa = 2; say $x.perl p6eval rakudo ccde8d: OUTPUT«Cannot modify readonly value in 'infix:=' [...] * masak submits rakudobug moritz_ this makes some perverted sense. Kodi The implementation of hash initialization does indeed look fishy. Kodi moritz_: What's your reasoning? moritz_ Kodi: it binds $xa to 1 moritz_ and since 1 is not a container, you can't assign to $xa subsequently moritz_ rakudo: my $x = 4; my $h = Hash.new(:$x); $ha = 42; say $x p6eval rakudo ccde8d: OUTPUT«4» moritz_ rakudo: my $a = 4; my $h = Hash.new(:$a); $ha = 42; say $a p6eval rakudo ccde8d: OUTPUT«42» moritz_ mind you, I'm not saying it's right; I just said it made some perverted sense. Kodi Shouldn't Hash.new assign rather than bind, since hashes are supposed to be mutable? Kodi Oh. jnthn Yeah, perverted sense, but I'm quite sure it's rong. masak rakudo: my $x = Hash.new(a = 1); $xb = 2; say $x.perl p6eval rakudo ccde8d: OUTPUT«{b = 2, a = 1}» Fixed: 16:13 [Coke] rakudo: my $x = Hash.new(a = 1); $xa = 2; say $x.perl 16:13 +p6eval rakudo 88c5a5: OUTPUT«{a = 2}» Closable with tests. -- Will Coke Coleda
[perl #76584] Method list returned by .can() not stringifying
On Wed Sep 22 19:09:19 2010, ash_gti wrote: $ perl6 class A { method a { 1 } }; A.can('a'); ===SORRY!=== get_string() not implemented in class 'P6Invocation' It happens whenever you try to Stringify the result of .can, .can is probably returning something primitive in parrot. Fixed: 16:15 [Coke] rakudo: class C { method M {} }; say C.new.can('M'); 16:15 +p6eval rakudo 88c5a5: OUTPUT«M» 16:16 [Coke] rakudo: class A { method a { 1 } }; A.can('a').say; 16:16 +p6eval rakudo 88c5a5: OUTPUT«a» Closable with tests. -- Will Coke Coleda
[perl #76298] [BUG] 'has' declarations and method protos can't coexist peacefully in Rakudo
On Wed Jun 30 09:21:21 2010, masak wrote: masak rakudo: class A { has $.b; proto method b {} } p6eval rakudo 806efc: OUTPUT«===SORRY!===A method named 'b' already exists in class 'A'. It may have been supplied by a role.» masak cxreg: that's your error, right? cxreg right masak I don't think I've seen this addressed in S12. moritz_ putting the proto first should make it work masak rakudo: class A { proto method b {}; has $.b } p6eval rakudo 806efc: OUTPUT«===SORRY!===A method named 'b' already exists in class 'A'. It may have been supplied by a role.» moritz_ accessor generation doesn't honor protos. That's a bug * masak submits rakudobug Fixed: 16:17 [Coke] rakudo: class A { has $.b; proto method b {} } 16:17 +p6eval rakudo 88c5a5: ( no output ) 16:18 [Coke] rakudo: class A { proto method b {}; has $.b } 16:18 +p6eval rakudo 88c5a5: ( no output ) Closable with tests. -- Will Coke Coleda
[perl #78056] compiling a script to PIR makes it lose its ability to handle command line arguments
On Sun Sep 26 08:05:13 2010, moritz wrote: works fine directly: $ cat args.pl say @*ARGS.perl; say @*ARGS.join('|'); $ ./perl6 args.pl foo bar 123 [foo, bar, 123] foo|bar|123 # but beware of compilation: $ ./perl6 --target=pir args.pl args.pir $ ./parrot_install/bin/parrot args.pir foo bar [] $ Compiled to pbc or to an executable it doesn't work either. Found by Grimnir_++ on #perl6. Cheers, Moritz with a recent rakudo/parrot, the pir version now says: Contextual $*ST not found -- Will Coke Coleda
[perl #75632] [BUG] Null PMC access when assigning to the (questionably declared) variable $A::b in Rakudo
On Wed Jun 09 06:17:16 2010, masak wrote: masak std: package A {}; my $A::b p6eval std 31183: OUTPUT«ok 00:01 108m» masak hm. masak rakudo: package A {}; my $A::b = 5 p6eval rakudo a54677: OUTPUT«Null PMC access in getprop() [...] * masak submits rakudobug masak rakudo: my $A::b = 5 p6eval rakudo a54677: OUTPUT«Null PMC access in getprop() [...] masak even easier. jnthn ah, should just ban long names there... masak yes. Fixed. 16:23 [Coke] rakudo: package A {}; my $A::b = 5 16:23 +p6eval rakudo 88c5a5: ( no output ) 16:23 [Coke] rakudo: my $A::b =5 16:23 +p6eval rakudo 88c5a5: ( no output ) Closable with tests. -- Will Coke Coleda
[perl #77788] [BUG] Can't pass in several same-named named parameters to a sub
On Sat Sep 11 11:18:59 2010, masak wrote: masak rakudo: sub foo(*%p) { say %p.perl }; foo(a = 'b', a = 'c') p6eval rakudo a93dcb: OUTPUT�duplicate named argument in call [...] * masak submits rakudobug masak rakudo: sub foo(*%p) { say %p.perl }; my %h = a = 'b'; foo(|%h, a = 'c') p6eval rakudo a93dcb: OUTPUT�duplicate named argument in call [...] S06 explicitly allows passing the same named parameter several times. Partially fixed: 16:29 [Coke] rakudo: sub foo(*%p) { say %p.perl }; foo(a = 'b', a = 'c') 16:29 +p6eval rakudo 88c5a5: OUTPUT«(a = c).hash» 16:30 [Coke] rakudo: sub foo(*%p) { say %p.perl }; my %h = a = 'b'; foo(|%h, a = 'c') 16:30 +p6eval rakudo 88c5a5: OUTPUT«duplicate named argument in call in block anon at /tmp/N93o4ziKBC:1 in anon at /tmp/N93o4ziKBC:1» -- Will Coke Coleda
[perl #77274] [BUG] Class cannot inherit first from parent and then from grandparent in Rakudo
On Tue Aug 17 06:22:55 2010, masak wrote: masak rakudo: class A { method foo { say OH HAI } }; class B is A {}; class C is A is B {}; say alive; C.new.*foo p6eval rakudo 85602a: OUTPUT«===SORRY!===Could not build C3 linearization: ambiguous hierarchy» * masak submits rakudobug masak it's a good day when I find something amiss in the OO system. :) masak rakudo: class A { method foo { say OH HAI } }; class B is A {}; class C is B is A {}; say alive; C.new.*foo p6eval rakudo 85602a: OUTPUT«aliveOH HAI» masak interesting. Apart from some cases of MRO, the order of the parent classes shouldn't matter in the declaration. Fixed. 16:32 [Coke] rakudo: class A { method foo { say OH HAI } }; class B is A {}; class C is A is B {}; say alive; C.new.*foo 16:32 +p6eval rakudo 88c5a5: OUTPUT«aliveOH HAI» Closable with tests. -- Will Coke Coleda
[perl #79642] [BUG] When a hash isn't bound to an optional %-sigilled parameter, something weird ends up in it in Rakudo
On Mon Nov 22 16:06:07 2010, masak wrote: masak rakudo: sub foo($a, %h?) { bar($a, %h) }; sub bar($a, %h?) { say alive! }; foo(42) p6eval rakudo : OUTPUT«Method 'HOW' not found for invocant of class 'Hash' in 'bar' at line 1 [...] masak rakudo: sub foo($a, %h?) { say %h.WHAT }; foo(42) p6eval rakudo : OUTPUT«Method 'WHAT' not found for invocant of class 'Hash' in 'foo' at line 22:/tmp/qK5WsYzzEI in main program body at line 22:/tmp/qK5WsYzzEI» * masak submits rakudobug colomon masak++ masak bug brought to you courtesy of a November being brought back from the Mostly Dead. Further experimenting reveals that the %h coming in through foo claims to be a Hash, but it has no methods at all, so you can't do anything with it, not even pass it to bar. Fixed: 16:35 [Coke] rakudo: sub foo($a, %h?) { bar($a, %h) }; sub bar($a, %h?) {say alive! }; foo(42) 16:35 -!- pothos_ is now known as pothos 16:35 +p6eval rakudo 88c5a5: OUTPUT«alive!» 16:35 [Coke] rakudo: sub foo($a, %h?) { say %h.WHAT }; foo(42) 16:36 +p6eval rakudo 88c5a5: OUTPUT«Hash()» Closable with tests. -- Will Coke Coleda
[perl #77412] [PATCH] Fix sub hash() and improve Parcel.hash
On Tue Aug 24 05:26:24 2010, TiMBuS wrote: This is just a followup fix to ticket #75584 that pmichaud was going to do but probably forgot about. Previously Parcel's hash method was delegating to sub hash (which is backwards). I flipped it around to fix it. Whoops! we seem to have missed this patch, and the repository has changed enough that files in the patch are now gone. If you feel this still needs patching, please throw us another one, and ping me on IRC if it doesn't get applied or commented on in a day. Sorry, and thanks for trying to make rakudo better. -- Will Coke Coleda
[perl #78152] [PATCH] Remove rakudo build dependency on shell/backticks and allow smoother windows (g|mingw32-)make spectest_smolder
On Sat Oct 02 03:23:18 2010, moritz wrote: Thanks for the patch, I've applied it. I'm leaving this ticket open for now, until we've decided what to do about the documentation. Let's either add a Windows section to the main README, or a new README.win32. I will happily apply such a patch! -- Will Coke Coleda
[perl #77748] [BUG] The type object of a typed array stringifies to just '()' in Rakudo
On Thu Sep 09 05:32:08 2010, masak wrote: rhebus rakudo: my @a of Int = (1,2,3); say @a.WHAT p6eval rakudo 859f2d: OUTPUT«()» rhebus huh * masak submits rakudobug Fixed. 16:52 [Coke] rakudo: my @a of Int = (1,2,3); say @a.WHAT 16:52 +p6eval rakudo 88c5a5: OUTPUT«Array()» Closable with tests. -- Will Coke Coleda
[perl #77754] [BUG] Null PMC access when calling .perl on callframe.my in Rakudo
On Thu Sep 09 09:02:22 2010, masak wrote: moritz_ rakudo: say callframe().callframe(1).my.perl p6eval rakudo 859f2d: OUTPUT«Null PMC access in isa_pmc() in 'infix:=' at line 1 in 'CallFrame::my' at line 7047:CORE.setting [...] moritz_ that isa_pmc NPA is new, I think moritz_ ie it worked when I implemented it, back in the days :-) * masak submits rakudobug pmichaud why are we getting a ParrotInterpret.. oh, I see the problem. pmichaud The problem isn't with CallFrame.perl, it's with CallFrame's $!interp.perl pmichaud the default .perl is attempting to call .perl on all of the attributes pmichaud so, we just need a .perl for CallFrame that does something more reasonable, like fail. :-) Output is now: 16:53 [Coke] rakudo: say callframe().callframe(1).my.perl 16:53 +p6eval rakudo 88c5a5: OUTPUT«not yet implemented in method callframe at src/gen/CORE.setting:6343 in block anon at /tmp/KUGjkHLZrt:1 in anon at /tmp/KUGjkHLZrt:1» -- Will Coke Coleda
[perl #77750] [BUG] Internal Parrot error when parsing '::' as a sole term in Rakudo
On Thu Sep 09 06:45:39 2010, masak wrote: ash_ rakudo: say ::.^methods # p6eval rakudo 859f2d: OUTPUT«===SORRY!===ResizablePMCArray: Can't pop from an empty array!» * masak submits rakudobug masak interesting error. masak rakudo: :: p6eval rakudo 859f2d: OUTPUT«===SORRY!===ResizablePMCArray: Can't pop from an empty array!» masak heh. ash_ well, thats shorter :P Fixed. 16:54 [Coke] rakudo: say ::.^methods 16:54 +p6eval rakudo 88c5a5: OUTPUT«===SORRY!===Cannot look up empty name» 16:55 [Coke] rakudo: :: 16:55 +p6eval rakudo 88c5a5: OUTPUT«===SORRY!===Cannot look up empty name» Closable with tests. -- Will Coke Coleda
[perl #78112] [BUG] Null PMC access when using placeholder parameter in rhs of attribute assignment in class declaration in Rakudo
On Mon Oct 04 04:13:15 2010, masak wrote: John (): std seems to complain that the placeholder variables are not valid here. Maybe we need more clarification on whether this should work or not. I'm fine with it being forbidden in this case. The ticket concerns the presence of a Null PMC Access, which is always an error by virtue of being an inadvertently exposed internal Parrot error. Fixed, then: 16:56 [Coke] rakudo: class A {has $.a = $^b + 1;has $.b = $^a }; say A.new(1,2).a 16:56 +p6eval rakudo 88c5a5: OUTPUT«Default constructor only takes named arguments in method new at src/gen/CORE.setting:520 in block anon at /tmp/KlAxdogLlw:1 in anon at /tmp/KlAxdogLlw:1» 16:56 [Coke] rakudo: class A { has $.a = $^b }; A.new 16:56 +p6eval rakudo 88c5a5: OUTPUT«Cannot assign a non-Perl 6 value to a Perl 6 container in method BUILDALL at src/gen/CORE.setting:542 in method bless at src/gen/CORE.setting:532 in method new at src/gen/CORE.setting:517 in block anon at /tmp/iSi_F7geIZ:1 in anon at /tmp/iSi_F7geIZ:1… Closable with tests. -- Will Coke Coleda
[perl #78208] [BUG] Numifying a Method returns number of multi candidates in Rakudo
On Mon Oct 04 13:23:30 2010, masak wrote: TimToady rakudo: say +Method p6eval rakudo 2ee5db: OUTPUT«0» TimToady that seems completely bogus to me Grimnir_ it prints out the contents of both jnthn ...no warning? * masak submits +Method rakudobug jnthn rakudo: multi foo() { }; multi foo($x) { }; say +foo p6eval rakudo 2ee5db: OUTPUT«2» jnthn ffs. :-) * jnthn dies a bit more inside. ash_ +method returns the number of multi's? jnthn ash_: I'm pretty sure it's not meant to in Perl 6. :-) ash_ it just does by chance? :p masak not sure we have a ticket for this already. masak I'm creating one Justin Case. jnthn ash_: Way back in the annals of history, somebody decided that the obvious thing MultiSub should inherit from is...ResizablePMCArray. masak jnthn: that's... deplorable. :'( To be clear, numification of a Method shouldn't yield anything of the kind in Rakudo. Most likely, it should warn or die. Then much better: 17:03 [Coke] rakudo: say +Method 17:03 +p6eval rakudo 33f1cf: OUTPUT«Use of uninitialized value in numeric context0» 17:03 [Coke] rakudo: multi foo() { }; multi foo($x) { }; say +foo 17:03 +p6eval rakudo 33f1cf: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:: (Mu, Mu %_) in method Numeric at src/gen/CORE.setting:608 in sub prefix:+ at src/gen/CORE.setting:1808 in block anon at /tmp/0UbVWVrGDB:1 in anon at /tmp/0UbVWVrG… Closable with tests. -- Will Coke Coleda
[perl #78406] [BUG] Readonly error on *second iteration* in Rakudo!?
On Sat Oct 16 12:53:02 2010, masak wrote: masak rakudo: for ^8 { say .fmt(%03b) } p6eval rakudo 064702: OUTPUT«000001010011100101110111» masak rakudo: for ^8 { .=fmt(%03b); .say } p6eval rakudo 064702: OUTPUT«000Cannot modify readonly value in 'infix:=' [...] masak bug or not? why does it die on the second iteration? masak rakudo: for ^8 - $_ is copy { .=fmt(%03b); .say } p6eval rakudo 064702: OUTPUT«000001010011100101110111» colomon could it somehow be checking what the value already was? colomon rakudo: for ^8 { $_ = 0; .say } p6eval rakudo 064702: OUTPUT«0Cannot modify readonly value in 'infix:=' [...] colomon rakudo: for 0, 0, 0 { $_ = 0; .say } p6eval rakudo 064702: OUTPUT«Cannot modify readonly value in 'infix:=' [...] colomon ??? colomon still have no clue why the bug masak so you agree it's a bug? colomon seems like it's got to be, one way or the other. * masak submits rakudobug colomon I mean, either going through the loop the first time is wrong, or not going through it the second time is. colomon unless there's something really subtle and disturbing going on. Now it (properly, I think), dies on the first iteration: 17:05 [Coke] rakudo: for ^8 { .=fmt(%03b); .say } 17:05 +p6eval rakudo 33f1cf: OUTPUT«Cannot assign to a non-container in method dispatch:.= at src/gen/CORE.setting:714 in block anon at /tmp/fh4hsVBFkr:1 in method reify at src/gen/CORE.setting:3755 in method reify at src/gen/CORE.setting:3660 in method reify at src/gen/CORE.setting:366… Closable with tests. -- Will Coke Coleda
[perl #78738] [BUG] Multiple dispatch on required named param makes 0-parm sub invisible
On Sun Oct 31 16:38:58 2010, util wrote: On Rakudo Star 2010-10, this code works as expected, outputting 42\n : multi sub Bar ( ) { return 42 }; say Bar(); This code should give the same output (and *does* on Pugs): multi sub Bar ( ) { return 42 }; multi sub Bar (:$baz!) { return $baz }; say Bar(); Instead, Rakudo dies on this error: No applicable candidates found to dispatch to for 'Bar'. Available candidates are: :() :(Any :baz($baz)!) Fixed: 17:07 [Coke] rakudo: multi sub Bar ( ) { return 42 }; multi sub Bar (:$baz!) { return $baz }; say Bar(); 17:07 +p6eval rakudo 33f1cf: OUTPUT«42» Closable with tests. IMHO, required named parameters should default to being part of the longname. In any case, the current behavior looks like a bug. From http://irclog.perlgeek.de/perl6/2010-10-31#i_2956591 Util perl6: say Bar(); multi sub Bar ( ) { return 42 }; +p6eval pugs, rakudo 5f5bae: OUTPUT42NL Util perl6: say Bar(); multi sub Bar ( ) { return 42 }; multi sub Bar (:$baz!) { return $baz }; +p6eval rakudo 5f5bae: OUTPUTNo applicable candidates found to dispatch to for 'Bar'. Available candidates are:NL:()NL:(Any :baz($baz)!)NLNL in main program body at line 22:/tmp/UGNiomLxSCNL +p6eval ..pugs: OUTPUT42NL Util In Rakudo, why is the second declaration interfering? masak looks like a bug to me. masak ...possibly reported already. sorear Perl 6.0 is not required to support multiple dispatch with named parameters masak but I thought Rakudo did. jnthn No jnthn Well, it doesn't consider them other than as constraints. jnthn e.g. if one is required it's a constraint. Util sorear: it is more than just a named parm; it is a *required* named parm. Shouldn't that make it part of the dispatch? masak apparently, it's difficult to do that in practice. jnthn Rakudo already considered required named params as constraints. jnthn Otherwise a bunch of our trait_mods would never work. jnthn It even has an optimization for the single-required-named-param case. :-) jnthn Util: Can you file a ticket? jnthn That looks like a bug to me. :S Util Will file rakudobug. Thanks, all! jnthn Util++ jnthn But it turns out to be a silly thinko. :-) jnthn Somewhere in that little file, perl6multisub.pmc :-) jnthn masak: There's another one in RT that I think is distinct from this but may end up related in the end. masak jnthn: ok. I didn't find anything about required nameds. jnthn masak: I think it was about an argless candidate. jnthn Or at least, that's the common dominator between these two. -- Will Coke Coleda
[perl #77168] typed list causes recursion limit hit
On Mon Jul 19 05:46:45 2010, salva wrote: $ ./perl6 -e 'my Int @a; push @a, 5; say @a[0]' maximum recursion depth exceeded in 'at_pos' at line 5:CORE.setting in 'at_pos' at line 7:CORE.setting in 'Any::postcircumfix:[ ]' at line 1624:CORE.setting in 'at_pos' at line 5:CORE.setting in 'at_pos' at line 7:CORE.setting in 'Any::postcircumfix:[ ]' at line 1624:CORE.setting in 'at_pos' at line 5:CORE.setting in 'at_pos' at line 7:CORE.setting in 'Any::postcircumfix:[ ]' at line 1624:CORE.setting ... the error does not happen when 'Int' is removed. $ ./perl6 --version This is Rakudo Perl 6, version 2010.06-279-gf55fb01 built on parrot r48074 $ git rev-parse HEAD f55fb012b4e0937e3e54366a0aa308113d1c9570 Cheers, - Salva Fixed. 17:09 [Coke] rakudo: my @a; push @a, 5; say @a[0]; 17:09 +p6eval rakudo 33f1cf: OUTPUT«5» 17:10 [Coke] rakudo: my Int @a; push @a, 5; say @a[0]; 17:10 +p6eval rakudo 33f1cf: OUTPUT«5» Closable with tests. -- Will Coke Coleda
[perl #75648] [BUG] [WEIRD] Internal parser error when parsing 'my ::a a' in Rakudo
On Wed Jun 09 14:47:30 2010, masak wrote: diakopter rakudo: my ::a a p6eval rakudo a54677: OUTPUT«===SORRY!===ResizablePMCArray: Can't pop from an empty array!» masak :D * masak submits rakudobug diakopter that's a parser compiler problem, I'd guess masak that error usually is. masak std: my ::a a p6eval std 31183: OUTPUT«ok 00:01 106m» masak I wouldn't ok that :P This is now slightly better. 17:14 [Coke] rakudo: my ::a a; 17:14 +p6eval rakudo 33f1cf: OUTPUT«invoke() not implemented in class '' in block anon at /tmp/4CpohpaOsc:1 in anon at /tmp/4CpohpaOsc:1» -- Will Coke Coleda
[perl #78280] [BUG] Null PMC access when assigning to a variable in a package that doesn't exist in Rakudo
On Thu Oct 07 14:46:24 2010, masak wrote: tylercurtis rakudo: my $b; - $_ is rw = $OUTER::_ { $_ = 5; $b = {.say}}(); .say; $_ = 42; $b(); p6eval rakudo 377615: OUTPUT�Null PMC access in getprop() [...] * masak submits rakudobug for tylercurtis Null PMC access masak rakudo: - $_ is rw = $OUTER::_ { $_ = 5 }() p6eval rakudo 377615: OUTPUT�Null PMC access in getprop() [...] masak rakudo: - $_ is rw = $FOO::a { $_ = 5 }() p6eval rakudo 377615: OUTPUT�Null PMC access in getprop() [...] masak hihihi Fixed: 17:16 [Coke] rakudo: my $b; - $_ is rw = $OUTER::_ { $_ = 5; $b = {.say}}(); .say; $_ = 42; $b(); 17:16 +p6eval rakudo 33f1cf: OUTPUT«Any()5» 17:16 [Coke] rakudo: - $_ is rw = $OUTER::_ { $_ = 5 }() 17:16 +p6eval rakudo 33f1cf: ( no output ) 17:16 [Coke] rakudo: - $_ is rw = $FOO::a { $_ = 5 }() 17:16 +p6eval rakudo 33f1cf: ( no output ) 17:16 [Coke] rakudo: $FOO::a = 42 17:16 +p6eval rakudo 33f1cf: ( no output ) Closable with tests. -- Will Coke Coleda
[perl #77158] [BUG] Doing .perl on an :(Array of Int) signature produces an internal error in Rakudo
On Wed Aug 11 06:13:02 2010, masak wrote: dolmen rakudo: say :(Int).perl p6eval rakudo fcf4f3: OUTPUT«:(Int )» dolmen rakudo: say :(Array of Int).perl p6eval rakudo fcf4f3: OUTPUT«Method '!select' not found for invocant of class '' [...] masak dolmen: new bug? dolmen masak: don't know. Just experimenting with Signatures * masak submits rakudobug Behavior has changed: 17:18 [Coke] rakudo: say :(Int).perl 17:18 +p6eval rakudo 33f1cf: OUTPUT«Unmarshallable foreign language value passed for parameter '$value' in method new at src/gen/CORE.setting:4425 in sub coro at src/gen/CORE.setting:3907 in method reify at src/gen/CORE.setting:3877 in method reify at src/gen/CORE.setting:3660 in method rei… 17:18 [Coke] rakudo: say :(Array of Int).perl 17:18 +p6eval rakudo 33f1cf: OUTPUT«Unmarshallable foreign language value passed for parameter '$value' in method new at src/gen/CORE.setting:4425 in sub coro at src/gen/CORE.setting:3907 in method reify at src/gen/CORE.setting:3877 in method reify at src/gen/CORE.setting:3660 in method rei… -- Will Coke Coleda
[perl #85844] sub foo; tries to call foo instead of giving parse error
On Thu Mar 10 07:23:08 2011, pawel.pab...@implix.com wrote: [16:12] bbkr_ rakudo: sub foo; # looks bad, this should be parse error, not attempt to call foo. [16:12] p6eval rakudo a38d45: OUTPUT«Could not find sub foo in main program body at line 22:/tmp/c10WrR9Dod» Fixed: 17:22 [Coke] rakudo: sub foo; 17:22 +p6eval rakudo 33f1cf: OUTPUT«===SORRY!===Missing block at line 1, near ;» Closable with tests. -- Will Coke Coleda