havenwood changed the topic of #ruby to: Ruby 3.4.2, 3.3.7 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
o0x1eef has joined #ruby
cappy has quit [Quit: Leaving]
jasfloss has quit [Ping timeout: 276 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
jasfloss has joined #ruby
o0x1eef has quit [Quit: Quit]
o0x1eef has joined #ruby
levitating has joined #ruby
<levitating> Can IO#pipe not be shared across Threads?
<o0x1eef> levitating: They can be
<levitating> I tried
infinityfye has quit [Read error: Connection reset by peer]
<levitating> r, w = IO.pipe
<levitating> oh wait
<levitating> I might've forgotten to start the thread
<levitating> okay so I tried
<levitating> r, w = IO.pipe
<levitating> Thread.new { w.write "foo" }.run
<levitating> r.read
<levitating> and it just hangs
<o0x1eef> Add \n
<levitating> doesn't seem to work
<o0x1eef> r, w = IO.pipe
<o0x1eef> Thread.new { w.write("hi\n") }
<o0x1eef> p r.gets
<o0x1eef> Or, r.read(3)
<levitating> right, I was using read wrong
<levitating> I fixed it by closing the pipe in the thread
<levitating> so the read call has a place to end
<o0x1eef> Sounds good. If you want to communicate between threads you might want to look at Queue instead as well.
<levitating> I considered using it as well
<levitating> but what I am doing is kind of a hack
<levitating> I am calling a binding to librrd, and telling it to write output to /dev/fd/#{w.fd}
<levitating> so I can stream the computed graph straight over http
<o0x1eef> Typically IO.pipe would be used across processes rather than threads, but if it makes sense in your context then all good
carlomonte_ has joined #ruby
carlomonte has quit [Ping timeout: 268 seconds]
victori has quit [Quit: ZNC 1.9.1 - https://znc.in]
victori has joined #ruby
Dark_Maiden has joined #ruby
Dark_Maiden has left #ruby [#ruby]
gemmaro_ has quit [Ping timeout: 248 seconds]
gemmaro has joined #ruby
Thanzex02 has quit [Ping timeout: 276 seconds]
jmcantrell has quit [Quit: WeeChat 4.5.2]
Thanzex02 has joined #ruby
svm has quit [Remote host closed the connection]
Thanzex02 has quit [Ping timeout: 252 seconds]
Thanzex02 has joined #ruby
Thanzex02 has quit [Ping timeout: 244 seconds]
hwpplayer1 has joined #ruby
Thanzex02 has joined #ruby
fantazo has joined #ruby
benjaminwil has left #ruby [#ruby]
hwpplayer1 has quit [Remote host closed the connection]
cappy has joined #ruby
sarna has quit [Remote host closed the connection]
sarna has joined #ruby
andy-turner has joined #ruby
benjaminwil has joined #ruby
carlomonte_ is now known as calromonte
calromonte has quit [Quit: calromonte]
cappy has quit [Quit: Leaving]
carlomonte has joined #ruby
hwpplayer1 has joined #ruby
hwpplayer1 has quit [Remote host closed the connection]
hwpplayer1 has joined #ruby
hwpplayer1 has quit [Remote host closed the connection]
infinityfye has joined #ruby
msv has joined #ruby
graywolf has joined #ruby
graywolf has quit [Client Quit]
graywolf has joined #ruby
GreenResponse has joined #ruby
user71 has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
o0x1eef has quit [Quit: Quit]
o0x1eef has joined #ruby
Obsdark has joined #ruby
Obsdark has quit [Changing host]
Obsdark has joined #ruby
Obsdark has left #ruby [#ruby]
STASIdownunder has joined #ruby
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
fantazo has quit [Quit: Lost terminal]
graywolf has quit [Quit: WeeChat 4.5.2]
levitating has quit [Remote host closed the connection]
benjaminwil has quit [Remote host closed the connection]
benjaminwil has joined #ruby
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 252 seconds]
rvalue- is now known as rvalue
brokkoli_origin has quit [Ping timeout: 260 seconds]
cappy has joined #ruby
brokkoli_origin has joined #ruby
Vonter has quit [Ping timeout: 265 seconds]
Vonter has joined #ruby
nirvdrum741 has quit [Quit: The Lounge - https://thelounge.chat]
nirvdrum741 has joined #ruby
user71 has quit [Quit: Leaving]
cappy has quit [Remote host closed the connection]
cappy has joined #ruby
nmollerup has joined #ruby
STASIdownunder has quit [Quit: WeeChat 4.4.3]
andy-turner has quit [Quit: Leaving]
STASIdownunder has joined #ruby
wbooze has joined #ruby
balrog has quit [Ping timeout: 268 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
balrog has joined #ruby
GreenResponse has quit [Quit: Leaving]
STASIdownunder has quit [Ping timeout: 252 seconds]
SaveFerris1 has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]