Type check failed in assignment to $!value; expected CookieValue but got Str ("\"2|1:0|10:16721936...)
in submethod BUILD at /home/cbwood/Projects/cro-http/lib/Cro/HTTP/Cookie.pm6 (Cro::HTTP::Cookie) line 155
in method unpack-cookie at /home/cbwood/Projects/cro-http/lib/Cro/HTTP/Request.pm6 (Cro::HTTP::Request) line 167
in method cookie-value at /home/cbwood/Projects/cro-http/lib/Cro/HTTP/Request.pm6 (Cro::HTTP::Request) line 189
in method add-csrf-protection at /home/cbwood/Projects/cro-webapp/lib/Cro/WebApp/Form.rakumod (Cro::WebApp::Form) line 657
in method HTML-RENDER-DATA at /home/cbwood/Projects/cro-webapp/lib/Cro/WebApp/Form.rakumod (Cro::WebApp::Form) line 459
Here's something I wrote for guifa a couple of days ago. I am thinking of turning it into a simple Rakuish event loop for my projects.
Is this a fairly decent implementation, or is this just NIH for cron?
Please share your thoughts.
my %suppliers;
Have I told you how wonderful I think Raku is?
Well I don't have enough words to do that.
However even the best languages have thier faults, and one of Raku's the following:
sub a ( :name(:named(:$names)) ) { ... }
So I was looking through what I have written for $dayJob, as far as my work with a Cro-based application server is concerned.
It occurred to me that we might be able to clean up what is already a fairly clean Cro dispatch handler.
Consider this example:
route {
get -> { ... }
get -> '2' { ... }
Wouldn't it be nice if you could write your queries like this?
#| SELECT DISTINCT date_format(`last-updated`, '%i') minute
#| FROM instances
#| ORDER BY 1
method getReportingMinutes (Str $instance-id) is query { }
Or this...
``` | |
Stage start : 0.000 | |
New type Stash for CompUnit::DependencySpecification is not a mixin type | |
at SETTING::src/core.c/Exception.pm6:64 (/home/cbwood/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:throw) | |
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:83 (/home/cbwood/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:) | |
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:81 (/home/cbwood/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:) | |
from SETTING::src/core.c/CompUnit/PrecompilationRepository.pm6:80 (/home/cbwood/.rakubrew/versions/moar-blead/install/share/perl6/runtime/CORE.c.setting.moarvm:) | |
from <unknown>:1 (/home/cbwood/Projects/p6-GtkPlus/scripts/.precomp/2A390A80BF2C91CDB606E4FDDAFDA286D92D8917/5C/5CF3C3DB510B0443D71ACBFE268138D0597256D7:<dependencies+deserialize>) | |
from SETTING::src/core.c/CompUnit/Loader.pm6:50 (/home/cbwood/.rakubrew/versions/moar-blead/instal |
Here is some RakuAST. It behaves a bit differently than you'd expect:
use MONKEY-SEE-NO-EVAL;
my $ast = RakuAST::ApplyInfix.new(
left => RakuAST::IntLiteral.new(44),
infix => RakuAST::Infix.new('+'),
right => RakuAST::IntLiteral.new(22)
);
Here is a quick block for if you want to list MP3s from the command line:
use Audio::TagLib;
my @a = @*ARGS.map({
my $t = Audio::TagLib.new($_);
[ $t.track, $t.title, $t.artist ]
});
p6-GLib Compile times for Raku version v2022.03-87-g2182d530e.
Non-Parallel Parallel
ICal 563.14 122.48526
GLib 397.27 83.71528
GIR 111.60 24.41031
ATK 154.18 28.75674
GIO 849.62 181.00926
Secret 92.29 12.52312