🦋 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.
[Coke] can you golf it and put it in a gist? 00:52
roguerakudev This replicates it: pastebin.com/7UtLZbRA 02:15
Oh, I just needed to add is export... still, a rather misleading error 02:19
MasterDuke yeah, that's probably worthy of at least an LTA error message bug report 02:22
guifa can a class prevent a subclass from overriding a method? I thought only would do it but it seems not 03:19
roguerakudev is it not possible to have named params in sub EXPORT? I have a module with an export sub that takes Bool :$with-internals, but upon importing it like use ModuleName :with-internals; I get Error while importing from 'ModuleName': no such tag 'with-internals' 04:59
lizmat clickbaits rakudoweekly.blog/2023/06/26/2023-...damn-cool/ 11:01
skyb0rg007 What part of the Rakudo compilation process creates the ~/.raku directory? It's currently filled with precompilation files and I'm trying to move it somewhere else. 14:47
dakkar github.com/rakudo/rakudo/blob/mast...#L160-L172 looks like it's this bit of code, and I don't think there's a decent way of telling rakudo to put it somewhere else 14:52
lizmat skyb0rg007 you can nuke the ~/.raku/precomp dir at any time
it will re-create precomps as needed, as long as it can be created again
dakkar well… `HOME=/not/there raku` (2023.02) says `I ran into a problem while trying to set up Readline: Failed to create directory '/not/there/.raku/short' with mode '0o777': Failed to mkdir: No such file or directory` 14:54
then the same for other line-editor libraries, then shows the prompt without having loaded any
(I have Readline and Linenoise installed)
so, at least on my build, not being able to create that compunit repository breaks things 14:55
(should I report it as a bug?)
lizmat probably ugexe ?
dakkar oh, probably smaller case: `raku -MNot::There -e 1` dies (correctly) with `Could not find Not::There in…`; `HOME=/not/there raku -MNot::There -e 1` dies with `Failed to create directory '/not/there/.raku/short' with mode '0o777'` 14:59
(just to make sure it's not related to the particular line-edit libraries) 15:00
skyb0rg007 lizmat I'd like to avoid needing to constantly remove the file, my hope is that there's an environment variable I can set to make rakudo put the precomp directory under ~/.cache/raku or something similar 15:05
lizmat looking at the code dakkar pointed to, setting the HOME environment variable should wor? 15:06
*work?
skyb0rg007 I don't consider that a possibility, since messing with $HOME has a lot of problems (especially if I use raku to launch a command subprocess) 15:10
dakkar yes, that 15:13
skyb0rg007 Do you know what part of the compilation process creates ~/.raku? If there isn't any way to change that now I can try to make a PR since this is such a simple feature add. 15:14
It may be set with the initialization of $*REPO but I'm not sure 15:15
dakkar yes, it's the code I linked to, above 15:16
skyb0rg007 Thanks, I missed it. Hmmm that definitely looks hard-coded. 15:17
dakkar I see two distinct problems, there: 1) it should be configurable (both at rakudo-build-time, and at runtime via env variables) 2) failure do `mkdir` it should not kill the compiler (may warn and disable precomp, sure) 15:18
skyb0rg007 Is "disabling precompilation" possible? I thought that was necessary to handle Raku's staging 15:22
ugexe its a core repository that is expected to exist, that is why it dies 15:29
gist.github.com/ugexe/e4ab88096f32...8c51ea9aea i wrote a draft grant to do something that would solve this 15:31
one could also write a custom CUR that skips the first repo (home) and provides a install target at a different location. but that is an exercise left to the reader 15:34
dakkar ugexe++ # Configurable Raku repository chain 15:46
skyb0rg007 Is it possible to just add a check "Don't create a repository if it doesn't exist"? That seems much easier to implement (ie. I could do it this weekend) 15:52
dakkar that would be sub-optimal: `~/.raku/` would generally not exist on first use, and creating it is *generally* the right behaviour 15:54
otherwise rakudo doesn't have any place to store precompiled modules (or a default place for user-installed modules) 15:55
ugexe it would also break when users do `rm -rf ~/.raku` to clear (in this case the home) a given repository
dakkar (sometimes I get the impression that most problems with straightforward solutions have been solved already, and we're now left with the fiddly&complicated ones) 15:56
ugexe i'm pretty sure in the commit history somewhere is a commit that removed the automatic directory creation, it broke stuff for people, and then it was fixed
refixed rather
skyb0rg007 How about changing the default from ~/.raku to $XDG_DATA_HOME/raku (using old path if it exists)? That models modern Linux programs more closel 16:08
closely.
Though precompilation files should really be under $XDG_CACHE_HOME, while the home repo should be under $XDG_DATA_HOME... 16:10
ugexe we changed from ~/.perl6 to ~/.raku so technically i don't think using a different location is out of the question, although weather to use xdg or not is a different question 16:34
skyb0rg007 I definitely think XDG base directory specifications are the way to go if any changes are made, and should probably use a better default on Windows too (such as %LOCALAPPDATA%\raku). That way users have a much better time with migrating computers and backing up directories since everything is organized by how its used. 16:38
tonyo rf: did that work for you? 16:52
tellable6 tonyo, I'll pass your message to rf