havenwood changed the topic of #ruby to: Ruby 3.2.2, 3.1.4, 3.3.0-preview2: https://www.ruby-lang.org | Rules: https://ruby-community.com | Logs: https://libera.irclog.whitequark.org/ruby
<weaksauce> Guest808 probably a roda thing
<weaksauce> Guest808 you'd have to have a plugin that serves the files or use a reverse proxy
<weaksauce> i don't use roda but it doesn't look like ootb it does what you want to do
<weaksauce> > For example, if you are using the public plugin to serve static files and the assets plugin to serve assets
<Guest808> i am using the public plugin
<weaksauce> have you read the docs on how to configure it?
<weaksauce> and link to images
<Guest808> that still wouldn't explain why this also doesn't work: <img src="https://pulpbits.net/wp-content/uploads/2013/12/poison-dart-frog-facts-for-kids-1024x850.jpg">
<Guest808> yes, i have
<Guest808> as i said, when i visit the appropriate subroute, the image is loaded as expected
<Guest808> but the erb template won't load images regardless of their src property
<weaksauce> i can't help much without seeing code
<Guest808> even inspecting the page and replacing the src it refuses to load
<weaksauce> > that still wouldn't explain why this also doesn't work: <img src="https://pulpbits.net/wp-content/uploads/2013/12/poison-dart-frog-facts-for-kids-1024x850.jpg">
<weaksauce> the csp of that page makes it not
<weaksauce> like i said you need to check the console to see those errors
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
caedmon has quit [Ping timeout: 258 seconds]
<Guest808> i just pulled that example at random
<Guest808> where can i find a guaranteed-public image on the internet
<Guest808> which console are you talking about?
<Guest808> there is nothing of note in the terminal running puma
<weaksauce> your browser console
<Guest808> oh, wait, like in the browser
<Guest808> right
<Guest808> Content-Security-Policy: The page’s settings blocked the loading of a resource at http://localhost:9292/images/my_image.png (“default-src”).
<Guest808> okay, so presumably this is something to do with the :content-security-policy plugin
<weaksauce> sounds like it yeah
<Guest808> or content_security_policy, rather
<Guest808> i don't even know what csp is
<Guest808> i mean, i can guess what it's for
Guest33 has quit [Quit: Client closed]
<Guest808> lol i feel like trying to learn anything in web dev requires me to learn three other things
<weaksauce> it's a thing that says to the browser only allow things from these domains to load
<weaksauce> security thing
<Guest808> yeah, makes sense
<Guest808> disabling it resolved my problem
<Guest808> so now i need to figure out how to enable it but not be self-blocking?
<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
<weaksauce> html pages are what it protects
weyhmueller has quit [Quit: ZNC - https://znc.in]
weyhmueller has joined #ruby
<Guest808> thank you weaksauce
<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]
ConditionBoy has joined #ruby
grenierm has quit [Ping timeout: 245 seconds]
infinityfye has joined #ruby
yosafbridge has quit [Quit: Leaving]
kapil_ has joined #ruby
kapil has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
yosafbridge has joined #ruby
micro has quit [Ping timeout: 240 seconds]
micro has joined #ruby
dalan03822838 has joined #ruby
dalan0382283 has quit [Ping timeout: 240 seconds]
dalan03822838 is now known as dalan0382283
micro has quit [Ping timeout: 245 seconds]
micro 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
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
<Guest808> anyone know of a text editor that properly highlights erb files?
user23 has joined #ruby
Vonter has quit [Ping timeout: 245 seconds]
Vonter has joined #ruby
keb has joined #ruby
smp has quit [Ping timeout: 245 seconds]
smp has joined #ruby
keb has quit [Quit: Leaving]
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
FetidToot has quit [Client Quit]
FetidToot has joined #ruby
brokkoli_origin has quit [Ping timeout: 245 seconds]
infinity_fye has joined #ruby
infinityfye has quit [Killed (NickServ (GHOST command used by infinity_fye))]
infinity_fye is now known as infinityfye
brokkoli_origin has joined #ruby
constxqt has joined #ruby
constxqt has quit [Ping timeout: 244 seconds]
<johnjaye> probably try emacs with https://github.com/petere/emacs-eruby-mode
<johnjaye> it's not packaged so you'll have to install it manually
yziquel has joined #ruby
parzzix has joined #ruby
blop_ has quit [Remote host closed the connection]
constxqt has joined #ruby
constxqt has quit [Ping timeout: 244 seconds]
John_Ivan has quit [Remote host closed the connection]
<Guest808> i can't figure out how to import bootstrap in my scss
<Guest808> goddamn
<Guest808> it's just always something else
<Guest808> there's like a billion moving parts, and it's just actually insane
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
_ht has joined #ruby
Vonter has quit [Ping timeout: 240 seconds]
Vonter has joined #ruby
willfish has quit [Ping timeout: 258 seconds]
<Guest808> omg wtf how are you supposed to import the fucking thing?
<Guest808> why does shit never work????
joto has quit [Read error: Connection reset by peer]
joto has joined #ruby
joto has quit [Read error: Connection reset by peer]
joto has joined #ruby
joto has quit [Read error: Connection reset by peer]
joto has joined #ruby
joto has quit [Ping timeout: 244 seconds]
<johnjaye> what's a scss
joto has joined #ruby
yziquel has quit [Ping timeout: 245 seconds]
joto has quit [Read error: Connection reset by peer]
joto has joined #ruby
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
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?
<ruby[bot]> eyeris: as I told you already, please use https://gist.github.com
<weaksauce> eyeris that isn't a class
<weaksauce> you can't inherit from a module
<eyeris> weaksauce: I believe you but I didn't write that code. It was generated by 'srb rbi' in relation to the rack gem.
deriamis has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
deriamis has joined #ruby
<weaksauce> beats me why that would be the case
<eyeris> 'rm -r sorbet/rbi' and 'bundle exec tapioca init' fixed it :/
eyeris has quit [Quit: leaving]
deriamis has quit [Quit: ZNC - https://znc.in]
deriamis has joined #ruby