havenwood changed the topic of #ruby to: Ruby 3.2.2, 3.1.4, 3.3.0-preview1: https://www.ruby-lang.org | Rules: https://ruby-community.com | Logs: https://libera.irclog.whitequark.org/ruby
konsolebox has quit [Quit: -a- IRC for Android 2.1.60]
konsolebox has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
konsolebox has quit [Ping timeout: 246 seconds]
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
johnjaye has quit [Ping timeout: 246 seconds]
TheCatCollective has joined #ruby
johnjaye has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
<johnjaye> hmm. to call a class method on an instance is invalid I guess?
<johnjaye> e.g. f = File.new("test.txt"), you can't do f.absolute_path(f)
seydar has joined #ruby
<seydar> I'm working with glimmer_dsl_libui, and I'm having trouble with getting multiline_entry to appear below the rectangle. https://paste.tomsmeding.com/g5Lju4gy
<seydar> anyone have experience with glimmer? or is there another GUI library I should be using?
konsolebox has joined #ruby
<johnjaye> oh strange, so IO class has a readlines class method and a readlines instance method
desnudopenguino has quit [Ping timeout: 245 seconds]
desnudopenguino1 has joined #ruby
Linux_Kerio has joined #ruby
desnudopenguino1 is now known as desnudopenguino
seydar has quit [Quit: leaving]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox> johnjaye: Not strange at all
<johnjaye> yes i noticed it in some other places too
<johnjaye> that would explain why ruby doesn't let me call a class method from an instance
<johnjaye> I was confused about one other thing.
<johnjaye> it makes intuitive sense that I can call Dir.entries with a File argument instead of a string argument
<johnjaye> but I don't see it in the documentation for it. help("Dir.entries") just says it takes a string. is it calling to_s on the argument somehow?
<konsolebox> johnjaye: Class methods that are similarly named to an instance method are mostly shortcuts which does the instantation internally.
<johnjaye> or is ruby just being super nice and has some safeguard for this case
<konsolebox> johnjaye: Many methods that expect a string do call to_s implicitly yes, but some strictly reject non-strings.
<johnjaye> hmm. if i do f.to_s I get "#<File:0x0000... >"
<johnjaye> i assume ruby is doing something here though
konsolebox has quit [Ping timeout: 244 seconds]
John_Ivan has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
Vonter has joined #ruby
MarvelousWololo has joined #ruby
kokoro has quit [Ping timeout: 245 seconds]
kokoro has joined #ruby
gr33n7007h has quit [Quit: WeeChat 4.0.2]
gr33n7007h has joined #ruby
_ht has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
_ht has quit [Remote host closed the connection]
grenierm has joined #ruby
f4z4 has joined #ruby
donofrio_ has joined #ruby
donofrio has quit [Ping timeout: 260 seconds]
infinityfye has joined #ruby
infinityfye has quit [Client Quit]
teclator has joined #ruby
otisolsen70 has joined #ruby
otisolsen70 has quit [Read error: Connection reset by peer]
victori has quit [Ping timeout: 246 seconds]
bas317 has joined #ruby
<bas317> Hi I'm new here, trying to do the ruby Koans. I realized I made a mistake, but need further explanation.
<bas317> class DiceSet
<bas317>   attr_reader :values
<bas317>   @values = []
<bas317>   ...
<bas317> end
<bas317> I figured these lines are executed when the .rb file is required, but I wonder what happens to @values as it is no instance variable, but DiceSet.class_variables is also empty. Does it get thrown away after the require? If so, why is it allowed to be named @values instead of for example values only?
f4z4 has quit [Quit: No more compute for now… zZZzzz]
f4z4 has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
konsolebox has quit [Ping timeout: 245 seconds]
duderonomy has quit [Ping timeout: 246 seconds]
f4z4 has quit [Quit: No more compute for now… zZZzzz]
f4z4 has joined #ruby
Tempesta has quit [Quit: See ya!]
<leftylink> that @values is a class instance variable.
<bas317> leftylink thanks! I'll look it up what it exactly means.
<leftylink> pandabot rb class A; @foo = 19980819; def self.bar; @foo end end; A.bar
<pandabot> 19980819 - https://carc.in/#/r/fln2
<leftylink> here we see that the class method was able to access the class instance variable. just like how an instance method would be able to access an instance variable
Tempesta has joined #ruby
otisolsen70_ has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
<bas317> Oohhhh, so DiceSet, being a class, is also an object, having instance variables. Now I get it. I'm starting to read about class_variables and the "@@" keyword, then I should be back on track! Thanks again!
f4z4 has quit [Quit: No more compute for now… zZZzzz]
desnudopenguino has quit [Ping timeout: 246 seconds]
otisolsen70_ has quit [Read error: Connection reset by peer]
otisolsen70_ has joined #ruby
otisolsen70_ has quit [Remote host closed the connection]
grenierm has quit [Ping timeout: 246 seconds]
MarvelousWololo has quit [Read error: Connection reset by peer]
shokohsc510 has quit [Ping timeout: 256 seconds]
desnudopenguino has joined #ruby
shokohsc510 has joined #ruby
f4z4 has joined #ruby
<leftylink> pandabot rb class A; @@cv = :cv_not_modified_GOOD; @civ = :civ_not_modified_GOOD; def self.foo; [@@cv, @civ] end end; class B < A; @@cv = :cv_modified_BAD; @civ = :civ_modified_BAD end; A.foo
<pandabot> [:cv_modified_BAD, :civ_not_modified_GOOD] - https://carc.in/#/r/flor
<leftylink> we see above an important behaviour difference between class variables and class instance variables
<leftylink> the choice between class variables and class instance variables will depend on which of the two behaviours is desired
<leftylink> of course the above code has a value judgment embedded since it calls one of the behaviours good and the other bad
szahid has joined #ruby
<leftylink> but that was of course for the sake of space, since it woudldn't be possible to cram all the details of the judgment into one message
<szahid> Which IDE is the best for Ruby except Intelij product ?
konsolebox has joined #ruby
bas317 has quit [Quit: Client closed]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
f4z4on has joined #ruby
f4z4on has quit [Remote host closed the connection]
f4z4on has joined #ruby
f4z4on has quit [Quit: ZNC 1.8.2 - https://znc.in]
f4z4on has joined #ruby
f4z4on has quit [Client Quit]
f4z4on has joined #ruby
f4z4on has quit [Client Quit]
c10l6 has joined #ruby
f4z4on has joined #ruby
f4z4on has quit [Client Quit]
f4z4on has joined #ruby
f4z4on has quit [Quit: ZNC 1.8.2 - https://znc.in]
f4z4on has joined #ruby
f4z4on has quit [Client Quit]
f4z4 has quit [Quit: Bye bye…]
nmollerup has joined #ruby
thomas25- has joined #ruby
thomas25 has quit [Ping timeout: 260 seconds]
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
Sankalp has quit [Ping timeout: 246 seconds]
RDMengineer0 has joined #ruby
RDMengineer has quit [Ping timeout: 246 seconds]
Sankalp has joined #ruby
RDMengineer0 is now known as RDMengineer
some14u has joined #ruby
bas317 has joined #ruby
some14u has quit [Ping timeout: 245 seconds]
some14u has joined #ruby
some14u has quit [Ping timeout: 246 seconds]
donofrio_ has quit [Read error: Connection reset by peer]
donofrio_ has joined #ruby
some14u has joined #ruby
bas317 has quit [Quit: Client closed]
some14u has quit [Ping timeout: 246 seconds]
infinity_fye has joined #ruby
infinityfye has quit [Ping timeout: 256 seconds]
<adam12> szahid: For "IDE" there's really only two; RubyMine and VSCode. For "PDE" there's vim/neovim/emacs :)
szkl has quit [Quit: Connection closed for inactivity]
RDMengineer has quit [Quit: Ping timeout (120 seconds)]
RDMengineer has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
Furai has quit [Quit: WeeChat 4.0.3]
Furai has joined #ruby
Linux_Kerio has quit [Ping timeout: 245 seconds]
heartburn has quit [Ping timeout: 240 seconds]
heartburn has joined #ruby
desnudopenguino has quit [Ping timeout: 244 seconds]
John_Ivan has joined #ruby
shokohsc510 has quit [Quit: Ping timeout (120 seconds)]
shokohsc510 has joined #ruby
eddof13 has joined #ruby
nopc0de has joined #ruby
polishdub has quit [Remote host closed the connection]
f4z4 has joined #ruby
konsolebox has joined #ruby
some14u has joined #ruby
polishdub has joined #ruby
MarvelousWololo has joined #ruby
_ht has joined #ruby
Bish has quit [Ping timeout: 245 seconds]
Bish has joined #ruby
reset has quit [Quit: reset]
xuochi has joined #ruby
f4z4 has quit [Quit: Bye bye…]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FetidToot has quit [Ping timeout: 256 seconds]
f4z4on has joined #ruby
f4z4on is now known as f4z4
xuochi has quit [Quit: First shalt thou take out the Holy Pin. Then, shalt thou count to three. No more. No less.]
Linux_Kerio has joined #ruby
reset has joined #ruby
nopc0de has quit [Read error: Connection reset by peer]
nopc0de has joined #ruby
Bish has quit [Ping timeout: 246 seconds]
libsys has quit [Quit: WeeChat 3.0]
Bish has joined #ruby
root has joined #ruby
root is now known as Guest7492
MarvelousWololo has quit [Ping timeout: 246 seconds]
egality has quit [Ping timeout: 252 seconds]
Guest7492 has quit [Quit: WeeChat 3.0]
_ht has quit [Quit: _ht]
konsolebox has quit [Ping timeout: 250 seconds]
FetidToot has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
duderonomy has joined #ruby
MarvelousWololo has joined #ruby
shokohsc5105 has joined #ruby
shokohsc510 has quit [Ping timeout: 244 seconds]
shokohsc5105 is now known as shokohsc510
willfish has joined #ruby
willfish has quit [Client Quit]
CrazyEddy has quit [*.net *.split]
scottgy has quit [*.net *.split]
sam113101 has quit [*.net *.split]
Starfoxxes has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
jimeh has quit [*.net *.split]
cxl has quit [*.net *.split]
b3lm0nt has quit [*.net *.split]
weyhmueller has quit [*.net *.split]
cxl has joined #ruby
cxl has quit [Changing host]
cxl has joined #ruby
jimeh has joined #ruby
Starfoxxes has joined #ruby
weyhmueller has joined #ruby
sam113101 has joined #ruby
scottg489 has joined #ruby
b3lm0nt has joined #ruby
Fridtjof has joined #ruby
f4z4 has quit [Quit: Bye bye…]
f4z4 has joined #ruby
MarvelousWololo has quit [Read error: Connection reset by peer]
MarvelousWololo has joined #ruby
f4z4 has quit [Quit: Bye bye…]
willfish has joined #ruby
f4z4 has joined #ruby
f4z4 has left #ruby [#ruby]
willfish has quit [Client Quit]
willfish has joined #ruby
konsolebox has joined #ruby
f4z4 has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
f4z4 has quit [Client Quit]
f4z4 has joined #ruby
ua_ has quit [Ping timeout: 240 seconds]
xuochi has joined #ruby
xuochi has quit [Client Quit]
konsolebox has quit [Ping timeout: 258 seconds]
ua_ has joined #ruby
willfish has quit [Ping timeout: 246 seconds]
nopc0de has quit [Read error: Connection reset by peer]
Bish has quit [Ping timeout: 258 seconds]
Linux_Kerio has quit [Ping timeout: 240 seconds]
infinity_fye has quit [Quit: Leaving]
matoro has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
matoro has joined #ruby
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby