Skip to content

Instantly share code, notes, and snippets.

View diakopter's full-sized avatar
💭
🤠

Matthew Wilson diakopter

💭
🤠
View GitHub Profile
captureexistsnamed
capturehasnameds
x_posixerrno
r_atpos
r_atpos_i
r_atpos_n
r_bindpos
r_bindpos_i
r_bindpos_n
r_elems
my @array := nqp::list;
my int $i := 0;
while $i < 20000 {
nqp::bindpos(@array, $i, nqp::coerce_is($i));
$i := $i + 1;
};
say(nqp::join(',', @array));
sub A($k, $x1, $x2, $x3, $x4, $x5) { if ($k <= 0) { return $x4() + $x5() }; my $B := sub () { $k--; A($k, $B, $x1, $x2, $x3, $x4) }; $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ))
C:\Users\mwilson\src\MoarVM\nqp-cc>prove -vv -e "..\moarvm nqp.moarvm" t\nqp
t\nqp\01-literals.t ...................
1..9
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
class FooFOO {
my %bar := nqp::hash(
'&AElig' , 'Æ',
'&AElig;' , 'Æ',
'&AMP' , '&',
'&AMP;' , '&',
'&Aacute' , 'Á',
'&Aacute;' , 'Á',
'&Abreve;' , 'Ă',
'&Acirc' , 'Â',
mwilson@host06:~/src/MoarVM/nqp-cc$ ../moarvm "Multiple allocating threads work large heap usage.moarvm" |tee out.txt |llvm-symbolizer-3.4 ; cat out.txt
Before new threads
In new thread
In new thread
In new thread
In new thread
Lived until after joins
mwilson@host06:~/src/MoarVM/nqp-cc$ ../moarvm "Multiple allocating threads work large heap usage.moarvm" |tee out.txt |llvm-symbolizer-3.4 ; cat out.txt
ASAN:SIGSEGV
=================================================================
sub ndr(*@vals, Int :$radix is copy where ($radix||=10) > 0 && True) {
1+floor log (1 max [max] @vals>>.abs), $radix
};
say ndr(40,50,60);
my \size = 500;
my \reps = 100;
my $a = [];
for 1..size { $a[$_ - 1] = $_ }
my $s = now;
for 1..reps {
my @b = $a[1..($a - 1)];
=head2 The magic input handle
The magic command-line input handle is C<$*ARGFILES>.
=end
say 3333
#!/bin/sh
export PATH=/home/p6eval/nqp-jvm/nqp/install/bin:/home/p6eval/nqp-jvm/jdk1.7.0/bin:/home/p6eval/nqp-jvm/jdk1.7.0/jre/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
cd
set -e
echo -e "\n\nNew nqp-jvm build"
date
cd nqp-jvm/nqp
git fetch origin
if git log HEAD..origin/master --oneline
then