🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
cpan-raku New module released to CPAN! Colorizable (0.1.1) by 03UZLUISF 02:32
iviv `raku --doc=Markdown` mangles MAIN argument names in the output, this would be super cool to get fixed: github.com/softmoth/perl6-pod-to-m.../issues/18 — I'll take a look if I have time later this week 10:47
iviv Related to MAIN subs, is there a module to generate shell (bash/zsh/fish) completions for my script? 10:51
lizmat clickbaits rakudoweekly.blog/2020/03/30/2020-...f-reached/ 11:27
El_Che iviv: it sounds like a great weekend project :) 11:55
cpan-raku New module released to CPAN! Scalar::Util (0.0.7) by 03ELIZABETH 13:19
cpan-raku New module released to CPAN! Data::Record (0.1.0) by 03KAIEPI 13:58
Kaiepi ^ adds support for structural typings of maps! 14:08
timotimo Kaiepi: pretty cool 15:51
Doc_Holliwould github.com/manwar/perlweeklychalle...ku/ch-2.p6 vs github.com/manwar/perlweeklychalle...rl/ch-2.pl 16:21
the raku version is more than times slower :-/
it gets especially bad when n > 10**5 16:22
do hashes get slower as they grow?
*10 times 16:24
Altai-man_ Doc_Holliwould, hashes are not really fast due to being not really optimized enough, maybe jnthn.net/papers/2019-perlcon-performance.pdf can be interesting. 16:26
jjatria My Termbox library depends on LibraryMake, but sometimes it doesn't install because that dependency is not met, even though it is listed in META6.json 16:26
gitlab.com/jjatria/raku-termbox/-/issues/6
Maybe I'm doing it wrong?
Altreus Is it correct to rethrow an exception if it's not one I want to handle? Just with .throw? 16:39
[Coke] Probably more correct to not catch it in the first place.
Altreus And does QUIT have the same semantics as CATCH?
How do I only catch some exceptions? It doesn't work like Java :/ 16:40
The end of the supply is fine, that's when we disconnect... but if the supply throws an exception, we try to reconnect
Should I supply a value that means reconnect instead? 16:41
[Coke] docs.raku.org/language/phasers#CATCH shows an example on how to deal with specific types (in the CONTROL) example 16:42
Altreus I guess I could fail? 16:43
I'm currently just using my own exception so I can catch it
Is that not how it's done in Raku?
[Coke] If you use your own exception, you should be able to use the when block there and just ignore other types 16:44
cpan-raku New module released to CPAN! Scalar::Util (0.0.8) by 03ELIZABETH 16:45
Altreus Ah, that defuses it 16:46
Gotcha
No need to re-throw :)
Altreus Can anyone explain the design behind the base Exception not having a simple $.message? It seems odd to require every derived class to define the method 16:51
Especially not to have a built-in exception-with-message
chloekek p6: multi sub f() {}; multi sub f(Int:D $x) {}; f(~1) 16:52
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling f(Str) will never work with any of these multi signatures:
()
(Int:D $x)
at <tmp>:1
------> 3i sub f() {}; multi sub f(Int:D $x) {}; 7⏏5f(~1)
MasterDuke Doc_Holliwould: it isn't really any faster, but your printing at the end could be simplified in raku to `say "n: $_.key(), length: $_.value()" for %result.sort(-*.value).head( 20 );`
Altreus p6: multi sub f() {}; multi sub f(Int():D $x) {}; f(~1) # ? 16:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'D' in parameter declaration.
at <tmp>:1
------> 3multi sub f() {}; multi sub f(Int():D7⏏5 $x) {}; f(~1) # ?
Altreus hmm
p6: multi sub f() {}; multi sub f(Int:D() $x) {}; f(~1) # ?
camelia ( no output )
Altreus ah!
chloekek I want this to fail at runtime so I can test something.
p6: multi sub f() {}; multi sub f(Int:D $x) {}; f(Nil)
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling f(Nil) will never work with any of these multi signatures:
()
(Int:D $x)
at <tmp>:1
------> 3i sub f() {}; multi sub f(Int:D $x) {}; 7⏏5f(Nil)
chloekek p6: multi sub f() {}; multi sub f(Int:D $x) {}; my %xs; f(%xs<k>)
camelia Cannot resolve caller f(Any:U); none of these signatures match:
()
(Int:D $x)
in block <unit> at <tmp> line 1
chloekek p6: multi sub f() {}; multi sub f(Int:D $x) {}; my %xs; try { f(%xs<k>) }; say $!
camelia Cannot resolve caller f(Any:U); none of these signatures match:
()
(Int:D $x)
in block <unit> at <tmp> line 1
chloekek Weird, for me it reports $! is false. 16:54
I will need to make a more elaborate example.
Why does this return {status => ‘ok’}? glot.io/snippets/fm2ogloy3e 16:55
The call to handle-request with three arguments should fail. 16:56
It even goes as far as continuing after the call, to print “hi”, but it does not print “bye”.
daemon Good day folks, I just had a friend in the uk mention this to me, just thought I would drop it out there bearing in mind the current world situation: 17:56> <pingu4> i just had a scam email from the "nhs" asking for donations 16:57
MasterDuke chloekek: change your first multi to proto?
chloekek hahahah thanks 16:58
MasterDuke timotimo: the code that Doc_Holliwould posted a little while ago *really* doesn't like being profiled. called with an N of just 1000 finished execution in 0.1s, but then spends a long time in MVM_profile_instrumented_mark_data and creates a 14mb profile. the times and files size increase dramatically with bigger N 17:11
AlexDaniel cpan-raku: help 17:12
cpan-raku: source
MasterDuke and then trying to --profile with N == 100000 segfaults in malloc
Doc_Holliwould MasterDuke: did i find a schlemiehl? 17:15
MasterDuke there's some code that the profiler chokes on, even if the rest of raku is ok with it 17:19
Kaiepi in Data::Record, i have a ::?ROLE:U candidate for the raku method that returns a string that you can EVAL to create the type with, but the problem is this makes some types of exceptions you can get with method calls virtually illegible 17:21
would this fit better in gist or Str instead?
the method being on record types, i mean 17:24
chloekek How do I decontainerize the result of postcircumfix:<{ }>? 17:41
p6: class C { has @.xs }; my %h = xs => [1, 2, 3]; say C.new(xs => %h<xs>) 17:42
camelia C.new(xs => [[1, 2, 3],])
chloekek p6: class C { has @.xs }; my %h = xs => [1, 2, 3]; say C.new(xs => %h<xs>.list) 17:46
camelia C.new(xs => [1, 2, 3])
cpan-raku New module released to CPAN! Date::Calendar::MayaAztec (0.0.1) by 03JFORGET 18:02
[Coke] .seen FROGGS 18:20
tellable6 [Coke], I saw FROGGS 2019-09-15T13:29:14Z in #perl6: <FROGGS> uhhh, that sounds awesome
[Coke] is github.com/FROGGS/p6-JSON-Pretty an old version of that module? 18:21
just opened a few tickets, and then noted the readme mentions panda
[Coke] wonders if github.com/holli-holzer/raku-JSON-...Sorted.pm6 is a copy of github.com/FROGGS/p6-JSON-Pretty/b.../Pretty.pm ... was going to complain about license change, but just noted that the FROGGS version has no license file. 18:27
sena_kun Anyone with Windows to test a little patch at github.com/sergot/openssl/pull/78 ? Mac users are welcome too. 18:55
Altreus chloekek: does <> not work here? 19:00
chloekek Where?
Altreus p6: class C { has @.xs }; my %h = xs => [1, 2, 3]; say C.new(xs => %h<xs><>);
camelia C.new(xs => [1, 2, 3])
Altreus there 19:01
chloekek Nice.
p6: class C { has @.xs }; my %h = xs => [1, 2, 3]; say C.new(xs => %h<xs>[])
camelia C.new(xs => [1, 2, 3])
chloekek Thanks.
Altreus oh hm 19:04
I just rote-learned <> for decontainerisation
I wonder if there's a technical difference there
lizmat postcircumfix [] is the zen-slice, it returns "self", which is decontainerized 19:06
chloekek At least these unpredictable encounters of unexpected containers convince the programmer to write unit tests.
Altreus I do find containers show up when I didn't expect them 19:12
They seem like an endemic feature from the low level that show up at the high level
lizmat well, it was either that or have references :-)
but yeah, coming from other languages, such as Perl, containers are something you need to grok in Raku 19:13
chloekek Speaking of WATs, I’ve been staring at this query for ten minutes and then I found the problem: 19:14
UPDATE jobs SET status = 1 AND tries_left = tries_left - 1 WHERE id = ?
lizmat m: my Int $a; dd $a.VAR.of # they also keep other info :-) Altreus
camelia Int
lizmat s/AND/,/ 19:15
chloekek The AND should be a comma. It parses because tries_left = tries_left - 1 is a valid expression, that evaluates to false (0).
lizmat yup
chloekek PostgreSQL would have given a type error, that boolean is not an integer. :þ
Altreus I was happy with references :( 19:21
domm news.perlfoundation.org/post/tprcic_announce 21:32
[Coke] OHAI domm 21:33
domm hey
patrickb rba: There is once again a new rakubrew: version 9. Can you upload? 22:22
tellable6 2020-03-30T07:32:22Z #raku-dev <rba> patrickb Updated rakubrew.org to v8 (v7 is up as well).
patrickb rba: Thanks for the previous upload!
.tell rba There is once again a new rakubrew: version 9. Can you upload?
tellable6 patrickb, I'll pass your message to rba
[Coke] is rakudobrew.org one of ours, or just rakubrew? 22:23
(the former site scares my copy of chrome) 22:24
rba [Coke]: rakudobrew.org name servers is under our control. Yet I not configured properly yet. 22:57
tellable6 2020-03-31T22:22:54Z #raku <patrickb> rba There is once again a new rakubrew: version 9. Can you upload?
irced enters in a heavy, hooded robe inconspicuously knocking over a lamp and tripping against a box which grates against the floor loudly. 23:02
rba patrickb: Updated rakubrew.org to v9. (remind me that I have to automate it SOON.) 23:13
tellable6 rba, I'll pass your message to patrickb