Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
00:00 committable6 left, greppable6 left, bloatable6 left, sourceable6 left, quotable6 left, unicodable6 left, squashable6 left, nativecallable6 left, benchable6 left, tellable6 left, bisectable6 left, linkable6 left, evalable6 left, shareable6 left, notable6 left, reportable6 left, releasable6 left, coverable6 left, statisfiable6 left, squashable6 joined, bisectable6 joined, tellable6 joined 00:01 bloatable6 joined, evalable6 joined, linkable6 joined, shareable6 joined, benchable6 joined 00:02 nativecallable6 joined 00:03 unicodable6 joined, reportable6 joined 01:01 releasable6 joined 01:03 greppable6 joined 02:02 statisfiable6 joined, quotable6 joined 02:03 notable6 joined 03:01 coverable6 joined 03:03 sourceable6 joined 03:47 discord-raku-bot left 03:51 discord-raku-bot joined 05:02 committable6 joined 06:07 reportable6 left 06:10 reportable6 joined 07:34 greppable6 left, sourceable6 left, releasable6 left, reportable6 left, statisfiable6 left, benchable6 left, evalable6 left, quotable6 left, notable6 left, coverable6 left, squashable6 left, nativecallable6 left, bisectable6 left, unicodable6 left, committable6 left, linkable6 left, tellable6 left, bloatable6 left, shareable6 left, sourceable6 joined 07:35 shareable6 joined, linkable6 joined, evalable6 joined, statisfiable6 joined 07:36 nativecallable6 joined, greppable6 joined 07:37 benchable6 joined, unicodable6 joined, releasable6 joined, committable6 joined, bloatable6 joined 08:32 sena_kun joined 08:35 quotable6 joined, squashable6 joined 08:36 bisectable6 joined, coverable6 joined 08:50 frost63 joined, frost63 left 08:54 frost66 joined 09:27 epony left 09:32 epony joined 09:34 reportable6 joined 09:36 tellable6 joined 09:56 frost66 left 10:24 frost74 joined 10:35 frost74 left 10:37 notable6 joined 10:38 frost17 joined 10:58 frost17 left 11:15 epony left 11:52 frost32 joined 12:08 reportable6 left 12:09 reportable6 joined 13:15 linkable6 left 13:18 linkable6 joined 13:57 frost32 left 14:30 Kaiepi left, Kaiepi joined 14:34 Kaipei joined 14:38 Kaiepi left 15:38 squashable6 left, releasable6 left, quotable6 left, reportable6 left, evalable6 left, coverable6 left, bisectable6 left, committable6 left, sourceable6 left, greppable6 left, unicodable6 left, nativecallable6 left, statisfiable6 left, benchable6 left, bloatable6 left, shareable6 left, linkable6 left, tellable6 left, notable6 left 15:39 bloatable6 joined, tellable6 joined 15:40 committable6 joined, benchable6 joined 15:41 shareable6 joined, releasable6 joined, reportable6 joined 16:40 bisectable6 joined, sourceable6 joined, linkable6 joined, unicodable6 joined, quotable6 joined, evalable6 joined 16:41 notable6 joined 17:40 greppable6 joined 18:07 reportable6 left 18:10 reportable6 joined 18:38 squashable6 joined 18:40 nativecallable6 joined, coverable6 joined 19:10 epony joined 19:22 sena_kun left 19:25 sena_kun joined
lizmat so, do we have a way to re-open STDIN when procing out? 19:29
case in point:
raku -e '$*IN.slurp; run "vim" < foo 19:30
raku -e '$*IN.slurp; run "vim"' < foo
I either get: Vim: Warning: Input is not from a terminal and a delay of ~ 2 seconds and "mouse droppings" in my terminal 19:31
or, if I close $*IN, I get:
The spawned command 'vim' exited unsuccessfully (exit code: 1, signal: 0) 19:32
japhb Well, if you are redirecting from a file, it is indeed not a terminal.
I suppose you could dry reopening on '/dev/tty', which should be the controlling terminal on Posix systems 19:33
*could try
lizmat that'd be hardly portable.. :-)
but it indeed does the right thing! 19:34
japhb lizmat: Portable to all the platforms that matter *cough*. ;-) 19:36
But seriously, it should even work under WSL2.
lizmat ok, then I'll use that for now
the idea being that you can: 19:37
raku foo.raku 2> 2(rak --backtrace --edit)
raku foo.raku 2> >(rak --backtrace --edit)
to run a raku script, and then be able to edit all the source locations of the stack trace 19:38
japhb ah yeah, makes sense 19:39
lizmat I sorta thought nqp::getstdin would do the right thing, but it doesn't seem to 19:44
japhb Well as far as its concerned, stdin is the redirect ... it's not paying attention to controlling terminal at that point. 19:47
(/dev/tty wasn't just a random hack -- that's apparently how you're Supposed To Do That) 19:48
nine Well, /dev/tty is only correct if STDIN was connected to the terminal before. If it was a pipe or a file, you'd still be off. The correct way is to dup() the file descriptor before closing it and later dup2() it back to STDIN 20:24
20:25 linkable6 left, evalable6 left 20:27 evalable6 joined 20:39 statisfiable6 joined 20:55 [Coke]__ joined 20:58 [Coke] left 21:15 sena_kun left 21:19 Kaipii joined 21:21 Kaipii left 21:23 Kaipei left 21:27 linkable6 joined
japhb nine: /dev/tty is, to my understanding, how you recover the controlling terminal when STDIN was connected to a pipe or file outside of your program's control. 21:43
22:25 Kaiepi joined 22:38 Kaiepi left 23:38 evalable6 left, tellable6 left, linkable6 left 23:39 linkable6 joined
MasterDuke any thoughts on github.com/MoarVM/MoarVM/pull/1723 ? 23:51
japhb MasterDuke: First, it's somewhat annoying how many files have to change just to replace a deprecated op with a live one. :-P Second, does libuv have any way to set *just one* of uid and gid, leaving the other unchanged? Read-update-write for chown seems like a race condition .... 23:57