Raku Conference Day 2 on Youtube: www.youtube.com/watch?v=BL9-XdC9WYI 🦋 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 14 August 2022.
00:07 reportable6 left 00:09 reportable6 joined
SmokeMachine I like having one class on each file and let a EXPORT decide what to do… 00:21
00:23 Xliff joined
Xliff \o 00:23
I can't seem to get Inline::Perl5 to install on my Mac Mini. Any ideas?
Is anyone alive? 00:38
guifa_ is alive 00:39
Let me give it a try, I've got a mini, but not an M[12] 00:40
Xliff Thanks, guifa!
guifa_ [Inline::Perl5] p5helper.c:1:10: fatal error: 'EXTERN.h' file not found
Xliff Aha. 00:41
How are you showing the error? Let me see if I get the same.
guifa_ zef spit it out for me
Xliff guifa: gist.github.com/Xliff/c78fb770c8b1...bdb007e9c6 00:45
guifa_ ooooooh 00:47
Xliff :> !
guifa_ That's an interesting (ab)use of declarator pod
Xliff I know
Should I feel dirty? 00:48
guifa_ No
Xliff :)
guifa_ Because you can make it ultra clean very shortly
I actually am about to release a module that finally puts us in sight of the holy grail
Xliff Really?
00:48 Kaipei joined
Xliff Please share 00:48
guifa_ grammar Foo { ecma-regex foo { …interpreted as javascript regex… } } 00:49
will be 100% valid Raku code
Xliff OK. How does that relate to the SQL use case?
guifa_ So if I allow literal Javascript-style regex code in between the brackets 00:50
Xliff BTW - I tried writing a grammar for SQL.
guifa_ there's nothing stopping me from putting any other kind of grammar there
like, say, SQL code :-)
Xliff OK. One problem...
github.com/Xliff/perl6-Parser-SQL [I've already tried that... not yet finished] 00:51
00:52 Kaiepi left
guifa_ Did you hit a major roadblock or just need more time to refine stuff ? 00:52
Xliff Nah. It's just time consuming getting all of the tokens defined, tested and integrated. 00:56
That and the fact that p6-GLib took over my life! 00:57
This was one of my first Raku (then Perl6) projects.
I actually like how my DB modules work now. I have them integrated into a Cro-based App-Server I'm writing for $dayJob. 00:58
guifa_ If you could do a dummy grammar enough to detect when the final } is, that would probably be enough 01:06
In the meantime, I legit like your hack :-)
Also consider you could still write it "in" the block 01:07
method foo (…) is query { #= sql-code }
Xliff Ah. Thanks! I didn't know that. 01:13
Also note that my hack supports parameters... 01:17
#| SELECT id FROM lightsail_instances WHERE data->"$.name" = ?
method getLightsailInstanceByName ($n)
So the .prepare and the .execute($n) are handled ....
01:21 Xliff left
guifa_ nice 01:30
01:31 Kaiepi joined 01:33 Kaipei left
guifa_ Alright yay it's been posted 01:52
Although right now for some reason fez isn't liking it. Keeps saying that the auth needs to be "zef:" but... it is 01:53
tonyo ugexe ^^ any ideas on that one? (checkbuild doesn't report any errors) 01:55
Nm, I *think* it's related to me needing to reset password. After the password reset, fez thinks it's logged in properly, but it doesn't seem to be in a perfect state. I did fez login again, and now it seems to be okay 01:58
Xliff: github.com/alabamenhu/PolyglotRegexen
tellable6 guifa_, I'll pass your message to Xliff
02:28 vrurg joined, vrurg_ left 02:31 Xliff joined 03:05 pamplemousse joined 03:20 pamplemousse left 04:14 pamplemousse joined 04:15 justache left 04:19 pamplemousse left 05:02 andrea[m]1 left, merpaderp left, ecocode___ left, bd3i left, ugexe left, leont left, skaji left, skaji joined, merpaderp joined, leont joined, bd3i joined, ugexe joined 05:03 ecocode___ joined 05:05 andrea[m]1 joined 05:16 kybr left, Juerd left, samcv left 05:17 tonyo left, kybr joined, Juerd joined, tonyo joined, samcv joined 06:06 reportable6 left 06:08 reportable6 joined 07:00 deoac left 07:29 sena_kun joined 07:43 Sgeo left 07:54 dakkar joined 07:58 justache joined
SmokeMachine guifa_: it seems you committed the .precomp 08:18
08:58 evalable6 left, linkable6 left 08:59 linkable6 joined, evalable6 joined 09:16 sena_kun left
guifa_ SmokeMachine yeah, I don't know how that happened, esp since .precomp is in the .gitignore 09:19
is deleted now. I'm assuming (hoping?) fez strips out the precomp 09:30
09:52 justache left, justache joined 10:19 justache left 10:20 justache joined 10:23 sena_kun joined 10:27 justache left 10:28 justache joined 10:29 justache left, justache joined 10:36 justache left 10:37 jaguart left, justache joined 10:42 justache left 10:43 justache joined 10:48 justache left 11:00 justache joined
El_Che listening to lizmat atm :) 11:02
lizmat oh dear :-)
11:03 justache left, justache joined
El_Che there will be manu frobs in the ecosystem :) 11:04
11:21 justache left, justache joined
El_Che salve's suggestion about shell autocomplete is a good idea 11:22
I used to use docopt in go
it's nice, but it can be too much or too little on your usage 11:23
lizmat I understand that docopt allows you to create code from an interface description, right ? 11:27
El_Che it creates the cli interfaces from the documentation
lizmat but you still need to fill in the actual working bits, right ? 11:28
El_Che let me peek in my code 11:31
it has been ages
it autoparses the cli params and creates help, verbose, debug etc 11:32
I use it to fill a Params struct with all the options and take it there in main 11:33
so it works the other way round as raku 11:34
instead of generation usage from signatures, it handles signatures from usage 11:35
(or at least, that's how I used it)
they have plenty of documentation and an org that accepts implementations for other languages 11:36
SmokeMachine At some point will we need something like: `my %SUB-MAIN-OPTS = do-all-the-right-things()`? 11:37
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/08/15/2022-...succeeded/ 11:38
El_Che well, I had similar frustation with the builtin go cli param handler (flag) as with raku's: the non gnu way of parameters and the strict order between params and arguments/cmds
(raku's params handler is way nicer than go's, by the way) 11:39
11:42 Xliff left
Nemokosch yey 🥳 11:42
El_Che Nempkosch: I watched your talk too, what a journey :) 11:43
(for me Nemokosch == the discord guy)
Nemokosch haha 😄 11:45
I'm curious about you as well. One of the names that don't have a face to them in my mind... 11:46
11:48 razetime joined
El_Che we'll met at real live conference in the future :) 11:48
Nemokosch letsgooo 12:01
can't promise to go to the US though :DD
El_Che NemokoschM: I am EU based, not so far from lizmat (another country, though) :) 12:02
12:06 reportable6 left 12:08 reportable6 joined 12:12 MasterDuke joined
Nemokosch 🧐 gonna catch you 12:13
12:14 justache left 12:15 justache joined
MasterDuke lizmat: doesn't the race example in that SO question need to be 'race for <…>.race {' ? 12:15
leont El_Che: yeah I think you're closer to lizmat despite me being the one living in the same country 😛 12:22
12:23 MasterDuke left
El_Che hehe, true 12:25
13:16 razetime left 13:21 squashable6 left 13:23 squashable6 joined 13:27 razetime joined 13:28 Sgeo joined
Anton Antonov At this point it seems <@297037173541175296> that -- judging by talks and comments at TRC-2022 -- knows Raku better than me. (I started using Raku "intensively" in 2019.) 13:30
13:38 Sgeo left
Nemokosch well well, that's flattering on one hand, but yes, the trick is that what I know I know pretty well, and then what I don't know well, I might not know to any useful extent 13:42
like OO
also, you know, I wish there were more people like you around Raku 13:46
The expertise part of Leon's talk
14:38 linkable6 left, evalable6 left 14:40 linkable6 joined 14:41 evalable6 joined 14:50 justache left, justache joined 14:52 deoac joined 15:11 razetime left 15:13 nebuchadnezzar left 15:22 razetime joined 15:33 razetime left 15:37 melezhik joined
melezhik o/ 15:37
tellable6 2022-07-26T22:42:55Z #raku <jjatria> melezhik: about the Tomtit profile, I don't think I really understand what those "profiles" are yet. But sure, knock yourself out :)
2022-08-04T19:05:47Z #raku <AlexDaniel> melezhik: thanks for letting me know, I think it works now and it's fixed for good
melezhik .tell @AntonAntonov SmokeMachine sparkyci queue got stuck, so no new builds are triggered right now, I am planning to fix this, but no sooner then probably next week 15:38
tellable6 melezhik, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
melezhik .tell SmokeMachine sparkyci queue got stuck, so no new builds are triggered right now, I am planning to fix this, but no sooner then probably next week 15:39
tellable6 melezhik, I'll pass your message to SmokeMachine
SmokeMachine melezhik: 👍
melezhik I just left my laptop with my family with the only ssh public available on it, he-he ))) 15:40
so once I get the one ... I'll fix the issue
I enjoyed the conference, it was good one, I liked it 15:41
lizmat ++ for your rak talk, was interesting to hear
15:42 melezhik left 16:05 lizmat_ joined 16:06 Kaipei joined 16:08 Kaiepi left 16:09 lizmat left
Nemokosch haven't forgotten to return to your talk 🙂 16:15
16:20 lizmat_ left, lizmat joined
Actually I have time to watch it right now, as things turned out 16:21
Anton Antonov I have to Melezhik's talk too. (Missed it on Saturday...) 16:28
I have to watch Melezhik's talk too. (Missed it on Saturday...)
16:28 Xliff joined
Altreus Are the videos up or are you scanning through the VOD from the stream? 16:29
16:39 dakkar left
lizmat afaik, the separated videos are not up yet 16:39
pretty sure Andrew would have tweeted about that 16:40
Altreus ya I guessed :) I will keep an eye out
Anton Antonov @lizmat I consider proposing an (OOP) pipeline design for the App::Rak functionalities / intents. For example, `my App::Rak $rk .= new; $rk.find-files(rx/.../).find-lines(rx/.../).grep(...).sort(*.size)` . 16:49
@lizmat Probably granularity can be generalized to be not just "files" or "lines", but also "directories" and "code blocks/subs". 16:50
lizmat hmmm.... per-dir interesting thought 16:51
Xliff Did the ":from<Perl5>" argument for use get taken away? 16:54
I have old unchanged code that has stopped working after the Sunday upgrade.
raku -e 'use Inline::Perl5; use Email::Sender:from<Perl5>' 16:56
===SORRY!=== Error while compiling -e
Too many positionals passed; expected 1 argument but got 2
lizmat yeah, that's something that will need to be fixed by an update to Inline::Perl5 nine 16:58
HEAD and Inline::Perl5 are not compatible atm :-(
17:32 sena_kun left
Xliff lizmat: What changed with traits? 17:47
lizmat nothing 17:48
Inline::Perl5 just doesn't work, the trait tries to do thta
*that 17:49
FWIW, the "use Inline::Perl5" in that case isn't needed
Inline::Perl5 just needs to be installed to make :from<Perl5> work (well before vrurg made changes in the mop :-) 17:50
18:05 deoac left 18:06 reportable6 left, reportable6 joined 18:08 deoac joined 18:13 sena_kun joined
Nemokosch is it possible to override an existing operator for an existing type? I want % (or mod) to return positive moduli for negative divisors as well 18:34
and div work accordingly
so for example 5 div -2 would be -2 in my file and 5 mod -2 would be 1 18:35
the whole thing is only useful if the polymod method can take that into account, otherwise I have to reimplement that in my code directly 18:36
moritz_ you can lexically override any operator, but the built-in operators will still use the original 18:42
the original design said the built-ins should also use your version, but so far there hasn't been any even remotely efficient implementation of that behavior 18:43
Nemokosch Yes, that makes sense unfortunately 18:44
there is another way to go about it: I could replace the negative digits to their value in the given negative base 18:47
but I don't know if this has an elegant way
> 13289110.polymod(-4 xx *)
(-2 -2 -3 -3 -2 -2 0 -3 -2 -3 0 -3)
so this is LSD to MSD
and I know that -2 is 12 in base -4, for example 18:48
usually they are 2-digit numbers in base -4, actually all of them but 0 18:49
is ther a way to turn this array into something properly overlapping so that I can sum them?
like -2 -2 is 1 | 2 1 | 2, where the middle digits go into the same slot and therefore should be summed
18:57 morte_ joined
El_Che gbj's sound needs to be fixed 18:59
lizmat gbj? You mean japhb ? 19:12
19:14 mexen left 19:15 pamplemousse joined, morte_ left
lizmat m: "the original design said the built-ins should also use your version" I'm doubtful about this ever working, as it would be different how non-core modules / code works 19:15
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> built-ins should also use your version"⏏ I'm doubtful about this ever working,
expecting any of:
infix
infix stopper
lizmat "the original design said the built-ins should also use your version" I'm doubtful about this ever working, as it would be different how non-core modules / code works
Nemokosch what does that mean? 19:16
I mean, it makes sense in theory. If something is available everywhere and you override it, the perceived benefit why you didn't just derive something for yourself from it, is that it will be for everything you call 19:19
it will be *available for everything you call 19:20
lizmat this is one such case: github.com/rakudo/rakudo/pull/4484 (or solution?)
Nemokosch and it also makes sense that it isn't gonna be terribly fast if the right function to call needs to be looked up in all of your dependencies 19:21
and cannot really be optimized for 19:22
lizmat: yes, this is exactly something like that
it just sounded silly to ask about polymod letting you to specify mod and div 19:23
lizmat but using CALLERS:: is basically also saying: throw all runtime optimizations out of the door :-(
19:23 pamplemousse left
Nemokosch I can imagine that 19:24
19:26 pamplemousse joined
It's tough because I cannot say that the current behavior of div and mod is bad. It's not the only possible definition but it is clearly a legitimate definition 19:26
however, not the one that would be useful in my case
but then it seems that eventually all the logic needs to be copied with the preferred definition of div and mod, which is much more painful in theory than in the particular example 19:27
I mean, I can say that it is bad... because they don't coerce to int, unlike everything else 😝 but that's really not the problem here 19:28
19:29 pamplemousse left, pamplemousse joined 19:44 pamplemousse left 19:46 pamplemousse joined 19:49 pamplemousse left 19:58 [Coke] left 19:59 pamplemousse joined 20:04 pamplemousse left 20:15 [Coke] joined 20:18 pamplemousse joined 20:26 pamplemousse left 20:27 pamplemousse joined 20:43 ajr joined 20:44 pamplemousse left 20:47 pamplemousse joined 20:58 pamplemousse left 21:01 pamplemousse joined 21:04 pamplemousse left 21:08 pamplemousse joined 21:11 pamplemousse left 21:26 pamplemousse joined 21:28 pamplemousse left 21:35 pamplemousse joined 21:40 pamplemousse left 21:49 pamplemousse joined 21:50 pamplemousse left 22:17 linkable6 left 22:19 linkable6 joined 22:37 sena_kun left 22:53 pamplemousse joined 22:56 pamplemousse left
japhb El_Che: Assuming lizmat was right, what was wrong with my audio? When I did the recording for the first-day talk, I had a lot of fan noise that I had to filter out, which made the talk a bit quiet compared to some of the others. Was that what you were talking about? Or was it when I was talking on the RSC Q&A? 22:57
22:57 sena_kun joined 22:58 Sgeo joined, Xliff left, Xliff joined 22:59 Xliff left, sena_kun left 23:49 pamplemousse joined 23:51 pamplemousse left