adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.2, 3.1.4, 3.0.6, 2.7.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
roadie has quit [Ping timeout: 248 seconds]
CrazyEddy has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #ruby
dionysus69 has quit [Quit: dionysus69]
ap4y has quit [Remote host closed the connection]
blackmetal has joined #ruby
bambanxx has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
hrberg has quit [Quit: No Ping reply in 180 seconds.]
hrberg has joined #ruby
Sankalp has quit [Ping timeout: 246 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
Sankalp has joined #ruby
cryptkeeper has joined #ruby
jhass has quit [Ping timeout: 246 seconds]
jhass has joined #ruby
Linux_Kerio has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
moldorcoder7 has quit [Ping timeout: 276 seconds]
drainpipe has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
shokohsc5 has joined #ruby
mollerup has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc5 is now known as shokohsc
szkl has joined #ruby
molle has quit [Ping timeout: 265 seconds]
roadie has quit [Ping timeout: 248 seconds]
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drainpipe has quit [Quit: WeeChat 3.8]
mollerup has quit [Remote host closed the connection]
mollerup has joined #ruby
mollerup has quit [Read error: Connection reset by peer]
mollerup has joined #ruby
mollerup has quit [Remote host closed the connection]
johnjaye has joined #ruby
<johnjaye> how can $0 be the filename of my ruby script? shouldn't it be irb
<johnjaye> or ruby
nmollerup has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
_ht has joined #ruby
grenierm has joined #ruby
jmcgnh has joined #ruby
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
otisolsen70 has joined #ruby
Fridtjof has quit [Ping timeout: 264 seconds]
roadie has joined #ruby
<leftylink> pandabot: tell johnjaye rubyglobals
<pandabot> johnjaye: rubyglobals is: https://docs.ruby-lang.org/en/3.0/globals_rdoc.html
<leftylink> well, we see that Ruby's creators have the power to define $0 to be whatever they want, and it looks like from that documentation that they want it to be "the name of the script being executed"
<johnjaye> i see
<ox1eef_> Yup, exactly.
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
_ht has quit [Quit: _ht]
szkl has quit [Quit: Connection closed for inactivity]
phenom has quit [Quit: Everyone has a plan until they get punched in the face. -Mike Tyson-]
phenom has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #ruby
nektro has quit [Remote host closed the connection]
nektro has joined #ruby
teclator has joined #ruby
blackmetal has quit [Quit: Lost terminal]
cryptkeeper has quit [Quit: Connection closed for inactivity]
crespire1 has quit [Ping timeout: 268 seconds]
crespire1 has joined #ruby
<cxl> Hi all, I'm having a blank... I remember there is a way in a class to write #some_method and then express that calls to #other_method would instead go to #some_method without having any definition for #other_method. But I can't remember the syntax. Does anyone know what I mean?
<ox1eef_> alias_method ?
<cxl> No, but it somehow helped me remember it. Module#delegate... But it's in Rails, not Ruby :(
<ox1eef_> Ruby has a delegate lib too.
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
zaben[m] has quit [Quit: You have been kicked for being idle]
<cxl> ox1eef_: thanks
infinityfye has joined #ruby
<cxl> you cannot pass arguments to the target method with delegation, right?
grenierm has quit [Quit: Client closed]
lisperDreamer has joined #ruby
lisperDreamer has quit [Client Quit]
<cxl> What I'm basically trying to solve is to dry up code like that: https://dpaste.org/PmhsH
<cxl> s/dry/DRY
<cxl> so I tried `delegate [:debug, :info, ...], :log` but then I'm losing the arguments. I've also tried `def_delegator :self, :log, :info` etc. but it's a bit more verbose than I'd like (have to do it once for every method), and I'm losing the name of the original method once in #log (i.e. I don't know if it was called from :info, :debug, etc)
schne1der has joined #ruby
<ox1eef_> cxl: How many log methods could you have ? Personally I'd go with the non-DRY version. It is simple and easy to understand.
gr33n7007h has quit [Ping timeout: 268 seconds]
<ox1eef_> I would still go with what you originally had. No need to reach for metaprogramming for what's trivial.
gr33n7007h has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
weaksauc_ has joined #ruby
weaksauce has quit [Ping timeout: 246 seconds]
Sankalp has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
Dooky has joined #ruby
shokohsc5 has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc5 is now known as shokohsc
<dminuoso> havenwood, still doing ruby? :-)
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
bambanxx has joined #ruby
<adam12> cxl: I agree with ox1eef_ and would skip the metaprogramming and just make it explicit. If you're on a new enough Ruby version, you can use the `...` forwarding option to forward method args.
Fridtjof has joined #ruby
reset has quit [Quit: reset]
depesz has quit [Quit: WeeChat 3.7.1]
Jonopoly has joined #ruby
moldorcoder7 has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
tomtmym has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
c10l has joined #ruby
barbaneigro has joined #ruby
roadie has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
barbaneigro has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
shokohsc5 has joined #ruby
shokohsc has quit [Ping timeout: 246 seconds]
shokohsc5 is now known as shokohsc
rvalue has joined #ruby
blackmetal has joined #ruby
_ht has joined #ruby
shokohsc4 has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc4 is now known as shokohsc
TomyLobo has quit [Ping timeout: 240 seconds]
polishdub has quit [Remote host closed the connection]
grenierm has joined #ruby
otisolsen70 has quit [Ping timeout: 240 seconds]
gthank has joined #ruby
schne1der has quit [*.net *.split]
jess has quit [*.net *.split]
JSharp has quit [*.net *.split]
r0bby has quit [*.net *.split]
integral has quit [*.net *.split]
braxas has quit [*.net *.split]
Manouchehri has quit [*.net *.split]
A_Dragon has quit [*.net *.split]
petru has quit [*.net *.split]
znpy has quit [*.net *.split]
BDFOC has quit [*.net *.split]
bastelfreak has quit [*.net *.split]
JSharp_ has joined #ruby
integral_ has joined #ruby
petru has joined #ruby
bastelfreak has joined #ruby
Manouchehri__ has joined #ruby
znpy has joined #ruby
braxas_ has joined #ruby
r0bby_ has joined #ruby
schne1der has joined #ruby
A_Dragon has joined #ruby
jess has joined #ruby
bastelfreak has quit [Client Quit]
integral_ is now known as integral
bastelfreak has joined #ruby
pounce has quit [Ping timeout: 240 seconds]
pounce has joined #ruby
BDFOC has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
schne1der has quit [Client Quit]
reset has joined #ruby
polishdub has joined #ruby
<isene> How do I determine a user's shell?
<Shell> the path to the shell's executable is in the SHELL environment variable, so you can guess which shell it is based on its name if you like.
<isene> Is there any Ruby command to determine it?
TomyLobo has joined #ruby
___nick___ has joined #ruby
yassernasc has joined #ruby
gthank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
ua_ has joined #ruby
ua__ has quit [Ping timeout: 248 seconds]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
<adam12> isene: The current user or another user?
<llua> the random highlights you get must be annoying
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
otisolsen70 has quit [Quit: Leaving]
hightower2 has quit [Ping timeout: 240 seconds]
<havenwood> dminuoso: Still enjoying Ruby but not often part of my day job.
blackmetal has quit [Quit: Lost terminal]
<havenwood> isene: File.basename Etc.getpwuid(Process.uid).shell
___nick___ has quit [Ping timeout: 240 seconds]
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
_ht has quit [Quit: _ht]
hightower2 has joined #ruby
Al2O3 has joined #ruby
gthank has joined #ruby
teclator has quit [Ping timeout: 264 seconds]
tomtmym has quit [Quit: Gone.]
infinityfye has quit [Quit: Leaving]
roadie has quit [Ping timeout: 248 seconds]
<ox1eef_> Nice
roadie has joined #ruby
<isene> thanks
<isene> Any good shell written in ruby?
yassernasc has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 248 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lena64t has quit [Ping timeout: 240 seconds]
lena64t has joined #ruby
ap4y has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
grenierm has quit [Ping timeout: 245 seconds]
johnjaye has quit [Ping timeout: 276 seconds]
Linux_Kerio has quit [Ping timeout: 240 seconds]
bambanxx has joined #ruby