Skip to content

Instantly share code, notes, and snippets.

@thundergnat
thundergnat / julia-set.raku
Last active August 14, 2021 11:22
Concurrency / variable locking woes
>$ time raku julia-set.raku
MoarVM oops: MVM_str_hash_fetch_nocheck called with a stale hashtable pointer
MoarVM oops: MVM_str_hash_fetch_nocheck called with a stale hashtable pointer
at julia-set.raku:26 (<ephemeral file>:hsv2rgb)
at julia-set.raku:26 (<ephemeral file>:hsv2rgb)
from julia-set.raku:17 (<ephemeral file>:)
from julia-set.raku:16 (<ephemeral file>:)
from julia-set.raku:17 (<ephemeral file>:)
from SETTING::src/core.c/Rakudo/Internals/HyperRaceSharedImpl.pm6:63 (/home/steve/.perl6/share/perl6/runtime/CORE.c.setting.moarvm:process-batch)
from julia-set.raku:16 (<ephemeral file>:)
$ zef install cro --verbose
===> Searching for: cro
===> Found: cro:ver<0.8.7> [via Zef::Repository::Ecosystems<cpan>]
===> Fetching [OK]: cro:ver<0.8.7> to /home/steve/.zef/tmp/1644762957.83630.5499.876015230394/cro-0.8.7.tar.gz
===> Extraction [OK]: cro to /home/steve/.zef/tmp/cro-0.8.7.tar.gz
===> Testing: cro:ver<0.8.7>
[cro] t/tools-crofile.t ...... ok
[cro] t/tools-link-editor.t .. ok
[cro] t/tools-runner.t ....... Dubious, test returned 1
[cro] No subtests run
sub UNIVER {
[
<1.1> => 'a',
<2.0> => 'ẛ',
<2.1> => '€',
<3.0> => 'ϟ',
<3.1> => 'ϴ',
<3.2> => '⁇',
<4.0> => 'ȡ',
<4.1> => 'ℼ',
sub ValidateLineType($ln) returns Int {
my $lt = $ln.split( /<ws>/, :skip-empty )[0];
($lt ~~ 0..5) ?? $lt.Int !! -1
}
my @fp = # open "data.ldr", :r;
#Meh, just load some data into the array
"0 0\n1 0\n2 0\n3 0\n4 0\n5 0\n6 0\n12 5\n3 3\n4\t\t3\n".lines;
@thundergnat
thundergnat / unicode-properties
Created February 15, 2023 12:06
Full names for Unicode properties
my %properties = L => '(Letter)',
Lu => '(Letter, uppercase)',
Ll => '(Letter, lowercase)',
Lt => '(Letter, titlecase)',
Lm => '(Letter, modifier)',
Lo => '(Letter, other)',
M => '(Mark)',
Mn => '(Mark, nonspacing)',
Mc => '(Mark, spacing combining)',
Me => '(Mark, enclosing)',