🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
tonyo tbrowder__: are you trying to get the $?DISTRIBUTION of a dist? 01:53
or is that in the bin file? if it is then that's a known bug and the work around is to encapsulate all the functionality into a precomp'd lib/ file 01:54
japhb .tell Xliff Since we're going back and forth super slowly and I'm on really weird hours right now ... how about opening an issue in the GitHub repo for your questions, and we can have the discussion there? 02:54
tellable6 japhb, I'll pass your message to Xliff
tbrowder__ tonyo: i'm working on a Demo module and can examine an installed DISTRIBUTION just fine. i'm trying to recover from a failure when i attempt to access it incorrectly. the try/catch attempt is in the subroutine in the module code, not the bin file. 11:19
the purpose is to ga 11:20
*get working example for the docs
current code is in github/tbrowder/Demo.git 11:21
ugexe I'm failing to think of a situation where $?DISTRIBUTION.content(...) should be called in a way that both A) fails and B) is expected to potentially fail 12:13
ugexe either an incorrect path is being fed to it (and if so there is no reason to want this to be a runtime error, as a distribution is static) 12:14
or someone has deleted random files from the installation (deleting whatever file is being referenced in .content, but not the code containing the call to $?DISTIBUTION.content) 12:15
like you can't even install a distribution that lists a file that doesn't exist in its META6.json
so such a check doesn't really need to be able to work on installed distributions 12:16
what are you trying to use this check for? maybe we can suggest something more appropriate 12:21
because it feels like this might not be the right tool for this job
tbrowder__ well, that module is installed, the file exists, and the file is not referenced in the META6.json. hence the failure that i intentially expect a failure i would like to recover from with try/catch. if that's not possible, fine. 13:35
i'm trying to collect enough information to impove the docs regarding use of DISTRIBUTION and RESOURCES 13:36
between you and tonyo and lizmat, if it's possible to recover one of you will show us how. 13:38
the doc info will also improve try/catch handling with a real-world example 13:40
btw, i install it with, in top-level of the rrepo: "zef install . --force-install" 13:41
it gets installed in my personal store and $HOME/.raku/bin 13:42
ugexe I'm not sure .content is the right tool to check if a distribution contains some file 13:49
ugexe or at least you'd need to take an additional step such as trying to open the file 13:52
m: my $some-distribution = CompUnit::RepositoryRegistry.repository-for-name("core").candidates("Test").head; { CATCH { default { say "error: $_" } }; $some-distribution.content("lib/Test.rakumodX").open(:r) }
camelia Use of uninitialized value element of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
error: '/home/camelia/rakudo-m-inst-1/share/perl6/core/resources' is a directory, cannot d…
ugexe so that warning isn't ideal and could probably be fixed, but as you see we can indeed CATCH the error. additionally I am calling .content(...).open(:r) to test if the file exists 13:53
you can think of it like how IO::Handle.new(path => "some-non-existent-file") doesn't throw an error until you try to actually do something with it 13:54
in this case the .open()
sub resource-exists($path? --> Bool) is export { return False unless $path.defined; return so try $?DISTRIBUTION.content($path).open(:r); } 13:56
personally that's how i'd write your function... I wouldn't even bother with CATCH
hmm actually that needs to be adjusted to close handle when its done 13:57
sub resource-exists($path? --> Bool) is export { return False unless $path.defined; return so try $?DISTRIBUTION.content($path).open(:r).close; } 13:59
tbrowder__ ugexe: sorry, you’re right, that file is NOT in the distro, just the repo. i still want to recover. maybe chk contents of RESOURCES 14:20
drakonis buttondown.email/hillelwayne/archi...-for-clis/ i see y'alls got a new raku stan 14:23
ugexe if the file is not in the distro then it will not show up in %?RESOURCES when it is installed 14:31
if you find it *is* showing up, then you are doing something wrong 14:32
like including -Ilib or some such
%?RESOURCES and $?DISTRIBUTION are only for files included in the distribution 14:34
they are not made to interface with random files in e.g. a git repository
tbrowder__ ok, cool, and thnx for the try code 17:05
jdv where is the zoom info for the conf? i "got a ticket" but i don't see zoom infos. 18:22
gfldex .tell Xliff I got rewarded with "Stage mast : Object does not exist in serialization context", while building Rakudo. #raku-dev could not help. 18:34
tellable6 gfldex, I'll pass your message to Xliff
lizmat jdv you should have received the zoom link in email just now 20:03
jdv lizmat: thanks:) 20:12
lizmat ash made that happen, not me :-) 20:13
afk&
tbrowder__ lizmat: i, too, have a ticket to the raku conf, but i don't see a video link anywhere yet. is it in the links on the schedule? 20:47
ah, i see it now in new email 20:49
tbrowder__ hm, can't make all live sessions, but they are being recorded for youtube channel i assume 20:51
tonyo hope so, like last year 21:01
needed a reminder on how i did my slides last year
and i'll be live tomorrow, rather than recorded
tbrowder__ tonyo: good topic you're taking on--watching with much interest 21:32
tonyo thanks, if you have anything specific you'd like me to talk about please let me know
tbrowder__ aren't you and nick working on formalizing specs on module distros and such? 21:34
tbrowder__ for eventual, hm, module certification or more rigid requirements? 21:38
tonyo not too much on specs at the moment, we have two changes in the pike that'll speed up zef quite a bit. one is moving towards binary tree indexes for the zef ecosystem (50kx faster for exact and 400% for searching) and the other is removing a little precomp dance that happens currently. i don't know when either of those will land. the spec on the fez side is going to get a little more feedback-y in 22:02
that you'll be able to see logs for the failed uploads and we've been chatting a little about how to handle native deps and whether to recommend dist or module names in needs but that stuff will all be in the chat tomorrow
are the speakers tomorrow just taking control of the big zoom meeting? 22:03
leont mi6 is making my life difficult again. I want to cut a release, and I want it to ignore xt/ tests. Apparently it can't do that. 22:33
I managed to cut a release, I have no idea if it is correct or not because it doesn't let me check that either. 22:34
Apparently I should have done a --keep so I could check after the fact. 22:35
nemokosch what does --keep achieve 22:36
leont It keeps the tarball 22:40
nemokosch so basically a workaround 23:00