🦋 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.
Voldenet melezhik: compile it with debug symbols, attach gdb, print backtrace 00:07
00:08 reportable6 left 00:10 reportable6 joined 00:15 mexen left 00:21 euandreh left
[Coke] does XS not JustWork® with Inline::Perl5 ? 00:45
00:48 rbt left 00:53 euandreh joined 01:14 swaggboi left, swaggboi joined
Voldenet just tried `use JSON::XS:from<Perl5>; say encode_json(<hello world>)` and it did work for me 01:19
01:25 discord-raku-bot left, discord-raku-bot joined 01:26 rbt joined
tailgate You can setup delay: /set irc.look.smart_filter_delay 5 01:42
sorry, oops 01:43
01:49 Voldenet_ joined, Voldenet left, Voldenet_ is now known as Voldenet 01:55 saint- left 02:06 rbt left, rbt joined 02:18 frost joined 02:35 Sgeo_ joined 02:39 Sgeo left 03:00 rbt left 03:08 melezhik left 03:16 Guest35 left 03:23 gugod left 03:26 gugod joined 04:03 guifa joined, coleman joined 04:04 RakuIRCLogger left 04:05 lizmat left, Geth left, TempIRCLogger left 04:07 TempIRCLogger joined, lizmat joined
guifa o/ 04:09
04:21 coleman left 04:47 xinming left 04:49 xinming joined 05:49 statisfiable6 left, sourceable6 left, evalable6 left, benchable6 left, releasable6 left, linkable6 left, unicodable6 left, tellable6 left, coverable6 left, reportable6 left, bloatable6 left, shareable6 left, nativecallable6 left, notable6 left, committable6 left, quotable6 left, greppable6 left, bisectable6 left, unicodable6 joined 05:50 linkable6 joined, committable6 joined, kjp left, statisfiable6 joined, quotable6 joined, nativecallable6 joined 05:51 evalable6 joined, coverable6 joined, releasable6 joined, shareable6 joined 05:52 reportable6 joined, greppable6 joined, notable6 joined, sourceable6 joined, bloatable6 joined, benchable6 joined, tellable6 joined, bisectable6 joined 06:06 reportable6 left, reportable6 joined 06:12 abraxxa joined 06:16 kjp joined 06:18 abraxxa left 06:19 abraxxa joined 06:27 jjido joined 06:35 guifa left 07:35 releasable6 left, greppable6 left, reportable6 left, nativecallable6 left, bloatable6 left, sourceable6 left, benchable6 left, bisectable6 left, shareable6 left, quotable6 left, coverable6 left, statisfiable6 left, tellable6 left, unicodable6 left, linkable6 left, committable6 left, notable6 left, evalable6 left, evalable6 joined 07:36 greppable6 joined, reportable6 joined, committable6 joined, bloatable6 joined, unicodable6 joined, tellable6 joined, coverable6 joined 07:37 releasable6 joined, benchable6 joined, notable6 joined, linkable6 joined 07:38 statisfiable6 joined, quotable6 joined, nativecallable6 joined, shareable6 joined, bisectable6 joined, sourceable6 joined 07:40 jjido left 07:49 lichtkind joined 07:50 jjido joined 07:51 Sgeo_ left 07:53 jjido left 08:03 dakkar joined 08:09 jjido joined 08:12 jmcgnh left 08:16 RakuIRCLogger joined, jjido left, lizmat left 08:17 lizmat joined 08:20 RakuIRCLogger left, RakuIRCLogger joined 08:21 jmcgnh joined 09:02 sena_kun left 09:03 Geth joined, sena_kun joined 09:07 grondilu joined
grondilu method fallbacks are not inherited? I've tried to inherit from JSON::RPC and got no method fallbacks. 09:07
Sorry I meant JSON::RPC::Client 09:08
m: class A { BEGIN $?PACKAGE.add_fallback: $?PACKAGE, -> $,$ { True }, -> $,$name { say "calling $name" } }; A.new.foo 09:10
camelia ===SORRY!=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
No such method 'add_fallback' for invocant of type 'A'
in code at <tmp> line 1
grondilu m: class A { BEGIN $?PACKAGE.HOW.add_fallback: $?PACKAGE, -> $,$ { True }, -> $,$name { say "calling $name" } }; A.new.foo
camelia calling foo
No such method 'CALL-ME' for invocant of type 'Bool'
in block <unit> at <tmp> line 1
grondilu m: class A { BEGIN $?PACKAGE.HOW.add_fallback: $?PACKAGE, -> $,$ { True }, -> $,$name { method { say "calling $name" } } }; A.new.foo 09:11
camelia calling foo
grondilu m: class A { BEGIN $?PACKAGE.HOW.add_fallback: $?PACKAGE, -> $,$ { True }, -> $,$name { method { say "calling $name" } } }; A.new.foo ; class :: is A {}.new.foo
camelia calling foo
No such method 'foo' for invocant of type '<anon|1>'
in block <unit> at <tmp> line 1
grondilu m: class A { BEGIN $?PACKAGE.HOW.add_fallback: $?PACKAGE, -> $,$ { True }, -> $,$name { method { say "calling $name" } } }; A.new.foo ; try class :: is A {}.new.bar 09:14
camelia calling foo
09:16 p6steve left 09:17 p6steve joined 09:21 p6steve left 09:23 p6steve joined 09:43 ThDrMz left, ThDrMz joined 10:43 linkable6 left, evalable6 left
SmokeMachine m: class A { method FALLBACK($name, |c) { say "calling $name" } }; A.new.foo; class :: is A {}.new.bar 10:43
camelia calling foo
calling bar
tellable6 2022-04-21T02:24:56Z #raku-dev <melezhik> SmokeMachine hopefully I fixed SparkyCI performance and false negative issues , please try to run new builds for Red and let me know if you have any issue
10:44 evalable6 joined
SmokeMachine grondilu: ^^ 10:44
10:45 linkable6 joined
SmokeMachine .tell melezhik I'll try to fix some Pg tests as soon as possible to test it, thanks! 10:47
tellable6 SmokeMachine, I'll pass your message to melezhik
10:47 p6steve left 10:48 wingfold joined 10:56 p6steve joined
grondilu SmokeMachine: noted. I suppose I could tell the author of JSON::RPC to update his module to use FALLBACK instead add_fallback 10:58
11:00 p6steve left 11:09 p6steve joined 12:03 p6steve left 12:04 p6steve joined 12:08 reportable6 left 12:10 reportable6 joined, p6steve left
Geth ¦ Documentable: JJ self-assigned Test failures github.com/Raku/Documentable/issues/160 12:35
¦ Documentable: JJ unassigned from antoniogamiz Issue Test failures github.com/Raku/Documentable/issues/160
12:36 RaycatWhoDat joined
RaycatWhoDat Hi, hello. 12:37
tellable6 2021-10-26T15:04:00Z #raku <dakkar> RaycatWhoDat: subset Command of Str where * ~~ /:i ^ EXIT $ /; loop { my $command = prompt(">>") // last; last if $command ~~ Command; say "I will do <$command>" }
RaycatWhoDat wha
Oh, I know what this is for
Thanks, dakkar
dakkar wow, apparently a few months ago I replied to a question of yours
RaycatWhoDat Yeah, this is probably for the orchestration thing I was fiddling with 12:38
I was using Raku as "Nicer Bash"
I'm currently running into the "This Seq has already been consumed" issue and I'm trying to grok how to actually solve it 12:39
I've done what the error asks me to do but it doesn't seem to work
Here's the non-functioning code: github.com/RayMPerry/kitchen-sink/...crypt.raku
Why doesn't adding the `.cache` method to the usages of `@translations` actually work? Am I misunderstanding something? 12:40
grondilu I encountered this error lately too. I solved it by using .eager
RaycatWhoDat `.eager` on the declaration? 12:41
err, assignment
Nemokosch what is that arrow thingy?
grondilu instead of `my $ = (^10).something` I wrote `my $ = (^10).something.eager^
RaycatWhoDat Nemokosch, it makes a Pair 12:42
grondilu or something like that, the details don't matter
Nemokosch oh right, I got confused
grondilu m: say .WHAT given my $ = (^10).base(16) 12:43
camelia No such method 'base' for invocant of type 'Range'. Did you mean any
of these: 'Bag', 'Hash', 'are', 'asec', 'hash', 'race', 'take'?
in block <unit> at <tmp> line 1
grondilu oops
m: say .WHAT given my $ = (^10).Str.flip
camelia (Str)
grondilu m: say .WHAT given my $ = (^10).map(*.Str.flip)
camelia (Seq)
grondilu m: say .WHAT given my $ = (^10).map(*.Str.flip).eager
camelia (List)
Nemokosch anyway, I don't remember needing eager in situations like that
I think it would be more idiomatic to just convert to List 12:44
RaycatWhoDat Doesn't that have the same problem?
grondilu I think I had tried that
m: say .WHAT given my $ = (^10).map(*.Str.flip).list
camelia (List)
grondilu m: say .WHAT given my @list = (^10).map(*.Str.flip); say @list[0]; say @list[0] 12:45
camelia (Array)
0
0
grondilu meh I can't even reproduce the "Seq already consumed" error. This thing is confusing. 12:46
Nemokosch Apparently it doesn't 🤔
RaycatWhoDat grondilu, I think you need to try and iterate over the same sequence twice 12:47
grondilu m: say .WHAT given my @list = (^10).map(*.Str.flip); for ^2 { .say for @list }
camelia (Array)
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
Nemokosch I only know that I regularly make these manipulations and never even heard of this eager thing. I know cache and this plain old List conversion
RaycatWhoDat Hm. 12:48
Maybe some operations don't consume the Seq?
grondilu my example was initially with a constant, not sure that changes anything.
Nemokosch not quite
RaycatWhoDat In that case, Nemokosch, how would you fix the code I linked above? 12:49
grondilu m: constant words = (1..100).fmt("foo%02x").words; say words[0] xx 2;
camelia (foo01 foo01)
RaycatWhoDat There's nothing sensitive in it; feel free to copy-paste
Nemokosch the @ sigil converts to positional 12:50
by default an Array iirc
so if you assign to @list, an Array will be constructed from the Seq
grondilu still can't reproduce it. oh well 12:51
RaycatWhoDat Thanks for trying, grondilu
Nemokosch by adding .List after .comb 12:52
RaycatWhoDat ohhhhhhh 12:53
Was it the `$key.comb` that was being consumed? 12:54
Nemokosch did you expect something else? 😄
RaycatWhoDat `@translations`
Nemokosch I thought we were talking about it all along
RaycatWhoDat TIL 12:55
For some reason, I thought `.comb` was eager and just left you with a new Seq each time
Never thought it was using the same iterator 12:56
Nemokosch oh no, as I said, @translations can't be consumed
it's an array by default
related thing that I don't really like: the separate concept of list assignment
so you thought it was _lazy_, right?
RaycatWhoDat Other way around
Nemokosch no, it was evaluated at the assignment and that's it 12:57
RaycatWhoDat Also, I didn't grok the implication of "oh no, as I said, @translations can't be consumed"
IIRC, you only said "the @ sigil converts to positional" 12:58
and I didn't pick up the implications from that whole thing
Nemokosch $key.comb is a function call
no call happens later on, you have that one Seq
what does that mean?
RaycatWhoDat is waiting for discord-raku-bot 12:59
Nemokosch what further implications do you need? 13:00
RaycatWhoDat No, no, I was saying that I misunderstood the implication that "@translations can't be consumed" when you mentioned that "the @ sigil converts to positional by default an Array iirc". Hence, my overall confusion but now I know. 13:01
Nemokosch anyway docs.raku.org/language/variables#i...ry-sigil_@ 13:02
RaycatWhoDat Lol. 13:03
Thank you for answering, though. I appreciate it.
grondilu looks up how to type emojis on linux 13:06
grondilu sets up typing booster
th 13:07
thinking_
Nemokosch do you have some shorthand for "ACTION" or do you just type it every single time? 😄 13:08
grondilu can now type emojis too 😁 13:10
grondilu still has to learn their names, though
moritz in IRC, you can write "/me writes" to do an action 13:18
lizmat agrees 13:19
Nemokosch 😄 13:23
13:23 p6steve joined 13:25 morte_ joined 13:28 Guest35 joined 13:29 perlbot left 13:30 simcop2387 left 13:34 RaycatWhoDat left 13:35 discord-raku-bot left 13:36 discord-raku-bot joined
patrickb o/ 13:37
13:37 simcop2387 joined 13:38 perlbot joined 13:39 MitarashiDango[m joined
patrickb I want to transfer a module (perl6-WebService-Github) to the Raku org since it's switched maintainers twice already. I guess it makes sense to rename it as well. Is there any consensus of whether there should be a "raku-" prefix in module repo names? 13:39
lizmat perhaps it should be moved to raku-community-modules ?
patrickb Is there any thing else to do except renaming the repo and transfering ownership (both via the web interface)? 13:40
oh
right
lizmat update the ecosystem ?
patrickb that's obviously the right place (in contrast to the Raku org) 13:41
Yes, I also want to do a release.
(on zef)
13:41 frost left
lizmat you have a fez login ? 13:41
patrickb Modules in raku-community-modules are still uploaded as the author that does the release (me in this case), right? 13:42
Yes I do. Already did some releases.
lizmat ok, lemme send you an invite so you can release raku-community-modules to zef 13:43
what's your fez login ?
patrickb ? 13:44
patrickb yes 13:45
lizmat invite sent
kiti_nomad[m] Does raku not support generics? 13:52
lizmat it does: 13:54
m: role A[::T] { method foo(T:D) { dd } }; A[Int].foo(42)
camelia method foo(A[Int]: Int:D, *%_)
lizmat m: role A[::T] { method foo(T:D) { dd } }; A[Str].foo(42)
camelia Type check failed in binding to parameter '<anon>'; expected Str but got Int (42)
in method foo at <tmp> line 1
in block <unit> at <tmp> line 1
patrickb Is there any preference wrt repo name prefix "raku-" vs no prefix at all? 13:56
kiti_nomad[m] Did not find enough relevant information, it is best to have covariant and inverse content
patrickb Most in raku-community-modules don't have a prefix. I think I'll just go for "WebService::GitHub" then. 13:57
Repo move in progress. 14:01
14:22 londoed left 14:29 saint- joined 14:31 londoed joined 14:48 p6steve left 14:49 p6steve joined 14:54 Sgeo joined, p6steve left 14:55 p6steve joined
El_Che patrickb: I think the raku prefix only make sense if you the same lib for different languages on the same user root in github 14:56
*s
15:01 p6steve left 15:02 p6steve joined 15:07 p6steve left 15:08 londoed left, londoed_ joined, p6steve joined 15:13 p6steve left 15:14 p6steve joined 15:19 p6steve left 15:20 p6steve joined 15:25 p6steve left 15:26 p6steve joined 15:30 p6steve left 15:32 p6steve joined 15:36 p6steve left 15:38 p6steve joined 15:42 p6steve left 15:44 p6steve joined
[Coke] I've done it when there's a p5 original mine is based on, but it's not mandatory 15:45
15:48 p6steve left 15:49 p6steve joined 15:54 p6steve left 15:55 p6steve joined 16:36 swaggboi left, dakkar left 16:37 rir joined
Geth doc: acfd787831 | rbt++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Update modules.pod6

Change "perl" version in META6 to "raku" version.
16:38
doc: bc40322fd6 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #4052 from rbt/patch-1

Update modules.pod6
linkable6 Link: docs.raku.org/language/modules
doc: a24a775967 | Coke++ | META6.json
update perl to raku

following best practice as described in #4052
16:44
16:45 linkable6 left 16:47 linkable6 joined 16:49 rir left 16:50 swaggboi joined 16:54 abraxxa left 17:01 p6steve left 17:09 p6steve joined 17:13 p6steve left 17:15 guifa joined 17:22 timo left 17:27 p6steve joined 17:28 wingfold left
Geth doc: JJ assigned to coke Issue Delete TODO file github.com/Raku/doc/issues/4055
JJ assigned to Altai-man Issue Delete TODO file github.com/Raku/doc/issues/4055

Adds new rule to exclude some lines
Rules for finding URLs were heuristic, and this file had a couple of examples that put URLs in some markup. This closes #4053, eliminating also skip code. All tests pass now, including that file
17:58
17:59 grondilu left 18:07 reportable6 left 18:09 reportable6 joined
18:20 linkable6 left 18:21 linkable6 joined 18:22 Geth left, Geth joined 18:26 Geth left, Geth joined
Geth doc: f6c1d0ece2 | Coke++ | TODO
Remove file

Closes #4055
18:47
18:48 linkable6 left 18:51 linkable6 joined 19:17 grondilu joined
grondilu finally managed to reproduce the error he was mentioning earlier : 19:18
m: constant words = (1..100).map: *.flip; say words.pick xx 2
camelia The iterator of this Seq is already in use/consumed by another Seq (you
might solve this by adding .cache on usages of the Seq, or by assigning
the Seq into an array)
in block <unit> at <tmp> line 1
grondilu this is quite mysterious to me, but I guess I just don't understand Seq well
especially since : 19:19
m: constant words = (1..100); say words.pick xx 2
camelia (70 71)
grondilu why would that stop working if I add a map?
m: say .WHAT for ^10, (^10).map(* * 2) 19:20
camelia (Range)
(Seq)
grondilu well ok
19:21 morte_ left 19:23 saint- left 19:36 morte_ joined
japhb grondilu: Assigning to an unsigiled constant means that you just want to directly store the Seq object itself in the constant, not the values that Seq would produce. 20:01
20:09 eseyman left 20:13 eseyman joined
grondilu m: constant @words = (1..100).map: *.flip; say @words.pick xx 2 20:28
camelia (61 45)
grondilu japhb: noted
20:29 grondilu left
Tirifto Is there some straightforward way I could get a custom handle that I could both write to and read from? Basically a drop-in replacement for a handle like $*IN, except instead of getting its data from a file or STDIN, it could get them from a list or some other object in the program itself? 20:46
(If I’m getting this right, a handle does not have resources of its own, but is meant to provide access to the resources of something else; a file or a ‘stream’ by the docs. So I’m wondering if it can provide access to data I already have in the program.) 20:48
(Also, I haven’t used them much, but it feels like Supply would normally fulfill this role in Raku? Except that supplies have a different interface, and I’m wondering if I could get something that can be talked to exactly like a handle.) 20:51
tonyo Tirifto: not sure exactly what you mean by similar to a handle but raku.land/zef:tony-o/Event::Emitter might be relevant 21:02
21:06 morte_ left
Tirifto tonyo, thank you; probably doesn’t fit this task, but I’ll have to look into it later! 21:10
I guess that by ‘similar to a handle’ I meant I could ‘put’ stuff there and ‘get’ stuff out. Though now when I think about it, I guess any custom class implementing these methods would do? It doesn’t feel robust, but I suppose it should work if that’s all I do with them. `o` 21:11
gfldex Tirifto: Mocking IO is often used in Tests. So, you might fine inspiration in a module meant for testing.
Tirifto Well… this worked, so… yay for polymorphism! # class ToDo is Array { method get { self.shift } } 21:21
gfldex, I’ll look into that, too; thank you! 21:23
21:53 melezhik joined
melezhik . 21:53
tellable6 2022-04-21T10:47:03Z #raku <SmokeMachine> melezhik I'll try to fix some Pg tests as soon as possible to test it, thanks!
melezhik .tell SmokeMachine - thanks
tellable6 melezhik, I'll pass your message to SmokeMachine
22:53 evalable6 left, linkable6 left 22:54 evalable6 joined 22:55 linkable6 joined 22:59 lichtkind left 23:06 bdju left 23:08 bdju joined