havenwood changed the topic of #ruby to: Ruby 3.4.5, 3.3.9, 3.5.0-preview1 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
sh7d has quit [Ping timeout: 252 seconds]
jmcantrell has quit [Ping timeout: 252 seconds]
nirvdrum7410 has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 260 seconds]
ih8u2 is now known as ih8u
finsternis has joined #ruby
andy-turner has joined #ruby
grenierm has joined #ruby
Bitflux has quit [Ping timeout: 276 seconds]
Byteflux has joined #ruby
pages has quit [Ping timeout: 252 seconds]
pages has joined #ruby
ih8u has quit [Remote host closed the connection]
jankasi has quit [Remote host closed the connection]
R2robot has quit [Quit: Pull the lever, Kronk. Wrong leverrrrrrr!]
R2robot has joined #ruby
jmcgnh has quit [Remote host closed the connection]
ih8u has joined #ruby
jmcgnh has joined #ruby
marc_in_space has quit [Quit: ZNC - https://znc.in]
marc_in_space has joined #ruby
Tempesta has quit [Quit: See ya!]
marc_in_space has quit [Ping timeout: 240 seconds]
marc_in_space has joined #ruby
Tempesta has joined #ruby
graywolf has joined #ruby
grenierm has quit [Ping timeout: 252 seconds]
Linux_Kerio has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
___nick___ has quit [Ping timeout: 240 seconds]
<tsujp> is this the best way to execute programs with ruby without blocking, and still being able to gather their stdout/stderr? It's a short gist of mine: https://gist.github.com/tsujp/613e36ac099f81fe005b72e9a2339e85
<tsujp> it spawns a shell every time which kind of sucks.. is there a direct non-blocking way (if better)?
victori has quit [Quit: ZNC 1.10.0 - https://znc.in]
victori has joined #ruby
sh7d has joined #ruby
user71 has joined #ruby
graywolf has quit [Quit: WeeChat 4.7.0]
cappy has joined #ruby
<o0x1eef> I did something similar this way: https://github.com/0x1eef/test-cmd.rb/blob/main/lib/test/cmd.rb
<o0x1eef> You can use Kernel.spawn to spawn a process without a shell, and you can use pipes to read from stderr|stdout.
<sh7d> or you could use popen3
<o0x1eef> That's what the gist is using
jankasi has joined #ruby
cappy has quit [Quit: Leaving]
lucerne has quit [Quit: Bye]
lucerne has joined #ruby
chair1 has joined #ruby
sh7d has quit [Read error: Connection reset by peer]
sh7d has joined #ruby
<tsujp> interesting o0x1eef ill give it a look, I imagine it might be faster than Open3.popen3 maybe?
Linux_Kerio has quit [Ping timeout: 252 seconds]
<havenwood> tsujp: o0x1eef: adam12: Another take on Open3 fwiw. https://gist.github.com/havenwood/dd2db6206b523cbafa8b5f2457e84a16
<havenwood> An aside, but interesting named pipes tend to be fastest until it's large enough UNIX sockets start winning. https://www.baeldung.com/linux/ipc-performance-comparison
sh7d has quit [Quit: Leaving]
user71 has quit [Quit: Leaving]
pages has quit [Changing host]
pages has joined #ruby
joast has quit [Quit: Leaving.]
<havenwood> Never use it is probably most sane.
<havenwood> Oops, wrong chat, sorry.
andy-turner has quit [Quit: Leaving]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jankasi has quit [Quit: jankasi]
nmollerup has quit [Quit: Leaving]
<weaksauce> havenwood is io/stream part of stdlib? it fails to require
Linux_Kerio has joined #ruby