🦋 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.
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
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
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
mscha Quick Q: how do you refer to the < infix operator? &infix:<<> doesn't work, unsurprisingly. 11:33
Nemokosch multi sub infix:«<»(Int:D, Int:D) 11:35
on the doc page
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
gfldex weekly: github.polettix.it/ETOOBUSY/2021/1...-divisors/ 11:49
notable6 gfldex, Noted! (weekly)
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.
12:07
doc: Smylers++ created pull request #3986:
Add $#array equivalent
12:12
Geth doc: bb2a114ecd | Smylers++ (committed using GitHub Web editor) | doc/Language/5to6-nutshell.pod6
Add $#array equivalent (#3986)

  * Add $#array equivalent
  * Fix Pod error
12:48
linkable6 Link: docs.raku.org/language/5to6-nutshell
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
*then
Guest12 Thanks! 14:56
lizmat Guest12: should work now 15:17
Guest12 lizmat: Working great. :) Thanks! 15:21
lizmat Guest12 thanks for the report! 15:22
Guest12 lizmat: Spoke to soon.
lizmat ah?
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
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
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
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
Guest12 lizmat: np at all if you leave it for another time 15:45
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
gfldex hobbs: I did it a little different: gist.github.com/92a2c28e15fc8850b1...06c9111ca9 19:02
gfldex Looks like we need better ARM support: www.jeffgeerling.com/blog/2021/tur...-itx-board 19:20
:->
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
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
hobbs &[<] was syntax I was failing to remember earlier :) 20:04
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
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
hobbs yes, but not very scrutable. I fail to scrute it. 20:36
Nemokosch yes, this is very doubtful behavior 20:39
[Coke] ah, great I can use IRC to keep track of how many times my 5G home internet craps out 21:29
(*#@&#
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
elcaro I've created Issue #4660 for the regressoin 23:26