Skip to content

Instantly share code, notes, and snippets.

View usev6's full-sized avatar

Christian Bartolomäus usev6

  • Berlin, Germany
View GitHub Profile
@usev6
usev6 / gist:6e57582839549b6d7698
Created October 26, 2014 19:52
backtrace for segfault with parrot 6.9.0
$ gdb ./perl6-p
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@usev6
usev6 / gist:1ba6157dae245b239260
Last active August 29, 2015 14:08
second backtrace for segfault with parrot 6.9.0
$ cat foo.t
my @primes := 2, 3, 5, -> $p { ($p+2, $p+4 ... &is-prime-beta)[*-1] } ... *;
sub is-prime-beta($n) { $n %% none @primes ...^ * > sqrt $n }
my @primes-beta = (2 .. 200).grep({is-prime-beta($_)});
$ gdb ./perl6-p
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
@usev6
usev6 / gist:2758cadede70afcb92c6
Created November 24, 2014 20:07
failing test for S02-types/pair.t on JVM
not ok 98 - chained colonpairs in parens build a list of pairs
# Failed test 'chained colonpairs in parens build a list of pairs'
# at t/spec/S02-types/pair.rakudo.jvm line 329
# expected: 'a 2 b 3 c 4'
Code object coerced to string (please use .gist or .perl to do that) in sub cmp_ok at lib/Test.pm:145
# matcher: 'infix:<eqv>'
# got: 'a 4 b 3 c 4'
not ok 99 - chained colonpairs in curlies construct hashes with more than one element
@usev6
usev6 / gist:7dd0d087f0b780b2e756
Created December 16, 2014 06:28
failing builds for rakudo.parrot and rakudo.jvm (rakudo head; 2014-12-16)
$ make
/usr/home/christian/perl6-roast-data/rakudo.parrot/install/bin/nqp-p tools/build/gen-cat.nqp parrot src/Perl6/Metamodel/BOOTSTRAP.nqp src/Perl6/Metamodel/EXPORTHOW.nqp > gen/parrot/BOOTSTRAP.nqp
/usr/home/christian/perl6-roast-data/rakudo.parrot/install/bin/nqp-p --target=pir --output=src/gen/perl6-bootstrap.pir --encoding=utf8 --vmlibs=perl6_ops gen/parrot/BOOTSTRAP.nqp
Null PMC access in get_bool()
current instr.: 'compose' pc 29042 (src/gen/perl6-metamodel.pir:12426) (gen/parrot/Metamodel.nqp:2697)
called from Sub '' pc 3191 ((file unknown):848) (gen/parrot/BOOTSTRAP.nqp:316)
called from Sub '' pc 392 ((file unknown):187)
called from Sub 'BEGIN block' pc 6306 (gen/parrot/stage2/NQP.pir:2293) (gen/parrot/stage2/NQP.nqp:372)
called from Sub 'run_begin_block' pc 7679 (gen/parrot/stage2/NQP.pir:2815) (gen/parrot/stage2/NQP.nqp:584)
called from Sub 'statement_prefix:sym<BEGIN>' pc 119545 (gen/parrot/stage2/NQP.pir:40686) (gen/parrot/stage2/NQP.nqp:2485)
@usev6
usev6 / gist:1b805c3f0dad510b8f32
Created December 21, 2014 19:01
tests for RT #122342
use v6;
use Test;
plan 25;
## see S03 "Binary hyper operators"
{
my @a = (1, 4, 9);
@a>>++;
@usev6
usev6 / gist:3c5d27e558160c152358
Created January 3, 2015 21:01
make 'my %h; %h<a>=1; say %h<a>:p(0)' work
diff --git a/src/core/Any.pm b/src/core/Any.pm
index 6c4a831..a0086ed 100644
--- a/src/core/Any.pm
+++ b/src/core/Any.pm
@@ -794,10 +794,14 @@ sub SLICE_ONE ( \SELF, $one, $array, *%adv ) is hidden_from_backtrace {
elsif %a.exists_key('p') { # :!delete?:p(0|1):*
my $p := %a.delete_key('p');
if !%a { # :!delete?:p(0|1)
- !$p | $ex(SELF,$one)
- ?? RWPAIR($one,
@usev6
usev6 / gist:e551c9a3f6f659b6d5a5
Created January 7, 2015 19:49
exit code p6prove Slang::SQL
$ panda look Slang::SQL
==> Fetching Slang::SQL
==> Entering /usr/home/christian/perl6-roast-data/rakudo.moar/panda/.panda-work/1420660139_1 with /bin/sh
$ p6prove t/01_basic.t
t/01_basic.t ... Cannot locate native library 'libsqlite3.so'
in method postcircumfix:<( )> at lib/NativeCall.pm6:130
in method connect at lib/DBDish/SQLite.pm6:221
in method connect at lib/DBIish.pm6:9
in block <unit> at t/01_basic.t:11
@usev6
usev6 / gist:1bc768a8e5bea87e5764
Created January 7, 2015 20:08
exit code build Cache::Memcached
$ panda look Cache::Memcached
==> Fetching Cache::Memcached
==> Entering /usr/home/christian/perl6-roast-data/rakudo.moar/panda/.panda-work/1420661219_1 with /bin/sh
$ perl6 --target=mbc --output=foo lib/Cache/Memcached.pm
useless use of 'is rw' on $!debug in any at src/Perl6/World.nqp:1844
useless use of 'is rw' on $!no_rehash in any at src/Perl6/World.nqp:1844
useless use of 'is rw' on %!stats in any at src/Perl6/World.nqp:1844
@usev6
usev6 / gist:19baafe3390a274d87d0
Created January 29, 2015 21:10
Attempt to make subst-mutate work on variables of type Numeric
$ cat subst-mutate-numeric.t
use v6;
use Test;
plan 10;
my $foo = 70;
my $match = $foo.subst-mutate(7, 2);
is $foo, 20, 'can use subst-mutate with variable of type Int';
is $match.Str, 7, 'matched text is correct';
@usev6
usev6 / gist:f9d0f6ca4e213e89b546
Created February 25, 2015 21:44
testing REPL behaviour
use v6;
use Test;
plan 1;
my $repl-input = 'my Int $t=4; $t.say;
$t.say';
my $cmd = $*DISTRO.is-win
?? "echo $repl-input | $*EXECUTABLE"
!! "echo '$repl-input' | $*EXECUTABLE";