havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
venmx has joined #ruby
venmx has quit [Ping timeout: 272 seconds]
kateskips has quit [*.net *.split]
kateskips has joined #ruby
bambanx has joined #ruby
gavlee__ has joined #ruby
dfucci has joined #ruby
gavlee has quit []
akem has quit [Ping timeout: 265 seconds]
gavlee__ has quit [Quit: Exited for reasons unknown.]
dfucci has quit [Ping timeout: 265 seconds]
rzjian has joined #ruby
prestorium has quit [Quit: prestorium]
orbyt_ has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
venmx has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
venmx has quit [Ping timeout: 264 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
venmx has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
TCZ has joined #ruby
dviola has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 246 seconds]
Nahra has quit [Quit: leaving]
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #ruby
pwnd_sfw3 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cliluw has quit [Ping timeout: 256 seconds]
pwnd_sfw has quit [Ping timeout: 240 seconds]
pwnd_sfw3 is now known as pwnd_sfw
jenrzzz has joined #ruby
dviola has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Rounin has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
jenrzzz has joined #ruby
_whitelogger has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
factormystic3 has joined #ruby
helpa has quit [Remote host closed the connection]
Tempesta_ has joined #ruby
helpa has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
factormystic has quit [Ping timeout: 256 seconds]
factormystic3 is now known as factormystic
jenrzzz has joined #ruby
TCZ has quit [Remote host closed the connection]
prion has quit [Quit: kiwirc - an handmad irc cleint xd]
jenrzzz has quit [Ping timeout: 264 seconds]
queip has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
bambanx has quit [Quit: Leaving]
queip has joined #ruby
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #ruby
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
ChmEarl has quit [Quit: Leaving]
GodFather has quit [Ping timeout: 240 seconds]
rzjian has quit [Ping timeout: 246 seconds]
dviola has left #ruby ["WeeChat 3.0"]
dviola has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
cnsvc has quit [Remote host closed the connection]
cnsvc has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
m27frogy has quit [Ping timeout: 240 seconds]
maryo has joined #ruby
cd has quit [Quit: cd]
jenrzzz has quit [Ping timeout: 264 seconds]
maryo has quit [Ping timeout: 240 seconds]
neonloop has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
TorpedoSkyline has quit [Quit: Textual IRC Client: www.textualapp.com]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
nofxx__ has joined #ruby
nofxx_ has quit [Ping timeout: 265 seconds]
titanbiscuit has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
al2o3-cr has quit [Quit: WeeChat 3.0]
thinkpad has quit [Ping timeout: 246 seconds]
thinkpad has joined #ruby
popgreen has quit [Quit: Leaving]
thinkpad has quit [Quit: lawl]
panorain has joined #ruby
maryo has joined #ruby
gDollaZ has joined #ruby
gDollaZ has left #ruby [#ruby]
jenrzzz has joined #ruby
panorain has quit [Quit: Leaving]
venmx has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
cnsvc has quit [Remote host closed the connection]
cnsvc has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
gavlee has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
maxmanders has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
baojg has quit [Remote host closed the connection]
maryo has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
mozzarella has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 260 seconds]
maryo has joined #ruby
maryo has quit [Max SendQ exceeded]
maryo has joined #ruby
maryo has quit [Max SendQ exceeded]
maryo has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
venmx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
mozzarella has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jl4 has joined #ruby
dfucci has joined #ruby
maryo has quit [Ping timeout: 264 seconds]
dfucci has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
maryo has joined #ruby
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
pwnd_sfw9 has joined #ruby
pwnd_sfw has quit [Ping timeout: 246 seconds]
pwnd_sfw9 is now known as pwnd_sfw
venmx has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
jl4 has quit [Ping timeout: 246 seconds]
ua has joined #ruby
robotmay has joined #ruby
naftilos76 has joined #ruby
<naftilos76> Hi everyone, i am experimenting with multithreading and was wondering if you could see the code at: https://pastebin.ubuntu.com/p/HH2yWmtypX/
<naftilos76> its a class that does a very simple thing which is to print
<naftilos76> however despite my attempt to make the log method thread-safe i have noticed inconsistencies at the data being printed
<naftilos76> the string that informs about the start of a thread should always be reported by "obj1"
<naftilos76> instead i can see obj1 to obj3 string there
<naftilos76> Code with object ids is given here: https://pastebin.ubuntu.com/p/3CJkFprVTG/
<naftilos76> which proves my point
<naftilos76> can anybody have a look?
<naftilos76> using a mutex that encloses the three lines of code that call 'add' method fixes the issue. Why doesn't the mutex inside the class do that?
<leftylink> queue is shared. consider scenario: obj1 does @queue << "started!" at line 34. then, obj3 runs and logs "obj3 started!"
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
akem has joined #ruby
meinside has joined #ruby
schaerli has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<naftilos76> leftylink: placing "@queue << str" in the mutex seems to be working
<leftylink> at which point the queue is senseless, since it will now only ever contain one element
jenrzzz has joined #ruby
<naftilos76> yep, overlooked that part - thanks!
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
klaas_ has joined #ruby
klaas has quit [Read error: Connection reset by peer]
probonic08 has quit [Write error: Connection reset by peer]
SoF has quit [Write error: Connection reset by peer]
probonic08 has joined #ruby
thebetra- has quit [Ping timeout: 256 seconds]
pinkpandabot has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 256 seconds]
thebetrayer has joined #ruby
SoF has joined #ruby
evdubs has quit [Quit: Leaving]
havenwood has joined #ruby
havenwood has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
evdubs has joined #ruby
dfucci has joined #ruby
m27frogy has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
weaksauce has quit [Ping timeout: 246 seconds]
maryo has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
maryo has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
thunderbirdtr_ has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
thunderbirdtr_ has quit [Client Quit]
thunderbirdtr_ has joined #ruby
thunderbirdtr_ has quit [Remote host closed the connection]
thunderbirdtr_ has joined #ruby
thunderbirdtr_ has quit [Client Quit]
thunderbirdtr has joined #ruby
thunderbirdtr has quit [Client Quit]
thunderbirdtr has joined #ruby
thunderbirdtr has quit [Client Quit]
maryo has quit [Ping timeout: 256 seconds]
prestorium has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
schaerli has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
prestorium has quit [Ping timeout: 264 seconds]
cd has joined #ruby
ua_ has joined #ruby
ua has quit [Ping timeout: 265 seconds]
WaqarVky has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
WaqarVky has left #ruby [#ruby]
maryo has joined #ruby
oneeggeach has joined #ruby
oneeggeach has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
lmat has joined #ruby
venmx has joined #ruby
jess has joined #ruby
jl4 has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 246 seconds]
prestorium has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
prion_ has joined #ruby
lucasb has joined #ruby
dfucci has joined #ruby
jenrzzz has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
totoro2021 has quit [Read error: Connection reset by peer]
totoro2021 has joined #ruby
<nakilon> funny thing: somehow minitest sources are set chmod 400 before bundling as a gem
<nakilon> so you can't quickly patch it and is forced either to chmod or create a separate directory
akem has quit [Remote host closed the connection]
<nakilon> how am I supposed to instantiate an exception that would have a #cause that I pass to it?
<nakilon> "I'm against cause=" (c) matz https://bugs.ruby-lang.org/issues/8257#note-15
<nakilon> and it's not in .new
<nakilon> because it loses the cause
jl4 has joined #ruby
<nakilon> ah, the raise has it: https://rubydoc.info/stdlib/core/Kernel:raise
<nakilon> but no, wait, I don't need to raise it, I only need to build it
GodFather has joined #ruby
<nakilon> I could raise it and then immediately edit the backtrace but that does not sound clean
GodFather has quit [Max SendQ exceeded]
GodFather has joined #ruby
akem has joined #ruby
AnomalyXII has quit [Ping timeout: 240 seconds]
<nakilon> nvm
jenrzzz has joined #ruby
<nakilon> I mean, doing the "begin raise UnexpectedError.new(e) rescue => ee self.failures << ee end" indeed restored the cause and minitest even prints it but its backtrace looks weird
<nakilon> hmmm, it prints the .cause but the real exception is somehow inside the .cause.cause
Rudd0 has joined #ruby
<nakilon> oh, of course, because I did this hack... and minitest does not go two levels into it (
<nakilon> or maybe " from ..." isn't attached by minitest but rather by ruby because I don't see anything about cause in minitest source code
jenrzzz has quit [Ping timeout: 246 seconds]
pwnd_sfw4 has joined #ruby
kristian_on_linu has joined #ruby
pwnd_sfw has quit [Ping timeout: 260 seconds]
pwnd_sfw4 is now known as pwnd_sfw
venmx has joined #ruby
goepsilongo has joined #ruby
goepsilongo has quit [Remote host closed the connection]
venmx has quit [Ping timeout: 246 seconds]
goepsilongo has joined #ruby
ChmEarl has joined #ruby
cnsvc has joined #ruby
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
jl4 has quit [Ping timeout: 264 seconds]
maryo has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 246 seconds]
jl4 has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
dfucci has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
jl4 has joined #ruby
Rudd0^ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jl4 has quit [Ping timeout: 264 seconds]
cahoots_ has joined #ruby
<cahoots_> hi, why does this output an empty string? impl = ERB.new("<% 'hi' %>").result
<cahoots_> ha nm
jenrzzz has quit [Ping timeout: 260 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
jl4 has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
venmx has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
AndreYuhai has joined #ruby
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
<AndreYuhai> Hey there, I am inheriting from Mechanize to create a client for a specific website and I also want to add new methods to Mechanize::Page. However when I add methods to Mechanize::Page then this patches the actual Mechanize gem as well. How can I do that only for the Page of the class that inherits from Mechanize?
<AndreYuhai> Here is an example
jenrzzz has quit [Ping timeout: 256 seconds]
<WA9ACE> I think you're looking for refinements
<WA9ACE> allows you to monkey patch without it extending past your own scope
<AndreYuhai> WA9ACE, Oh I didn't know about refinements. Thank you, I will be reading that.
BSaboia has joined #ruby
pwnd_sfw has quit [Ping timeout: 264 seconds]
coniptor has quit [Read error: Connection reset by peer]
SuperLag has quit [Quit: leaving]
titanbiscuit has joined #ruby
SuperLag has joined #ruby
CommunistWolf is now known as tankies
tankies has quit [Disconnected by services]
CommunistWolf has joined #ruby
coniptor has joined #ruby
lightstalker has quit [Ping timeout: 256 seconds]
weaksauce has joined #ruby
lightstalker has joined #ruby
Andre has joined #ruby
Andre is now known as Guest91715
AndreYuhai has quit [Ping timeout: 246 seconds]
roshanavand has joined #ruby
Rounin has quit [Ping timeout: 246 seconds]
brunosaboia_ has joined #ruby
viporli has joined #ruby
t3hyoshi has joined #ruby
m27frogy_ has joined #ruby
t3hyoshi_ has quit [Ping timeout: 256 seconds]
m27frogy has quit [Ping timeout: 256 seconds]
chkilroy has quit [Ping timeout: 256 seconds]
greypack has quit [Ping timeout: 256 seconds]
oz has quit [Ping timeout: 256 seconds]
akem has quit [Read error: Connection reset by peer]
chkilroy_ has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
cd has quit [Ping timeout: 256 seconds]
leah2 has quit [Ping timeout: 256 seconds]
snapcase has quit [Ping timeout: 256 seconds]
sol1d has quit [Ping timeout: 256 seconds]
ByronJohnson has quit [Ping timeout: 256 seconds]
roger_rabbit has quit [Ping timeout: 256 seconds]
jordanm has quit [Ping timeout: 256 seconds]
DEac- has quit [Ping timeout: 256 seconds]
snapcase has joined #ruby
greypack has joined #ruby
ByronJohnson has joined #ruby
leah2 has joined #ruby
oz has joined #ruby
llua has quit [Ping timeout: 256 seconds]
justinmcp_ has quit [Ping timeout: 256 seconds]
Benett has quit [Ping timeout: 256 seconds]
olspookishmagus has quit [Ping timeout: 256 seconds]
jordanm has joined #ruby
Benett has joined #ruby
sol1d has joined #ruby
roger_rabbit has joined #ruby
llua has joined #ruby
olspookishmagus has joined #ruby
justinmcp has joined #ruby
olspookishmagus is now known as Guest49775
cd has joined #ruby
thecoffemaker has quit [Ping timeout: 264 seconds]
Lyubo1 has quit [Ping timeout: 264 seconds]
goepsilongo has quit [Ping timeout: 260 seconds]
thecoffemaker has joined #ruby
DEac- has joined #ruby
Lyubo1 has joined #ruby
dfucci has joined #ruby
cahoots_ has quit [Quit: leaving]
dfucci has quit [Ping timeout: 256 seconds]
Sellow has joined #ruby
<Sellow> Is there a way to have an rbenv per project, or do people just install project gems to their general ruby installation?
jl4 has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
<jidar> Sellow: .gemrc: gem: --user-install --bindir /home/nate/.local/bin -N
<jidar> Sellow: is how I take care of it anyway, but obviously doesn't account for ruby version
<jidar> or a bundler config for ${PROJECT}/vendor
<Sellow> Ah thank you!
ua_ has quit [Ping timeout: 256 seconds]
<yxhuvud> I use a .ruby-version file in each repo which has the info, and then my chruby installation automagically switch to the correct version of stuff.
<Sellow> I ended up just using rbenv without gemsets
<Sellow> First ever time using ruby, quite a lot to learn
ua_ has joined #ruby
leah2 has quit [Ping timeout: 272 seconds]
venmx has joined #ruby
leah2 has joined #ruby
jenrzzz has joined #ruby
ur5us_ has joined #ruby
jl4 has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
naftilos76 has quit [Quit: Leaving]
viporli has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
dhollinger has quit [Ping timeout: 256 seconds]
dhollinger has joined #ruby
jenrzzz has joined #ruby
akem has joined #ruby
howdoi has joined #ruby
GodFather has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
viporli has joined #ruby
akem has quit [Quit: Leaving]
bambanx has joined #ruby
Sellow has left #ruby ["The Lounge - https://thelounge.chat"]
ur5us_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
greypack has quit [Quit: All your IRC are belong to ZNC]
greypack has joined #ruby
mcr has quit [Ping timeout: 265 seconds]
mcr has joined #ruby
prestorium has quit [Ping timeout: 272 seconds]
jl4 has quit [Ping timeout: 246 seconds]
coniptor has quit [Ping timeout: 246 seconds]
pwnd_sfw has joined #ruby
prion_ has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
jenrzzz has joined #ruby
jl4 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
dan64- has joined #ruby
Rudd0 has joined #ruby
dan64 has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
viporli has quit [Remote host closed the connection]
akem has joined #ruby
jenrzzz has joined #ruby
jl4 has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
xf3rno has joined #ruby
cnsvc has quit [Remote host closed the connection]
venmx has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
coniptor has quit [Ping timeout: 246 seconds]
ur5us_ has joined #ruby
venmx has joined #ruby
jenrzzz has joined #ruby
coniptor has joined #ruby
dviola has quit [Quit: WeeChat 3.0]
dviola has joined #ruby
oneeggeach has joined #ruby
Azure has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
Azure has joined #ruby
jenrzzz has joined #ruby
oneeggeach has quit [Quit: Leaving...]
jenrzzz has quit [Ping timeout: 256 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Guest91715 has quit [Quit: Leaving]
dhollinger has quit [Ping timeout: 246 seconds]
AndreYuhai has joined #ruby
<AndreYuhai> When some Sidekiq::Worker has been called with perform_async then everytime a new object is getting instantiated, right?
dhollinger has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<adam12> AndreYuhai: Yes.
jenrzzz has quit [Ping timeout: 246 seconds]
<AndreYuhai> adam12, Is there any way to use the same class for each thread instead? For example if my worker is instantiating another class in "initialize" then with every "perform_async" it's instantiated again and again. Is there any way to persist that object instantiated in "initialize" instead?
<AndreYuhai> I meant same instantiated worker* not the class
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 256 seconds]
xf3rno has quit [Quit: WeeChat 3.0]
jenrzzz has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
<weaksauce> how would one read from stdin and wait until it has more input?
<weaksauce> but you have to wait until it has 4 bytes and then wait until it has some variable amount of data available
xf3rno has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<havenwood> &>> require 'io/console'
<rubydoc> # => true (https://carc.in/#/r/a9og)
<weaksauce> havenwood is the state of the art a busywait loop?
<havenwood> weaksauce: thinking select?
jenrzzz has joined #ruby
<havenwood> weaksauce: yeah, even with Async you'd do while read.
<havenwood> weaksauce: Async::IO::Generic.new($stdin)
<havenwood> read(1)
<havenwood> read(4)
<weaksauce> curious that there is no kind of "has readable" callback
<weaksauce> how much cpu does that chew up?
<havenwood> using fibers?
<havenwood> not much
Azure has quit [Read error: Connection reset by peer]
<havenwood> and it's just a 4k stack by default
Azure has joined #ruby
<havenwood> weaksauce: there's even a fiber pool so they're ready
<havenwood> i think that was added around 2.7?
jenrzzz has quit [Ping timeout: 256 seconds]