🦋 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.
00:18 caterfxo joined 00:29 Tirifto left 00:31 helit joined 01:09 markoong left 01:40 molaf left 01:53 molaf joined 01:55 MasterDuke left 02:11 Doc_Holliwould left
cpan-raku New module released to CPAN! Colorizable (0.1.1) by 03UZLUISF 02:32
02:36 regreg joined 02:42 regreg left 02:43 wamba joined 02:47 regreg joined 03:06 upupbb-user3 left 03:17 upupbb-user3 joined 03:49 pilne left 04:25 cognominal left 04:30 molaf left 04:35 upupbb-user3 left 04:51 hungrydonkey joined 05:00 hungrydonkey46 joined 05:02 hungrydonkey left 05:17 cognominal joined 05:20 NODE left 05:22 NODE joined 05:33 wamba left 05:34 CIAvash joined 05:40 lichtkind left 06:08 sjm_uk joined 06:15 vike1 left 06:28 Doc_Holliwould joined 06:29 hungrydonkey46 left 06:30 hacktor joined 06:40 k-man joined 06:48 hungrydonkey joined 07:01 hacktor left 07:02 hacktor joined 07:18 MasterDuke joined 07:33 rindolf joined 07:39 dakkar joined, dakkar left, dakkar joined 07:49 pecastro joined 07:56 wamba joined 08:04 stoned75 joined 08:15 hungrydonkey left 08:30 stoned75 left 08:34 Doc_Holliwould left 08:56 NODE left 08:58 NODE joined 09:03 squashable6 left 09:05 squashable6 joined 09:18 upupbb-user3 joined 09:24 holyghost left 09:34 cognomin_ joined 09:37 cognominal left 09:50 NODE left 09:52 Black_Ribbon left, NODE joined 09:54 pecastro left 09:55 pecastro joined 10:11 SQuoll left 10:12 SQuoll joined, cognominal joined 10:15 cognomin_ left 10:20 telex left 10:21 telex joined 10:22 chloekek joined 10:23 natrys joined 10:28 __jrjsmrtn__ joined 10:29 _jrjsmrtn left 10:31 MasterDuke left 10:32 wamba left 10:43 aborazmeh joined, aborazmeh left, aborazmeh joined
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
10:48 dansolo42 left, dansolo42 joined 10:49 aborazmeh left
iviv Related to MAIN subs, is there a module to generate shell (bash/zsh/fish) completions for my script? 10:51
10:52 wamba joined 10:53 aborazmeh joined, aborazmeh left, aborazmeh joined 11:01 aborazmeh left 11:06 finsternis left 11:11 rbt left, rbt joined 11:14 markoong joined 11:20 holyghost joined 11:22 markong joined, markoong left
lizmat clickbaits rakudoweekly.blog/2020/03/30/2020-...f-reached/ 11:27
11:54 regreg left
El_Che iviv: it sounds like a great weekend project :) 11:55
11:59 mensvaga joined 12:03 hungrydonkey joined 12:04 aborazmeh joined 12:05 aborazmeh left, aborazmeh joined 12:11 kensanata joined 12:17 lichtkind_ joined 12:25 PacoLinux joined, rbt left 12:27 lichtkind_ is now known as lichtkind 12:29 squashable6 left 12:31 squashable6 joined 12:37 hungrydonkey left 12:39 hungrydonkey joined 12:41 MasterDuke joined, kensanata left 12:42 rbt joined 13:00 lichtkind left 13:03 Altai-man_ joined 13:10 epony left 13:16 lichtkind joined 13:19 epony joined
cpan-raku New module released to CPAN! Scalar::Util (0.0.7) by 03ELIZABETH 13:19
13:20 caterfxo is now known as mrwisdom 13:34 roguelazer left 13:35 roguelazer joined 13:37 molaf joined 13:39 cpan-raku left 13:40 cpan-raku joined, cpan-raku left, cpan-raku joined 13:49 aborazmeh left
cpan-raku New module released to CPAN! Data::Record (0.1.0) by 03KAIEPI 13:58
14:07 sena_kun joined 14:08 Altai-man_ left
Kaiepi ^ adds support for structural typings of maps! 14:08
14:11 upupbb-user3 left 14:12 hacktor left 14:13 mowcat joined 14:15 hacktor joined 14:24 Actualeyes left 14:32 lucasb joined 14:39 Doc_Holliwould joined 14:51 hungryd67 joined 14:54 hungrydonkey left 14:55 mjsir911 joined 14:59 |oLa| joined 15:13 chloekek left 15:14 Actualeyes joined 15:17 |oLa| left
timotimo Kaiepi: pretty cool 15:51
15:57 hungryd67 left, hungrydonkey joined 16:00 |oLa| joined 16:05 Altai-man_ joined 16:08 sena_kun left, orinthe3 joined 16:09 orinthe left, orinthe3 is now known as orinthe 16:10 chloekek joined
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
16:26 |oLa| left
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 :)
16:47 mniip left 16:48 dakkar left 16:51 mniip joined
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
17:06 aluaces left
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
17:11 aluaces joined
AlexDaniel cpan-raku: help 17:12
cpan-raku: source
MasterDuke and then trying to --profile with N == 100000 segfaults in malloc
17:15 PacoLinux left
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
17:34 phogg joined, phogg left, phogg joined
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])
17:48 AlexDaniel left 17:55 lichtkind left 17:56 lichtkind joined 17:57 mowcat left 17:59 upupbb-user3 joined
cpan-raku New module released to CPAN! Date::Calendar::MayaAztec (0.0.1) by 03JFORGET 18:02
18:04 hungrydonkey left 18:06 sena_kun joined 18:08 sjm_uk left, Altai-man_ left 18:16 |oLa| joined
[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
18:34 lichtkind left, sjm_uk joined 18:41 NODE left 18:43 NODE joined
sena_kun Anyone with Windows to test a little patch at github.com/sergot/openssl/pull/78 ? Mac users are welcome too. 18:55
18:55 |Sno| left
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
19:25 |oLa| left 19:27 B34Nz joined 19:28 B34Nz left, B34Nz joined, B34Nz left 19:35 maggotbrain joined 19:50 sjm_uk left 20:01 Black_Ribbon joined 20:06 Altai-man_ joined 20:08 dotdotdot left, Tirifto joined 20:09 sena_kun left 20:10 [Sno] joined 20:23 rindolf left 20:24 dotdotdot joined 20:57 Kaeipi joined, Kaiepi left 20:58 mowcat joined 20:59 stoned75 joined 21:01 pilne joined 21:02 NODE left 21:04 NODE joined 21:05 NODE left 21:07 NODE joined, natrys left 21:11 rbt left, rbt joined 21:20 kensanata joined 21:30 mrwisdom left
domm news.perlfoundation.org/post/tprcic_announce 21:32
[Coke] OHAI domm 21:33
domm hey
21:33 kensanata left 21:35 chloekek left 21:43 Black_Ribbon left 21:50 stoned75 left 22:03 MasterDuke left 22:04 mowcat left 22:05 Black_Ribbon joined, dogbert17 left, dogbert17 joined 22:07 sena_kun joined 22:08 patrickb joined 22:09 Altai-man_ left
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
22:23 patrickb left
[Coke] is rakudobrew.org one of ours, or just rakubrew? 22:23
(the former site scares my copy of chrome) 22:24
22:31 phogg left 22:33 aborazmeh joined, aborazmeh left, aborazmeh joined 22:37 MasterDuke joined 22:46 Tirifto left 22:47 k-man left 22:51 lucasb left 22:55 phogg joined, phogg left, phogg joined
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?
23:00 sena_kun left, irced joined
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
23:10 benlittle left
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
23:13 benlittle joined 23:17 wamba left, upupbb-user3 left 23:21 pecastro left 23:33 lichtkind joined 23:37 xelxebar left 23:38 mensvaga left 23:56 aborazmeh left 23:57 lgtaube joined