orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_v10 has joined #ruby
ged has quit [Ping timeout: 268 seconds]
mahlon has quit [Ping timeout: 256 seconds]
mahlon has joined #ruby
<nakilon>
pattern matching is so cryptic to me: Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a -- I barely understand this ruby-lang release news example
darkstardevx has quit [Read error: Connection reset by peer]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
darkstardevx has quit [Read error: Connection reset by peer]
cout has quit [Ping timeout: 250 seconds]
cout has joined #ruby
hololeap_ has quit [Ping timeout: 276 seconds]
hololeap_ has joined #ruby
walez has joined #ruby
samgranieri has joined #ruby
samgranieri has quit [Remote host closed the connection]
timkaechele has joined #ruby
timkaechele has quit [Quit: Leaving.]
timkaechele has joined #ruby
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #ruby
reset has quit [Quit: reset]
cek has joined #ruby
<cek>
are find_all, select, filter all the same?
<cek>
So many new methods... Is there a short version of `map` + `any?` that would stop iterating once block returns non-nil and actually returns the block value, not pick the initial element?
ferr_ has joined #ruby
fercell has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
timkaechele has quit [Quit: Leaving.]
graywolf has joined #ruby
<nakilon>
cek use .any? or .find and do break from the block
<nakilon>
or still use map but with .lazy
<nakilon>
irb> [1,2,3].find{ |_| p _; break 0 if _ == 2 } # 1 2 => 0
hololeap_ has quit [Ping timeout: 276 seconds]
hololeap_ has joined #ruby
timkaechele has joined #ruby
timkaechele1 has joined #ruby
timkaechele has quit [Ping timeout: 252 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
parv has quit [Quit: parv]
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
<cek>
x.lazy.map{}.any?{} worked
<nakilon>
but without break from any? you only get true or false
<cek>
oh wait, damn
hxx has joined #ruby
<cek>
lazy.map{}.take_while { inverted cond }
<hxx>
Any recommended books on the ruby C API?
<nakilon>
there is none
<nakilon>
my native extension gem does not work on alpine because there is no way to get the question answered
<hxx>
Being able to compile ruby to a native library would be great, that's why I'm interested in the ruby C API.
<nakilon>
(just my experience)
<nakilon>
what is C API? basically ruby does not compile unless there is some JIT thing in the most recent versions of ruby
<hxx>
Ruby has a C API
<nakilon>
C extensions are the ruby programs that invoke C, not the other way
<hxx>
But it's hugely undocumented.
<hxx>
Ok. I see. Well scratch my previous plans.
<nakilon>
maybe there is something I don't know
<nakilon>
havenwood might know
hololeap_ has quit [Ping timeout: 276 seconds]
<hxx>
I got ruby 3.0.3 installed, what's this about a JIT compiler for ruby?
hololeap_ has joined #ruby
<hxx>
I'm very please the FXRuby gem still works with modern ruby, can't say the same thing for FxPy, which is broken because it relies on python2 and doesn't work with python3.
<hxx>
I do have one question. Python can easily load a dll/so file made in C or C++. How would I interface with a dll/so file in ruby then?
<axisys_>
I see links for books. Any video tutorial suggestion? I see tons of them in youtube and ofcourse I can check those out as well.
<adam12>
axisys_: For Ruby in general?
graywolf has quit [Quit: WeeChat 3.3]
<axisys_>
adam12: yes
<adam12>
axisys_: The Rubytapas freebies are good. Rubytapas (paid) is good as well. Avdi has a new Graceful.dev program that includes a bunch of different things, and there's value there too.
<adam12>
axisys_: The DestroyAllSoftware videos are good but a bit dated.
<nakilon>
there is the website in channel topic, it's being updated somehow via github
<nakilon>
it had a page with some learning materials
<axisys_>
adam12: thanks
FetidToot0 has joined #ruby
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot0 is now known as FetidToot
timkaechele1 has quit [Quit: Leaving.]
timkaechele has joined #ruby
timkaechele1 has joined #ruby
timkaechele has quit [Ping timeout: 265 seconds]
cek has quit [Quit: Connection closed for inactivity]
duds- has quit [Read error: Connection reset by peer]
tweaks has joined #ruby
samgranieri_ has quit [Quit: samgranieri_]
timkaechele1 has joined #ruby
timkaechele has quit [Ping timeout: 240 seconds]
samgranieri has joined #ruby
_ht has quit [Remote host closed the connection]
walez has quit [Ping timeout: 252 seconds]
constxd has quit [Ping timeout: 240 seconds]
samgranieri has quit [Quit: samgranieri]
BSaboia has joined #ruby
samgranieri has joined #ruby
<havenwood>
It's tempting to make a shared interface for Ractors and Async, but easier said than done and unless you're really careful you lose the composition you'd want for either. Anyways, quick stab at just calling job methods without arguments for fun. https://gist.github.com/havenwood/8a430463f0f452d166131a7232565335
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
devz3ro has quit [Quit: *]
devz3ro has joined #ruby
samgranieri has quit [Ping timeout: 256 seconds]
samgranieri has joined #ruby
m_antis has quit [Read error: Connection reset by peer]