ūü¶č 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:05 xelxebar joined 00:06 guifa2 left 00:07 MilkmanDan joined 00:12 Altai-man_ joined 00:14 sena_kun left 00:21 guifa2 joined 00:33 cpan-raku left 00:34 wamba left, cpan-raku joined, cpan-raku left, cpan-raku joined 00:49 Zero_Dogg left 00:56 Zero_Dogg joined 00:57 __jrjsmrtn__ joined, _jrjsmrtn left 01:04 ccamel left
rypervenche I'm doing a .map on an array and I'd like to do something different for the first element than for the rest. Is there a better way to do this than to have a counter and check if it's == 1? 01:04
guifa2 not only having a counter, but you really need to be doing that with @array.kv.map 01:26
I don't think there's a guarantee that maps are processed in order
m: <a b c d e>.kv.map( -> \k, \v { if k == 1 { "one" } else { v } } ) 01:27
camelia ( no output )
guifa2 m: say <a b c d e>.kv.map( -> \k, \v { if k == 1 { "one" } else { v } } ) 01:28
camelia (a one c d e)
01:28 aborazmeh joined, aborazmeh left, aborazmeh joined
guifa2 rypervenche: see above 01:28
rypervenche Ooh, no need for a counter then. I could just do a, if k == 0 01:34
01:47 gnufr33dom joined
guifa2 hrm 01:50
m: loop (my $i = 0; $i < 2; $i++) { print $i }; loop (my $i = 0; $i < 2; $i++) { print $i };
camelia Potential difficulties:
Redeclaration of symbol '$i'.
at <tmp>:1
------> 3 $i < 2; $i++) {¬†print $i }; loop (my $i7‚ŹŹ5 = 0; $i < 2; $i++) {¬†print $i };
guifa2 m: loop (my $i = 0; $i < 2; $i++) { print $i }; say $i; loop (my $i = 0; $i < 2; $i++) { print $i }; 01:51
camelia Potential difficulties:
Redeclaration of symbol '$i'.
at <tmp>:1
------> 3 $i++) {¬†print $i }; say $i; loop (my $i7‚ŹŹ5 = 0; $i < 2; $i++) {¬†print $i };
guifa2 o.O
That's… something that will get some folks coming from other languages 01:52
01:53 molaf_ left 01:56 Sgeo left, Sgeo joined 01:57 ensamvarg3 joined 02:05 Manifest0 left, molaf_ joined, Manifest0 joined 02:18 holyghost left 02:26 MilkmanDan left 02:31 MilkmanDan joined 02:44 lucasb left 03:13 sena_kun joined 03:14 Altai-man_ left 03:34 aborazmeh left 04:22 Sgeo left 04:23 Sgeo joined 04:54 Sgeo left 04:56 Sgeo joined 05:09 bocaneri joined 05:19 aluaces joined 05:43 Sgeo left 05:45 Sgeo joined 06:04 xinming left 06:06 xinming joined 06:12 Altai-man_ joined 06:14 sena_kun left 06:27 rindolf joined 06:44 zacts left
guifa2 does a dance 06:46
I finally got epochtime -> localtime given an olson ID. Even handlees leap seconds :D
06:54 andrzejku joined 06:58 zacts joined 06:59 skids left 07:05 zacts left
moritz rypervenche: great! Let me know what you think about it 07:15
Geth advent: 429e93de8d | (Moritz Lenz)++ | 20th/articles/rfc112.md
Language and markup fixes
advent: f2d5649c9b | (Moritz Lenz)++ | 20th/articles/rfc112.md
Fix typo
07:35 andrzejku left
Geth ecosystem: a4b0359f3e | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | META.list
add Shell::Piping
ecosystem: 224aa12677 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #521 from gfldex/patch-5

add Shell::Piping
07:38 xinming left 07:39 xinming joined 07:41 leont joined 07:42 JJMerelo joined 07:46 domidumont joined 07:52 vike left 07:59 wamba joined 08:00 xinming left 08:01 xinming joined 08:02 vike joined 08:12 sena_kun joined 08:14 Altai-man_ left
moritz JJMerelo: re RFC advent, do I need to take care to publish my stuff, or will you do that? 08:14
JJMerelo moritz please do it yourself. I can help you if you want, but you know the ropes already
moritz JJMerelo: for which day? 08:15
JJMerelo moritz day 3. 08:17
I'll ask Altai-man_ to program theirs for today
.tell Altai-man_ can you please program your post for today 1 minute after midnight? 08:18
tellable6 JJMerelo, I'll pass your message to Altai-man_
moritz JJMerelo: roger, post scheduled 08:22
JJMerelo Thanks!
BTW, we're talking about the "20th anniversary calendar", started today rakuadventcalendar.wordpress.com/2...1-threads/
moritz JJMerelo: I'm pretty sure threads arrived in Perl 5 earlier than 5.10; I remember experimenting with them in 5.8.8 08:24
maybe even 5.6 had them
JJMerelo moritz Maybe 5.8.8 was what I'm talking about
I'll edit that 08:25
BTW, just change the address to raku-advent.blog, which was donated by tbrowder
moritz changed to 5.8.8, thanks! 08:26
08:37 xinming left 08:38 xinming joined
JJMerelo BTW, we still need a dozen authors for the advent calendar github.com/Raku/advent/tree/master/20th Please claim an RFC, and add yourself there. 08:38
08:39 Black_Ribbon left
tobs I feel like I should write another one, but for a short and sweet and implemented feature. 09:05
mst JJMerelo: 5.005 had what are now referred to as, well, 5005threads, then 5.6 switched to the ithreads model based on activestate's work emulating fork on win32 09:06
I'm sure -something- happened in 5.6
but threads.pm itself went into core for 5.7.3
leont ithreads in 5.6 was only used for pseudoforking
mst ah, and Thread.pm and the 5005thread model was still all you got for threading? 09:07
leont Yeah
5.005 threads was closer to raku's threading model, except the interpreter wasn't thread-safe at all. This wasn't workable at all.
mst here we go: perldoc.pl/Thread#HISTORY
right, 5.005threads were "what we would've liked to have except lolno" 09:08
leont This is also why I was so upset with the Parrot people. They wrote a brand new VM, and didn't make it threadsafe from the start
mst ithreads were "what actually worked given the constraints"
leont ithreads kind of suck, but they were realistic
That decision in parrot was so dumb I can only describe it as incompetent. 09:09
mst right, and IME I don't manage to segfault them noticeable more often than I do single threaded perl
leont It's the thing that doomed it to never going to work
09:09 JJMerelo left
mst every time I looked at parrot it seemed to be in a new state of "we're rewriting everything from the ground up, get back to us" 09:10
eventually I stopped checking
leont Whereas in MoarVM it was thread-safe from the ground up. In particular the GC. 09:12
moritz it seems that projects that start with the premise of rewriting everything from scratch attract people who want to rewrite everything from scratch :D 09:13
09:31 kensanata joined 09:36 JJMerelo joined 09:52 Ven`` joined 09:55 domidumont left 09:56 nige joined 09:57 Sgeo left, nige left 09:58 nige joined, nige left, nige joined
nige thanks AlexDaniel++ 09:58
10:02 xinming left 10:12 xinming joined 10:27 xinming left, xinming joined 10:29 rindolf left 10:54 rockxloose left 10:58 xinming left, rockxloose joined, xinming joined 10:59 reach_satori_ left, reach_satori_ joined 11:12 Altai-man_ joined 11:14 sena_kun left 11:39 kensanata left
tbrowder JJMerelo: is the 20th advent meant to be published starting 1 dec, and you're trying to get early commitment (with words) to avoid last minute panic, etc.? 11:41
11:47 xinming left 11:48 xinming joined
leont No it's this month 11:51
11:58 xinming left 11:59 xinming joined 12:10 libertas left
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/08/01/dr...placement/ 12:12
12:16 Xliff joined
Xliff [08:17:22] <Xliff> \o 12:19
[08:17:40] <Xliff> Does raku support C-like escape codes?
[08:17:53] <Xliff> What is the equivalent of "\x0000"?
[08:18:17] <Xliff> Or any of the octal codes?
12:20 aborazmeh joined, aborazmeh left, aborazmeh joined
Xliff m: 0o303.say 12:22
camelia 195
Xliff m: 0o303.fmt('%x').say
camelia c3
Xliff m: 0o244.fmt('%x').say 12:24
camelia a4
12:36 yuplushi left 13:04 aborazmeh left 13:05 arbol joined 13:06 JJMerelo left 13:07 yuplushi joined 13:13 sena_kun joined 13:14 Altai-man_ left 13:30 xinming left 13:31 xinming joined 13:38 lucasb joined
arbol Is there an opinionated Raku code formatter? 13:39
Also looking for a linter/static analysis tool 13:41
sena_kun No separate tool, but Comma partly solves this. 13:44
And likely more tools to come once recent re-work of compiler frontend will land.
arbol Neat thanks! I'm using VSCode but I might have to check this out too 13:47
13:55 tejr left 13:57 arbol left 14:00 xinming left
masak yes, RakuAST would be a great starting point for a code formatter 14:01
tellable6 hey masak, you have a message: gist.github.com/517c579b2ffc70dabf...82f7586abc
masak I have a message... in a gist. go figure.
14:03 xinming joined
masak (hi #raku) 14:04
tadzik hi o/ 14:05
14:05 tejr joined 14:10 xinming left 14:12 xinming joined 14:21 aborazmeh joined, aborazmeh left, aborazmeh joined 14:24 xinming left 14:26 xinming joined 14:27 aborazmeh left 14:51 wamba left 14:56 Ven`` left 15:12 Altai-man_ joined 15:14 sena_kun left, xinming left 15:15 xinming joined
guifa2 Arg 15:24
Finally get my localtime functions to work and now I can't get the wrapping on DateTime to go 15:25
Is there a way to, when wrapping a function, also add additionally arguments to it? 15:27
m: class A { method foo { "bar" } }; A.^find_method('foo').wrap( method ($a) { 'foo' ~ callsame ~ $a }); say A.new.foo; 15:28
camelia Too few positionals passed; expected 2 arguments but got 1
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 So not enough arguments there but…
m: class A { method foo { "bar" } }; A.^find_method('foo').wrap( method ($a) { 'foo' ~ callsame ~ $a }); say A.new.foo('xyz')
camelia Too many positionals passed; expected 0 arguments but got 1
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 Now we've got too many =\
15:28 xinming left 15:30 xinming joined
guifa2 Basically, it seems like when you wrap a function, the signature restraints are still imposed and can result in die messages when (I don't think) there should be 15:32
gfldex guifa2: you are doing callsame on a method that doesn't want any arguments
m: class A { method foo { "bar" } }; A.^find_method('foo').wrap( method ($a) { 'foo' ~ callwith() ~ $a }); say A.new.foo('xyz') 15:33
camelia Too few positionals passed; expected 1 argument but got 0
in method foo at <tmp> line 1
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 I was just about to type it doesn't change with callwith =\
I'm trying to add a named argument to DateTime's new() but at runtime it always balks when it sees the new one 15:35
gfldex guifa2: when wrapping things, sometimes a BEGIN helps. 15:36
guifa2 hmm, hopefully that won't muck with precompilation 15:37
whelp, actually that didn't help =\ still getting unexpected named parameter 15:38
gfldex guifa2: in that case you might need INIT
15:38 JJMerelo joined 15:45 skids joined
JJMerelo .tell moritz I've moved your post up to this AM, since it was the next one that seemed to be ready. 15:45
tellable6 JJMerelo, I'll pass your message to moritz
guifa2 ugh, I might need a new approach entirely. I wanted to use wrap so I could stay in runtime and not breakprecompilation but i'm not sure if this is by design or an error 15:46
JJMerelo .tell Altai-man_ Please confirm that you can schedule the post tomorrow, or allow me to post it myself.
tellable6 JJMerelo, I'll pass your message to Altai-man_
Altai-man_ JJMerelo, you can freely post it, if it seems worthy. I plan to also write another one, but maybe a bit later this weekend, need to rest first. 15:47
tellable6 2020-08-01T08:18:07Z #raku <JJMerelo> Altai-man_ can you please program your post for today 1 minute after midnight?
15:47 guifa2 left
JJMerelo Altai-man_ great to hear that. Thanks! 15:48
Altai-man_ Thanks for doing the posting trickery for me.
15:52 xinming left, xinming joined
moritz JJMerelo: ACK 15:54
15:56 rindolf joined
JJMerelo Altai-man_ done, scheduled for motrow night. I've set it to your authorship, just in case you want to dive in and make some last-minute changes. 16:01
Altai-man_ JJMerelo, thanks! Thanks for organizing all this. 16:02
JJMerelo Altai-man_ thanks for participating. It's a nice article :-) 16:03
Geth doc: 89863b9baa | (JJ Merelo)++ | doc/Language/5to6-perlfunc.pod6
Fixes link to proceed/succeed, closes #1089
linkable6 Link: docs.raku.org/language/5to6-perlfunc
DOC#1089 [closed]: github.com/Raku/doc/issues/1089 [docs][search] proceed succeed should be split in search
16:38 xinming left 16:41 xinming joined 16:50 JJMerelo left 17:04 guifa2 joined 17:13 sena_kun joined 17:14 Altai-man_ left 17:25 xinming left 17:26 xinming joined 17:37 Sgeo joined 17:43 reach_satori_ left 17:45 OpenZen joined 17:48 reach_satori_ joined 17:58 cpan-raku left 17:59 holyghost joined 18:02 cpan-raku joined, cpan-raku left, cpan-raku joined 18:18 xinming left, xinming joined 18:20 ensamvarg3 left 18:34 wamba joined 18:56 lichtkind joined 19:07 bocaneri is now known as Sauvin 19:12 Altai-man_ joined 19:14 sena_kun left, JJMerelo joined 19:20 rindolf left 19:25 JJMerelo left 19:44 Altai-man_ left 19:51 Altai-man_ joined 20:36 molaf_ left 20:43 nige left, nige joined 20:44 kensanata joined, nige left, nige joined 20:57 kensanata left 21:05 wamba left 21:13 camelCaser joined 21:19 wamba joined
Geth advent: a83fd9131c | (Tobias Boege)++ | 20th/articles/rfc145.md
Add summary to RFC 145 article
21:33 guifa2 left 21:41 nige left 21:43 gnufr33dom left 21:49 gnufr33dom joined 22:12 aluaces left 22:13 sena_kun joined 22:14 Altai-man_ left 22:16 oneeggeach joined 22:25 lichtkind left 22:26 lichtkind joined, lichtkind left 22:49 leont left
Geth ¦ problem-solving: vrurg assigned to jnthn Issue Uncertain status of tests in the roast github.com/Raku/problem-solving/issues/217 23:16
23:24 oneeggeach left 23:27 wamba left