This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
role Foo[::T] { | |
has T $.payload = T; | |
} | |
role Bar[::T] { | |
my class Fooey does Foo[T] {} | |
submethod BUILD { Fooey.new; } | |
} | |
class RatBar does Bar[Rat] {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FreezeHash { | |
has $.hash handles *; | |
method new(*@args) { self.bless: *, hash => Hash.new: @args } | |
method at_key(FreezeHash:D: $key is copy) { | |
$!hash.exists($key) or warn "Cannot set non-existing key '$key'"; | |
nextsame; | |
} | |
} | |
my $fh = FreezeHash.new: "a" => 1, "b" => 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub modmap (Int $x is copy, @rads) { | |
gather { | |
while $x and @rads { | |
my $rad = @rads.shift; | |
take $x mod $rad; | |
$x div= $rad; | |
} | |
take $x if $x; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar Bug { | |
token TOP { <foo> \s* <bar($<foo>.ast)> } # putting {} after \s* makes it work | |
token foo { 'foo' { make 42 } } | |
token bar($x) { 'bar' { make $x+1 } } | |
} | |
my $p = Bug.parse('foo bar'); | |
say $p<bar>.ast; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7039 BRACKET | |
224185 BRACKETr | |
6 LAST_NIBBLE | |
6 LAST_NIBBLE_MULTILINE | |
329313 cursor | |
66642 cursor_all | |
152047 cursor_bind | |
8460 cursor_bind_value | |
383353 cursor_fresh | |
1 label_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -cp src/vm/jvm/stage0 -Xbootclasspath/a:src/vm/jvm/stage0:nqp-runtime.jar:3rdparty/asm/asm-4.1.jar:3rdparty/asm/asm-tree-4.1.jar:3rdparty/jline/jline-1.0.jar:3rdparty/jna/jna.jar:src/vm/jvm/stage0/nqp.jar nqp --bootstrap --module-path=gen/jvm/stage1 --setting-path=gen/jvm/stage1 \ | |
--setting=NQPCORE --no-regex-lib --target=jar \ | |
--output=gen/jvm/stage1/QAST.jar gen/jvm/stage1/QAST.nqp | |
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=21248, tid=46912584210176 | |
# | |
# JRE version: 7.0_25-b30 | |
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/larry/nom/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 \ | |
--setting=NQPCORE --no-regex-lib --target=mbc \ | |
--output=gen/moar/stage1/QRegex.moarvm gen/moar/stage1/QRegex.nqp | |
Segmentation fault | |
make: *** [gen/moar/stage1/QRegex.moarvm] Error 139 | |
Command failed (status 512): make | |
Command failed (status 512): /usr/bin/perl Configure.pl --prefix=/home/larry/nom/install --backends=jvm,parrot,moar --make-install --gen-moar= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 0x00007ffff7a02b89 in MVM_gc_root_add_gen2s_to_worklist () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#1 0x00007ffff7a0756c in MVM_gc_collect () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#2 0x00007ffff7a011ed in run_gc () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#3 0x00007ffff7a01b7c in MVM_gc_enter_from_allocator () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#4 0x00007ffff7a01ee8 in MVM_gc_allocate_nursery () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#5 0x00007ffff7a020d5 in MVM_gc_allocate_object () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#6 0x00007ffff7a0a023 in MVM_repr_alloc_init () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#7 0x00007ffff7a16084 in MVM_iter () from /home/larry/nom/nqp/install/lib/libmoar.so | |
#8 0x00007ffff79e6224 in MVM_interp_run () from /home/larry/nom/nqp/install/lib/libmoar.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/larry/nom/install/bin/nqp-m --target=mbc --output=blib/Perl6/BOOTSTRAP.moarvm --encoding=utf8 \ | |
--vmlibs=dynext/=Rakudo_ops_init src/gen/m-BOOTSTRAP.nqp | |
failed to load library 'dynext/' | |
at src/gen/m-BOOTSTRAP.nqp:572 (<ephemeral file>:frame_name_0:3) | |
from gen/moar/stage2/NQP.nqp:393 (/home/larry/nom/install/languages/nqp/lib/nqp.moarvm:BEGIN block:191) | |
from gen/moar/stage2/NQP.nqp:622 (/home/larry/nom/install/languages/nqp/lib/nqp.moarvm:run_begin_block:103) | |
from gen/moar/stage2/NQP.nqp:2159 (/home/larry/nom/install/languages/nqp/lib/nqp.moarvm:statement_prefix:sym<BEGIN>:53) | |
from gen/moar/stage2/QRegex.nqp:715 (/home/larry/nom/install/languages/nqp/lib/QRegex.moarvm:!reduce:43) | |
from gen/moar/stage2/QRegex.nqp:679 (/home/larry/nom/install/languages/nqp/lib/QRegex.moarvm:!cursor_pass:65) | |
from <unknown>:1 (/home/larry/nom/install/languages/nqp/lib/nqp.moarvm:statement_prefix:sym<BEGIN>:143) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile code generated by Configure.pl: | |
all: j-all m-all p-all j-runner-default | |
install: j-install m-install p-install j-runner-default-install | |
clean: j-clean m-clean p-clean | |
test: j-test m-test p-test | |
spectest: j-spectest m-spectest p-spectest | |
coretest: j-coretest m-coretest p-coretest | |
# Generated from tools/build/Makefile-common.in |