09:16 sena_kun joined 09:30 sena_kun left
Geth rakudo/main: c81d9cfe86 | (Elizabeth Mattijsen)++ | 3 files
Re-imagine .polymod as an iterator

rather than a loop with "gather". Advantages:
  - is about 1.8x as fast
  - actual iterator lives in the Rakudo::Iterator class
  - a value of 1 (aka mod identity) also stops the .polymod, instead
   of continuing and potentially hanging
Fixes #4523
09:30
roast: bd0d3e068a | (Elizabeth Mattijsen)++ | S32-num/polymod.t
Add tests for #4523

And a test for non-integer .polymod, which apparently didn't exist yet
09:31
patrickb PSA: I'm moving this weekend. I'm pretty sure I can't do the binary release today or tomorrow. 14:21
lizmat patrickb: understood, safe moving! 15:58
Geth rakudo/main: da291b5501 | (Elizabeth Mattijsen)++ | src/core.c/Cool.rakumod
Simplify Cool.substr-eq candidates

Because new-disp is much better at handling these cases and it will make it easier to add new Str.substr-eq candidates
16:29
[Coke] jdv++ 17:11
Geth rakudo/main: c32cb4f6a3 | (Elizabeth Mattijsen)++ | src/core.c/Str.rakumod
Allow *-x (aka a Callable) for position in .substr-eq

As suggested in #1720
17:14
18:07 sena_kun joined 19:07 dogbert11 left
ab5tract I need a little help figuring out how to resolve core-provided libraries to their contents 19:42
Here's what I have so far:
m: my $repo = CompUnit::RepositoryRegistry.repository-for-name("core"); my $test = $repo.candidates("Test").head; dd repo-files => $repo.files("lib/Test.rakumod"); $repo.distribution($test.id).meta<provides><Test><lib/Test.rakumod><file>.IO.e ==> say()
camelia :repo-files(Empty)
False
ab5tract m: my $repo = CompUnit::RepositoryRegistry.repository-for-name("core"); my $test = $repo.candidates("Test").head; dd repo-files => $repo.files("lib/Test.rakumod"); $repo.distribution($test.id).meta<provides><Test><lib/Test.rakumod><file>.IO ==> say() 19:43
camelia :repo-files(Empty)
"72A28666F10B17ED5620989C3CAF776808C14EA3".IO
ab5tract Sorry, this is a better example: 19:46
m: my $repo = CompUnit::RepositoryRegistry.repository-for-name("core"); my $test = $repo.candidates("Test").head; dd repo-files => $repo.files("lib/Test.rakumod"); dd source => $test.meta<source>, :try-read((try $test.read-dist()($test.meta<source>)) // "ERROR")
camelia :repo-files(Empty)
:source("72A28666F10B17ED5620989C3CAF776808C14EA3")
:try-read("ERROR")
ab5tract in the stacktrace for `$test.read-dist`, it's clear that it is resolving `source` to an actual path, even though it's only outputting the id here 19:47
an actual nonexistent path, rather
ugexe it won't be entirely simple because whatever is backing a CUR might not be a file, it could be a socket for instance. so the code is written as such 19:48
source is the sha1 part of the path
it needs to be prefixed with the CURI prefix and /source or some such
ab5tract This is an example exception from read-dist:
Failed to open file /home/camelia/rakudo-m-inst-2/share/perl6/core/dist/72A28666F10B17ED5620989C3CAF776808C14EA3: No such file or directory 19:49
there's nothing that matches the sha1 inside of `./share/perl6` locally either
ugexe i guess the first thing that im thinking is i dont know what read-dist is so i assume its an implementation detail as well
$.prefix.add('sources').add($source-file-name); 19:51
i guess i would have expected it there
ab5tract repo.prefix.add("/sources").add($test.meta<source>).IO.slurp.say 19:52
this seems to work
thanks ugexe
ugexe my $repo = CompUnit::RepositoryRegistry.repository-for-name("core"); my @files = $repo.installed.map(-> $d { $d.meta<provides>.values.map(-> $v { $v.keys[0] => $d.content($v.keys[0]).IO.absolute }) }).flat; for @files { say $_.raku } 20:01
evalable6 "lib/RakuDoc/To/Text.rakumod" => "/tmp/whatever…
ugexe, Full output: gist.github.com/57c43b55602ca7f185...ddf236ffa5
ugexe I'd probably write it more like that, although as i mentioned extracting a path from the results of $dist.content(...) isn't specced and won't work for e.g. CompUnit::Repository::Github 20:02
also having to do the .keys[0] thing isn't ideal. it is unfortunate we mutate the meta data on install in away that changes the data structure 20:03
(see github.com/rakudo/rakudo/pull/2778 for an attempt I made to fix that) 20:05
ab5tract www.irccloud.com/pastebin/PxfgDP5C/ 20:30
though I guess `CompUnit::*` don't live in core or else don't work this way because they don't resolve 20:32
Let me try with your version
thanks for the snippet ugexe, that's way nicer than keeping track of an a priori list of modules 20:34
ugexe my snippet should continue working if we split the core modules into cohesive distributions as well 20:49
the distribution stuff only works for modules/distributions, i.e. things under lib/. there is nothing for looking up stuff in src/core* 20:50
you cant `use IO::Path;` for instance 20:51
ab5tract right, that will require a different approach. but I think it won't be too much work to offer the option of adding a rakudo src directory for looking up files under `src/` 21:17
ugexe what are you trying to do more precisely that would need to know about stuff in src? 21:18
ab5tract just as an option. It's probably not super-helpful for an end user, but it should also be mostly trivial to wire up. 21:49
Wiring up the docs is probably more useful, ultimately
23:26 sena_kun left