Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-toolchain, 2016-09-06

| Channels | #perl6-toolchain index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:31 ugexe it is probably worth noting that uploading dists to the PSIXDISTS username makes guessing the auth more difficult for consumers
00:31 ugexe for example: indexing is not exactly needed to do basic things like parse the upload file path into dist name, version, and author
00:33 ugexe however without the author representing the actual author it means you have to download all My::Module:ver<whatever>:auth<*> variants and check each meta data
00:34 ugexe ultimately it would not matter once there is indexing, but having all those parts in the path would act as enough information for current tooling to figure it out
00:36 ugexe maybe they could be uploaded under P/PS/PSIXDISTS/<original auth>/My-Module-<version>.tar.gz
00:38 ugexe although even that would have problems since some people use stuff like `My Name <abc@xyz.net>` as their auth
00:39 ugexe or would could upload them under their <sha1>.tar.gz!
00:41 ugexe if i were to put my own version of GTK::Simple into the ecosystem for example it would probably cause problems for the PSIXDISTS username plan
00:43 ugexe unfortunately i have no suggestions for a solution other than using the file path to contain that information, and as i pointed out that has its own points of failure
00:47 ugexe modules.perl6.org also fails in this regard (Foo is listed twice in ecosystem/META.list but only shown once)
01:16 ugexe https://github.com/ugexe/Perl6-Foo I've added this version of Foo to the ecosystem for testing such things, which duplicates the distribution name but uses a different auth
01:48 ilbot3 joined #perl6-toolchain
01:48 Topic for #perl6-toolchain is now Fire is step THREE! | https://github.com/perl6/toolchain-bikeshed | Channel logs: http://irclog.perlgeek.de/perl6-toolchain/today | useful prior art: https://metacpan.org/pod/CPAN::Meta::Spec
04:28 llfourn sjn: I'll take a look. Probably some change in rakudo internals has broken it. It relies heavily on nqp. Cheers.
05:20 llfourn sjn: I removed some bit rot. It installs now :)
06:10 domidumont joined #perl6-toolchain
06:15 domidumont joined #perl6-toolchain
07:43 leont joined #perl6-toolchain
08:59 sjn llfourn: thanks! ^^
10:44 llfourn sjn: nw. Enjoy.
11:55 stmuk_ joined #perl6-toolchain
14:18 lizmat joined #perl6-toolchain
14:19 ugexe nine: the meta caching bits can be cleaned up a bit into using single assignment if you think it looks better https://gist.github.com/ugexe/017672ef39723ff6e33744d08a854872
15:09 perlpilot_ joined #perl6-toolchain
15:15 nine ugexe: that looks like it's based on an older version, as it still uses %extensions<Perl6> instead of @extensions?
15:18 ugexe yeah, thats from a few months ago. should just be able to s/%extensions<Perl6>/@extensions/
15:19 ugexe mostly just pointing out how to structure it to avoid reassigning to $found
15:58 domidumont joined #perl6-toolchain
16:18 tadzik joined #perl6-toolchain
17:15 DrForr joined #perl6-toolchain
17:44 stmuk_ how is zef handling installs from http://www.cpan.org/authors/id/P/PS/PSIXDISTS/Perl6/? is there a command line switch?
17:49 stmuk_ --cpan is actually metacpan?
17:51 ugexe --cpan is jdv79's metacpan fork with perl6 support
17:51 stmuk_ ah yeah I just was looking at port 5001 on hack
17:52 ugexe PSIXDISTS cant be properly consumed until its known how the module name, ver, and auth are stored in the file path
17:54 ugexe for instance: there are 3 variants of Distribution Foo: Foo:auth<github:FROGGS>:ver<1.0>, Foo:auth<github:FROGGS>:ver<1.2>, and Foo:auth<github:ugexe>:ver<1.2>
17:54 stmuk_ sure
17:57 mst I would presume that, currently, you're looking at
17:58 mst auth<PSIXDISTS>, then name and ver extracted from tarball name
17:59 ugexe auth isn't where its currently coming from, its the initial origin
18:00 ugexe so when taking multiple ecosystems into account (current perl6 ecosystem + cpan) you know when its really the same distribution
18:00 stmuk_ much as I hate them I'm tempted to suggest the SHA1 hash :/ ugly urls though
18:00 ugexe :auth<my@email.com> is probably a better default for people to use
18:10 ugexe the sha1 doesnt give you anything to index off of. the default My-Module-$ver.tar.gz lets you match on My::Module:ver<1.*> with just a file listing
18:14 stmuk_ wouldn't the index use the .meta files? eg. http://www.cpan.org/authors/id/P/PS/PSIXDISTS/Perl6/ANTLR4-0.000.001.meta
18:15 mst well, the real answer here is "I don't think we really know yet, that's why PSIXDISTS exists to start experimenting"
18:15 mst perl5's meta, btw, is trialing an x_authority meta key
18:15 ugexe if you were creating some index elsewhere you would. but if its just built into a client then they'd have to download the meta for every distribution just to search
18:15 mst maybe perl6 could do similarly and then what stmuk says
18:17 ugexe hmm the re-versioning makes it impossible to work with another ecosystem
18:17 stmuk_ not a great long term solution but maybe fine for some proof of concept
18:18 ugexe thats 600+ http requests to update your module meta data
18:20 stmuk_ or another random port on hack! I think both zef and panda use different ones anyway
18:20 mst well, yes, having a dumb file store means you need an index as well
18:21 mst hence why metacpan6 is looking at building one
18:21 ugexe yeah, but if it could be encoded into the file name then you dont really need an index at the basic level
18:21 mst true.
18:22 mst that's why I was thinking PSIXDISTS should be considered the authority by default
18:22 mst maybe we need a filename or pathname standard for tarballs that encodes it?
18:23 ugexe name/ver/auth represent an immutable distribution though, which should be the same no matter where it comes from. auth is just some additional identifying bits
18:23 [Coke] what would rakudo's author be? rakudobug@perl.org ?
18:24 mst ugexe: right, and the cpan approach to that has historically been to consider it AUTH/Name-1.23.tar.gz
18:24 ugexe my auth could be `github:ugexe` on cpan or `cpan:ugexe` on a github distribution. you just use whatever identifies the original
18:25 ugexe right, which doesn't map with how perl6 is designed to handle this. yeah its just a start, but its not really usable
18:25 mst sure
18:26 mst this is why we made a start under a dedicated PAUSE id that doesn't actually matter
18:26 mst because it was bound to turn out to suck the first N attempts
18:26 ugexe like which version of Foo:ver<1.2> will win? they will both map to the same file name, despite having different auth
18:26 stmuk_ Net::HTTP:ver(v1.0):api<>:auth<github:ugexe>.tgz (well not that but encoded to work on Windows)
18:26 stmuk_ underscores whatever
18:27 mst I mean, I was under the impression the auth<> thing was more so you could identify which team you were following if there was a fork or whatever
18:27 ugexe yes it can be used for that
18:30 stmuk_ . o O ( or is it "authority" or "author" :/ )
18:30 ugexe :auth<> is not meant to tell you where you have to download from. its to search all the sources you can download from for it
18:31 ugexe i.e. you wouldnt have :auth<compunitrepo:ugexe> once you install a distribution
18:36 b2gills example.com:auth<ICANN:DynDns.com>
18:39 * nine fears its more gonna be like LeftPad:auth<Facebook:John Doe27>
18:40 ugexe cpan:JRANDOM:JSON-Fast:1.23 <- maybe puny encode this format into a file name so it can be round tripped back to the original
18:42 mst ugexe: if you have an alternative proposal for PSIXDISTS filenames that you want us to try, we can always stick said files under 'exp1' or something
18:42 mst then if it doesn't work, we design the next experiment, and stick those in 'exp2/'
18:42 mst etc.
18:45 ugexe cpan:JRANDOM:JSON-Fast:1.23 <- This is a s22 distribution identity btw (not to be confused with a module identity of JSON::Fast:ver<1.23>:auth<cpan:JRANDOM>)
18:46 stmuk_ colons don't work in windows filenames
18:46 mst and < and > in a filename on *n?x is going to induce aneurysms
18:46 ugexe yeah, hence punycoding it or whatever first
18:50 nine File systems in general already have means to separate names into parts. They are called directory separators. So why not just AUTH/VER/SHORT-NAME.tgz?
18:51 mst that would, indeed, seem simpler to me.
18:51 ugexe that works but the current situation is putting them all under PSIXDISTS instead of the original auth from the meta
18:51 mst argh
18:52 mst you can still do that INSIDE there
18:52 mst you already told me PSIXDISTS isn't an acceptable auth anyway
18:52 mst PSIXDISTS/Perl6/github.ugexe/1.23/Foo-Bar.tar.gz
18:52 ugexe oh ok
18:53 nine Or maybe PSIXDISTS/Perl6/github.ugexe/Foo-Bar/1.23.tar.gz
18:53 mst and then all you have to do is, assuming you want to, double check that PSIXDISTS has somehow been granted 'authority' to upload for github.ugexe
18:53 mst oh, also, this still won't help you at all and you'll still need to read the .meta files
18:53 mst since Foo-Bar could contain Foo::Bar and Foo::Baz
18:53 ugexe i'll play devils advocate here and say its nice to have all that info in the file name itself so that you can have all your distributions in a single directory without having to recurse multiple times to see what all you have
18:53 mst and now you need to read the meta file for 'use Foo::Baz;'
18:54 mst so I'm not sure what we're gaining here anyway except extra moving parts
18:54 ugexe you dont have to search the provided modules neccesarily if you find a matching distribution
18:55 mst unless we say 'Foo-Bar.tar.gz' must only contain namespaces starting /^Foo::Bar/
19:00 ugexe i could be searching for a specific distribution, Foo-Bar, that does not provide neccesarily a Foo::Bar. if I otherwise ask for either a distribution or module then yes it has to search the meta data. default behavior is just to search both which is sane. but if they specify the identity using the distribution format `blah install cpan:JRANDOM:Foo-Bar:1.2` it should only search for that distribution
19:00 stmuk_ or just append the usual SHA1 hash as a suffix to the tar.gz and the uploading process to PSIXDISTS creates a meta.meta file of the .meta files
19:01 ugexe if they ask for `blah install Foo::Bar` or `blah install Foo::Bar:auth<cpan:JRANDOM>:ver<1.2>` then it would need to search provided modules
19:01 ugexe wrap that long name with quotes naturally
19:16 ugexe the fact we've been using '::' in our distribution name separators kinda sucks because it implies such a module might be provided
19:17 mst at this point, PAUSE requires that a Foo-Bar dist to be indexed provides Foo::Bar
19:17 mst well, or at least it requires that the uploader has permissions for Foo::Bar
19:17 mst you could theoretically acquire said permissions separately
19:17 mst but ideally, if you did that, a small gnome would exit the back of your machine and hit you with a mallet
19:29 ugexe there are distributions without *any* provides at all. they are just for their bin scripts (i presume anyway)
19:29 ugexe https://github.com/ugexe/Perl6-ecosystems/blob/master/p6c.json#L63
20:14 nine Considering the advantages of precompilation, such distributions should be exceedingly rare. Scripts should really just be thin wrappers around modules
20:15 ugexe nine: i agree. maybe we can automate this https://github.com/ugexe/zef/blob/master/bin/zef
20:16 ugexe thats so nearly all its code is precompiled
20:16 ugexe but what if the wrapper just created something like `use <resources/bin/script>`
20:17 nine MAIN functions
20:18 mst this is why perl5's tradition now is to have App::nameofscript
20:19 ugexe you can precompile any perl6 code, you just need a perl6 entry point. so you precompile bin scripts (that are perl6 code at least) and then have the wrapper act as the sole perl6 entry point
20:21 ugexe it doesnt just have to be MAIN functions of course, thats just what zef uses that trick for
20:22 leont joined #perl6-toolchain
21:19 leont_ joined #perl6-toolchain
21:35 ugexe stmuk_: `perl6 -e "my $file = 'Foo:Bar.txt'; say $file.IO.spurt('hello'); say $file.IO.slurp"` this actually works on windows. It just wont show up in Explorer or cmd.exe /dir heh
21:36 ugexe :: doesn't work though
22:08 leont_ joined #perl6-toolchain
23:36 stmuk_ oh thats interesting
23:40 stmuk_ https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
23:40 stmuk_ quite a long list of reserved chars

| Channels | #perl6-toolchain index | Today | | Search | Google Search | Plain-Text | summary