[perl #128801] Perl 6 docs don't mention pragmas in a doc search
# New Ticket Created by Tom Browder # Please include the string: [perl #128801] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128801 > This transaction appears to have no content
[perl #128802] [BUG] Spurious useless use warning in for (@a xx 1) { }
# New Ticket Created by Zoffix Znet # Please include the string: [perl #128802] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128802 > m: my @a = 1; for (@a xx 1) { } rakudo-moar 4ee104: OUTPUT«WARNINGS for :Useless use of @a in sink context (line 1)» -- Cheers, ZZ | https://twitter.com/zoffix
[perl #128803] [BUG] Runtime errors marked as compile time
# New Ticket Created by Zoffix Znet # Please include the string: [perl #128803] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128803 > Some errors have a '===SORRY!===' in the output, even though they are runtime errors: $ ./perl6 -e 'say "meow"; .rotor: 1 => -2;' meow ===SORRY!=== .rotor position is out of range. Is: -1, should be in 0..Inf; (ensure the negative gap is not larger than the length of the sublist) m: say "meow"; my $m = (1,2 X~ ('' X~ '')).first: *.IO.f; rakudo-moar 4ee104: OUTPUT«meow===SORRY!===Cannot invoke this object (REPR: Uninstantiable; Callable)» m: say ‘meow’; *...‘WAT’ rakudo-moar 4ee104: OUTPUT«meow===SORRY!===Method 'succ' not found for invocant of class 'Whatever'» m: say ‘meow’; say 0, * ... "what" rakudo-moar 4ee104: OUTPUT«meow===SORRY!===Method 'pred' not found for invocant of class 'Whatever'» -- Cheers, ZZ | https://twitter.com/zoffix
[perl #128804] [LTA] error message talks about 2/-1 fractional chars (:35)
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #128804] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128804 > Code: say :35 Result: ===SORRY!=== Error while compiling -e Couldn't process entire number: 2/6 int chars, 2/-1 fractional chars at -e:1 --> say :35⏏ I am not even sure if I understand the “2/6 int chars” part, and “2/-1 fractional chars” is completely beyond me.
Re: Questions on using other "modules" in nqp
My short answer would be that there's not a shortcut way in NQP to avoid the fully-qualified sub names. I'm doubtful that we want to duplicate Perl 6's import mechanism into NQP. Pm On Fri, Jul 22, 2016 at 07:48:55AM -0500, Tom Browder wrote: > ping > > On Thu, Jul 7, 2016 at 7:49 AM, Tom Browder wrote: > > I have added a file "DebugPod.nqp" in the directory rakudo/src/Perl6 > > and want to use it for debugging other files in that directory. > > > > Following the format of the "Pod.nqp" file in that directory, I have > > structured my new file this way: > > > > Perl6::DebugPod { > > our sub debug_rows($desc, @rows) {...} > > our sub debug_array($desc, @arr) {...} > > # etc. > > } > > > > In file "Pod.nqp" I have added at the top before the class declaration: > > > > use Perl6::DebugPod; > > > > Inside "Pod.nqp" I currently (and successfully) call the debug > > functions like this: > > > > Perl6::DebugPod::debug_rows('after &process_rows', @rows); > > > > The main question I have is "is there any way to avoid having to use > > the fully-qualified sub name on the external functions?" > > > > Thanks. > > > > Best regards, > > > > -Tom
Re: Questions on using other "modules" in nqp
On Mon, Aug 1, 2016 at 3:05 PM, Patrick R. Michaud wrote: > My short answer would be that there's not a shortcut way in NQP > to avoid the fully-qualified sub names. I'm doubtful that we want > to duplicate Perl 6's import mechanism into NQP. That's all I need to know. Thanks, Patrick! -Tom
[perl #128806] [BUG] .hash on [Bag|Mix][Hash]? types stringifies keys
# New Ticket Created by Zoffix Znet # Please include the string: [perl #128806] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128806 > As reported in RT#127402, Set.hash stringified keys. That problem has since been fixed, however, it still exists on Bag, BagHash, Mix, and MixHash types: zoffix@VirtualBox:~/CPANPRC/rakudo$ cat ../test.p6 use Test; plan 15; is Set.new($()).hash.keys[0][0], 'a', 'Set.new'; is ($(),).Set.hash.keys[0][0], 'a', '.Set'; is set($(),).hash.keys[0][0], 'a', 'set()'; is SetHash.new($()).hash.keys[0][0], 'a', 'SetHash.new'; is ($(),).SetHash.hash.keys[0][0], 'a', '.SetHash'; is Bag.new($()).hash.keys[0][0], 'a', 'Bag.new'; is ($(),).Bag.hash.keys[0][0], 'a', '.Bag'; is bag($()).hash.keys[0][0], 'a', 'bag()'; is BagHash.new($()).hash.keys[0][0], 'a', 'BagHash.new'; is ($(),).BagHash.hash.keys[0][0], 'a', '.BagHash'; is Mix.new($()).hash.keys[0][0], 'a', 'Mix.new'; is ($(),).Mix.hash.keys[0][0], 'a', '.Mix'; is mix($()).hash.keys[0][0], 'a', 'mix()'; is MixHash.new($()).hash.keys[0][0], 'a', 'MixHash.new'; is ($(),).MixHash.hash.keys[0][0], 'a', '.MixHash'; zoffix@VirtualBox:~/CPANPRC/rakudo$ prove -e './perl6-m' -vlr ../test.p6 ../test.p6 .. 1..15 ok 1 - Set.new ok 2 - .Set ok 3 - set() ok 4 - SetHash.new ok 5 - .SetHash not ok 6 - Bag.new # Failed test 'Bag.new' # at ../test.p6 line 11 # expected: 'a' # got: 'a b' not ok 7 - .Bag # Failed test '.Bag' # at ../test.p6 line 12 # expected: 'a' # got: 'a b' not ok 8 - bag() # Failed test 'bag()' # at ../test.p6 line 13 # expected: 'a' # got: 'a b' not ok 9 - BagHash.new # Failed test 'BagHash.new' # at ../test.p6 line 15 # expected: 'a'not ok 10 - .BagHash # got: 'a b' # Failed test '.BagHash' # at ../test.p6 line 16 # expected: 'a' # got: 'a b' not ok 11 - Mix.new # Failed test 'Mix.new' # at ../test.p6 line 18 # expected: 'a' # got: 'a b' not ok 12 - .Mix # Failed test '.Mix' # at ../test.p6 line 19 # expected: 'a' # got: 'a b' not ok 13 - mix() # Failed test 'mix()' # at ../test.p6 line 20 # expected: 'a' # got: 'a b' not ok 14 - MixHash.new # Failed test 'MixHash.new' # at ../test.p6 line 22 # expected: 'a' not ok 15 - .MixHash # got: 'a b' # Failed test '.MixHash' # at ../test.p6 line 23 # expected: 'a' # got: 'a b' # Looks like you failed 10 tests of 15 Dubious, test returned 10 (wstat 2560, 0xa00) Failed 10/15 subtests Test Summary Report --- ../test.p6 (Wstat: 2560 Tests: 15 Failed: 10) Failed tests: 6-15 Non-zero exit status: 10 Files=1, Tests=15, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.37 cusr 0.03 csys = 0.43 CPU) Result: FAIL zoffix@VirtualBox:~/CPANPRC/rakudo$ -- Cheers, ZZ | https://twitter.com/zoffix
[perl #128809] [BUG] async related data issue
# New Ticket Created by Justin DeVuyst # Please include the string: [perl #128809] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128809 > [jdv@wieldy ~]$ cat test_n_threads.p6 use v6; await map { start { my $foo = "barbaz"; $foo ~~ s/.+/{ .roll($/.chars).join }/; } }, ^100; [jdv@wieldy ~]$ perl6 test_n_threads.p6 Use of Nil in string context in block at test_n_threads.p6 line 5 Use of Nil in string context in block at test_n_threads.p6 line 5 [jdv@wieldy ~]$ perl6 test_n_threads.p6 Use of Nil in string contextUse of Nil in string contextUse of Nil in string context in block at test_n_threads.p6 line 5 in block at test_n_threads.p6 line 5 in block at test_n_threads.p6 line 5 Type check failed in binding to ; expected Match but got Nil (Nil) in block at test_n_threads.p6 line 3 [jdv@wieldy ~]$ perl6 test_n_threads.p6 Use of Nil in string contextUse of Nil in string context in block at test_n_threads.p6 line 5 Use of Nil in string context in block at test_n_threads.p6 line 5 in block at test_n_threads.p6 line 5 Use of Nil in string context in block at test_n_threads.p6 line 5 Use of Nil in string context in block at test_n_threads.p6 line 5 [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ cat test_1_thread.p6 use v6; PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new(initial_threads => 0, max_threads => 1); await map { start { my $foo = "barbaz"; $foo ~~ s/.+/{ .roll($/.chars).join }/; } }, ^100; [jdv@wieldy ~]$ cat test_1_thread.p6 use v6; PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new(initial_threads => 0, max_threads => 1); await map { start { my $foo = "barbaz"; $foo ~~ s/.+/{ .roll($/.chars).join }/; } }, ^100; [jdv@wieldy ~]$ perl6 test_1_thread.p6 [jdv@wieldy ~]$ perl6 test_1_thread.p6 [jdv@wieldy ~]$ perl6 test_1_thread.p6 [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ cat test_no_async.p6 use v6; map { my $foo = "barbaz"; $foo ~~ s/.+/{ .roll($/.chars).join }/; }, ^100; [jdv@wieldy ~]$ perl6 test_no_async.p6 [jdv@wieldy ~]$ perl6 test_no_async.p6 [jdv@wieldy ~]$ perl6 test_no_async.p6 [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ [jdv@wieldy ~]$ perl6 -v This is Rakudo version 2016.07.1-102-ge411e5d built on MoarVM version 2016.07-11-g11e02fe implementing Perl 6.c. [jdv@wieldy ~]$
[perl #128810] Leading multi-line declarator block on role breaks stubs in composition
# New Ticket Created by Faye # Please include the string: [perl #128810] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128810 > m: #|(abc) role A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo rakudo-moar f1313d: OUTPUT«===SORRY!=== Error while compiling Method 'foo' must be implemented by A because it is required by a roleat :1» m: #|abcrole A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo rakudo-moar f1313d: OUTPUT«OK» m: #|[[[abc]]]role A { method foo { ... } }; class B does A { method foo { "OK" } }; say B.foo rakudo-moar f1313d: OUTPUT«===SORRY!=== Error while compiling Method 'foo' must be implemented by A because it is required by a roleat :2» It specifically has to be a _leading_ declarator block, and as seen above it has to be the multi-line (delimited) variety. The single-line variant works fine. Trailing declarator blocks don't break this either. As seen above, the specific choice of delimiters on the declarator block is irrelevant.
[perl #128811] non-associatives are somehow getting treated as list associatives
# New Ticket Created by Aaron Sherman # Please include the string: [perl #128811] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128811 > >From tonight's IRC: [01:01] I'm not sure how to read this error: Only identical operators may be list associative; since '..' and '..' differ, they are non-associative and you need to clarify with parentheses ... [01:05] m: say 1 .. 2 .. 3 [01:05] <+camelia> rakudo-moar f1313d: OUTPUT«===SORRY!=== Error while compiling Only identical operators may be list associative; since '..' and '..' differ, they are non-associative and you need to clarify with parenthesesat :1--> say 1 .. 2⏏ .. 3expectin…» [01:05] it's LTA for sure [01:06] .. should really be considered non-associative, probably [01:06] TimToady: Great example. I'll rakudobug that before I turn in. [01:06] m: 1 but 2 but 3 [01:06] <+camelia> rakudo-moar f1313d: OUTPUT«===SORRY!=== Error while compiling Only identical operators may be list associative; since 'but' and 'but' differ, they are non-associative and you need to clarify with parenthesesat :1--> 1 but 2⏏ but 3expecti…» [01:07] yeah, non-associatives are somehow getting treated as list associatives [01:07] m: say 1 <=> 2 <=> 3 [01:07] <+camelia> rakudo-moar f1313d: OUTPUT«===SORRY!=== Error while compiling Only identical operators may be list associative; since '<=>' and '<=>' differ, they are non-associative and you need to clarify with parenthesesat :1--> say 1 <=> 2⏏ <=> 3expe…» [01:07] it's just the wrong error -- Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and life-long student.