Skip to content

Instantly share code, notes, and snippets.

View retupmoca's full-sized avatar

Andrew Egeler retupmoca

View GitHub Profile
@retupmoca
retupmoca / gist:6957964
Created October 13, 2013 03:51
./bootstrap.pl (on rakudo 2013.09, parrot 5.7.0)
==> Bootstrapping Panda
==> Fetching File::Find
==> Building File::Find
Compiling lib/File/Find.pm to pir
==> Testing File::Find
t/01-file-find.t .. ok
All tests successful.
Files=1, Tests=10, 12 wallclock secs ( 0.03 usr 0.01 sys + 10.22 cusr 0.64 csys = 10.90 CPU)
Result: PASS
==> Installing File::Find
use v6;
#`[
This is an ugly hack to make sure the dependencies are precompiled first
use MIME::Base64::PIR;
use MIME::Base64::Perl;
(some of our tools do a text-based search for 'use' lines,
and don't know about multi-line comments)
]
@retupmoca
retupmoca / libz.so
Created November 30, 2013 21:25
Gentoo linux version of /usr/lib64/libz.so
/* GNU ld script
Since Gentoo has critical dynamic libraries in /lib, and the static versions
in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
run into linking problems. This "fake" dynamic lib is a linker script that
redirects the linker to the real lib. And yes, this works in the cross-
compiling scenario as the sysroot-ed linker will prepend the real path.
See bug http://bugs.gentoo.org/4411 for more info.
*/
OUTPUT_FORMAT ( elf64-x86-64 )
@retupmoca
retupmoca / gist:9578524
Created March 16, 2014 04:23
moar nativecall bug?
> perl6-m -MNativeCall -e 'my $x=CArray[int].new;say $x[8] = 123;say $x[8] = 123;'
0
123
Segmentation fault
@retupmoca
retupmoca / foo.pm6
Created March 17, 2014 19:33
moar+nativecall+precompilation bug
module foo;
use NativeCall;
sub zlibVersion() returns Str is encoded("ascii") is native("libz.so.1") is export { * };
@retupmoca
retupmoca / foo.pm6
Created March 24, 2014 16:45
This is what makes Compress::Zlib::Raw die on moarvm
module foo;
use NativeCall;
my CArray[int8] $x;
This is perl6 version 2014.03.01-50-gb777559 built on MoarVM version 2014.03-58-g7acb6c1
1..47
# [0s] starting tests
# [0s] Testing on port 1024
ok 1 - [2s] echo server and client
ok 2 - finished in time #1
ok 3 - [2s] discard server and client
ok 4 - finished in time #2
ok 5 - [45s] received first 7 characters
@retupmoca
retupmoca / bar.pm6
Created April 3, 2014 12:44
moar bugs
module bar;
use foo;
my Str @more-stuff;
@retupmoca
retupmoca / gist:11147476
Created April 21, 2014 16:16
Test file for LWP::Simple (needs to have windows-style \r\n line endings)
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: text/plain
7af
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@retupmoca
retupmoca / foo.pm6
Created April 25, 2014 13:55
moar CStruct repr precomp bug
use v6;
use NativeCall;
class foo is repr('CStruct'); # works fine without the repr('CStruct')
has CArray $!foo;
method set-foo(CArray $arr) {
$!foo := $arr;
}