[00:12] *** wamba left [00:25] *** aborazmeh joined [00:25] *** aborazmeh left [00:25] *** aborazmeh joined [00:38] *** cpan-raku left [00:39] *** cpan-raku joined [00:39] *** cpan-raku left [00:39] *** cpan-raku joined [00:40] *** markoong left [00:53] tony-o: your addendum doesn't say how cpan does not support ver/auth/api. [01:01] also, i still don't get the point of api - feels like a misfeature [01:07] *** maggotbrain left [01:08] *** maggotbrain joined [01:12] *** maggotbrain left [01:13] *** Altai-man_ joined [01:14] *** maggotbrain joined [01:15] *** sena_kun left [01:18] .tell jmerelo I have the Superposition article posted. Scheduled it for the 8th, but feel free to change it to someone else, didn't see if anyone else was scheduled [01:18] guifa2, I'll pass your message to JJMerelo [01:36] *** guifa2 left [01:37] *** guifa2 joined [01:42] *** aborazmeh left [01:47] *** molaf left [02:00] *** molaf joined [02:22] I can see Raku being hit by the Lisp Curse pretty badly. Just while working on a simple CLI, I ran into some limitations of the built-in arg-parsing (not providing helpful error messages for incorrect options). Since Raku is so powerful, I wrote my own argument handling code which, in a dozen or so lines, is 60% of the way to being an arg parsing library [02:23] And there's a decent chance that it will *stay* 60% of a library, and never grow into a real one [02:27] *** gnufr33dom joined [02:33] *** clarjon1 joined [02:36] *** lucasb left [03:36] *** quotable6 left [03:36] *** nativecallable6 left [03:36] *** coverable6 left [03:36] *** tellable6 left [03:36] *** shareable6 left [03:36] *** linkable6 left [03:36] *** bisectable6 left [03:36] *** releasable6 left [03:36] *** greppable6 left [03:36] *** benchable6 left [03:36] *** unicodable6 left [03:36] *** evalable6 left [03:36] *** bloatable6 left [03:36] *** statisfiable6 left [03:36] *** reportable6 left [03:36] *** committable6 left [03:36] *** sourceable6 left [03:36] *** notable6 left [03:36] *** squashable6 left [03:36] *** evalable6 joined [03:36] *** benchable6 joined [03:36] *** unicodable6 joined [03:37] *** bisectable6 joined [03:37] *** statisfiable6 joined [03:37] *** greppable6 joined [03:37] *** squashable6 joined [03:37] *** sourceable6 joined [03:37] *** reportable6 joined [03:38] *** bloatable6 joined [03:38] *** quotable6 joined [03:38] *** committable6 joined [03:38] *** nativecallable6 joined [03:38] *** coverable6 joined [03:38] *** linkable6 joined [03:38] *** tellable6 joined [03:38] *** notable6 joined [03:38] *** releasable6 joined [03:39] *** shareable6 joined [03:59] *** marcusr left [04:00] *** marcusr joined [04:01] *** Sgeo left [04:03] *** Sgeo joined [04:07] *** Sgeo left [04:11] *** Sgeo joined [04:14] *** sena_kun joined [04:16] *** Altai-man_ left [04:22] *** dataangel left [04:24] *** xinming joined [04:27] *** dataangel joined [04:29] jdv79: cpan won't index File::Temp from two different pause users with the same version [04:30] you can test that by downloading a File::Temp and uploading it to the appropriate directory and waiting to get an email letting you know it couldn't index [04:31] the "api" is basically handling the features of pause, indexing/filing into appropriate places a package manager should look/authenticating so it's not just a trash heap of tar files [04:33] *** Kaeipi left [04:33] *** Kaeipi joined [04:39] *** ab5tract left [04:43] *** zacts left [05:14] *** bocaneri joined [05:15] *** ab5tract joined [05:41] *** zacts joined [05:43] tony-o: I don't think that used to be true but in any case it shouldn't be true. for instance, there are 2 JSON::Tiny dists from 2 different users in the p6-dists index. if its broken, it just needs to be fixed. [06:09] *** Kaeipi left [06:10] *** Kaiepi joined [06:10] *** ab5tract_ joined [06:11] *** ab5tract_ left [06:12] *** ab5tract_ joined [06:14] *** Altai-man_ joined [06:16] *** sena_kun left [06:30] *** skids left [06:40] *** ufobat joined [06:50] *** kensanata joined [06:54] *** andrzejku joined [07:01] *** grumble left [07:02] *** grumble joined [07:07] *** leont joined [07:23] *** patrickb joined [07:35] *** ufobat left [07:40] *** fluca1978 joined [07:42] is there a way to get operators from an object using MOP? Something like .^methods ? [07:43] if by operators you mean methods, then yes :D [07:55] fluca1978, you can use `$obj.^can($method)` to do duck typing [07:56] as moritz++ points out, operators are "subroutines with funny names" so they don't really fit into a "get them from an object" kind of concept [07:57] moritz: this is not working Array.^methods.grep: { .name ~~ '[]' } [07:58] I suspect that, as ab5tract says, the method has a different name like `postfix` something [07:58] fluca1978, you are calling it on the class, [07:58] try on an instance [07:59] ab5tract: Array.new.^methods.grep: { .name ~~ '[]' } is not working too, there is something different with the names [08:00] I don't know that Array has any method of that name. if it is implemented in a manner that matches userspace, the [] syntax is provided by defining `GET-POS/SET-POS` [08:01] m: say Array.new.^methods.grep: *.name ~~ 'GET-POS' [08:01] rakudo-moar d4bac47ff: OUTPUT: «WhateverCode object coerced to string (please use .gist or .raku to do that)␤ in block at line 1␤Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block at line 1␤␤» [08:01] m: say Array.new.^methods [08:01] rakudo-moar d4bac47ff: OUTPUT: «(iterator from-iterator from-list new STORE reification-target Method+{is-nodal}.new Method+{is-nodal}.new shape Method+{is-nodal}.new Method+{is-nodal}.new grab name of default dynamic clone Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-noda…» [08:01] so we aren't giving it the right question [08:02] m: say Array.^methods ~~ Array.new.^methods [08:02] rakudo-moar d4bac47ff: OUTPUT: «False␤» [08:02] m: say Array.^methods [08:02] rakudo-moar d4bac47ff: OUTPUT: «(iterator from-iterator from-list new STORE reification-target Method+{is-nodal}.new Method+{is-nodal}.new shape Method+{is-nodal}.new Method+{is-nodal}.new grab name of default dynamic clone Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-noda…» [08:03] so the instance isn't necessary but there cane be differences between the available methods between the class object an object instance of the class [08:03] m: say (Array.^methods (-) Any.^methods) [08:03] rakudo-moar d4bac47ff: OUTPUT: «Set(ACCEPTS ASSIGN-POS BIND-POS BIND-POS BUILDALL Bool CALL-ME Capture FLATTENABLE_HASH FLATTENABLE_LIST Int Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is…» [08:04] m: say (Array.^methods (-) Any.^methods (-) Iterable.^methods) [08:04] rakudo-moar d4bac47ff: OUTPUT: «Set(ACCEPTS ASSIGN-POS BIND-POS BIND-POS BUILDALL Bool CALL-ME Capture FLATTENABLE_HASH FLATTENABLE_LIST Int Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is…» [08:05] fluca1978, does that help explain it a bit? [08:05] m: say (Array.^methods (^) Iterable.^methods) [08:05] rakudo-moar d4bac47ff: OUTPUT: «Set(ACCEPTS ASSIGN-POS BIND-POS BIND-POS BUILDALL Bool CALL-ME Capture FLATTENABLE_HASH FLATTENABLE_LIST Int Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new Method+{is…» [08:05] m: say (Array.^methods (^) Nodal.^methods) [08:05] rakudo-moar d4bac47ff: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared name:␤ Nodal used at line 1␤␤» [08:06] m: say (Array.^methods (^) Node.^methods) [08:06] rakudo-moar d4bac47ff: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared name:␤ Node used at line 1. Did you mean 'Code'?␤␤» [08:06] anyway, enough of me poking at poor camelia :) [08:07] ab5tract: thanks, I need to reason about it [08:10] m: Array.new.^can('BIND-POS').say; say Array.new.^methods.grep: { .name ~~ 'BIND-POS' } [08:10] rakudo-moar d4bac47ff: OUTPUT: «(BIND-POS BIND-POS BIND-POS)␤(BIND-POS BIND-POS)␤» [08:11] ^^ fluca1978 I can't explain that one :( ... maybe moritz or another core dev has an idea though [08:12] Ahh, are those just multi method targets? so the can also includes the proto but the grep doesn't? or..? [08:12] Wasn't expecting a list of methods in either case, to be honest [08:13] ab5tract: a multi method, may be? [08:14] m: my @a = ^10; my &look = @a.^can('GET-POS'); dd &look; @a.&look(4).say [08:14] rakudo-moar d4bac47ff: OUTPUT: «Type check failed in assignment to &look; expected Callable but got List (())␤ in block at line 1␤␤» [08:15] well that's a weird little corner I haven't gotten myself into before :( [08:15] I guess one is meant to go digging into signatures to find the right one? [08:18] *** JJMerelo joined [08:28] *** molaf left [08:34] *** Black_Ribbon left [08:40] *** JJMerelo left [08:42] *** wamba joined [09:07] ab5tract: what I discovered is that the method to access and element seems to be AT-POS, by Positional. The fact is that it is not printed out (seems to be hidden): .say for Array.^methods.sort: *.name cmp *.name; [09:07] while this is working fine: @array.AT-POS( 2 ); [09:11] lo #rqku [09:11] lo #raku [09:13] *** JJMerelo joined [09:13] ah, of course. silly brain fart had me thinking GET-POS. [09:14] fluca1978, what I can say with some certainty is that there are a few corners of the MOP where things are still not at the capabilities that we eventually expect [09:14] *** sena_kun joined [09:14] IIRC there is no way for monkey patching a parent class to have an impact on descendant classes [09:15] (as an example) [09:15] *** Sgeo left [09:15] o/ El_Che [09:16] OO is overrated :) [09:16] *** Altai-man_ left [09:18] *** rindolf joined [09:31] ¦ advent: 780226cb38 | L'Alabameñu++ (committed using GitHub Web editor) | 20th/articles/rfc223.md [09:31] ¦ advent: Create RFC233 [09:31] ¦ advent: review: https://github.com/Raku/advent/commit/780226cb38 [09:31] ¦ advent: 1540ff5f07 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 20th/articles/rfc223.md [09:31] ¦ advent: Merge pull request #57 from alabamenhu/patch-3 [09:31] ¦ advent: [09:31] ¦ advent: Create RFC233 [09:31] ¦ advent: review: https://github.com/Raku/advent/commit/1540ff5f07 [09:47] *** clarjon1 left [09:50] codesections: ref arg parsing have you looked at leont's Getopt::Long? [09:55] *** markoong joined [09:56] *** clarjon1 joined [09:59] *** JJMerelo left [10:00] *** markong joined [10:00] *** markoong left [10:01] *** clarjon1 left [10:02] I don't know the question, but I'd always recommend Getopt:Long ;-) [10:02] *** clarjon1 joined [10:10] *** marcusr left [10:10] *** marcusr joined [10:26] *** oddp joined [10:27] *** shlomif joined [10:28] *** rindolf left [10:28] *** shlomif is now known as rindolf [10:35] Late to the party, but thanks again for yet another weekly! [10:36] Oh, yeah, wanted to ask: do we have something more idiomatic than grep in conjunction with the flip-flop operator for something like {drop,skip}_while in other langs? [10:36] I'm curious: why hash has some adverbs instead of methods? %hash:exists instead of %hash.exists( )? I think because it could be a little easier for slicing, but I cannot see the real advantage. [10:38] fluca1978: does that help? https://perl6advent.wordpress.com/2013/12/12/day-12-slicing-with-adverbs-the-only-way/ [10:39] Also check the comments below the article.\ [10:40] oddp: I'm reading [10:43] fluca1978: Various reasons, including array and hash subscripts being parsed differently from argument lists, but also because the indexers are operators, and the slicing semantics are part of the current language rather than part of the object's semantics (an indexable object only has to provide the semantics for getting/checking for existence of/deleting a single element). [10:54] jnthn: thanks, I was just realizing it while reading your comment. [10:58] jnthn: anyway I still don't understand why %hash.AT-KEY( , exists => True ) is returning the value and not a boolean, being the adverb a "method argument" to an accessor I would expect it to perform as %hash:exists [10:59] fluca1978: You have to call .EXISTS-KEY; the exists adverb there is just being ignored [11:00] jnthn: thanks [11:11] *** pecastro joined [11:14] *** Altai-man_ joined [11:16] *** sena_kun left [11:21] leont: codesections mentioned problems with param parsing and rolling his/her own [11:22] yours looks like something to start with instead [11:24] *** ab5tract left [11:24] *** ab5tract_ left [11:28] *** kensanata left [11:31] tbrowder, that looks like a good module :) It's not a good fit for what I'm doing right now for a couple of reasons. First, I misspoke – I'm not really augmenting Raku's argument *parsing* so much help text generation, which is slightly outside Getopt::Long's purview (I think) [11:32] Second, and more importantly, for this project I'm not using external modules (for … reasons) [11:33] codesections: i'm working on a wrapper for that to auto generate stuff for my CLI use. that will use my Abbreviations module as a helper [11:35] *** pecastro left [11:36] my idea is to provide a hash keyed by leont's option specifier whose value is the help string. the options get autoalised with Abbreviations [11:36] *aliased [11:37] tbrowder: yeah, that's what I do, but I need to fix a few bugsd [11:37] wrapper name at the moment is Opt::Handler [11:38] El_Che: is it published? [11:38] That seems a bit fancier than I'm being. I'm just grouping CLI commands into ARGS, FLAGS, and OPTIONS, printing their WHY, and printing their default value (if any) [11:38] https://github.com/nxadm/SuperMAIN [11:39] was on holiday, so I didn't had the time to fix stuff [11:39] Unrelated question: there isn't any way to introspect into a subset, is there? [11:39] codesections sent great bug reports [11:39] the '='bug is probably a 1 line change :) [11:40] oh yeah, my only prob with yrs is it uses MAIN which i stay away from [11:40] What do you dislike about MAIN? [11:40] lol, MAIN was what I wanted to keep specifically [11:41] requirements vary of course [11:41] i can't get any support for line wrapping for one thing [11:41] You mean based on terminal width? [11:41] and my style of CLI is really baked in [11:41] yes [11:42] I love the idea of a built-in capable MAIN [11:43] but the capabilities are just very slightly lacking for my use case [11:43] for something more advanced, you can always reach for sonething more advanced, like leont's modules [11:43] tbrowder, how are you detecting the terminal width, by the way? [11:43] i've played with Raku's a bit but i like mine better. after i figured out leont's capture handling i think my opt::handler will be a viable alternative [11:44] tbrowder: it could be interesting indeed [11:45] i don't. i use gnu's guidance on 70 or so characters and either manually wrap or use my Text::Utils line wrapper. [11:46] Oh, well in that case, what about MAIN prevents line wrapping? [11:46] as an example of what bugs me, look at Documentable's help [11:46] I'm using MAIN and wrapping text in USAGE [11:49] well that's one of the strengths of raku isn't it. something like: do it my way or take the highway! ;-D [11:49] :D [11:50] Yep! Though it can also be a weakness – which is what got me thinking about the Lisp Curse angle [11:50] i'm too set in my ways to learn everything all over again [11:50] yep. [11:50] Oh, yeah, I wouldn't like lines like `documentable --help` has. But that's easy to fix with USAGE [11:52] my prob is the rabbit hole effect. my current rabbit started out as a pdf check writing project....and there i go hopping down the bunny trail [11:53] how [11:53] i''k [11:54] Ha. That reminds me of the judge I used to clerk for. He was always telling us to stay on the trail of the big 'coon, not to go down rabbit trails [11:54] i'll have to look at it again, but leont's option specs are really powerful for my needs [11:56] yak shaving to the recue [11:56] does anyone here use mi6. i just started and can't get my second release. [11:57] because it doesn't like my Changes or version or something. [11:58] it's very useful but lite on help [11:58] got to go. bye [12:07] *** zacts left [12:29] *** wamba left [12:37] back. can anyone help me with an mi6 release problem? [12:56] Wish I could, but I haven't yet used mi6 [13:06] the first release i did went pretty well, but the second is wedged. i'm trying to take good notes and file issues, but the overall process does ease a release (just not yet well documented). [13:19] *** skids joined [13:36] *** kensanata joined [13:42] *** MasterDuke joined [13:56] What is wrong with this regex? It is taking forever to run and I'm sure it should be a pretty quick thing. [13:56] $_ = 'This is my test string, for testing purposes.'; say m/ test /; [13:56] rypervenche, rakudo-moar d4bac47ff: OUTPUT: «「test」␤» [13:58] Hmmm.. [14:00] evalable6: say $*RAKU.compiler.version; [14:00] rypervenche, rakudo-moar d4bac47ff: OUTPUT: «v2020.07.54.gd.4.bac.47.ff␤» [14:00] Oh....my bad. Ignore me. [14:01] *** lucasb joined [14:01] I somehow left off the "raku" after "#!/usr/bin/env" >< [14:01] That does seem like it'd be a problem for Raku :D I'm surprised it even started [14:02] how does `OUTER.keys` work, again? It's not really documented, and I keep unexpectedly getting `()` [14:03] *** wamba joined [14:04] Oh, because I was supposed to be spelling it OUTER::.keys [14:05] *** Kaiepi left [14:05] nevermind, then :) [14:05] *** aluaces left [14:05] *** Kaeipi joined [14:10] *** squashable6 left [14:11] *** Kaiepi joined [14:11] *** squashable6 joined [14:12] *** Merfont joined [14:13] *** Kaiepi left [14:14] *** sena_kun joined [14:15] *** Merfont left [14:15] *** Kaeipi left [14:17] *** Altai-man_ left [14:22] *** Rawwar joined [14:23] m: my $first = 1,; my $second = 2,; $first.set_why('1st'); $second.set_why('2nd'); say "first: {$first.WHY}"; [14:23] rakudo-moar d4bac47ff: OUTPUT: «first: 2nd␤» [14:26] *** andrzejku left [14:28] .tell guifa You probably already know this, but I didn't: it's not only not currently possible to document a variable with a Pod declarator block, you can't currently set the WHY manually – trying to do so will set the WHY for the entire *type*, not just the variable. (which can be seen with this code: my $first = 1,; my $second = 2,; $first.set_why('1st'); $second.set_why('2nd'); say "first: [14:28] codesections, I'll pass your message to guifa [14:28] {$first.WHY}"; [14:28] *** andrzejku joined [14:30] rypervenche: indeed, before/after means “immediately before/after”. That said…. it’s possible to program a new token that would be anywhere-before and anywhere-after [14:30] 2020-08-06T08:20:38Z #raku-dev guifa2 OK, great, thanks. That date is probably OK, I'll check. [14:40] *** Rawwar left [14:53] *** Kaiepi joined [14:54] I can't decide if this hack is so horrible that I need to cut it, or so amazing that I need to leave it in: [14:54] m: my $total = 97; my $subtotal = 84; sub fmt-with-percent-of($num, $name) {sprintf("%4d (%d%% of $name)", $num, 100 × $num/OUTER::("\$$name")) }; say 42.&fmt-with-percent-of('total'); say 42.&fmt-with-percent-of('subtotal'); [14:54] rakudo-moar d4bac47ff: OUTPUT: « 42 (43% of total)␤ 42 (50% of subtotal)␤» [14:55] (It really ought to be a macro, once Raku AST is fully implemented) [14:55] *** Kaiepi left [14:58] lol but at that point, why not just pass in the variable itself? [14:58] 42.&fmt-with-percent-of($total) saves you a character ;-) [14:59] But then it can't print "(XX% of $NAME)" :D [15:01] fair [15:01] *** gnufr33dom left [15:02] Also I’m reminded now of why the internatinoal formatters are going to be so awesome [15:02] oh? [15:02] you’ll be able to do local-number $foo, :type and it’ll autmagically format a number as a percent for you [15:03] I’ll probably add the binding myself but you could also do [15:03] what's it a percent of? 1? [15:04] my \local-percent = &local-number.assuming(:type) [15:04] Yeah, that aligns with how most other formatters handle it [15:04] *** orinthe left [15:04] (e.g. ICU) [15:05] *** orinthe joined [15:05] tangent: why do you write that as `my \local-percent` instead of `my &local-percent`? [15:06] no morning coffee yet [15:06] (I'm still trying to get my head around when it's good style to use sigil-less variables) [15:06] it should be & [15:13] *** Kaiepi joined [15:17] *** MilkmanDan left [15:17] *** MilkmanDan joined [15:29] *** domidumont joined [15:31] *** ssm left [15:32] jdv79: JSON::Tiny, are you referring to a search done on modules.rakudo.org? [15:32] *** JJMerelo joined [15:32] *** MilkmanDan left [15:35] nope. what is on cpan and in the, I believe unused, p6-dists index [15:35] *** Murilo joined [15:35] *** Murilo left [15:37] also, how are you going to fight off the bots in terms of signups to this new "ecosystem"? afaik that's the only reason pause is still manual approval. [15:38] signup like it's 1999 [15:40] *** ssm joined [15:41] yeah, its annoying, but its simple and effective and one only has to go through it once... [15:41] *** Sgeo joined [15:41] I disagree [15:41] on what points? [15:42] it makes no sense whatsoever in 2020 [15:42] cpan, registering, the pain [15:42] it has been working for perl for decases, no sense chaging it there [15:42] but shoehorn that model for a newer language? crazy [15:43] *changing [15:43] npm tried it [15:43] it turned out like sh*t [15:45] "it turned out like sh*t" That can be taken two ways – and, for each meaning, I think you'll find *lots* of people who agree! [15:45] what exactly about npm are you referring? the crazy dep graphs or the lack of security or...? [15:46] ask the devops people to deploy perl, python, ruby, JS and they will cry [15:47] its impossible to discuss something without facts. cool. [15:47] I am saying that the CPAN model only worked for Perl because they had the talent and the manpower at a time where public git repos weren't a thing [15:48] *** demostanis joined [15:48] El_Che, I'm not following what side your on in this discussion. Are you saying that manual approval is good or bad in your opinion? [15:48] one option would be to allow login with github, and only require manual approval for those who don't [15:48] s/your/you're/ gosh [15:48] codesections: I prefer no login, no registration, just a repo + git tag [15:49] you put a repo + tag as a dependency [15:49] El_Che: that's p6c [15:49] jdv79: that's closer, yes [15:49] which goes back to my original idea - why can't the existing solutions be used? [15:49] besides the need to maintain a central list [15:49] cpan and/or p6c - ok. but why a third. [15:50] jdv79: in my eyes p6c > cpan [15:50] so how does that fit in with the stuff you said that's critical of npm? Isn't that basically the non-approval free-for-all approach that npm takes? [15:50] well, the client has to have a list somehow [15:50] Hello everybody! Is there an easier way to check if a list of string isn't in a hash's keys? Currently I am doing it like that: for { .callback if $_ ∉ hash.keys.cache } [15:50] jdv79: I would put that in the META6.json [15:50] *** MilkmanDan joined [15:50] it is in the METAs [15:50] repo + tag instead of name [15:50] the "index" is really just a list of all metas [15:50] so a client knows where to get the dep en what version [15:51] jdv79: the problem with p6c is that nog tagging is requiring [15:51] -ed [15:52] I haven't kept up on this discussion but for a data point, Perl used to have something called a module list which you could register for and which was manually maintained. It got abandoned [15:52] no, we're just re-hashing basic dist repo stuff [15:53] I just saw something about manual approval, sorry [15:53] demostanis, what don't you like about that form? I.e., are you looking for something shorter, or what? (That reads pretty well to me) [15:53] tag as in the git thing, not metadata [15:53] demostanis: if you don't want to check individually, you could use a junction [15:54] *** zacts joined [15:54] demostanis: like, %hash{none(@list)}:exists [15:54] well, one of the "pain points" of using cpan for raku dists is the manual approval process [15:54] About what you guys are saying: can't we have a part free-for-all like NPM which requires something like an --insecure flag with Zef and another part manually checked not requiring a special flag? So that everyone is happy? [15:54] codesections: Yeah, I find it not short enough and I was wondering if there was another way [15:54] in general, using %hash{$key}:exists is way faster than checking %hash.keys [15:54] moritz: I'm gonna try [15:54] demostanis: the security check is an illusion [15:55] Isn't the code read before putting it into p6c ecosystem? [15:55] ah right. Well the reason for manual approval is to avoid obvious spam and malware mainly [15:55] demostanis: code is not set on stone [15:55] Those things get uploaded by people who have no intention of contributing [15:55] or bots. [15:57] There's been a fair bit of action on code review for security at https://github.com/crev-dev/crev/ [15:57] If you base it on github accounts that would be something. [15:57] You can at least then report bad actors to github [15:57] Grinnz: you're talking about pause or something else? [15:57] yes [15:57] that could be neat [15:58] One thing I'd like to see related to Grinnz point is to have a highly-visible count of transitive dependencies per module [15:58] raku has a small ecosystem. Base it on CPAN and it will stay smaller (or smaller, as several people are not fond of using cpan) [15:58] For perl it wouldn't work, I couldn't see relinquishing authentication control to github. But it's possible [15:58] that's easy to do - dep graphs [15:58] want to create go module? Make the repo public, tag it using semantic version, done [15:59] it's one thing to trust an author to not be malicious; it's entierly something else to trust that they've reviewed 500 transative deps for malice [15:59] If you have an api that can return the deps for any given module you can graph it like on https://cpandeps.grinnz.com [15:59] jdv79, yeah I know it's easy to do. But I'm talking about making it visible automatically. It's more about keeping that number front-and-center [15:59] El_Che: so your only issue with p6c is that it doesn't support git tags? [16:00] my issue is mostly with a cpan flow [16:00] the version is in the meta so seems a non--issue with me [16:00] for p6c, yes tags would make it more stable [16:00] how it would be implemented is less important [16:00] is it unstable now? [16:01] if someone points to master, instead of a specific version (tag or commit), it can be shaky, yes [16:01] JJMerelo, lizmat: are we still looking for articles for the 20th advent? if yes, I'd consider doing one about RFC 64 [16:01] its an interesting discussion to have - maybe we should draft something so its not just oral/typing/ephemeral [16:01] jdv79: most people are sane, so it's not a huge problem now [16:03] some would argue that's a feature. and if someone did cause a mess i bet it would be better to address the root cause than try to box them in with more restrictive flows [16:03] sounds kinda like one of the argument used for java - "harder to make a mess" so good for any idiots to code in [16:03] a dependency system definitely should be based on tags to be reliable, i agree [16:04] I think that it's important to combine a low bar for new contribution + reproducibility [16:04] it's how docker and npm type stuff all work [16:04] so, github/gitlag without a central cpan is the easy way to public code [16:04] tags are not immutable, history is rewriteable [16:04] moritz: Why does this return False? so %(:working, :good){none()}:exists [16:04] i fail to see how that factors well [16:04] tag is for making build repoducible [16:05] what google added to golang, for example, is a read-only proxy for tags [16:05] it is, but you have to intentionally rewrite them [16:05] a tag is just an alias to a sha and as long as the sha doesn't get gc'ed or otherwise disappers its repro'able... [16:05] *** xinming left [16:05] whereas branches become unstable as soon as you work on them [16:05] (which you are free not to use) [16:06] jdv79: commits disapper (or are rewritten), tag don't [16:06] of at least people should know you're not suppose to reuse them [16:06] a tag also keeps said commit from getting gc doesn't it? [16:06] tags can move/disappear [16:06] yeah [16:06] jdv79: yes, and people will hae you for that [16:06] hate [16:07] and the blame will be clearly on you :) [16:07] I hope that the "github" comments are just a for instance and that any system would work with any git host (not just the Microsoft-owned one) [16:07] if its my repo i'll git how i like and if i cause a mess then do something about it...? [16:07] *** xinming joined [16:07] modifying any tag on a repo is just as problematic as force pushing a branch other people are using [16:07] codesections: yes, thatś why I metioned gitlab [16:07] but I also think gitea [16:07] source hut, too [16:07] the git protocol basically [16:08] I'd like to point out that for some some people, a tag in a git repo is a perfectly fine release. Others require a build process [16:08] anyway, there's nothing stopping anyone from using a tag in p6c [16:08] demostanis: well, both working and good exist [16:08] its just not the only ref you can use:) [16:08] yeah, exactly — pure git protocol, without relying on any vendor-specific addons [16:08] moritz: build from a tag should be reproducible [16:08] El_Che: the emphasis is on *should* [16:09] none would only return true if they *didn’t* exist [16:09] m: say so %(:bar, :foo){none()}:exists [16:09] rakudo-moar d4bac47ff: OUTPUT: «True␤» [16:09] demostanis: it's false that none of these keys exists [16:09] moritz: if it doesn't something is broken [16:09] Ohhhh my mistake I understand now [16:09] that brings me on my 2nd stolen idea, but for apps [16:09] El_Che: most software builds in the wild are not reproducible [16:10] they should vendor their deps in the repo [16:10] ie including the code of the deps [16:10] you can call that broken all you want, it's just reality [16:10] so the build is identical eacht time [16:10] then build tool versions, time-dependent things, OS versions etc. can still make a difference [16:11] I agree [16:11] but you are not offering build artifacts [16:12] the user's CI is building stuff. And nothing changes on their part they shouldn't expect surprises [16:12] We can't avoid it completely, but we can limit the surprise factor [16:13] > but you are not offering build artifacts [16:13] iirc there was some linux distro or soemthing that managed actual repro'able builds a few years ago [16:13] well, that's the point, maybe we should [16:13] we're offering source code [16:13] seemed extreme but ok [16:14] shoe horning an ecosystem into a stack it wasn't designed for is just a bad idea. there isn't much more to say about it. [16:14] nearly all of the package repos I know offer build artifacts, not (just) source code [16:14] cpan, npm, pypi, ruby gems etc [16:15] they all have tarballs or other archives that are built from a source [16:15] tony-o: I don't know if you're agreeing with me or or giving a counter argument. But's that exactly how I feel about the raku+cpan combination [16:15] git is already being used as the protocol. that doesn't mean the current ecosystem is a good design and doesn't solve the problem of it being a PITA to contribute modules [16:15] "cpan, npm, pypi, ruby gems" <== that's exactly what devops and ops hate to deploy [16:15] *** dolmen joined [16:16] El_Che: i agree with you in the sense that the current arrangement is becoming tedious and can be majorly improved [16:16] i personally believe the current cpan AND p6c options can be much improved to the point where a third option is not necessary [16:16] jdv79: what is your plan to do that? [16:17] there is no plan:) [16:18] then how can you confidently say it's less work to "fix" those than do a third option? [16:19] because the pain points are known and the solutions are not terribly complicated. as opposed to a from scratch effort? seems like a good bet;) [16:20] if that were true then someone would surely have taken credit for such low hanging fruit [16:20] i'll stop now. i've said my bit. i like your energy and effort and don't want to argue anymore. [16:21] jdv79++ [16:26] New module released to CPAN! Abbreviations (0.1.0) by 03TBROWDER [16:29] *** ccube joined [16:30] where can I find the public key for rakudo (to verify detached signature) [16:34] p6: say time [16:34] rakudo-moar d4bac47ff: OUTPUT: «1596731659␤» [16:34] p6: say time [16:34] rakudo-moar d4bac47ff: OUTPUT: «1596731670␤» [16:37] ¦ advent: 1e061ddd2d | (Moritz Lenz)++ | 2 files [16:37] ¦ advent: Claim RFC 64, and add a draft for it [16:37] ¦ advent: review: https://github.com/Raku/advent/commit/1e061ddd2d [16:46] ¦ advent: ed152047d8 | (Moritz Lenz)++ | 20th/articles/rfc64.md [16:46] ¦ advent: Wording improvement [16:46] ¦ advent: review: https://github.com/Raku/advent/commit/ed152047d8 [16:46] *** ccube left [16:46] feedback on this article would be very welcome [16:55] moritz++ I'll try to have a look, probably tomorrow. [16:55] Thanks a lot. [16:57] OK, I finally did it now... [16:58] ccube I think you can get it from https://raku.org/downloads [17:00] And yes, moritz, we're still looking for articles. We've still got 6 slots to fill. [17:00] So thanks. [17:00] JJMerelo: lemme know if you need another artile and I’ll try to get....... [17:00] oh nm [17:00] there we go :-) [17:01] guifa we definitely need them... 6 unfilled slots yet. If you want, a slot is yours... [17:05] JJMerelo: How soon do they need writing? I may have some post-vacation writing energy... :) [17:05] *** JJMerelo left [17:06] jjmerelo: I’ll work on it as soon as I get done fighting with this stupid localtime/gmttime algorithm. I’ve got… something… off even though I’ve sworn I’ve translated the code exactly [17:06] guifa, I'll pass your message to JJMerelo [17:07] jnthn: feeling refreshed? [17:11] jnthn: welcome back :-) [17:13] guifa: Yes; I turned off github email notifications and didn't touch a computer (well, my smartphone aside) for about 2 weeks, which was quite nice :) [17:14] *** Altai-man_ joined [17:14] ….until you turned it back on and got a flood of INT_MAX notifications ;-) [17:16] *** sena_kun left [17:18] :D [17:18] No, it doesn't resend everything :) I can find those via the web UI though :) [17:22] Home time, bbl [17:22] *** andrzejku left [17:30] *** dolmen left [17:45] *** domidumont left [17:55] *** cpan-raku left [17:56] *** cpan-raku joined [17:56] *** cpan-raku left [17:56] *** cpan-raku joined [18:17] *** MilkmanDan left [18:21] *** bocaneri left [18:33] ¦ advent: 3400415e07 | (Moritz Lenz)++ | 20th/articles/rfc64.md [18:33] ¦ advent: Apply feedback by JJ++ [18:33] ¦ advent: review: https://github.com/Raku/advent/commit/3400415e07 [18:38] I'm having a bit of trouble with a syntax issue that seems like it should be easy: destructuring a hash into %sigiled variables. This works (with `$`): [18:38] m: my %h = a => 0, b => 1; my ($a, $b) = %h; say $a; say $b [18:38] rakudo-moar d4bac47ff: OUTPUT: «a => 0␤b => 1␤» [18:39] how do I do the same thing, but with %a and %b? [18:41] my %h = a => %(x => 1, y => 2), b => %(x => 1, y => 2); my (:%a, :%b) := %h; say %a [18:41] guifa, rakudo-moar d4bac47ff: OUTPUT: «{x => 1, y => 2}␤» [18:41] I don’t think there’s actually a guarantee that in your scalar example that $a and $b will necessarily be a and b from the hash. [18:42] m: my %h = a => 0, b => 1; my ($b, $a) = %h; say $b; [18:42] rakudo-moar d4bac47ff: OUTPUT: «b => 1␤» [18:44] hrm [18:44] actually even when using :%a and :%b you’re still not guaranteed it it seems. [18:45] New module released to CPAN! LibXML (0.5.8) by 03WARRINGD [18:45] I think you should probably need to do my %( … ) [18:45] but that errors [18:45] Hmm, I'm not quite sure I follow that code [18:46] You declared %h as a more complex object, but I wanted to destructure an existing hash, not one I'm declaring inline [18:46] *** andrzejku joined [18:48] if this isn't as easy as I thought it'd be, I don't need to bother with it – it's just to save a line [18:49] If you’re just wanting to use %a and %b as variable names, use binding, otherwise %a gobbles up all the values because it’s listy [18:49] It's just what I *think* of when I hear a language has "destructuring assignment", so I thought I was missing something basic [18:49] what would "use binding" look like here? [18:50] assuming I’m understanding what you’re wanting to do correctly [18:51] I have something like [18:51] my $a = %hash; [18:51] my $b = %hash [18:51] er, %a and %b [18:51] and I thought destructuring assignment would let me put that on one line [18:52] (Which is how I've used it in the past in other languages) [18:52] Are those the only things in the hash? [18:52] my (:%a, :%b) := %hash; [18:52] but if that's not the idea here, it's no big deal. [18:52] Yeah [18:53] m: my %h = a => 0, b => 1; my ( :%a, :%b) := %h; say %a; say %b [18:53] rakudo-moar d4bac47ff: OUTPUT: «Type check failed in binding to parameter '%a'; expected Associative but got Int (0)␤ in block at line 1␤␤» [18:53] Right because you passed it an int, not a hash [18:53] oh, right [18:54] m: my %h = a => %(x => 1, y => 2), b => %(x => 3, y => 4; my (:%a, :%b) := %h; say %a; [18:54] rakudo-moar d4bac47ff: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unable to parse expression in contextualizer; couldn't find final ')' (corresponding starter was at line 1)␤at :1␤------> 3 3, y => 4; my (:%a, :%b) := %h; say %a;7⏏5␤» [18:54] I made the minimum-reproducable example too minimal. Oops [18:54] Missing ) after teh 4 [18:54] m: my %h = a => %(x => 1, y => 2), b => %(x => 3, y => 4); my (:%a, :%b) := %h; say %a; [18:54] rakudo-moar d4bac47ff: OUTPUT: «{x => 1, y => 2}␤» [18:54] There it is. Thanks to you both. [18:54] (I knew it had to be something simple I was missing :) ) [18:56] moritz++ # RFC 64 [18:56] Also yay, I fixed the bug with localtime. And then prompty introduced a new one in mktime [18:56] * guifa just wants to control time [19:00] *** molaf joined [19:00] you should speak to the time lords [19:01] New module released to CPAN! PDF::ISO_32000 (0.0.9) by 03WARRINGD [19:04] :-) [19:05] Time lords? I thought they were called ntp server administrators. [19:05] I really was tempted to just include the C library but I didn’t want people to have to compile it [19:13] phogg: having impressive names really matter [19:14] *** sena_kun joined [19:16] *** Altai-man_ left [19:17] *** pecastro joined [19:24] *** rindolf left [19:31] *** pecastro left [19:32] New module released to CPAN! Abbreviations (0.2.0) by 03TBROWDER [19:32] New module released to CPAN! Date::Calendar::Julian (0.0.2) by 03JFORGET [19:36] *** andrzejku left [19:37] *** finanalyst joined [19:38] *** molaf left [19:41] *** aluaces joined [19:48] *** andrzejku joined [19:57] *** epony left [20:12] *** MilkmanDan joined [20:17] *** epony joined [20:24] *** molaf joined [20:25] *** melezhik joined [20:30] I could see 502 errors when try to visit https://modules.raku.org/dist/**** pages [20:30] on and off though [20:32] *** molaf left [20:32] *** molaf joined [20:35] *** dolmen joined [20:39] *** kensanata left [20:43] *** holyghost joined [21:12] *** demostanis left [21:14] *** Altai-man_ joined [21:16] *** sena_kun left [21:23] New module released to CPAN! PDF::Tags (0.0.3) by 03WARRINGD [21:24] *** AlexDaniel joined [21:24] *** AlexDaniel left [21:24] *** AlexDaniel joined [21:34] *** zacts left [22:03] *** zacts joined [22:08] if i get a return value from a sub that returns Inf, how do i test for that? the docs show testing with the === in one case (i've had no luck with that) but the author of the sub says it will have to be trapped. every time i try to handle it i get warnings about needing to gist it, etc. [22:31] m: say (5 ~~ Inf); say (∞ ~~ Inf) [22:31] rakudo-moar d4bac47ff: OUTPUT: «False␤True␤» [22:36] i've been trying smart match, too. i may be doing it wrong. lets see: [22:37] m: my $a = Inf; so $a ~~ Inf [22:37] rakudo-moar d4bac47ff: OUTPUT: «WARNINGS for :␤Useless use of "so " in expression "so $a ~~" in sink context (line 1)␤» [22:38] m: my $a = Inf; say so $a ~~ Inf [22:38] rakudo-moar d4bac47ff: OUTPUT: «True␤» [22:39] hm, i have to go back to my code. ++guifa2 thanks!! [22:42] m: sub i(){Inf}; my $a = &i; say so $a ~~ Inf [22:43] rakudo-moar d4bac47ff: OUTPUT: «False␤» [22:43] ??? [22:43] ah [22:44] m: sub i(){Inf}; my $a = i; say so $a ~~ Inf [22:44] rakudo-moar d4bac47ff: OUTPUT: «False␤» [22:45] thats what i'm seeing...but i have a clue now... [22:50] m: sub i(){Inf}; say so i ~~ Inf [22:50] rakudo-moar d4bac47ff: OUTPUT: «False␤» [22:50] *** melezhik left [22:51] m: sub i(){Inf}; say so i ~~ Inf; say so i() ~~ Inf [22:51] rakudo-moar d4bac47ff: OUTPUT: «False␤True␤» [22:51] aha!! [22:51] m: say i [22:51] rakudo-moar d4bac47ff: OUTPUT: «0+1i␤» [22:52] arg, thanks MasterDuke, my stupid choice... [22:52] heh, np [22:53] lets see [22:54] m: my f(){Inf}; my $a = f(); say so $a ~~ Inf [22:54] rakudo-moar d4bac47ff: OUTPUT: «5===SORRY!5===␤Type 'f' is not declared␤at :1␤------> 3my f7⏏5(){Inf}; my $a = f(); say so $a ~~ Inf␤Malformed my␤at :1␤------> 3my7⏏5 f(){Inf}; my $a = f(); say so $a ~~ Inf␤␤» [22:54] m: sub b(){Inf}; my $a = b; say $a ~~ Inf [22:54] rakudo-moar d4bac47ff: OUTPUT: «True␤» [22:54] m: sub b(){Inf}; my $a = &b; say $a() ~~ Inf [22:54] rakudo-moar d4bac47ff: OUTPUT: «True␤» [22:54] thnx folks, i'm blind [22:54] I wondering if I'm doing any of these wrong. [22:55] no worries tbrowder . I literally just spent three hours tracking down a bug [22:55] had ONE variable that was an int32 instead of an int64 and it through everything off [22:56] m: sub b(){Inf}; my $a = &b; say '$a = ' ~ $a; say '$a() = ' ~ $a(); [22:56] rakudo-moar d4bac47ff: OUTPUT: «Sub object coerced to string (please use .gist or .raku to do that)␤$a = b␤$a() = Inf␤ in block at line 1␤» [22:56] but y'all have collectively bracketed the trouble spot. thanks so much [22:57] oh, shouldn't have tried to make it a string >< [22:57] m: sub b(){Inf}; my $a = &b; say $a; say $a(); [22:57] rakudo-moar d4bac47ff: OUTPUT: «&b␤Inf␤» [23:04] *** patrickb left [23:09] *** vike left [23:15] *** sena_kun joined [23:16] *** dolmen left [23:17] *** Altai-man_ left [23:21] *** vike joined [23:31] *** vrurg left [23:35] *** vrurg joined [23:40] *** oddp left