shiboka has quit [Remote host closed the connection]
brokkoli_origina has joined #ruby
brokkoli_origin has quit [Ping timeout: 264 seconds]
xdminsy has quit [Quit: Konversation terminated!]
xdminsy has joined #ruby
konsolebox has joined #ruby
konsolebox_ has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
teardown has joined #ruby
xdminsy has quit [Read error: Connection reset by peer]
<teardown>
i'm using caller_locations(1,1)[0].label.to_sym to get the name of the method that called my method. is there a way to get the name of the method up one level higher, ie: the name of the method that called the method that called the current method?
<Guest26>
is there a way to do a scoped override of a class function?
<Guest26>
for example
<Guest26>
class Foo
<Guest26>
def self.doit
<Guest26>
puts "doit"
<Guest26>
end
<Guest26>
end
<Guest26>
class Bar
<Guest26>
scoped class Foo
<Guest26>
def self.doit
<Guest26>
puts "Bar doit"
<Guest26>
end
<Guest26>
end
<Guest26>
def self.gogo
<Guest26>
Foo.doit #Bar doit
<Guest26>
end
<Guest26>
end
shiboka has joined #ruby
<leftylink>
I'd use a refinement for this purpose
<Guest26>
refinement thanks for the keyword. will look into it!
<leftylink>
and since exactly how to refine a class function may be a little obscure, I will also provide an example
<leftylink>
pandabot rb class Foo def self.doit; :original end end; class Bar using(Module.new { refine(Foo.singleton_class) { def doit; :overridden end } }); def self.dothat; Foo.doit end end; [Foo.doit, Bar.dothat]
<rapha>
and also rubyapi.org, [0x1eef], neither of which google will usually return
<rapha>
the latter, actually, is really great. if i was allowed a better wish, i'd have ruby-doc.org and docs.ruby-lang.org forwarded to that, or mirroring it, or something
<[0x1eef]>
True true, I've long been irritated by how well ruby-doc.org ranks and how bad the ux is on its generated docs.
<teardown>
wnd, moof, thakns
<rapha>
google the unknowable animal
<kyber>
at first i was pretty happy w package management in ruby but i've run into quite a few wtf's now with bundler
<rapha>
[0x1eef]: i just linked that 3 lines above ;)
<[0x1eef]>
Oh woops. Time to reboot my brain. :)
<kyber>
i like apidock
<rapha>
know the feeling...
<kyber>
something about the layout of apidock works well for me
<rapha>
apidock is also nice. only weird that they stopped at ruby + rails + rspec
brokkoli_origin has quit [Ping timeout: 260 seconds]
brokkoli_origin has joined #ruby
<rapha>
to keep elaborating on my wish: the UI of rubyapi.org with apidock.org's "Related" list and some way for authors to submit their own projects so that it might grow beyond just 3
<kyber>
the versioning bar kind of throws me off in apidock
<rapha>
hmm, never used that. it's not visually great tho, lol. and the version selector of rubyapi.org is good enough. i do see how people would want a bar like that. perhaps it could be touched by a UX designer.
<kyber>
i don't like how in rubyapi.org you have two separate scroll bars for the instance methods thingy on the left and then the documentation for the module itself
<kyber>
but that's just my opinion
<rapha>
hmm, yeah, that could be copied over from apidock.org, kyber
<[0x1eef]>
I'm not sure there's any language that excels at docs. I don't know of one. Languages like Java are kind of self-documenting if you take just the type annotiations I guess.
<rapha>
ruby _is_ one of the better ones in that regard
<kyber>
i like ruby's docs in comparison to others.. def not complaining there
<rapha>
my complaint is more about google than about the ruby docs i guess
<kyber>
google sucks with a lot of search results these days
<[0x1eef]>
You could try write a query that excludes ruby-doc.org. I think that's possible but never tried.
<rapha>
it is, [0x1eef] ... -site:ruby-doc.org
<[0x1eef]>
Does that help?
<rapha>
well, it's more typing
<rapha>
and ofc doesn't ehlp with version selection
<rapha>
since from june, i'll loose my ruby-related task at work, sadly, perhaps i'll get into crystal a little. that looks like it could be fun.
<[0x1eef]>
I don't think there's a good default but you could exclude ruby-doc.org and combine that with a simple web page or browser extension for searching for ruby docs.
<rapha>
all of that would only help me, not anyone else. sad that google as a company are so unavailable to their users.
<[0x1eef]>
I've experienced the same problem as you, and eventually realized that google wasn't the best goto for ruby docs.
<rapha>
which engine did you switch to, [0x1eef]?
<[0x1eef]>
I use bookmarks far more often. So instead of searching all the time you return to articles or websites you've already read / visited.
<rapha>
in the case of File that would make a lot of sense lol ... i seem to be hanging out there more often thant with my friends
<[0x1eef]>
Firefox has a nice UI for bookmarks
<[0x1eef]>
Makes it easy to narrow down results and integrates well with the browser
<rapha>
hmm ... one Ctrl-b away, too
<[0x1eef]>
Bookmarks seem to have been forgotten about as a piece of history but I think they have a lot of potential, especially with modern techniques like machine learning and being an extension to a note taking system.
Guest82 has quit [Quit: Client closed]
<kyber>
i think googles search results are only going to get worse from here on
<kyber>
seems that all they care about is AI
user71 has joined #ruby
<rapha>
that's not them alone
<rapha>
sometimes i feel as though technology as such has gone far too far. the rate of change is too high for social development to keep up with it, and so thinks often get worse instead of better. we're not ready as a species for most of the magical things we've created.
jaredce has quit [Ping timeout: 240 seconds]
Al2O3 has joined #ruby
Al2O3 has quit [Changing host]
Al2O3 has joined #ruby
<kyber>
i think some people believe that eventually you won't even need webpages content or links to webpages or even an ability to search those things
Paris has quit [Remote host closed the connection]
<rapha>
some people believe that eventually we'll "transcend" biological bodies and take to the stars as robots
<kyber>
:facepalm:
rvalue has quit [Ping timeout: 264 seconds]
rvalue- has joined #ruby
rvalue- is now known as rvalue
<rapha>
the usual suspect, Elon, but it's not his original ideas. seems anyone can make him believe anything, you just have to wrap it up nicely to stroke his narcissim. look up "transhumanism" if you feel like some cringe.
<rapha>
there's people who are actually interesting, like Neil Harbisson
<rapha>
ah, found the name of the other guy ... Ray Kurzweil. not that i'd think his "singularity" wouldn't be in the realm of possibilities, somewhere, somewhen. but why would we want this?
heinrich5991 has quit [Quit: quit.]
heinrich5991 has joined #ruby
jaredce has joined #ruby
jaredce has quit [Ping timeout: 256 seconds]
graywolf has joined #ruby
<kyber>
rapha: yeah i've read about transhumanism :grimace: