Skip to content

Instantly share code, notes, and snippets.

diff --git a/build/Config/BuildEnvironment.pm b/build/Config/BuildEnvironment.pm
index 9cfaa6f..5b2b9bd 100644
--- a/build/Config/BuildEnvironment.pm
+++ b/build/Config/BuildEnvironment.pm
@@ -74,8 +74,8 @@ my %TOOLCHAINS = (
# Required flags
cmiscflags => '-D_REENTRANT -D_LARGEFILE64_SOURCE -Wparentheses -Wreturn-type',
- lmiscflags => '-L3rdparty/apr/.libs',
- llibs => '-Wl,-Bstatic -lapr-1 -Wl,-Bdynamic -lpthread -lm',
(do {
multi _($a, :foo($) where 'bar') {
say "bar $a"
}
multi _($a, :foo($) where 'baz') {
say "baz $a"
}
(&_)
})(42, :foo<bar>);
$ RAKUDO_MODULE_DEBUG=1 make pmtest
rm -f lib/PASM/Backend/AST.pir lib/PASM/Backend/GNUC.pir lib/PASM/Backends.pir lib/PASM/Grammar.pir
perl6 test.pl
MODULE_DEBUG: loading /usr/local/lib/parrot/5.1.0-devel/languages/nqp/lib/Perl6/BOOTSTRAP.pbc
MODULE_DEBUG: done loading /usr/local/lib/parrot/5.1.0-devel/languages/nqp/lib/Perl6/BOOTSTRAP.pbc
MODULE_DEBUG: loading /usr/local/lib/parrot/5.1.0-devel/languages/perl6/lib/lib.pir
MODULE_DEBUG: done loading /usr/local/lib/parrot/5.1.0-devel/languages/perl6/lib/lib.pir
MODULE_DEBUG: loading lib/PASM/Backends.pm
MODULE_DEBUG: loading lib/PASM/Backend/AST.pm
MODULE_DEBUG: loading lib/PASM/Grammar.pm
@gerdr
gerdr / not-ready.md
Last active December 14, 2015 15:19

Rakudo: Not production ready

There's been some discussion on #perl6 as to what's missing from Rakudo to make it 'production-ready'.

I recently started my first moderately-sized Perl6 project, which currently clocks in with 1021 lines of Perl6 code (without documentation).

This translates to a parsing stage of 11.5s, which makes it very painful to use without module precompilation.

As there's no automatic precompilation yet, it needs to be done manually, which is tricky as compilation needs to happen in dependency order.

@gerdr
gerdr / gist:5106672
Created March 7, 2013 09:15
rakudo compilation bug
$ perl6 -Ilib -MM42::PASM::Backends -e 'say M42::PASM::Backend::.perl'
("GNUC" => M42::PASM::Backend::GNUC).hash
$ rm $(find lib -name '*.pbc')
$ perl6 -Ilib -MM42::PASM::Backends -e 'say M42::PASM::Backend::.perl'
("GNUC" => M42::PASM::Backend::GNUC).hash
$ rm $(find lib -name '*.pir')
use v6;
sub pretty($perl, :$indent = ' ') is export {
my ($pc, $depth, $string, $esc) = '', 0, False, False;
join '', gather for $perl.comb -> $cc {
NEXT $pc = $cc;
unless $string {
given \($pc, $cc) {
use v6;
module float16;
my sub frac($bits) {
state @fracs = map 0.5e0 / 2e0 ** *, reverse ^10;
[+] @fracs.kv.map({ $bits +& (1 +< $^k) ?? $^v !! 0e0 })
}
our sub enc(Num $num --> Int) {
!!!
chunk @m42_core
ptr %ip = $0
i64 %ia, %ib
f64 %fa, %fb
ptr %pa, %pb
jmp ptr(%ip)
@.set_ia:
lea %ip, val(%ip[1])
diff --git a/src/HLL/Compiler.pm b/src/HLL/Compiler.pm
index f9869b3..0981ee3 100644
--- a/src/HLL/Compiler.pm
+++ b/src/HLL/Compiler.pm
@@ -78,7 +78,7 @@ class HLL::Compiler {
$stdin.encoding($encoding);
}
- my $target := nqp::lc(%adverbs<target>);
+ my $target := %adverbs<target>;
$ ./nqp --target=pbc -o fib.pbc examples/fib.nqp
"pbc" => PMC 'PackfileView' { ... }
$ parrot fib.pbc
Cannot fetch object from non-existent serialization context 9D6CB3292159C3DFEFB9A37BBA9C78F2A5885BC3-1361052816.30436
current instr.: '' pc 256 ((file unknown):119) (examples/fib.nqp:4)