<havenwood>
codic_: I'm creeped out by "Your name is Adolf H..."
<codic_>
Lol
rwb has quit [Ping timeout: 265 seconds]
<havenwood>
codic_: Reading this code, I think it's in poor taste at the least.
<codic_>
Alright, any examples on what can be improved havenwood?
<havenwood>
codic_: I won't suggest improvements for a game about pretending to be Hitler. I do have code suggestions if you have cost that isn't fascist.
<havenwood>
codic_: For this code I'm just inclined to report you to GitLab and ban you from the channel.
<codic_>
For what? I created it purely as an example based on true events...
<codic_>
havenwood: But alright, if it's offensive, it can be removed
<codic_>
Um
<havenwood>
codic_: I'd be very happy to review code if you have a game that doesn't involve pretending to be a Nazi.
Mrbuck has quit [Remote host closed the connection]
phaul has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
itarato has quit [Ping timeout: 265 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
romanblanco has quit [Ping timeout: 265 seconds]
phaul has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
houhoulis has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
Technodrome has joined #ruby
Slanoti has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
infinityfye has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
cow[moo] has joined #ruby
_whitelogger has joined #ruby
gix has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
suukim has joined #ruby
gigetoo has quit [Ping timeout: 265 seconds]
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
gigetoo has joined #ruby
jenrzzz has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
MrCrackPot has quit [Quit: Leaving]
claudiuinberlin has joined #ruby
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
romanblanco has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
houhoulis has quit [Remote host closed the connection]
romanblanco has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
im0nde has joined #ruby
im0nde_ has quit [Ping timeout: 246 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
sergioro has quit [Quit: leaving]
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
xall has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
Fernando-Basso has joined #ruby
infinityfye_ has joined #ruby
infinityfye has quit [Ping timeout: 240 seconds]
infinityfye has joined #ruby
infinityfye_ has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Ping timeout: 240 seconds]
MrCrackPot has joined #ruby
chalkmonster has joined #ruby
xall has quit [Quit: xall]
DTZUZO has joined #ruby
gearnode has quit [Quit: WeeChat 2.5]
gearnode has joined #ruby
gearnode has left #ruby [#ruby]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
gearnode has joined #ruby
tsujp has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Slanoti has quit [Quit: Leaving]
DTZUZO has joined #ruby
jenrzzz has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
darris has quit [Quit: Bye bye!]
darris_ has joined #ruby
darris_ is now known as darris
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 250 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
kent\n has quit [Ping timeout: 276 seconds]
Technodrome has joined #ruby
kent\n has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
tsujp has quit [Ping timeout: 240 seconds]
entel has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
_whitelogger has joined #ruby
DTZUZO has quit [Ping timeout: 265 seconds]
DTZUZO has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 265 seconds]
tsujp has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
sh7d_ has joined #ruby
sh7d has quit [Ping timeout: 268 seconds]
rapha has quit [Quit: rebooting the world]
jenrzzz has joined #ruby
chunkypuffs has quit [Read error: Connection reset by peer]
donofrio__ has joined #ruby
donofrio_ has quit [Ping timeout: 252 seconds]
IsoLinCHiP has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
chunkypuffs has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TCZ has joined #ruby
TCZ has quit [Client Quit]
al2o3-cr has quit [Ping timeout: 260 seconds]
howaboutyes has joined #ruby
al2o3-cr has joined #ruby
ua has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
IsoLinCHiP has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
rwb has joined #ruby
llua has joined #ruby
perlsyntax has joined #ruby
<perlsyntax>
Hi
ua has joined #ruby
al2o3-cr has quit [Remote host closed the connection]
hiroaki has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
AJA4351 has joined #ruby
lucasb has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
hiroaki has quit [Ping timeout: 268 seconds]
hiroaki has joined #ruby
perlsyntax has quit [Remote host closed the connection]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
al2o3-cr has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
cow[moo] has quit [Ping timeout: 245 seconds]
davispuh has joined #ruby
howaboutyes has quit [Quit: Leaving]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
codic__ has joined #ruby
Boko_dcdca has joined #ruby
<codic__>
Hey
sauvin has quit [K-Lined]
Boko_dcdca has quit [Write error: Connection reset by peer]
Boko_cdbec has joined #ruby
Boko_cdbec has quit [Read error: Connection reset by peer]
<gearnode>
Hello
Boko_aaeca has joined #ruby
Boko_aaeca has quit [Write error: Connection reset by peer]
Boko_ecbae has joined #ruby
codic__ has quit [Quit: codic__]
<havenwood>
Hi
Boko_ecbae has quit [Write error: Connection reset by peer]
ctOS has joined #ruby
Boko_ddaab has joined #ruby
Boko_ddaab has quit [Write error: Connection reset by peer]
Boko_cdedd has joined #ruby
Boko_cdedd has quit [Write error: Connection reset by peer]
infinityfye has quit [Quit: Leaving]
ellcs has joined #ruby
Boko_abedc has joined #ruby
_phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
Boko_abedc has quit [Write error: Connection reset by peer]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
_phaul has quit [Ping timeout: 265 seconds]
_phaul has joined #ruby
candlebag has joined #ruby
MrCrackPot has quit [Quit: Leaving]
NODE has quit [Quit: changing servers]
zapata has quit [Quit: WeeChat 2.6]
NODE has joined #ruby
_phaul has quit [Ping timeout: 240 seconds]
ology has joined #ruby
_phaul has joined #ruby
ruskie has quit [Quit: ...]
_phaul has quit [Ping timeout: 265 seconds]
Boko_deada has joined #ruby
_phaul has joined #ruby
Boko_deada has quit [Write error: Connection reset by peer]
yokel has quit [Ping timeout: 252 seconds]
_phaul has quit [Ping timeout: 245 seconds]
akemhp has joined #ruby
zapata has joined #ruby
yokel has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
dinfuehr has joined #ruby
_phaul has joined #ruby
Boko_dabce has joined #ruby
Boko_dabce has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
_phaul has quit [Ping timeout: 276 seconds]
Boko_debac has joined #ruby
_phaul has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
dinfuehr has quit [Ping timeout: 250 seconds]
_phaul has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 240 seconds]
Boko_debac has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
_phaul has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
_phaul has quit [Ping timeout: 265 seconds]
_phaul has joined #ruby
hutch1 has joined #ruby
dinfuehr_ has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
_phaul has quit [Ping timeout: 276 seconds]
dinfuehr has quit [Ping timeout: 240 seconds]
_phaul has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
bvdw has joined #ruby
_phaul has quit [Ping timeout: 276 seconds]
dinfuehr_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
sh7d_ has quit [Quit: meh]
dinfuehr has quit [Ping timeout: 268 seconds]
sh7d has joined #ruby
_phaul has joined #ruby
ruskie has joined #ruby
dinfuehr_ has quit [Ping timeout: 245 seconds]
_phaul has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
_phaul has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
johnny56 has quit [Remote host closed the connection]
NODE has quit [Client Quit]
TzilTzal has joined #ruby
<TzilTzal>
Hi
_phaul has quit [Ping timeout: 265 seconds]
<TzilTzal>
Is there a difference invoking a method (inside another method) when qualigying it with self?
NODE has joined #ruby
<TzilTzal>
i.e.: is there a difference between self.foo and foo when invoked from an instance method?
dinfuehr has quit [Ping timeout: 245 seconds]
fphilipe_ has joined #ruby
<havenwood>
TzilTzal: The `self` is already the implicit receiver. The main time you run into a difference is when using a setter method with equal sign syntactic sugar.
<havenwood>
TzilTzal: For example, `foo = 42` assigns a local variable but `self.foo = 42` calls a #foo= setter method.
_phaul has joined #ruby
<TzilTzal>
fair enough. But otherwise, there shouldn't be one, right?
<TzilTzal>
I just see a lot of code that invokes "self.obj.foo(....)" even though there's an attr_reader for obj
<TzilTzal>
so was wonder if there would be a difference at all.
itarato has joined #ruby
dinfuehr has joined #ruby
<havenwood>
TzilTzal: There are a few edge case bugs around private method usage with self. One was just patched fairly recently: https://bugs.ruby-lang.org/issues/16123
<havenwood>
TzilTzal: That said, you can typically assume there isn't a difference.
<TzilTzal>
So is it safer to use self. or without it?
<havenwood>
TzilTzal: Folk just code wildly inconsistently. I'd recommend omitting `self` unless you have a reason to explicitly use it.
<havenwood>
TzilTzal: I prefer to access @instance_variables directly and use `self` only when it matters.
<TzilTzal>
So do I, but I see a lot of 'self.' in the code (at work) where I think it's redundant.
_phaul has quit [Ping timeout: 265 seconds]
<havenwood>
TzilTzal: It sounds like you're right. It's probably redundant and unnecessary usage.
<TzilTzal>
Asking cause I'm new to Ruby... so not totally sure.
<TzilTzal>
Thanks for your help.
<havenwood>
No prob, any time.
<havenwood>
TzilTzal: To be clear, if there's an attr_reader for obj, I'd actually use `@obj` rather than `self.obj` or `obj` internally.
<havenwood>
TzilTzal: @obj is both faster and communicates the simplest case to subsequent readers.
<TzilTzal>
Yes, that's what I do and prefer.
<havenwood>
Calling a method is slow compared to getting an instance variable.
<TzilTzal>
But I see a lot of it done through self. Also, I see less care for things like attr_reader/writer vs. attr_accessor. Seems as though most just place everything under attr_accessor.
<havenwood>
Getting an instance variable immediately informs the reader there won't be side effects and there's then no need to check the method definition.
<havenwood>
`@obj =` and `@obj` are better than `self.obj =` and `obj`.
<TzilTzal>
that's what I'd expect.
<TzilTzal>
I was referring though to thinks like design & accessibility when mentioning attr_reader vs. attr_accessor
<havenwood>
TzilTzal: If it's Rails... you're going to see a lot of `self.foo. =` but those aren't just instance variables.
Ai9zO5AP has joined #ruby
<TzilTzal>
what are they then?
<havenwood>
But yeah, for Ruby, just get and set instance variables directly.
<havenwood>
TzilTzal: ActiveRecord columns.
<TzilTzal>
So why are they qualified with self in this case?
<havenwood>
TzilTzal: In case of ActiveRecord?
<havenwood>
With ActiveRecord, you really are using a setter method.
itarato has quit [Quit: Konversation terminated!]
<TzilTzal>
Yes.. what you're referring to that these aren't instance variable.
<TzilTzal>
s
<havenwood>
Yup
<havenwood>
Yeah, for instance variables, use them directly - period.
Boko_edeea has joined #ruby
<TzilTzal>
havenwood: you're saying with Rails you have to use a setter method?
<havenwood>
TzilTzal: I mean you *can* avoid it, but the common pattern is to use `self.foo =`.
<TzilTzal>
I'm not referring to an actual Singleton ... I don't use this pattern, actually since it's also an anti-pattern.
<TzilTzal>
I was referring to the Ruby singleton class where class methods resides.
jenrzzz has joined #ruby
<havenwood>
TzilTzal: Yes, from time to time there's actually a reason to store state on a class or module itself. I see that done haphazardly more often than purposefully though.
<havenwood>
It's a nice tool to have, for when there's a good reason.
<havenwood>
A bit of an odd case, but can be handy.
NODE has quit [Quit: changing servers]
Fernando-Basso has quit [Quit: Leaving]
Mrbuck has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
NODE has joined #ruby
dinfuehr has quit [Ping timeout: 276 seconds]
NODE has quit [Client Quit]
ellcs has joined #ruby
NODE has joined #ruby
Boko_bbbde has joined #ruby
NODE has quit [Client Quit]
Technodrome has joined #ruby
NODE has joined #ruby
Boko_bbbde has quit [Read error: Connection reset by peer]
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
dinfuehr has joined #ruby
_phaul has joined #ruby
Boko_aeadc has joined #ruby
jenrzzz has joined #ruby
_phaul has quit [Ping timeout: 250 seconds]
Mrbuck has quit [Remote host closed the connection]
_phaul has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Boko_aeadc has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
brool has joined #ruby
Boko_aaddd has joined #ruby
Boko_aaddd has quit [Write error: Connection reset by peer]
_phaul has quit [Quit: :wq]
phaul has joined #ruby
Creatornator has joined #ruby
houhoulis has joined #ruby
ur5us has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
phaul has joined #ruby
sauvin_ has joined #ruby
dellavg has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
dellavg has quit [Remote host closed the connection]
BTRE has quit [Ping timeout: 276 seconds]
NODE has quit [Quit: changing servers]
sauvin has quit [Ping timeout: 268 seconds]
sauvin_ is now known as sauvin
NODE has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
hutch1 has quit [Ping timeout: 265 seconds]
NODE has quit [Client Quit]
phaul has joined #ruby
RiPuk has joined #ruby
NODE has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
chalkmonster has joined #ruby
ellcs has quit [Ping timeout: 276 seconds]
phaul has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
JohanP has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
suukim has quit [Quit: Konversation terminated!]
sergioro has joined #ruby
skx86 has joined #ruby
phaul has joined #ruby
TzilTzal has quit [Quit: Leaving.]
phaul has quit [Ping timeout: 268 seconds]
ellcs has joined #ruby
phaul has joined #ruby
ctOS has quit [Quit: Connection closed for inactivity]
phaul has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
phaul has joined #ruby
evert is now known as evertvdb
jenrzzz has quit [Ping timeout: 252 seconds]
phaul has quit [Ping timeout: 276 seconds]
big-malloc has joined #ruby
big-malloc has quit [Client Quit]
big-malloc has joined #ruby
phaul has joined #ruby
jenrzzz has joined #ruby
big-malloc has quit [Client Quit]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BTRE has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
JohanP has quit [Ping timeout: 265 seconds]
JohanP has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
Fernando-Basso has joined #ruby
JohanP has quit [Ping timeout: 250 seconds]
JohanP has joined #ruby
houhoulis has quit [Remote host closed the connection]
reber has joined #ruby
ur5us has joined #ruby
abc88 has joined #ruby
<abc88>
Hi, I wonder if in a single quote string, the only thing to escape are \ and ' or if they are some special unicode character that must be escaped too, i mean is there some unicode charcter which may break from a single quote string as the ' does ?
<nofxx>
abc88, would say no... maybe someone knows better tho... but there's also <<<HEREDOC syntax, maybe it fits your use
<nofxx>
good for multiline
JohanP has quit [Ping timeout: 252 seconds]
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
reber has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Creatornator has joined #ruby
JohanP has joined #ruby
Technodrome has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
JohanP has quit [Ping timeout: 268 seconds]
zapata has quit [Ping timeout: 250 seconds]
zapata has joined #ruby
itarato has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
<abc88>
nofxx: thanks
abc88 has quit [Quit: .]
itarato has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thecoffemaker has quit [Ping timeout: 265 seconds]
bluvinyl2 has joined #ruby
bluvinyl has joined #ruby
thecoffemaker has joined #ruby
Technodrome has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
itarato has joined #ruby
Creatornator has joined #ruby
<gearnode>
abc88: you can use %() or """ """" syntax for multiline :)
skx86 has quit [Quit: Connection closed for inactivity]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JohanP has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
sagax has quit [Remote host closed the connection]
JohanP has quit [Ping timeout: 265 seconds]
hiroaki has quit [Ping timeout: 240 seconds]
envex has quit [Ping timeout: 268 seconds]
sergioro has quit [Read error: Connection reset by peer]