havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
robotmay has quit [Ping timeout: 265 seconds]
konsolebox has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
drincruz has joined #ruby
wymillerlinux has joined #ruby
konsolebox has joined #ruby
alfiemax has joined #ruby
oddp has quit [Ping timeout: 244 seconds]
oneeggeach has quit [Quit: Leaving...]
alfiemax has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 244 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall__ has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
r3m has quit [Quit: WeeChat 2.9-rc1]
<adam12> I've ended up just capturing and passing splatted args. Seems to work OK on 2.6 and 2.7 and that's good enough for now :)
r3m has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
r3m has quit [Client Quit]
r3m has joined #ruby
konsolebox has joined #ruby
reaVer_ has quit [Remote host closed the connection]
ur5us has joined #ruby
reaVer has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 240 seconds]
<deimos_> today i discovered IO.foreach(logfile).grep(/something/).lazy is 2-5x faster than IO.foreach(logfile).grep(/something/) for the same block
jesfre3 has joined #ruby
jesfre has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
robotmay has quit [Quit: No Ping reply in 180 seconds.]
robotmay has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
bambanx has quit [Ping timeout: 240 seconds]
xall__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xall__ has joined #ruby
ChmEarl has quit [Quit: Leaving]
xall__ has quit [Client Quit]
xall__ has joined #ruby
Technodrome has joined #ruby
robotmay has quit [Quit: No Ping reply in 180 seconds.]
robotmay has joined #ruby
drincruz has joined #ruby
<adam12> deimos_: neat
bambanx has joined #ruby
alfiemax has joined #ruby
wallace_mu has quit [Remote host closed the connection]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
drincruz has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
bhaak has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
braincrash has quit [Quit: bye bye]
konsolebox has quit [Read error: Connection reset by peer]
alfiemax_ has joined #ruby
braincrash has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
drincruz has quit [Ping timeout: 246 seconds]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
zacts has joined #ruby
zacts has quit [Client Quit]
konsolebox has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
xall__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xall__ has joined #ruby
xall__ has quit [Client Quit]
konsolebox has quit [Read error: Connection reset by peer]
BSaboia has quit [Quit: This computer has gone to sleep]
dualfade has quit [Ping timeout: 240 seconds]
dualfade has joined #ruby
konsolebox has joined #ruby
robotmay has quit [Ping timeout: 264 seconds]
robotmay has joined #ruby
SeepingN has joined #ruby
zacts has joined #ruby
zacts has quit [Client Quit]
sgen has quit [Ping timeout: 244 seconds]
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
jesfre has joined #ruby
jesfre3 has quit [Ping timeout: 265 seconds]
bambanx has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
BSaboia has joined #ruby
<deimos_> i'm pretty sure i already new that enumerators and lazy enumerators were so much faster than arrays, but i seem to keep relearning parts of ruby
<deimos_> s/new/knew/
bambanx has quit [Ping timeout: 240 seconds]
BSaboia has quit [Client Quit]
dualfade has quit [Ping timeout: 265 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
bambanx has joined #ruby
cthu| has quit [Ping timeout: 258 seconds]
konsolebox has quit [Read error: Connection reset by peer]
r3m has left #ruby ["WeeChat 3.0-dev"]
bhaak has joined #ruby
howdoi has quit []
xco has joined #ruby
howdoi has joined #ruby
konsolebox has joined #ruby
rose_nd_ash has joined #ruby
bocaneri has joined #ruby
zacts has joined #ruby
FetidToot has quit [Ping timeout: 246 seconds]
dostoyevsky has quit [Quit: leaving]
FetidToot has joined #ruby
dostoyevsky has joined #ruby
lemon has joined #ruby
arzWZM has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
wymillerlinux has quit [Ping timeout: 256 seconds]
lemon395 has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
lemon has quit [Ping timeout: 258 seconds]
jetchisel has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
SeepingN has quit [Ping timeout: 258 seconds]
konsolebox has quit [Read error: Connection reset by peer]
zacts has quit [Ping timeout: 246 seconds]
sphex has quit [Read error: Connection reset by peer]
sphex_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
konsolebox has joined #ruby
zacts has joined #ruby
thecoffemaker has quit [Ping timeout: 256 seconds]
alexherbo2 has joined #ruby
dualfade has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
jesfre has quit [Ping timeout: 240 seconds]
dualfade has quit [Ping timeout: 265 seconds]
dualfade has joined #ruby
konsolebox has joined #ruby
teej has quit [Quit: Connection closed for inactivity]
cd has quit [Quit: cd]
purefan has joined #ruby
nehsa has joined #ruby
<nehsa> I want merge hash with duplicate keys ruby like
<nehsa> [{"a": 1}, {"a" : 2}]
<nehsa> output : {"a":1, "a": 2}
<nehsa> Anyone can have solutions
<nehsa> Simple merge not working it's reduce key with a
<leftylink> since keys must be unique, we will need to take some other tack
<leftylink> perhaps the values could be arrays
<nehsa> In my case key need to be same and value is different
<leftylink> in that case, it will be necessary to use something other than a Hash.
thecoffemaker has joined #ruby
<nehsa> Params it's should in hash
dviola has quit [Quit: WeeChat 2.9]
vondruch has joined #ruby
<leftylink> in life, sometimes we find that some requirements conflict with others, but at the same time that some are more firm than others. like the laws of the universe that we don't have the ability to violate
<leftylink> so, we examine the situation in all its aspects, figure out what requirements are firm and which we have merely imagined, and thereby craft a solution
rose_nd_ash has quit [Remote host closed the connection]
<leftylink> my role in this is simply to report on the facts of the situation and give an honest appraisal of the capabilities and potential of a hash
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
Jonopoly has joined #ruby
rose_nd_ash has quit [Ping timeout: 240 seconds]
konsolebox has quit [Read error: Connection reset by peer]
rose_nd_ash has joined #ruby
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
rose_nd_ash has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
rose_nd_ash has joined #ruby
konsolebox has joined #ruby
user123 has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
schne1der has quit [Ping timeout: 258 seconds]
matti has quit []
matti has joined #ruby
TomyWork has joined #ruby
zapata has quit [Ping timeout: 244 seconds]
zapata has joined #ruby
rose_nd_ash has joined #ruby
camilasan has joined #ruby
camilasan_ has quit [Ping timeout: 240 seconds]
<ruurd> and in this case it's easy either you get a violation because the key already exists OR the latest insert wins.
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
Jonopoly has quit [Quit: WeeChat 2.8]
elphe has joined #ruby
fandre1986 has joined #ruby
imode has quit [Ping timeout: 264 seconds]
oddp has joined #ruby
SeepingN has joined #ruby
user123 has left #ruby [#ruby]
zacts has quit [Ping timeout: 256 seconds]
markoong has joined #ruby
chalkmonster has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
SeepingN has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
zacts has joined #ruby
zacts has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
markoong has joined #ruby
dionysus69 has joined #ruby
bambanx has quit [Quit: Leaving]
konsolebox has quit [Read error: Connection reset by peer]
evdubs has quit [Ping timeout: 244 seconds]
zacts has joined #ruby
konsolebox has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zacts has quit [Quit: WeeChat 2.8]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sphex_ has quit [Ping timeout: 258 seconds]
sphex has joined #ruby
evdubs has joined #ruby
clemens3 has joined #ruby
alfiemax has joined #ruby
schne1der has joined #ruby
Mikaela has quit [Quit: Mikaela]
Mikaela has joined #ruby
drincruz has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
plutes has quit [Ping timeout: 272 seconds]
BH23 has quit [Ping timeout: 240 seconds]
rose_nd_ash has quit [Remote host closed the connection]
ujjain2 has joined #ruby
<ujjain2> rvm not found...
<ujjain2> but it was installed in /usr/local/rvm/ on my docker container
<ujjain2> should it be /usr/local/rvm/bin/rvm or?
konsolebox has joined #ruby
<ujjain2> + /usr/local/rvm/bin/rvm --default use ruby-2.6.3
<ujjain2> RVM is not a function, selecting rubies with 'rvm use ...' will not work.
rose_nd_ash has joined #ruby
<TheBrayn> I'm loading rvm from ~/.rvm/scripts/rvm in my .zshrc which turns rvm into a function
rose_nd_ash has quit [Remote host closed the connection]
ellcs has joined #ruby
fercell has joined #ruby
BH23 has joined #ruby
rose_nd_ash has joined #ruby
pwnd_nsfw has quit [Remote host closed the connection]
UncleCid has joined #ruby
Uncle_Cid has joined #ruby
markong has joined #ruby
markoong has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
TCZ has joined #ruby
UncleCid has quit [Ping timeout: 240 seconds]
TCZ has quit [Client Quit]
lemon395 has quit [Quit: Leaving]
TCZ has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 244 seconds]
rose_nd_ash has joined #ruby
titanbiscuit has quit [Ping timeout: 240 seconds]
titanbiscuit has joined #ruby
Frobozz_ has joined #ruby
yasumi2136 has joined #ruby
Frobozz has quit [Ping timeout: 264 seconds]
drincruz has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
MadLamb has joined #ruby
konsolebox has joined #ruby
TCZ has quit [Quit: Leaving]
nehsa has quit [Ping timeout: 245 seconds]
purefan has quit [Quit: Leaving]
elphe has quit [Ping timeout: 264 seconds]
fandre1986 has quit [Ping timeout: 240 seconds]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wymillerlinux has joined #ruby
arahael1 has joined #ruby
TCZ has joined #ruby
Arahael has quit [Ping timeout: 256 seconds]
BSaboia has joined #ruby
elphe has joined #ruby
stryek has joined #ruby
lmat has quit [Ping timeout: 256 seconds]
baojg has quit [Remote host closed the connection]
lmat has joined #ruby
baojg has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
ujjain2 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has quit [Remote host closed the connection]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
mossplix has joined #ruby
<MadLamb> I had some downtime on my rails app because its using active record include() to load an association, and the associated items got deleted. I can see two solutions to this problem. Either I can make sure the association is deleted when the model is deleted, or I need to use a join instead of a include, to make sure I only get results if the id exists on both tables. I tried to go for the first, but the model already has a ":dependent => :destroy
<MadLamb> ", which doesn't seem to be effective. I am wondering if it is even technically possible to filter out non null without a join. Since the query is limited to 3, if one of the results of the first query is null, then my resultset would be 2.
xall__ has joined #ruby
mossplix has quit [Remote host closed the connection]
xall__ has quit [Client Quit]
wallace_mu has joined #ruby
ChmEarl has joined #ruby
gitter1234 has joined #ruby
<lmat> I told my client that we're running on "Llamas in Pajamas". He fired me
<lmat> MadLamb: Sorry you had down time...yuck. I don't know about include(), but I'm sure coming up with some SQL that "filter out non null without a join" wouldn't be too bad at all.
baojg has quit [Remote host closed the connection]
wymillerlinux has quit [Ping timeout: 246 seconds]
baojg has joined #ruby
MadLamb has left #ruby ["Leaving"]
MadLamb has joined #ruby
<MadLamb> lmat, yeah :D
rose_nd_ash has quit [Remote host closed the connection]
<MadLamb> lmat, I think this approach with the include tries to optimize by not having the database to join the whole table, but instead do a small filter of 3 items first and do an additional query
<apotheon> lmat: I must be missing the joke, because I have no idea why someone would tell a client "we're running on Llamas in Pajamas".
rose_nd_ash has joined #ruby
mossplix has joined #ruby
<MadLamb> lmat, I also missed the joke but would guess it goes in the direction of the tech being childish
mossplix has quit [Remote host closed the connection]
<lmat> apotheon: You run Llamas in Pajamas, too, right?
jesfre has joined #ruby
<al2o3-cr> lmat: that's funny.
rose_nd_ash has quit [Remote host closed the connection]
impermanence has quit [Quit: Connection closed]
markong has quit [Ping timeout: 240 seconds]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Remote host closed the connection]
dualfade has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Ping timeout: 260 seconds]
Doc_X has joined #ruby
CrazyEddy has joined #ruby
Doc_X has left #ruby [#ruby]
<apotheon> lmat: No, I don't use Puma.
Doc_X has joined #ruby
Doc_X has left #ruby [#ruby]
dualfade has joined #ruby
sagax has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<adam12> lmat: Time to ugrade to 4.x :)
<apotheon> I'm sure Puma is great. I just don't use it.
<adam12> We have a bunch of great app servers now. To think there was a time that we only had Mongrel.
<apotheon> What about WEBrick?
<apotheon> I remember WEBrick.
<adam12> Right! I forgot about WEBrick, tho the concensus at the time was don't run it in prod.
<apotheon> I kinda feel like people are giving their releases names without any practical reason behind it, just because it's a thing other people do. It seems like a case of cargo-cult release details.
<apotheon> It's probably Ubuntu that popularized this practice.
<adam12> I prefer no names; remembering Debian Jessie, Debian Sid, etc. vs Debian 6, Debian Testing can be a challenge.
rose_nd_ash has joined #ruby
<apotheon> yep
<apotheon> Release names often just confuse the shit out of people.
mossplix has joined #ruby
<apotheon> I'd prefer either semantic versioning with no names or date-based versioning with no names, depending on dev process.
mossplix has quit [Remote host closed the connection]
yasumi2136_ has joined #ruby
TCZ has quit [Quit: Leaving]
rose_nd_ash has quit [Ping timeout: 265 seconds]
yasumi2136 has quit [Ping timeout: 260 seconds]
xall__ has joined #ruby
Technodrome has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
mossplix has joined #ruby
impermanence has joined #ruby
gitter1234 has quit [Quit: Connection closed for inactivity]
baojg has quit [Remote host closed the connection]
kinduff has joined #ruby
baojg has joined #ruby
schne1der has quit [Ping timeout: 240 seconds]
<xco> how do i turn this curl request to HTTParty? https://gist.github.com/xcobar/c9af128cfd19ce8fcc381f23ef9b1d07
cthu| has joined #ruby
jesfre has quit [Ping timeout: 240 seconds]
MrCrackPot has joined #ruby
SeepingN has joined #ruby
<al2o3-cr> xco: I don't use httparty, but try this: https://gist.github.com/gr33n7007h/a5b2b00cc912297e13be086046c126ae
<xco> al2o3-cr works! thank you :)
<al2o3-cr> xco: welcome
joast has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jmcgnh has quit [Quit: ZNC 1.7.5 - https://znc.in]
howdoi has joined #ruby
TomyWork has quit [Remote host closed the connection]
xco has quit [Quit: Textual IRC Client: www.textualapp.com]
troulouliou_div2 has joined #ruby
Deesl has joined #ruby
Deesl has quit [Client Quit]
jmcgnh has joined #ruby
sagax has joined #ruby
MadLamb has quit [Ping timeout: 240 seconds]
MadLamb has joined #ruby
jesfre has joined #ruby
impermanence has quit [Quit: Connection closed]
dualfade has quit [Ping timeout: 240 seconds]
dualfade has joined #ruby
greengriminal has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
alfiemax has quit [Remote host closed the connection]
mcostacurta has joined #ruby
cd has joined #ruby
alexherbo2 has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
mcostacurta has quit [Quit: Leaving]
alexherbo2 has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
alexherbo28 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo28 is now known as alexherbo2
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexherbo2 has joined #ruby
dualfade has quit [Ping timeout: 246 seconds]
bocaneri has quit [Read error: Connection reset by peer]
dualfade has joined #ruby
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo24 is now known as alexherbo2
xall__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xall__ has joined #ruby
xall__ has quit [Client Quit]
elphe has quit [Ping timeout: 265 seconds]
elphe has joined #ruby
jmoises has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
alfiemax has joined #ruby
imode has joined #ruby
houhoulis has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
jmoises has quit [Remote host closed the connection]
jesfre has quit [Ping timeout: 265 seconds]
cnsvc has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
jesfre has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
xall__ has joined #ruby
alexherbo22 has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
alexherbo22 is now known as alexherbo2
jesfre has quit [Quit: Leaving]
TomyWork has quit [Remote host closed the connection]
gix has joined #ruby
rose_nd_ash has joined #ruby
chalkmonster has joined #ruby
xall__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xall__ has joined #ruby
xall__ has quit [Client Quit]
kinduff has quit [Quit: gg]
chalkmonster has quit [Quit: WeeChat 2.9]
xall__ has joined #ruby
markong has joined #ruby
Technodrome has joined #ruby
ruurd has joined #ruby
kinduff has joined #ruby
amiteous has joined #ruby
alfiemax has joined #ruby
pppktz has quit [Ping timeout: 256 seconds]
xall__ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xall__ has joined #ruby
xall__ has quit [Client Quit]
alfiemax has quit [Ping timeout: 260 seconds]
pppktz has joined #ruby
jetchisel has joined #ruby
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
amiteous has quit [Quit: Textual IRC Client: www.textualapp.com]
MadLamb has quit [Ping timeout: 264 seconds]
bambanx has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
greengriminal has quit [Client Quit]
greengriminal has joined #ruby
houhoulis has quit []
schne1der has joined #ruby
ur5us has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
rose_nd_ash has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
renich has joined #ruby
BenDover has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
schne1der has quit [Ping timeout: 264 seconds]
arooni_team_b is now known as arooni
dmgk has joined #ruby
Frobozz_ is now known as Frobozz
bambanx has quit [Ping timeout: 240 seconds]
arzWZM has quit [Ping timeout: 258 seconds]
arzWZM has joined #ruby
markoong has joined #ruby
markong has quit [Ping timeout: 258 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
Uncle_Cid has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 264 seconds]
Uncle_Cid has joined #ruby
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dmgk has left #ruby [#ruby]
orbyt_ has joined #ruby
yasumi2136_ has quit [Remote host closed the connection]
BenDover has quit [Remote host closed the connection]
lmat has quit [Ping timeout: 240 seconds]
<tubbo> is it possible to use refinements for class-level methods? i tried this: https://gist.github.com/tubbo/7fdcc410c2024371733e6a8b44a9a718 but it didn't seem to work
<tubbo> i know AS::Concern has that `included { }` block..
drincruz has quit [Ping timeout: 265 seconds]
gueorgui_ has joined #ruby
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
gueorgui has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
Frobozz has quit [Quit: quit]
<al2o3-cr> tubbo: refine <Class>.singleton_class do; ...
<tubbo> al2o3-cr: i tried that but it only seems to be for refining class methods
<tubbo> i can't actually call a class method, because the block's `self` is actually an anonymous module. i have no access to the actual class definition.
<tubbo> refinements are lame :(
<al2o3-cr> lol.
<tubbo> what we _really_ want is locally-scoped reopenable classes :D
wymillerlinux has joined #ruby
<al2o3-cr> tubbo: ok.
<al2o3-cr> tubbo: try using a binding?
<al2o3-cr> unbelievable, "refinements are lame"
markoong has quit [Ping timeout: 256 seconds]
Uncle_Cid has quit [Remote host closed the connection]
Uncle_Cid has joined #ruby
<tubbo> what's unbelievable? they have such a narrow use case and there was just so much potential.
<al2o3-cr> tubbo: ok.
<leftylink> now I would like to try it
<leftylink> let's go
<leftylink> wfm
<tubbo> haha
<tubbo> y'all can ping me when you find an actual use for refinements
<tubbo> j/k, i know what they work for...just kinda thought it was going to be more than that way back when it was first announced.
<leftylink> &>> class Foo; def self.b; :orig_b end end; module Bar refine Foo.singleton_class do def a; "#{b} and new a" end end end; using Bar; Foo.a
<rubydoc> # => "orig_b and new a" (https://carc.in/#/r/9g5e)
<leftylink> good enough for me
<leftylink> I'll have to remember that
<leftylink> oh what the heck?
<leftylink> apparently I already did this on 2019-11-01 20:37:52 - and I must have forgotten it. that makes it all the more important that I remember it then, since it shows that I forgot it the first time
<leftylink> can't make the same mistake twice
<leftylink> s/can't/wouldn't want to/
<leftylink> I hate being seen as a person who doesn't learn from past mistakes
<leftylink> it is so frustrating
DarthGandalf has quit [Quit: Bye]
<al2o3-cr> leftylink: that's what docs are for. ffs, no one can remember all of ruby.