havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: 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!
brool has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
Cork has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
NODE has quit [Quit: changing servers]
bvdw has joined #ruby
pupsikov has joined #ruby
NODE has joined #ruby
TCZ has quit [Quit: Leaving]
regedit has quit [Quit: Connection closed for inactivity]
samort7 has joined #ruby
olddogbarks has quit [Quit: I am functioning within established parameters.]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
DaRock has joined #ruby
duderonomy has quit [Ping timeout: 268 seconds]
tau has joined #ruby
tauuu has joined #ruby
tauuu has quit [Remote host closed the connection]
meinside has joined #ruby
<adam12> leitz: You got this :)
tpanarch1st has quit [Read error: Connection reset by peer]
smoochsmooch has joined #ruby
TCZ has joined #ruby
markoong has quit [Ping timeout: 255 seconds]
schne1der has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
ur5us has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
darkstarx has quit [Remote host closed the connection]
thecoffemaker has quit [Ping timeout: 258 seconds]
leitz has quit [Quit: Leaving]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
ewanchic has quit [Ping timeout: 255 seconds]
ewanchic has joined #ruby
wildtrees has quit [Quit: Leaving]
samort7 has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 240 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
duderonomy has joined #ruby
ewanchic has quit [Ping timeout: 255 seconds]
thecoffemaker has joined #ruby
thecoffemaker has quit [Client Quit]
thecoffemaker has joined #ruby
ianbrown78 has quit [Ping timeout: 268 seconds]
cadeskywalker has quit [Ping timeout: 268 seconds]
TCZ has quit [Quit: Leaving]
ianbrown78 has joined #ruby
ewanchic has joined #ruby
ianbrown78 has quit [Ping timeout: 256 seconds]
ianbrown78 has joined #ruby
cadeskywalker has joined #ruby
gix has quit [Ping timeout: 240 seconds]
uplime has quit [Quit: ZNC 1.7.5 - https://znc.in]
uplime has joined #ruby
ianbrown78 has quit [Ping timeout: 256 seconds]
pinpox has joined #ruby
pinpox- has quit [Ping timeout: 240 seconds]
ianbrown78 has joined #ruby
snuz has joined #ruby
znz_jp has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
lightstalker has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 260 seconds]
<ewanchic> I didn't think I could do this, but...I can have duplicate keys in a hash on the same level? how do I reference each one? I'm not sure if this is the right this to do anyway.
<ewanchic> ewanchic: nevermind
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ianbrown78 has quit [Ping timeout: 255 seconds]
kujira has joined #ruby
ianbrown78 has joined #ruby
cnsvc_ has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
tau has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
brool has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
lightstalker has joined #ruby
Tempesta has joined #ruby
jenrzzz has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jenrzzz has quit [Ping timeout: 256 seconds]
smoochsmooch has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
znz_jp has joined #ruby
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 255 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
ttoocs has joined #ruby
cnsvc_ has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
jenrzzz has joined #ruby
chalkmonster has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ruby
titanbiscuit has quit [Ping timeout: 246 seconds]
* lovelove reading Perl docs and realizing how beautiful Python is
* lovelove reading Python docs and realizing how beautiful Ruby is
lol768 has quit [Ping timeout: 248 seconds]
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
titanbiscuit has joined #ruby
<lovelove> i gotta repost that in #python and #perl
lol768 has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
howdoi has joined #ruby
FastJack has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
FastJack has quit [Ping timeout: 256 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
ianbrown78 has quit [Ping timeout: 256 seconds]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
FastJack has joined #ruby
galaxie has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Quit: WeeChat 2.7.1]
jmcgnh has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
jmcgnh has joined #ruby
TzilTzal has joined #ruby
al2o3-cr has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
fercell has joined #ruby
gdonald has quit [Ping timeout: 240 seconds]
<howdoi> I have ditched my JS gig for an ROR gig, did a do the right thing?
xorl has quit [Quit: xorlllllllllll]
markopasha has joined #ruby
galaxie has joined #ruby
ewanchic has quit [Ping timeout: 255 seconds]
ewanchic has joined #ruby
TzilTzal has quit [Quit: Leaving.]
TzilTzal has joined #ruby
ewanchic has quit [Ping timeout: 268 seconds]
caterfxo has quit [Quit: leaving]
caterfxo has joined #ruby
infinityfye has joined #ruby
hiroaki_ has quit [Ping timeout: 258 seconds]
duderonomy has quit [Ping timeout: 256 seconds]
Nilium has left #ruby [#ruby]
ewanchic has joined #ruby
sauvin has joined #ruby
TheAthlete has joined #ruby
LinuxKnight has joined #ruby
jenrzzz has joined #ruby
sdu has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Inoklocae has joined #ruby
<Inoklocae> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Inoklocae> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Inoklocae> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
Inoklocae has left #ruby [#ruby]
ajacla has joined #ruby
<ajacla> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<ajacla> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<ajacla> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
ajacla has left #ruby [#ruby]
Smoacheodr has joined #ruby
<Smoacheodr> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Smoacheodr> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Smoacheodr> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
Smoacheodr has left #ruby [#ruby]
Eshaateop has joined #ruby
<Eshaateop> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Eshaateop> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Eshaateop> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
Eshaateop has left #ruby [#ruby]
Cork has quit [Remote host closed the connection]
<baweaver> Is it time to set registered only again? So soon?
Edrash has joined #ruby
<Edrash> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Edrash> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
<Edrash> [Global Notice] Hello, freenode will be undergoing maintenance 3 hours from now. Please disconnect from this network, connect to irc.quakenet.org, and join #Quakenet for updates, otherwise, you may be k-lined permanently from freenode. Thank you. -freenode staff
Edrash has left #ruby [#ruby]
DaRock has quit [Read error: Connection reset by peer]
cnsvc_ has quit [Ping timeout: 240 seconds]
<baweaver> You'll have to auth to the NickServ to chat, see the channel topic for more info
<baweaver> Also kindly ignore the spammers
code_zombie has quit [Quit: Leaving]
<baweaver> ==================================================================
<baweaver> KINDLY IGNORE ALL K-LINE THREATS: IT'S SPAM, YOU'RE FINE
<baweaver> ==================================================================
ur5us has quit [Ping timeout: 256 seconds]
conta1 has joined #ruby
i9zO5AP has quit [Ping timeout: 240 seconds]
clemens3 has joined #ruby
i9zO5AP has joined #ruby
prestorium has joined #ruby
conta1 has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
kujira has quit [Ping timeout: 256 seconds]
chalkmonster has joined #ruby
cnsvc_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
cd has quit [Quit: cd]
<kinduff> nice spam
TomyWork has joined #ruby
<kinduff> lovelove +++
FlorianFa has quit [Ping timeout: 260 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
sameerynho has joined #ruby
conta1 has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
ewanchic has quit [Ping timeout: 240 seconds]
ewanchic has joined #ruby
<ytti> bizarre that someone is so invested on success or failure of particular ircnetwork, that they'd go through all this trouble
<ytti> bless their heart
Fernando-Basso has joined #ruby
chalkmonster has joined #ruby
ewanchic has quit [Ping timeout: 256 seconds]
conta1 has quit [Remote host closed the connection]
lineus_ has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
ewanchic has joined #ruby
ewanchic has quit [Ping timeout: 240 seconds]
ewanchic has joined #ruby
ianbrown78 has joined #ruby
ewanchic has quit [Ping timeout: 256 seconds]
phaul has joined #ruby
deathwishdave has joined #ruby
ianbrown78 has quit [Ping timeout: 256 seconds]
phaul_ has quit [Ping timeout: 256 seconds]
cnsvc_ has joined #ruby
cisco has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
royal_screwup21 has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
ewanchic has joined #ruby
_phaul has joined #ruby
ellcs has joined #ruby
sdu has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 258 seconds]
lurkless has quit [Ping timeout: 246 seconds]
sdu has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
kinduff has quit [Read error: Connection reset by peer]
GodFather has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
markoong has joined #ruby
GodFather has joined #ruby
batisi[m] has quit [Quit: killed]
turt2live has quit [Quit: killed]
kp666[m] has quit [Quit: killed]
scipio_africanu4 has quit [Quit: killed]
braidn[m] has quit [Quit: killed]
mistergibson[m] has quit [Quit: killed]
stan has quit [Quit: killed]
CRISPRkrspr[m] has quit [Quit: killed]
sepp2k has quit [Quit: killed]
rg_3[m] has quit [Quit: killed]
deimos[m] has quit [Quit: killed]
cnsvc_ has joined #ruby
tomaw_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
tomaw has quit [Ping timeout: 633 seconds]
RiPuk has quit [Ping timeout: 240 seconds]
RiPuk has joined #ruby
markoong has quit [Ping timeout: 256 seconds]
markong has joined #ruby
rkoller has joined #ruby
rkoller has quit [Client Quit]
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<CommunistWolf> hmm, how could I tell rubocop to ban all instances of `catch` ? Is it just a method?
<lovelove> sup kinduff
<lovelove> fuck you
<CommunistWolf> I don't see a helper for it
<lovelove> oh sorry. yeah thanks :) actually yeah i shouldn't have reposted it
<lovelove> didn't mean to set off any alarm bells or nothing
* lovelove needs some coffee
* lovelove is reminded he hasn't read this week's ruby weekly
<lovelove> i'm way behind times
<lovelove> including ruby in at least half of my rhymes
sergioro has quit [Quit: leaving]
cnsvc_ has joined #ruby
ravenx has quit [Ping timeout: 260 seconds]
darkstardevx has quit [Ping timeout: 260 seconds]
<lovelove> why does soundcloud need to know my age and programming preference
postmodern has quit [Quit: Leaving]
darkstardevx has joined #ruby
ravenx has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<lovelove> it should know my age and my love prereference :)
<lovelove> brb
<lovelove> and yeah
* lovelove likes to hook up with chicks at ruby cosplay events
<lovelove> *coffee*
<lovelove> * preference
turt2live has joined #ruby
stan has joined #ruby
royal_screwup21 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
<lovelove> Watching this movie on repeat until it's making sense: RUBY SPARKS: Official Trailer - https://www.youtube.com/watch?v=xb3_AE-UinY
<lovelove> Dealing with objects like FedEx deliverance: https://www.youtube.com/watch?v=FTYekZLmGaw
cnsvc_ has joined #ruby
<kinduff> oh my god was i insulted?
<kinduff> again?
cisco has quit [Ping timeout: 258 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
royal_screwup21 has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
conta1 has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
TheAthlete has quit [Remote host closed the connection]
chalkmonster has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
Macrobiotic has joined #ruby
burningserenity has joined #ruby
TCZ has joined #ruby
lucasb has joined #ruby
royal_screwup21 has joined #ruby
conta1 has quit [Quit: conta1]
royal_screwup21 has quit [Remote host closed the connection]
drincruz has joined #ruby
TCZ has quit [Quit: Leaving]
royal_screwup21 has joined #ruby
TzilTzal has quit [Quit: Leaving.]
kaivai_ has joined #ruby
burningserenity has quit [Ping timeout: 265 seconds]
ldepandis has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caterfxo has quit [Quit: leaving]
caterfxo has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
burningserenity has joined #ruby
deathwishdave has joined #ruby
cisco has joined #ruby
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
burningserenity has quit [Remote host closed the connection]
Esa_ has joined #ruby
alexherbo2 has joined #ruby
Jonopoly has joined #ruby
burningserenity has joined #ruby
dviola has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 258 seconds]
royal_screwup21 has joined #ruby
drincruz has joined #ruby
lurkless has joined #ruby
TzilTzal has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
ttoocs has quit [Ping timeout: 256 seconds]
leitz has joined #ruby
simo3n has joined #ruby
simo3n has left #ruby ["Leaving"]
royal_screwup21 has quit [Remote host closed the connection]
Cork has joined #ruby
advorak has quit [Quit: Leaving]
jmcgnh has quit [Ping timeout: 256 seconds]
<al2o3-cr> &>> 2 * "@\t!\xFBTD-\x18".unpack1(?G)
<rubydoc> # => 6.283185307179586 (https://carc.in/#/r/8o21)
jmcgnh has joined #ruby
hutch has joined #ruby
burningserenity has quit [Quit: Leaving.]
burningserenity has joined #ruby
burningserenity has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
markopasha has quit [Remote host closed the connection]
cnsvc_ has quit [Ping timeout: 240 seconds]
<TomyWork> &>> "@\t!\xFBTD-\x18".unpack1(?G)
<rubydoc> # => 3.141592653589793 (https://carc.in/#/r/8o25)
<TomyWork> excuse me, why is this pi?
<TomyWork> evil magic
<TomyWork> oh this just unpacks pi from a binary-ish string
impermanence has joined #ruby
duderonomy has joined #ruby
sam808080 has quit [Ping timeout: 258 seconds]
mre- has quit [Ping timeout: 258 seconds]
mre- has joined #ruby
SeepingN has joined #ruby
romanlevin has quit [Quit: Ping timeout (120 seconds)]
romanlevin has joined #ruby
burningserenity has joined #ruby
mre- has quit [Ping timeout: 258 seconds]
ellcs has quit [Ping timeout: 240 seconds]
mre- has joined #ruby
tomaw_ is now known as tomaw
legalproblem has joined #ruby
sdu has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
brool has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
drincruz has quit [Ping timeout: 255 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
cnsvc_ has joined #ruby
DTZUZU has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
MrCrackPot has joined #ruby
conta1 has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
<CommunistWolf> lovelove needs banning
mre- has joined #ruby
conta1 has quit [Ping timeout: 260 seconds]
prestori_ has joined #ruby
RefactoredNoise has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
<havenwood> !rude lovelove
prestorium has quit [Ping timeout: 258 seconds]
prestori_ has quit [Ping timeout: 256 seconds]
d3bug has joined #ruby
dviola has quit [Quit: WeeChat 2.7.1]
mre- has quit [Ping timeout: 255 seconds]
burningserenity has quit [Remote host closed the connection]
RefactoredNoise has quit [Quit: WeeChat 2.7.1]
RefactoredNoise has joined #ruby
legalproblem has quit [Ping timeout: 268 seconds]
mre- has joined #ruby
RefactoredNoise has quit [Client Quit]
cnsvc_ has joined #ruby
paddor_ has joined #ruby
<paddor_> Hi guys
<paddor_> I'm going crazy and need your help. I'm trying to use super in a class method ankered in my Base class. Ruby tells me there is no superclass method for the sub class. If I remove super and explicitly type `superclass.foo`, it works. Why?
cnsvc_ has quit [Ping timeout: 240 seconds]
fercell has quit [Quit: WeeChat 2.7]
<leftylink> unfortunately, I couldn't reproduce the problem from just the written description of it; the code I came up with that best represents the written description was
<leftylink> &>> class A; def self.f; :yes end; end; class B < A; def self.g; f end; end; B.g
<rubydoc> # => :yes (https://carc.in/#/r/8o2r)
<leftylink> so it seems something else was meant
mre- has quit [Ping timeout: 268 seconds]
<leftylink> I must hvae failed to distinguish this from other alternative interpretations of the written text. I apologise for that failure
gix has joined #ruby
<paddor_> leftylink: Did you mean me?
<havenwood> paddor_: Show the code?
ianbrown78 has joined #ruby
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
MrCrackPot has quit [Quit: Leaving]
ianbrown78 has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
<paddor_> Any ideas?
<havenwood> paddor_: The superclass of Base is Object.
<paddor_> Yeah, but Base.property should never call super, because self == Base in that case.
<paddor_> Also, the exception is raised in Sub.foo
cnsvc_ has joined #ruby
<havenwood> paddor_: Ah, right. Gotcha, so you're doing a recursion once to the superclass. That's a strange pattern and not one I'd recommend.
<paddor_> How would you solve this?
<havenwood> paddor_: If you have a single instance of state, I'd recommend a Singleton Class.
<havenwood> paddor_: What you're showing seems clearer to me as a mixin, where super would be going the direction you want.
<havenwood> paddor_: I have to jump in a meeting, but I'm curious about the surrounding code and purpose for this abstraction.
<paddor_> Base and all its subclasses act as singletons in this case, because the state is in class-level instance variables.
cnsvc_ has quit [Ping timeout: 240 seconds]
<havenwood> paddor_: Well, you *can* just put instance variables on anything - but a Singleton mixin is a different thing.
<havenwood> paddor_: See the docs above ^
<paddor_> Btw, I forgot to call #dup on the super's result. That doesn't solve this weird error though. If anyone wants to have a try at it: https://carc.in/#/r/8o3d
<paddor_> havenwood: Dude, I know what the singleton pattern is. It's about making sure only one instance of a certain class is created and accessed. That is not what I need here. Thanks for your help though.
<havenwood> paddor_: I just wondered, since this *isn't* a Ruby singleton - you're just using an instance method at the class level, which is an antipattern generally.
<havenwood> paddor_: You should probably use a mixin here, rather than inheritance
<havenwood> paddor_: It's hard to tell *why* you're doing this from the code your'e showing
<paddor_> Okay, then how would you implement the factory pattern or where do you think ActiveRecord's has_many is implemented?
DTZUZU has quit [Ping timeout: 255 seconds]
ewanchic has quit [Ping timeout: 240 seconds]
royal_screwup21 has joined #ruby
ellcs has joined #ruby
DTZUZU has joined #ruby
<paddor_> Without going into too much detail: I want to be able to declare certain attributes as special, and I wanna do this on class-level (like has_many and friends) and I want the it to inherit the list of special attribute names from the superclass the first time this is done in a sub class. I need this to remove these properties in #initialize_dup.
<havenwood> paddor_: The Rails attributes API is actually quite nice if you want to make a custom ActiveModel that's ActiveRecord-like. Is this for a Rails app or outside Rails?
burningserenity has joined #ruby
<paddor_> I'm not using Rails or ActiveModel or ActiveRecord.
<havenwood> paddor_: Ah, okay. I was gunna say I gave a talk on the attributes API with ActiveModel, which is actually pretty neat. https://youtu.be/6h5TbKBnLws
<havenwood> paddor_: You can use it outside of Rails too.
<havenwood> paddor_: You simple cherry pick just attributes in a class with `include ActiveModel::Attributes`.
<paddor_> That's really cool. But I'm more interested in why `super` doesn't work in that case.
ewanchic has joined #ruby
<havenwood> paddor_: The reason is that `super` looks down the ancestry chain for a method defined by the same name.
royal_screwup21 has quit [Remote host closed the connection]
whathappens has joined #ruby
<havenwood> paddor_: As soon as I get out of meetings I can show how to do a similar pattern.
<havenwood> (Unless someone beats me to it.)
<paddor_> Exactly. So what's the issue with https://carc.in/#/r/8o3m (updated to show my needs btw)?
royal_screwup21 has joined #ruby
markopasha has joined #ruby
ewanchic has quit [Ping timeout: 255 seconds]
ianbrown78 has joined #ruby
cnsvc_ has joined #ruby
whathappens has quit [Remote host closed the connection]
LinuxKnight has quit [Ping timeout: 240 seconds]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
ianbrown78 has quit [Ping timeout: 255 seconds]
cisco has quit [Ping timeout: 258 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
royal_screwup21 has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
SeepingN_ has joined #ruby
SeepingN has quit [Disconnected by services]
sameerynho has quit [Ping timeout: 260 seconds]
iNs has quit [Ping timeout: 240 seconds]
<adam12> havenwood: The callback pattern around the 7 minute mark is handy. I was just doing it manually in a project (some_before_hook.call, do work, some_after_hook.call) and thinking I need to put an abstraction around it.
iNs has joined #ruby
burningserenity has quit [Read error: Connection reset by peer]
burningserenity has joined #ruby
robotcars has joined #ruby
<robotcars> seem to have lost limit() with activesupport between 5.2.2 and 6.0.2.1
<robotcars> undefined method `truncate_bytes' ...
<robotcars> ...activesupport-6.0.2.1/lib/active_support/multibyte/chars.rb:61:in `method_missing'
<robotcars> .../activesupport-6.0.2.1/lib/active_support/multibyte/chars.rb:125:in `limit'
<robotcars> can't find docs on deprecate or replacement… anyone have an eye on that?
stryek has joined #ruby
rippa has joined #ruby
quintasan has quit [Quit: quintasan]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
cnsvc_ has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
<havenwood> paddor_: Okay, out of meetings for a moment. Consider these examples: https://gist.github.com/havenwood/d74b31d1e3fdcc56768a03c3480ffbc4
burningserenity has quit [Quit: Leaving.]
<howdoi> I have ditched my JS gig for an ROR gig, did a do the right thing?
<havenwood> adam12: Yeah, I was pleased to find that. :)
<havenwood> howdoi: Sounds good to me.
TzilTzal has quit [Quit: Leaving.]
burningserenity has joined #ruby
<howdoi> havenwood: many are like, why ROR? [It is dying]
<howdoi> + Go or something would pay you more
<havenwood> howdoi: None of the most used frameworks in the world are dying. ¯\_(ツ)_/¯
<havenwood> howdoi: Who pays Go programmers more? Haha.
<havenwood> howdoi: I thought the idea of Go was the opposite, making it easy for students to get coding quickly.
<howdoi> havenwood: lolz, Okies, that's comforting, but if you chose to be a engineering manager one day, the tech shouldn't matter
<apotheon> Initially, Go was pretty clearly getting pushed as a replacement for C, then for C++.
<havenwood> howdoi: I think learning to code well in any language is the most important thing for pay. I've noticed way more differentiation in pay based on what you can do, rather than the language you do it in.
<apotheon> It's actually a Java replacement, and they missed the boat by not pushing it as such.
ewanchic has joined #ruby
infinityfye has quit [Ping timeout: 255 seconds]
<apotheon> I guess they couldn't, though, because that'd undermine all the work on Android.
<howdoi> 😬
cnsvc_ has quit [Ping timeout: 240 seconds]
<paddor_> havenwood: The properties in your examples are not inherited. Also, I'd like to avoid meta programming.
<havenwood> apotheon: Also, Android has a 10-billion-dollar verdict and potential for related injunctions hanging over its head. We'll see how that goes! If Oracle's gets a painful injunction we may see a lot more Fuschia.
<havenwood> Fuchsia*
<paddor_> havenwood: And my entities are not singletons.
<apotheon> Oracle needs to die in a fire.
hutch has quit [Ping timeout: 268 seconds]
<apotheon> The very idea of suing over API compliance is evil.
<havenwood> paddor_: I can't see where inheritance matters in your example. I think the example of what you're doing is too contrived for me to implement something you'd like. Do you have something a bit more zoomed out that shows how you'd like to use this?
<paddor_> https://carc.in/#/r/8o3m Anybody? A simple answer as to why it doesn't work would suffice.
<paddor_> havenwood: https://carc.in/#/r/8o3m
<paddor_> havenwood: It doesn't get any simpler and clearer than that.
Esa_ has quit []
<havenwood> paddor_: Your code isn't straightforward at all. It's bizarre. You're inheriting a method and seem to think #super has something to fall back to, but it doesn't. You're not calling a #properties method on A or B that has a #super to Base.
<paddor_> havenwood: Okay. Then what is Base.property to A.property given A < Base? Not the super method?
ellcs has quit [Ping timeout: 255 seconds]
postmodern has joined #ruby
<havenwood> paddor_: If you defined an A#properties method on A, then #super would be Base#properties.
<havenwood> paddor_: You can't super from a method defined on Base to the same method defined on Base. I'm not following why you think this will work.
<paddor_> It's defined in Base. class A; def self.foo() :foo end end; class B < A; end; B.foo # <- this works, after all
hutch has joined #ruby
<havenwood> paddor_: Maybe show how you expect to use this in practice, so we can show an appropriate pattern? How are you planning to use the inheritance aspect?
<paddor_> I'm not trying to call super from Base. That's why there is if self == Base.
<paddor_> havenwood: It's shown in the two classes A and B and the last two lines. A.properties should return [:foo] and B.properties should return [:foo, :bar].
jmcgnh has quit [Read error: Connection reset by peer]
<adam12> paddor_: You're in the singleton or eigenclass when you attempt to call super. I don't believe that the singleton class is inherited the same way as normal classes are. Is there anything wrong with just calling superclass how you are?
<paddor_> Look, no matter what my usecase is. Why does `super` NOT work, while `superclass.properties` works? It's a simple question about Ruby.
jmcgnh has joined #ruby
<adam12> paddor_: Your attitude isn't welcome here. We're all volunteers trying to help.
<paddor_> I guess there is nothing wrong with `superclass.properties`. But I'm wondering why `super` doesn't work, since methods in the singleton class are obviously inherited as well: https://carc.in/#/r/8o4n
<adam12> paddor_: You're inheriting a class. The singleton class is a class inside the class. Maybe you can hook into the `included` method to do some magic. It's obviously not a simple question or else you would of had an answer.
<leftylink> by the way, it did not matter whether they are class methods or not.
<leftylink> &>> class A; def foo; if self.class == A; :yes else; super end; end; end; class B < A; end; [A.new.foo, (B.new.foo rescue :no)]
<rubydoc> # => [:yes, :no] (https://carc.in/#/r/8o4o)
<leftylink> you cannot do that either
<leftylink> so, suppose the answer is "super cares not who calls it, but who defined it" ?
burningserenity has quit [Read error: Connection reset by peer]
burningserenity has joined #ruby
<leftylink> compare probably clearer to say
<leftylink> &>> class A; def foo; if self.class == A; :yes else; super end; end; end; class B < A; end; [A.new.foo, (begin; B.new.foo; rescue => e; e.message end)]
<rubydoc> # => [:yes, "super: no superclass method `foo' for #<B:0x00005635687d5fe8>\nDid you mean? for"] (https://carc.in/#/r/8o4r)
<leftylink> as you can see.
<leftylink> s/compare//
<leftylink> it's not a comparison, it's a clarification of the same
<paddor_> leftylink: Interesting. Thanks. I never knew this quirk about super.
<leftylink> I opine that a contributing factor was that the error message didn't designate the owner of foo
<paddor_> And sorry for my attitude.
TomyWork has quit [Ping timeout: 256 seconds]
snuz has quit [Read error: Connection reset by peer]
paddor_ has left #ruby [#ruby]
paddor_ has joined #ruby
<paddor_> leftylink: Good input. Now I get it. `super` only works one level up.
<paddor_> leftylink: Scratch that. I was accidentally using superclass.foo instead of super. It still doesn't really make sense.
<paddor_> Thanks for your help. Gotta go buy food. Stay safe
Fernando-Basso has quit [Quit: Leaving]
paddor_ has quit [Quit: paddor_]
<leftylink> hmm. it's about asking "what model of the world leads to this belief" and "can we challenge that model with examples". but the example must not be good enough. I will see if there is a way to make a better one.
sauvin has quit [Read error: Connection reset by peer]
litt has joined #ruby
caterfxo has quit [Quit: leaving]
<leftylink> it is difficult. next time, maybe I would show who the owner of foo is
<leftylink> &>> class A; def foo end; end; class B < A; end; B.new.method(:foo).owner
<rubydoc> stderr: -e:4: syntax error, unexpected `end', expecting ';' or '\n'... check link for more (https://carc.in/#/r/8o55)
<leftylink> oh no
<leftylink> &>> class A; def foo; end; end; class B < A; end; B.new.method(:foo).owner
<rubydoc> # => A (https://carc.in/#/r/8o56)
litt has quit [Quit: leaving]
paddor has joined #ruby
<apotheon> leftylink: Isn't the problem paddor_ had simply that the "super" is being executed from within Base, and there's no Class#properties?
<kaleido> not that i dedicate much time to ruby, sadly, but every time i start to dabble i realize how lacking my String knowledge is :(
paddor_ has joined #ruby
<havenwood> kaleido: What kind of String trouble are you running into?
<kaleido> just not enough repetitions, really
<kaleido> simple things like extracting vowels from words
paddor has quit [Ping timeout: 256 seconds]
paddor_ is now known as paddor
<kaleido> i google it and find the answer, and its like, "you idiot." :D
<havenwood> &>> 'kaleido'.delete('[aeiou]')
<rubydoc> # => "kld" (https://carc.in/#/r/8o5g)
<havenwood> &>> 'kaleido'.scan(/[aeiou]/)
<rubydoc> # => ["a", "e", "i", "o"] (https://carc.in/#/r/8o5h)
<kaleido> yeah that's all. i start to try to do something and inevitably i have to google for basic things with String :)
<kaleido> i just need to make more time to get the reps in
<havenwood> kaleido: You might like exploring options with Pry, until you're familiar with available methods.
<havenwood> ?pry kaleido
<ruby[bot]> kaleido: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<leitz> Of course, 'better' is an opinion. ;)
<kaleido> havenwood: thanks, i'll do that
<_phaul> ?better
<ruby[bot]> "Best" and "better" are subjective. Try to use a different term, or try to qualify what would make one thing better than the other.
<_phaul> :)
alexherbo29 has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
code_zombie has joined #ruby
caterfxo has joined #ruby
alexherbo2 has quit [Ping timeout: 255 seconds]
alexherbo29 is now known as alexherbo2
ur5us has joined #ruby
ellcs has joined #ruby
cnsvc_ has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
duderonomy has quit [Read error: Connection reset by peer]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
hiroaki_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
regedit has joined #ruby
wildtrees has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
duderonomy has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 258 seconds]
x0n has quit [Quit: ZNC - https://znc.in]
cnsvc_ has joined #ruby
ellcs has joined #ruby
<apotheon> paddor: My understanding of why things don't work the way you wrote them is that A doesn't have the properties method, so it executes the method in Base, but the results of checking the class is still that you're using A even though it's executing something in Base. Thus, the super method refers to Class (the superclass of Base), which doesn't have a properties method.
royal_screwup21 has joined #ruby
<apotheon> paddor: The reason superclass works, but super doesn't, is that superclass searches the inheritance tree for the superclass of the currently identified class, not the superclass of the implementor of the currently executing method.
<apotheon> paddor: Hopefully I'm not mistaken about what's going on, and hopefully that helps you.
<paddor> apotheon: So `self` would still be A, even while executing the supermethod.
ellcs has quit [Ping timeout: 268 seconds]
<apotheon> yep
<apotheon> That approach should help performance and resource burden, because otherwise I think you'd basically have to either add a (relative) bunch more code to target a different class context with the inherited method or you'd have to basically copy all inherited methods to the new context.
<paddor> apotheon: Ah no, self is what I expect it to be. But as you said, `super` seems to act more lexicographically than semantically.
ellcs has joined #ruby
<leftylink> self is as expected
<leftylink> &>> class A; def self.f; self end end; class B < A; end; [A.f, B.f]
<rubydoc> # => [A, B] (https://carc.in/#/r/8o5j)
mre- has joined #ruby
<apotheon> $ irb
<apotheon> irb(main):001:0> class Base; def self.s; p self; end; end; class A < Base; end; A.s
<apotheon> A
<apotheon> paddor: Does that answer your question?
<leftylink> &>> class A; def self.f; self end end; class B < A; end; B.method(:f).owner
<rubydoc> # => #<Class:A> (https://carc.in/#/r/8o5m)
Macrobiotic has quit [Quit: Connection closed for inactivity]
<apotheon> irb(main):002:0> class Base; def self.s; p self.class.name; end; end; class A < Base; end; A.s
<apotheon> "Class"
<paddor> apotheon: Mostly. So `super` works as expected in instance methods because they're not defined in the singleton class? Like C < B < A, where A#foo is defined and C#foo calls super. I'm pretty sure that works.
<apotheon> I've gotta go.
<apotheon> g'luck
<leftylink> based on my current understanding, I do not believe there is a difference between class methods and instance methods in their behaviour of super
<leftylink> an example could change my understanding
burningserenity has quit [Quit: Leaving.]
<paddor> leftylink: You're right.
mre- has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
<paddor> leftylink: I think my brain was on vacation earlier. Of course `self` is always the calling object. And it works with `superclass.meth` because it's a new call on a different object.
x0n has joined #ruby
jjarvis has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
<_phaul> I like to believe that ruby does not care nor does it know if it's executing an instance method or a class method. This was said in the Dave Thomas ruby object model lecture video. I'm not sure if it's still 100% true for all MRIs or there are some special optimization handlings under the hood. But I've never observed anything to the contrary
kristofferR has joined #ruby
markopasha has quit [Read error: Connection reset by peer]
kristofferR has quit [Client Quit]
markopasha has joined #ruby
markopasha has quit [Read error: Connection reset by peer]
mre- has joined #ruby
ellcs has quit [Ping timeout: 268 seconds]
mre- has quit [Ping timeout: 268 seconds]
jjarvis has quit [Quit: WeeChat 2.7.1]
cnsvc_ has quit [Ping timeout: 240 seconds]
royal_screwup21 has quit [Remote host closed the connection]
istrasci has joined #ruby
<istrasci> I'm seeing documentation for a `String#/` method (alias for #split - https://ruby-doc.org/core-2.7.0/String.html#method-i-2F), but I can't get it to work. Keep getting a NoMethodError. Am I doing something wrong, or is this really not implemented? If not, why is it documented?
d3bug has quit [Quit: Connection closed for inactivity]
chalkmonster has joined #ruby
<_phaul> &>> 'xxx' / 'x'
<rubydoc> stderr: -e:4:in `<main>': undefined method `/' for "xxx":String (NoMethodError)... check link for more (https://carc.in/#/r/8o5n)
<_phaul> &ri String#-
<rubydoc> Found no entry that matches class String instance method -
<leftylink> amazing
<_phaul> &ri String#/
<istrasci> Yeah, I tried something similar.
cnsvc_ has joined #ruby
troulouliou_div2 has joined #ruby
ianbrown78 has joined #ruby
royal_screwup21 has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
hutch has quit [Ping timeout: 258 seconds]
robotcars has left #ruby [#ruby]
cnsvc_ has joined #ruby
hutch has joined #ruby
Ai9zO5AP has joined #ruby
TCZ has joined #ruby
i9zO5AP has quit [Ping timeout: 268 seconds]
<_phaul> leftylink: any ideas?
<leftylink> I like how the "show source" shows nothing
<leftylink> as opposed to other methods (they show something)
<istrasci> Then I'm not crazy...
<_phaul> I searched but could not find _any_ trace of where this documentation is coming from, it's not there in any of the git tags that was released for 2.7. Going back in history I can't find a revision where it shows up..
<_phaul> checked preview releases too..
<leftylink> note there's a different icon for it
<leftylink> the icon has a chain link or something
<leftylink> I wonder what that could mean
<leftylink> it must be different from the things without the chain icon
<leftylink> but in what way
<_phaul> defined by alias?
<leftylink> I see
cd has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
stemid has joined #ruby
<stemid> when do rbenv install -l versions update? I've done a git pull in my rbenv repo. followed the install instructions. but if I do rbenv install -l I only get 2.6.4. I'm after 2.6.5
<stemid> I noticed github issues saying 2.6.5 is available for mac os users.
<havenwood> stemid: Update ruby-build rather than rbenv.
<stemid> oh? gotta check that out.
<havenwood> stemid: Alternatively, you can use ruby-install to install for rbenv: https://github.com/postmodern/ruby-install#integration
<stemid> oh wait, I didn't even read my own instructions. my old docs said precisely that. go into ruby-build; git pull; rbenv install -l
<stemid> yup there it is. now 2.6.5 shows up. thanks. had forgotten ruby-build was a plugin to rbenv
troulouliou_div2 has joined #ruby
dStromboli has quit [Ping timeout: 256 seconds]
hutch has quit [Ping timeout: 258 seconds]
hutch has joined #ruby
hiroaki_ has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
reyfi9e has quit [Remote host closed the connection]
chalkmonster has quit [Quit: WeeChat 2.7.1]
unreal has quit [Ping timeout: 240 seconds]
gordie has joined #ruby
<gordie> Hi !
Frobozz___ has quit [Quit: quit]
unreal has joined #ruby
<gordie> I'm quite new to Ruby. I'm trying to deploy my app on Heroku. Well, I did, but I've got some troubles with it. Some endpoints of my API are protected with an API key that checks for the user in the database. My app fails at it. I think that it fails reaching the database. Can anyone help with that ?
<gordie> The non-protected endpoints do work.
reyfi9e has joined #ruby
sergioro has joined #ruby
Emmanuel_Chanel has joined #ruby
chalkmonster has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
mre- has joined #ruby
jmcgnh has joined #ruby
regedit has quit [Quit: Connection closed for inactivity]
ur5us has quit [Ping timeout: 256 seconds]
mre- has quit [Ping timeout: 255 seconds]
<havenwood> gordie: Show the relevant code?
ur5us has joined #ruby
<gordie> Is it possible that my heroku DB is corrupted and that fetching a row fires a 500 error ?
<gordie> I would like to show the relevant code but cannot find where the bug is...... works perfectly locally.
<havenwood> gordie: Sanity check the DB settings maybe? Have you tried switching to a new Heroku DB? I dunno!
SeepingN_ has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
TCZ has quit [Quit: Leaving]
d3bug has joined #ruby
d3bug has quit [Client Quit]
cnsvc_ has quit [Ping timeout: 240 seconds]
leitz has quit [Quit: Leaving]
d3bug has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
turbo_choo has joined #ruby
drincruz has quit [Ping timeout: 255 seconds]