🦋 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.
moritz `sort` is a listop (a funciton name that wants an argument list aftewards, so expects a term, and interprets the < in the <== as a quote opener 06:39
if you write sort() instead, all should be well
xinming DBDish::Pg: Error: could not access file "$libdir/plpgsql": No such file or directory <--- How could I troubleshooting this issue please? 07:29
seems 2022.04 version of rakudo made a lot of changes to the build system, which caused some regressions 07:30
El_Che xinming: is the lib installed? 07:38
xinming El_Che: Definitely 07:44
Geth ecosystem: 43f91535e0 | (Elizabeth Mattijsen)++ | META.list
Remove because moved to zef ecosystem

Date::WorkdayCalendar, Pod::TreeWalker, Test::Builder
07:55
ecosystem: 368119f5fe | (Elizabeth Mattijsen)++ | META.list
Freeze IO::CatHandle::AutoLines

While it's being moved to the zef ecosystem
08:00
Nemokosch moritz: oh right. frankly I should have remembered 08:15
although I would consider this warning-worthy 08:16
gist.github.com/2colours/0720e806d...b53fdaa2b7 08:20
another example that is beyond my comprehension
that `proto` seems to just state the obvious 08:21
but somehow it enforces that some weird call doesn't happen
why does the weird call try to happen?
gfldex <@297037173541175296> you need proto to redefine a multi instead of adding another multi candidate. 08:23
Nemokosch umm... I don't see how this explains anything 08:24
honestly, I couldn't decide if you rephrased something that I already knew or this was meant to be an explanation
"redefine a multi", what does it mean? I want one multi and usually don't need a proto if the arguments are well-defined 08:26
and what I understand the least is this supposed `next-hexa-word(aa, ab)` call. Why does this happen? 08:27
lizmat that's why I think the automatic "proto" creation is a bit of a two-edged sword 08:28
but a proto is like the gateway to the multis **under it**
Nemokosch And additionally: how does the proto keep it from happening once it wants to happen for some reason? 08:29
lizmat m: multi a() {}; dd &a
camelia Sub a = proto sub a (;; Mu |) {*}
lizmat so you could consider a proto as an "only" sub that handles the re-dispatching to the multi candidates 08:30
Nemokosch Yes, I understand this... I think 08:31
what I really don't understand is why that weird call is made without the proto
lizmat m: class A { proto method Bool(|) { "foo" } }; dd A.Bool'
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> to method Bool(|) { "foo" } }; dd A.Bool⏏'
expecting any of:
infix
infix stopper
postfix
statement end
lizmat m: class A { proto method Bool(|) { "foo" } }; dd A.Bool
camelia "foo"
Nemokosch I can't see where &next-hexa-word could eat up two arguments and why
lizmat starts looking at actual code 08:32
the gist seems to be missing a definition of @hexa-letters ? 08:33
Nemokosch fair enough 08:35
edited
that seems to be alright for what I intended it to be
lizmat aaah I think I understand what's going on 08:44
it's part of the magic that ... does 08:45
when ... encounters a Callable, it introspects its signature and depending on that, decides to do something
the signature of the implicit proto is (|) and your proto is ($) 08:46
I would have to dig into the core guts of ... to find out what exactly, but it's been a while since I did that, and I got pretty burned out on trying to make it more predictable 08:47
I can only assume that ... decided to call the Callable with 2 params if the signature is | 08:48
Nemokosch That sounds plausible 😅 08:50
gfldex m: proto sub infix:<+>(\a, \b) {}; # clean slate, not another multi candidate
camelia ( no output )
Nemokosch Perhaps the nicest fix is indeed to add the proto 08:51
But I suppose *.&next-hexa-word instead of &next-hexa-word could also work
lizmat yup, that would also work 08:52
nine Yes, it's about arity. the proto with ($) has arity of 1, so the sequence generator treats it like such. The auto generated proto with a signature of (|) has an arity of Inf, so the sequence generator treats it as something that will use the previous and the current item.
lizmat because that creates a new Callable
Nemokosch Yes, that would also work 08:53
I mean... it does work, tried it now 😄
But now that I understand why the proto helps on it, I think that's overall the better idea
and I can add a type annotation too 08:54
lizmat yup, and that's why I think auto-proto generation is a double-edged sword 08:54
easy for the very beginner, but a bit of a WAT for the people getting more into the use of multis 08:55
Nemokosch Lesson to learn: multis don't expose a signature by themselves 08:57
lizmat well, not the one you'd expect, I guess :-) 08:58
m: multi a($,$,$) { }; dd &a.signature 08:59
camelia :(;; Mu |)
Kaiepi m: multi a($,$,$) { }; dd &a.dispatchees[0].signature 09:00
camelia :($, $, $)
Nemokosch Unrelated question 09:10
If I remember correctly, Rakudo, albeit the de-facto dedicated Raku compiler, isn't privileged among possible Raku implementations 09:12
How much do you think this introspection data (like dispatchees here but those WHAT, WHERE kind of fields too) is bound to Rakudo or the MoarVM backend in particular? 09:15
This is more of a theoretical question at this point, I'm curious if it would be realistic to create a different implementation of a Raku-compliant compiler and/or runtime 09:16
Guest2710 Hello, I have a comment about the weekly news. I see that it keeps supporting Ukraine nationalism and I understand that there are very importatant and loved contributors of Raku that are emotionally involved in that cause. I am here just to suggest that these people need help and support, and I am do not think that enabling these kind of 09:22
self-destructive political views will help them in the long run. I'll leave
lizmat Goodbye 09:25
MasterDuke Nemokosch: ISTR you were asking about the alternate backends a little while ago. as recently as a year or so ago, the jvm backend can still be faster for some kinds of long-running programs. and the experimental truffle branch of nqp was even faster than that (for a smaller subset of programs, but still, it shows promise) 09:34
tellable6 MasterDuke, I'll pass your message to Nemokosch
Nemokosch I think I have asked about alternative backends multiple times 09:35
But I think this current question goes a little beyond that 09:37
I could rephrase it as "how much of the code <<we>> (as the broader community) are working with is in fact <<Rakudo code>> rather than <<Raku code>>"
And whether this distinction makes sense
nine When it comes down to it, whatever's tested in roast is part of Raku. The rest may become a part of Raku, or may stay an implementation detail. 09:44
Geth ecosystem: 98ea4d2ec3 | (Elizabeth Mattijsen)++ | META.list
Freeze LN

While it's being moved to the zef ecosystem
10:51
xinming releasable6: status 10:59
releasable6 xinming, Next release in ≈2 days and ≈8 hours. 1 blocker. Changelog for this release was not started yet
xinming, Details: gist.github.com/71fc5d9965d58ff52e...541034faf3
Geth ecosystem: d82903fcd8 | (Elizabeth Mattijsen)++ | META.list
Remove p6lert / WWW::p6lert

The underlying repos are in archive state, so no development will be done there. Also, these modules are really obsolete Raku infrastructure, which may get rebuilt some day but probably under a different name.
The existsing versions will continue to be available from the REA.
11:52
ecosystem: 5bfd8bf1c7 | (Elizabeth Mattijsen)++ | META.list
Freeze Template6

While it's being moved to the zef ecosystem
11:56
xinming I just found, that examples/pg.p6 file can work well 12:05
El_Che fyi, on latest macos op apple silicon: Plugin 'Comma Community Edition (Raku Language Support)' (version '2022.01.0') is not compatible with the current version of the IDE, because it requires build 213.* or older but the current build is IU-221.5591.52 14:54
gcd El_Che: it's never worked for me, not even on my old non-M1 Mac. the one time I got it close to working most of my code was underlined red like it was errors. gave up. 15:04
El_Che it worked for me on Linux except with the latest Intellij 15:06
gfldex I just used [∩] and I liked it. :) 15:11
Nemokosch 👀 18:54
rjbs docs.raku.org/syntax/%3C%3C 19:06
The header of this page is showing HTML entities, which seem to have been double-encoded.
lizmat rjbs: could you make an issue for that ?
rjbs Absolutely. What repo? 19:07
raku/doc ?
lizmat otoh, it might be a known issue already
rjbs It appears to be github.com/Raku/doc/issues/4075
lizmat there you go... ok. thanks for checking!
rjbs I need to learn more Raku just to surprise my coworkers. :) 19:14
Today, explaining hyperoperators (Which I understand poorly and should ask more questions about).
El_Che rjbs: interesting experiment you're doing there 19:16
gfldex rjbs: please make sure to show off properly 19:31
I shall write a blogpost to help with that task. 19:32
Voldenet ^fff^ is the best operator
it's not too useful, but I like it graphically 19:35
rjbs gfldex: I have questions about the « directions, because the docs confused me, but I need to read more before I ask. 20:21
p6steve__ lizmat: are you there? 20:36
p6steve__ lizmat: I would like to send you a photo - please can you let me know best way at [email@hidden.address] 20:37
lizmat: I would like to send you a photo - please can you let me know best way at p6steve@furnival.net
gfldex lolibloggedalittle: gfldex.wordpress.com/2022/05/25/reducing-sets/ PWC spoiler alert! 20:42
guifa rjbs: I find the directionality of « and » with infix to be one of those "I'll trust whoever wrote the code that they're pointing in the right direction to do what seems most sensical" lol 21:00
rjbs Heh. The docs said something like "they point toward the shorter list" but also "if one is shorter, it will be repeated to fill", which made me wonder what the point was, but I didn't read much further -or- do any practical testing. 21:01
gfldex rjbs: there was need for the yesterday: irclogs.raku.org/raku-dev/2022-05-24.html#19:18 21:04
guifa rjbs: admittedly, te main hyper op I use is the method hyper op 21:35
rjbs is that like: @obj >>.method 21:36
guifa @foo».bar is so much more nicer than @foo.map: *.bar
yeah
(or worse, in other languages, being forced to do something as verbose as @foo.map: sub ($x) { $x.bar } 21:37
Juerd I hope Perl gets it one day, even if it's just syntactic sugar for map without any hyperness 21:38
Since Raku, writing map $_->bar, @foo gets on my nerves :D 21:39
Nemokosch the thing is, @obj>>.method doesn't do the same as @foo.map: *.bar 22:10
and the difference is rather significant
first off, >>. is recursive while map is "nodal"; it can take positionals and other compound structures just fine 22:12
second, I'm pretty sure >>. is eager while map is definitely lazy
so I pretty quickly figured most of the time it is better to use map, unless I really mean to use recursive list processing and eager evaluation 22:14
For the directionality of hyper metaoperators, I think this "shorter end vs longer end" is rather a helpful mnemonic but not much more 22:16
The approach I find better is: think of it as a kind of arrow. Now, the arrow brings the data from the list. 22:18
`(1, 2, 3) >>*>> (4, 5)` means: the data is coming from (1, 2, 3) - one could say that's the outer loop/join 22:20
gcd anyone know how to get this Github action to work? github.com/marketplace/actions/rak...ner-action It's failing for me, asking for a Docker login.. never had to provide a Docker login for any of my other Github actions. 23:28
oops. that was not the latest version. got it working. 23:32
Summer $potentially-nil.?Str; :sob: 23:51
Nemokosch I'm not sure if this does what you think it should 23:58