Will Coleda via RT | 1 Feb 15:01
Picon
Favicon

[perl #68782] [BUG] Less than awesome error message when including \# in a regex in Rakudo

On Tue Aug 25 14:22:47 2009, masak wrote:
> This be Rakudo 9d9d416 on Parrot r40783.
> 
> $ cat > a
> my $i;
> die '' if /^ \#/;
> ++$i;
> 1;
> $ perl6 a
> Statement not terminated properly at line 4, near "1;\n"
> in Main (src/gen_setting.pm:3460)
> 
> $ cat > b
> my $i;
> die '' if /\#/;
> ++$i;
> $ perl6 b
> perl6regex parse error: Quantifier follows nothing in regex at offset
> 24, found '+'
> in Main (src/gen_setting.pm:3460)
> 
> <moritz_> \# is forbbiden, but the error message is LTA
> <masak> waitwait, \# is forbidden? why?
> <jnthn> .oO( LTA is a re-ordering of TLA )
> <masak> LTA is also an excellent TLA.
> <moritz_> because... forgot the reason. It's in the commit message
> that modififed S05 accordingly
> <moritz_> some parsing ambiguty
> <moritz_> you have to write '#' now
> <moritz_> or maybe it was a commit against STD.pm
(Continue reading)

Will Coleda via RT | 1 Feb 15:05
Picon
Favicon

[perl #71270] [BUG] LTA error message when trying to stringify the value of an executed for loop in Rakudo

On Mon Dec 14 05:35:49 2009, masak wrote:
> This be Rakudo 7ef386.
> 
> I forgot to return a Str value from my .Str method. This is what I 
got:
> 
> $ perl6 -e 'class A { method Str() { for ^1 {} } }; say ~A.new'
> get_string() not implemented in class 'ArrayIterator'
> [...]
> 
> Would it be possible to not throw an error when this happens?

Absolutely:

09:04 < [Coke]> rakudo: class A { method Str() { for ^1 {} } }; say 
~A.new #RT 71270
09:04 <+p6eval> rakudo ce5cca: OUTPUT«␤»

Closable with tests.
--

-- 
Will "Coke" Coleda

Will Coleda via RT | 1 Feb 15:10
Picon
Favicon

[perl #73232] [BUG] LTA error message when declaring dot-twigil variables outside of a class scope in Rakudo

On Tue Mar 02 10:38:41 2010, masak wrote:
> <masak> std: my Any %.x=3,%.x;
> <p6eval> std 29917: OUTPUT«ok 00:01 109m␤»
> <masak> rakudo: my Any %.x=3,%.x;
> <p6eval> rakudo 6867a5: OUTPUT«Lexical 'self' not found [...]
> * masak submits LTA rakudobug
> 
> In my opinion, it should give an error already at the wonky declaration.

Now includes a NULL PMC error:

09:09 < [Coke]> rakudo: my Any %.x=3,%.x; #RT #73232
09:09 <+p6eval> rakudo ce5cca: OUTPUT«Useless declaration of a has-scoped
                method in mainline␤Null PMC access in find_method('x')␤  in
                block <anon> at /tmp/AGDZSzesDD:1␤  in <anon> at
                /tmp/AGDZSzesDD:1␤»

--

-- 
Will "Coke" Coleda

Will Coleda via RT | 1 Feb 15:12
Picon
Favicon

[perl #80930] [BUG] Null PMC access when declaring variable with a subtype with a '::' in it in Rakudo

On Thu Dec 23 08:30:13 2010, KyleHa wrote:
> This is an automatically generated mail to inform you that tests are
> now available in S02-polymorphic_types/subset.t
> 
> commit 9d5a903aeca75dcac306ebdb734a42f386c71306
> Author: Kyle Hasselbacher <kyleha <at> gmail.com>
> Date:   Thu Dec 23 10:29:25 2010 -0600
> 
>     [subset.t] Test for RT 80930
> 
> diff --git a/S02-polymorphic_types/subset.t b/S02-
> polymorphic_types/subset.t
> index 7d21f7d..e3da89f 100644
> --- a/S02-polymorphic_types/subset.t
> +++ b/S02-polymorphic_types/subset.t
> @@ -164,4 +164,10 @@ dies_ok { my Digit $x = 3.1 },
>      ok 1 ~~ aboveLexVarLimit, 'can use subset that depends on lexical
> variable (1)';
>      nok -1 ~~ aboveLexVarLimit, 'can use subset that depends on
> lexical variable (2)';
>  }
> +
> +subset Bug::RT80930 of Int where { $_ %% 2 };
> +#?rakudo todo 'RT 80930'
> +lives_ok { my Bug::RT80930 $rt80930 }, 'subset with "::" in the
> name';
> +
> +
>  # vim: ft=perl6
> 
(Continue reading)

Will Coleda via RT | 1 Feb 15:15
Picon
Favicon

[perl #77070] [BUG] .perl on Attribute does not work with LTA error message

On Sat Aug 07 04:40:57 2010, lithos wrote:
> Hi!
> 
> Calling .perl on an Attribute gives me a confusing error message:
> 
> Method 'attributes' not found for invocant of class ''
>   in 'Mu::attribs' at line 1198:CORE.setting
>   in 'Mu::perl' at line 1207:CORE.setting
>   in main program body at line 7:test.pl
> 
> Lithos
> 
> This is Rakudo Perl 6, version 2010.07-84-g0e5edb5 built on parrot
> 2.6.0 r48225
> 
> $ cat test.pl
> use v6;
> 
> my $attr = Int.^methods.first({.name eq <new>}).^attributes.[0];
> 
> say $attr.WHAT;
> say $attr.name;
> say $attr.perl;

Instead of a confusing error message, we now segfault.

Here's the beginning of the stacktrace:

#0  0xf63d9f4d in Rakudo_cont_decontainerize () from dynext/perl6_ops.so
#1  0xf63d86ad in find_in_cache () from dynext/perl6_ops.so
(Continue reading)

Will Coleda via RT | 1 Feb 15:17
Picon
Favicon

[perl #77110] LTA message on unescaped "-" in substitution

On Mon Aug 09 07:19:30 2010, pawel.pabian <at> implix.com wrote:
> $ perl6 -e '$_ = "0"; s/-/1/;'
> Could not find sub &s
>   in main program body at line 1
> 
> same LTA message is on STD:
> 
> [16:08] <bbkr> std: $_ = "0"; s/-/1/;
> [16:08] <p6eval> std 31912:
> OUTPUT«===SORRY!===␤Undeclared
> routine:␤      's' used at line 1␤Check failed␤FAILED 00:01 116m␤»
> [16:08] <bbkr> who can explain this one?
> [16:08] <moritz_> you need to escape - in a regex
> [16:09] <moritz_> and empty regex is disallowed
> [16:09] <moritz_> and std used to give good error messages for both,
> but it's
> borked now
> [16:09] <bbkr> moritz_: I know about escaping. but error is LTA in
> this case.
> [16:10] <moritz_> bbkr: not only LTA. It sucks.
> [16:10] <moritz_> TimToady: (see above)

This now gives the much awesomer:

09:16 < [Coke]> rakudo: $_ = "0"; s/-/1/; # RT #77110
09:16 <+p6eval> rakudo ce5cca: OUTPUT«===SORRY!===␤Unrecognized regex
                metacharacter (must be quoted to match literally) at 
line 1,
                near "/1/; # RT "␤»

(Continue reading)

Will Coleda via RT | 1 Feb 15:19
Picon
Favicon

[perl #81060] [BUG] LTA error messages when a class inherits from a stubbed class in Rakudo

On Tue Dec 21 01:10:35 2010, masak wrote:
> <masak> rakudo: class A { ... }; class B is A {}; class A {}
> <p6eval> rakudo cae7f9: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
> * masak submits LTA rakudobug
> * masak wonders idly what the parent is
> <masak> rakudo: class A { ... }; say A.WHAT
> <p6eval> rakudo cae7f9: OUTPUT«Failure()␤»
> <masak> ah.
> <masak> rakudo: class A { ... }; class B is A {}
> <p6eval> rakudo cae7f9: OUTPUT«===SORRY!===␤Null PMC access in 
can()␤»
> <masak> huh.
> <masak> that's the first causality-defying Null PMC access. :)

This seems fine now:

09:18 < [Coke]> rakudo: class A { ... }; class B is A {}; class A {} #RT 
#81060
09:18 <+p6eval> rakudo ce5cca:  ( no output )
09:18 < [Coke]> rakudo: class A { ... }; say A.WHAT #RT 81060
09:18 <+p6eval> rakudo ce5cca: OUTPUT«===SORRY!===␤The following 
packages were
                stubbed but not defined:␤    A␤␤»

Closable with tests.
--

-- 
Will "Coke" Coleda

Will Coleda via RT | 1 Feb 15:21
Picon
Favicon

[perl #74664] [BUG] LTA error message for attempting to use a signature in a list assignment

On Sat Jul 24 10:38:58 2010, moritz wrote:
> 19:36 <@moritz_> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar"
> 19:36 <+p6eval> rakudo 928f9d: OUTPUT«a Any()␤»
> 
> Much better now, though not perfect.

Slight change:

09:20 < [Coke]> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" #RT
                #74664
09:20 <+p6eval> rakudo ce5cca: OUTPUT«a ␤»

--

-- 
Will "Coke" Coleda

Will Coleda via RT | 1 Feb 15:28
Picon
Favicon

[perl #78316] [BUG] Weird error when doing .perl on .^attributes in Rakudo

On Sun Oct 10 16:05:36 2010, masak wrote:
> <masak> rakudo: class Car { has @.wheels }; say Car.^attributes
> <p6eval> rakudo 5bdbd4: OUTPUT«@!wheels␤»
> <masak> rakudo: class Car { has @.wheels }; say Car.^attributes.perl
> <p6eval> rakudo 5bdbd4: OUTPUT«Method 'attributes' not found for
> invocant of class ''␤  in 'Mu::attribs' at line 1216:CORE.setting␤  
in
> 'Mu::perl' at line 1225:CORE.setting␤  in main program body at line
> 1␤»
> <masak> o.O
> * masak submits rakudobug

New output:

09:27 < [Coke]> rakudo: class Car { has @.wheels }; say 
Car.^attributes.perl
                #RT 78316
09:27 <+p6eval> rakudo ce5cca: OUTPUT«(Attribute.new(),)␤»

Good enough?

--

-- 
Will "Coke" Coleda

Will Coleda via RT | 1 Feb 15:33
Picon
Favicon

[perl #80008] inconsistency in "my $.foo; $.foo"

On Tue Nov 30 05:36:43 2010, pawel.pabian <at> implix.com wrote:
> Please check following example:
> 
> [14:27] <bbkr> rakudo: my $.foo; say "alive"; $.foo
> [14:27] <p6eval> rakudo : OUTPUT«alive␤Null PMC access in
> find_method('foo')␤
> in main program body at line 22:/tmp/B60vOmq2fl␤»
> 
> Declaration of class attribute works in main scope. But accessing it
> does not.
> 
> Either appearance of $.foo in main scope should give error about
> useless
> usage/declaration (for example like when you try to write "method foo
> {}" in
> main scope).
> This requires STD change I think, because now this syntax is legal.
> 
> Or...
> 
> Accessing $.foo should not give Null PMC access.
> 
> 
> I don't know which one is correct (spec says nothing about class
> attributes
> used in main scope).
> 
> 
> 

(Continue reading)


Gmane