[perl #132051] [BUG] Parametric type object passed as literal die with error

2017-09-10 Thread Sam S. via RT
Although that particular error message seems to be specific to `Blob`, it also breaks with other parametric roles (such as `Array`), because the generic parameter T of the outer role seems to be passed through without being specialized first. Shorter examples: ➜ role R[::T] { method a { A

[perl #132052] [BUG] size passed as parameter to parametric Buf.new method die with error

2017-09-10 Thread Sam S. via RT
It doesn't seem to be specific to type `size_t` - it also happens with other native types such as `int`. Shorter example: ➜ sub a (int $a) { Blob[int].new($a) }; say a 12; Type check failed in initializing element #0 to Blob[int]; expected int but got Int (12) Examples that *don't* f

[perl #132047] [BUG] Splicing Seq into array installs immutable values

2017-09-10 Thread Sam S. via RT
On Fri, 08 Sep 2017 18:37:50 -0700, tomentiru...@gmail.com wrote: > > > my @h > [] > > @h.splice: 0, 0, 1.Seq > [] > > @h[0].VAR.WHAT > (Int) > > @h[0] = 5 > Cannot modify an immutable Int (1) > in block at line 1 > > I got hit by this with: @a.splice: 0, 0, Any xx 2 Good find. It's also no

[perl #132042] [CONC] rakudo hangs while concurrently walking trees

2017-09-10 Thread Sam S. via RT
Even simpler test-case: for ^1 { start say $_ } For me, this almost always hangs (after printing a few dozen or few hundred lines), with the MoarVM version currently used by Rakudo nom: MoarVM version 2017.08.1-128-gde6dced But *no longer* hangs with MoarVM master (which has the fi

[perl #95970] [BUG] Code.callwith introduces an official CALLER frame in Rakudo

2017-09-10 Thread Sam S. via RT
On Sat, 30 Jul 2011 14:19:40 -0700, masak wrote: > is there a method for invoking a Routine? besides > postcircumfix:<( )>, I mean? > rakudo: sub foo($a) { say $a }; &foo.callwith(42) > rakudo 922500: OUTPUT«42␤» > That's what I thought when I saw .callwith :) > oh, interesting, .callwith with

[perl #107844] [BUG] .wrap and 'is export' don't play along in Rakudo

2017-09-10 Thread Sam S. via RT
On Tue, 10 Jan 2012 02:16:07 -0800, masak wrote: > about wrap again: https://gist.github.com/1585730 > > Included here for completeness: > > ┌─[tadzik@yavin4]─[~/src/perl/bailador] (master)* > └─[%]─> cat lib/Bailador.pm > module Bailador; > > our sub our_template { > return "(our template)

[perl #111912] [BUG] Composing an inherited class through a parametric role doesn't work in Rakudo

2017-09-10 Thread Sam S. via RT
On Wed, 21 Mar 2012 08:32:55 -0700, masak wrote: > nom: role A[::T $] { also is T }; class B { }; class C does > A[B] { }; say C ~~ B > rakudo 1a468d: OUTPUT«===SORRY!===␤Cannot type check against > type variable T␤» Now it throws earlier, and with a nicer error message: ===SORRY!=== Error

[perl #113628] [BUG] error when doing a hyper-mutate-flip on an array

2017-09-10 Thread Sam S. via RT
On Wed, 13 Jun 2012 23:13:01 -0700, masak wrote: > r: (my @) ».=« flip > rakudo 90333b: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't > shift from an empty array!␤» Still present in: This is Rakudo version 2017.08-104-g76f1d8970 built on MoarVM version 2017.08.1-148-g1059eed1 impleme

[perl #114684] [BUG] Return type mismatch should return Failure, not throw exception

2017-09-10 Thread Sam S. via RT
On Fri, 31 Aug 2012 12:36:48 -0700, pmichaud wrote: > 19:34 r: sub abc() returns Int { my $r = 3.5; $r }; my > $x = abc(); say 'alive'; > 19:34 rakudo 231137: OUTPUT«Type check failed for return > value; expected 'Int' but got 'Rat'␤ in sub abc at /tmp/P8uacuh4gB:1␤ > in block at /tmp/P8uac

[perl #130556] [JVM] Method combinations broken after commit bcc113cfb0

2017-09-10 Thread Christian Bartolomaeus via RT
This seems to be resolved now: $ ./perl6-j --version This is Rakudo version 2017.08-104-g76f1d8970 built on JVM implementing Perl 6.c. $ ./perl6-j -e 'say (2).combinations(0)' (()) Since there are tests for this behaviour in S32-list/combinations.t, I'm closing this ticket as 'resolved' without

[perl #120995] Same argument present multiple times is okay with one name, not with two

2017-09-10 Thread Sam S. via RT
On Mon, 13 Jan 2014 18:28:14 -0800, m...@kli.org wrote: > > sub f(:a(:b($x))) { say $x } > sub f(Any :a(:b($x))) { ... } > > f(:a("A"), :a("B")) > B > > f(:a("A"), :b("B")) > Unexpected named parameter 'a' passed > > If nothing else, the error message is LTA. But basically we're allowed > to pass

[perl #132044] returning inside whenever block causes MoarVM panic

2017-09-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
“almost always” indeed. It does work sometimes. Interesting. On 2017-09-07 13:33:30, nlo...@gmail.com wrote: > The code below almost always results in "MoarVM panic: Internal error: > Unwound entire stack and missed handler" > ``` > sub ran-ok() { > react { > my $proc = Proc::Async.new("echo", "1”

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Heh. FWIW we had this since forever: https://gist.github.com/Whateverable/78168042a011e01fc768c042b0d91898 On 2017-09-09 19:53:53, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h

[perl #128320] [JVM] NullPointerException when using sub form of map on array with deleted element

2017-09-10 Thread Christian Bartolomaeus via RT
This problem has been resolved: $ ./perl6-j -e 'my @array = 0..1; @array[0]:delete; say map { $_ }, @array' ((Any) 1) The test in S32-array/delete.t is passing on the JVM backend as well. I'm closing this ticket as 'resolved'.

[perl #126518] [JVM] Problems with self referential structures

2017-09-10 Thread Christian Bartolomaeus via RT
This works now (and the test in S02-names-vars/list_array_perl.t is unfudged): $ ./perl6-j -e 'my $foo = [42 ]; $foo[1] = $foo; say $foo.perl; say $foo.perl.EVAL' ((my @Array_1924162593) = $[42, @Array_1924162593]) (\Array_532302454 = [[42 Array_532302454]]) I'm closing this ticket as 'resolved'

[perl #130687] [JVM] New UnwindExceptions after Rakudo commit d69f3751d5

2017-09-10 Thread Christian Bartolomaeus via RT
Those UnwindExceptions are gone now. The tests in S32-num/polymod.t and integration/advent2011-day23.t are passing again. I'm closing this ticket as 'resolved'.

[perl #123048] [JVM] some floats with many digits don't survive roundtrip with .perl

2017-09-10 Thread Christian Bartolomaeus via RT
The test in S02-names-vars/perl.t is passing now. I'm closing this ticket as 'resolved'.

[perl #120995] [BUG] Error when passing the same named argument twice using different aliases

2017-09-10 Thread Sam S. via RT
On Mon, 13 Jan 2014 18:28:14 -0800, m...@kli.org wrote: > > sub f(:a(:b($x))) { say $x } > sub f(Any :a(:b($x))) { ... } > > f(:a("A"), :a("B")) > B > > f(:a("A"), :b("B")) > Unexpected named parameter 'a' passed I've had a look at `src/Perl6/Metamodel/BOOTSTRAP.nqp`, which is where the error mes

[perl #123154] [JVM] Stash values are all Mu

2017-09-10 Thread Christian Bartolomaeus via RT
The test in S02-names/pseudo.t passes on JVM now. I'm closing this ticket as 'resolved'.

[perl #129092] [JVM] Can't get CORE::.keys

2017-09-10 Thread Christian Bartolomaeus via RT
This works now. I've added a simple test to S02-names/pseudo.t with roast commit 7edf26aae4. $ ./perl6-j -e 'say CORE::.keys' (SoftRoutine PF_LOCAL &METAOP_REDUCE_XOR &exit Rat Rational Slang &sqrt buf8 $?COMPILATION-ID &nextcallee &infix:<∘> &kv NQPMatchRole &any &sleep-until SIGTRAP &join &ME

[perl #129092] [JVM] Can't get CORE::.keys

2017-09-10 Thread Christian Bartolomaeus via RT
This works now. I've added a simple test to S02-names/pseudo.t with roast commit 7edf26aae4. $ ./perl6-j -e 'say CORE::.keys' (SoftRoutine PF_LOCAL &METAOP_REDUCE_XOR &exit Rat Rational Slang &sqrt buf8 $?COMPILATION-ID &nextcallee &infix:<∘> &kv NQPMatchRole &any &sleep-until SIGTRAP &join &ME

[perl #120656] [JVM] InvalidArgumentException when creating a large hash with =>

2017-09-10 Thread Christian Bartolomaeus via RT
There is no InvalidArgumentException anymore. I've added a test to S32-hash/perl.6 with commit https://github.com/perl6/roast/commit/bae1108d8f. I'm closing this ticket as 'resolved'.

[perl #121991] [BUG] Unless 'use soft' is in play, .wrap should die in Rakudo

2017-09-10 Thread Sam S. via RT
On Fri, 30 May 2014 09:51:18 -0700, masak wrote: > m: sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a(); > rakudo-moar 90cd58: OUTPUT«foo␤» This now works: ➜ sub a {"foo"}; sub b {"bar"~callsame}; &a.wrap(&b); say a(); barfoo Is TimToady's recommendation of forbidding `.wrap

[perl #111474] [BUG] Variable in string in <{ }> interpolator in regex doesn't get a proper lookup in Rakudo

2017-09-10 Thread Sam S. via RT
On Thu, 01 Mar 2012 13:07:28 -0800, masak wrote: > nom: '' ~~ / :my $a; <{ '$a' }> / > nom 48af8c: OUTPUT«===SORRY!===␤Variable $a is not > declared␤at eval_0:1␤» This works fine now - and has so for a while¹, apparently since a commit² in May 2015: say '123' ~~ / :my $a=2; <{ '$a' }> /, #

[perl #121327] [BUG] Array shift in loop in loop in loop shifts from an outdated array (on second iteration) in Rakudo

2017-09-10 Thread Sam S. via RT
It works fine now: ➜ for ^2 { my @b = 1 xx 4; say (@b.shift xx 2) xx 2 } ((1 1) (1 1)) ((1 1) (1 1)) Was apparently fixed a year ago: https://gist.github.com/Whateverable/e2a6fe61150eb2595ac0ff6929daeab1 https://github.com/rakudo/rakudo/commit/5e61516 Can be closed with tes

[perl #122504] [BUG] 'return' invoked outside of a routine should throw an exception

2017-09-10 Thread Sam S. via RT
A `return` outside a routine now always seems to throw a run-time error, as it should: $ perl6 -e 'return' Attempt to return outside of any Routine in block at -e line 1 $ perl6 -e '{ return }' Attempt to return outside of any Routine in block at -e line 1

[perl #122345] [BUG] Returning from a parameter list default counts as returning 'outside of any Routine' in Rakudo on Moar

2017-09-10 Thread Sam S. via RT
On Sun, 20 Jul 2014 10:29:57 -0700, masak wrote: > < masak> r: sub { sub foo($x = return) { $x }; say foo }(); say "alive" > rakudo-jvm bbdcfd: OUTPUT«alive␤» > ..rakudo-moar bbdcfd: OUTPUT«Attempt to return outside of > any Routine [...] > ..rakudo-parrot bbdcfd: OUTPUT«alive␤Nominal type check

[perl #131791] Custom class :D coersers don't work

2017-09-10 Thread Brian S. Julin via RT
On Fri, 08 Sep 2017 21:13:59 -0700, b...@abrij.org wrote: > On Wed, 23 Aug 2017 06:20:49 -0700, b...@abrij.org wrote: > > On Mon, 24 Jul 2017 10:04:54 -0700, c...@zoffix.com wrote: > > > The coercion works fine here: > > > > > > 17:03 Zoffix m: class B {…}; class A { method B { B.new }}; class >

how would I modify this to dump the buffer?

2017-09-10 Thread ToddAndMargo
Hi All, I am trying to dump the input buffer and exit when it finds nothing left. This test code will read binary input and it parks itself waiting for me to press "q". How would I modify this to do dump everything and not wait for a "q"? #!/usr/bin/env perl6 # Reference: https://github.com/

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-10 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #132053] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132053 > > my @h is default([]) [] > @h[0].push: 3 [3] > @h [] > @h[0] [3] > my %h is default(

[perl #132047] [BUG] Splicing Seq into array installs immutable values

2017-09-10 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #132047] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132047 > > my @h [] > @h.splice: 0, 0, 1.Seq [] > @h[0].VAR.WHAT (Int) > @h[0] = 5 Cannot modi

[perl #132050] [BUG] Strange behavior with FIRST + while block + required parameter

2017-09-10 Thread via RT
# New Ticket Created by ugexe # Please include the string: [perl #132050] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132050 > while $(1,2) -> @_ { FIRST { say 42 }; say @_; last if ++$ } # Too few positionals passed; expec

[perl #132052] [BUG] size passed as parameter to parametric Buf.new method die with error

2017-09-10 Thread via RT
# New Ticket Created by Vittore Scolari # Please include the string: [perl #132052] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132052 > The following script: use NativeCall :types; class a { method new(siz

[perl #132056] Role type parameter doesn't initialise properly

2017-09-10 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #132056] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132056 > > role R[::T] { has T $.r is rw } (R) > R[Str].new.perl No such method 'perl' for invo

[perl #132051] [BUG] Parametric type object passed as literal die with error

2017-09-10 Thread via RT
# New Ticket Created by Vittore Scolari # Please include the string: [perl #132051] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132051 > The following script role DataNo { method Blob() { my \T = uint8;

Re: how would I modify this to dump the buffer?

2017-09-10 Thread ToddAndMargo
On 09/10/2017 09:32 PM, ToddAndMargo wrote: Hi All, I am trying to dump the input buffer and exit when it finds nothing left. This test code will read binary input and it parks itself waiting for me to press "q". How would I modify this to do dump everything and not wait for a "q"? #!/usr/bin