🦋 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.
tonyo heh 01:54
m: sub trait_mod:<is> (Sub:D $s, :$partial) { $s.wrap(sub (*%_) { if %_.elems == $s.signature.params.elems { callwith |%_;} else { my %cache = %_; my $cw := &callwith; return sub (*%_) { $s.(|%_, |%cache); }; }; }); }; sub x (:$name, :$title) is partial { "{$title}. {$name}".say; }; x(:name<tony>, :title<m>
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
------> name}".say; }; x(:name<tony>, :title<m>⏏<EOL>
tonyo ); my $partial = x(:name<tony>); $partial.(:title<m2>); #rf
gross
m: gist.github.com/tony-o/9d4fe1e20d8...b568b7ca61 01:56
camelia m. tony
m2. tony
tonyo rf ^
could be expanded to work with *@_ too, and the hash matching would be improved by making sure what's in %_ is what's in the named bits of the signature 01:57
rf Dang thats really neat
Thanks for sharing :D
I really need to study up on the slip operator, I feel like I'm missing out a lot by not knowing it that well 01:59
Or sink, idk what is "|" called? 02:00
tonyo slip, i think. i think of it as a flatten 03:52
Geth doc: Prince213++ created pull request #4180:
Simplify links and fix syntax
12:50
NemokoschKiwi .Is there a way to contribute to Tellable? 14:23
(also, just a notification: Discord messages don't get to IRC at the moment) 14:24
Geth doc: d3ff67f6fe | (Sizhe Zhao)++ (committed using GitHub Web editor) | 7 files
Simplify links and fix syntax (#4180)

  * Simplify links
  * doc/Language/control.pod6: fix link
14:25
lizmat NemokoschKiwi: I wondered why it was so quiet today
sorta blamed Friday the 13th :-) 14:26
[Coke] any rakuast docs in main/ at the moment? 14:27
NemokoschKiwi lizmat: oh, it's just we entered the read-only state :D 14:28
I mean, sorta strange that apparently two different programs/processes back up the two directions of the bridge
even though there is just one apparent bot client 14:29
[Coke] Until I can cutover to ast - how to run a QAST node? 14:33
lizmat Actually, I don't think you can, not until it has been turned onto MAST bytecode 14:35
lizmat and for a given QAST node, am not sure you can without context, compilation unit, etc etc etc 14:36
but then again I could be wrong nine jnthn vrurg might know
vrurg [Coke]: I can give you an NQP code example. 14:41
[Coke] %^&^% 14:42
[Coke] Found my bug. in raku code, I was doing my $qast = QAST.... insteqad of my $qast := QAST... 14:43
MasterDukeMobile [Coke]: the "executing qast trees" section of blogs.perl.org/users/zoffix_znet/2...cious.html might be helpful 14:45
lizmat TIL :-) 14:49
mind you, that will not hold in the future :-) $*W is going the way of the dodo
lizmat I wonder whether this is a bug in the current regex engine: 15:11
m: say ",🦋" ~~ / \C[COMMA, BUTTERFLY] / 15:12
camelia Nil
lizmat m: say ",🦋" ~~ / \c[COMMA, BUTTERFLY] /
camelia 「,🦋」
lizmat compare that with the negation:
m: say "ab" ~~ / \C[COMMA, BUTTERFLY] /
camelia 「a」
[Coke] github.com/coke/raku-slang-date
lizmat why is that just "a" and not "ab" ?
vrurg m: say "ab" ~~ / \C[COMMA, BUTTERFLY]+ / 15:13
camelia 「ab」
vrurg lizmat: ^^^ ?
lizmat but why wasn't the + needed in the non-negated case ?
vrurg That certainly looks like a bug to me. 15:14
[Coke] raku -I. -MSlang::Date -e 'say 2023-01-13.day-of-week'
5
lizmat [Coke]: cool!
so is the bug in the negated or the non-negated case in your opinion? 15:15
lizmat feels in the negated case 15:16
[Coke] Inspired by buttondown.email/hillelwayne/archi...languages/ 's "Date Literals"
lizmat and now a followup blog post!
vrurg lizmat: non-negated. It must've caught just one symbol.
lizmat but why? I always interpreted \c[COMMA, BUTTERFLY} as a convoluted way to say: ,🦋 15:17
*]
but you're saying its a convoluted way to say: , | 🦋 15:18
vrurg Because \c still stands for a single char. I consider [P1, P2] as a set of alternatives. 15:19
m: say "ab" ~~ / \w /
camelia 「a」
vrurg So, its no different from the above.
[Coke] uploaded to fez.
rf :[Coke] can you link the source to that slang? 15:20
lizmat sadly, the documentation only mentions single character use of \c
[Coke] github.com/coke/raku-slang-date/bl...te.rakumod
lizmat yet the RakuAST node has "characters" as its attribute
rf Thanks !
vrurg lizmat: an error? Even the doc says that \c matches _a_ character. 15:22
lizmat hmmm that.s what the documentation says, indeed :-) 15:23
I'll make an issue 15:24
[Coke] rf: any feedback welcome, thank you
vrurg lizmat: BTW, I found no specs for the case. Could've overlooked any, but likely they're not there. 15:33
lizmat I guess I'm enshrining the specs in RakuAST tests now :-) 15:34
vrurg: in RakuAST, it's considered to be a CharClass, which would make me lean towards the \c case being correct 15:38
m: say ",," ~~ / \c[COMMA, BUTTERFLY] / # but that doesn't seem to be correct either
camelia Nil
vrurg lizmat: for the sake of uniformity, I'd expect anything withing [] to behave as a set of alternatives, akin to <[]>. The only difference would be in using commas to separate props because these may contains spaces. 15:41
vrurg From that point of view \c would always be a single char. Besides, it improves readability because one wouldn't need to remember \c specific – quantifiers talk on their own. 15:43
Another uniformity would be to match behaviors of other \<letter> character classes. 15:44
lizmat hmmm... seems \x has the same issue: 15:46
m: say "ab" ~~ / \x[61, 62] /
camelia 「ab」
lizmat m: say "AB" ~~ / \X[61, 62] /
camelia 「A」
lizmat github.com/rakudo/rakudo/issues/5155 15:48
[Coke] ... dammit, I left off a colon in the meta6.json name 16:09
maybe fez could warn about that? 16:10
ingy [Coke]: nothing up yet for toronto afaik 16:28
soon!
NemokoschKiwi 2nd attempt: is it possible to make changes to Tellable? 17:43
[Coke] The person who runs them does so but doesn't really do much else, so my guess would be: yes, if it was a simple change that was packaged up in a way that was easy for them to include. 17:59
[Coke] (AlexDaniel is his nick) 18:02
Missed the previous discussion, but is there an issue/PR on github.com/Raku/whateverable ? 18:03
NemokoschKiwi It seems to me that Tellable itself is not available anywhere so I wouldn't know how it can be changed 18:07
I was thinking that something like a .readall command could be handy, so that if I, or someone else from discord, goes to IRC, the bot won't start spitting a dozen of "missed messages" 18:08
coleman [Coke]: papercuts like that are important, in my opinion. Can you open an issue on fez? 18:09
ugexe i mean there isn't exactly a reason a distribution name can't contain a single : 18:10
and in all honestly we shouldn't be using :: in distribution names anyways, rather s/::/-/
NemokoschKiwi This is quite a good point in my opinion but it doesn't seem like there is a critical mass of awareness regarding this 18:12
[Coke] .ask AlexDaniel - hey, where is the source for tellable6? it's not one of the obvious options here: github.com/Raku/whateverable/tree/...ateverable 18:19
tellable6 [Coke], I'll pass your message to AlexDaniel
[Coke] tellable6: source?
tellable6 [Coke], github.com/Raku/whateverable
linkable6 [Coke], github.com/Raku/whateverable
[Coke] .tell AlexDaniel nevermind! 18:20
tellable6 [Coke], I'll pass your message to AlexDaniel
[Coke] github.com/Raku/whateverable/blob/...ellable.p6
NemokoschKiwi well, how could I miss this when I literally grepped the whole folder for any appearance of tellable case insensitive 🤐 18:29
[Coke] I also did. I ended up search for ".ask", that got me there.' 18:30
what kind of change were you thinking of?
[Coke] updates his windows install to HEAD and so far no explosions. 18:31
NemokoschKiwi > I was thinking that something like a .readall command could be handy, so that if I, or someone else from discord, goes to IRC, the bot won't start spitting a dozen of "missed messages" 18:32
tbh looking at the code, it might be possible to just fix the interpretation of Discord names some way 18:34
[Coke] GLHF 18:39
NemokoschKiwi tellable6: test 18:40
tellable6 NemokoschKiwi, I saw test 2017-07-23T21:20:01Z in #perl6: <test> hello?
NemokoschKiwi lol 18:41
.tell tellable6 interesting semantics you've got
tellable6 NemokoschKiwi, Thanks for the message
NemokoschKiwi gotcha