<ox1eef_>
Looks like it is fixed on the nightly build, but probably worth reporting anyway.
axsuul has quit [Quit: 👋]
axsuul has joined #ruby
axsuul has quit [Client Quit]
axsuul has joined #ruby
axsuul has quit [Client Quit]
axsuul has joined #ruby
axsuul has quit [Remote host closed the connection]
axsuul has joined #ruby
grenierm has quit [Ping timeout: 246 seconds]
Vonter has quit [Ping timeout: 255 seconds]
Vonter has joined #ruby
teclator has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
_ht has joined #ruby
crespire has joined #ruby
crespire1 has quit [Ping timeout: 258 seconds]
Linux_Kerio has joined #ruby
mynameisdebian has joined #ruby
<mynameisdebian>
A Scraper object has a name, but an inherited class has a name plus other attributes. I used *args in the base class to account for the extra arguments when I call super in the child class. Am I using inheritance properly, or is this bad practice? https://pastebin.com/KRPTCnLz
<mynameisdebian>
Wow that's some real asshole of a bot that scolds you because you didn't remember that a year ago it told you to use gist instead of pastebin
<mynameisdebian>
A Scraper object has a name, but an inherited class has a name plus other attributes. I used *args in the base class to account for the extra arguments when I call super in the child class. Am I using inheritance properly, or is this bad practice? https://gist.github.com/AumCoin/357029bde96faeedf4ef46e67a538646
<ox1eef_>
Yeah I don't like ruby[bot] either but no need to freak out about it.
<mynameisdebian>
sure that's true
<ox1eef_>
Looking at your gist.
<mynameisdebian>
thank you
<ox1eef_>
Couple of notes: 2-space indentation is the standard in Ruby, and generally speaking, it is recommended for a subclass to match the interface of its superclass. In other words, the method signature would be the ame between two. So, the superclass should not define *args, but the subclass should (and if it breaks with the superclass, that'd be an error).
teclator has joined #ruby
<mynameisdebian>
Can you give me an example of what the initialize lines should look like for the 2 classes?
<ox1eef_>
L16 should replace L4. The interface should be compatible between all subclasses.
<mynameisdebian>
but what if I have other subclasses that don't have "token", "api", etc.? Then the interface is not compatible anymore
<ox1eef_>
You could make those optional, the idea is that the interface should work the same across all subclasses, and if it differs, then that difference should be something that's optional.
taupiqueur_shiny has joined #ruby
kokoro_ has quit [Ping timeout: 258 seconds]
<mynameisdebian>
ox1eef_ thank you
<ox1eef_>
No worries.
kokoro has joined #ruby
<leftylink>
I don't want to use *args there because it allows for mistakenly passing in extra args that have no effect, which is confusing. so I'd just remove all args. I would call super(name) instead of super
<leftylink>
s/remove all args/remove all *args/
taupiqueur_shiny has quit [Remote host closed the connection]
taupiqueur_shiny has joined #ruby
OverCoder has joined #ruby
<OverCoder>
I am trying to fix something a ruby source code
<OverCoder>
how does ruby know where to call a function or whatever? I am not seeing imports anywhere
<OverCoder>
does ruby not need explicit imports? does it glob the entire source directory? what?
teclator has quit [Ping timeout: 255 seconds]
patrick- has quit [Ping timeout: 245 seconds]
otisolsen70 has joined #ruby
<mynameisdebian>
I tried to install bundler as root but it told me not to. So I ran `gem install --user-install bundler
<mynameisdebian>
` as a normal user and it failed, telling me "There was an error while trying to write to `/var/lib/gems/2.7.0/cache/timers-1.1.0.gem`. It is likely that you
<mynameisdebian>
need to grant write permissions for that path." Am I really supposed to manually need to grant permissions to this random path to use bundler to install a gem? I don't remember ever doing this before
<mynameisdebian>
sorry I typed that wrong. Bundler works as a user, but when trying to do `bundle install` it fails with this message about write permissions
patrick- has joined #ruby
infinityfye has joined #ruby
<ox1eef_>
You can use 'bundle install --path=.mybundle' instead.
<ox1eef_>
OverCoder: The functions available to a C file is determined by the headers it includes.
<leftylink>
if there are any doubts about where a function is defined, Method#source_location answers that question, but it seems that this is not actually the question at hand
<ox1eef_>
You could be right. Not sure what they meant.
<leftylink>
we can also examine the value of $LOADED_FEATURES to determine which files have been required. I can confirm that you do need to require a file before you can use the functions in it.
reset has joined #ruby
Vonter has quit [Ping timeout: 255 seconds]
Vonter has joined #ruby
Vonter has quit [Ping timeout: 255 seconds]
<OverCoder>
ox1eef_: C file? it's a .rb file
<konsolebox>
OverCoder: Are you referring to how methods are imported when using require?
<OverCoder>
I opened a .rb file and Found::Stuff::Like.this()
<konsolebox>
OverCoder: From another rb file or a loadable shared object.
<OverCoder>
yea how does it know which .rb file to look into
<konsolebox>
OverCoder: Try using Method#source_location
<konsolebox>
E.g. Rails.configuration.method(:to_prepare).source_location
<OverCoder>
thing is, it's a HUGE application and I can't just quickly re-run things
<OverCoder>
(it takes time)
<OverCoder>
I don't even know where that would be logged
<ox1eef_>
Run 'bundle exec rails c', and run that command. It will return a two-element array, first element is the file where it is defined, second is the line number.
<konsolebox>
OverCoder: It doesn't log anything. It just returns an array contain a string and an integer. You have to implement the logging.
intellig1nt_boat has quit [Server closed connection]
intelligent_boat has joined #ruby
konsolebox has joined #ruby
jess has joined #ruby
taupiqueur_shiny has quit [Remote host closed the connection]
Vonter has joined #ruby
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 245 seconds]
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 246 seconds]
Vonter has quit [Ping timeout: 255 seconds]
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 258 seconds]
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 258 seconds]
constxqt_ has joined #ruby
Conteur_Linky has joined #ruby
Conteur_Linky has left #ruby [#ruby]
constxqt_ has quit [Ping timeout: 255 seconds]
constxqt_ has joined #ruby
John_Ivan_ has joined #ruby
eddof13 has joined #ruby
willfish has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan_ has quit [Ping timeout: 246 seconds]
Vonter has joined #ruby
jmcgnh has quit [Ping timeout: 246 seconds]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
desnudopenguino1 is now known as desnudopenguino
jmcgnh has joined #ruby
eddof13 has joined #ruby
Vonter has quit [Ping timeout: 255 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Ping timeout: 250 seconds]
OverCoder has quit [Quit: Connection closed for inactivity]
John_Ivan_ has joined #ruby
taupiqueur_shiny has joined #ruby
taupiqueur_shiny has quit [Remote host closed the connection]
taupiqueur_shiny has joined #ruby
otisolsen70 has quit [Quit: Leaving]
taupiqueur_shiny has quit [Remote host closed the connection]
willfish has quit [Ping timeout: 245 seconds]
xmachina has joined #ruby
_ht has quit [Remote host closed the connection]
xmachina has quit [Quit: WeeChat 4.0.4]
konsolebox has quit [Quit: Leaving]
konsolebox has joined #ruby
xmachina has joined #ruby
xmachina has quit [Client Quit]
brokkoli_origin has quit [Remote host closed the connection]
infinityfye has quit [Quit: Leaving]
brokkoli_origin has joined #ruby
Linux_Kerio has quit [Ping timeout: 255 seconds]
konsolebox has quit [Ping timeout: 255 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
constxqt_ has quit [Ping timeout: 255 seconds]
constxqt_ has joined #ruby
konsolebox has joined #ruby
constxqt_ has quit [Ping timeout: 245 seconds]
crespire1 has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1!crespire@user/crespire))]
crespire has joined #ruby
crespire1 has quit [Ping timeout: 255 seconds]
constxqt_ has joined #ruby
constxqt_ has quit [Ping timeout: 255 seconds]
ionface has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
<ionface>
I've got an old program which requires gtk2, my distro doesn't even have that available anymore, it doesn't gem install https://dpaste.com/54LV2RDSK