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
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
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
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
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
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)
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
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
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
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
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
“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”
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
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'.
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'
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'.
The test in S02-names-vars/perl.t is passing now. I'm closing this ticket as
'resolved'.
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
The test in S02-names/pseudo.t passes on JVM now. I'm closing this ticket as
'resolved'.
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
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
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'.
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
On Thu, 01 Mar 2012 13:07:28 -0800, masak wrote:
> nom: '' ~~ / :my $a; <{ '$a' }> /
> nom 48af8c: OUTPUT«===SORRY!===Variable $a is not
> declaredat 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' }> /, #
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
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
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«aliveNominal type check
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
>
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/
# 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(
# 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
# 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
# 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
# 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
# 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;
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
36 matches
Mail list logo