Skip to content

Instantly share code, notes, and snippets.

View colomon's full-sized avatar

Solomon Foster colomon

View GitHub Profile
# This is against current Math::Vector with method Dim changed to
# method Dim() is DEPRECATED('dim')
Wynne:Math-Vector colomon$ perl6 -Ilib --ll-exception t/01-basics.t
ok 1 - Variable is of type Math::Vector
ok 2 - Variable is of type Math::Vector
ok 3 - Variable is of type Math::Vector
ok 4 - Variable is of type Math::Vector
ok 5 - Variable is of type Math::Vector
ok 6 - Variable is of type Math::Vector
enum Results <success no-import hung crash>;
sub check-file($file) {
# say "working on $file";
my $proc = Proc::Async.new('utils/sat_nlib', $file);
$proc.stdout(:bin).tap: { Nil }
$proc.stderr(:bin).tap: { Nil }
await Promise.anyof(my $promise = $proc.start, Promise.at(now + 20));
enum Results <success no-import hung crash>;
sub check-file($file) {
# say "working on $file";
my $proc = Proc::Async.new('utils/sat_nlib', $file);
$proc.stdout(:bin).tap: { Nil }
$proc.stderr(:bin).tap: { Nil }
my $promise;
multi what's-that(42) { take 'The Answer' }
multi what's-that(Int $ where *.is-prime) { take 'Tis a prime!' }
multi what's-that(Numeric) { take 'Some kind of a number' }
multi what's-that($a, *@b where @b > 0) { what's-that($a); what's-that(|@b); }
multi what's-that { how-good-is $^it }
sub how-good-is ($) { take rand > ½ ?? 'Tis OK' !! 'Eww' }
my $seq := gather what's-that(1, 31337, 42, 'meows');
use v6;
use Inline::Python;
my $date = DateTime.now;
my %days-of-the-week := {
Monday => 1,
Tuesday => 2,
Wednesday => 3,
Thursday => 4,
Friday => 5,
use v6;
use File::Find;
sub is-git-top($dir) {
# shell('git rev-parse --is-inside-work-tree >&/dev/null').exitcode == 0;
# && shell('git rev-parse --is-inside-git-dir >&/dev/null').exitcode != 0;
$dir.child(".git").d;
}
Could not download module metadata: No such method 'host' for invocant of type 'HTTP::Request'
in method update at /home/colomon/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/Ecosystem.pm:110
in method init-projects at /home/colomon/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/Ecosystem.pm:48
in method project-list at /home/colomon/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda/Ecosystem.pm:41
./one-smoke projects.json Kains
==> Fetching Kains
==> Building Kains
==> Testing Kains
Error: unshare(0x10020000): Operation not permitted
It seems your system doesn't support user namespaces.
Although, this should work with PRoot (http://proot.me).
in block at /home/colomon/emmentaler/.panda-work/1441193469_1/lib/App/Kains/Core.pm6:62
in sub raise-errno-on at /home/colomon/emmentaler/.panda-work/1441193469_1/lib/App/Kains/Native.pm6:46
in sub unshare at /home/colomon/emmentaler/.panda-work/1441193469_1/lib/App/Kains/Native.pm6:53
for slurp.comb(/ "http://trillian.mit.edu/~jc/music/book/oneills/waifs/X/" \w*? ".abc" /) -> $url {
qqx/curl -O $url/;
}
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.