🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:00 Ergo444 left, perlmaros left, ptc left, bartolin left, andinus left, a3r0 left, discord-raku-bot left, jmcgnh left, colemanx left, lucerne left, amenonsen left, markmarkmark left, mtj left, a3r0 joined, perlmaros joined, discord-raku-bot joined, Colt left 00:01 andinus joined, amenonsen joined, lichtkind_ left 00:02 Colt joined, mtj joined, reportable6 left 00:03 getimiskon left, markmarkmark joined 00:04 [Coke] left 00:05 bartolin joined, ptc joined, getimiskon joined, reportable6 joined, [Coke] joined 00:07 jmcgnh joined 00:13 DarthGandalf left 00:17 squashable6 left 00:18 squashable6 joined 00:26 DarthGandalf joined 00:42 rbt joined
tonyo .tell Skarsnik you need to name the block itself, eg: token <name> { }; 00:44
tellable6 tonyo, I'll pass your message to Skarsnik
tonyo m: grammar A { }; A.^add_method("test", sub test666() { }); say A.^methods.map(*.gist).first("&test666"); 00:45
camelia &test666
00:57 rbt left, rbt joined 00:58 perryprog is now known as Rikem, Rikem is now known as perryprog 01:00 colemanx joined 01:09 melezhik left 01:16 getimiskon left 01:19 DarthGandalf left 01:20 DarthGandalf joined 01:27 rbt left, AAAA39 joined 01:45 rbt joined 01:59 rbt left, rbt joined 02:19 rbt left, rbt joined 02:42 frost joined 02:50 Sgeo joined 02:54 rbt left, rbt joined 03:00 rbt left, rbt joined, rbt left, rbt joined 03:55 rbt left, rbt joined 04:25 rbt left 04:26 rbt joined 04:36 rbt left 04:52 rbt joined 05:17 xinming left 05:19 xinming joined 05:22 rbt left, rbt joined 05:32 rbt left, rbt joined 06:03 reportable6 left, rbt left 06:18 rbt joined 06:26 silug left 06:28 rbt left 06:53 andrzejku joined 06:54 rbt joined, rbt left, rbt joined, rbt left 07:10 andrzejku left 07:25 rbt joined, rbt left 07:26 seednode left, rbt joined 07:27 seednode joined 07:31 rbt left, rbt joined, rbt left 07:36 renormalist left 07:37 renormalist joined 08:03 andrzejku joined, reportable6 joined 08:14 linkable6 left 08:15 linkable6 joined 08:22 rbt joined, rbt left 08:27 Sgeo left 08:37 abraxxa joined 08:43 silug joined, abraxxa left 08:44 abraxxa joined 08:47 dakkar joined 08:48 rbt joined
pie_flavor Is there syntax to hyper a reduction? 08:52
moon-child nope
pie_flavor so I'm stuck with `».reduce(&infix:<+>)` then? 08:53
moon-child oh, that kind of hyper
08:53 rbt left, rbt joined 08:54 rbt left, rbt joined, rbt left
moon-child hmm, ideally [+]« @x would work. But apparently not 08:55
pie_flavor neither `[+] «(` nor `[+«] (` seem to have done it 08:56
if I write the first one, my IDE starts highlighting it all as a string.
moon-child in this case, you could use @x.map(&sum)
(or, well, @x».sum) 08:58
pie_flavor right. second question, since my goal is to golf aoc21 as much as possible: if I've got a computed list `[Z]`'d together, and then I need to use it like `@x[0..*-1] Z @x[1..*]`, is there any way to do that all on one line without putting the first list in an actual `@x` variable? 09:00
oh, nvm, forgot about `.&` 09:04
09:10 rbt joined 09:21 lichtkind_ joined 09:40 Skarsnik joined 10:10 rbt left, rbt joined, rbt left 10:11 rbt joined, patrickb joined 10:21 rbt left, rbt joined 10:31 rbt left 10:36 rbt joined, rbt left 10:48 rbt joined 10:55 rbt left 11:03 rbt joined, rbt left, andrzejku left, rbt joined 11:09 rbt left, rbt joined, rbt left 11:14 rbt joined, rbt left 11:32 mscha joined
mscha Quick Q: how do you refer to the < infix operator? &infix:<<> doesn't work, unsurprisingly. 11:33
11:35 rbt joined
Nemokosch multi sub infix:«<»(Int:D, Int:D) 11:35
on the doc page
11:37 rbt left, rbt joined
mscha Ah, of course, thanks! 11:38
Nemokosch it seems to me that analoguously, <<<>> also works 11:39
as ugly as it might seem 😄 11:40
11:41 Altai-man joined 11:47 rbt left, rbt joined, rbt left
gfldex weekly: github.polettix.it/ETOOBUSY/2021/1...-divisors/ 11:49
notable6 gfldex, Noted! (weekly)
11:55 mscha left 12:03 reportable6 left 12:07 frost left
Geth ecosystem: 76d73bda9b | (Elizabeth Mattijsen)++ | ADOPT-ME.md
Remove DBIish from adoption list

It's felt that it should remain a community effort of some sort.
doc: Smylers++ created pull request #3986:
Add $#array equivalent
12:12 rbt joined, rbt left 12:13 rbt joined, rbt left, rbt joined, rbt left, rbt joined 12:14 rbt left, rbt joined, rbt left, rbt joined, abraxxa left, rbt left 12:15 rbt joined 12:17 abraxxa joined 12:20 rbt left 12:26 rbt joined, rbt left, rbt joined 12:31 abraxxa left 12:35 abraxxa joined 12:36 rbt left 12:37 rbt joined
Geth doc: bb2a114ecd | Smylers++ (committed using GitHub Web editor) | doc/Language/5to6-nutshell.pod6
Add $#array equivalent (#3986)

  * Add $#array equivalent
  * Fix Pod error
linkable6 Link: docs.raku.org/language/5to6-nutshell
12:49 linkable6 left 12:57 rbt left, rbt joined 12:59 daxim joined 13:37 rbt left, rbt joined, rbt left 13:51 linkable6 joined 14:03 reportable6 joined 14:05 rbt joined 14:16 patrickb left 14:31 A26F64 joined 14:43 Guest12 joined
Guest12 lizmat: FYI I'm getting a 500 error when using search at logs.liz.nl/ 14:50
lizmat Guest12 what did you look for ? 14:52
lizmat sees the error, but can't repro 14:53
Guest12 lizmat: Searches in either #raku or #perl6 for nick TimToady. 14:54
lizmat thanks, I think I know what's going on.... 14:55
Guest12 A search for "contains" 'take away', with nick TimToady, in #perl6
And so on
lizmat: :)
lizmat check back in 30 mins or so, should have it solved by that
Guest12 Thanks! 14:56
15:03 rbt left 15:08 rbt joined 15:13 [Coke] left, lichtkind_ left 15:14 riffraff joined 15:16 [Coke] joined
lizmat Guest12: should work now 15:17
15:19 lichtkind joined
Guest12 lizmat: Working great. :) Thanks! 15:21
lizmat Guest12 thanks for the report! 15:22
Guest12 lizmat: Spoke to soon.
lizmat ah?
15:23 lichtkind left
Guest12 lizmat: Did a search (channel: '#perl6', query: 'macros', nick: 'TimToady'). 15:24
It worked. But results began with latest. 15:25
lizmat ah, so this is more a feature request :-)
Guest12 No
15:25 lichtkind joined
lizmat you should be able to scroll up to get earlier results 15:26
Guest12 Yes. I tried that. That worked. But I wanted results from maybe 10 years ago.
So I tried to set Until: to 2011. (First I did that wrong, but didn't notice, and got latest results again.) 15:27
When I set Until to be Jan 1 2011 I got a 500 error message again
(There was more to it than I've just said. I'm now trying to reproduce.) 15:29
15:30 lichtkind left, avar left
Guest12 lizmat: OK. Reproduced. Same initial settings as per my 15:24:53 msg, but Until set to Jan 1 2011. --> 500 error 15:31
lizmat hmmm...could you do a reload on that ?
also: logs.liz.nl/perl6/2006-02-22.html#22:24-0002 is the first hing TimToady said on channel 15:32
15:33 eseyman left
lizmat Guest12: I think I need to revisit the search UI a bit deeper again... 15:33
which I'm not in the right mindset right now 15:34
Guest12 lizmat: Interesting. It works if I don't specify nick: TimToady
lizmat: FYI, imo the search UI is pretty fabulous in general 15:35
lizmat could you post the URL that you get? they're all GETs, for easy passing URLs
Guest12 hang on
lizmat: logs.liz.nl/search.html?query=macr...2011-01-01 15:37
lizmat ok, thanks, I can look at a quick fix for that 15:38
15:44 A26F64 left
Guest12 lizmat: np at all if you leave it for another time 15:45
15:51 avar joined 15:52 avar left 15:53 avar joined, rbt left 16:12 monkey_ joined 16:24 rbt joined 16:58 monkey_` joined 16:59 monkey_ left 17:00 riffraff left 17:14 rbt left, rbt joined 17:39 monkey_` is now known as monkey_ 17:41 dakkar left, patrickb joined 17:43 abraxxa left 17:48 monkey_ left, monkey_ joined, Guest4115 joined, Guest4115 left 17:53 ProperN[out] left 18:00 Altai-man left 18:02 reportable6 left 18:15 Xliff_ left 18:22 hobbs joined 18:24 Guest12 left
hobbs decided to have fun and see how much of Advent of Code I could do in Raku. #1 is, of course, pretty easy, but I produced a few different versions going from a line-by-line translation of the p5 version to a clever little almost-pointfree version. Anyone care to look and see if there are ways I could make it prettier, or other cool approaches? 18:25
[Coke] oh right, I don't think I finished AOC from <checks, last ever?>
hobbs Problem: adventofcode.com/2021/day/1 Solutions: gist.github.com/arodland/2f61f623a...06baf06c7c (don't open if you don't want spoilers). 1.raku solves the first star, 2, 2b, 2c solve the second star in different ways 18:31
18:49 rbt left 18:50 rbt joined 18:54 squashable6 left 18:56 squashable6 joined
gfldex hobbs: I did it a little different: gist.github.com/92a2c28e15fc8850b1...06c9111ca9 19:02
19:15 rbt left, rbt joined
gfldex Looks like we need better ARM support: www.jeffgeerling.com/blog/2021/tur...-itx-board 19:20
19:23 patrickb left 19:31 maettu joined 19:35 perryprog is now known as merryprog 19:36 monkey_ left
SmokeMachine m: say <199 200 208 210 200 207 240 269 260 263>.rotor(2 => -1).flat.map(&[<])>>.Int.sum 19:37
camelia 7
gfldex m: say <199 200 208 210 200 207 240 269 260 263>.rotor(2 => -1).flat.map(&[<]).sum 19:44
camelia 7
19:44 MasterDuke joined 19:52 Guest60 joined 19:57 Guest60 left
SmokeMachine makes sense 19:58
gfldex m: say +<199 200 208 210 200 207 240 269 260 263>.rotor(:2(-1)).flat.grep(&[≤]); 20:01
camelia This call only converts base-2 strings to numbers; value -1 is of type Int, so cannot be converted!
(If you really wanted to convert -1 to a base-2 string, use -1.base(2) instead.)
in block <unit> at <tmp> line 1
gfldex m: say +<199 200 208 210 200 207 240 269 260 263>.rotor(2 => -1).flat.grep(&[≤]);
camelia 7
gfldex It is yawdropping how many things have to work together in CORE to make this work. :) 20:02
20:04 reportable6 joined
hobbs &[<] was syntax I was failing to remember earlier :) 20:04
20:06 monkey_ joined
hobbs grep sees that you gave it a 2-ary function and automatically takes 2 at a time, and that's why stuff like .flat.grep(&[<]) works? 20:15
20:16 [Coke] left 20:22 [Coke] joined
lizmat m: (^10).grep: -> $a, $b { say "$a, $b" } # hobbs indeed :-) 20:24
camelia 0, 1
2, 3
4, 5
6, 7
8, 9
lizmat m: (^12).grep: -> $a, $b, $c { say "$a, $b, $c" } # hobbs indeed :-)
camelia Too few positionals passed; expected 5 arguments but got 4
in block <unit> at <tmp> line 1
lizmat hmmm... apparently only 2
Nemokosch huh? 20:25
lizmat m: (^12).grep: -> $a, $b?, $c? { say "$a, $b, $c" }
camelia Too few positionals passed; expected 5 arguments but got 4
in block <unit> at <tmp> line 1
Nemokosch where do 5 and 4 even come from
lizmat m: (^11).grep: -> $a, $b? { say "$a, $b, $c" }
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$c' is not declared
at <tmp>:1
------> 3(^11).grep: -> $a, $b? { say "$a, $b, 7⏏5$c" }
lizmat m: (^11).grep: -> $a, $b? { say "$a, $b" }
camelia 0, 1
Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1

2, 3
4, 5
6, 7
8, 9
lizmat hmmm
hobbs weirdness
(I also don't get where 5 and 4 ever came into play) 20:26
lizmat a full stacktrace with --ll-exception will probably reveal the exact position in the internals and provide clarity 20:30
20:35 [Coke] left
hobbs yes, but not very scrutable. I fail to scrute it. 20:36
Nemokosch yes, this is very doubtful behavior 20:39
20:43 [Coke] joined 20:54 [Coke] left 20:55 rbt left 20:56 rbt joined 21:21 rbt left, rbt joined 21:26 rbt left, [Coke] joined
[Coke] ah, great I can use IRC to keep track of how many times my 5G home internet craps out 21:29
21:32 rbt joined 21:37 rbt left, rbt joined 21:48 linkable6 left, linkable6 joined 22:04 shu joined 22:05 shu left 22:07 rbt left, rbt joined 22:13 rbt left, rbt joined 22:33 rbt left 23:08 lembark left 23:10 monkey_ left
elcaro bisectable6: say (1..120).pick(*).grep(*>*>*).so 23:11
bisectable6 elcaro, Will bisect the whole range automagically because no endpoints were provided, hang tight
elcaro, Output on all releases: gist.github.com/e63cbd4e4a60959f85...3b1e1fe9a2 23:12
elcaro ^ this used to work back, at least it does in my 2018.04
bisectable6 elcaro, Bisecting by exit code (old=2021.06 new=2021.07). Old exit code: 0
elcaro, bisect log: gist.github.com/b38351cbc6526125b3...be0a63ad54
elcaro, (2021-07-10) github.com/rakudo/rakudo/commit/bb...4dffbe798c
elcaro, Output on all releases and bisected commits: gist.github.com/3cf275952faf6398df...cefee8427f
elcaro oh... so it only regressed fairly recently 23:13
AlexDaniel and the bot still works!
MasterDuke i think it may have been confused by new-disp and/or the force push done on rakudo's master 23:19
23:23 rbt joined
elcaro I've created Issue #4660 for the regressoin 23:26
23:39 rbt left 23:51 childlikempress joined, moon-child left 23:52 childlikempress is now known as moon-child