rakudo / rakudo Goto Github PK
View Code? Open in Web Editor NEW🦋 Rakudo – Raku on MoarVM, JVM, and JS
Home Page: https://rakudo.org/
License: Artistic License 2.0
🦋 Rakudo – Raku on MoarVM, JVM, and JS
Home Page: https://rakudo.org/
License: Artistic License 2.0
UPDATE: Ignore OP; the actual problem is a poor error
OP:
<Zoffix__> m: sub { 1.map: { return 42 } }()
<camelia> rakudo-moar 1251f771c: OUTPUT: «Attempt to return outside of any Routine in block <unit> at <tmp> line 1»
<Zoffix__> bisect: sub { 1.map: { return 42 } }()
<bisectable6> Zoffix__, On both starting points (old=2015.12 new=f40babb) the exit code is 1 and the output is identical as well
<bisectable6> Zoffix__, Output on both points: «Attempt to return outside of any Routine in block <unit> at /tmp/6LvcPFlvmv line 1»
The second line of this code silently fail
s to bind a new value:
my $h := Map.new: (:42foo);
$h<foo> := 100;
say $h; # OUTPUT: Map.new((foo => 42))
Presumably, the Failure
doesn't explode because variable assignment/binding doesn't sink the returned values, BUT it does work correctly when trying the same thing with a List:
my $h := Map.new: (:42foo);
my $x = ($h<foo> := 100);
say $h; # OUTPUT: Map.new((foo => 42))
say $x.^name; # OUTPUT: Failure
say $x.exception.^name; # OUTPUT: X::Bind
my $h := Map.new: (:42foo);
sink $h<foo> := 100;
# Cannot bind to Map
# in block <unit> at test.p6 line 2
my $list := <foo bar ber>;
$list[0] := 100;
Cannot use bind operator with this left-hand side
in block <unit> at test.p6 line 5
class A {
method a() is DEPRECATED<b> {
}
}
$ perl6 --ll-exception -I. -MFoo -e 'dd A.a'
Cannot invoke this object (REPR: Null; VMNull)
at SETTING::src/core/traits.pm:150 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.setting.moarvm:)
from /Users/liz/Github/rakudo.moar/Foo.pm6 (Foo):3 (/Users/liz/Github/rakudo.moar/.precomp/E7148DC9FED15B480AF079994892987152D023CD.1509221700.44536/20/201A6B3053CC1422D2C3670B62616221D2290929:a)
from -e:1 (<ephemeral file>:<unit>)
from -e:1 (<ephemeral file>:<unit-outer>)
grammar { token ws { \s+ }; token zs { \s+ }; token TOP {['if' | 'if' <.zs> 'else'] $} }.parse("if else").say # OUTPUT: «「if else」»
grammar { token ws { \s+ }; token zs { \s+ }; token TOP {['if' | 'if' <.ws> 'else'] $} }.parse("if else").say # OUTPUT: «Nil»
zs
was used to confirm ws
was treated as non-declarative, even after you've redefined it in a declarative way.
This issue is an attempt to give RT#76120 a new life.
Code:
say «a\ b».perl # OUTPUT: «("a", "b")»
The behavior is consistent across all rakudo releases to date (2015.12⌁2017.10).
If “\ ” is equivalent to “ ” (just space), then what's the point of that functionality? Or, if there's a good justification for this behavior, then what is it?
Same goes for other spacey things:
say «a\tb».perl # OUTPUT: «("a", "b")»
say «a\nb».perl # OUTPUT: «("a", "b")»
IMO all these should produce one element where the whitespace is part of the string (“a b”, “a\tb” and “a\nb”).
This case is even more interesting:
say «a b».perl # OUTPUT: «("a", "b")»
say «a b».perl # OUTPUT: «"a b"»
What‽ Yes, it's \c[NO-BREAK SPACE]
.
Seems to be a regression between 2017.10 and 2017.11
See https://irclog.perlgeek.de/perl6-dev/2017-11-21#i_15479409
No more info yet.
Supply.list
would make a really good (better than inheriting from Any
) implementation of Supply.Seq
. Actually, we should just rename that method to Seq
, since:
$ perl6-m -e 'say Supply.interval(2).list.WHAT'
(Seq)
A list
method returning a Seq
is less than great, though. I suggest after renaming the current list
to Seq
, we then implement Supply.list
as self.Seq.list
.
Compiler version (perl6 -v
): This is Rakudo version 2017.09-479-g7cf5ce7 built on MoarVM version 2017.09.1-614-g1952356 implementing Perl 6.c.
The repetition register needs to be saved in quant when executing the thing being quantified.
Causes bugs in:
t/spec/S05-modifier/perl5_5.t
t/spec/S05-modifier/perl5_9.t
When using splice
with a @replacement
, the replacement seems to get "slipped" into the list
my @c = ('A', 1), ('B', 2), ('D', 4);
my $x = ('C', 3);
@c.splice(2, 0, $x);
say @c.perl; # OUTPUT: [("A", 1), ("B", 2), "C", 3, ("D", 4)]
In order to make splice
keep the nesting, you need to manually add it back in
@c.splice(2, 0, [$x]);
say @c.perl; # OUTPUT: [("A", 1), ("B", 2), ("C", 3), ("D", 4)]
When providing a list as a replacement (or insertion as the case may be), replacement list should keep their container.
my @c = ('A', 1), ('B', 2), ('D', 4);
my $x = ('C', 3);
@c.splice(2, 0, $x);
say @c.perl; # OUTPUT: [("A", 1), ("B", 2), ("C", 3), ("D", 3)]
If the current behavior of splice
is wanted, the user can simply Slip the list as is common in Perl 6
@c.splice(2, 0, |$x);
It is a fairly established behavior in Perl 6 that containers are not slipped/flattened unless explicitly asked. This is how push
or unshift
works, and I think splice
should work the same.
my @c = ('A', 1), ('B', 2), ('C', 3);
my $x = ('D', 3);
@c.push($x);
say @c.perl; # OUTPUT: [("A", 1), ("B", 2), ("C", 3), ("D", 3)]
See Problem
See Problem
perl6 -v
): This is Rakudo version 2017.10-85-g5e7dfe5 built on MoarVM version 2017.10-29-g116c7a1I expect .print
(or .say, .note, etc), which returns True
, to fire the KEEP phaser.
$ perl6 -e 'for 1..5 { KEEP print(" "); UNDO print("_"); .print; }'
1_2_3_4_5_
class F {
has @.color[4] = <1 2 3 4>;
};
my $f = F.new();
say $f.color
$f.color == <1 2 3 4>
$f.color == [(Any) (Any) (Any) (Any)]
Seems to happen in 2017.09 and HEAD version used by the m bot in #perl6
Currently Nil is assigned to the parameter even though a default value is assigned.
sub f($a = 42){ say $a }; f Nil;
# rakudo-moar 17db03eb3: OUTPUT: «Nil»
This is at best surprising and may lead to undefined behaviour of a program as a default value is meant to replace and as such avoid undefined values in the routine. Using the default value when Nil
is assinged would avoid that problem.
One complication would be a is raw
parameter that got a default value (what in itself may be problematic). As is raw
is meant to pass whatever is provided as an argument to the routine. In this case Nil
should be passed on even if there is a default value.
see discussion at https://irclog.perlgeek.de/perl6/2017-11-10#i_15429754
Zoffix │ m: if "1" ~~ /(\d)/ -> $ (Str() $_) {.say}
camelia │ rakudo-moar 4fca94743: OUTPUT: «Cannot find method 'say': no method cache and no .^find_method in block <unit> at <tmp> line 1»
Zoffix │ mc: if "1" ~~ /(\d)/ -> $ (Str() $_) {.say}
committabl+│ Zoffix, ¦2015.12: «1»
bisectable+│ Zoffix, bisect log: https://gist.github.com/e32a7eb0419b04fca429a757d5295221
bisectable+│ Zoffix, There are 20 candidates for the first “new” revision. See the log for more details
We need to remove captures from the cstack when backtracking a subrule
Causes a fudge on the JVM S05-match/capturing-contexts.t
Fixed on the JS backend in nqp commit 626e60c81f6140d1a04021522e361ba2208132e5
Lines 7511 to 7547 in 2377624
> [1,2,3]>>(&say)
1sub say (| is raw) { #`(Sub|140355192792552) ... }
2sub say (| is raw) { #`(Sub|140355192792552) ... }
3sub say (| is raw) { #`(Sub|140355192792552) ... }
I don't know even how this code can run, most of time it expects a postfix operator, so this code should die, shouldn't it?
Based on discussion on RT#132352, it would be nice if you could have a %-
sigiled var to worth with SetHash and its kin and so you could use meta-assign form of set ops, like ∖=
[...] make the following variation of it work:
my %days is SetHash = Date.today … Date.new: '2014-04-02';
%days ∖= %days.grep: *.key.day-of-week > 5;
%days{Date.today}:delete;
...and then promote %-sigiled SetHash variables as the recommended way to store SetHash'es.
It should be possible to make this last example work by implementing `method STORE` for type SetHash, right?
(That it currently doesn't, may well be an oversight rather than a design choice.)
sub infix:<!~> { say @_ }; 3 !~ 4
Prints [3 4]
.
Exits with the following error: Unsupported use of !~ to do negated pattern matching; in Perl 6 please use !~~
.
This also happens with =~
, <<
, >>
, and possibly others.
This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
implementing Perl 6.c.
This started with RT#126721 that points out .subst
's replacement block has wrong $/
if caller's $/
is read-only. The bug was originally fixed by having .subst
throw in such circumstances, just like .match
and .trans
do (now reverted).
This fix caused breakage in about 20 modules and when I went to fix it I ended up staring at diffs like this, with a dozen changes, all just to rename a variable, all just because a .subst
call was used.
This is what the users would regularly have to do in their grammar actions, since $/
is the common name for the parameter. For that reason, I propose we go into the opposite direction and instead don't set caller's $/
in method forms. Off the top of my head, that'd affect .parse
, .subparse
, .match
, .trans
(currently throw on read-only $/
) and .subst
and .subst-mutate
(currently silently fail). .comb
with regex might be also in the list, except it already appears it does not touch $/
.
The operator forms (/.../
, s/...//
, S/...//
, and tr///
) on the other hand would set $/
. Unlike operators, methods are often chained, and at least to me feel like they shouldn't be messing with variables in my current scope.
So "foo" ~~ /(f)(.)(.)/
would set $/
and the user can obtain captures from it. "foo".match: /(f)(.)(.)/
would not and it'd be assumed the user would be chaining it with something and using the return value.
One obvious implementation would be to add something like :$RAKUDO-INTERNAL-SET-DOLLAR-SLASH
parameter to the methods that operators would set, since they're implemented in terms of those methods. The arg could also be made public API (e.g. :$set-match
), so users could set it in method forms to affect the $/
. Finally, the back-compat way to do this could be to add a reverse arg: one that makes method forms NOT touch $/
but IMO that feels like a bandaid over the issue and users would still get confusing errors when using these methods in grammar actions, except instead of telling them to rename the parameter we'd be telling them to set an arg.
This change would break 6.c tests, so it's 6.d material.
In a comment section of 99f38f9 it was mentioned that rakudo git repo has some scripts that are likely unused, or simply do not belong to the repo. Let's assess the situation and clean it up a little bit.
⚠ Feel free to edit this post. Mark a file with ✓ if it was moved, removed or if it's decided that it should stay. Replace “⁇” with any helpful commentary.
tools
├── autounfudge.pl
– ⁇├── available-pm-names.pl6
– deleted in 825a8b0├── benchmark.pl
– ⁇├── build
│ ├── common_bootstrap_sources
– ⁇│ ├── create-jvm-runner.pl
– ⁇│ ├── create-moar-runner.pl
– ⁇│ ├── gen-cat.nqp
– ⁇│ ├── gen-version.pl
– ⁇│ ├── install-core-dist.pl
– ⁇│ ├── jvm_core_d_sources
– ⁇│ ├── jvm_core_sources
– ⁇│ ├── Makefile-common-macros.in
– ⁇│ ├── Makefile-common-rules.in
– ⁇│ ├── Makefile-JVM.in
– ⁇│ ├── Makefile-Moar.in
– ⁇│ ├── makeMAGIC_INC_DEC.pl6
– ⁇│ ├── makeNATIVE_ARRAY.pl6
– ⁇│ ├── makeNATIVE_SHAPED_ARRAY.pl6
– ⁇│ ├── makeSLICE.pl6
– ⁇│ ├── makeUNIPROP.pl6
– ⁇│ ├── missing-commits.pl6
– compared to releasable the script probably doesn't do enough, so either delete or move to rakudo/release repo (deleted in 6ec6f1e)│ ├── moar_core_d_sources
– ⁇│ ├── moar_core_sources
– ⁇│ ├── nqp-jvm-rr.pl
– ⁇│ ├── NQP_REVISION
– this file should absolutely stay, but is it the best place for it?│ └── upgrade-repository.pl
– ⁇├── build-localtest.pl
– ⁇├── commit-stats.pl
– deleted in 028b7d2├── contributors.pl6
– part of the release process. Move to rakudo/release repo?├── create-release-announcement.pl6
– part of the release process. Move to rakudo/release repo?├── CREDITS.pl6
– ⁇├── install-dist.pl
– ⁇├── lib
│ └── NQP
│ └── Configure.pm
– used by Configure.pl├── perl6-limited.pl
– ⁇├── progress-graph.pl
– deleted in 5baede5├── rakudo-swarm.config
– ⁇├── release-dates.pl
– it is used once in forever. Let's golf it and then it can be included in the release docs├── update-passing-test-data.pl
– ⁇├── update-tai-utc.pl
– updates leap seconds└── util
└── perlcritic.conf
– ⁇If you override an op with same fixity and symbol as an already-existing op, trying to change its precedence will silently fail.
https://irclog.perlgeek.de/perl6/2017-11-06#i_15410194
16:20 Zoffix m: sub infix:<zzz> is tighter(&[+]) { &CORE::infix:</>($^a, $^b) }; say 2 + 2 zzz 2; { sub infix:<zzz> is looser(&[+]) { &CORE::infix:</>($^a, $^b) }; say 2 + 2 zzz 2 }
16:20 camelia rakudo-moar e3f6ababf: OUTPUT: «33»
16:21 Zoffix Yeah, I'd call that a bug. Your code can change from under you because the shadowing of existing ops is only half-done
This also affects overriding precedence of existing core ops. There's a short-circuit in the grammar that bails out of defining a new grammar for an op if we already have the rule for it. I think this bug can be fixed by just making that bail out smarter and making it check the configuration of the existing and wanted op match.
See this travis log for more (or just run the tests). The failures look something like "Type check failed in initializing element #0 to Buf; expected uint8 but got Any (Any)". I added 2017.10 to the .travis.yml
and they passed fine there, so it's a very recent regression.
This workaround is required, otherwise the wrong $!socket
may be closed, due to CLOSE
having the wrong outer scope.
The code using CLOSE
would work the same as the code using on-close
.
CLOSE
fires with the wrong outer chain. The wrong socket gets closed. Bad things happen.
perl6 -v
): 2017.10Lines 39 to 58 in f8e1a5f
grammar Number { rule TOP { <[A..Z]>+ } }
say Number.subparse("ABCDE", :pos(4));
# OUTPUT: 「E」
grammar Number { rule TOP { <[a..z]>+ } }
say Number.subparse("ABCDE", :i);
# OUTPUT: #<failed match>
Docs on the doc site says every adverb of regex matching can be applied.
https://docs.perl6.org/type/Grammar#method_subparse
However,
Lines 820 to 828 in f8e1a5f
seems not all of them.
Could anyone familiar with Grammar please tell me how %*opt
behavior?
Code:
await (^5).map({start { say qqx{echo -n foo $_} } })
But it does not always crash, so chances are you will need to run it like this in your shell:
while perl6 -e 'await (^5).map({start { say qqx{echo -n foo $_} } })'; do :; done
There are different ways you can observe the bug. Sometimes it hangs, sometimes it prints this:
foo 2
foo 4
foo 1
foo 0
Tried to get the result of a broken Promise
in block <unit> at -e line 1
Original exception:
This type (Nil+{Mu::Suggestion[Str]}) does not support elems
in block at -e line 1
The error message can be different. I've also seen This representation (Uninstantiable) does not support elems (for type (null))
.
The problem is reproducible on 2017.09 and HEAD(3f595ac), so maybe it's not a regression (at least not a fresh one).
See also RT #132287 and especially this comment.
IRC: https://irclog.perlgeek.de/perl6/2017-10-24#i_15345736
./script.p6:
use lib '.';
use Bug;
sub here-transform { my Int:D % = :1a }
my Int:D %exp = :1a;
say module-transform().perl; # (my Int:D % = :a(1))
say here-transform().perl; # (my Int:D % = :a(1))
say %exp.perl; # (my Int:D % = :a(1))
say module-transform() eqv %exp; # False
say here-transform() eqv %exp; # True
dd [module-transform().WHAT, %exp.WHAT, module-transform().WHAT === %exp.WHAT];
# [Hash[Int:D], Hash[Int:D], Bool::False]
./Bug.pm6:
our sub module-transform { my Int:D % = :1a }
$ perl6 script.p6
(my Int:D % = :a(1))
(my Int:D % = :a(1))
(my Int:D % = :a(1))
False
True
[Hash[Int:D], Hash[Int:D], Bool::False]
Something is busted with serialization of hashes typed with DefiniteHOW types (e.g. Int:D
). In particular, the produced .WHAT
s are not at the same address and don't match nqp::eqaddr()
which causes eqv
op to return False.
The same issue doesn't exist if we use just Int
type constraint. Or if no precompilation;
is used in the module.
Let's say you want to achieve something like this:
say <a b c>[1 xx 2] # OUTPUT: «(b b)»
But using $_
:
<a b c>[$_ xx 2] with 1
Use of Nil in string context
in block at -e line 1
Unable to call postcircumfix [ (Any) ] with a type object
Indexing requires a defined object
in block <unit> at -e line 1
So not only $_
is unitialized, but it is also trying to stringify something? Weird.
my @a = (^10).list; @a = @a.hyper(:batch(5)).map({ LAST say "last"; „∅“ });
# rakudo-moar d10d69774: ( no output )
# expexted output at the end of a batch:
# last
# FIRST and NEXT are ignored too
# It may be sensible to fail on LAST in a HyperIterable and provide a
# LAST-BATCH phaser to avoid confusion when non-parallel code is
# changed.
A picture is worth a thousand words, so I put together a test file. I'm not sure if all the assumptions made within are 100% correct, but most of the answers it produces are Obviously Wrong and ought to be fixed.
Can't find where I first reported this, I think I did back in… 2013 or 2014 or so? Oh well.
https://irclog.perlgeek.de/perl6-dev/2017-10-25#i_15352946
2017.09.474 zoffix@VirtualBox~$ perl6 -e 'm: sub foo(+$x [$ is rw = False]) { $x }; say foo().perl;'
Unhandled exception: concatenate requires a concrete string, but got null
at SETTING::src/core/Exception.pm:395 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:print_exception)
from SETTING::src/core/Exception.pm:452 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:<anon>)
from gen/moar/stage2/NQPHLL.nqp:1708 (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from src/Perl6/Compiler.nqp:42 (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1630 (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/main.nqp:47 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/main.nqp:38 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<entry>)
2017.09.474 zoffix@VirtualBox~$ perl6 -v
This is Rakudo version 2017.09-474-g765dd69 built on MoarVM version 2017.09.1-609-g1a9be0a
implementing Perl 6.c.
m: say [max] (1..100000)
rakudo-moar 97b11ed: OUTPUT: «Too many arguments in flattening array. in block at line 1»
This ticket is filed simply to make the issue in MoarVM more visible.
Go to MoarVM/MoarVM#748 (comment) for more info.
TL;DR We probably want to unbump libuv back to v1.14.1.
Tiny IRC discussion: https://irclog.perlgeek.de/moarvm/2017-11-18#i_15466913
Came across this while doing some DIHWIDT, figured I'd file it in case this crash is hiding the real error:
$ perl6 -v
This is Rakudo version 2017.11-2-g575d31e built on MoarVM version 2017.11
implementing Perl 6.c.
$ cat Foo.pm6
BEGIN True does False;
$ perl6 -I. -MFoo -e ''
Unhandled exception: This representation (VMException) does not support attribute storage (for type BOOTException)
at SETTING::src/core/Exception.pm:395 (/home/zoffix/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:print_exception)
from SETTING::src/core/Exception.pm:452 (/home/zoffix/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:<anon>)
from gen/moar/stage2/NQPHLL.nqp:1708 (/home/zoffix/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from src/Perl6/Compiler.nqp:42 (/home/zoffix/rakudo/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1630 (/home/zoffix/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/main.nqp:47 (/home/zoffix/rakudo/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/main.nqp:38 (/home/zoffix/rakudo/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/zoffix/rakudo/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/zoffix/rakudo/install/share/perl6/runtime/perl6.moarvm:<entry>)
OK, this bug report is not extremely useful, but that's about all I can do.
See Raku/whateverable#24 (comment) for some commentary on what happens.
Here's the SEGV caught with gdb: https://gist.github.com/MasterDuke17/0312dd2af1e3b2b498d91cfacc45343c
To reproduce on your own machine you'll need a local irc server, hundreds of rakudo builds and a lot of perl6 modules installed. That's very unlikely, so it's much easier to contact me if you want to play with it. I'll give you access to the server where whateverable runs, the crash is easily reproducible there.
Some discussion: https://irclog.perlgeek.de/perl6/2017-11-19#i_15471050
This is a regression, but I can't tell when it happened. Definitely there was at least one release with this bug included.
This is Rakudo version 2017.10-215-g85105077a built on MoarVM version 2017.10-86-g89fae17a6
implementing Perl 6.c.
$_ = 42; say $_ &= 3
Prints all(42, 3)
or something similar. Maybe warn about the usage of &=
.
perl6 hangs. This also happens with |=
and ^=
.
This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
implementing Perl 6.c.
Test failure on ARM (32 bits).
$ ./perl6 t/04-nativecall/02-simple-args.t
1..14
ok 1 - passed int 42
ok 2 - passed two shorts
ok 3 - passed an int32, int16 and int8
ok 4 - passed a double
ok 5 - passed a float
ok 6 - passed a string
ok 7 - checked previously passed string
ok 8 - wrapped sub
ok 9 - passed int64 0xFFFFFFFFFF
ok 10 - passed uint8 0xFE
not ok 11 - passed uint16 0xFFFE
# Failed test 'passed uint16 0xFFFE'
# at t/04-nativecall/02-simple-args.t line 62
# expected: '11'
# got: '0'
ok 12 - passed uint32 0xFFFFFFFE
ok 13 - passed size_t 42
ok 14 - passed ssize_t -42
# Looks like you failed 1 test of 14
$ uname -srm
Linux 4.13.12-sunxi armv7l
$ lsb_release -d
Description: Debian GNU/Linux 9.2 (stretch)
$ ./perl6 -v
This is Rakudo Star version 2017.10 built on MoarVM version 2017.10
implementing Perl 6.c.
make[1]: Entering directory '/<<PKGBUILDDIR>>'
perl Configure.pl --prefix=/usr --libdir=/usr/lib/perl6 --backends=moar
Unhandled exception: Bytecode validation error at offset 150, instruction 24:
out of range SC index 56283
at <unknown>:1 (/usr/share/nqp/lib/ModuleLoader.moarvm:<load>)
from <unknown>:1 (/usr/share/nqp/lib/nqp.moarvm:<dependencies+deserialize>)
===SORRY!===
Unable to read configuration from NQP on MoarVM
To automatically clone (git) and build a copy of NQP 2017.10,
try re-running Configure.pl with the '--gen-moar' option.
Or, use '--prefix=' to explicitly specify the path where the NQP and MoarVM
executables can be found that are use to build Rakudo.
debian/rules:21: recipe for target 'override_dh_auto_configure' failed
s390x powerpc ppc64 fail in a similar way
repl.t
exits 1:Test Summary Report
-------------------
t/02-rakudo/repl.t (Wstat: 256 Tests: 39 Failed: 1)
Failed test: 34
Non-zero exit status: 1
Files=67, Tests=839, 380 wallclock secs ( 1.20 usr 0.27 sys + 865.60 cusr 434.20 csys = 1301.27 CPU)
Result: FAIL
Makefile:568: recipe for target 'm-coretest5' failed
More details are available on rakudo buildd page
Debian bugs:
Note that rakudo is built on Debian with the latest released version of libtommath.
All the best
Now we handle pod-table assuming all its rows contain raw string. However, users might want to embed pod code with pod-table, especially C<>
. Can we recursively deal with pod table?
Below are code relevant IMO.
Lines 1106 to 1108 in d6cd0d2
Lines 1343 to 1349 in d6cd0d2
Line 188 in ba718f4
Treat text in pod table raw as pod6 code.
Raw string.
=begin table
$*ARGFILES | An C<IO::CatHandle> that uses C<@*ARGS> as source
| files, if it contains any files, or C<$*IN> otherwise
------------------+--------------------------------------------
@*ARGS | B<Arguments> from the I<command line>.
------------------+--------------------------------------------
=end table
say $=pod;
[Pod::Block::Table
$["\$*ARGFILES", "An C<IO::CatHandle> that uses C<\@*ARGS> as source files, if it contains any files, or C<\$*IN> otherwise"]
$["\@*ARGS", "B<Arguments> from the I<command line>."]
]
perl6 -v
):This is Rakudo version 2017.10-125-g360eb2289 built on MoarVM version 2017.10-57-gd257df23
implementing Perl 6.c.
parrot 2.3
rakudo-2010.04-0-gd952fc4 make error
cc1: error: unrecognized command line option "-Wjump-missed-init"
make: *** [src/pmc/perl6_group.so] Error 1
With some weird Unicode chars for custom operators, the definition succeeds and installs the op, but trying to use it fails.
I think these should either work, or the definition should complain about invalid character.
$ perl6 -v
This is Rakudo version 2017.11-2-g575d31e built on MoarVM version 2017.11
implementing Perl 6.c.
$ perl6 -e 'sub infix:«"z"» ($,$) { say "here" }; "42 z 42".EVAL'
here
$ perl6 -e 'sub infix:«"\x[2028]"» ($,$) { say "here" }; "42 \x[2028] 42".EVAL'
===SORRY!=== Error while compiling /home/zoffix/EVAL_0
Confused
at /home/zoffix/EVAL_0:2
------> 42⏏
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop
"trans" method does not work as expected.
"string".trans("tz" => "", :complement, :delete) # works
"string".trans("xz" => "", :complement, :delete) # does not work
Should remove all complement characters
Removes complement characters only if at least one of original was in a string.
"string".trans("xz" => "", :complement, :delete) # does not work
perl6 -v
):Code:
my $x = ‘5 6 7 8’; dd «$x»
Result:
slip(IntStr.new(5, "5"), IntStr.new(6, "6"), IntStr.new(7, "7"), IntStr.new(8, "8"))
So that ↑ gives a slip, but normally ↓ you get a plain List:
Code:
my $x = ‘5 6 7 8’; dd «$x 1»
Result:
(IntStr.new(5, "5"), IntStr.new(6, "6"), IntStr.new(7, "7"), IntStr.new(8, "8"), IntStr.new(1, "1"))
IRC discussion: https://irclog.perlgeek.de/perl6/2017-10-24#i_15345542
List.new
uses **@items
to gather stuff to make a list out of, but that gives each item an own container, which produces a mutable List
:
[14:04] <asdsdfgh> m: my $l := List.new: 42; say $l[0] = 42;
[14:04] <+camelia> rakudo-moar 8ccb60e39: OUTPUT: «42»
Instead, the method should probably just do something similar to what &infix:<,>
does
https://rt.perl.org/Public/Bug/Display.html?id=127958 is caused by that on the JVM
we have a fuged test in roast for that
This reliably fails on camelia bot: (-11... segfault?)
m: await ^60 .map: { start sleep ⅓ }
rakudo-moar ae1f0fdaf: OUTPUT: «MoarVM panic: Could not spawn thread: errorcode -11»
This doesn't happen with the same bot using 2017.07 release, suggesting it might be a regression:
star: await ^60 .map: { start sleep ⅓ }
star-m 2017.07: ( no output )
Also it doesn't happen with committable
bot on HEAD either:
c: HEAD await ^600 .map: { start sleep ⅓ }
Zoffix, ¦HEAD(ae1f0fd): «»
So maybe the error is due to some Doesn't seem to be it; replicated the entire ulimit setup from camelia's box on my local box and can't repro the issue locally.ulimit
or something?
Code:
#
Result:
Segmentation fault
It does not happen reliably, use this bash snippet to reproduce:
while perl6 -e '#'; do echo $((++i)); done
The character in question is <reserved-ABCDE>
(0x0ABCDE).
Code:
say ‘A’.uniprop
Result (2015.12⌁2017.10):
Lu
Result (HEAD(149ed24)):
Cn
Bisected to dbf0a21, and this is the relevant moarvm bump: Raku/nqp@de0f955
I am pretty sure it should be Lu
(Letter, Uppercase) and not Cn
(Character, not assigned).
Here is current (at time of writing) implementation of Range.sum()
method sum() is nodal {
my ($start,$stop) = self.int-bounds || nextsame;
my $elems = 0 max $stop - $start + 1;
($start + $stop) * $elems div 2;
}
If int-bounds
fails, nextsame
jumps to Any.sum()... which iterates the invocant and adds each iteration until IterationEnd
. This means attempting to sum an infinite range will never terminate, eg. (1..*).sum
.
Besides an infinite Range, the smallest Range I could find (on my machine) that would fail int-bounds
is (0 .. 1e309)
. I tried to sum that on my machine but gave up waiting after about 30 mins.
With that in mind... is there any reason why Range.sum() shouldn't just check self.is-lazy
and if True, throw something like "Cannot sum infinite Range"
First, I installed MoarVM and NQP by checking out the master branch and running in each directory:
perl Configure.pl --prefix="D:\rakudo" --make-install
To install rakudo, I tried the above command, then I tried it with --backends=moar
, then without --make-install
and running gmake
separately. The result was the same. This is the part that failed:
D:\rakudo\bin\nqp-m.bat --target=mbc --output=blib/Perl6/World.moarvm --encoding=utf8
)
src/Perl6/World.nqp
While looking for 'Perl6/ModuleLoader.moarvm': no such file or directory
at src\vm\moar\ModuleLoader.nqp:51 (D:\rakudo\share\nqp\lib/ModuleLoader.moarvm:)
from src\vm\moar\ModuleLoader.nqp:41 (D:\rakudo\share\nqp\lib/ModuleLoader.moarvm:load_module)
from gen\moar\stage2\NQP.nqp:262 (D:\rakudo\share\nqp\lib\nqp.moarvm:load_module)
from gen\moar\stage2\NQP.nqp:2414 (D:\rakudo\share\nqp\lib\nqp.moarvm:statement_control:sym)
from gen\moar\stage2\QRegex.nqp:1683 (D:\rakudo\share\nqp\lib/QRegex.moarvm:!reduce)
from gen\moar\stage2\QRegex.nqp:1629 (D:\rakudo\share\nqp\lib/QRegex.moarvm:!cursor_pass)
from :1 (D:\rakudo\share\nqp\lib\nqp.moarvm:statement_control:sym)
from gen\moar\stage2\QRegex.nqp:1721 (D:\rakudo\share\nqp\lib/QRegex.moarvm:!protoregex)
from :1 (D:\rakudo\share\nqp\lib\nqp.moarvm:statement_control)
from gen\moar\stage2\NQP.nqp:952 (D:\rakudo\share\nqp\lib\nqp.moarvm:statement)
from :1 (D:\rakudo\share\nqp\lib\nqp.moarvm:statementlist)
from gen\moar\stage2\NQP.nqp:919 (D:\rakudo\share\nqp\lib\nqp.moarvm:comp_unit)
from gen\moar\stage2\NQP.nqp:817 (D:\rakudo\share\nqp\lib\nqp.moarvm:TOP)
from gen\moar\stage2\QRegex.nqp:2330 (D:\rakudo\share\nqp\lib/QRegex.moarvm:parse)
from gen\moar\stage2\NQPHLL.nqp:1886 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:parse)
from gen\moar\stage2\NQPHLL.nqp:1802 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:execute_stage)
from gen\moar\stage2\NQPHLL.nqp:1835 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:run)
from gen\moar\stage2\NQPHLL.nqp:1838 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:)
from gen\moar\stage2\NQPHLL.nqp:1824 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:compile)
from gen\moar\stage2\NQPHLL.nqp:1524 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:eval)
from gen\moar\stage2\NQPHLL.nqp:1779 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:evalfiles)
from gen\moar\stage2\NQPHLL.nqp:1704 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:command_eval)
from gen\moar\stage2\NQPHLL.nqp:1630 (D:\rakudo\share\nqp\lib/NQPHLL.moarvm:command_line)
from gen\moar\stage2\NQP.nqp:4123 (D:\rakudo\share\nqp\lib\nqp.moarvm:MAIN)
from gen\moar\stage2\NQP.nqp:4118 (D:\rakudo\share\nqp\lib\nqp.moarvm:)
from :1 (D:\rakudo\share\nqp\lib\nqp.moarvm:
from :1 (D:\rakudo\share\nqp\lib\nqp.moarvm:)
makefile:448: recipe for target 'blib/Perl6/World.moarvm' failed
gmake: *** [blib/Perl6/World.moarvm] Error 1
My toolchain is Strawberry Perl (v5.24.1). Windows 10.
Note: when I deleted the prefix directory and tried to build rakudo with --gen-moar --gen-nqp
, I got the following error:
src\io\asyncsocket.c: In function 'push_name_and_port':
src\io\asyncsocket.c:484:5: error: unknown type name 'in_port_t'
in_port_t port;
^
makefile:578: recipe for target 'src\io\asyncsocket.o' failed
gmake: *** [src\io\asyncsocket.o] Error 1
The system cannot find the path specified.
Cleaning up ...
A list of things to tweak:
… more?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.