Skip to content

Instantly share code, notes, and snippets.

View samcv's full-sized avatar

Samantha McVey samcv

  • Amsterdam, Netherlands
View GitHub Profile
@samcv
samcv / -
Created December 29, 2016 17:47
cd t/spec && git pull --ff-only
Already up-to-date.
/usr/bin/perl t/harness5 --fudge --moar --keep-exit-code --tests-from-file=t/spectest.data
t/spec/S17-lowlevel/lock.t .................................... ok
t/spec/S17-promise/allof.t .................................... ok
t/spec/S17-promise/in.t ....................................... ok
t/spec/S17-promise/start.t .................................... ok
t/spec/S17-scheduler/at.t ..................................... ok
t/spec/S17-scheduler/every.t .................................. ok
t/spec/S17-scheduler/in.t ..................................... ok
my $folder = "UNIDATA";
#my $names = slurp "$folder/NameAliases.txt";
my %points;
# NameAliases.txt
# 0 Codepoint (Hex)
# 1 NameAlias
# 2 NameAlias type
# sub path($cp, +@a) { say "\@.perl: @a.perl()"; @a.reduce({ $^a{$^b}:exists ?? $^a{$^b} !! $^a{$^b} = {} }) };
sub read-file ( $property, $file ) {
my $file-txt = slurp "$folder/$file.txt";
#include <stdio.h>
struct binary_prop_bitfield {
unsigned int Any :1;
unsigned int Bidi_Class :1;
unsigned int Bidi_Mirrored :1;
unsigned int NFC_QC :1;
unsigned int NFD_QC :1;
unsigned int NFG_QC :1;
unsigned int NFKD_QC :1;
};
use JSON::Fast;
use nqp;
use Data::Dump;
use lib 'lib';
use UCDlib;
INIT say "Initializing…";
my Str $folder = "UNIDATA";
my %points;
my %binary-properties;
my %enumerated-properties;
Breakpoint 1, MVM_panic (exitCode=exitCode@entry=1,
messageFormat=messageFormat@entry=0x7ffff78cbdb0 "Memory allocation failed; could not allocate %zu bytes") at src/core/exceptions.c:779
779 void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_panic (exitCode=exitCode@entry=1,
messageFormat=messageFormat@entry=0x7ffff78cbdb0 "Memory allocation failed; could not allocate %zu bytes") at src/core/exceptions.c:779
#1 0x00007ffff77d4be9 in MVM_panic_allocation_failed (len=len@entry=18446744073709551612)
at src/core/exceptions.c:794
#2 0x00007ffff787b43f in MVM_malloc (size=18446744073709551612) at src/core/alloc.h:5
#3 MVM_string_ascii_decode (tc=tc@entry=0x5555557577c0, result_type=<optimized out>,
use JSON::Fast;
use nqp;
use Data::Dump;
use lib 'lib';
use UCDlib;
INIT say "Initializing…";
my Str $folder = "UNIDATA";
my %points;
my %binary-properties;
my %enumerated-properties;
@samcv
samcv / -
Created January 17, 2017 04:04
diff --git a/UCD-gen.p6 b/UCD-gen.p6
index 694326e..c19aeba 100644
--- a/UCD-gen.p6
+++ b/UCD-gen.p6
@@ -355,6 +355,7 @@ sub make-point-index (:$less) {
say "point-max $point-max";
my $type = compute-type($bin-index + 1);
my $mapping := nqp::list_s;
+ my $mapping_rows := nqp::list_s;
my @rows;
use nqp;
my str $string = "this,that,other,thing," x 100;
my int $chars = nqp::chars($string);
my $i := nqp::add_i(0,0);
$i := nqp::add_i(0, 50);
nqp::while(nqp::isle_i($i, $chars), (
$string = nqp::replace($string, nqp::index($string, ',', $i), 1, ",\n");
$i := nqp::add_i($i, 50);
)
);
#define NULL ((void *)0)
static const char *uninames[30592] = {
"<control-0000>",
"<control-0001>",
"<control-0002>",
"<control-0003>",
"<control-0004>",
"<control-0005>",
"<control-0006>",
"<control-0007>",
This file has been truncated, but you can view the full file.
#define NULL ((void *)0)
const static unsigned short uniname_32[3] = {2,31041,5000};
const static unsigned short uniname_33[7] = {6,8963,19253,2409,24597,20858,17600};
const static unsigned short uniname_34[6] = {5,28055,32060,15014,59721,29240};
const static unsigned short uniname_35[5] = {4,23253,3418,59969,11760};
const static unsigned short uniname_36[5] = {4,7012,19258,59969,11760};
const static unsigned short uniname_37[5] = {4,25818,5014,33499,14694};
const static unsigned short uniname_38[4] = {3,2136,8739,2164};
const static unsigned short uniname_39[5] = {4,2255,31218,24648,8000};
const static unsigned short uniname_40[7] = {6,19406,33496,2325,23208,8769,30400};