<Guest808>
i still don't understand what is preventing me from loading my own images in my own page, but not preventing me from viewing that image directly
<weaksauce>
because it's a direct image vs html
<Guest808>
and loading that frog image works now, too
<Guest808>
all i really needed was to be told to look at the browser console
<Guest808>
that link was/is also very enlightening
<Guest808>
thank you very kindly
<weaksauce>
you're welcome Guest808 good luck
<johnjaye>
why can i not define method_missing to take 0 arguments?
<johnjaye>
when I try and then call an undefined method I get an ArgumentError.
<weaksauce>
johnjaye post your code
<johnjaye>
e.g. class Array def method_missing puts "foo" end end
<weaksauce>
oh because you need a name and args
<johnjaye>
it says method_missing expected an argument, got 0. but if it takes 0 arguments shouldn't my definition give an error?
constxqt has quit [Ping timeout: 255 seconds]
<johnjaye>
yeah but i mean when calling a method that doesn't exist
<johnjaye>
when you do that ruby defaults to "method_missing" if defined
<weaksauce>
yes
<johnjaye>
i guess method_missing requires an argument for some reason
<weaksauce>
the first argument to method missing is the name that was missing
<weaksauce>
otherwise it's not much use
<johnjaye>
but if i have class A inherit from B I can define methods in A that are the same as B but take different arguments, right?
<johnjaye>
so i would expect it to just let me define missing_method with 0 args. then just give an undefined error
<weaksauce>
what are you actually trying to do?
<weaksauce>
just define method_missing with an argument if you want and then just ignore it or call super.send(arg)
<johnjaye>
what i mean is i didn't understand why it failed
<johnjaye>
it says ArgumentError which confuses me
<johnjaye>
it should say I didn't define method_missing
<johnjaye>
like if f has arguments a,b,c and you redefine it to be a,b in a subclass, that's a different method isn't it?
<weaksauce>
johnjaye if i have def foo; end and call it with foo "worms" what happens?
<weaksauce>
not at all no
<johnjaye>
if you call foo "worms" and foo takes 0 args it should just ignore it
<weaksauce>
i mean it is a different method but it's not in the sense you mean
<weaksauce>
have you tried that johnjaye
<johnjaye>
it says error, wrong arg number. right
<johnjaye>
that makes sense
<weaksauce>
what do you think ruby is doing with method_missing
<johnjaye>
what i think should happen is method_missing was defined, by me, to take 0 args
<johnjaye>
therefore ruby should just ignore it completely
<johnjaye>
it should use it when I redefine it with 1 arg
<johnjaye>
but it seems when i misdefined it the first time it tried to use it.
<weaksauce>
airity doesn't matter
<johnjaye>
but i redefined it
<gr33n7007h>
johnjaye: to disregard arguments pass * to method_missing
<weaksauce>
ruby will look at the class and see that it responds to it and then try to send the message to it
<weaksauce>
ruby isn't saying "hey does method_missing exist and does it take exactly 1 or more arguments?
<johnjaye>
oh wait. hmm.
<johnjaye>
i tried doing it and ruby doesn't use the first super class method
<weaksauce>
you're thinking polymorphic and that's just not ruby
<johnjaye>
so like A has foo with 1 arg and B inherits it and redefines it with 2 arg
<johnjaye>
now I can't call A's method anymore
<weaksauce>
you can but it has to be super.foo
<johnjaye>
ruby polymorphism doesn't work like in java?
<weaksauce>
ruby doesn't have polymorphism
<weaksauce>
the method exists or it doesn't and if you redefine it the old one is gone
<weaksauce>
or it shadows the superclasses
<johnjaye>
hmm. and the builtin behavior is to pass in an argument. which it can't do because i redefined it
<weaksauce>
well every class has method_missing defined on it but it's basically a NOP
<johnjaye>
you get errors though if you call nonsense methods
<johnjaye>
pandabot rb Object.foopzerg
<johnjaye>
hmm. my bot fu failed
<weaksauce>
yeah the default implementation is to call super and raise an error at the end of the inheritance chain i think
<weaksauce>
implementation detail
<johnjaye>
fascinating
<johnjaye>
anyway thanks for the insight
<johnjaye>
i got a little away from my idea which was trying to define foldl and foldr in ruby
OverCoder has joined #ruby
budo has quit [Quit: Leaving]
Linux_Kerio has joined #ruby
Milos_ has joined #ruby
Milos has quit [Ping timeout: 240 seconds]
Milos_ is now known as Milos
Sampersand_ has joined #ruby
<Sampersand_>
I've compiled ruby 3.3.0dev from source, but whenever I use it I get warnings that `RubyGems` `error_highlight` `did_you_mean` and `syntax_suggest` aren't loaded. How do I configure it to do so?
<Sampersand_>
I did do `./configure --enable-all` if that's helpful
keb has quit [Ping timeout: 246 seconds]
OverCoder has quit [Quit: Connection closed for inactivity]
Sampersand_ has quit [Quit: Client closed]
_ht has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
blop_ has quit [Remote host closed the connection]
blop_ has joined #ruby
_ht has quit [Quit: _ht]
Vonter has quit [Ping timeout: 240 seconds]
Vonter has joined #ruby
grenierm has joined #ruby
otisolsen70 has joined #ruby
teclator has joined #ruby
constxqt has joined #ruby
Condition_Boy has joined #ruby
ConditionBoy has quit [Read error: Connection reset by peer]
Condition_Boy has quit [Read error: Connection reset by peer]
ConditionBoy has joined #ruby
hololeap has quit [Remote host closed the connection]
ruser has quit [Ping timeout: 255 seconds]
hololeap has joined #ruby
Condition_Boy has joined #ruby
ConditionBoy has quit [Read error: Connection reset by peer]
Condition_Boy has quit [Read error: Connection reset by peer]
ConditionBoy has joined #ruby
OverCoder has joined #ruby
constxqt has quit [Ping timeout: 244 seconds]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
Bish has quit [Killed (NickServ (GHOST command used by basic!~basic@ip-037-201-147-110.um10.pools.vodafone-ip.de))]
shokohsc51088 has joined #ruby
shokohsc5108 has quit [Ping timeout: 258 seconds]
shokohsc51088 is now known as shokohsc5108
konsolebox has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
willfish has joined #ruby
duderonomy has joined #ruby
Condition_Boy has joined #ruby
ConditionBoy has quit [Read error: Connection reset by peer]
Condition_Boy has quit [Read error: Connection reset by peer]
user23 has quit [Remote host closed the connection]
Huckleberry7774 has joined #ruby
Huckleberry777 has quit [Ping timeout: 264 seconds]
Huckleberry777 has joined #ruby
Huckleberry7774 has quit [Ping timeout: 244 seconds]
<Guest808>
it's bullshit that doesn't work
Huckleberry7777 has joined #ruby
Huckleberry777 has quit [Ping timeout: 240 seconds]
Huckleberry7777 is now known as Huckleberry777
konsolebox has quit [Ping timeout: 260 seconds]
caedmon has joined #ruby
dviola has quit [Quit: WeeChat 4.0.4]
caedmon has quit [Ping timeout: 255 seconds]
eddof13 has joined #ruby
geewiz has joined #ruby
geewiz has quit [Client Quit]
geewiz has joined #ruby
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
geewiz has quit [Changing host]
geewiz has joined #ruby
geewiz has quit [Remote host closed the connection]
Guest808 has quit [Remote host closed the connection]
shokohsc5108 has quit [Read error: Connection reset by peer]
shokohsc5108 has joined #ruby
yziquel has joined #ruby
Linux_Kerio has quit [Ping timeout: 240 seconds]
caedmon has joined #ruby
deriamis_ has quit [Quit: deriamis_]
blop_ has joined #ruby
<johnjaye>
indeed
ConditionBoy has quit [Ping timeout: 246 seconds]
brokkoli_origin has quit [Ping timeout: 244 seconds]
ConditionBoy has joined #ruby
brokkoli_origin has joined #ruby
deriamis has joined #ruby
shokohsc51085 has joined #ruby
shokohsc5108 has quit [Read error: Connection reset by peer]
shokohsc51085 is now known as shokohsc5108
<ox1eef_>
The only thing rage will help you with is motivation to throw your computer out the window.
Condition_Boy has joined #ruby
caedmon has quit [Ping timeout: 240 seconds]
ConditionBoy has quit [Ping timeout: 244 seconds]
_ht has quit [Quit: _ht]
Condition_Boy has quit [Read error: Connection reset by peer]
ConditionBoy has joined #ruby
pgib has joined #ruby
oz has quit [Ping timeout: 246 seconds]
otisolsen70 has quit [Quit: Leaving]
Linux_Kerio has joined #ruby
yziquel has quit [Quit: Client closed]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
darkstardevx has quit [Client Quit]
yziquel has joined #ruby
ox has joined #ruby
yziquel has quit [Client Quit]
infinityfye has quit [Quit: Leaving]
tomtmym has quit [Quit: Gone.]
yziquel has joined #ruby
<johnjaye>
there are several good memes of that
<johnjaye>
ox1eef_: so if ruby doesn't do polymorphism the way java does how do I get the method of the super class
yziquel has quit [Quit: Client closed]
<johnjaye>
like A has methods. B inherits A. why can't I do B.new.f where f is something in A
<johnjaye>
or how do I do that
<weaksauce>
you can?
<weaksauce>
as long as it's not overwritten in B
<weaksauce>
if ruby couldn't do that it wouldn't be inheritance at all.
FetidToot4 has joined #ruby
FetidToot has quit [Read error: Connection reset by peer]
FetidToot4 is now known as FetidToot
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
FetidToot has quit [Client Quit]
FetidToot has joined #ruby
<johnjaye>
i mean the case where A defines f(x) and B < A and B defines f(x,y)
<johnjaye>
how do I get access to f(x). do i have to redefine f to run super.f
brokkoli_origin has quit [Ping timeout: 260 seconds]
brokkoli_origin has joined #ruby
<weaksauce>
why are you fighting ruby so you can write java?
<johnjaye>
because i know java
<johnjaye>
maybe more fundamentally polymorphism was drilled into my head as the 3 pillars of OO
<johnjaye>
so the fact ruby doesn't do it exactly is hard to adapt to
<weaksauce>
that's just one kind of polymorphism ruby does do polymorphism but not parametric
Linux_Kerio has quit [Ping timeout: 260 seconds]
ox is now known as oz
<johnjaye>
ok. i didn't know it had a specific name
<ox1eef_>
johnjaye: super(x), but it is not recommended to do that - the Liskov priniciple argues that subclasses should honor the signature of their superclass.
<ox1eef_>
Of course, there's always exceptions to the rule, but generally speaking - not recommended.
yziquel has joined #ruby
OverCoder has quit [Quit: Connection closed for inactivity]
eyeris has joined #ruby
<eyeris>
I am having trouble with sorbet typechecking rack. It prints out an inscrutible error: https://pastebin.com/F6cbKxeZ -- anyone here understand this?