Skip to content

Instantly share code, notes, and snippets.

View lizmat's full-sized avatar
💭
Functioning within parameters

Elizabeth Mattijsen lizmat

💭
Functioning within parameters
View GitHub Profile
@lizmat
lizmat / gist:5b060be7ac0bd5615961eb79fdea3719
Created February 28, 2020 13:43
RAKUDO_MODULE_DEBUG=1 raku -e ''
$ RAKUDO_MODULE_DEBUG=1 r ''
1 RMD: Requested for settings CORE.d
1 RMD: Requested for settings CORE.c
1 RMD: Loading settings CORE.c
1 RMD: Loading bytecode from CORE.c.setting.moarvm
1 RMD: going to load Perl6::BOOTSTRAP::v6c
1 RMD: Settings CORE.c loaded
1 RMD: Loading settings CORE.d
1 RMD: Loading bytecode from CORE.d.setting.moarvm
1 RMD: going to load Perl6::BOOTSTRAP::v6d
@lizmat
lizmat / gist:9a8d5929b19bda12b801d56e2a17a000
Created February 27, 2020 08:41
Problem installing e.g. Text::CSV after bumping Rakudo to get jnthn opts
$ raku -v
This is Rakudo version 2020.02-66-g0f223ac9d built on MoarVM version 2020.02-25-g69951892a
implementing Raku 6.d.
LizyPro:zef liz$ raku --ll-exception bin/zef install Text::CSV
New type Perl6::Metamodel::ClassHOW for NQPRoutine is not a mixin type
at SETTING::src/core.c/Exception.pm6:62 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:throw)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:98 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:96 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:95 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from <unknown>:1 (/Users/liz/.raku/precomp/F1224DCC51C73B75E747B230E367412C33E8509F/F4/F4C437004E3087C434F504791F32C8348E1DD413:<dependencies+deserialize>)
@lizmat
lizmat / gist:f79faa3a4338e9dd30a23e1a1dcea710
Created February 26, 2020 22:59
error after big rewrite
$ raku --ll-exception bin/zef install . --force-install
New type Perl6::Metamodel::ClassHOW for Method+{is-nodal} is not a mixin type
at SETTING::src/core.c/Exception.pm6:62 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:throw)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:98 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:96 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:95 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:)
from <unknown>:1 (/Users/liz/.raku/precomp/F41BDD17078BBEF5E39ECD8EBF40E1BF9A97C212/F4/F4C437004E3087C434F504791F32C8348E1DD413:<dependencies+deserialize>)
from SETTING::src/core.c/CompUnit/Loader.pm6:51 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/CORE.c.setting.moarvm:load-precompilat
@lizmat
lizmat / gist:1c4480ee3099037bc52c37c8e3177b60
Created February 21, 2020 19:26
Why did it not select the :basename candidate??
Cannot resolve caller new(IO::Path:U: :basename(Str)); none of these signatures match:
(IO::Path: $path, :$CWD!, *%_ --> IO::Path)
(IO::Path: $path, IO::Spec:D :$SPEC!, *%_ --> IO::Path)
(IO::Path: :$basename!, :$dirname = "", :$volume = "", :$CWD = { ... }, IO::Spec:D :$SPEC = { ... }, *%_)
(IO::Path: Str:D $path, *%_ --> IO::Path)
(IO::Path: $path, *%_ --> IO::Path)
$ zef install --debug HTTP::Status
===> Searching for: HTTP::Status
===> Found: HTTP::Status [via Zef::Repository::LocalCache]
===> Filtering: HTTP::Status
===> Filtering [OK] for HTTP::Status
===> # SKIP: No need to build HTTP::Status
===> Testing: HTTP::Status
[HTTP::Status] Testing with plugin: Zef::Service::Shell::prove+{<anon|1>}
[HTTP::Status] ===SORRY!=== Error while compiling /Users/liz/.zef/store/perl6-http-status.git/454841556fbad20ffcd79c34491ac192ff773430/t/01-basic.t
[HTTP::Status] Could not find HTTP::Status in:
@lizmat
lizmat / gist:5d7c0d14c56d493c59b337dec1ff0f14
Created February 16, 2020 19:25
IO::Capture::Simple fail
$ zef install IO::Capture::Simple
===> Searching for: IO::Capture::Simple
===> Testing: IO::Capture::Simple
[IO::Capture::Simple] ===SORRY!=== Error while compiling /Users/liz/.zef/store/IO-Capture-Simple.git/cdbe43ed040adfd6a2abbc1a1e5b9f022ec210ab/t/stderr.t
[IO::Capture::Simple] Could not find IO::Capture::Simple in:
[IO::Capture::Simple] file#/Users/liz/.zef/store/IO-Capture-Simple.git/cdbe43ed040adfd6a2abbc1a1e5b9f022ec210ab
[IO::Capture::Simple] inst#/Users/liz/.raku
[IO::Capture::Simple] inst#/Users/liz/Github/rakudo.moar/install/share/perl6/site
[IO::Capture::Simple] inst#/Users/liz/Github/rakudo.moar/install/share/perl6/vendor
[IO::Capture::Simple] inst#/Users/liz/Github/rakudo.moar/install/share/perl6/core
@lizmat
lizmat / gist:fa6f11352210ab96302c7f40c88576a3
Created January 23, 2020 14:24
Streaming decoder fail?
my $decoder = Encoding::Registry.find("utf8").decoder;
$decoder.add-bytes(utf8.new(0x0065)); # LATIN SMALL LETTER E
dd $decoder.consume-available-chars;
$decoder.add-bytes(utf8.new(0x0301)); # COMBINING ACUTE ACCENT
dd $decoder.consume-available-chars;
dd $decoder.consume-all-chars;
OUTPUT:
""
"e\x[1]"
@lizmat
lizmat / gist:450fdafca96627e7075ef59641e62d72
Created January 20, 2020 21:19
Supply.decode implementation
supply {
my $decoder = Encoding::Registry.find($encoding).decoder;
my $chars;
whenever self -> \bytes {
$decoder.add-bytes(bytes);
$chars := $decoder.consume-available-chars;
emit $chars if $chars;
LAST {
$chars := $decoder.consume-all-chars;
Tree.new-branch(
left => Tree.new-branch(
left => Tree.new-leaf(storage => 1),
right => Tree.new-leaf(storage => 2)
),
right => Tree.new-leaf(storage => 3)
)
Tree.new-branch(
left => Tree.new(
86344EF8EEA9C1CB1C3543130929E5EC7CB7A217
E91621EB22AA93E82737C4010FF7B776088BE273
0D7FDBBC72083980348BED148BF46BD198D51DE8^@/Users/liz/Github/rakudo.moar/lib/NativeCall/Types.pm6^@1F0621D10C40572D4A985F0363069F661A42FB5B^@CompUnit::DependencySpecification.new(short-name => "NativeCall::Types", source-line-number => 4, from => "Perl6", version-matcher => Bool::True, auth-matcher => Bool::True, api-matcher => Bool::True)
0D7FDBBC72083980348BED148BF46BD198D51DE8^@/Users/liz/Github/rakudo.moar/lib/NativeCall/Types.pm6^@1F0621D10C40572D4A985F0363069F661A42FB5B^@CompUnit::DependencySpecification.new(short-name => "NativeCall::Types", source-line-number => 3, from => "Perl6", version-matcher => Bool::True, auth-matcher => Bool::True, api-matcher => Bool::True)
4572C95D8CF876588C349264F7E943A1F258045B^@/Users/liz/Github/rakudo.moar/lib/NativeCall/Compiler/GNU.pm6^@001956587719B675C199569643527BD03B0CD6B5^@CompUnit::DependencySpecification.new(short-name => "NativeCall::Compiler::GNU", source-line-number => 5, from =>