šŸ¦‹ 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.
00:03 Kaiepi left 00:07 reportable6 left 00:10 reportable6 joined 00:27 MasterDuke joined 00:37 jmcgnh left 00:47 jmcgnh joined 01:47 linkable6 left, greppable6 left, committable6 left, bloatable6 left, tellable6 left, benchable6 left, coverable6 left, shareable6 left, statisfiable6 left, evalable6 left, releasable6 left, bisectable6 left, reportable6 left, quotable6 left, sourceable6 left, squashable6 left, nativecallable6 left, shareable6 joined, squashable6 joined 01:48 statisfiable6 joined, bisectable6 joined, bloatable6 joined, nativecallable6 joined 01:49 tellable6 joined, linkable6 joined, releasable6 joined, reportable6 joined, benchable6 joined, committable6 joined 01:50 coverable6 joined, quotable6 joined, evalable6 joined, greppable6 joined, sourceable6 joined 01:53 sourceable6 left, greppable6 left, evalable6 left, quotable6 left, reportable6 left, tellable6 left, bloatable6 left, bisectable6 left, statisfiable6 left, squashable6 left, MasterDuke left 01:57 frost78 joined 02:45 derpydoo left 02:51 bisectable6 joined, sourceable6 joined, statisfiable6 joined 02:52 evalable6 joined 02:53 tellable6 joined 03:08 discord-raku-bot left 03:09 discord-raku-bot joined 03:40 jmcgnh left 03:50 jmcgnh joined 03:51 bloatable6 joined 04:51 squashable6 joined 04:52 reportable6 joined, greppable6 joined 05:05 rickbike joined 05:48 abraxxa joined 05:52 quotable6 joined 05:54 abraxxa left, abraxxa joined 06:06 reportable6 left 06:08 reportable6 joined 06:58 Sgeo left 07:09 Kaiepi joined 07:19 rickbike left 07:30 cnx left 08:12 dakkar joined 08:30 sena_kun joined 08:35 haxxelotto joined 09:06 haxxelotto left 09:08 haxxelotto joined 09:11 haxxelotto left 09:14 epony left 09:26 lichtkind joined 09:28 dakkar left 09:29 dakkar joined 09:39 xinming left 09:50 sena_kun left 09:52 sena_kun joined 10:22 xinming joined 11:08 labster left 11:33 equinox joined
equinox hello 11:42
m: multi si(Str $s, Int $i) | (Int $i, Str $s) { die "dispatch went wrong" unless $s ~~ Str && $i ~~ Int; "s:$s i:$i"; }; si "", 2
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> multi si(Str $s, Int $i)ā | (Int $i, Str $s) { die "dispatch went
expecting any of:
new name to be defined
equinox so this doesn't work, doesn't compile but is there something i miss or it is not implemented yet? 11:43
i take the code from roast 11:44
12:08 reportable6 left 12:09 reportable6 joined
lizmat equinox: from where in roast ? 12:10
12:11 equinox36 joined
lizmat equinox: also, what do you need inside the "si" multi? strings or integers? 12:11
equinox36 $s as a String, $i as an Integer 12:12
lizmat m: multi si(Str $s, Int $i) { dd }; multi si(Int $i, Str $s) { dd }; si 42, "foo"; si "foo", 42
camelia sub si(Int $i, Str $s)
sub si(Str $s, Int $i)
lizmat ^^ 12:13
equinox36 yes but
trying to write 1 multi only
github.com/Raku/roast/blob/master/...gnatures.t
lizmat interesting 12:14
12:14 equinox left
lizmat even though that file is in roast, is is *not* part of the spectest, and it also doesn't compile, as you already saw 12:14
equinox36 oh 12:15
lizmat so I'd say it's a definite case of NYI
equinox36 didn't know spectest is something different than the entire repository
where do you check the spectest?
lizmat in my rakudo source dir, I did: raku t/spec/S06-signature/multiple-signatures.t 12:16
to do the whole spectest, I do: make spectest
fwiw, I think it could be relatively implemented, by creating multiple candidates under the hood for you 12:17
for *your* case
but suppose the different signatures refer to differently named parameters 12:18
then the body of the sub wouldn't know what to do?
ah, looking at the tests, apparently it *is* forcing the same set of parameter names 12:19
"multis with multiple sigs must have the same set of formal variables"
equinox36 so as long as the variable name and the sigil is the same (and exactly the same) among different signatures, order, types, named-ness can differ, right? 12:23
i think this is very cool, for example the `three` sub there in the test 12:24
what would be the sketch path for this to be implemented would you say?
lizmat the way I read the tests, indeed...
it's about what the names/sigils are inside the body, that matters, not how they appear in the signatures
which makes sense
but alas, NYI... PR's welcome! :-) 12:25
equinox36 i can try! (and fail probably) 12:26
what would be the sketch path for this to be implemented would you say? 12:27
lizmat 1. look in src/Perl6/Grammar.nqp where the boundary between end-of-sig and the body is being handled
(this is also handling traits btw, which could be an interesting and possibly complicating factor 12:28
2. introduce | as a way to specify another signature and keep track of the signatures, checking that all signatures have the same formal parameters 12:29
3. look where a completed body in the src/Perl6/Actions.nqp is being hooked up with the signature, and hook up all of the signatures with the same body 12:30
I'm probably forgetting things here :-)
equinox36 thank you 12:34
12:42 equinox36 left 12:52 haxxelotto joined 12:59 Newbie21 joined 13:01 frost78 left 13:04 jgaz joined 13:20 derpydoo joined 13:25 MoC joined 13:29 equinox joined 13:53 MoC left 14:01 vrurg left 14:02 vrurg joined 14:59 Sgeo joined 15:28 abraxxa left 15:32 abraxxa-home joined 15:35 MoC joined 15:39 MoC left, MoC joined 15:42 bigdata joined 15:45 abraxxa joined 16:09 razetime joined 16:10 abraxxa-home left 16:15 abraxxa left 16:16 abraxxa joined 16:32 bigdata left 16:34 dakkar left 16:41 Abhoerschutz left, Abhoerschutz joined 17:02 labster joined 17:05 m_athias left 17:06 razetime left, camelia left 17:07 nine left 17:10 m_athias joined 17:12 camelia joined 17:14 nine joined, m_athias left, camelia left 17:15 m_athias joined 17:23 camelia joined 17:46 labster left 17:59 saint- joined 18:01 abraxxa left 18:06 reportable6 left 18:08 reportable6 joined 18:13 sena_kun left 18:15 sena_kun joined 18:40 MoC left, MoC joined
tonyo new version of fez is about to land where it should get rid of the bundling problems people are seeing with the weirdness in git's bundler and some tar commands not being available in certain OSes 19:02
xinming SmokeMachine: ping 19:17
SmokeMachine: do we have correct way to programatically to add columns to existing model? 19:18
SmokeMachine: What I'm trying to do is something like role for model, for example, article role will have many "required" columns, which can be a role, and exact model can add extra columns when needed. 19:23
19:33 jgaz left
xinming Or, is it possible to have something like, model_role keywords to generate roles for model. 19:33
I just think, probably, this is where macro can be useful in this case. 19:59
20:26 habere-et-disper joined
habere-et-disper I see a doubly escaped heading at top of page <[ ]>: 20:31
docs.raku.org/syntax/%3C[%20]%3E
or is it just me?
20:31 MoC left 20:54 sena_kun left 20:55 sena_kun joined 20:59 Newbie21 left 21:01 vrurg_ joined 21:03 vrurg left 21:08 sena_kun left, vrurg joined 21:11 vrurg_ left 21:13 melezhik joined
melezhik weekly: dev.to/melezhik/sparrowci-pipeline...-cicd-38c7 21:13
notable6 melezhik, Noted! (weekly)
melezhik o/
21:14 melezhik left, melezhik joined
melezhik o/ 21:14
weekly: dev.to/melezhik/sparrowci-pipeline...-cicd-38c7
notable6 melezhik, Noted! (weekly)
21:16 melezhik left
guifa knows that with RakuAST he could make `multi sub foo (Str, Int) | (Int, Str) {Ā ... }` work 21:20
equinox cool 21:22
i foundĀ  `token multisig` in Grammar.nqp after lizmat's directions
and it does say "Not really implemented yet." 21:23
guifa (the problem is that RakuAST isn't around. Unfortunately, certian parts of compiling with QAST and $*W is a bit opaque to me still) 21:25
if you don't mind a very small restriction, I could make it for you in a trait 21:26
equinox oh my 21:27
i don't mind, what's the restriction 21:28
guifa wouldn't have control over two the order of two same types 21:31
equinox my main excitement was about it allowing a parameter to be passable as named as well as positional
guifa ah
I could do that one too, I was thinking mainly on the unordered bit
lemme see what I can come up with
equinox ty 21:32
21:34 derpydoo left, habere-et-disper left
guifa will probably take me a bit since I'm doing some other things, so don't hold your breath too much lol 21:36
equinox haha 21:37
okay, thanks, i leave but i read the logs 21:38
hope that didn't sound like a thread lol 21:39
English -.-
21:40 equinox left
guifa ha not at all 21:43
22:03 epony joined 22:04 japhb left 22:05 lichtkind left 22:11 japhb joined
guifa tio.run/##ZZPNbuIwEMfvPMVsFURAwUi7...9OuMN8szKW 22:21
/XcH1cgkvHGuolO2OGXqJgcUzNTX1k3JoDwZ7w1bgFRvTSq@ROJ2x9nIz8Ww/6yc5Qd3ptzQO0@P/vcl8nxGdfgvretMSGtnYKbQdf35a0cd/cplczgU1IdhCdZHcStvwJp0JaY3VMWkNkEn/vIzH2Fyj8FTSPDyMPQUxilxJB15mWTIl6SegKjhL4np3YUpNXShX0l/0Q2W73AQ
gist.github.com/alabamenhu/c4b1167...dbab835394 22:22
22:35 tejr left
SmokeMachine xinming: a role should work for thatā€¦ 22:45
xinming: like this: github.com/FCO/Red/blob/master/t/13-roles.t 22:47
23:10 archenoth left 23:13 tidux left 23:15 lostduck joined 23:17 lostduck left, deoac joined