Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-toolchain, 2016-12-11

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

All times shown according to UTC.

Time Nick Message
00:37 ugexe nine: I'm trying to come up with a way to explain what a "Recomendation Engine + ContentStorage" and "CompUnit::Repository" are. I intend to make a point that they are both the same thing and could really be called a Distribution::Repository - both meant to resolve a distribution name - with the only (non interface) difference that a CompUnit::Repository may have the ability to precompile. Is this a
00:37 ugexe fair statement in your opinion?
00:38 ugexe thus Distribution implementations act as the intermediary between any two "Distribution::Repository"
00:39 ugexe and installing a distribution from CURI#site to CURI#home is essentially the same as MetaCPAN to CURI#site
02:20 tadzik joined #perl6-toolchain
02:50 ilbot3 joined #perl6-toolchain
02:50 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
07:28 domidumont joined #perl6-toolchain
07:33 domidumont joined #perl6-toolchain
08:35 nine ugexe: the way I see it a CompUnit::Repository is a place where we can load modules from. A ContentStorage is a place where we can install modules from and a Recommendation Engine is something that decides which of the candidates from the Content Storage we install.
09:25 domidumont joined #perl6-toolchain
12:30 FROGGS joined #perl6-toolchain
12:56 lizmat ugexe: the idea was to split the functionality that CPAN offers into separate parts
12:56 lizmat PAUSE is a dropbox for modules
12:56 lizmat CPAN provides a module list for when to install module Foo
12:56 lizmat PAUSE in this context is the content storage
12:57 lizmat CPAN in that context is the recommendation engine
12:57 lizmat some people would like to e.g. not be bothered by people taking modules hostage
12:57 lizmat like JSON::XS (if I'm not mistaken)
12:58 lizmat so, ideally, they would like to use a different recommendation engine, one that would supply CPanel::JSON::XS when asked for JSON::XS
12:58 lizmat in the current setup of PAUSE/CPAN, that's not possible
12:58 lizmat by providing a different recommendation engine, it would
12:58 lizmat hope that makes sense ?
18:13 Cheery joined #perl6-toolchain
18:32 stmuk joined #perl6-toolchain
18:55 ugexe nine: ah yes, I forgot loading. but this, too, seems optional. CUR::Panda does not load modules (in a sense), it just reorders some things so that a different CUR can try to load a module it just added - CUR::Panda could not act as a lone CUR.
18:55 ugexe CUR::Tar on the other hand does load modules, but is just some boilerplate around Distribution::Common::Tar. The boilerplate is essentially just CURAP with CompUnit::Loader.load-source-file($file) replaced with CompUnit::Loader.load-source($bytes).
18:55 ugexe This boilerplate can be reused around pretty much any Distribution implementation, because we can now do `$dist.content($path).slurp-rest(:bin)`. In this context a CUR is acting only as a mapping from `path-spec#foo` to Some::Distribution.new(...)
18:55 ugexe lizmat: I think I have a good understanding of the distinction between content storage and recommendation engine. However I am not sure if CPAN counts as a recommendation engine. I consider it the half of the recommendation engine that provides the package list, and another half is still needed to create the recommendation from that list.
18:55 ugexe MetaCPAN is an example I think demonstrates the entirely self-contained 'recommendation engine' concept, but a two component example would be a module manager parsing a package list (such as CPAN or p6 ecosystem) to determine what to actually fetch. I think the missing link for the JSON::XS/CPanel::JSON::XS example is actually the NYI `emulates`.
18:56 ugexe nine: lizmat: With all of that said, I'll go back to the original question "what is the difference between 'ContentStorage/Recommendation Engine' and a CUR"? Consider the simularities of the following: CURI.resolve('HTTP::Request'), Recommender.search('HTTP::Request'). The only real difference between them is that CURI.resolve shoves the distribution into a CompUnit object, but both still
18:56 ugexe theoretically have to abide by `emulates`, `supersedes`, `HTTP::Request:auth<foo>:ver<42>`, etc.
18:56 ugexe A CUR is actually implementing a recommendation engine, and this can be seen by installing `HTTP::Server` followed by `HTTP::UserAgent` - in this case HTTP::UserAgent is broken because it does `use HTTP::Request`, which also happens to be provided by `HTTP::Server` (this is actually fixed in HTTP::UserAgent by explicitly declaring the :auth<...>), and it tries to use the version from `HTTP::Server`.
18:56 ugexe I mention a broken example because it demonstrates that a CUR is not an infallible source of truth, and that it really is only making a recommendation.
20:04 mst lizmat: I wrote http://p3rl.org/JSON::MaybeXS to make that problem go away
20:49 lizmat ugexe: never thought about the similarities of a CUR and a recommendation engine, I would need to mull a bit over that
20:50 lizmat mst: thanks, but the point is really that you shouldn't have to make changes to your code to get around this issue
20:50 mst lizmat: I don't disagree; the 'authority' concept in perl6 is something I really like
20:51 lizmat mst: and since all module loading should/will be completely lexical, there is no way in Perl6 to preload the module "in place"
20:51 mst lizmat: hence why I kinda threw a chair when I discovered lexical module imports were NYI
20:51 lizmat yes, know the feeling: we're getting there  :-)
20:52 lizmat just over a year ago,  module management was the big elephant in the room
20:52 mst I think the look on my face when nine told me was roughly "I'm not sure if I want to kill you all or burst into tears"
20:52 lizmat we've gotten a lot further now  :-)
20:52 mst yes
20:52 mst the progress is deeply impressive

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