[00:26] *** skyl4rk left
[00:27] *** skyl4rk joined
[00:29] *** wamba joined
[00:38] *** sena_kun left
[00:41] *** benjif joined
[00:43] *** finanalyst left
[00:44] <SmokeMachine> Did someone changed my post date or did I do something wrong?

[00:45] <tbrowder> Smoke

[00:47] *** stoned75 left
[00:47] <tbrowder> SmokeMachine: if it was scheduled for 21 Dec it's on time. time should be 0001 UTC. i show that as 47 minutes ago

[00:48] <tbrowder> good post, btw!

[00:49] <tbrowder> jmerelo has been shuffling articles a bit to cover no-shows...

[00:50] *** lucasb left
[00:51] <SmokeMachine> tbrowder: maybe that was that... I thought iy would be on 22nd... 

[00:51] <SmokeMachine> tbrowder: thanks!

[00:51] <SmokeMachine> :)

[00:52] <tbrowder> hm, 22?, 

[00:53] <SmokeMachine> yes... I hope I have not made something wrong...

[00:53] <tbrowder> haven't heard from jmerelo recently, but i'll see what schedule is now...

[00:54] *** sena_kun joined
[00:54] <tbrowder> planned schedule it on raku/raku-advent-2019

[00:56] <tbrowder> that schedule showd you on 21 dec, all is gut!

[00:57] <tbrowder> ff: in us english slang that's "fannie fatigue" or "finger fumble"

[00:59] *** mspo joined
[01:00] <tbrowder> SmokeMachine: in yr post there is one bad link...

[01:03] <tbrowder>  no bad link now, but i get flaky stuff from wordpress...don't  like it at all

[01:04] <SmokeMachine> tbrowder: great... thanks!

[01:05] <tbrowder> docs look nice

[01:06] <SmokeMachine> :)

[01:07] <tbrowder> ok, i found bad link, but not in advent post

[01:08] <tbrowder> i went to docs, beginner tutorial..

[01:09] <SmokeMachine> I think that really does not exist...

[01:09] <tbrowder> clicked on "Red architecture" link and got 404...

[01:10] <SmokeMachine> :(

[01:10] <tbrowder> what doesn't exist?

[01:12] <SmokeMachine> many tutorials/docs...

[01:13] <SmokeMachine> this is the only docs that exist: https://github.com/FCO/Red/tree/master/docs

[01:15] <tbrowder> well p,

[01:19] <tbrowder> i was talking about starting at the link in the advent post to "reading 'the documentation'" took me to "fco.github.io"

[01:20] <tbrowder> on that page is a link to "Beginner tutorial"

[01:22] <tbrowder> that link takes me to a page with a link to "Red architecture" which gives me a 404

[01:28] *** wamba left
[01:30] <SmokeMachine> that page is generated by that link I've sent you...

[01:31] <SmokeMachine> the "Red architecture" still does not exist... I have to fix that...

[01:39] <SmokeMachine> Red:api<2> was released! https://twitter.com/raku_cpan_new/status/1208198256271876096?s=20

[01:42] *** wamba joined
[01:43] *** wamba left
[01:44] *** gabiruh left
[01:57] <vrurg_> SmokeMachine++!!

[01:59] *** kalkin- joined
[02:01] <SmokeMachine> \o/

[02:03] *** kalkin left
[02:18] *** wildtrees left
[02:37] *** sena_kun left
[02:44] *** cpan-raku left
[02:45] *** cpan-raku joined
[02:45] *** cpan-raku left
[02:45] *** cpan-raku joined
[02:54] *** sena_kun joined
[03:08] *** no-n is now known as pony

[03:55] *** benjif left
[04:00] *** holyghost joined
[04:22] *** benjif joined
[04:39] *** sena_kun left
[04:54] *** sena_kun joined
[05:35] *** entonian joined
[06:18] *** AlexDaniel left
[06:18] *** cognomin_ joined
[06:21] *** cognominal left
[06:26] *** sauvin joined
[06:31] *** cognominal joined
[06:34] *** cognomin_ left
[06:38] *** sena_kun left
[06:53] *** sena_kun joined
[07:10] <guifa> jnthn: I just realized your advent day post went to the wrong calendar

[07:34] *** ricar joined
[07:38] *** benjif left
[07:47] *** RobRaku joined
[08:17] *** ricar left
[08:21] *** epony left
[08:21] *** xinming_ left
[08:22] *** xinming_ joined
[08:39] *** rindolf joined
[08:39] *** sena_kun left
[08:54] *** sena_kun joined
[09:22] *** jmerelo joined
[09:48] *** stoned75 joined
[09:52] *** epony joined
[09:52] *** stoned75 left
[09:54] *** stoned75 joined
[09:57] *** RobRaku left
[09:59] *** kalkin- left
[10:05] *** kalkin- joined
[10:06] <kalkin-> https://modules.raku.org/search/?q=slang+sql ← 0 results

[10:06] <kalkin-> zhttps://modules.raku.org/search/?q=slang ← Slang::SQL is first result

[10:08] *** chloekek joined
[10:09] *** Voldenet left
[10:12] *** cpan-raku left
[10:13] *** cpan-raku joined
[10:13] *** cpan-raku left
[10:13] *** cpan-raku joined
[10:13] *** mid_laptop joined
[10:19] <chloekek> I see there are some CPAN URLs in https://ecosystem-api.p6c.org/projects.json, does this make sense?

[10:21] *** mid_laptop left
[10:22] *** mid_laptop joined
[10:39] *** sena_kun left
[10:48] *** Voldenet joined
[10:48] *** Voldenet left
[10:48] *** Voldenet joined
[10:55] *** sena_kun joined
[11:19] <SmokeMachine> is there any public API that give me all raku modules published that depends on another specific module?

[11:20] <sena_kun> SmokeMachine: zef rdeps?

[11:20] <sena_kun> oops, *rdepends

[11:20] <SmokeMachine> sena_kun: I didn't know that, thanks!

[11:20] <jmerelo> SmokeMachine: p6-river also computes that, but just that.

[11:20] <sena_kun> zef rdepends Crypt::Random gives you some output

[11:21] <SmokeMachine> jmerelo: Hi! do you know if some one have changed the date of my post? I did I make something wrong?

[11:25] <chloekek> I’m a bit confused about #| POD.

[11:25] <chloekek> Can I have multiple lines of #| POD, or do I have to use #|( … ) in that case?

[11:26] <chloekek> And is it possible to attach normal POD, like =head1 … =cut, to a declaration instead of using #|?

[11:27] <SmokeMachine> jmerelo: https://www.irccloud.com/pastebin/k4bEQT06/

[11:28] *** wamba joined
[11:29] <jmerelo> SmokeMachine: if anyone did, it was me...

[11:29] <SmokeMachine> sena_kun: do you know if there is a way to make `zef rdepends` return only the most recent version of each module?

[11:29] <jmerelo> SmokeMachine: I rearranged posts to cover those that were missing and so on.

[11:30] <SmokeMachine> jmerelo: I'm just afraid I may have done something wrong...

[11:30] <jmerelo> SmokeMachine: please open an issue there. That should have worked...

[11:30] <jmerelo> SmokeMachine: why?

[11:30] <sena_kun> SmokeMachine: I am not sure, but you can do a raku one-liner

[11:31] <sena_kun> like .split, then .Version on the second piece, put into separate buckets using .categorize, then select first based on version, pretty print

[11:31] <SmokeMachine> jmerelo: my post was scheduled (or at least I think it was) for tomorrow, but it was published today...

[11:31] *** jmerelo left
[11:32] <chloekek> It seems that it is not possible to do any formatting within #| POD.

[11:33] <chloekek> Because Pod::Block::Declarator.leading returns Str.

[11:33] *** kensanata joined
[11:33] <chloekek> OTOH, when I want to document a declaration with =head1, then I must repeat the signature in the POD.

[11:38] <CIAvash> chloekek: Just saw your code from a few days ago, if you are interested, you can use hyperoperators there.

[11:38] <CIAvash> m: our constant @archive-extensions = <.tar.gz .tgz .zip>; my @rsync-includes := ‘*/’, “/id/*/*/*/Perl6/*” «~« |@archive-extensions ; say “--include=” «~« @rsync-includes;

[11:38] <camelia> rakudo-moar 672c5d403: OUTPUT: «(--include=*/ --include=/id/*/*/*/Perl6/*.tar.gz --include=/id/*/*/*/Perl6/*.tgz --include=/id/*/*/*/Perl6/*.zip)␤»

[11:38] <chloekek> Nice!

[11:56] <SmokeMachine> what makes more sense to create a test to verify if my new Red version has broken any of the modules that depends on that (only 2 currently), test the last version of each module or test every version?

[12:10] *** chloekek left
[12:12] <moritz> depends on your change/deprecation policy

[12:12] <moritz> but given the current maturity state of the ecosystem, I'd personally go with the latest version only

[12:16] <SmokeMachine> moritz: thanks

[12:24] *** kalkin- left
[12:24] <SmokeMachine> moritz: do you think this makes sense? https://github.com/FCO/Red/blob/master/.github/workflows/ecosystem.yml#L23

[12:32] *** chloekek joined
[12:37] <moritz> SmokeMachine: looks sensible

[12:38] *** sena_kun left
[12:40] *** finanalyst joined
[12:50] *** Altai-man joined
[12:51] *** Altai-man is now known as sena_kun

[12:55] *** cpan-raku left
[13:13] <tbrowder> .tell chloekek in the next release you should be able to have limited user formatting in the pod leading declarator blocks. i need to put that in the docs, but turning the handling on at the moment requires an environment variable to be set.

[13:13] <tellable6> tbrowder, I'll pass your message to chloekek

[13:13] *** dogbert11 joined
[13:13] *** benjif joined
[13:14] <chloekek> .tell tbrowder amazing!

[13:14] <tellable6> chloekek, I'll pass your message to tbrowder

[13:14] *** dogbert17 left
[13:15] <tbrowder> goal is to have an appropriate program option to turn it on but i haven't yet grokked option handling

[13:16] <tbrowder> you can try it out on the master branch. see pr

[13:16] <tbrowder> rakudo pr...

[13:18] <chloekek> Time to download 2964 tarballs with Raku distributions in them.

[13:22] <tbrowder> chloekek: sorry, i lied, pr was stalled because of so much delay for lsst release. i just got my dev setup built again yesterday. i'll try to get the pr ready soon.

[13:24] <tbrowder> in the meantime, if someone can point me to how to mod the raku program option handling...

[13:29] *** finanalyst left
[13:32] <sena_kun> releasable6, help

[13:32] <releasable6> sena_kun, status | status link # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Releasable

[13:34] <sena_kun> releasable6, changelog https://gist.github.com/Altai-man/ed7448686de7fc578a6cf859e7cfb951

[13:34] <releasable6> sena_kun, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.

[13:34] <sena_kun> releasable6 changelog https://gist.githubusercontent.com/Altai-man/ed7448686de7fc578a6cf859e7cfb951/raw/2b0a131d6997047fbe5c612b47910ee34e969d25/changelog-quick-test

[13:36] *** ufobat__ left
[13:36] <sena_kun> releasable6, status

[13:36] <releasable6> sena_kun, Next release in ≈5 hours. There are no known blockers. 0 out of 288 commits logged

[13:36] <releasable6> sena_kun, Details: https://gist.github.com/161b43f1280ee94aff250cacfb1eb676

[13:36] <sena_kun> hmm

[13:36] <sena_kun> releasable6, changelog https://gist.githubusercontent.com/Altai-man/ed7448686de7fc578a6cf859e7cfb951/raw/2b0a131d6997047fbe5c612b47910ee34e969d25/changelog-quick-test

[13:36] <releasable6> sena_kun, Successfully fetched the code from the provided URL

[13:36] <releasable6> sena_kun, Unknown changelog format

[13:36] *** kensanata left
[13:44] *** xinming_ left
[13:45] *** xinming_ joined
[13:45] <sena_kun> m: my $_ = 42; (-> { say $_ }).perl.say;

[13:46] <camelia> rakudo-moar 672c5d403: OUTPUT: «Potential difficulties:␤    Redeclaration of symbol '$_'␤    at <tmp>:1␤    ------> 3my $_7⏏5 = 42; (-> { say $_ }).perl.say;␤->  { #`(Block|62375016) ... }␤»

[13:58] *** lucasb joined
[14:07] *** patrickb joined
[14:10] *** kotrcka joined
[14:13] *** patrickb left
[14:29] <AlexDaniel`> sena_kun: it needs a full file

[14:30] <AlexDaniel`> sena_kun: but it knows how to parse the wiki

[14:30] <AlexDaniel`> so editing https://github.com/rakudo/rakudo/wiki/ChangeLog-Draft is enough for the bot

[14:33] <sena_kun> AlexDaniel`, I have another question: in releasable unreviewed commits I see some commits older than the release, e.g. https://github.com/rakudo/rakudo/commit/e7c20386cfc0f681d15442ff4ec80d22c6a2c904 is Nov 5, but the release was Nov 26. what am I missing?

[14:34] <AlexDaniel`> branch merge?

[14:34] <AlexDaniel`> it's not older than the release

[14:34] <AlexDaniel`>      master (#3280) 

[14:34] <AlexDaniel`> it's on master but not on any tag, so it's a new commit

[14:34] <AlexDaniel`> releasable is right

[14:34] <sena_kun> d'oh

[14:35] <sena_kun> I am dummy, didn't see the PR link

[14:35] <sena_kun> sorry

[14:36] *** wamba left
[14:37] *** Altai-man_ joined
[14:39] *** sena_kun left
[14:48] *** wamba joined
[14:53] <tbrowder> need module distro help please: given installed modules  Foo and Bar when in a script using them, how do i access a file in %*RESOURCES for Foo as opposed to Bar when they have the same name? i have to go but please .tell me. thnx.

[15:00] *** RobRaku joined
[15:07] *** RobRaku left
[15:14] *** dogbert11 left
[15:15] *** dogbert11 joined
[15:18] *** cpan-raku joined
[15:18] *** cpan-raku left
[15:18] *** cpan-raku joined
[15:19] *** RobRaku joined
[15:20] <tyil> didn't even know you could access the %*RESOURCES of module outside of the module that ships them

[15:23] *** dogbert11 left
[15:24] *** dogbert11 joined
[15:25] *** RobRaku left
[15:26] *** RobRaku joined
[15:30] *** RobRaku left
[15:38] <Kaiepi> greppable6, Supply.migrate

[15:38] <greppable6> Kaiepi, 1 line, 1 module: https://gist.github.com/bfd5d626b812166f9bcb94d4a58e601a

[15:38] <Kaiepi> greppable6, .migrate

[15:38] <greppable6> Kaiepi, 28 lines, 10 modules: https://gist.github.com/4f6d3c03531c15a4551516c007b67cf4

[15:40] *** RobRaku joined
[15:45] *** RobRaku left
[15:47] *** RobRaku joined
[15:54] *** RobRaku left
[16:05] <uzl[m]> chloekek: Re #| POD: You can have multiple lines of #| for the multiline comments, just like #| with bracketing characters. I just wish multiline comments weren't formatted into a single line (For instance, newlines are all removed). And you're right, not POD formatting within a declarator block.

[16:09] <Altai-man_> lizmat, ping?

[16:09] <lizmat> pong

[16:10] <Altai-man_> lizmat, hi! can you please explain what https://github.com/rakudo/rakudo/pull/3280 does, if it is user-observable?

[16:10] <Altai-man_> I played with .perl method on different chunks of code dancing around parameters, but couldn't spot any difference

[16:11] <lizmat> m: dd ({ ... }).signature

[16:11] <camelia> rakudo-moar 672c5d403: OUTPUT: «:(;; $_ is raw = OUTER::<$_>)␤»

[16:11] <lizmat> that's the only case now where the $_ is the same as the $_ of the outer context

[16:12] <lizmat> m: dd (sub { ... }).signature

[16:12] <camelia> rakudo-moar 672c5d403: OUTPUT: «:()␤»

[16:12] <lizmat> m: dd (-> $_ { ... }).signature

[16:12] <camelia> rakudo-moar 672c5d403: OUTPUT: «:($_)␤»

[16:12] <lizmat> m: dd (-> ;; $_ is raw { ... }).signature

[16:12] <camelia> rakudo-moar 672c5d403: OUTPUT: «:(;; $_ is raw)␤»

[16:12] <lizmat> Altai-man_: does that explain it to you ?

[16:14] <Altai-man_> thanks! I am logging it as "Made `.perl` method call on signature of {...} display `$_` variable from outer scope"

[16:14] <lizmat> Altai-man_ ++

[16:19] <Altai-man_> m: say $*RAKU

[16:19] <camelia> rakudo-moar 672c5d403: OUTPUT: «Perl 6 (6.d)␤»

[16:27] *** lucasb left
[16:29] <lizmat> yeah, that still needs to be taken care of

[16:29] <lizmat> as many other internal things

[16:29] <Altai-man_> lizmat, https://github.com/rakudo/rakudo/blob/master/src/core.c/ForeignCode.pm6#L39 <- do we have tests for that? It doesn't work for me with `Cannot assign to an immutable value` and looking at the code I understand why: the named param is immutable

[16:29] <Altai-man_> we can either mark the parameter as is copy or do some other trick

[16:30] <lizmat> I'll mark it as "is copy"

[16:30] <Altai-man_> lizmat++

[16:30] * Altai-man_ .oO ( maybe I should've done that to gain some commits to rakudo )

[16:31] <lizmat> Altai-man_: if you want, please do  :-)

[16:31] <lizmat> since I put in the hack, which was not complete, I felt responsible to fix it

[16:31] <lizmat> but if you want to do it, by all means!

[16:37] *** sena_kun joined
[16:39] *** kensanata joined
[16:39] *** Altai-man_ left
[16:39] <sena_kun> heh, this modem connection is truly, truly irredeemable...

[16:40] <lizmat> seems we lost Geth again ??

[16:40] <lizmat> pinging tyil 

[16:44] <moritz> a new instance of geth has a too long gethation period :D

[16:45] *** dogbert17 joined
[16:46] *** kotrcka left
[16:48] *** dogbert11 left
[17:15] <guifa> uzl[m] & chloekek: adding in the newlines was tbrowder’s work IIRC, so it should be available soon.

[17:47] *** wildtrees joined
[17:48] *** wildtrees left
[17:48] *** wildtrees joined
[17:49] <sena_kun> lizmat, does https://github.com/rakudo/rakudo/commit/a51268a198c48ce96e594883874dbb920d86d41a count as an optimization?

[17:51] *** wildtrees left
[17:52] *** gabiruh joined
[17:57] *** sena_kun left
[17:58] *** sena_kun joined
[18:03] *** sena_kun left
[18:04] *** sena_kun joined
[18:24] <tbrowder> tyil: and i'm not sure you can either, but if you can't i don't see the utility of them unless during installation they can get placed somewhere.

[18:28] *** wildtrees joined
[18:31] <tbrowder> hm, wonder if something like this would work: in module Foo define a sub that grabs a %?RESOURCES file and spurts it to a user-defined path which is input to the sub? trying that...

[18:35] <tyil> geth is up

[18:35] <tyil> geth is in this very channel

[18:36] <guifa> Am I crazy to make a module that just provides an exception sub class and nothing else?  

[18:37] <guifa> unit module Intl::Exception; class X::Intl is Exception { }; # nothing else lol

[18:38] <guifa> (otherwise I’m not sure how catching on just X::Intl would be if multiple modules all define it)

[18:40] <tyil> lizmat: is the webhook showing an error in github?

[18:40] <tyil> for geth?

[18:46] <tyil> I'll restart it either way for good measure, but the bot itself is connected to irc just as I would expect

[18:46] *** Geth_ joined
[18:46] *** Geth left
[18:57] *** Altai-man_ joined
[18:58] *** sena_kun left
[19:18] *** Altai-man_ left
[19:19] *** sena_kun joined
[19:31] <chloekek> .tell jmerelo I collected (and automated the collection of) a bunch of data about packages including historic versions, maybe this can be used to improve package discovery and reproducible builds. For each version: tarball URL, tarball hash, META6.json info.

[19:31] <tellable6> chloekek, I'll pass your message to jmerelo

[19:49] <tbrowder> ok, my theory on extracting a resource from %?RESOURCES worked, hooray!!

[19:56] *** wamba left
[20:13] *** mid_laptop left
[20:20] <SmokeMachine> tbrowder: how?

[20:21] <tbrowder> ah, you'll have to wait until advent day 23 to see!   ;-D

[20:24] <SmokeMachine> :)

[20:40] *** finanalyst joined
[20:43] *** xi left
[20:45] *** xi joined
[21:18] *** gabiruh left
[21:20] *** Altai-man_ joined
[21:23] *** sena_kun left
[21:23] *** vividsnow left
[21:29] <Geth_> ¦ advent: e0e8845685 | (Tom Browder)++ (committed using GitHub Web editor) | raku-advent-2020/schedule

[21:29] <Geth_> ¦ advent: take the first slot

[21:29] <Geth_> ¦ advent: review: https://github.com/Raku/advent/commit/e0e8845685

[21:33] <moritz> tbrowder: wow, you're early on this one :D

[21:33] <tbrowder> well, you know, to beat the rush ;-D

[21:40] <guifa> haha wow

[21:41] <chloekek> p6: my $query := ‘foo % bar _ baz \ lol’; say S:g/(<[%_\\]>)/\\$0/ given $query;

[21:41] <camelia> rakudo-moar 672c5d403: OUTPUT: «foo \% bar \_ baz \\ lol␤»

[21:57] *** kensanata left
[21:57] <chloekek> p6: class C { has Str $x; }; my %h = x => Any; C.new(|%h);

[21:57] <camelia> rakudo-moar 672c5d403: ( no output )

[21:58] <chloekek> p6: class C { has Str $.x; }; my %h = x => Any; C.new(|%h);

[21:58] <camelia> rakudo-moar 672c5d403: OUTPUT: «Type check failed in assignment to $!x; expected Str but got Any (Any)␤  in block <unit> at <tmp> line 1␤␤»

[21:58] <chloekek> This is a bummer.

[21:58] <chloekek> I guess I can remove undefined entries from the hash.

[21:59] <chloekek> p6: class C { has Str $.x; }; my %h = x => Nil; C.new(|%h.pairs.grep(*.value.defined));

[21:59] <camelia> rakudo-moar 672c5d403: ( no output )

[22:01] <chloekek> p6: class C { has Str $.x; has Str $.y; }; my %h = x => Nil, y => 'a'; C.new(|%h.pairs.grep(*.value.defined));

[22:01] <camelia> rakudo-moar 672c5d403: OUTPUT: «Default constructor for 'C' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»

[22:05] <Geth_> ¦ doc: 52d05f7ea2 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/variables.pod6

[22:05] <Geth_> ¦ doc: Tidy grammar and spelling

[22:05] <Geth_> ¦ doc: review: https://github.com/Raku/doc/commit/52d05f7ea2

[22:08] <chloekek> p6: (|{a => 1, b => Nil}).perl.say

[22:08] <camelia> rakudo-moar 672c5d403: OUTPUT: «slip(:b(Any), :a(1))␤»

[22:08] <chloekek> p6: (|{a => 1, b => Nil}.pairs).perl.say

[22:08] <camelia> rakudo-moar 672c5d403: OUTPUT: «slip(:b(Any), :a(1))␤»

[22:09] <chloekek> p6: (|{a => 1, b => Nil}.pairs.grep(*.value.defined)).perl.say

[22:09] <camelia> rakudo-moar 672c5d403: OUTPUT: «slip(:a(1),)␤»

[22:09] <chloekek> p6: (|{a => 1}).perl.say

[22:09] <camelia> rakudo-moar 672c5d403: OUTPUT: «slip(:a(1),)␤»

[22:09] <chloekek> :|

[22:11] <chloekek> p6: (\(|{a => 1})).perl.say

[22:11] <camelia> rakudo-moar 672c5d403: OUTPUT: «\(:a(1))␤»

[22:11] <chloekek> p6: (\(|{a => 1, b => Nil}.pairs.grep(*.value.defined))).perl.say

[22:11] <camelia> rakudo-moar 672c5d403: OUTPUT: «\(:a(1))␤»

[22:12] <chloekek> p6: class C { has Str $.x; }; my %h = x => Nil; C.new(|\(|%h.pairs.grep(*.value.defined)));

[22:12] <camelia> rakudo-moar 672c5d403: ( no output )

[22:12] <chloekek> Ok that’s rather silly.

[22:21] *** kensanata joined
[22:29] <moritz> p6: class C { has Str $.x; }; my %h = x => Nil; C.new(|%h.pairs.grep(*.value.defined).hash)).perl.say

[22:29] <camelia> rakudo-moar 672c5d403: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3ew(|%h.pairs.grep(*.value.defined).hash)7⏏5).perl.say␤»

[22:29] <moritz> p6: class C { has Str $.x; }; my %h = x => Nil; C.new(|%h.pairs.grep(*.value.defined).hash).perl.say

[22:29] <camelia> rakudo-moar 672c5d403: OUTPUT: «C.new(x => Str)␤»

[22:31] <chloekek> p6: my $s := |{a => 1, b => Nil}.pairs.grep(*.value.defined); class C { has Int $.a; has Int $.b }; C.new($s)

[22:31] <camelia> rakudo-moar 672c5d403: OUTPUT: «Default constructor for 'C' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»

[22:31] <chloekek> p6: my $s := |{a => 1, b => Nil}.pairs.grep(*.value.defined); class C { has Int $.a; has Int $.b }; C.new(|$s)

[22:31] <camelia> rakudo-moar 672c5d403: OUTPUT: «Default constructor for 'C' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»

[22:31] <chloekek> It seems that | is not slip if it is in an argument lst.

[22:31] <chloekek> list*

[22:32] <chloekek> p6: my $s := |{a => 1, b => Nil}; class C { has Int $.a; has Int $.b }; C.new($s)

[22:32] <guifa> | has a different function in argument lists

[22:32] <camelia> rakudo-moar 672c5d403: OUTPUT: «Default constructor for 'C' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»

[22:32] <guifa> it defines a capture

[22:32] <chloekek> p6: class C { has Str $.x; }; my %h = x => Nil; C.new(|\(|%h.pairs.grep(*.value.defined)));

[22:32] <camelia> rakudo-moar 672c5d403: ( no output )

[22:32] <chloekek> Then why does this not fail?

[22:34] <guifa> Err, sorry I meant to say | is different in parameters, it’s fine in arguments.  The reason it doesn’t fail is that is that you haven’t forced $.x to be defined

[22:34] <guifa> If you output C you’ll see what happens:

[22:35] <guifa> p6: class C { has Str $.x; }; my %h = x => Nil; say C.new(|\(|%h.pairs.grep(*.value.defined)));

[22:35] <camelia> rakudo-moar 672c5d403: OUTPUT: «C.new(x => Str)␤»

[22:35] <guifa> The value of $.x is Str — an undefined type object

[22:35] <guifa> p6: class C { has Str:D $.x; }; my %h = x => Nil; say C.new(|\(|%h.pairs.grep(*.value.defined)));

[22:35] <camelia> rakudo-moar 672c5d403: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Str:D requires an initializer␤at <tmp>:1␤------> 3class C { has Str:D $.x7⏏5; }; my %h = x => Nil; say C.new(|\(|%h.␤    expecting any of:␤        constraint␤»

[22:36] <guifa> Notice the addition of the smiley constraint :D after Str — it says that $.x has to be not just a Str, but a defined Str

[22:36] <guifa> and so it errors

[22:36] <guifa> I’m actually writing a little doc on that topic right now 

[22:36] <chloekek> I mean, why doesn’t it fail with the error Default constructor for 'C' only takes named arguments?

[22:38] <guifa> Named arguments are by default optional and you don’t have to provide for all of them, and you can even provide extra ones without problem.  Positional arguments are by default required and passing more or less than expect causes problems.

[22:38] *** pilne left
[22:39] <guifa> since you didn’t overload new(), it goes with the default one

[22:39] *** pilne joined
[22:41] <guifa> and the default new() only takes named arguments (its signature is *%args, IIRC)

[23:03] *** rindolf left
[23:08] *** kensanata left
[23:21] *** sena_kun joined
[23:23] *** Altai-man_ left
[23:29] <chloekek> p6: my %h = 'a' => Str; (%h<a> //= '') .= split(','); say %h<a>.perl

[23:29] <camelia> rakudo-moar 672c5d403: OUTPUT: «$(("",).Seq)␤»

[23:29] <chloekek> p6: my %h = 'a' => Str; %h<a> //= '' .= split(','); say %h<a>.perl

[23:29] <camelia> rakudo-moar 672c5d403: OUTPUT: «Cannot modify an immutable Str ()␤  in block <unit> at <tmp> line 1␤␤»

[23:31] <chloekek> p6: my %h = 'a' => Str; (%h<a> //= '') .= split(',').cache; say %h<a>.perl

[23:31] <camelia> rakudo-moar 672c5d403: OUTPUT: «$(("",).Seq)␤»

[23:32] <chloekek> p6: my %h = 'a' => Str; (%h<a> //= '') = <a b c>; say %h<a>.perl

[23:33] <camelia> rakudo-moar 672c5d403: OUTPUT: «$("a", "b", "c")␤»

[23:33] <chloekek> Oh I am so confused.

[23:33] <chloekek> Lists and sequences and arrays are so complicated compared to Perl 5.

[23:35] <tobs> They are. In this case I would expect (%h<a> //= '') to assign '' but still return the Scalar container for the key "a" in %h, which then gets assigned the list (itemized).

[23:35] <chloekek> p6: my %h = 'a' => Str; (%h<a> //= '') := <a b c>; say %h<a>.perl

[23:35] <camelia> rakudo-moar 672c5d403: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3 = 'a' => Str; (%h<a> //= '') := <a b c>7⏏5; say %h<a>.perl␤»

[23:35] <chloekek> p6: my %h = 'a' => Str; %h<a> //= ''; %h<a> := <a b c>; say %h<a>.perl

[23:35] <camelia> rakudo-moar 672c5d403: OUTPUT: «("a", "b", "c")␤»

[23:36] <chloekek> It would be easier if scalar container introduction was explicit.

[23:36] <chloekek> Would be nice to have a pragma for that.

[23:36] <chloekek> p6: my %h = 'a' => Str; %h<a> //= ''; %h<a> := $(<a b c>); say %h<a>.perl

[23:36] <camelia> rakudo-moar 672c5d403: OUTPUT: «$("a", "b", "c")␤»

[23:41] <tobs> I think the idea is that for a user, a Hash is just a Map with implicit containers in every slot. The Scalar containers are what enables mutability of Hash over Map.

[23:45] *** kalkin- joined
[23:48] <chloekek> Ah, I don’t have to mutate the hash, since I’m spurting it into an argument list and I can supply an override afterwards.

[23:48] <chloekek> my @meta-tags = split(‘,’, %^r<meta-tags> // ‘’).grep(?*).sort; SearchResult.new(|%^r, :@meta-tags);

[23:55] *** finanalyst left
[23:56] *** EuAndreh[m] joined
