🦋 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.
Guest46 things will be hard for C++. Rust, Cpp2, Carbon and now Val. 01:46
the new kid on the block: www.val-lang.dev/ 01:47
timo raku-advent.blog/2022/12/06/immuta...n-in-raku/ has a "previous entry" link that points to a day 12, and clicking it actually 404s 11:03
Nemokosch this is a logical consequence of yesterday's events that you can find on this chat 11:07
Xliff \o 11:46
Is there a more idomatic way to write this: sub a (&a) { }; a( -> *@a { ... }) 11:47
Nemokosch well, what is this? 11:55
Xliff A sub that takes a Callable (ie a callbacki 11:57
I'd like that to look closer to the one used by Supply.tap 11:58
Nemokosch what decides the signature? 12:03
Kaiepi i think i forked Raku/advent on raku-community-modules by accident... doesn't belong there, right? 12:09
lizmat no
:-)
Kaiepi ok, gone now 12:10
thakns
*thanks
Nemokosch apropos advent: I think the advent of code repo is quite foggy; it doesn't even match its own instructions
it's sad to see there isn't a sole PR for it or anything 12:11
maybe later on today I could make a PR with some functioning instructions and perhaps a script as well for moving the files to where they belong 12:12
but then obviously it will be the way I think makes sense
Geth doc: tbrowder++ created pull request #4157:
correct grammar
12:31
Geth doc: tbrowder++ created pull request #4158:
fix cross-reference formats
12:50
doc: b3cf2ce9be | (Tom Browder)++ | doc/Language/classtut.pod6
correct grammar
12:57
linkable6 Link: docs.raku.org/language/classtut
doc: 96fcaf2526 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/classtut.pod6
Merge pull request #4157 from tbrowder/typo

correct grammar
timo oh i see. wild. 13:53
Xliff Is there a more idomatic way to write this: sub a (&a) { }; a( -> *@a { ... }) 14:22
I'd like it so that I can call a() like this: a({ ... })
Nemokosch why is everything called a? 😅 14:30
sorry but I really don't get the essence of your question. You can do a({ ... }) without any magic 14:31
what do you need ->*@a for?
gfldex m: sub foo(&a:(*@a)) {}; foo({;}); 14:32
camelia ( no output )
gfldex m: sub foo(&a:(*@a)) {}; foo({ &?BLOCK.signature.say }); 14:33
camelia ( no output )
gfldex m: sub foo(&a:(*@a)) { a(1,2,3) }; foo({ &?BLOCK.signature.say });
camelia Too many positionals passed; expected 0 or 1 arguments but got 3
in block <unit> at <tmp> line 1
gfldex Xliff: I'm not sure if it would make sense to make the compiler clever enough to DWIM in this case. 14:34
m: sub foo(&a:(*@a)) { a |(1,2,3) }; foo({ &?BLOCK.signature.say });
camelia Too many positionals passed; expected 0 or 1 arguments but got 3
in block <unit> at <tmp> line 1
gfldex m: sub foo(&a:(*@a)) { a |(1,2,3) }; foo({ dd @^a; &?BLOCK.signature.say }); 14:35
camelia Too many positionals passed; expected 1 argument but got 3
in block <unit> at <tmp> line 1
gfldex m: sub foo(&a:(*@a)) { a $(1,2,3) }; foo({ dd @^a; &?BLOCK.signature.say });
camelia (1, 2, 3)
(@a)
gfldex Xliff: this ^^^ might work
Nemokosch why did the slurpy not want to work? 14:36
gfldex Because it's a runtime type constraint not a type hint to be used auto-derive a signature. 14:37
Nemokosch hmmm, gotcha... I think 14:41
NemokoschKiwi m: sub foo(&a:($a, $b)) { a |(1, 2) }; foo({ dd $^a, $^b; &?BLOCK.signature.say }); 14:44
camelia 1
($a, $b)
2
Nemokosch hm, maybe not 14:45
the problem was on the side of the block instance, right? 14:48
that didn't provide the signature to be called by
Do yall think one file slot per person per solution is enough for the repository of solutions? 15:12
[Coke] how can I stop getting notifications for a github issue that I (shouldn't have) interacted with? 16:14
It already shows as not subscribed.
[Coke] tries custom and picking 'reopened' only. 16:16
Xliff Nemokosch: Apparently not in my code. a({ ... }) results in an error. 16:32
tellable6 Xliff, I'll pass your message to Nemokosch
ugexe [Coke]: i think if you're watching or starred a repo you will see any updates to any issues 16:38
[Coke] I hope the override at the ticket level covers this. 16:48
Nemokosch Xliff: consider how you call the callback 17:03
and also if you want to call everything &a... I don't know if shadowing works well in this case 17:04
I mean, invoke the callback, and name everything &a - to avoid the ambiguity of "call" 17:05
melezhik o/ 17:16
patrickb thanks for binaries !
[Coke] m: say $*PERL 17:57
camelia Raku (6.d)
[Coke] do we want a ticket to deprecate that? 17:58
lizmat fwiw, I already deprecated it once, but it broke too much code
I think it will be deprecated only in 6.e ? 17:59
[Coke] doc site says "Will be deprecated at some point" which honestly seems like the sort of prognostication we should avoid on the docs site.
Shouldn't deprecation not break anything?
lizmat I forgot the details... 18:00
[Coke] We should be able to deprecate it *in* 6.e preview right now, yes? 18:01
We should also have a wiki page for "what's deprecated, when it's getting removed", etc.
will help us keep the docs clear. 18:02
That's book-keeping, I can work on that.
Nemokosch Coke++ 18:03
lizmat agree 18:05
Geth ¦ doc: coke self-assigned Track Deprecations github.com/Raku/doc/issues/4159 18:07
[Coke] if someone can find me an existing rakudo ticket for $*PERL, I'd appreciate it 18:08
searching for "$*PERL" seems to be searching for /perl/
(and create one if one doesn't exist) 18:11
ugexe I asked chatgpt to write a raku calculator program and it keeps doing stuff like `my $num1 = =$*IN.get;` 18:18
i.e. using =$
melezhik if someone is interested in testing their module against fresh 2022.12 rakudo here is an example how to do this in SparrowCI - github.com/melezhik/raku-Async-Wor...w.yaml#L30 18:33