Skip to content

Instantly share code, notes, and snippets.

View colomon's full-sized avatar

Solomon Foster colomon

View GitHub Profile
So... if you run the very-broken script, everything works properly, both running the version of
very-broken-combinations from core and the indentical but for name copy very-broken-combinations-local
here. If you run very-broken-combinations from the REPL, it will fail:
> very-broken-combinations(3,2)
([9 10] [9 10] [9 10] [9 10] [9 10])
The original combinations bug also occurred when running combinations.t, which is how I discovered it.
I haven't tried setting up a test file for very-broken-combinations.
for slurp.comb(/ "http://trillian.mit.edu/~jc/music/book/oneills/waifs/X/" \w*? ".abc" /) -> $url {
qqx/curl -O $url/;
}
sub simple-moving-average(Int $P where * > 0) {
-> Real $x {
state @a;
@a.push($x);
@a.shift if @a > $P;
([+] @a) / @a;
}
}
my &ma3 = simple-moving-average(3);
Cannot call 'postcircumfix:<{ }>'; none of these signatures match:
:(Any \SELF, Any $key)
:(Any \SELF, Any $key, :BIND($BIND)!)
:(Any \SELF, Any $key, Any :SINK($SINK)!, *%other)
:(Any \SELF, Any $key, Any :delete($delete)!, *%other)
:(Any \SELF, Any $key, Any :exists($exists)!, *%other)
:(Any \SELF, Any $key, Any :kv($kv)!, *%other)
:(Any \SELF, Any $key, Any :p($p)!, *%other)
:(Any \SELF, Any $key, Any :k($k)!, *%other)
:(Any \SELF, Any $key, Any :v($v)!, *%other)
my @a := 1, -> $x { $x + 2, $x + 2 } ... *;
my @b := 2, 2, -> $x { $x + 2, $x + 2 } ... *;
my @pi := [\*] @b Z/ @a;
say @pi[1000] * 2;
perl6-debug-m --ll-exception -Ilib bin/abctranspose D G +5 <Ryans_Fancy_Arriving.abc
>>> LOADING bin/abctranspose
>>> LOADING /home/colomon/tools/ABC/lib/ABC/Header.pm
>>> LOADING /home/colomon/tools/ABC/lib/ABC/Tune.pm
>>> LOADING /home/colomon/tools/ABC/lib/ABC/Pitched.pm
Unknown compilation input 'optimize'
at gen/moar/stage2/NQPHLL.nqp:1311 (/home/colomon/tools/rakudo/install/languages/nqp/lib/NQPHLL.moarvm:compile:116)
from src/Perl6/World.nqp:1313 (/home/colomon/tools/rakudo/install/languages/nqp/lib/Perl6/World.moarvm:compile_in_context:142)
from src/Perl6/World.nqp:1563 (/home/colomon/tools/rakudo/install/languages/nqp/lib/Perl6/World.moarvm:pkg_set_role_body_block:48)
# Produce a word counts hash per file - totally unshared!
my @all_counts = await do for @*ARGS -> $filename {
start {
slurp($filename).words.Bag
}
}
# Bring them together into a single result.
my %totals := [(+)] @all_counts;
say %totals.elems;
smoker@melissa:~$ pandabrew/bin/pandabrew panda install Shell::Command
==> Fetching Shell::Command
==> Building Shell::Command
Compiling lib/Shell/Command.pm to pir
==> Testing Shell::Command
t/02-shell-command.t .. ok
All tests successful.
Files=1, Tests=12, 1 wallclock secs ( 0.02 usr 0.00 sys + 1.40 cusr 0.17 csys = 1.59 CPU)
Result: PASS
==> Installing Shell::Command
sub cheap-lines($f) {
gather while (my $line = $f.get) {
take $line;
}
}
given open('words') -> $f {
my @a = cheap-lines($f);
}
colomon@melissa:~/tools/perl6-IUP$ panda install IUP
==> Fetching IUP
==> Building IUP
Method 'Stringy' not found for invocant of class 'NQPMu'
current instr.: 'print_exception' pc 139623 (src/gen/p-CORE.setting.pir:59412) (gen/parrot/CORE.setting:11390)
called from Sub '' pc 3028 ((file unknown):472569523) (/home/colomon/.rakudobrew/parrot-HEAD/install/lib//6.1.0-devel/languages/perl6/site/bin/panda:54)
called from Sub '' pc 4056 (/home/colomon/.rakudobrew/parrot-HEAD/install/lib/6.1.0-devel/languages/perl6/site/lib/Panda.pir:1545) (lib/Panda.pm:113)
called from Sub '' pc 5516 (src/gen/perl6-moduleloader.pir:2347) (gen/parrot/ModuleLoader.nqp:274)
called from Sub '' pc 4585 (src/gen/perl6-moduleloader.pir:1948) (gen/parrot/ModuleLoader.nqp:226)
called from Sub 'load_module' pc 3765 (src/gen/perl6-moduleloader.pir:1599) (gen/parrot/ModuleLoader.nqp:215)