Skip to content

Instantly share code, notes, and snippets.

sub sieve($n) {
my @composite;
my $t;
loop ($t = 3; $t*$t <= $n; $t += 2) {
if (!@composite[$t]) {
loop (my $s = $t*$t; $s <= $n; $s += $t*2)
{ @composite[$s]++ }
}
}
my @primes = (2);
diff --git src/core.c/Rakudo/Iterator.pm6 src/core.c/Rakudo/Iterator.pm6
index b3efa43d7..928b69467 100644
--- src/core.c/Rakudo/Iterator.pm6
+++ src/core.c/Rakudo/Iterator.pm6
@@ -828,14 +828,14 @@ method new(\n,\k,\b)
method pull-one() {
my int $n = $!n; # lexicals faster
my int $k = $!k;
- my int $running = 1;
my $combination := $!combination;
+++ Installing files
New type Block for List is not a mixin type
at <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/core/precomp/16F207F4C7A35C27789A4C6941F6E60F5DE93569/47/47EB770E16F4A8F0EA002A5848282F9D7135D773:<dependencies+deserialize>)
from SETTING::src/core.c/CompUnit/Loader.pm6:50 (/home/dan/Source/perl6/rakudo/blib/CORE.c.setting.moarvm:load-precompilation-file)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:95 (/home/dan/Source/perl6/rakudo/blib/CORE.c.setting.moarvm:load-handle-for-path)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:286 (/home/dan/Source/perl6/rakudo/blib/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:281 (/home/dan/Source/perl6/rakudo/blib/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:280 (/home/dan/Source/perl6/rakudo/blib/CORE.c.setting.moarvm:load)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:60 (/home/dan/Source/perl6/rakud
diff --git src/core.c/Rakudo/Internals.pm6 src/core.c/Rakudo/Internals.pm6
index 3840a271c..b05343902 100644
--- src/core.c/Rakudo/Internals.pm6
+++ src/core.c/Rakudo/Internals.pm6
@@ -1388,11 +1388,11 @@ method pull-one()
(try
nqp::if(
$!file.ACCEPTS($entry) &&
- nqp::stat($path,nqp::const::STAT_ISREG),
+ (my $s := nqp::dispatch('boot-syscall', 'file-stat', nqp::decont_s($path), 0)) && nqp::dispatch('boot-syscall', 'stat-is-reg', $s),
#include "moar.h"
/* This representation's function pointer table. */
static const MVMREPROps Stat_this_repr;
/* Creates a new type object of this representation, and associates it with
* the given HOW. */
static MVMObject * type_object_for(MVMThreadContext *tc, MVMObject *HOW) {
MVMSTable *st = MVM_gc_allocate_stable(tc, &Stat_this_repr, HOW);
diff --git lib/MAST/Ops.nqp lib/MAST/Ops.nqp
index 1adf3fc4a..8c4075191 100644
--- lib/MAST/Ops.nqp
+++ lib/MAST/Ops.nqp
@@ -478,369 +478,369 @@ BEGIN {
1156,
1157,
1160,
- 1163,
- 1166,
diff --git src/core/dll.c src/core/dll.c
index 6817b410f..3b1ea0269 100644
--- src/core/dll.c
+++ src/core/dll.c
@@ -23,6 +23,7 @@ int MVM_dll_load(MVMThreadContext *tc, MVMString *name, MVMString *path) {
});
cpath = MVM_string_utf8_c8_encode_C_string(tc, path);
+ fprintf(stderr, "loading '%s'\n", cpath);
lib = MVM_nativecall_load_lib(cpath);
diff --git src/core/dll.c src/core/dll.c
index 6817b410f..3b1ea0269 100644
--- src/core/dll.c
+++ src/core/dll.c
@@ -23,6 +23,7 @@ int MVM_dll_load(MVMThreadContext *tc, MVMString *name, MVMString *path) {
});
cpath = MVM_string_utf8_c8_encode_C_string(tc, path);
+ fprintf(stderr, "loading '%s'\n", cpath);
lib = MVM_nativecall_load_lib(cpath);

Raku & Pakku

A hobby

One day I woke and decided I want to learn programming as a hobby. For someone

@MasterDuke17
MasterDuke17 / perf.log
Last active September 10, 2017 12:08
perf record -g --call-graph dwarf /home/dan/Source/perl6/install/bin/moar --libpath="blib" --libpath="/home/dan/Source/perl6/install/share/nqp/lib" --libpath="/home/dan/Source/perl6/install/share/nqp/lib" perl6.moarvm --nqp-lib=blib --setting=NULL --ll-exception --optimize=0 --target=parse --stagestats --output=CORE.setting.moarvm gen/moar/CORE.…
11.66% moar libc-2.26.so [.] _int_malloc
9.98% moar perf-27008.map [.] 0x00007ff240009744
8.68% moar libmoar.so [.] rename_locals
8.25% moar libmoar.so [.] MVM_jit_emit_primitive
5.49% moar libc-2.26.so [.] malloc_consolidate
5.33% moar libmoar.so [.] MVM_interp_run
3.36% moar libmoar.so [.] nqp_nfa_run
3.10% moar libmoar.so [.] MVM_frame_invoke
3.05% moar libmoar.so [.] MVM_frame_find_contextual_by_name
1.85% moar libmoar.so [.] gc_mark