This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub UNIVER { | |
[ | |
<1.1> => 'a', | |
<2.0> => 'ẛ', | |
<2.1> => '€', | |
<3.0> => 'ϟ', | |
<3.1> => 'ϴ', | |
<3.2> => '⁇', | |
<4.0> => 'ȡ', | |
<4.1> => 'ℼ', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>$ 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>:) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my %*SUB-MAIN-OPTS = :named-anywhere; | |
use Text::Sorensen :sorensen; | |
use JSON::Fast; | |
my $hashfile = './Sorenson-chars.json'; | |
unit sub MAIN ( $phrase, $head = 10, :$ge = 0.5 ); | |
my %out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Toggle syntax highlighting | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description toggle syntax highlighting on task pages | |
// @author thundergnat | |
// @match *://rosettacode.org/wiki/* | |
// @icon https://www.google.com/s2/favicons?domain=rosettacode.org | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Language links | |
// @description Adds language parameters to category links on Rosettacode.org | |
// @author thundergnat | |
// @namespace mailto:[email protected] | |
// @version 0.8 | |
// @updateURL https://gist.github.com/thundergnat/c5a86a6d5e0018ac67bdea3fc48786a0#file-language_links-user-js | |
// @downloadURL https://gist.github.com/thundergnat/c5a86a6d5e0018ac67bdea3fc48786a0#file-language_links-user-js | |
// @match *://rosettacode.org/wiki/Category* | |
// @icon https://www.google.com/s2/favicons?domain=www.rosettacode.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
multi expand-tree ( Bag $tree ) { | |
bag(bag(bag()) (+) $tree) (+) | |
[(+)] ( | |
$tree.keys ==> map { | |
$^a.&expand-tree.map: * (+) ( $tree (-) bag($^a) ) | |
} | |
); | |
} | |
multi expand-trees ( Bag $trees ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use NativeCall; | |
use SDL2::Raw; | |
my int ($w, $h) = 320, 240; | |
SDL_Init(VIDEO); | |
my SDL_Window $window = SDL_CreateWindow( | |
"White Noise - Raku", | |
SDL_WINDOWPOS_CENTERED_MASK, SDL_WINDOWPOS_CENTERED_MASK, |
NewerOlder