🦋 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.
antononcube weekly: youtu.be/fwQrQyWC7R0 02:31
notable6 antononcube, Noted! (weekly)
lizmat weekly: raku-advent.blog/2024/12/09/day-9-...-the-year/ 10:03
notable6 lizmat, Noted! (weekly)
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/12/09/2024-...kduckcool/ 12:54
patrickb lizmat: The nativecallcast issue fix was by timo. I just merged the PR. 14:49
[Coke] is our raku.land maintainer here? 16:37
guifa Although I can imagine ugexe saying (and me agreeing with him!) that it sounds like a terrible idea.... 16:40
I recently found if you have a very large file in resources install will hang 16:41
(very large = > 2 GB, haven't tested to see if 2 GB is a threshold though)
ugexe what is the output when it hangs 16:50
the code for moving files from resources isn't very complicated - it slurps from the original file and then spurts it into a different file (see github.com/rakudo/rakudo/blob/9bf3...306-L317). Maybe that can help golf it down? 16:52
finanalyst ugexe: I'm trying to get $?DISTRIBUTION to work but getting a Nil. 16:53
I'm using `zef install . -/precompile-install 16:54
timo does it also have to sha1 or something? though that should easily be doing many megabytes per second
ugexe finanalyst: without looking at code i don't know what to tell you 16:55
finanalyst multi sub MAIN( 16:56
        Bool :version(:$v)! #= Return version of distribution
) { say 'got here again';say $?DISTRIBUTION.meta if $v };
RenderDocs -v
got here again
Nil
The `RenderDocs -v` is the terminal invocation 16:57
ugexe do any compile time variables work there? 17:00
[Coke] I think you need $?DISTRIBUTION to be in a module, not a script
no?
(and would expect your MAIN to be in a script by default) 17:01
ugexe yeah that is true... i always put my script into a module so I didn't think to mention that
finanalyst [Coke] Ahhh
[Coke] checked docs.raku.org/language/variables#$?DISTRIBUTION and it's not called out there. 17:03
finanalyst ugexe: I was going from your SO answer. But assumed it would work in a script. Also looked at the docs.
[Coke] opened github.com/Raku/doc/issues/4541 17:05
finanalyst ugexe: Does `$?DISTRIBUTION.meta<version>` (as given in the SO answer) work? Docs gives `$?DISTRIBUTION.meta<ver>` 17:14
lizmat patrickb: fixed, thanks for the headsup 17:15
[Coke] both work 17:17
ugexe finanalyst: you should use the one you define in your META6.json, which would be `version`. For historical/backcompat reasons `ver` also gets added to the META6.json upon install, but prior to install it might not exist based on what type of Distribution object gets used to create it 17:18
[Coke] ah. changing my answer to "both work for me" :)
ugexe: so ver works 'sometimes' - does version work all the time? 17:31
ugexe what you put in the meta6.json will work all the time 17:32
if you put coca-cola in your meta6.json you can reference that
ver will conditionally be added, potentially based on what you put for version 17:33
in other words I would suggest pretending ver does not exist at all
although it is slightly confusing because for imports we use :ver<...> and not :version<...> 17:34
so in zef there is code like `use Zef::Foo:ver($?DISTRIBUTION.meta<version>)`
guifa ugexe: it wasn't giving a message. Just hung on the Installing... and in Activity Monitor I saw some massive amounts of read/write -- but at the 50-200 MB/sec, which shouldn't have taken 20+ min for a 2Gb file. That's when I cut it off. I was brushing up against a deadline so I did some work arounds (telling instructor to run with `use lib`, ugh) but I'll try to play around now that I have a month off of school and see if it was a fluke or if there's 23:05
something more
ugexe if i run mkfile -n 2g test.txt to create a 2gb file 23:10
raku -e 'my $in = "test.txt".IO.open(); my $out = "test2.txt".IO.open(:w); $out.spurt($in.slurp(:close), :close); say "done";'
MoarVM panic: Memory allocation failed; could not allocate 18446744065119617024 bytes
ugexe i guess that is a different issue since using :bin avoids it 23:20