🦋 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.
tbrowder is zef going to start enforcing the mandatory listing of all module dependencies at some point? 00:12
and i assume that's to be in the META6.json? 00:13
[Coke] theoretically it's enforced now because the tests will fail if you don't declare everything you're using. (assuming a reasonable test suite) 00:16
I would expect maybe mi6 to add that as a check. 00:17
ugexe even then its still kind of a fragile check 00:29
ugexe since all of the dependencies may not be known at compile time even 00:30
ugexe in the code 00:30
i.e. stuff like `require ::($my_module)`
Xliff Does Raku have a browser detection module? 10:34
Xliff Huh! Well, I think I just got Repl.It to write me one... in Raku! 10:50
lizmat nice 10:51
Xliff gist.github.com/Xliff/e2d88cb176f5...54ee19bb27 11:04
Code is untested. This will be handled later today.
lizmat too bad it is using the approach of hashes (very Perl like) instead of creating a Browser class with attributes 11:09
Xliff Yeah. I suspect much of the training data is from Perl. 11:11
I'll be making those changes later today, I suppose.
melezhik . 12:08
ugexe: one day you told me there is way to speed up zef install process by asking not compile modules? 12:09
zef install still consumes a lot of memory or/and cpu for modules with dependencies - even for relatively small dependency trees like github.com/melezhik/Sparrow6/blob/...META6.json 12:11
that results in killing by OOM by kernel my qemu instances when I try to install Sparrow6 on it ... any thoughts?
speed up = make it less consuming of system resources like CPU/RAM 12:12
there is workaround for that split installation process by smaller chunks - like - zef install A, zef install B, etc - but this kills the very idea of handling dependecies by zef ... 12:13
librasteve Xliff: I wonder if browser detection (to logs?) is a good candidate for Cro middleware? 13:53
tellable6 librasteve, I'll pass your message to Xliff
ugexe melezhik: you can use `--/precompile-install` but if you're going to run that code (for e.g. tests) then that precompilation still has to happen, it would just happen at runtime instead 14:02
tellable6 ugexe, I'll pass your message to melezhik
librasteve getting an error with the new REPL module ... REPL is a builtin type, not an external module 14:04
zef install REPL fine; on raku latest 2025.02 on macOS 14:05
golf => use REPL; repl;
do I need use v.6.PREVIEW; maybe? 14:06
tried use v6.e.PREVIEW; still same error mesg ;-(
oh - turns out don't need the use REPL; line since REPL is, err a builtin type, not an external module - red face 14:09
I've just been categorizing some transactions on a spreadsheet by read CSV, use a persistent Hash to assign a category in the next column and write CSV ... but I needed the category map to be reusable every month and to be tweakable as categories and payees come and go 14:45
librasteve_ www.irccloud.com/pastebin/IOEmDB48 14:47
librasteve turns out that lizmat REPL is an awesome way to interactively monkey with my cat map and then just write as a .raku to a file - amazing ... kudos to lizmat for inventing something I didn't even know I needed! 14:48
tonyo doing some spot checking now but all the missing dists will show up shortly in the zef index 14:58
tonyo last step before a soft release of the updated eco system, blog explaining the changes, and full release 14:59
this is required for zef eco while we transition to the release ecosystem code so the lambdas will still work but will have the same "i don't know what the error is" issue we have today. planned support for the lambdas will last another six or so months once the new stuff is fully released 15:03
melezhik. ugexe: yeah , this is what I thought, I just wonder why is zef so slow on that aspect in general ? Just thinking 🤔 out loud … 19:46
tellable6 2025-03-21T14:02:38Z #raku <ugexe> melezhik: you can use `--/precompile-install` but if you're going to run that code (for e.g. tests) then that precompilation still has to happen, it would just happen at runtime instead
ugexe melezhik: all those slow bits occur inside of rakudo. the actual install+precompile is basically done with a single call to CompUnit::Repository::Installation.install(...). There isn't anything zef can do to speed up what happens inside of that function 20:16
wayland Here's an interesting one: I'm looping over some files containing tests, and printing something between each: for glob('*.rakutest').sort -> $script { say "=== $script ==="; shell './' ~ $script; } 20:55
The weird thing is that it shows the first === line, then the output of all the tests from all 3 files, and finally the other two === lines
Anyone have any ideas about what might be happening? 20:56
[Coke] is the sctipt output to stderr, perhaps? 21:04
wayland I tried adding 2>&1 at the end of the script execution, and it made no difference 21:06
ugexe shell isn't blocking 21:17
wayland ugexe: So why doesn't it print all three === lines, and then the output? 21:18
And, is there a way I can wait for shell to be done? 21:19
ugexe sink the result of shell 21:20
wayland Oh, I see, I put it in a loop, and check the return value of shell.Bool
ugexe that is one way
wayland ugexe: Doesn't my script already run shell in a sink context? 21:21
ugexe i honestly dont know, maybe it would get sunk now. in the old days it would not have been 21:22
it looks like it would be getting sunk afterall 21:24
it might still be worth checking if adding a sink prefix ala `sink shell ...` just to see
if that doesn't fix it then its going to be a buffering issue. i see this alot in CI tests for zef where there is a lot of stdout and stderr text that is expected to be shown in a deterministic order, but it sometimes isnt 21:28
librasteve wayland: instead of say maybe try note or even warn “thing”; $*ERR.flush; 21:41
tonyo is parallel precomp working now or unreliable by nature? 21:52
we had that dependency thing in like 2014 or 15 iirc
ugexe github.com/rakudo/rakudo/blob/f3ae...#L348-L364 22:06
wayland Thanks all! I added some .flushes as per librasteve's suggestion, and that seems to have resolved things. So ugexe was right, it was buffering. 22:16
Specifically, I added $*OUT.flush; after the "say" statement 22:20
librasteve 👍 22:26
ugexe you might be able to just set `$*OUT.out-buffer = 1` as well 22:39
although that will degrade performance of output if you are outputting a lot
wayland Good thought, but this is currently the only place that needs it, so I'm just going to leave it the way it is. 23:37