🦋 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.
00:23 guifa_ joined 00:26 guifa left 01:01 epony left 01:02 epony joined 01:16 jpn left 01:27 sftp left, sftp_ joined, sftp_ is now known as sftp 01:48 Sgeo joined 02:27 kylese left, kylese joined 03:00 jpn joined 03:05 jpn left 03:15 kylese left, kylese joined
Xliff [Coke]: Can you install the libgdata package? 03:17
Also, what are the library names for libgio and libglib?
I need the full names.
Also need the name of your current version of the OS.
03:21 jpn joined 03:25 jpn left 03:32 epony left 03:35 epony joined 04:12 jpn joined 04:17 jpn left 05:13 jpn joined 05:18 jpn left
Xliff How can I wait on key input in Raku? I'd rather just tap a key and not hit return. 05:52
06:13 mark22k left 06:14 jpn joined 06:15 mark22k joined 06:19 jpn left 06:28 mark22k left 06:30 mark22k joined 06:34 epony left 06:59 kylese left 07:03 kylese joined 07:15 jpn joined 07:22 jpn left 07:28 rba left, rba joined
Xliff A: use Terminal::UI 'ui'; my $k = ui.get-key; ui-shutdown 07:33
07:33 Xliff left 08:16 jpn joined 08:21 jpn left 08:29 jpn joined 08:36 sena_kun joined 08:41 jpn left 08:45 Sgeo left
Voldenet you can do that without a module if you're on linux 08:54
> LEAVE qx/stty icanon echo/; qx/stty -icanon -echo/; $*IN.read(1)
08:58 jpn joined 09:12 dakkar joined 10:01 laidback_01_ joined 10:02 laidback_01 left 10:15 sena_kun left 11:06 abraxxa joined 11:15 laidback_01_ left 11:17 laidback_01_ joined 11:28 abraxxa left
tbrowder__ hi, i have 2 hashes: %a{$k}{$id} = $unique-value and %b... of the same structure. 11:30
11:30 abraxxa joined
tbrowder__ i know i can merge them into %c with 2 loops, but i think a map is possible. can someone please show that? i haven't been able to wrap my mind around maps yet. 11:33
i meant to say merge them with, say, merging %b into %a 11:35
one loop
i can do that. 11:36
12:08 CIAvash joined
kjp tbrowder: You can't get away with something simpler like "my %c = Hash.new(%a.Slip, %b.Slip)", or do you need them merged at a lower level? 12:09
CIAvash can't you just do: `my %c = %a, %b`? 12:13
lizmat no, that won't merge the inner hashes 12:15
sadly, it looks like raku.land/cpan:TYIL/Hash::Merge also isn't the answer 12:16
12:30 epony joined
CIAvash maybe something like `sub merge_hashes (%a, %b) { %a.map: { if .value ~~ Hash { |merge_hashes .value, %b{.key} } else { .key => %b{.key} // .value } } }` 12:38
tbrowder__ ok, just one loop does fine, and much easier for me to visualize. and my real use case has to merge 4+ hashes, so only linear time O(total number of hash elements to add) 12:41
would be great for multicore 12:42
but in truth hash sizes are small 12:43
ab5tract Xliff: you can also use `Terminal::Print::Input` ... it should probably have been it's own module 12:44
tellable6 ab5tract, I'll pass your message to Xliff
tbrowder__ is there a raku module that could let me see a pdf doc rendered in a terminal? 12:45
that would be very cool 12:46
ah, Terminal::Widgets has possibilities 13:03
request submitted as an issue 13:08
14:03 kst left 14:16 hudo joined, jgaz joined 14:39 CIAvash left
[Coke] xliff: did 'brew install libgdata'. Do you need full names? I thought raku was smart about that. 15:20
tellable6 [Coke], I'll pass your message to Xliff
[Coke] xliff: os is 14.1.2 which is "Sonoma", I think. 15:21
tellable6 [Coke], I'll pass your message to Xliff
[Coke] xliff: names: gist.github.com/coke/a1512fde67908...a98a18b3b8 15:25
tellable6 [Coke], I'll pass your message to Xliff
15:33 jpn left 15:58 jpn joined 15:59 kst joined 16:07 melezhik joined
melezhik o/ 16:07
any chance to speed up zef install ?
zef install --/test github.com/melezhik/sparky.git takes a lot of time on a fresh box 16:08
^^ ugexe
even with disabled tests
I know there are some "magic" flags for that )) 16:09
actually the VM has several CPU cores if it helps for parallelization
16:21 melezhik left
jdv that's more or less why i was asking about zef parallelization the other day 16:33
trying to install the deps for something ridiculous like blin takes a very long time
[Coke] to be fair, Sparky does have a lot of deps. 17:38
zef-deps Sparky | wc -l ;# 212 17:39
159 without whitespace lines, sorry
17:52 dakkar left
[Coke] zef-deps Sparky | grep -v '^$' | sed -e 's/^ +//g' | sed -e 's/ ...//g' | sort -u | wc -l # 70 18:01
^^ I wonder if I want a command line arg to zef-deps that gives us the list just after the sort.
18:05 derpydoo joined 18:07 jpn left 18:09 tejr left 18:14 tejr joined 18:22 sena_kun joined 18:23 jpn joined 19:54 jpn left 19:55 maylay left 19:57 abraxxa left 20:45 jpn joined 20:52 jpn left 20:55 maylay joined 20:58 jpn joined
ugexe the slowness is precompilation, which is outside of the control of the package manager 21:57
tellable6 2024-01-28T15:21:19Z #raku-dev <vrurg> ugexe There is a bit more to the parallelizing of module loading: gist.github.com/vrurg/37e9b23a29d2...034d79b8d1
ugexe github.com/rakudo/rakudo/blob/d446...#L220-L230 21:58
you can see here that you the actual "install" can only be done serially as well
melezhik: is it any faster with github.com/rakudo/rakudo/pull/5425 ? you could also try adding a `:degree(...)` to the `$to-precompile.race(:batch(1)).map:` to however many cores you want it to use. it didn't end up speeding things up when i tried that PR, but theoretically it seems like it should improve precompilation on install time 22:09
tellable6 ugexe, I'll pass your message to melezhik
22:10 jpn left
librasteve so you can go something like zef install --no-precomp ? 22:25
just a thought that deferring precomp could speed up the install, moving the compilation to execution time (so would need --/test also) and thus may avoid compile of uncovered units and allow compiler parallelization during the run 22:49
23:00 sena_kun left 23:02 jpn joined 23:14 jpn left
ugexe yeah could be. i just wrote up github.com/ugexe/zef/issues/547 which has instructions for how to implement it in zef 23:16
which mostly involves passing a bool through various wrappers :)
when running `zef install --/test` specifically though (i.e. install without testing) I think `RAKUDO_NO_PRECOMPILATION=1 zef install --/test ...` might work 23:24
23:32 TieUpYourCamel left 23:57 jpn joined