🦋 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:12
wamba left
00:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:38
cpan-raku left
00:39
cpan-raku joined,
cpan-raku left,
cpan-raku joined
00:40
markoong left
|
|||
jdv79 | tony-o: your addendum doesn't say how cpan does not support ver/auth/api. | 00:53 | |
also, i still don't get the point of api - feels like a misfeature | 01:01 | ||
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
|
|||
guifa2 | .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 | |
tellable6 | 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
|
|||
codesections | 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:22 | |
And there's a decent chance that it will *stay* 60% of a library, and never grow into a real one | 02:23 | ||
02:27
gnufr33dom joined
02:33
clarjon1 joined
02:36
lucasb left
03:36
quotable6 left,
nativecallable6 left,
coverable6 left,
tellable6 left,
shareable6 left,
linkable6 left,
bisectable6 left,
releasable6 left,
greppable6 left,
benchable6 left,
unicodable6 left,
evalable6 left,
bloatable6 left,
statisfiable6 left,
reportable6 left,
committable6 left,
sourceable6 left,
notable6 left,
squashable6 left,
evalable6 joined,
benchable6 joined,
unicodable6 joined
03:37
bisectable6 joined,
statisfiable6 joined,
greppable6 joined,
squashable6 joined,
sourceable6 joined,
reportable6 joined
03:38
bloatable6 joined,
quotable6 joined,
committable6 joined,
nativecallable6 joined,
coverable6 joined,
linkable6 joined,
tellable6 joined,
notable6 joined,
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
|
|||
tony-o | jdv79: cpan won't index File::Temp from two different pause users with the same version | 04:29 | |
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:30 | ||
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:31 | ||
04:33
Kaeipi left,
Kaeipi joined
04:39
ab5tract left
04:43
zacts left
05:14
bocaneri joined
05:15
ab5tract joined
05:41
zacts joined
|
|||
jdv79 | 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. | 05:43 | |
06:09
Kaeipi left
06:10
Kaiepi joined,
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
|
|||
fluca1978 | is there a way to get operators from an object using MOP? Something like .^methods ? | 07:42 | |
moritz | if by operators you mean methods, then yes :D | 07:43 | |
ab5tract_ | fluca1978, you can use `$obj.^can($method)` to do duck typing | 07:55 | |
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:56 | ||
fluca1978 | moritz: this is not working Array.^methods.grep: { .name ~~ '[]' } | 07:57 | |
I suspect that, as ab5tract says, the method has a different name like `postfix` something | 07:58 | ||
ab5tract_ | fluca1978, you are calling it on the class, | ||
try on an instance | |||
fluca1978 | ab5tract: Array.new.^methods.grep: { .name ~~ '[]' } is not working too, there is something different with the names | 07:59 | |
ab5tract_ | 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:00 | |
m: say Array.new.^methods.grep: *.name ~~ 'GET-POS' | 08:01 | ||
camelia | WhateverCode object coerced to string (please use .gist or .raku to do that) in block <unit> at <tmp> line 1 Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block? in block <unit> at <tmp> line 1 |
||
ab5tract_ | m: say Array.new.^methods | ||
camelia | (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… | ||
ab5tract_ | so we aren't giving it the right question | ||
m: say Array.^methods ~~ Array.new.^methods | 08:02 | ||
camelia | False | ||
ab5tract_ | m: say Array.^methods | ||
camelia | (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… | ||
ab5tract_ | 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) | |||
camelia | 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… | ||
ab5tract_ | m: say (Array.^methods (-) Any.^methods (-) Iterable.^methods) | 08:04 | |
camelia | 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… | ||
ab5tract_ | fluca1978, does that help explain it a bit? | 08:05 | |
m: say (Array.^methods (^) Iterable.^methods) | |||
camelia | 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… | ||
ab5tract_ | m: say (Array.^methods (^) Nodal.^methods) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: Nodal used at line 1 |
||
ab5tract_ | m: say (Array.^methods (^) Node.^methods) | 08:06 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: Node used at line 1. Did you mean 'Code'? |
||
ab5tract_ | anyway, enough of me poking at poor camelia :) | ||
fluca1978 | ab5tract: thanks, I need to reason about it | 08:07 | |
ab5tract_ | m: Array.new.^can('BIND-POS').say; say Array.new.^methods.grep: { .name ~~ 'BIND-POS' } | 08:10 | |
camelia | (BIND-POS BIND-POS BIND-POS) (BIND-POS BIND-POS) |
||
ab5tract_ | ^^ fluca1978 I can't explain that one :( ... maybe moritz or another core dev has an idea though | 08:11 | |
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 | |||
fluca1978 | ab5tract: a multi method, may be? | 08:13 | |
ab5tract_ | m: my @a = ^10; my &look = @a.^can('GET-POS'); dd &look; @a.&look(4).say | 08:14 | |
camelia | Type check failed in assignment to &look; expected Callable but got List (()) in block <unit> at <tmp> line 1 |
||
ab5tract_ | 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
|
|||
fluca1978 | 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 ); | |||
El_Che | lo #rqku | 09:11 | |
lo #raku | |||
09:13
JJMerelo joined
|
|||
ab5tract_ | ah, of course. silly brain fart had me thinking GET-POS. | 09:13 | |
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 | ||
09:14
sena_kun joined
|
|||
ab5tract_ | IIRC there is no way for monkey patching a parent class to have an impact on descendant classes | 09:14 | |
(as an example) | 09:15 | ||
09:15
Sgeo left
|
|||
ab5tract_ | o/ El_Che | 09:15 | |
El_Che | OO is overrated :) | 09:16 | |
09:16
Altai-man_ left
09:18
rindolf joined
|
|||
Geth_ | advent: 780226cb38 | L'Alabameñu++ (committed using GitHub Web editor) | 20th/articles/rfc223.md Create RFC233 |
09:31 | |
advent: 1540ff5f07 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 20th/articles/rfc223.md Merge pull request #57 from alabamenhu/patch-3 Create RFC233 |
|||
09:47
clarjon1 left
|
|||
tbrowder | codesections: ref arg parsing have you looked at leont's Getopt::Long? | 09:50 | |
09:55
markoong joined
09:56
clarjon1 joined
09:59
JJMerelo left
10:00
markong joined,
markoong left
10:01
clarjon1 left
|
|||
leont | I don't know the question, but I'd always recommend Getopt:Long ;-) | 10:02 | |
10:02
clarjon1 joined
10:10
marcusr left,
marcusr joined
10:26
oddp joined
10:27
shlomif joined
10:28
rindolf left,
shlomif is now known as rindolf
|
|||
oddp | Late to the party, but thanks again for yet another weekly! | 10:35 | |
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 | ||
fluca1978 | I'm curious: why hash has some adverbs instead of methods? %hash<foo>:exists instead of %hash.exists( <foo> )? I think because it could be a little easier for slicing, but I cannot see the real advantage. | ||
oddp | fluca1978: does that help? perl6advent.wordpress.com/2013/12/...-only-way/ | 10:38 | |
Also check the comments below the article.\ | 10:39 | ||
fluca1978 | oddp: I'm reading | 10:40 | |
jnthn | 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:43 | |
fluca1978 | jnthn: thanks, I was just realizing it while reading your comment. | 10:54 | |
jnthn: anyway I still don't understand why %hash.AT-KEY( <username>, 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<username>:exists | 10:58 | ||
jnthn | fluca1978: You have to call .EXISTS-KEY; the exists adverb there is just being ignored | 10:59 | |
fluca1978 | jnthn: thanks | 11:00 | |
11:11
pecastro joined
11:14
Altai-man_ joined
11:16
sena_kun left
|
|||
tbrowder | leont: codesections mentioned problems with param parsing and rolling his/her own | 11:21 | |
yours looks like something to start with instead | 11:22 | ||
11:24
ab5tract left,
ab5tract_ left
11:28
kensanata left
|
|||
codesections | 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:31 | |
Second, and more importantly, for this project I'm not using external modules (for … reasons) | 11:32 | ||
tbrowder | 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:33 | |
11:35
pecastro left
|
|||
tbrowder | 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 | |||
El_Che | tbrowder: yeah, that's what I do, but I need to fix a few bugsd | 11:37 | |
tbrowder | wrapper name at the moment is Opt::Handler | ||
El_Che: is it published? | 11:38 | ||
codesections | 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) | ||
El_Che | github.com/nxadm/SuperMAIN | ||
was on holiday, so I didn't had the time to fix stuff | 11:39 | ||
codesections | Unrelated question: there isn't any way to introspect into a subset, is there? | ||
El_Che | codesections sent great bug reports | ||
the '='bug is probably a 1 line change :) | |||
tbrowder | oh yeah, my only prob with yrs is it uses MAIN which i stay away from | 11:40 | |
codesections | What do you dislike about MAIN? | ||
El_Che | lol, MAIN was what I wanted to keep specifically | ||
requirements vary of course | 11:41 | ||
tbrowder | i can't get any support for line wrapping for one thing | ||
codesections | You mean based on terminal width? | ||
tbrowder | and my style of CLI is really baked in | ||
yes | |||
El_Che | I love the idea of a built-in capable MAIN | 11:42 | |
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 | |||
codesections | tbrowder, how are you detecting the terminal width, by the way? | ||
tbrowder | 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 | ||
El_Che | tbrowder: it could be interesting indeed | 11:44 | |
tbrowder | 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:45 | |
codesections | Oh, well in that case, what about MAIN prevents line wrapping? | 11:46 | |
tbrowder | as an example of what bugs me, look at Documentable's help | ||
codesections | I'm using MAIN and wrapping text in USAGE | ||
tbrowder | 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 | |
codesections | :D | ||
Yep! Though it can also be a weakness – which is what got me thinking about the Lisp Curse angle | 11:50 | ||
tbrowder | i'm too set in my ways to learn everything all over again | ||
yep. | |||
codesections | Oh, yeah, I wouldn't like lines like `documentable --help` has. But that's easy to fix with USAGE | ||
tbrowder | 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:52 | |
how | 11:53 | ||
i''k | |||
codesections | 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 | |
tbrowder | i'll have to look at it again, but leont's option specs are really powerful for my needs | ||
El_Che | yak shaving to the recue | 11:56 | |
tbrowder | does anyone here use mi6. i just started and can't get my second release. | ||
because it doesn't like my Changes or version or something. | 11:57 | ||
it's very useful but lite on help | 11:58 | ||
got to go. bye | |||
12:07
zacts left
12:29
wamba left
|
|||
tbrowder | back. can anyone help me with an mi6 release problem? | 12:37 | |
codesections | Wish I could, but I haven't yet used mi6 | 12:56 | |
tbrowder | 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:06 | |
13:19
skids joined
13:36
kensanata joined
13:42
MasterDuke joined
|
|||
rypervenche | 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 <!before ing> /; | |||
evalable6 | 「test」 | ||
rypervenche | Hmmm.. | 13:58 | |
evalable6: say $*RAKU.compiler.version; | 14:00 | ||
evalable6 | v2020.07.54.gd.4.bac.47.ff | ||
rypervenche | Oh....my bad. Ignore me. | ||
14:01
lucasb joined
|
|||
rypervenche | I somehow left off the "raku" after "#!/usr/bin/env" >< | 14:01 | |
codesections | That does seem like it'd be a problem for Raku :D I'm surprised it even started | ||
how does `OUTER.keys` work, again? It's not really documented, and I keep unexpectedly getting `()` | 14:02 | ||
14:03
wamba joined
|
|||
codesections | Oh, because I was supposed to be spelling it OUTER::.keys | 14:04 | |
14:05
Kaiepi left
|
|||
codesections | nevermind, then :) | 14:05 | |
14:05
aluaces left,
Kaeipi joined
14:10
squashable6 left
14:11
Kaiepi joined,
squashable6 joined
14:12
Merfont joined
14:13
Kaiepi left
14:14
sena_kun joined
14:15
Merfont left,
Kaeipi left
14:17
Altai-man_ left
14:22
Rawwar joined
|
|||
codesections | m: my $first = 1,; my $second = 2,; $first.set_why('1st'); $second.set_why('2nd'); say "first: {$first.WHY}"; | 14:23 | |
camelia | first: 2nd | ||
14:26
andrzejku left
|
|||
codesections | .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 | |
tellable6 | codesections, I'll pass your message to guifa | ||
codesections | {$first.WHY}"; | ||
14:28
andrzejku joined
|
|||
guifa | 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 | |
tellable6 | 2020-08-06T08:20:38Z #raku-dev <JJMerelo> guifa2 OK, great, thanks. That date is probably OK, I'll check. | ||
14:40
Rawwar left
14:53
Kaiepi joined
|
|||
codesections | 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'); | |||
camelia | 42 (43% of total) 42 (50% of subtotal) |
||
codesections | (It really ought to be a macro, once Raku AST is fully implemented) | 14:55 | |
14:55
Kaiepi left
|
|||
guifa | 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 ;-) | |||
codesections | But then it can't print "(XX% of $NAME)" :D | 14:59 | |
guifa | fair | 15:01 | |
15:01
gnufr33dom left
|
|||
guifa | Also I’m reminded now of why the internatinoal formatters are going to be so awesome | 15:02 | |
codesections | oh? | ||
guifa | you’ll be able to do local-number $foo, :type<percent> and it’ll autmagically format a number as a percent for you | ||
I’ll probably add the binding myself but you could also do | 15:03 | ||
codesections | what's it a percent of? 1? | ||
guifa | my \local-percent = &local-number.assuming(:type<percent>) | 15:04 | |
Yeah, that aligns with how most other formatters handle it | |||
15:04
orinthe left
|
|||
guifa | (e.g. ICU) | 15:04 | |
15:05
orinthe joined
|
|||
codesections | tangent: why do you write that as `my \local-percent` instead of `my &local-percent`? | 15:05 | |
guifa | no morning coffee yet | 15:06 | |
codesections | (I'm still trying to get my head around when it's good style to use sigil-less variables) | ||
guifa | it should be & | ||
15:13
Kaiepi joined
15:17
MilkmanDan left,
MilkmanDan joined
15:29
domidumont joined
15:31
ssm left
|
|||
tony-o | jdv79: JSON::Tiny, are you referring to a search done on modules.rakudo.org? | 15:32 | |
15:32
JJMerelo joined,
MilkmanDan left
|
|||
jdv79 | nope. what is on cpan and in the, I believe unused, p6-dists index | 15:35 | |
15:35
Murilo joined,
Murilo left
|
|||
jdv79 | 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:37 | |
El_Che | signup like it's 1999 | 15:38 | |
15:40
ssm joined
|
|||
jdv79 | yeah, its annoying, but its simple and effective and one only has to go through it once... | 15:41 | |
15:41
Sgeo joined
|
|||
El_Che | I disagree | 15:41 | |
jdv79 | on what points? | ||
El_Che | it makes no sense whatsoever in 2020 | 15:42 | |
cpan, registering, the pain | |||
it has been working for perl for decases, no sense chaging it there | |||
but shoehorn that model for a newer language? crazy | |||
*changing | 15:43 | ||
npm tried it | |||
it turned out like sh*t | |||
codesections | "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 | |
jdv79 | what exactly about npm are you referring? the crazy dep graphs or the lack of security or...? | ||
El_Che | ask the devops people to deploy perl, python, ruby, JS and they will cry | 15:46 | |
jdv79 | its impossible to discuss something without facts. cool. | 15:47 | |
El_Che | 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
|
|||
codesections | 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 | |
moritz | one option would be to allow login with github, and only require manual approval for those who don't | ||
codesections | s/your/you're/ gosh | ||
El_Che | codesections: I prefer no login, no registration, just a repo + git tag | ||
you put a repo + tag as a dependency | 15:49 | ||
jdv79 | El_Che: that's p6c | ||
El_Che | jdv79: that's closer, yes | ||
jdv79 | which goes back to my original idea - why can't the existing solutions be used? | ||
El_Che | besides the need to maintain a central list | ||
jdv79 | cpan and/or p6c - ok. but why a third. | ||
El_Che | jdv79: in my eyes p6c > cpan | 15:50 | |
codesections | 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? | ||
jdv79 | well, the client has to have a list somehow | ||
demostanis | 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 <first second> { .callback if $_ ∉ hash.keys.cache } | ||
El_Che | jdv79: I would put that in the META6.json | ||
15:50
MilkmanDan joined
|
|||
jdv79 | it is in the METAs | 15:50 | |
El_Che | repo + tag instead of name | ||
jdv79 | the "index" is really just a list of all metas | ||
El_Che | so a client knows where to get the dep en what version | ||
jdv79: the problem with p6c is that nog tagging is requiring | 15:51 | ||
-ed | |||
Grinnz | 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 | |
jdv79 | no, we're just re-hashing basic dist repo stuff | ||
Grinnz | I just saw something about manual approval, sorry | 15:53 | |
codesections | 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) | ||
jdv79 | tag as in the git thing, not metadata | ||
moritz | demostanis: if you don't want to check individually, you could use a junction | ||
15:54
zacts joined
|
|||
moritz | demostanis: like, %hash{none(@list)}:exists | 15:54 | |
jdv79 | well, one of the "pain points" of using cpan for raku dists is the manual approval process | ||
demostanis | 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? | ||
codesections: Yeah, I find it not short enough and I was wondering if there was another way | |||
moritz | in general, using %hash{$key}:exists is way faster than checking %hash.keys | ||
demostanis | moritz: I'm gonna try | ||
El_Che | demostanis: the security check is an illusion | ||
demostanis | Isn't the code read before putting it into p6c ecosystem? | 15:55 | |
Grinnz | ah right. Well the reason for manual approval is to avoid obvious spam and malware mainly | ||
El_Che | demostanis: code is not set on stone | ||
Grinnz | Those things get uploaded by people who have no intention of contributing | ||
or bots. | |||
codesections | There's been a fair bit of action on code review for security at github.com/crev-dev/crev/ | 15:57 | |
Grinnz | If you base it on github accounts that would be something. | ||
You can at least then report bad actors to github | |||
jdv79 | Grinnz: you're talking about pause or something else? | ||
Grinnz | yes | ||
jdv79 | that could be neat | ||
codesections | 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 | |
El_Che | 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) | ||
Grinnz | For perl it wouldn't work, I couldn't see relinquishing authentication control to github. But it's possible | ||
jdv79 | that's easy to do - dep graphs | ||
El_Che | want to create go module? Make the repo public, tag it using semantic version, done | ||
codesections | 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 | |
Grinnz | If you have an api that can return the deps for any given module you can graph it like on cpandeps.grinnz.com | ||
codesections | 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 | ||
jdv79 | El_Che: so your only issue with p6c is that it doesn't support git tags? | ||
El_Che | my issue is mostly with a cpan flow | 16:00 | |
jdv79 | the version is in the meta so seems a non--issue with me | ||
El_Che | for p6c, yes tags would make it more stable | ||
how it would be implemented is less important | |||
jdv79 | is it unstable now? | ||
El_Che | if someone points to master, instead of a specific version (tag or commit), it can be shaky, yes | 16:01 | |
moritz | JJMerelo, lizmat: are we still looking for articles for the 20th advent? if yes, I'd consider doing one about RFC 64 | ||
jdv79 | its an interesting discussion to have - maybe we should draft something so its not just oral/typing/ephemeral | ||
El_Che | jdv79: most people are sane, so it's not a huge problem now | ||
jdv79 | 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 | |||
Grinnz | a dependency system definitely should be based on tags to be reliable, i agree | ||
El_Che | I think that it's important to combine a low bar for new contribution + reproducibility | 16:04 | |
Grinnz | it's how docker and npm type stuff all work | ||
El_Che | so, github/gitlag without a central cpan is the easy way to public code | ||
jdv79 | tags are not immutable, history is rewriteable | ||
demostanis | moritz: Why does this return False? so %(:working, :good){none(<working good>)}:exists | ||
jdv79 | i fail to see how that factors well | ||
El_Che | tag is for making build repoducible | ||
what google added to golang, for example, is a read-only proxy for tags | 16:05 | ||
Grinnz | it is, but you have to intentionally rewrite them | ||
jdv79 | 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
|
|||
Grinnz | whereas branches become unstable as soon as you work on them | 16:05 | |
El_Che | (which you are free not to use) | ||
jdv79: commits disapper (or are rewritten), tag don't | 16:06 | ||
of at least people should know you're not suppose to reuse them | |||
Grinnz | a tag also keeps said commit from getting gc doesn't it? | ||
jdv79 | tags can move/disappear | ||
yeah | |||
El_Che | jdv79: yes, and people will hae you for that | ||
hate | |||
and the blame will be clearly on you :) | 16:07 | ||
codesections | 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) | ||
jdv79 | 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
|
|||
Grinnz | modifying any tag on a repo is just as problematic as force pushing a branch other people are using | 16:07 | |
El_Che | codesections: yes, thatś why I metioned gitlab | ||
but I also think gitea | |||
codesections | source hut, too | ||
El_Che | the git protocol basically | ||
moritz | 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 | |
jdv79 | anyway, there's nothing stopping anyone from using a tag in p6c | ||
guifa | demostanis: well, both working and good exist | ||
jdv79 | its just not the only ref you can use:) | ||
codesections | yeah, exactly — pure git protocol, without relying on any vendor-specific addons | ||
El_Che | moritz: build from a tag should be reproducible | ||
moritz | El_Che: the emphasis is on *should* | ||
guifa | none would only return true if they *didn’t* exist | 16:09 | |
m: say so %(:bar, :foo){none(<working good>)}:exists | |||
camelia | True | ||
moritz | demostanis: it's false that none of these keys exists | ||
El_Che | moritz: if it doesn't something is broken | ||
demostanis | Ohhhh my mistake I understand now | ||
El_Che | that brings me on my 2nd stolen idea, but for apps | ||
moritz | El_Che: most software builds in the wild are not reproducible | ||
El_Che | they should vendor their deps in the repo | 16:10 | |
ie including the code of the deps | |||
moritz | you can call that broken all you want, it's just reality | ||
El_Che | so the build is identical eacht time | ||
moritz | then build tool versions, time-dependent things, OS versions etc. can still make a difference | ||
El_Che | I agree | 16:11 | |
but you are not offering build artifacts | |||
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 | |||
moritz | > but you are not offering build artifacts | 16:13 | |
jdv79 | iirc there was some linux distro or soemthing that managed actual repro'able builds a few years ago | ||
moritz | well, that's the point, maybe we should | ||
El_Che | we're offering source code | ||
jdv79 | seemed extreme but ok | ||
tony-o | 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 | |
moritz | nearly all of the package repos I know offer build artifacts, not (just) source code | ||
cpan, npm, pypi, ruby gems etc | |||
they all have tarballs or other archives that are built from a source | 16:15 | ||
El_Che | 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 | ||
tony-o | 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 | ||
El_Che | "cpan, npm, pypi, ruby gems" <== that's exactly what devops and ops hate to deploy | ||
16:15
dolmen joined
|
|||
tony-o | El_Che: i agree with you in the sense that the current arrangement is becoming tedious and can be majorly improved | 16:16 | |
jdv79 | i personally believe the current cpan AND p6c options can be much improved to the point where a third option is not necessary | ||
tony-o | jdv79: what is your plan to do that? | ||
jdv79 | there is no plan:) | 16:17 | |
tony-o | then how can you confidently say it's less work to "fix" those than do a third option? | 16:18 | |
jdv79 | 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:19 | |
tony-o | if that were true then someone would surely have taken credit for such low hanging fruit | 16:20 | |
jdv79 | i'll stop now. i've said my bit. i like your energy and effort and don't want to argue anymore. | ||
tony-o | jdv79++ | 16:21 | |
cpan-raku | New module released to CPAN! Abbreviations (0.1.0) by 03TBROWDER | 16:26 | |
16:29
ccube joined
|
|||
ccube | where can I find the public key for rakudo (to verify detached signature) | 16:30 | |
p6: say time | 16:34 | ||
camelia | 1596731659 | ||
ccube | p6: say time | ||
camelia | 1596731670 | ||
Geth_ | advent: 1e061ddd2d | (Moritz Lenz)++ | 2 files Claim RFC 64, and add a draft for it |
16:37 | |
advent: ed152047d8 | (Moritz Lenz)++ | 20th/articles/rfc64.md Wording improvement |
16:46 | ||
16:46
ccube left
|
|||
moritz | feedback on this article would be very welcome | 16:46 | |
JJMerelo | moritz++ I'll try to have a look, probably tomorrow. | 16:55 | |
Thanks a lot. | |||
OK, I finally did it now... | 16:57 | ||
ccube I think you can get it from raku.org/downloads | 16:58 | ||
And yes, moritz, we're still looking for articles. We've still got 6 slots to fill. | 17:00 | ||
So thanks. | |||
guifa | JJMerelo: lemme know if you need another artile and I’ll try to get....... | ||
oh nm | |||
there we go :-) | |||
JJMerelo | guifa we definitely need them... 6 unfilled slots yet. If you want, a slot is yours... | 17:01 | |
jnthn | JJMerelo: How soon do they need writing? I may have some post-vacation writing energy... :) | 17:05 | |
17:05
JJMerelo left
|
|||
guifa | 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 | |
tellable6 | guifa, I'll pass your message to JJMerelo | ||
guifa | jnthn: feeling refreshed? | 17:07 | |
moritz | jnthn: welcome back :-) | 17:11 | |
jnthn | 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:13 | |
17:14
Altai-man_ joined
|
|||
guifa | ….until you turned it back on and got a flood of INT_MAX notifications ;-) | 17:14 | |
17:16
sena_kun left
|
|||
jnthn | :D | 17:18 | |
No, it doesn't resend everything :) I can find those via the web UI though :) | |||
Home time, bbl | 17:22 | ||
17:22
andrzejku left
17:30
dolmen left
17:45
domidumont left
17:55
cpan-raku left
17:56
cpan-raku joined,
cpan-raku left,
cpan-raku joined
18:17
MilkmanDan left
18:21
bocaneri left
|
|||
Geth_ | advent: 3400415e07 | (Moritz Lenz)++ | 20th/articles/rfc64.md Apply feedback by JJ++ |
18:33 | |
codesections | 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 | |||
camelia | a => 0 b => 1 |
||
codesections | how do I do the same thing, but with %a and %b? | 18:39 | |
guifa | my %h = a => %(x => 1, y => 2), b => %(x => 1, y => 2); my (:%a, :%b) := %h; say %a | 18:41 | |
evalable6 | {x => 1, y => 2} | ||
guifa | 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. | ||
m: my %h = a => 0, b => 1; my ($b, $a) = %h; say $b; | 18:42 | ||
camelia | b => 1 | ||
guifa | hrm | 18:44 | |
actually even when using :%a and :%b you’re still not guaranteed it it seems. | |||
cpan-raku | New module released to CPAN! LibXML (0.5.8) by 03WARRINGD | 18:45 | |
guifa | I think you should probably need to do my %( … ) | ||
but that errors | |||
codesections | Hmm, I'm not quite sure I follow that code | ||
You declared %h as a more complex object, but I wanted to destructure an existing hash, not one I'm declaring inline | 18:46 | ||
18:46
andrzejku joined
|
|||
codesections | 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:48 | |
guifa | 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 | |
codesections | It's just what I *think* of when I hear a language has "destructuring assignment", so I thought I was missing something basic | ||
what would "use binding" look like here? | |||
guifa | assuming I’m understanding what you’re wanting to do correctly | 18:50 | |
codesections | I have something like | 18:51 | |
my $a = %hash<a>; | |||
my $b = %hash<b> | |||
er, %a and %b | |||
and I thought destructuring assignment would let me put that on one line | |||
(Which is how I've used it in the past in other languages) | 18:52 | ||
jnthn | Are those the only things in the hash? | ||
my (:%a, :%b) := %hash; | |||
codesections | but if that's not the idea here, it's no big deal. | ||
Yeah | |||
m: my %h = a => 0, b => 1; my ( :%a, :%b) := %h; say %a; say %b | 18:53 | ||
camelia | Type check failed in binding to parameter '%a'; expected Associative but got Int (0) in block <unit> at <tmp> line 1 |
||
guifa | Right because you passed it an int, not a hash | ||
codesections | oh, right | ||
guifa | m: my %h = a => %(x => 1, y => 2), b => %(x => 3, y => 4; my (:%a, :%b) := %h; say %a; | 18:54 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in contextualizer; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3 3, y => 4; my (:%a, :%b) := %h; say %a;7⏏5<EOL> |
||
codesections | I made the minimum-reproducable example too minimal. Oops | ||
jnthn | Missing ) after teh 4 | ||
guifa | m: my %h = a => %(x => 1, y => 2), b => %(x => 3, y => 4); my (:%a, :%b) := %h; say %a; | ||
camelia | {x => 1, y => 2} | ||
codesections | There it is. Thanks to you both. | ||
(I knew it had to be something simple I was missing :) ) | |||
lizmat | moritz++ # RFC 64 | 18:56 | |
guifa | Also yay, I fixed the bug with localtime. And then prompty introduced a new one in mktime | ||
guifa just wants to control time | |||
19:00
molaf joined
|
|||
moritz | you should speak to the time lords | 19:00 | |
cpan-raku | New module released to CPAN! PDF::ISO_32000 (0.0.9) by 03WARRINGD | 19:01 | |
guifa | :-) | 19:04 | |
phogg | Time lords? I thought they were called ntp server administrators. | 19:05 | |
guifa | I really was tempted to just include the C library but I didn’t want people to have to compile it | ||
moritz | phogg: having impressive names really matter | 19:13 | |
19:14
sena_kun joined
19:16
Altai-man_ left
19:17
pecastro joined
19:24
rindolf left
19:31
pecastro left
|
|||
cpan-raku | 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
|
|||
melezhik | I could see 502 errors when try to visit modules.raku.org/dist/**** pages | 20:30 | |
on and off though | |||
20:32
molaf left,
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
|
|||
cpan-raku | New module released to CPAN! PDF::Tags (0.0.3) by 03WARRINGD | 21:23 | |
21:24
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
21:34
zacts left
22:03
zacts joined
|
|||
tbrowder | 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:08 | |
guifa2 | m: say (5 ~~ Inf); say (∞ ~~ Inf) | 22:31 | |
camelia | False True |
||
tbrowder | i've been trying smart match, too. i may be doing it wrong. lets see: | 22:36 | |
m: my $a = Inf; so $a ~~ Inf | 22:37 | ||
camelia | WARNINGS for <tmp>: Useless use of "so " in expression "so $a ~~" in sink context (line 1) |
||
guifa2 | m: my $a = Inf; say so $a ~~ Inf | 22:38 | |
camelia | True | ||
tbrowder | hm, i have to go back to my code. ++guifa2 thanks!! | 22:39 | |
m: sub i(){Inf}; my $a = &i; say so $a ~~ Inf | 22:42 | ||
camelia | False | 22:43 | |
tbrowder | ??? | ||
ah | |||
m: sub i(){Inf}; my $a = i; say so $a ~~ Inf | 22:44 | ||
camelia | False | ||
tbrowder | thats what i'm seeing...but i have a clue now... | 22:45 | |
m: sub i(){Inf}; say so i ~~ Inf | 22:50 | ||
camelia | False | ||
22:50
melezhik left
|
|||
MasterDuke | m: sub i(){Inf}; say so i ~~ Inf; say so i() ~~ Inf | 22:51 | |
camelia | False True |
||
tbrowder | aha!! | ||
MasterDuke | m: say i | ||
camelia | 0+1i | ||
tbrowder | arg, thanks MasterDuke, my stupid choice... | 22:52 | |
MasterDuke | heh, np | ||
tbrowder | lets see | 22:53 | |
m: my f(){Inf}; my $a = f(); say so $a ~~ Inf | 22:54 | ||
camelia | 5===SORRY!5=== Type 'f' is not declared at <tmp>:1 ------> 3my f7⏏5(){Inf}; my $a = f(); say so $a ~~ Inf Malformed my at <tmp>:1 ------> 3my7⏏5 f(){Inf}; my $a = f(); say so $a ~~ Inf |
||
rypervenche | m: sub b(){Inf}; my $a = b; say $a ~~ Inf | ||
camelia | True | ||
rypervenche | m: sub b(){Inf}; my $a = &b; say $a() ~~ Inf | ||
camelia | True | ||
tbrowder | thnx folks, i'm blind | ||
rypervenche | I wondering if I'm doing any of these wrong. | ||
guifa2 | 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 | |||
rypervenche | m: sub b(){Inf}; my $a = &b; say '$a = ' ~ $a; say '$a() = ' ~ $a(); | 22:56 | |
camelia | Sub object coerced to string (please use .gist or .raku to do that) $a = b $a() = Inf in block <unit> at <tmp> line 1 |
||
tbrowder | but y'all have collectively bracketed the trouble spot. thanks so much | ||
rypervenche | oh, shouldn't have tried to make it a string >< | 22:57 | |
m: sub b(){Inf}; my $a = &b; say $a; say $a(); | |||
camelia | &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
|