🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:06 markoong left 00:13 oddp left 00:22 sena_kun joined 00:23 Altai-man_ left 00:25 ensamvarg3 joined 00:48 guifa2 joined 00:56 pilne joined 00:59 pilne left 01:02 pilne joined 01:22 vrurg joined 01:31 lucasb left 01:32 RaycatWhoDat joined
RaycatWhoDat Hi. Quick question: why does Raku's compile times start slowing down so much when you add multimethods and custom operators? Not something I do often but I was just trying some stuff out. 01:34
01:38 guifa2 left
Geth_ doc: 4b0ecc1b59 | Coke++ | xt/words.pws
new type
01:43
[Coke] verifies that building HEAD is borked. 01:51
01:51 guifa2 joined 02:00 maggotbrain777 left 02:01 maggotbrain joined 02:06 Manifest0 left, Manifest0 joined 02:16 hungrydonkey left 02:21 Altai-man_ joined 02:22 ShimmerFairy joined 02:23 sena_kun left
kawaii timotimo: hastebin.com/raw/voxipirire 02:30
hope this means something to you :) 02:31
vrurg weekly: vrurg.github.io/2020/07/18/metamod...-operators 03:15
notable6 vrurg, Noted! (weekly)
03:23 ensamvarg3 left 04:15 vrurg left 04:16 hungrydonkey joined, vrurg joined 04:21 vrurg left 04:22 sena_kun joined 04:23 Altai-man_ left 04:30 kktt007 left, kktt007 joined 04:41 rindolf joined 04:48 OpenZen left 04:51 vrurg joined 04:52 vrurg left, vrurg joined 05:11 codesections left 05:17 vrurg_ joined 05:19 vrurg left 05:53 hungryd88 joined 05:55 hungryd97 joined 05:56 hungrydonkey left 05:57 hungryd88 left 05:58 hungrydonkey joined 06:00 hungryd97 left 06:02 hungryd82 joined 06:05 hungrydonkey left 06:08 hungryd82 left 06:10 rbt left 06:11 rbt joined 06:21 Altai-man_ joined, wamba joined 06:22 cpan-raku left 06:23 sena_kun left 06:28 cpan-raku joined, cpan-raku left, cpan-raku joined 06:43 Summertime left 06:45 Summertime joined
Geth_ ecosystem: 940a0d3309 | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | META.list
I renamed the repo on github for META6::bin.
06:45
ecosystem: 06501a0ddd | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #519 from gfldex/patch-4

I renamed the repo on github for META6::bin.
06:48 hungrydonkey joined 06:56 m_athias left 07:14 sno left 07:16 sno joined 07:23 vrurg_ left 07:24 vrurg joined 07:28 vrurg left 07:35 dolmen joined 08:01 vrurg joined
dolmen What is the equivalent of the .Perl method of the old days? 08:03
08:05 vrurg left 08:10 vrurg joined
dolmen answer: .raku 08:12
08:22 sena_kun joined 08:24 Altai-man_ left
dolmen How can I apply a Signature object on a Capture to get the expanded values? 08:28
I know that I can check IF the Capture CAN be expanded ($capture ~~ $sig), but how to retrieve the expanded values ? 08:29
(I'm especially interested in coercion and déstructuration powers of Signatures) 08:30
m: my @ ($a, +@b)⏏, $c = (['h', 'e'], 'world'); 08:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Signatures as constraints on variables not yet implemented. Sorry.
at <tmp>:1
------> 3my @ ($a, +@b)7⏏5⏏, $c = (['h', 'e'], 'world');
dolmen m: my (@ ($a, +@b), $c) = (['h', 'e'], 'world'); say $a, @b, $c; 08:45
camelia (Mu)(Mu)(Any)
dolmen Doesn't work either :(
tobs dolmen: to get the positional arguments of a Capture, index it like a positional, to get the named arguments, index it like an associative 08:50
m: my $c = \('bar', :20foo, 'baz'); say $c<foo>; say $c[1]
camelia 20
baz
08:51 oddp joined
dolmen tobs: ok, but I wanted to use the power of signatures for coercion and restructuring. 08:53
08:59 rbt left, rbt joined 09:10 vrurg left 09:11 vrurg joined 09:15 xelxebar left, xelxebar joined, vrurg left 09:23 vrurg joined
dolmen dirty workaround: use anonymous sub to do destructuring 09:23
m: sub (@ ($a, +@b), $c) { $a, @b, $c }( 'hello'.comb, 'world' ).raku.say; 09:24
camelia ("h", ["e", "l", "l", "o"], "world")
09:27 vrurg left
CIAvash m: my (@ ($a, +@b), $c) := ('hello'.comb, 'world'); dd $a, @b, $c; 09:30
camelia "h"
Array element = ["e", "l", "l", "o"]
"world"
CIAvash dolmen: you need to use binding ↑ 09:31
dolmen CIAvash, nice 09:35
But doc says: "But binding Array slots directly to values is strongly discouraged" docs.raku.org/language/list#Binding
Maybe that's not a comment about binding in general but about arrays... 09:37
lizmat hmmm... I wonder if this remark: "If you do, expect surprises with built-in functions." is still true 09:39
feels like something from the Parrot days 09:40
09:47 Sgeo left 09:49 synthmeat left 09:51 synthmeat joined 09:53 sena_kun left
timotimo kawaii: you literally copied the first-user/second-user test code that throws an exception for you to look at, into your code, i guess i should not have said "you literally just copypaste it in" when you still have to take that out LOL 09:55
09:56 vrurg joined 10:09 pecastro joined
dolmen Please retweet to enlight Python users about Raku: twitter.com/omengue/status/1284787027557351429 10:15
10:24 markoong joined 10:29 markong joined 10:30 markoong left 10:36 Petr37 joined
Petr37 anyone know hosting with Raku ? 10:37
i know,i can use vps, but maybe another solution available 10:38
10:39 aborazmeh joined, aborazmeh left, aborazmeh joined 10:44 molaf joined
Ulti dolmen: not sure that would have the response you expect from Python people, that would be seen as abhorent Python in the Python example 10:44
10:57 vrurg left, Petr37 left 10:58 vrurg joined, vrurg left, vrurg joined
Ulti have to say I would really like it if Python did start to have way more people who like expressive code recently had a review that told me to remove use of the new walrus := operator :'( 10:58
11:01 aborazmeh left 11:02 Petr37 joined
Geth_ doc: e091e51c37 | (JJ Merelo)++ | doc/Type/Match.pod6
Clarification for eqv
11:05
doc: b127388623 | (JJ Merelo)++ | doc/Type/Match.pod6
Change indexing for eqv, refs #3520
doc: 5a2a7a614f | (JJ Merelo)++ | doc/Language/operators.pod6
eqv can work with certain cases of lazy arguments, refs #2639

Example taken directly from roast: github.com/Raku/roast/blob/fea1d16...tors/eqv.t but the problem is what is meant by "certain". Also created rakudo/rakudo#3803
linkable6 Link: docs.raku.org/type/Match
DOC#3520 [open]: github.com/Raku/doc/issues/3520 [docs] Unify indexing criterium for infix operators
Link: docs.raku.org/language/operators
linkable6 DOC#2639 [open]: github.com/Raku/doc/issues/2639 [wishlist][xt] split spellcheck for code
linkable6 RAKUDO#3803 [open]: github.com/rakudo/rakudo/issues/3803 Unexpected side effect of calling .raku (and effects of .eqv on lazy sequences)
doc: 9363eebf05 | (JJ Merelo)++ | doc/Language/operators.pod6
Fixes compilation error
11:07
linkable6 Link: docs.raku.org/language/operators
11:21 leont joined
oddp Reading through arne's pwc solution right now. Damn, it never occured to me that you can do .grep(*.&foo) where foo is a regular sub. Sweet! 11:22
moritz you can just do .grep(&foo) 11:24
lizmat m: sub foo(\a) { a %% 2 }; dd (^10).grep(&foo)
camelia (0, 2, 4, 6, 8).Seq
lizmat pretty sure the *. is actually not needed 11:25
oddp Yeah, bad example. Still slick! 11:27
11:30 codesections joined 11:32 Petr37 left, Petr37 joined
Petr37 how create module? n 11:33
maybe any tutorial ? 11:36
dolmen Ulti: I wasn't aware that Python now has generalized iterable unpacking in assignments, not just for loop. I don't write Python, and I should have check. 11:44
Ulti Petr37: this might help you docs.raku.org/language/modules-extra 11:45
Petr37 Ulti, thanks 😊 11:46
Ulti dolmen: I wouldn't have known either, because Id never get to see something like that in the wild
unpacking is a bit clunky in Python more generally though, having to do (head, *_) = iterable_thing and then wrap it in a try catch for empty list! is quite annoying 11:47
Petr37 where i can find raku tutorials? 11:50
Ulti Petr37: raku.org/resources/ "For Newcomers" on here
Petr37 Ulti, oh thanks) 11:52
11:54 sena_kun joined
Ulti m: my ($head) = []; dd $head 11:54
camelia Any $head = Any
Ulti philosophically what's the rule of thumb that being Any rather than Nil? 11:56
timotimo m: my ($head) = (my \test = []); $head = 1; say test 11:57
camelia []
timotimo m: my ($head) := (my \test = []); $head = 1; say test
camelia Too few positionals passed to '<unit>'; expected 1 argument but got 0
in block <unit> at <tmp> line 1
timotimo nope %)
11:59 vrurg left, vrurg joined
Ulti huwah 12:02
12:04 Petr37 left, vrurg left 12:13 dolmen left 12:14 hungrydonkey left, hungrydonkey joined 12:16 tejr left 12:21 Altai-man_ joined 12:23 tejr joined 12:24 sena_kun left, aindilis` joined 12:25 perlbot_ joined, guifa2_ joined 12:26 probablymoony joined 12:27 hungrydonkey left, hungryd22 joined, El_Che_ joined 12:29 sivoais_ joined 12:30 skyl4rk_ joined, charsbar_ joined, oodani_ joined 12:31 m0ltar_ joined 12:32 guifa2 left, moony left, aindilis left, sivoais left, japhb left, skyl4rk left, El_Che left, oodani left, charsbar left, samebchase left, tinita left, m0ltar left, APic left, perlbot left, gugod left, charsbar_ is now known as charsbar, skyl4rk_ is now known as skyl4rk, perlbot_ is now known as perlbot, guifa2_ is now known as guifa2 12:33 tinita joined
codesections m: my $a = Nil; say $a 12:33
camelia (Any)
timotimo ^- assigning nil to a container resets it to its default value 12:34
m: my Str $a = Nil; say $a; my $a is default(99) = Nil; say $a
camelia Potential difficulties:
Redeclaration of symbol '$a'.
at <tmp>:1
------> 3r $a = Nil; say $a; my $a is default(99)7⏏5 = Nil; say $a
(Str)
(Str)
12:34 vrurg joined
timotimo m: my Str $a = Nil; say $a; my $b is default(99) = Nil; say $b 12:34
camelia (Str)
99
12:34 vrurg left 12:35 vrurg joined
codesections :Ulti My understanding is that Nil doesn't quite exist as a return type – that is, being Nil is esentailly being a default value. So, philosophically, it seems consistent for `[].head` to be a default value too 12:36
:timotimo, yeah, that's where I was going with that example – you just said it better/faster than I did :)
timotimo m: say Failure ~~ Nil 12:37
camelia True
timotimo ^- actually, Nil can be returned from any sub or method. Failure is also a kind of Nil, which is the reason why you can "fail" out of subs/methods even when they have return type restrictions
12:37 japhb joined
codesections Unrelated question: `WHY` returns the Pod value associated with an item's *type*. Is there a way to access the Pod value associated with the item itself? 12:38
Comma shows doc comments for variables, so I thought there might be. (Or maybe it just parses the doc comments on its own – I know it does its own parsing for IDE/code completion reasons) 12:39
timotimo override the method on your type and have an extra piece of storage in the instances for it?
oh
in that case you'll want the .VAR.WHY i think?
12:39 APic joined 12:40 gugod joined, samebchase joined
Ulti m: my (@head) = []; say @head.raku; 12:40
camelia []
Ulti m: my (@head) = Nil; say @head.raku;
camelia [Any]
Ulti m: my ($thing, @head) = []; say @head.raku; 12:41
camelia []
codesections :m my $a = 42; say $a.VAR.WHY # still tries to return the Int docstring 12:47
timotimo ah, dang 12:48
so only parameter and such have that? 12:49
cpan-raku New module released to CPAN! MongoDB (0.43.12) by 03MARTIMM 13:01
RaycatWhoDat I asked this a bit earlier but I think everyone was asleep. "Quick question: why does Raku's compile times start slowing down so much when you add multimethods and custom operators? Not something I do often but I was just trying some stuff out." 13:03
13:04 dataangel left, dataangel joined
lizmat custom operators mean change of grammar 13:05
changing the grammar currently means deep-cloning it 13:06
that's just a lot of work for the Raku grammar
mind you: this only happens during compilation, has no runtime effects
which, of course, if it is a script, and not a module, currently also means runtime 13:07
there have been efforts to also pre-compile scripts, but these seem to have stalled atm
timotimo deep-cloning, huh? 13:08
lizmat no?
timotimo i thought the biggest time-sink was running the nfa optimizer over and over again?
lizmat well, and that I gues ?
*guess
I guess the nfa optimizer runs the entire grammar then 13:09
brb
timotimo not exactly, but close enough 13:10
NFA only covers the declarative prefixes, but especially with operators that tends to be very big alternations of stuff 13:11
13:18 molaf left 13:25 ensamvarg3 joined 13:35 vrurg left 13:36 vrurg joined 13:41 vrurg left 13:45 sena_kun joined
kawaii timotimo: my bad, I think I'm also doing something wrong with it here :) hastebin.com/raw/enumuguquv 13:55
timotimo it's as i thought 13:56
the permissions array or whatever that you're putting in the junction ("in sub any at ...Junction.pm6") from your voteban code (line 81 in voteban.p6) is trying to iterate something that was already mapped over in method "combined-permissions" which you called via "has-any-permission" 13:57
kawaii: does that give the right hint? 13:58
kawaii timotimo: yes that helps us, thanks timo :D
timotimo \o/
14:14 vrurg joined 14:15 vrurg left, vrurg joined
guifa2 oddp: re your grep(.*&foo) example, that's taking advantage of a more general thing: you can use *any* sub as a method: $foo.&sub-as-method, the invocant is passed as the first argument to the sub 14:20
&sub $invocant: $arg1, $arg2; # <-- plz don't do that though it's technically possible hahaha 14:21
14:22 sena_kun left 14:23 sena_kun joined, Altai-man_ left
timotimo could you imagine ... $foo.*&bar 14:27
what would that do, invoke all possible multi candidates of &bar on $foo?
14:31 aindilis` left 14:33 aindilis joined 14:34 Tirifto joined
guifa2 timotimo: and this is how we discover magical secret incantatio—I mean, invocations 14:34
timotimo yeah :D
14:38 sena_kun1 joined
oddp guifa2: thanks, coming from d, where UFCS (dlang.org/spec/function.html#pseudo-member) is ubiquitously used throughout the language, I'm familar with that concept. Just happy the lines are blurring more and more. :) 14:41
RaycatWhoDat ^ 14:42
Nim still needs to work out its UFCS bugs, unfortunately. 14:43
14:49 guifa2 left 15:32 sena_kun1 left 15:43 vrurg left 15:44 vrurg joined 15:49 vrurg left 16:10 m_athias joined, rbt left 16:11 rbt joined 16:14 Sgeo joined 16:15 rindolf left 16:17 vrurg joined, vrurg left 16:18 vrurg joined 16:21 Altai-man_ joined 16:24 sena_kun left 16:28 hungryd22 left 16:34 rindolf joined 16:35 RaycatWhoDat left
Geth_ doc: 7ce9570454 | (JJ Merelo)++ | doc/Language/packages.pod6
Clarifying how dynamic lookup works (or not) in regexen, refs #2632

And only 3 to go.
16:54
linkable6 Link: docs.raku.org/language/packages
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
17:24 vrurg left 17:25 vrurg joined 17:27 patrickb joined 17:30 vrurg left 17:33 MilkmanDan left 18:03 Benett- joined 18:06 vrurg joined 18:10 Tirifto left 18:11 vrurg left 18:16 Benett- left 18:21 sena_kun joined 18:23 Altai-man_ left 18:28 vrurg joined 18:30 __jrjsmrtn__ joined 18:31 _jrjsmrtn left 18:37 ensamvarg3 left 19:37 evalable6 left, linkable6 left 19:38 evalable6 joined 19:40 linkable6 joined 20:03 Petr37 joined 20:04 xfix left, kensanata joined 20:09 rindolf left 20:21 Altai-man_ joined 20:23 sena_kun left 20:37 kensanata left 20:39 wamba left 20:51 Petr37 left 20:52 patrickb left, vrurg left, Petr37 joined 20:54 Petr37_ joined, Petr37 left 20:56 Petr37_ left 21:03 molaf joined, yuplushi left 21:08 rbt left 21:09 rbt joined 21:15 yuplushi joined 21:18 vrurg joined 21:23 guifa joined 21:31 MilkmanDan joined 22:06 markoong joined 22:07 markong left 22:13 aborazmeh joined, aborazmeh left, aborazmeh joined 22:18 lainon joined
Geth_ doc: 0efd6a68ec | (Trey Harris)++ | doc/Language/containers.pod6
Add link from containers to ordered/unordered role docs

I was surprised just now when I noticed the Containers doc has no links to either "Lists, sequences and arrays" or "Sets, bags and mixes".
As a wayfinding problem, I don't see a better place for it than here ... (7 more lines)
22:20
linkable6 Link: docs.raku.org/language/containers
22:21 yuplushi left 22:22 sena_kun joined 22:24 Altai-man_ left 22:30 Petr37_ joined
cpan-raku New module released to CPAN! Hash2Class (0.0.1) by 03ELIZABETH 22:35
22:44 yuplushi joined 22:45 guifa left 22:49 markong joined, markoong left 22:51 Kaiepi left 22:53 yuplushi left
TreyHarris Hm... I was curious about Hash2Class ↑ but I'll be darned if I can find it on modules.raku.org or CPAN. I found it by going to github.com/lizmat/Hash2Class because I know lizmat's GitHub username, but if I hadn't, how would I find it? zef search doesn't know about it yet (I assume waiting on db percolation) either... 22:54
22:59 DarthGandalf left, Some-body_ joined 23:00 Some-body_ is now known as DarthGandalf
vrurg TreyHarris: the site is refreshing every 30mins, as I remember. 23:05
TreyHarris vrurg: ah, thanks
23:12 lainon left 23:16 Petr37_ left 23:22 guifa joined 23:32 hungrydonkey joined 23:37 probablymoony is now known as moony 23:39 lainon joined 23:43 lainon left, pecastro left 23:44 aborazmeh left 23:45 leont left 23:49 yuplushi joined 23:54 oddp left