🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
grondilu a not-so-common error message: 00:43
m: sub { await Promise.in(2).then: { return pi } }( 00:44
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> ait Promise.in(2).then: { return pi } }(⏏<EOL>
expecting …
grondilu hang on
m: sub { await Promise.in(2).then: { return pi } }()
camelia MoarVM panic: Internal error: Unwound entire stack and missed handler
guifa Xliff: for your sub a($a, $b, $c, $d), yes, although you'd write the sub as sub a($a, $b, $c = c-param.EVAL, $d) { … } 01:05
although at that rate, you could just say $c = c-param, and in c-param, go ahead and handle the EVAL process
Xliff guifa: Sorry, I don't think so. I'm trying to CREATE the $c parameter. Not assign a default value to it. 04:03
I may just have to wait until Macros... :(
guifa aaaaaah, yeah that'll be macros, unless you're willing to the do the whole sub via RakuAST 11:23
mscha m: say ?(1..10).grep({ say $_; $_ == 5 }); 14:06
camelia 1
2
3
4
5
True
mscha Grep shortcuts in boolean context, is that guaranteed/documented? 14:07
(Not at docs.raku.org/routine/grep it seems)
hobbified I think it's an Iterable laziness thing rather than a specific behavior of grep 14:27
coercing to bool asks "can this produce at least one thing?", and asking grep to produce one thing means it will consume input until either one thing matched or it reaches the end. 14:32
m: say (1..10).grep({ say $_; $_ %% 2 })[^3] 14:33
camelia 1
2
3
4
5
6
(2 4 6)
mscha Ah, OK, that makes sense
Nemokosch leont: good sir, could be that I have asked you before... 15:55
do you know something about imported MAIN candidates and their limitations? some things are set to break apparently 15:56
not only enum arguments - that I already knew 15:57
but array arguments of Getopt::Long also stopped working when I imported MAIN from another module that does the heavy lifting 15:58
leont That does not ring a bell 15:59
Though it is important that «use Getopt::Long;» happens in the primary scope, not (only) in the module where the MAIN subs are defined 16:00
Nemokosch that's already a good hint because I didn't do that for sure 16:01
although it seemed that Unix-style argument parsing did kinda work
leont In case of doubt, look at what App::Prove6 does :-p 16:20
Nemokosch okay, thankies 16:21
Geth doc: codesections++ created pull request #4177: Add scrollbar for navbar
codesections++ created pull request #4177: Add scrollbar for navbar
20:35
Geth docker: m-dango++ created pull request #51:
Bump to 2022.12
22:48