🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:05 reportable6 left, reportable6 joined 00:09 zacts left 00:37 zacts joined 00:39 clarjon1 left 00:41 coleman joined 00:51 zacts left 01:51 linkable6 left, sourceable6 left, reportable6 left, quotable6 left, benchable6 left, unicodable6 left, greppable6 left, bloatable6 left, coverable6 left, committable6 left, bisectable6 left, shareable6 left, evalable6 left, releasable6 left, statisfiable6 left, nativecallable6 left, notable6 left, committable6 joined, shareable6 joined 01:52 releasable6 joined, bloatable6 joined, statisfiable6 joined, evalable6 joined 01:53 linkable6 joined, bisectable6 joined, benchable6 joined, reportable6 joined, unicodable6 joined, notable6 joined, coverable6 joined, quotable6 joined 01:54 greppable6 joined, nativecallable6 joined, sourceable6 joined 02:13 ggoebel joined 02:20 ggoebel_ joined, ggoebel left 02:26 ggoebel_ left 03:06 coleman left 04:06 nativecallable6 left, reportable6 left, coverable6 left, notable6 left, quotable6 left, greppable6 left, bloatable6 left, shareable6 left, releasable6 left, evalable6 left, benchable6 left, bisectable6 left, unicodable6 left, sourceable6 left, statisfiable6 left, linkable6 left, committable6 left, evalable6 joined 04:07 shareable6 joined, committable6 joined, coverable6 joined, statisfiable6 joined 04:08 notable6 joined, greppable6 joined, reportable6 joined, benchable6 joined, unicodable6 joined, nativecallable6 joined, linkable6 joined, sourceable6 joined, bloatable6 joined, releasable6 joined, quotable6 joined 04:09 bisectable6 joined 04:15 zacts joined 04:20 tejr left, tejr joined 04:22 zacts left 04:39 zacts joined
stevied if I have a grammar that's been used to parse some text and then I save the Match object it returns, is there a way to run actions on the Match object later? 04:46
moritz nothing built-in, I think. You could always write your own code that recurses into the match object and calls methods corresponding to named captures though 05:13
stevied yeah, thought of that. was hoping to save myself some trouble. ok, thanks. 05:14
05:39 evalable6 left, linkable6 left, linkable6 joined
zacts can raku include python libraries in any way? 05:39
Voldenet Inline::Python 05:40
zacts thanks
I'll check it out (I was just curious)
05:40 evalable6 joined
Voldenet stevied#8273: not sure if that's the correct way, but you can try this ix.io/3Ufx 05:58
it assumes that whatever's captured is immutable for actions use 06:01
06:05 p6steve_ left, p6steve left
Voldenet …which isn't always true 06:05
06:07 reportable6 left 06:08 reportable6 joined 06:24 zacts left 06:25 mexen joined 06:39 Geth left, ecocode___ left, Woodi left, dutchie left, moon-child left, bd3i left, Sevalecan left, daxim left, tbrowder left, zostay left, leedo left, Geth joined, tbrowder joined, moon-child joined, zostay joined, Woodi joined, leedo joined 06:40 daxim joined, ecocode___ joined 06:41 dutchie joined, Sevalecan joined 06:43 mykhal left, juanfra__ left, El_Che left, jercos left, samebchase left, perryprog left, jercos joined, El_Che joined, mykhal joined 06:44 perryprog joined 07:09 abraxxa joined 07:15 abraxxa left 07:16 abraxxa joined 07:19 Sgeo left 07:22 Manifest0 joined 07:49 sena_kun left 07:51 dakkar joined 07:58 sena_kun joined 08:58 linkable6 left, evalable6 left 08:59 linkable6 joined 09:00 evalable6 joined 09:06 p6steve joined 09:07 p6steve_ joined 09:31 abraxxa left
Geth doc/search-categories-update: 1ec1dc3df7 | Altai-man++ | 8 files
Categorize new refs
09:32
09:33 abraxxa joined 09:36 Xliff joined
Xliff \o 09:36
I would love to attempt some graphviz bindings for Raku, particularly for directed graph generation. However I've looked at the header files for the projects, and have no idea where to start. 09:37
Is anyone out there familiar with Graphviz who wouldn't mind at least giving me some starter tips? 09:38
moritz I think you can generate text files and pipe that to the binaries, no need for a C-level integration
Xliff I'm looking here for a start: github.com/kvdz/vala-libgvc/blob/m...ibgvc.vapi 09:39
However I'm not at all THAT familiar with Vala.
moritz: Yeah, I thought about that. My experience is with NativeCall. If I were more familiar with GraphViz as a whole, I'd do it that way.
However, I am not. So I'd thought I'd approach this like I have my other projects. Rat her than learn GraphViz, I'd like to build a Raku-ish API and learn that. 09:41
moritz not being very familiar with graphviz won't help with the C bindings
Xliff Yes, but I wouldn't have to learn GraphViz's particular syntax to use it.
I'd rather work with classes and data than syntax.
Even if it takes longer. 09:42
moritz well, I've given my advice, which you have asked for. Cannot do more.
Xliff And I thank you for what was offered.
09:44 neither joined
Xliff Is CStruct mature enough to handle bitfields? 09:45
Ala something like " unsigned objtype:2;" ?
09:48 p6steve_ left 09:49 p6steve left
Voldenet no 10:04
while that wasn't the aim of nativecall, in a lot of cases it's easier to use tiny wrappers because of all edge cases 10:07
moon-child if you don't want to be too portable, can do the bitfield layout yourself 10:18
10:18 zacts joined
Voldenet m: now.DateTime.later(:4hours :5minutes).say 10:33
camelia More than one time unit supplied. Please provide these as a List of
Pairs to indicate order of application if this is intended.
in block <unit> at <tmp> line 1
Voldenet m: now.DateTime.later(:4hours).later(:5minutes).say
camelia 2022-04-04T14:38:38.250323Z
Voldenet that's some weird limitation
lizmat Voldenet: the problem is that named arguments do not have an order, and with some units, the order of application is important 10:36
10:36 Altai-man joined
moon-child m: now.DateTime.later((:4hours, :5minutes)).say 10:36
camelia 2022-04-04T14:41:25.394188Z
10:52 lichtkind joined 10:59 zacts left
Geth doc: 0354ba33ed | (Luca Ferrari)++ | doc/Type/Metamodel/Trusting.pod6
Fix Metamodel::Trusting example output.

Tested against Rakudeo 2022.03
11:27
linkable6 Link: docs.raku.org/type/Metamodel::Trusting
11:29 p6steve joined 11:31 p6steve_ joined 11:56 jjido joined 12:07 reportable6 left 12:09 reportable6 joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/04/04/2022-...completer/ 12:45
13:09 linkable6 left, evalable6 left 13:12 linkable6 joined, evalable6 joined, jjido left, jgaz joined 13:13 tejr left 13:32 morte_ joined 13:40 Altai-man left, Altai-man joined
Geth doc/search-categories-update: 4013839e36 | Coke++ | xt/search-categories.t
make test executable
13:44
dutchie is there a way to have something like Z but which repeats a shorter list instead of ending iteration? 13:48
lizmat m: my @a = <a b c d>; my @b = 1,2,3; dd @a <<=><< @b 13:51
camelia [:a(1), :b(2), :c(3)]
lizmat dutchie use of hyper ops: docs.raku.org/language/operators#i..._operators
ah, repeats!
m: my @a = <a b c d>; my @b = 1,2,3; dd @a <<=>>> @b 13:52
camelia [:a(1), :b(2), :c(3), :d(1)]
dutchie ah perfect
thank you!
moon-child <<=><< looks like a fish 13:53
13:54 zacts joined
lizmat m: my @a = <a b c d>; my @b = 1,2,3; dd @a «=>» @b # better ? 13:55
camelia [:a(1), :b(2), :c(3), :d(1)]
13:58 tejr joined 13:59 jgaz left 14:09 jgaz joined 14:17 zacts left 14:24 jgaz left 14:27 melezhik joined
melezhik . 14:27
lizmat thanks for mentioning SparkyCI in RW, the work in progress, I think I will able to deliver MVP soon 14:28
lizmat you're welcome!
14:57 Sgeo joined 15:04 discord-raku-bot left 15:05 discord-raku-bot joined 15:16 vodkra left, vodkra joined 15:18 neither left
El_Che melezhik: a Maximun Viable Product? 15:51
lizmat
.oO( El_Che always going for maximal effect :-)
15:54
El_Che My parents tried to call me Máximo, but I protested in Morse in the womb 15:56
melezhik El_Che - yes )) 16:00
El_Che \o/
melezhik oh, sorry - minimal valuable product actually ))
but someone might consider this as a MAXIMUM for this stage ha-ha )) 16:01
I always apply maximum efforts to deliver minimum valuable product )))
El_Che melezhik: as long as you tried! 16:06
melezhik El_Che - yes ))
Juerd lizmat: Thanks for the warm welcome in the weekly :). I'm not sure one could say I'm "back", though, as I have very few spoons to spare and am still using Raku only sometimes for quick and dirty scripts. 16:09
I find myself using Perl most of the time because I'm most proficient in that, but some problems are much easier to solve when you have types, multisubs, and some included batteries, and that's when I pick Raku instead. 16:10
lizmat Juerd++ nonetheless :-)
Juerd Especially when I need datetimes, I'll pick Raku for my quick one-off scripts :)
Especially when I need datetimes, I'll pick Raku for my quick one-off scripts :) 16:11
(Wanting List[*DateTime] is really what I ran into just before writing that reddit post, but I tend to use Int in examples because that happens more often :))
(And it happened to coincide with someone displaying a similar issue on IRC, which reminded me that I'm not the only one who has these issues) 16:12
lizmat you're not alone, indeed :-) 16:14
for the various use cases, I've created e.g. raku.land/zef:lizmat/Rake and raku.land/zef:lizmat/ValueList
16:18 evalable6 left, linkable6 left
Altreus Heh, I literally chose raku for a script this week because its datetime stuff is actually not awful 16:19
16:19 linkable6 joined, Altai-man left, Altai-man joined 16:20 evalable6 joined 16:28 melezhik left 16:31 martinthewildpig joined
Juerd lizmat: I'll look at those soon :) 16:31
Geth doc: patrickbkr++ created pull request #4047:
Largely rework the Object Tutorial 2nd try
16:32
16:37 dakkar left 17:06 jjido joined 17:10 Altai-man left 17:12 mexen left
leont I do rather recognize the problem with typed arrays not being smooth. In some situations they DWIM and in some don't, and it's not intuitive at all when that happens 17:40
And it greatly annoys me, because I prefer my modules to be rather typed
Altreus I find Raku vacillates between DWIM and DWTF quite a lot 17:43
Geth raku.org: 27336b4dcf | (Roman Baumer)++ (committed using GitHub Web editor) | fetch-recent-blog-posts.pl
fix deprecated success method in Mojo::Transaction and replace with error method
17:46
17:47 jjido left
Geth raku.org: 86446dded5 | (Roman Baumer)++ (committed using GitHub Web editor) | fetch-recent-blog-posts.pl
remove unnecessary semicolon
18:02
18:06 reportable6 left 18:08 sena_kun left 18:09 reportable6 joined, sena_kun joined 18:17 n1to joined 18:19 nine_ joined, m_athias left, camelia left, nine left, m_athias joined 18:20 nine_ is now known as nine 18:24 camelia joined 18:44 martinthewildpig left
leont IMO it mostly DWIMs where it does a copy, and doesn't where it does a bind, but the latter is more common 18:48
s/IMO/IME/
19:01 perlbot left, simcop2387 left 19:05 perlbot joined 19:07 simcop2387 joined, morte_ left 19:12 sena_kun left, jgaz joined 19:13 sena_kun joined 19:18 sena_kun left 19:19 sena_kun joined 19:24 sena_kun left 19:26 sena_kun joined 19:28 zacts joined 19:33 neither joined 19:37 sena_kun left 19:38 sena_kun joined 19:39 morte_ joined
Geth raku.org: cbeaeb5a9b | (Roman Baumer)++ | 3 files
change pl6anet.org -> planet.raku.org
19:39
raku.org: 9250062555 | (Roman Baumer)++ | fetch-recent-blog-posts.pl
fix deprecated slice in Mojo::Collection for fetch-recent-blog-posts.pl
19:41 neither left 19:42 zacts left 19:48 sena_kun left 19:50 sena_kun joined
Juerd leont: Feel free to chime in in the reddit discussion 19:51
I'm kinda ignoring most replies because they go into theoretical "the way things should be" discussions that I'm not that interested in as it is a purely practical issue we run into that might just not fit into a rigid system. 19:52
leont I need to assemble my thoughts first. But the coercion type suggestion sounded sensible to me 19:54
Juerd I didn't understand that one :) 19:55
19:55 abraxxa left
Juerd And I wonder if "coercion" would mean lossiness, as in sub foo(Int() $x) { ... }; foo(4.5); 19:56
Because that's what I would really *not* want.
leont Basically, it means that an Array[Mu] is taken as input and converted into an Array[Int]
lizmat m: my Int() @a = "42","666",45.3; dd @a # don't we have that already ? 20:05
camelia Array[Int(Any) @a = Array[Int(Any)].new(42, 666, 45)
leont m: sub foo(Int() @foo) { }; foo([1, 2]) 20:08
camelia Type check failed in binding to parameter '@foo'; expected Positional[Int(Any)] but got Array ([1, 2])
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
leont Adding an is copy doesn't fix that either 20:09
lizmat m: m: sub foo(Int() @foo) { }; foo(Array[Int()].new(1, 2)) 20:13
camelia ( no output )
lizmat in the signature you're asking for an array with an Int() constraint
[1,2] is not that
leont I know that, but I want it to convert that Array to an Array[Int] 20:14
lizmat ok... as long as that is clear :-)
I have no solution
afk&
20:18 archenoth left 20:19 melezhik joined
melezhik . 20:19
20:24 melezhik left 20:33 jgaz left 20:34 simcop2387 left, perlbot left 20:37 simcop2387 joined 20:40 perlbot joined 20:44 perlbot_ joined 20:45 perlbot left 20:46 perlbot_ is now known as perlbot, archenoth joined 20:55 jjido joined
drakonis how does operator precedence get defined? 21:24
moon-child m: sub infix:<xxx>(\x, \y) is tighter('+') {} #drakonis 21:26
camelia ( no output )
moon-child (also 'is looser', 'is equiv')
21:26 lichtkind_ joined
moon-child (for builtin operators, it's somewhat more convoluted, probably for bootstrapping reasons. I assume you want to know about defining your own) 21:26
drakonis indeed
i also wanted to look into how the builtin operators do it
~for science~
moon-child look at Grammar.nqp and precedence.pm6 21:27
drakonis cool.
21:29 lichtkind left
drakonis neat. 21:32
21:32 morte_ left 21:36 jjido left
drakonis now, how does one declare metaoperators? 21:50
moon-child can't
yet
drakonis hm, i see.
looking forward to that day 21:51
its going to be a good day for writing cryptic code :v
hopefully rakuast will be what's needed for that 21:59
22:01 n1to left 22:05 ggoebel joined 22:19 euandreh left 22:20 euandreh joined 22:26 ggoebel left
Geth Raku-Steering-Council/main: 49c01f31eb | (Geoffrey Broadwell)++ | minutes/20220402.md
Add RSC meeting minutes for 2022-04-02
22:40
23:04 lichtkind_ left 23:12 melezhik joined
melezhik .tell p6steve I've added some very simple API to manage repos in sparkci, you can check it out if you want, please take it easy and try not to add too many repos, as you are going  to break my bank, he-he ))) 23:14
current version has limitation as it expects `main` branch not `master` for GH repo
^^ patrickb as well 23:15
23:22 melezhik left 23:53 ggoebel joined