adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.3, 2.7.5, 2.6.9: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
dviola has quit [Ping timeout: 260 seconds]
Pixi has quit [Ping timeout: 250 seconds]
Pixi has joined #ruby
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
ur5us has quit [Ping timeout: 252 seconds]
<nakilon> so looking at the "pin operator" description in this random blog post https://elixir-lang.org/getting-started/pattern-matching.html#the-pin-operator I see that it's a shortcut to raising an exception
<nakilon> and probably then the "in" eats it to return boolean
<nakilon> and then the "[n," -- this looks like in Mathematica
<nakilon> oh wait, no, it's just the left half of the each_cons(2) tuple
BSaboia has quit [Quit: This computer has gone to sleep]
ule_ is now known as ule
ule has quit [Changing host]
ule has joined #ruby
<nakilon> should [^(n - 2), n] work too?
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
Guest64873 has joined #ruby
Guest64873 has left #ruby [#ruby]
TCZ has quit [Quit: Leaving]
ur5us has joined #ruby
gcd has quit [Ping timeout: 250 seconds]
darkstarx 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]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
orbyt_v10 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sharkee has joined #ruby
sharkee has quit [Remote host closed the connection]
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
devz3ro has joined #ruby
darkstardevx has joined #ruby
jmcgnh has quit [Ping timeout: 252 seconds]
sam113102 has joined #ruby
sam113101 has quit [Ping timeout: 256 seconds]
sam113102 is now known as sam113101
jmcgnh has joined #ruby
Rounin has joined #ruby
devz3ro has quit [Changing host]
devz3ro has joined #ruby
Gnum4n has joined #ruby
Gnum4n has left #ruby [The Lounge - https://thelounge.chat]
teclator has joined #ruby
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?
lim has joined #ruby
hxx has quit [Quit: Leaving]
constxd has joined #ruby
lim has quit [Quit: lim]
lim has joined #ruby
roadie has joined #ruby
<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]
darkstardevx has joined #ruby
BSaboia has joined #ruby
devz3ro has quit [Quit: *]
devz3ro has joined #ruby
devz3ro has joined #ruby
devz3ro has quit [Changing host]
jtperreault has quit [Ping timeout: 268 seconds]
Bounga has joined #ruby
jtperreault has joined #ruby
lim has quit [Remote host closed the connection]
samgranieri has joined #ruby
SuperL4g has quit [Ping timeout: 240 seconds]
SuperLag has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
_axx has quit [Quit: The Lounge - https://thelounge.chat]
_axx has joined #ruby
SuperLag has quit [Ping timeout: 260 seconds]
SuperLag has joined #ruby
samgranieri has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
SuperLag has quit [Ping timeout: 250 seconds]
samgranieri has joined #ruby
SuperLag has joined #ruby
Bounga has quit [Ping timeout: 250 seconds]
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
va5c0 has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
va5c0 has quit [Quit: WeeChat 3.3]
___nick___ has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
walez has quit [Ping timeout: 252 seconds]
_ht has joined #ruby
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
va5c0 has joined #ruby
orbyt_v10 has joined #ruby
orbyt has joined #ruby
orbyt_v10 has quit [Ping timeout: 252 seconds]
samgranieri has quit [Quit: samgranieri]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
va5c0 has quit [Quit: WeeChat 3.3]
<leah2> wtf is ls in irb
yossarian has quit [Ping timeout: 245 seconds]
reset has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
samgranieri has joined #ruby
samgranieri_ has joined #ruby
weaksauce has joined #ruby
samgranieri has quit [Ping timeout: 250 seconds]
hololeap_ has quit [Read error: Connection reset by peer]
hololeap_ has joined #ruby
parv has joined #ruby
tweaks has quit [Quit: tweaks]
walez has joined #ruby
Starfoxxes has quit [Ping timeout: 252 seconds]
<adam12> leah2: ?
<leah2> type ls
<adam12> leah2: Yeah. It mirrors `ls` from Pry.
<adam12> leah2: You never use the Pry version?
<leah2> no
<adam12> Ahh. It's like `instance_methods - Object.methods` + `instance_variables` + a bunch of other stuff all in one.
Starfoxxes has joined #ruby
darkstardevx has quit [Quit: Leaving]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
hololeap_ has quit [Read error: Connection reset by peer]
cornduck has quit [Remote host closed the connection]
aeris has joined #ruby
hololeap_ has joined #ruby
samgranieri_ has quit [Quit: samgranieri_]
samgranieri has joined #ruby
hololeap_ has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
___nick___ has quit [Ping timeout: 265 seconds]
samgranieri_ has joined #ruby
samgranieri has quit [Ping timeout: 252 seconds]
timkaechele has joined #ruby
timkaechele1 has quit [Ping timeout: 240 seconds]
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
aeris has joined #ruby
cornduck has joined #ruby
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]
m_antis has joined #ruby
samgranieri has quit [Quit: samgranieri]
timkaechele1 has quit [Quit: Leaving.]
timkaechele has joined #ruby
hesco3 has joined #ruby
timkaechele has quit [Ping timeout: 250 seconds]
<hesco3> I have a broken compass installation and have no idea how to recover. Can anyone please advise? https://gist.github.com/hesco/698f6459ada6fd0b9679e8ba5d7016a9
<havenwood> hesco3: Try?: gem pristine compass
hololeap_ has joined #ruby
hololeap_ is now known as hololeap
ur5us has quit [Ping timeout: 252 seconds]
sagax has joined #ruby
timkaechele has joined #ruby
timkaechele has quit [Ping timeout: 260 seconds]
<hesco3> thanks havenwood. will try that.
<hesco3> I was advised on the cli to try instead: `sudo gem pristine compass --version 2.5.0`.
<hesco3> after a series of deprecation errors related to Gem::ConfigMap, I get this error:
<hesco3> ERROR: While executing gem ... (Gem::Exception)
<hesco3> Failed to find gems ["compass"] = 2.5.0
parv has quit [Quit: parv]
<havenwood> hesco3: It doesn't appear there is a compass 2.5.0.
<havenwood> It's version 1.0.3 and looks quite dated.
<havenwood> hesco3: Sure this is the right gem name?
<havenwood> And right version?
<hesco3> can't imagine no enhancements have been made in six years.
<hesco3> I'm looking for the package which wraps sass and is used for compiling changes to css files.
<hesco3> its website leads me here: https://github.com/Compass/compass/tags
<hesco3> which confirms the 1.0.3 and 2015 as the latest version