Jacktar_ has joined #ruby
jacktar has quit [Ping timeout: 244 seconds]
Jacktar_ is now known as jacktar
<rg> there's concurrent-ruby as well: https://github.com/ruby-concurrency/concurrent-ruby . The EM model is not for everyone, and if you want to use threads safely concurrent-ruby seems good although you could learn thread safe programming as well.
<rg> there's also of course Ractors now, in ruby3. i still havent used them.
<weaksauce> yeah concurrent-ruby was the first link ;)
<weaksauce> EM tends to work well for bots i think
<havenwood> BinaryVixen899: The Async gem is a good Ruby 3 way to do I/O.
<havenwood> See async-http for a great HTTP client using Fibers rather than Threads under the hood. https://github.com/socketry/async-http
<havenwood> Or see the example from the Ruby release notes. https://gist.github.com/havenwood/81e299ee2fddf7f5cf87be4af0c14b9d
<havenwood> Ractors are for parallel processing. They’re as heavy weight as a Thread and Async is a better choice for I/O.
<rg> weaksauce: sorry i missed that link
<havenwood> Async uses a pool of Fibers under the hood and can even suspend Falcon Fibers while they’re out for I/O.
<havenwood> Typhoeus is a solid HTTP client if you want concurrent I/O and HTTP/2 via more conventional measures (libcurl).
<havenwood> The async-http gem also supports HTTP/2 and is lower memory overhead if you don’t mind bleeding edge.
<havenwood> Here’s a spreadsheet I keep roughly up to date showing a number of HTTP client features for the sake of comparison. https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit?usp=sharing
<rg> net/http is still my go to.
<havenwood> Async gives net/http new legs.
<rg> cool
<havenwood> Just wrap it in a couple `Async do` blocks and you get Fiber-backed concurrency. Fancy!
<havenwood> The Ruby 3 Thread Scheduler is also by ioquatix, the author of Falcon and Async.
<havenwood> And the Fiber assembly implementations, the libio bindings, the Fiber pool, etc, etc.
<havenwood> Ioquatix is… impressive.
<rg> cool, tip my hat
<weaksauce> seems to really like concurrency
<rg> and ruby :D
crankharder has joined #ruby
crankharder has quit [Ping timeout: 265 seconds]
viole has joined #ruby
<viole> I've been searching for a way to do column name translation in Sequel. I'm dealing with some fugly legaly DB that have unspeakable horrors I want to hide away behind a sanitized library where I serialize content and translate column names. I'm trying to do this with Sequel since I consider it to have the right balance between fancy stuff and control. So far I got serialization working, but I'm still
<viole> trying to get it to translate column names. Anyone has experience with this? I haven't found such a thing in the docs. Been browsing the gem codebase but still haven't found any plugin to do this
crankharder has joined #ruby
crankharder has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has quit [Ping timeout: 240 seconds]
Nyeogmi has joined #ruby
jetchisel has quit [Ping timeout: 240 seconds]
MalkbabY has joined #ruby
Malkbab__ has joined #ruby
MalkbabY_ has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
MalkbabY has joined #ruby
Malkbab__ has quit [Ping timeout: 240 seconds]
jetchisel has quit [Ping timeout: 258 seconds]
Garb0 has joined #ruby
jetchisel has joined #ruby
gcd has quit [Ping timeout: 268 seconds]
gcd has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
sdfuiojklqaz has quit [Remote host closed the connection]
reset has quit [Quit: reset]
lad has quit [Ping timeout: 268 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
relyks has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
sdfuiojklqaz has joined #ruby
sdfuiojklqaz has quit [Ping timeout: 258 seconds]
gr33n7007h has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
relyks has quit [Quit: relyks]
ur5us_ has joined #ruby
Nyeogmi has quit [Ping timeout: 256 seconds]
_ht has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
ur5us_ has quit [Ping timeout: 252 seconds]
gr33n7007h has joined #ruby
<keyvan> viole: i read all that and have been doing ruby programming since 2009 but ayyy i dunno what the hell you saying
sagax has joined #ruby
<sagax> hi all
<sagax> why this do false?
<gr33n7007h> o/
<sagax> >> case String; when String; puts "TRUE"; else; puts "WRONG"; end
<sagax> do "wrong" way
<sagax> i know that String === String it's false, but how i can compare String and String with `case`?
<aesthetikx> sagax I have always wondered this myself
<aesthetikx> sagax looks like a trick is to do
<aesthetikx> case [String]
<aesthetikx> when [String]
<aesthetikx> wrapping it in an array tricks ===
<aesthetikx> or, use case whatever.to_s when 'String'
<aesthetikx> viole so are you saying that you want like DB[:cases] to use some horrible table name that is like 'legalDistrictCasesTable'?
<keyvan> gr33n7007h: o7
<keyvan> horruuuble
<adam12> viole: Might be worth posting to the sequel-talk mailing list.
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
postmodern has quit [Quit: Leaving]
Garb0 has quit [Ping timeout: 272 seconds]
Garb0 has joined #ruby
Na_Klar has joined #ruby
<Na_Klar> I have a performance issue with my script: I str.each_byte two strings and compare the individual bytes with each others and store the result in a new string. The problem is, the longer the two string are the slower the process gets. Like the first MB runs very fast and with every further MB one MB needs more and more time. I checked the loop and there is no redundancy which could slow down. Everything runs in the memory and the bytesize of t
viole has quit [Ping timeout: 265 seconds]
Na_Klar has quit [Remote host closed the connection]
Na_Klar has joined #ruby
Na_Klar has quit [Remote host closed the connection]
Na_Klar has joined #ruby
Na_Klar has quit [Remote host closed the connection]
Garb0 has quit [Ping timeout: 258 seconds]
MalkbabY has quit [Quit: Leaving...]
sdfuiojklqaz has joined #ruby
sdfuiojklqaz has quit [Ping timeout: 268 seconds]
sdfuiojklqaz has joined #ruby
RougeR has joined #ruby
<jidar> aesthetikx: is there any reason you require the use of '===' over, say, '==' for comparing the values?
Garb0 has joined #ruby
RougeRR has joined #ruby
RougeR has quit [Read error: Connection reset by peer]
lucerne has quit [Remote host closed the connection]
RougeRR has quit [Quit: Leaving]
RougeR has joined #ruby
RougeR has quit [Client Quit]
RougeR has joined #ruby
gearnode has quit [Ping timeout: 240 seconds]
<nakilon> dude is gone. maybe the slow part in where he "stores results" on each iteration
Nyeogmi has joined #ruby
Nyeogmi has quit [Remote host closed the connection]
Nyeogmi has joined #ruby
Nyeogmi has quit [Changing host]
Nyeogmi has joined #ruby
greyrat has quit [Quit: Bye]
skali has joined #ruby
diophantoz has joined #ruby
greyrat has joined #ruby
lucerne has joined #ruby
<jidar> I was also thinking Na_Klar could use some computed hash for a set of 1/2 of the str.length
<jidar> but he'd need to understand data structures to make good use
skali has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sam113101 has quit [Remote host closed the connection]
sam113101 has joined #ruby
RougeR has quit [Remote host closed the connection]
RougeR has joined #ruby
gearnode has joined #ruby
gearnode has quit [Ping timeout: 240 seconds]
xall has joined #ruby
RougeR has quit [Remote host closed the connection]
jetchisel has joined #ruby
lucf117 has joined #ruby
xall has quit [Quit: Client closed]
_ht has quit [Remote host closed the connection]
Guest51 has joined #ruby
<Guest51> #ruby-ru
Guest51 has quit [Client Quit]
lad has joined #ruby
mbrndtgn has quit [Quit: The Lounge - https://thelounge.chat]
mbrndtgn has joined #ruby
<nakilon> hm, I swear that's not me, lol
<nakilon> probably having hard time learning how to IRC
pusewicz is now known as pusewic|away
ur5us_ has joined #ruby
finsternis has quit [Remote host closed the connection]
lad has quit [Remote host closed the connection]
lucf117 has quit [Read error: Connection reset by peer]
gcd has quit [Remote host closed the connection]
gcd has joined #ruby
Rounin has quit [Ping timeout: 265 seconds]