havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.1, 3.1.3, 3.0.5, 2.7.7: 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/
factor has joined #ruby
<zzo38> The encoding "TADTextBE" and "stateless-TADTextBE" does not seems to be available on my computer though
factor has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
factor has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
Al2O3 has quit [Ping timeout: 260 seconds]
<adam12> nickjj: I agree.
<adam12> nickjj: I actually enjoy that Rubykaigi takes the effort of having live English translators for their conference.
<adam12> I'm not Tenderlove-capable of learning Japanese.
<adam12> I saw the bookshelf of one of the people in that conference video and they had an _insane_ number of Ruby books. I feel a bit jealous.
<adam12> I'd actually subscribe to a service that was translating JA->EN Ruby content.
zzo38 has left #ruby [#ruby]
Al2O3 has joined #ruby
some14u has joined #ruby
roshanavand__ has quit [Ping timeout: 246 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ox1eef_> Probably won't be long before AI can translate Japanese to English perfectly.
some14u has joined #ruby
<Al2O3> probably won't be long before people stop thinking.
<adam12> ox1eef_: I find Google Translate works well enough, as a rule, but you need to highlight in segments since it wants to translate code too.
<adam12> And it's hard tracking JA content. Someone curating them out of the JA Slack and then (with permission?) translating them to EN would be an instant sign-up for me.
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
shokohsc6 has quit [Ping timeout: 252 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shokohsc6 has joined #ruby
razetime has joined #ruby
razetime has quit [Ping timeout: 268 seconds]
jhass has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
jhass has joined #ruby
TomyWork has joined #ruby
dviola has joined #ruby
razetime has joined #ruby
TomyWork has quit [Remote host closed the connection]
eddof13 has joined #ruby
TomyWork has joined #ruby
shokohsc61 has joined #ruby
shokohsc6 has quit [Ping timeout: 268 seconds]
shokohsc61 is now known as shokohsc6
ur5us has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
qxz2 has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
polychromata has quit [Remote host closed the connection]
Sankalp has joined #ruby
teclator has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
razetime1 has joined #ruby
razetime has quit [Ping timeout: 255 seconds]
razetime1 is now known as razetime
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Ping timeout: 268 seconds]
razetime has quit [Ping timeout: 252 seconds]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
reset has quit [Quit: reset]
razetime has joined #ruby
reset has joined #ruby
gr33n7007h has quit [Ping timeout: 255 seconds]
roshanavand__ has joined #ruby
gr33n7007h has joined #ruby
infinityfye has joined #ruby
Linux_Kerio has joined #ruby
_ht has joined #ruby
reset has quit [Quit: reset]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
reset has joined #ruby
agent_white has quit [Quit: night]
otisolsen70 has quit [Quit: Leaving]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
razetime has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
Sankalp has quit [Ping timeout: 255 seconds]
Sankalp has joined #ruby
pcw has joined #ruby
razetime has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
pantin29 has quit [Ping timeout: 255 seconds]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
moldorcoder7 has joined #ruby
hightower2 has quit [Ping timeout: 255 seconds]
panella32 has joined #ruby
ultralan has joined #ruby
<panella32> Hi I have 2 tiny questions if possible please help me soon! Thank you!
<panella32> def remember
<panella32> self.remember_token = User.new_token
<panella32> update_attribute(:remember_digest, User.digest(remember_token))
shokohsc6 has quit [Ping timeout: 255 seconds]
<panella32> 1. Why there is not an object before the update method? I think it should be like some_object.update_attribute.., am I wrong?
<panella32> 2. Why the self keyword is presented in the 2nd line but it's not in the 3rd one?
shokohsc66 has joined #ruby
ultralan has quit [Remote host closed the connection]
ultralan has joined #ruby
ultralan has quit [Remote host closed the connection]
ultralan has joined #ruby
ultralan has quit [Remote host closed the connection]
shokohsc66 is now known as shokohsc6
shokohsc68 has joined #ruby
shokohsc6 has quit [Ping timeout: 255 seconds]
shokohsc68 is now known as shokohsc6
shokohsc6 has quit [Quit: Ping timeout (120 seconds)]
shokohsc6 has joined #ruby
hightower2 has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
shokohsc6 has quit [Ping timeout: 255 seconds]
shokohsc6 has joined #ruby
some14u has joined #ruby
Jonopoly has joined #ruby
some14u has quit [Client Quit]
heartburn has quit [Ping timeout: 248 seconds]
heartburn has joined #ruby
panella32 has quit [Quit: Textual IRC Client: www.textualapp.com]
TomyWork has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 255 seconds]
gr33n7007h has joined #ruby
razetime1 has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
razetime has quit [Ping timeout: 246 seconds]
razetime1 is now known as razetime
gr33n7007h has joined #ruby
mollerup has quit [Remote host closed the connection]
mollerup has joined #ruby
Spitfire_ is now known as Spitfire
eron has joined #ruby
pcw is now known as pxw
otisolsen70 has joined #ruby
moldorcoder7 has quit [Ping timeout: 268 seconds]
eddof13 has joined #ruby
eron has quit [Quit: Client closed]
<ox1eef_> adam12: Agreed.
<ox1eef_> Al2O3: Yeah that's a good point. I think we still don't know how AI will play out. I hope it will enhance our own ability to think and solve problems rather than replace it.
roshanavand__ has quit [Ping timeout: 255 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
razetime has quit [Remote host closed the connection]
dionysus70 has quit [Ping timeout: 252 seconds]
pxw has quit [Quit: WeeChat 3.9-dev]
dionysus69 has joined #ruby
markong has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
polychromata has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
kinduff has quit [Remote host closed the connection]
otisolsen70_ has joined #ruby
otisolsen70_ has quit [Quit: Leaving]
kinduff has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
teclator has quit [Ping timeout: 255 seconds]
kinduff has quit [Remote host closed the connection]
kinduff has joined #ruby
roshanavand__ has joined #ruby
hansolo has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
kinduff has quit [Remote host closed the connection]
kinduff has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 255 seconds]
slondr has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 3.7.1]
pmwals09 has joined #ruby
markong has quit [Ping timeout: 248 seconds]
shokohsc68 has joined #ruby
shokohsc6 has quit [Ping timeout: 248 seconds]
shokohsc68 is now known as shokohsc6
pmwals09 has quit [Ping timeout: 260 seconds]
siery has joined #ruby
<siery> Hey, does anyone know if it is possible to override the ``=>`` operator? I would like to implement an Association (Hash element) class, similar to smalltalk, that utilize this syntax
hansolo has joined #ruby
eddof13 has joined #ruby
<adam12> siery: I don't think it's possible.
<adam12> siery: Maybe show what you're trying and we can suggest something different.
<siery> adam12: It's fine, I know the alteratives. I just wanna implement this specifically as I like how it is implemented in smalltalk
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has joined #ruby
roshanavand__ has quit [Remote host closed the connection]
eddof13 has joined #ruby
cek has joined #ruby
siery has quit [Ping timeout: 246 seconds]
<ox1eef_> I don't think it is possible. You can override operators but never heard of overriding =>.
ur5us has joined #ruby
pcw has joined #ruby
hightower2 has joined #ruby
petru has quit [Quit: WeeChat 3.5]
petru has joined #ruby
_ht has quit [Quit: _ht]
lagash_ has quit [Ping timeout: 248 seconds]
Tempesta has quit [Read error: Connection reset by peer]
Tempesta_ has joined #ruby
Tempesta_ is now known as Tempesta
Tempesta has joined #ruby
Tempesta has quit [Changing host]
hightower2 has quit [Ping timeout: 246 seconds]
lagash_ has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
molle has joined #ruby
mollerup has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
infinityfye has quit [Quit: Leaving]
mdemo has quit [Quit: The Lounge - https://thelounge.github.io]
dionysus69 has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
Akiyen24 has joined #ruby
barbaneigro has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
moldorcoder7 has joined #ruby
barbaneigro has quit [Ping timeout: 246 seconds]
panella32 has joined #ruby
<panella32> why the self keyword is presented in the 2nd line but it's not in the 3rd one? https://i.imgur.com/jxf59lJ.png
<adam12> panella32: Ruby is about message passing, and normally without self, the receiver is implicit (which is self)
<adam12> panella32: So, self.update_attribute could be implied. You don't need self because Ruby abstracts that away from you.
<adam12> panella32: But! remember_token = User.new_token and self.remember_token = User.new_token differ in that one is an _assignment_, and one is a message.
<adam12> panella32: So leaving off self. for that line makes it an assignment, and as it would stand, it's an assignment to a local variable.
<adam12> panella32: `self.remember_token =` is actually a message. it's calling `remember_token=` on self, and passing `User.new_token` as an argument.
<panella32> Thanks a lot adam12!
<panella32> ..trying to digest just got overwhelmed.. :)
<leftylink> to see this in action, the following example code shows the difference.
<leftylink> pandabot: rb NamedThing=Struct.new(:name) { def bad_set_name; name = "Bob" end; def correct_set_name; self.name = "Bob" end }; [NamedThing.new.tap(&:bad_set_name).name, NamedThing.new.tap(&:correct_set_name).name]
<pandabot> [nil, "Bob"] - https://carc.in/#/r/en2x
<leftylink> as you can see, without `self.`, name does not get set.
<adam12> panella32: Ruby needs a way to distinguish between setting a local variable, and calling a method named `remember_token=`, so that's where you set the explicit `self`. It's similar to user.remember_token = 'foo'. That's calling the `remember_token=` method on user.
<adam12> bbiaf.
John_Ivan has joined #ruby
moldorcoder7 has quit [Ping timeout: 255 seconds]