havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
rvalue has quit [Ping timeout: 256 seconds]
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
rvalue has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jhass has quit [Remote host closed the connection]
orbyt_v10 has joined #ruby
c10l5 has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
jhass has joined #ruby
c10l5 has joined #ruby
Guest17 has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz_ has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
nirvdrum has joined #ruby
emilknievel has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Vonter has quit [Ping timeout: 260 seconds]
Vonter has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
gr33n7007h has quit [Ping timeout: 260 seconds]
gr33n7007h has joined #ruby
fercell_ has quit [Ping timeout: 255 seconds]
fercell has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
emilknievel has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
emilknievel has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
orbyt_v10 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_v10 has joined #ruby
fcser has quit [Quit: zzzzz]
jenrzzz has joined #ruby
fcser has joined #ruby
orbyt_v10 has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
fcser has quit [Quit: zzzzz]
jenrzzz has joined #ruby
fcser has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jas-maelstrom has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 252 seconds]
grenierm has joined #ruby
sphex has joined #ruby
jenrzzz has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 245 seconds]
jas-maelstrom has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
_ht has joined #ruby
pusewicz has quit [Remote host closed the connection]
pusewicz has joined #ruby
jenrzzz has joined #ruby
shiru has joined #ruby
shiru has quit [Client Quit]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
shiru has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
shiru has quit [Client Quit]
shiru has joined #ruby
shiru has quit [Client Quit]
jenrzzz has joined #ruby
fdan has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
nirvdrum has quit [Quit: nirvdrum]
jenrzzz has joined #ruby
fdan has quit [Quit: Client closed]
jenrzzz has quit [Ping timeout: 256 seconds]
osc4rpt has quit [Ping timeout: 272 seconds]
osc4rpt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
gaussianblue has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
gaussianblue has quit [Quit: leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
gr33n7007h has quit [Quit: WeeChat 4.2.1]
shiru has joined #ruby
shiru has quit [Client Quit]
shiru has joined #ruby
shiru has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
gr33n7007h has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jhass has quit [Remote host closed the connection]
Guest98 has joined #ruby
<Guest98> Hello, I have this requirement where I need to call a microservice and return its response immediately on one case, but on the 2nd case a batch call on the microservice, where response times is not so critical but still within the same HTTP request. is this a usecase for sidekiq?
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Guest17 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhass has joined #ruby
grenierm has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]
infinityfye has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
infinity_fye has joined #ruby
donofrio_ has joined #ruby
infinityfye has quit [Ping timeout: 260 seconds]
donofrio__ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
rapha has left #ruby [WeeChat 4.1.2]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
bambanxx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
kjetilho has joined #ruby
<kjetilho> I'm trying to understand how to make Resolv return AAAA records regardless of local availability of IPv6, but I don't understand how it is supposed to work. e.g., how can I update DefaultResolver?
graywolf has joined #ruby
<kjetilho> okay, more minimal example - this only returns A records in an IPv6 deprived environment, and I can't find the setting to change that? Resolv::DNS.new.each_address('vg.no') { |x| puts(x) }
gaussianblue has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ruby
jenrzzz has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
Vonter has quit [Ping timeout: 268 seconds]
graywolf has quit [Quit: WeeChat 4.0.4]
jenrzzz has quit [Ping timeout: 268 seconds]
Vonter has joined #ruby
felipec has quit [Quit: Leaving]
shiru has joined #ruby
shiru has quit [Client Quit]
Guest38 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Guest98 has quit [Quit: Client closed]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
gaussianblue has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
vigumnov has quit [Quit: ZNC 1.9.0 - https://znc.in]
victori has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bambanxx has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
bambanxx has joined #ruby
<Guest38> I came across a difference in utf-16 handling between ruby 3.1 and ruby 3.2, for instance, "example".force_encoding(Encoding::UTF_16).valid_encoding? gives false in 3.1, but true in 3.2
jenrzzz has quit [Ping timeout: 260 seconds]
<Guest38> anyone know if that's intended behaviour?
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
polishdub has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
jenrzzz has joined #ruby
bambanxx has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 256 seconds]
polishdub has joined #ruby
jenrzzz has joined #ruby
bambanxx has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
Tempesta has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
___nick___ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
rvalue has quit [Ping timeout: 255 seconds]
patrick__ has joined #ruby
caleb__ has joined #ruby
eax__ has joined #ruby
fourstepper_ has joined #ruby
matta_ has joined #ruby
goofansu_ has joined #ruby
hwrd_ has joined #ruby
rvalue has joined #ruby
cxl_ has joined #ruby
jmcantrell_ has joined #ruby
gr33n7007h2 has joined #ruby
jenrzzz has joined #ruby
gr33n7007h has quit [*.net *.split]
cxl has quit [*.net *.split]
clemens3 has quit [*.net *.split]
caleb_ has quit [*.net *.split]
fourstepper has quit [*.net *.split]
matta has quit [*.net *.split]
jmcantrell has quit [*.net *.split]
goofansu has quit [*.net *.split]
patrick_ has quit [*.net *.split]
hwrd has quit [*.net *.split]
eax_ has quit [*.net *.split]
jmcantrell_ is now known as jmcantrell
fourstepper_ is now known as fourstepper
eax__ is now known as eax_
matta_ is now known as matta
goofansu_ is now known as goofansu
hwrd_ is now known as hwrd
Guest17 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
clemens3 has joined #ruby
nirvdrum has joined #ruby
jenrzzz has joined #ruby
<kjetilho> if I have a function which takes a block like an iterator - what is the idiomatic to just collect the emitted values?
<weaksauce> kjetilho can you gist what you mean?
<kjetilho> example: get the results in an array: Resolv.each_address(value)
jenrzzz has quit [Ping timeout: 252 seconds]
<kjetilho> but now I see I can simply use getaddresses() instead. would be interested to know if there is a good way of doing it, though.
<kjetilho> better(?) than `acc = []; Resolv.each_address(value) { |x| acc.extend(x) }` I mean
jenrzzz has joined #ruby
<kjetilho> (I meant acc.append of course)
<weaksauce> map could be used
<weaksauce> if you have an iterator
jenrzzz has quit [Ping timeout: 255 seconds]
<weaksauce> depends on what each_address returns if you call it bare
<kjetilho> it requires the block
pusewicz_ has joined #ruby
<weaksauce> is the code under your control?
<kjetilho> no, it is Resolv
<kjetilho> so I take it there is no general idiom for this, that's OK
pusewicz has quit [Ping timeout: 256 seconds]
<weaksauce> yeah if you have a library like that i don't think there's a nice way to do it
<weaksauce> other than using the other call
jenrzzz has joined #ruby
<weaksauce> the general idiom is to return an enumerator if you are not passed in a block though
<weaksauce> this one breaks that convention
___nick___ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
<kjetilho> aha, nice to know. I guess they broke it since they have the getaddresses() function.
jenrzzz has joined #ruby
bambanxx has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
fcser has quit [Quit: zzzzz]
Aminda has quit [Remote host closed the connection]
fcser has joined #ruby
Aminda has joined #ruby
___nick___ has joined #ruby
___nick___ has joined #ruby
jenrzzz has quit [Remote host closed the connection]
jenrzzz has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 246 seconds]
cek has joined #ruby
eddof13 has joined #ruby
gaussianblue has joined #ruby
<gr33n7007h2> Is ruby capable of creating million threads? https://gist.github.com/gr33n7007h/7442fef406a3052df4aa64ef1f068357 - eats all my memory
<gr33n7007h2> is there a something i need set/adjust for this to work?
brw5 has quit [Quit: The Lounge - https://thelounge.chat]
eddof13 has quit [Quit: eddof13]
<gr33n7007h2> vm.max_map_count is maxed out btw
brw5 has joined #ruby
eddof13 has joined #ruby
ultralan has joined #ruby
<gr33n7007h2> works fine for 100,000 fibers, after that, no way
ultralan has quit [Remote host closed the connection]
jenrzzz has joined #ruby
___nick___ has quit [Ping timeout: 256 seconds]
_ht has quit [Quit: _ht]
eddof13 has quit [Quit: eddof13]
eddof13 has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
eddof13 has quit [Quit: eddof13]
Guest17 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jas-maelstrom has quit [Remote host closed the connection]
jenrzzz has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
bambanxx has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
gaussianblue has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 240 seconds]
pusewicz_ has quit [Remote host closed the connection]
pusewicz has joined #ruby
pusewicz has quit [Ping timeout: 252 seconds]
gr33n7007h2 is now known as gr33n7007h
jas-maelstrom has joined #ruby
Guest17 has joined #ruby
jenrzzz has joined #ruby
<havenwood> gr33n7007h: Ruby's threads are backed 1:1 by system threads, which typically have limits somewhere in the range of thousands per processor.
<havenwood> You can change Ruby settings to allow more Fibers.
<havenwood> And change system settings to allow more Threads, but you're going to be able to scale to far more Fibers.
jenrzzz has quit [Ping timeout: 246 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
pusewicz has joined #ruby
<gr33n7007h> havenwood: i thought maybe recursion was a factor too. i wanted to see how ruby fairs with other languages.
<gr33n7007h> havenwood: get you get it working with a million fibers? i've changed all ruby settings that i know of.
<gr33n7007h> system settings also
<gr33n7007h> python does it in ~20 secs the like of luajit, rust, go and earlang is ~2 secs
jenrzzz has quit [Ping timeout: 264 seconds]
<gr33n7007h> i just can't get ruby to work at all just consumes to much memory before the program/os freezes altogether
<gr33n7007h> before i set vm.max_map_count to max i was getting this exc. FiberError: can't set a guard page: Cannot allocate memory
<gr33n7007h> >> RubyVM::DEFAULT_PARAMS
<ruby[bot]> gr33n7007h: # => {:thread_vm_stack_size=>1048576, :thread_machine_stack_size=>1048576, :fiber_vm_stack_size=>131072, ...check link for more (https://carc.in/#/r/gm8m)
<gr33n7007h> fiber_vm_stack_size is this the default allowed fiber size?
shiru has joined #ruby
shiru has quit [Client Quit]
shiru has joined #ruby
<gr33n7007h> How to change this value?
shiru has quit [Client Quit]
<gr33n7007h> I tried with `RUBY_VM_FIBER_VM_STACK_SIZE` env var doesn't seem to change anything
<gr33n7007h> anyway if you come up with anything, ping me! ;)
<gr33n7007h> watching a bit of netflix now :D recommend (wrong side of the tracks) it's ace!
<havenwood> gr33n7007h: "The fiber pool stack size is (guard page + vm_stack_size + fiber_machine_stack_size)."
<havenwood> Reduce the stack size, more Fibers.
<gr33n7007h> havenwood: how to reduce stack size?
<gr33n7007h> havenwood: ah! it works!!!!!
<havenwood> Set both RUBY_VM_FIBER_VM_STACK_SIZE and RUBY_FIBER_MACHINE_STACK_SIZE.
<gr33n7007h> RUBY_VM_FIBER_VM_STACK_SIZE=1024 ruby skynet.rb #=> Result: 4999950000 in 1.598958043003222 seconds.
<havenwood> You can further reduce machine stack, but looks good.
<gr33n7007h> havenwood: thanks you very much, been struggling with this for hours!
<havenwood> gr33n7007h: No prob! Happy to help.
<gr33n7007h> havenwood: cheers man! that's on par with other big dog languages now :)
<gr33n7007h> havenwood: Appreciate the help dude!
jenrzzz has joined #ruby
* gr33n7007h must remember, reduce the stack size, fibers for everyone!
<[0x1eef]> Nice :)
<gr33n7007h> havenwood: RUBY_FIBER_MACHINE_STACK_SIZE lower this env makes it ~3x slower
<gr33n7007h> but anyway, i'm happy now :)
jenrzzz has quit [Ping timeout: 252 seconds]
<gr33n7007h> nvm, i being dumb! all is fine
jenrzzz has joined #ruby
bambanxx has joined #ruby
donofrio__ has joined #ruby