This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:09 deadmarshal_ left 00:28 deadmarshal_ joined 01:33 Tirifto_ joined 01:34 Tirifto left 09:53 stanrifkin joined
stanrifkin Terminal::LineEditor does not support CTRL-L for clearing the screen, right? 11:16
13:54 lizmat left, lizmat_ left, lizmat joined
melezhik. Guest9: you can launch qemu box and then run some test scenarios on it, then just drop it. Useful for Linux distributions testing 16:06
Welemtam Hello ! Still on windows ( 😇 ), I'm trying to run a program from a raku script, but asynchronously (I want my script to be able to exit after it has run the command) : raku # (For example) my Str constant $DIFF-TOOL = 'C:\Program Files\WinMerge\WinMergeU.exe'; run $DIFF-TOOL, $full-file-path, $network-path; With "run" it works, but synchronously (the script waits for winmerge.exe to exit) - as 16:22
expected ... If I do this : my $proc = Proc::Async.new($DIFF-TOOL, $full-file-path, $network-path); $proc.start; The process is created but killed as soon as the main script exits (confirmed with a sleep()) Do someone have an idea? Thank you!
librasteve my rough idea is that your main script starts in a process that then spawns a new process with Proc::Async and that when it exits, it tells the OS to clean up and that cleans up all the spawned processes too 17:03
idk windows, but for example on ubuntu if I start a new cro instance in a terminal and then close the terminal then the cro service is also killed - the way to prevent this in unix is with nohup 17:04
based on my extensive research www.perplexity.ai/search/windows-n...wTTUUARdQ, I would suggest use qx and start (but then that's windows specific) or WSL 17:06
Welemtam Thanks, I will try with qx soon. I was expecting something like a fork/exec semantics ( == CreateProcess on windows), in which when you run some child process, It doesn't die when the parent process dies. In python it's straightforward using subprocess.popen(), and relatively abstracted from which OS the script is run on. Since Raku offers run, shell, ... primitives I believe this shouldn't be impossible 18:27
to express in an OS-independent way
rcmlz When you start a parallel task in you script would it not make sense to use ‚await‘ to ensure that the parallel process has time to complete? 18:46
19:23 DarthGandalf left 19:24 DarthGandalf joined
Welemtam My use case is a script launch_XXX.raku where XXX is any GUI application ; the script is just here to configure the command line of XXX, then run it. So when I type : raku launch_XXX.raku ... in my shell, I expect XXX to open, and Raku to exit, while I can play with my GUI application as long as I need 19:38
19:53 notna joined
The problem can be summed up as "how to make myChild.exe outlive raku.exe"... even with Proc::Async.new(...).start, the Raku interpreter kills its children when quitting (It seems to be a deliberate choice from raku since it's not what happens after doing a simple fork); it probably makes sense in most cases but it would be nice if there were some general solution to "detach" the spawned process. 19:54
cdn.discordapp.com/attachments/768...2c45d&
21:00 notna left