havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
Rounin has quit [Ping timeout: 252 seconds]
Rounin has joined #ruby
gr33n7007h has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
gr33n7007h has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
pgib has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
szkl has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
Linux_Kerio has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
mmohammadi9812 has joined #ruby
jenrzzz has joined #ruby
mmohammadi9812 has quit [Ping timeout: 255 seconds]
szkl has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
mmohammadi9812 has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
mmohammadi9812 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 272 seconds]
mmohammadi9812 has joined #ruby
mmohammadi9812 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mmohammadi9812 has joined #ruby
mmohammadi9812 has quit [Ping timeout: 252 seconds]
CrazyEddy has joined #ruby
_ht has joined #ruby
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ruby
mange has quit [Quit: Quittin' time!]
grenierm has joined #ruby
Vonter has quit [Ping timeout: 264 seconds]
librechat has joined #ruby
Vonter has joined #ruby
librechat has quit [Remote host closed the connection]
librechat has joined #ruby
librechat has quit [Remote host closed the connection]
librechat has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
librechat has quit [Remote host closed the connection]
librechat has joined #ruby
Vonter has quit [Quit: WeeChat 4.2.1]
jenrzzz has joined #ruby
librechat has quit [Remote host closed the connection]
mexen has joined #ruby
Vonter has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
desnudopenguino has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
Linux_Kerio has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
foxxx0 has quit [Quit: foxxx0]
jenrzzz has quit [Ping timeout: 272 seconds]
szkl has joined #ruby
foxxx0 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
milouse has joined #ruby
grenierm has quit [Quit: Client closed]
jenrzzz has joined #ruby
milouse has left #ruby [Disconnected: Hibernating too long]
mmohammadi9812 has joined #ruby
mmohammadi9812 has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
pavelz has quit [Ping timeout: 264 seconds]
pavelz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
szkl has quit [Quit: Connection closed for inactivity]
dviola has joined #ruby
graywolf has joined #ruby
jenrzzz has joined #ruby
milouse has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
mmohammadi9812 has joined #ruby
mmohammadi9812 has quit [Remote host closed the connection]
infinityfye has joined #ruby
mmohammadi9812 has joined #ruby
cek has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
mmohammadi9812 has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
heinrich5991 has quit [Ping timeout: 272 seconds]
heinrich5991 has joined #ruby
jenrzzz has joined #ruby
mexen has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 268 seconds]
heinrich5991 has quit [Quit: quit.]
heinrich5991 has joined #ruby
jenrzzz has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
donofrio has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
heinrich5991 has quit [Ping timeout: 256 seconds]
heinrich5991 has joined #ruby
jenrzzz has joined #ruby
Linux_Kerio has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
heinrich5991_ has joined #ruby
heinrich5991 has quit [Ping timeout: 256 seconds]
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
user71 has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
mark22k has quit [Quit: The Lounge - https://thelounge.chat]
mark22k has joined #ruby
milouse has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
deadmarshal_ has quit [Ping timeout: 260 seconds]
polishdub has quit [Remote host closed the connection]
polishdub has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
desnudopenguino has joined #ruby
deadmarshal_ has joined #ruby
jenrzzz has joined #ruby
polishdub has quit [Ping timeout: 240 seconds]
aphorise has joined #ruby
<aphorise> Newbie question how to express an if statement such that: if a == "1" || (a == "2" && b == "t") ; .... ?
polishdub has joined #ruby
<adam12> aphorise: Looks OK to me? other than the semi colon at the end.
polishdub has quit [Ping timeout: 260 seconds]
polishdub has joined #ruby
<aphorise> @adam12, thanks the actual condition I have is a bit more complex and I cant spot what's wrong with this > elsif RbConfig::CONFIG["target_cpu"] == "x86_64" || RbConfig::CONFIG["target_cpu"] == "x64" || ( RbConfig::CONFIG["target_cpu"] == "universal" && RbConfig::CONFIG["target"].include?("darwin") )
<adam12> Looks fine. What does `RbConfig::CONFIG` look like? why do you think it's not working?
jenrzzz has quit [Ping timeout: 255 seconds]
<adam12> Wouldn't match on my M1.
<adam12> ~> ruby -e 'p RbConfig::CONFIG.slice("target", "target_cpu")'
<adam12> {"target"=>"arm64-apple-darwin23", "target_cpu"=>"arm64"}
<aphorise> @adam12, because I get the generic error: ...:439: syntax error, unexpected `end', expecting end-of-input
finsternis has quit [Ping timeout: 264 seconds]
<aphorise> but when I comment out the lines affiliated to the elsif it works
finsternis has joined #ruby
<adam12> What's inside the `elsif`?
<aphorise> @adam12, dow - I'm an idiot - there was a bad / extra " - thanks for the hints - fixed!
<adam12> Nice!
jenrzzz has joined #ruby
xxz has joined #ruby
xxz has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
infinityfye has quit [Ping timeout: 255 seconds]
kerunaru has quit [Quit: Iridium IRC Client]
cek has quit [Quit: Connection closed for inactivity]
infinityfye has joined #ruby
<henk> regarding my function from yesterday: https://git.netwichtig.de/cgit/user/henk/code/ruby/macir.git/tree/macir.rb?h=feature/challenges_per_apex&id=e3a206b8484ef7919053a38e4e6b92492c8a8642#n162 I was told (and will do it) to extract e.g. a "propagated?" function out of it to make it simpler/smaller. I have already been thinking about it before but this is yet another case where this thought crept up on
<henk> me: would it make sense to make these challenges a dedicated object (i.e. 'class macir::challenge::dns or something) and making "propagated?" an instance method?
<adam12> henk: I don't see why not.
<adam12> henk: Some objects will appear naturally, but if I see a bunch of methods with the same prefix that's almost always an object waiting to escape.
<adam12> s/objects/classes
<henk> my thinking is that all these things I handle in this program have certain attributes and methods. like the challenge: it is already a class/object (https://www.rubydoc.info/gems/acme-client/2.0.14/Acme/Client/Resources/Challenges/DNS01) but I associate more info with it and want to add more methods to it that are specific to how my client uses this object. so I guess I should subclass it?
<adam12> Alternatively you can use a delegator of some sort. See SimpleDelegator in stdlib.
desnudopenguino has quit [Quit: desnudopenguino]
desnudopenguino has joined #ruby
<henk> hm, too complicated, I don’t get it and I think I should stick to simple inheritance for now
_ht has quit [Remote host closed the connection]
DTZUZU has joined #ruby
osc4rpt has quit [Quit: leaving]
osc4rpt has joined #ruby
<[0x1eef_]> Vanilla delegation is often simpler. All you have to do is forward a method call from one object to the next. 'method_missing' can make it dynamic.
jenrzzz has joined #ruby
<[0x1eef_]> Inheritance works but it implies an "is a" relationship Ford can subclass Vehicle because that relationship makes sense. If you find yourself inheriting features rather than a concept then I'd usually agree that a different approach would make more sense.
DTZUZU has quit [Quit: WeeChat 4.0.5]
DTZUZU has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
<henk> hm, I need to think about that, thanks for the input!
user71 has quit [Quit: Leaving]
DTZUZU has quit [Quit: WeeChat 4.0.5]
Linux_Kerio has quit [Ping timeout: 255 seconds]
smp- has joined #ruby
smp has quit [Read error: Connection reset by peer]
smp- is now known as smp
mange has joined #ruby
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 264 seconds]
<henk> hm, I think inheritance doesn’t help in my case and delegator might actually be exactly what I want. I use the acme-client class to do most acme stuff and it gives me back e.g. a Acme::Client::Ressources::Challenges::DNS01 object. so subclassing/superclassing (is the latter even a thing?) doesn’t help me at all because that’s what I get. but when I use SimpleDelegator I’m supposed to give a
<henk> concrete object instance anyway when I instantiate my class. so I would instantiate my Macir::Challenge::Dns class object with an instance of Acme::Client::Ressources::Challenges::DNS01 and have it behave the same plus my added functionality. right?
rvalue- is now known as rvalue
cyberworm54 has joined #ruby
reset has quit [Quit: reset]
jenrzzz has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
zayd has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
<[0x1eef_]> henk: Sounds like a good start. The right design might be more apparent once you go in that direction.
jenrzzz has quit [Ping timeout: 272 seconds]
<[0x1eef_]> I'm kinda on the fence about your class being the class it encapsulates, I think you could call that an implementation detail.
jenrzzz has joined #ruby
<[0x1eef_]> That'd make your interface your own plus acme's. It might be nicer just to have your own interface that doesn't expose acmes as well.
jenrzzz has quit [Ping timeout: 240 seconds]
zayd has joined #ruby
TomyWork has joined #ruby
graywolf has quit [Quit: WeeChat 4.0.4]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]