Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
00:00 reportable6 left, reportable6 joined 01:15 uzl[m] joined 01:38 samcv left, samcv joined 01:45 epony left 03:27 epony joined 03:31 epony left 03:36 epony joined 03:47 epony left 06:00 reportable6 left 06:02 reportable6 joined
Woodi timo1: something like try { use IPC::Cmd; }; catch { say "IPC::Cmd not found"; exit; } in Configure.pl ? 06:44
07:39 sena_kun joined
Woodi just learned how pkg-config works 08:11
08:54 sena_kun left
timo1 `eval { use IPC::Cmd } or say "oh no";` seems to do be the right way to spell that 09:08
nine No, that's wrong. eval returns the value of the last evaled statement and use doesn't return anything. It's `eval { use IPC::Cmd }; if ($@ ne '') { say "oh no"; }` 09:11
You know there's a reason we developed this Raku thing :D
timo1 i'd have just done "use Try::Tiny" but then i'd just get "could not find Try::Tiny in your @INC" 09:12
with your snippet the program won't compile ITher tho 09:14
either*
09:16 sena_kun joined
nine Oh darn, should have actually looked at the code. It's `eval 'use IPC::Cmd'; if ($@ ne '') { say "oh no"; }` 09:16
use is a compile time statement after all 09:17
timo1 so if i want to also use the module afterwards, i need to put the check in a BEGIN block as well so i can just "use IPC::Cmd" after it? 09:18
nine Ok, now we're getting to BEGIN { eval { require IPC::Cmd }; if ($@ ne '') { say "oh no"; exit 1 }; IPC::Cmd->import; } 09:20
timo1 i think instead of "exit 1" i want to output a custom error message followed by the regular error message that some users may be able to recognize and most users will be able to googlesearch 09:22
nine That's `say "oh no"`'s job. 09:23
timo1 oh, does "eval require" spit out the error message?
nine say { STDERR } "You seem to be missing the IPC::Cmd Perl module. Original error message: $@"; exit 1; 09:24
09:30 sena_kun left
timo1 stackoverflow.com/questions/116224...52_1162278 09:34
lol. lmao.
storage.aperture-labs.org/s/Kfng3qeEwjqqCBX nine would you do me the honor of a code review, and creating the pull requests, and also stealing all the credit? :) 10:16
Woodi use in perl5 is perfectly { lexical } ? 11:49
btw. Configure.pl is pretty "transaction script" approach :) 11:51
nine No, use in Perl is global 11:52
Woodi so maybe it is better to call simple helper scripts that return shell error or crash on lack of module ? 11:54
perfect would be some perl registry of installed modules but probably just filesystem searching is available ? 11:55
actually that helper scripts can be generated why needed, at least configure creates mini C programs to test stuff 11:59
nine The perfect is the enemy of the good :)
12:00 reportable6 left, reportable6 joined
timo1 i don't really see a reason to do it differently from what i put in these patches 12:39
14:00 MasterDuke joined 14:05 japhb joined
Woodi timo1: googling for checkin mods installed in Perl shows: perl -MMod::Name -e '' nice 14:36
timo1 how is that helpful 14:41
that'll mean we have to shell out, or at least exec a process
and there's no guarantee the user has a "perl" in PATH, for example if they used `/opt/myperl/bin/perl Configure.pl` which means we also need to substitute whatever perl was used to invoke the script 14:42
nine What would it solve anyway? 14:48
timo1 my patch, or woodi's suggestion for changing my patch? 14:53
nine Changing the patch 14:54
Woodi timo1: just another way and good to know...
MasterDuke timo1: nice new parse time. i want to upgrade my cpu also, but that would require new mb+ram also...and i want to get the performance upgrade for my car...and all these things cost money... 16:30
17:07 evalable6 left, linkable6 left 17:08 linkable6 joined, evalable6 joined 17:45 sena_kun joined 18:00 reportable6 left, reportable6 joined 19:23 linkable6 left, linkable6 joined 20:05 sena_kun left 20:06 sena_kun joined
timo1 MasterDuke: yeah i have been pushing the upgrade further and further and now i b0rked my old desktop and i couldn't stand not having one at all 20:23
Geth MoarVM/configure_warn_p5mod_missing: 3611bd43ff | (Timo Paulssen)++ | Configure.pl
Warn about missing perl5 mods in Configure instead of exploding make install
21:14
MoarVM: timo++ created pull request #1747:
Warn about missing perl5 mods in Configure instead of exploding make …
21:15
timo1 as not promised, i made pull requests! 21:19
21:31 timo1 is now known as timo 22:31 sena_kun left