havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.2, 2.5.5, 2.4.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
gnufied has quit [Remote host closed the connection]
r29v has quit [Quit: r29v]
orbyt_ has joined #ruby
brool has joined #ruby
ramfjord has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 258 seconds]
wallace_mu has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Client Quit]
yield has joined #ruby
dsmythe_ has joined #ruby
nuh^ has quit []
nwradio87888798 has joined #ruby
dsmythe_ has quit [Client Quit]
nwradio8788879 has quit [Ping timeout: 246 seconds]
dsmythe has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
yield has quit [Ping timeout: 268 seconds]
zachk has quit [Quit: Leaving]
Fernando-Basso has quit [Remote host closed the connection]
dsmythe has quit [Quit: Leaving...]
dsmythe has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LtHummus has quit [Quit: ZNC 1.7.3 - https://znc.in]
yield has joined #ruby
cloaked1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
yield has quit [Ping timeout: 246 seconds]
mangold has quit [Quit: This computer has gone to sleep]
hxegon has quit [Ping timeout: 255 seconds]
duderonomy has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
ramfjord has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
lucasb has quit [Quit: Connection closed for inactivity]
LtHummus has joined #ruby
bambanx has quit [Ping timeout: 246 seconds]
bambanx has joined #ruby
yield has joined #ruby
yield has quit [Ping timeout: 250 seconds]
mangold has joined #ruby
DarthGandalf has quit [Ping timeout: 258 seconds]
bambanxx has joined #ruby
bambanx has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esrse has joined #ruby
uplime is now known as cuplime
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
Swyper_ has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
Swyper_ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
houhoulis has joined #ruby
orbyt_ has quit [Client Quit]
orbyt_ has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jottr has joined #ruby
garyserj has joined #ruby
Sina has quit [Quit: Connection closed for inactivity]
barg has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 268 seconds]
barg has joined #ruby
garyserj has quit [Ping timeout: 246 seconds]
braincrash has quit [Quit: bye bye]
gix- has joined #ruby
gix has quit [Disconnected by services]
braincrash has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
duderonomy has joined #ruby
DmitryBochkarev has joined #ruby
DmitryBochkarev has quit [Max SendQ exceeded]
DmitryBochkarev has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
aqd has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodlebug has quit [Quit: -a- Connection Timed Out]
duderonomy has joined #ruby
yield has joined #ruby
yield has quit [Remote host closed the connection]
yield has joined #ruby
doodlebug has joined #ruby
brool has quit [Quit: WeeChat 2.4]
DarthGandalf has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
jenrzzz has joined #ruby
apg has joined #ruby
apg has quit [Changing host]
apg has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
bambanxx has quit [Quit: Leaving]
DmitryBochkarev has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
duderonomy has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
gix- has quit [Ping timeout: 246 seconds]
ferr has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
houhoulis has quit [Remote host closed the connection]
envex has joined #ruby
jottr has joined #ruby
Fridtjof has quit [Read error: Connection reset by peer]
Fusl__ has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
Fusl has quit [Ping timeout: 256 seconds]
mochiyoda_ has joined #ruby
Inline has quit [Quit: Leaving]
mochiyoda has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
DmitryBochkarev has joined #ruby
sauvin has joined #ruby
Swyper has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
ByronJohnson has quit [Ping timeout: 244 seconds]
cthulchu_ has quit [Read error: Connection reset by peer]
daniel____ has quit [Read error: Connection reset by peer]
daniel____ has joined #ruby
sidx64 has joined #ruby
aqd has joined #ruby
aqd has quit [Remote host closed the connection]
daniel____ has quit [Read error: Connection reset by peer]
daniel____ has joined #ruby
ByronJohnson has joined #ruby
conta has joined #ruby
daniel____ has quit [Read error: Connection reset by peer]
kapil____ has joined #ruby
daniel____ has joined #ruby
daniel____ has quit [Read error: Connection reset by peer]
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
za1b1tsu has joined #ruby
brendan- has quit [Read error: Connection reset by peer]
teardown has joined #ruby
brendan- has joined #ruby
snickers has joined #ruby
schleppel has joined #ruby
HendrikPeter has joined #ruby
andikr has joined #ruby
conta has quit [Ping timeout: 246 seconds]
aqd has joined #ruby
aqd has quit [Remote host closed the connection]
fanta7531 has joined #ruby
clemens3_ has quit [Ping timeout: 255 seconds]
jottr has joined #ruby
TomyWork has joined #ruby
marmotini_ has joined #ruby
nowhereman has quit [Ping timeout: 258 seconds]
aqd has joined #ruby
clemens3_ has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
aqd has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
rindolf has joined #ruby
lxsameer has joined #ruby
prestorium has joined #ruby
reber has joined #ruby
teardown has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teardown has joined #ruby
teardown is now known as Guest22120
t0xik has joined #ruby
conta has joined #ruby
ellcs has joined #ruby
marmotini has joined #ruby
marmotini_ has quit [Ping timeout: 245 seconds]
DmitryBochkarev has quit [Remote host closed the connection]
sylario has joined #ruby
beilabs has quit [Ping timeout: 246 seconds]
DmitryBochkarev has joined #ruby
cd has quit [Quit: cd]
aqd has joined #ruby
vondruch has joined #ruby
nwradio87888798 has quit [Ping timeout: 250 seconds]
nwradio87888798 has joined #ruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower2 has joined #ruby
suukim has joined #ruby
beilabs has joined #ruby
ricekrispie has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
claudiuinberlin has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
aqd has quit [Remote host closed the connection]
aqd has joined #ruby
kyrylo has joined #ruby
aqd has quit [Remote host closed the connection]
teclator has joined #ruby
aqd has joined #ruby
alem0lars has joined #ruby
vondruch has quit [Quit: vondruch]
tdy has quit [Ping timeout: 268 seconds]
alem0lars_ has joined #ruby
andikr has quit [Ping timeout: 255 seconds]
alem0lars has quit [Ping timeout: 246 seconds]
andikr has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
havenwood has joined #ruby
tr50 has joined #ruby
suukim has quit [Remote host closed the connection]
tr50 has left #ruby [#ruby]
jottr has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aqd has quit [Remote host closed the connection]
alem0lars_ has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 250 seconds]
aqd has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
andikr has joined #ruby
Nicmavr has joined #ruby
vondruch has joined #ruby
Guest22120 has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 246 seconds]
<Bish> adam12: i think i found the cause of the problem
teardown has joined #ruby
<Bish> i am using text_part and html_part
<Bish> which results in a "multipart/alternative"
teardown is now known as Guest5596
<Bish> as soon as you have file attachments thunderbirds expects multipart/mixed
<Bish> thunderbird seems to see the attachment just as another version of the email as instead of a attachments
rindolf has quit [Remote host closed the connection]
aqd has quit [Remote host closed the connection]
ogurk has joined #ruby
conta has quit [Ping timeout: 268 seconds]
DarthGandalf has quit [Ping timeout: 245 seconds]
mangold has joined #ruby
<ogurk> looking for docs on adding local ca cert to rubygmes on Linux - anyone could help?
jcarl43 has quit [Quit: WeeChat 2.4]
Guest5596 has quit [Ping timeout: 255 seconds]
dsmythe has quit [Read error: Connection reset by peer]
dsmythe has joined #ruby
terens has joined #ruby
<terens> is there a way to write it in one line
<terens> return unless enabled return if self.class.valid?
teardown has joined #ruby
<terens> return if !enabled || ( enabled && self.class.valid?) - the only thing i can think
teardown is now known as Guest3806
<phaul> !a || (a && b) == !a || b
<phaul> i mean !a && b.
<phaul> no I was right the first time
* phaul needs morning coffee first
<Bish> return unless enabled && self.class.valid?
* Bish didnt think about this but this should work
<phaul> you would need to negate self.class.valid? Bish
<phaul> !a || (a && b) == !a || b == !(a && !b)
dviola has joined #ruby
conta has joined #ruby
aqd has joined #ruby
<Bish> still that looks better, doesnt it?
<Bish> return unless enabled && !self.class.valid?
<Bish> hm, for me "return unless enabled && self.class.valid? works
<Bish> >> "hi"
<Bish> &> "hi"
<rubydoc> parser error at position 0 around `>'
<phaul> note that terens wanted to return _if_ self.class.valid? was true
mhlei has joined #ruby
<phaul> Bish: &>>
<Bish> but that doesnt make sense :p
<Bish> you can just skip checking enabled then and just return if valid
<mhlei> what is the sign '&' after a variable mean? like this: with_locale(user&.preferred_language, &block)
<Bish> mhlei: if you define & inside a parameter list (in "def") you say you want to get the given block as a proc
esrse has quit [Ping timeout: 250 seconds]
<Bish> if you call a method with the operator you pass a proc as a block
<mhlei> oh
<Bish> &&> [1].map {|x| x.inc }
<rubydoc> parser error at position 0 around `&'
ramfjord has quit [Ping timeout: 245 seconds]
<Bish> eh.
<phaul> &>> [1].map {|x| x.inc }
<rubydoc> stderr: -e:2:in `block in <main>': undefined method `inc' for 1:Integer (NoMethodError) (https://carc.in/#/r/6p7l)
<Bish> &&> [1].map {|x| x.succ }
<rubydoc> parser error at position 0 around `&'
jottr has quit [Ping timeout: 255 seconds]
<Bish> odd.
<phaul> the > is double not the &
<Bish> &>> [1].map {|x| x.inc }
<rubydoc> stderr: -e:2:in `block in <main>': undefined method `inc' for 1:Integer (NoMethodError) (https://carc.in/#/r/6p7m)
<Bish> haha. oh man
<Bish> &>> [1].map {|x| x.succ }
<rubydoc> # => [2] (https://carc.in/#/r/6p7n)
<phaul> we will get there
<phaul> :)
<Bish> &>> [1].map(&:succ)
<rubydoc> # => [2] (https://carc.in/#/r/6p7o)
<Bish> mhlei: these 2 are identical as you can see
ferr has quit [Ping timeout: 255 seconds]
<mhlei> Bish: thank you ,let me think...
<Bish> the reason for that is:
<Bish> :x.to_proc is Proc.new { |obj| obj.x }
<Bish> and &:x implicitly calls .to_proc on the symbol ":x"
<Bish> &>> [1].map(&(:succ.to_proc))
<rubydoc> # => [2] (https://carc.in/#/r/6p7p)
aqd has quit [Remote host closed the connection]
<Bish> &>> [1].map(&Proc.new {|x| x.succ})
<rubydoc> # => [2] (https://carc.in/#/r/6p7q)
<Bish> all the same thing, just syntactic sugar around it
<Bish> haha, fun if you define [] with a &block, and then do [&:x] you get an array of one proc, that would be confusing af to a novice
ferr has joined #ruby
<mhlei> rubydoc is just a machine? not a person.
<mhlei> &&> [1].map {|x| x.inc }
<rubydoc> parser error at position 0 around `&'
<mhlei> i think so .
<Bish> mhlei: 2 > not 2 &
<Bish> &>> 1
<rubydoc> # => 1 (https://carc.in/#/r/6p7y)
<phaul> users manual : https://github.com/phaul/yarr
<Bish> phaul: oh its yours :)?
<phaul> yes
gregf_ has joined #ruby
aqd has joined #ruby
<Bish> adam12: yeah, m.content_type = m.content_type.gsub('alternative','mixed') "fixes" it
marmotini_ has joined #ruby
<Bish> &>> def self.to_proc; ->(x){p x} ;end;[*1..2].each(&self)
<rubydoc> # => 1 (https://carc.in/#/r/6p7z)
<Bish> :>
marmotini has quit [Ping timeout: 245 seconds]
marmotini has joined #ruby
<mhlei> &>> 1+1
<rubydoc> # => 2 (https://carc.in/#/r/6p80)
<phaul> &fake Hacker.say_something_smart
<rubydoc> Try to connect the FTP hard drive, maybe it will override the multi-byte pixel!
<mhlei> & puts 'hello'
<rubydoc> parser error at position 0 around ` '
<mhlei> i see. '&>>' is the prefix used to execute online for rubydoc. rubydoc is a good machine.
<mhlei> Bish, thank you very much.
marmotini_ has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
keden has joined #ruby
AJA4350 has joined #ruby
conta has quit [Ping timeout: 246 seconds]
conta has joined #ruby
<Bish> mhlei: yw :)
<mhlei> but my question is that the & is behind a variable. not before . was this the same mean?
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
<mhlei> def with_user_locale(user, &block) with_locale(user&.preferred_language, &block) end
<mhlei> the user& in this sentence.
<phaul> it's coupled with the `.' &.
jinie has joined #ruby
<phaul> it means (user.nil? ? nil : user.preferred_language)
RedSnarf has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
<mhlei> phaul, thank u, this is syntactic in ruby ?
<phaul> yes it's just a syntactic sugar for the above. relatively recent as well
<phaul> &>> 1&.succ
<rubydoc> # => 2 (https://carc.in/#/r/6p82)
<phaul> &20>> 1&.succ
<rubydoc> stderr: -e:2: syntax error, unexpected '.' (https://carc.in/#/r/6p83)
<phaul> 20 meaning mri 2.0
themsay has joined #ruby
vondruch_ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
<phaul> simply shortens code like if user then if user.address then if user.address.country ...
vondruch has quit [Ping timeout: 250 seconds]
vondruch_ is now known as vondruch
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
<phaul> assuming that anything can be nil along the chain
Guest3806 has quit [Ping timeout: 250 seconds]
prestorium has quit [Ping timeout: 255 seconds]
daniel____ has joined #ruby
kyrylo has joined #ruby
daniel____ has quit [Remote host closed the connection]
daniel____ has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
jlebrech has joined #ruby
kyrylo has quit [Ping timeout: 255 seconds]
kyrylo has joined #ruby
ldnunes has joined #ruby
yield has quit [Remote host closed the connection]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jlebrech> missing_method doesn't work with superclasses?
<phaul> I am guessing you mean method_missing
<jlebrech> that way round yes
<jlebrech> if I call, super on a child class and it's missing it won't scoop it up
<jlebrech> just something funky i wanted to try out.
<phaul> &>> class X; def method_missing(name); "from X : #{name}"; end; end; class Y < X; def foo; super; end; end; Y.new.foo
<rubydoc> # => "from X : foo" (https://carc.in/#/r/6p8c)
<phaul> it seems to work
andikr has quit [Ping timeout: 246 seconds]
sidx64 has joined #ruby
aqd has quit [Remote host closed the connection]
andikr has joined #ruby
<Cork> anyone know if there is a way to get redcarpet to offset the header level?
<Cork> i would want to have it start at h3 instead of the default h1
<jlebrech> phaul: thanks :)
aqd has joined #ruby
<phaul> jlebrech: yw
lele has quit [Ping timeout: 258 seconds]
PasNox has left #ruby ["Parting"]
ramfjord has joined #ruby
teardown has joined #ruby
teardown is now known as Guest65678
lele has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
themsay has quit [Quit: Quit]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodlebug has quit [Read error: Connection reset by peer]
andikr has quit [Ping timeout: 252 seconds]
al2o3-cr has joined #ruby
sidx64 has joined #ruby
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<ryouba> hi
Tuor has joined #ruby
<ryouba> when entering a class with `attr_accessor :foo` through a static method on that class, and then inside of that static method doing `x = new` and `x.foo = :bar` and `return x`, why can't i access #foo from the outside?
DarthGandalf has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cork> ryouba: is x of that class?
<Cork> cause if it is it should work just fine
<Tuor> Hi, I'm currently reading https://docs.ruby-lang.org/en/2.6.0/OptionParser.html and wondering what this line exactlly doies: `Options = Struct.new(:name)`
<Cork> Tuor: you mean what the result is or what it does deeper down?
<phaul> &>> class X; def self.blah; x = new; x.foo = :bar; x; end; attr_accessor :foo; end; X.blah.foo
<rubydoc> # => :bar (https://carc.in/#/r/6p8w)
<Cork> Tuor: cause the result is a class (struct) with an accessor name that you can give values
mangold has joined #ruby
jottr has joined #ruby
<Tuor> I don't know what an accessor is and where this class is defined (is Struct a class provided by ruby it self?)
<Cork> Tuor: new takes a list of values, and it returns a new instance with those names defined as accessor
<Cork> this means you can take the result.name or result.<what ever you called it that is a valid format name>
<Cork> struct isn't much more then that, it is basically a hash
<Tuor> so Options.name would then be a Struct?
<Cork> no it should be the value of the struct field name
<Cork> optoons should be a struct class
jottr has quit [Ping timeout: 255 seconds]
<Tuor> OK let me try.
aqd has quit [Remote host closed the connection]
aqd has joined #ruby
prestorium has joined #ruby
jenrzzz has joined #ruby
<ryouba> hmm
dsmythe has quit [Remote host closed the connection]
<ryouba> Cork: phaul: thanks for the MWE ... i must have a different problem then :-/
dsmythe has joined #ruby
fanta7531 has quit [Quit: fanta7531]
jenrzzz has quit [Ping timeout: 250 seconds]
<ryouba> hmm
sidx64 has joined #ruby
<ryouba> phaul: any reason you put attr_accessor at the end instead of the beginning of your example class?
<phaul> no reason
ramfjord has joined #ruby
sidx64 has quit [Client Quit]
<ryouba> k
sidx64 has joined #ruby
<phaul> If I had to guess, I would say your attr accessor is on the singleton class of X not on X. are you putting it inside class << self block by any chance?
sidx64 has quit [Client Quit]
<ryouba> no, it's at the same place as your example
<ryouba> phaul: but my real class derives from Sequel::Model
<phaul> ok that was just a stab in the dark
<ryouba> even though that shouldn't matter
ramfjord has quit [Ping timeout: 245 seconds]
<ryouba> let me try to create a less minimal MWE
<ryouba> graaah
<Tuor> Cork: I played a bit around. Now I don't understand why this code prints 'Class': `options = Struct.new(:name); puts options.class`
<ryouba> phaul: the problem was in a completely different part of the code. i was just suspecting the static method to be the culprit as that's a new technique to me.
<phaul> ryouba: ok, glad you figured it out
<Cork> Tuor: that is the internal part i talked about before, i THINK Struct just use the generic Class.new to create a dynamic class under the hood, but not sure
apg has quit [Remote host closed the connection]
<jlebrech> anything better than rails? looking to simplify the: routes -> controller -> model thing. maybe a flat structure to have an api but also run webpacker.
<ryouba> phaul: all answers yield new questions though. from outside the class, "obj = X.blah; pp obj.foo" shows ":bar". but "pp obj" doesn't contain that info anywhere. why?
<jlebrech> can grape be used as an engine?
mondz has joined #ruby
<phaul> ryouba: it depends on the inspect method of the object. pp takes the output of that
<ryouba> oh okay ... so in this case, the inspect method of Sequel::Model?
<phaul> correct. pedantically the _instance method_ inspect of Sequel::Model
<ryouba> i.e. the one without "self." in front of it
<ryouba> so if i want these object attributes to appear as part of #to_hash, then i'll have to overwrite Sequel::Model's #to_hash in my derived class
sidx64 has joined #ruby
prestori_ has joined #ruby
conta has quit [Remote host closed the connection]
<phaul> if you are interested, the way this works is somewhat different from other languages, and Ruby doesnt have static methods. even class methods is a term that's accepted by the community but that's not what we really have
<phaul> It's just one kind of methods.
<ryouba> well Ruby is all i want to write
<ryouba> even though my gf has to write her thesis in Matlab, which is why i'm having to learn that, too
<phaul> methods on objects. That object can be a class though
<ryouba> and okay, i enjoy Arduino, which is C++
<ryouba> but my main interest is Ruby :-D
<phaul> so when i say X.foo, it's not a static method, it's a method on class Foo which is just an object
<ryouba> so the distinction between static method and class method is basically just for the benefit of the humans, but makes no difference to the compiler?
prestorium has quit [Ping timeout: 246 seconds]
<phaul> more like the distinction between class methods and instance methods. (and static methods in other languages are modelled with class methods but ruby doesn't use such term))
reber has quit [Remote host closed the connection]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ryouba> phaul: i understood that in order to use more precise language, one should say "class method" instead of "static method", but saying "instance method" is fine?
mistergibson has joined #ruby
<phaul> well, thecniqually a class method is an instance method of the classes singleton class. but that's a mouthful. so ppl just shorten it to class method. Saying just instance method would be confused with normal instance methods
cisco has joined #ruby
mistergibson has quit [Remote host closed the connection]
wallace_mu has quit [Remote host closed the connection]
Rapture has joined #ruby
<phaul> &>> x = 'a'; def x.up!; x.upcase; end; x.up!
<rubydoc> stderr: -e:2:in `up!': undefined local variable or method `x' for "a":String (NameError) (https://carc.in/#/r/6p9f)
<phaul> &>> x = 'a'; def x.up!; upcase; end; x.up!
<rubydoc> # => "A" (https://carc.in/#/r/6p9g)
ferr has quit [Quit: WeeChat 2.4]
* ryouba reads and squints and reads some more and squints some more
jottr has joined #ruby
<phaul> so here up! is a method put in the singleton class of object x. No other strings have that method.
<phaul> similarly when in a class you define a method self.foo, it's put in the singleton class of that object that is that class.
<phaul> No other classes have that method
crankharder has joined #ruby
Fridtjof has joined #ruby
<phaul> if you have time for it I recommend https://www.youtube.com/watch?v=X2sgQ38UDVY
<ryouba> not rn as i need to get going but perhaps as something before bed
<ryouba> i like his books, never seen him talk!
jottr has quit [Ping timeout: 246 seconds]
DmitryBochkarev has quit [Ping timeout: 250 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Tuor> Cork: so options is an instance of the class Class and has an attribute called name?
wallace_mu has joined #ruby
duderonomy has joined #ruby
<havenwood> Tuor: Options = Struct.new(:name); options = Options.new 'option name'
<havenwood> Tuor: `options` above is an instance of the `Options` Struct
<havenwood> Tuor: in modern Ruby, there's also a nifty `keyword_init:` param that I think is great
<havenwood> Options = Struct.new(:name, keyword_init: true); options = Options.new(name: 'option name')
<havenwood> #=> #<struct Options name="option name">
RedSnarf has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<havenwood> Tuor: here are some example Structs in the wild: https://github.com/jcoglan/jit/blob/master/lib/revision.rb#L5-L30
terens has quit [Quit: Leaving]
<havenwood> Tuor: It's good practice to use a constant with your struct, but you can also use them anonymously. Here's an example of that in the wild: https://github.com/pry/pry/blob/e23aabdbfc83764ba2c4f42ced15d7f86cd2eddb/lib/pry/testable/mockable.rb#L10
<havenwood> &>> Struct.new(:name).new('Lilibeth')
<rubydoc> # => #<struct name="Lilibeth"> (https://carc.in/#/r/6p9h)
jottr has joined #ruby
<Tuor> Ah now, I'm creating a new class called Option.
<Tuor> I was thinking I am instanciating a Class not creating a new class. Thats a big difference... :)
marmotini has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
<Tuor> I read your paste. I did understand I think even your metho to_s with the array to comma seperated words in the string.
Swyper has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
nowhereman has joined #ruby
UnknownSoldier has joined #ruby
<mhlei> The tags file made by ctags/ripper-tags is not useful to the namespace. who to resolve it? it
<mhlei> Exactly, the ctags is not very firendly while go to the definition of a tag.
lxsameer has quit [Quit: out]
powerbit has quit [Remote host closed the connection]
Dbugger has joined #ruby
bahamas has joined #ruby
<bahamas> hello. does ruby still use oniguruma regular expressions?
<leah2> yes
<bahamas> great! thanks
<leah2> Onigmo really
<bahamas> what's important is that it's close enough to the regex supported by textmate. because I want to use this site to test some regular expressions for syntax highligthing: https://rubular.com/
beilabs_ has joined #ruby
AndroidKitKat has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 255 seconds]
mistergibson has joined #ruby
wallace_mu has quit []
nowhereman has quit [Ping timeout: 246 seconds]
AndroidKitKat has joined #ruby
Swyper has quit [Remote host closed the connection]
sidx64 has joined #ruby
priodev has quit [Ping timeout: 268 seconds]
priodev has joined #ruby
Swyper has joined #ruby
jottr has joined #ruby
AndroidKitKat has quit [Quit: バイバイ〜!]
mistergibson has quit [Quit: Leaving]
AndroidKitKat has joined #ruby
sidx64 has quit [Ping timeout: 245 seconds]
sidx64_ has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
HendrikPeter has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mondz has quit [Ping timeout: 245 seconds]
AndroidKitKat has quit [Quit: バイバイ〜!]
AndroidKitKat has joined #ruby
DmitryBochkarev has quit [Ping timeout: 268 seconds]
crankharder has quit [Ping timeout: 250 seconds]
Tuor has quit [Ping timeout: 250 seconds]
mangold has quit [Quit: This computer has gone to sleep]
jottr has joined #ruby
bahamas has quit [Ping timeout: 255 seconds]
cisco has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
rippa has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
crankharder has quit [Ping timeout: 246 seconds]
eddof13 has joined #ruby
jcarl43 has joined #ruby
houhoulis has joined #ruby
bahamas has joined #ruby
DmitryBochkarev has joined #ruby
DmitryBochkarev has quit [Max SendQ exceeded]
tdy has joined #ruby
DmitryBochkarev has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
crankharder has joined #ruby
Fira has quit [Read error: Connection reset by peer]
mangold has joined #ruby
sidx64_ has quit [Ping timeout: 250 seconds]
clemens3_ has quit [Ping timeout: 255 seconds]
andikr has joined #ruby
bahamas has quit [Ping timeout: 250 seconds]
jlebrech has quit [Remote host closed the connection]
kiero has quit [Quit: leaving]
orbyt_ has joined #ruby
polishdub has joined #ruby
AJA4350 has joined #ruby
gix has joined #ruby
mondz has joined #ruby
jenrzzz has joined #ruby
yield has joined #ruby
mondz has quit [Ping timeout: 245 seconds]
andikr has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #ruby
yield has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has quit [Client Quit]
brool has joined #ruby
cisco has joined #ruby
hiroaki has quit [Ping timeout: 250 seconds]
cisco is now known as Guest89555
ua has quit [Ping timeout: 268 seconds]
HendrikPeter has joined #ruby
orbyt_ has joined #ruby
mondz has joined #ruby
andikr has joined #ruby
Inline has joined #ruby
houhoulis has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
ua has joined #ruby
c-c has joined #ruby
yield has joined #ruby
yield has quit [Ping timeout: 246 seconds]
n13z has quit [Ping timeout: 268 seconds]
n13z has joined #ruby
aonemd has joined #ruby
pupsikov has joined #ruby
aonemd has quit [Client Quit]
cthulchu_ has quit [Read error: Connection reset by peer]
aonemd has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsmythe has quit [Read error: Connection reset by peer]
dsmythe has joined #ruby
lxsameer has joined #ruby
doodlebug has joined #ruby
andikr has quit [Remote host closed the connection]
ramfjord has joined #ruby
spiette has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
i1nfusion has joined #ruby
wallace_mu has joined #ruby
yield has joined #ruby
spiette has joined #ruby
bahamas has joined #ruby
yield has quit [Ping timeout: 245 seconds]
prestori_ has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
lucasb has joined #ruby
duderonomy has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
DarthGandalf has quit [Ping timeout: 250 seconds]
brool has quit [Quit: WeeChat 2.4]
ramfjord_ has joined #ruby
aonemd has quit [Quit: leaving]
ramfjord has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
UnknownSoldier is now known as \tau
yield has joined #ruby
spiette has quit [Quit: ZNC 1.7.2 - https://znc.in]
DmitryBochkarev has quit [Ping timeout: 245 seconds]
yield has quit [Ping timeout: 255 seconds]
pupsikov has joined #ruby
Guest89555 has quit [Ping timeout: 250 seconds]
spiette has joined #ruby
\tau has quit [Remote host closed the connection]
yield has joined #ruby
SeepingN has joined #ruby
yield has quit [Ping timeout: 245 seconds]
waheedi has quit [Quit: waheedi]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Guest65678 has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
bahamas has quit [Quit: leaving]
zapata has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
<c-c> and since my micro sized engine draft uses fork (line 192) https://gist.github.com/csmr/ffc1c691c24cc9bf7b0f2e9bd729c471
<c-c> I'm thinking maybe must posix_spawn() or other fancying
yield has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
yield has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsmythe_ has joined #ruby
<c-c> - but is there a posix spawn in ruby libs?
<c-c> hm, maybe this could be bash level stuff
dsmythe has quit [Ping timeout: 246 seconds]
dsmythe has joined #ruby
orbyt_ has joined #ruby
dsmythe_ has quit [Ping timeout: 268 seconds]
noboruma has quit [Ping timeout: 246 seconds]
noboruma has joined #ruby
SeepingN has quit [Ping timeout: 246 seconds]
waheedi has joined #ruby
orbyt_ has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
UnknownSoldier has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
UnknownSoldier is now known as \tau
yield has joined #ruby
<miah> \msg zenspider welcome to the team =)
<miah> doh
<miah> all you saw was hunter2 right?
doodlebug has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
yield has quit [Ping timeout: 250 seconds]
<Zarthus> miah: I saw a person trying to cover up a huge mistake.
hiroaki has joined #ruby
<miah> by huge you mean asterisks right?
t0xik has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
HendrikPeter has quit [Ping timeout: 255 seconds]
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
cd has joined #ruby
eddof13 has quit [Quit: eddof13]
mochiyoda_ is now known as mochiyoda
vondruch_ has joined #ruby
HendrikPeter has joined #ruby
yield has joined #ruby
eddof13 has joined #ruby
vondruch has quit [Ping timeout: 255 seconds]
vondruch_ is now known as vondruch
yield has quit [Ping timeout: 255 seconds]
maxdoubt has joined #ruby
HendrikPeter has quit [Ping timeout: 255 seconds]
crankharder has quit [Ping timeout: 250 seconds]
duderonomy has joined #ruby
mondz has quit [Quit: ERC (IRC client for Emacs 26.1)]
duderonomy has quit [Client Quit]
mondz has joined #ruby
gnufied has joined #ruby
crankharder has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
doodlebug has quit [Ping timeout: 245 seconds]
crankharder has quit [Ping timeout: 246 seconds]
Nicmavr has joined #ruby
doodleb51 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
code_zombie has joined #ruby
doodleb51 has quit [Read error: Connection reset by peer]
ldnunes has quit [Ping timeout: 252 seconds]
doodlebug has joined #ruby
ldnunes has joined #ruby
crankharder has joined #ruby
ramfjord_ has quit [Ping timeout: 245 seconds]
waheedi has quit [Quit: waheedi]
doodlebug has quit [Ping timeout: 246 seconds]
doodleb37 has joined #ruby
hiroaki has quit [Ping timeout: 252 seconds]
doodleb37 has quit [Read error: Connection reset by peer]
quarters has quit [Ping timeout: 252 seconds]
quarters has joined #ruby
doodlebug has joined #ruby
HendrikPeter has joined #ruby
noboruma has quit [Ping timeout: 250 seconds]
noboruma has joined #ruby
aqd has quit [Remote host closed the connection]
eddof13 has quit [Ping timeout: 245 seconds]
maryo has joined #ruby
jenrzzz has joined #ruby
HendrikPeter has quit [Ping timeout: 250 seconds]
Fernando-Basso has joined #ruby
doodlebug has quit [Read error: Connection timed out]
doodlebug has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
duderonomy has joined #ruby
i1nfusion has quit [Remote host closed the connection]
zleap has joined #ruby
zleap has quit [Changing host]
zleap has joined #ruby
i1nfusion has joined #ruby
ur5us has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
noboruma has quit [Ping timeout: 245 seconds]
duderonomy has quit [Client Quit]
noboruma has joined #ruby
dsmythe has quit [Ping timeout: 245 seconds]
interruptinuse has joined #ruby
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower2 has joined #ruby
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
ldnunes has quit [Quit: Leaving]
nwradio878887987 has joined #ruby
quarters has quit [Ping timeout: 258 seconds]
nwradio87888798 has quit [Ping timeout: 246 seconds]
quarters has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
dsmythe has joined #ruby
schleppel has quit [Quit: Konversation terminated!]
ur5us has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
doodleb6 has joined #ruby
doodlebug has quit [Ping timeout: 255 seconds]
doodleb6 has quit [Read error: Connection reset by peer]
nwradio878887987 has quit [Ping timeout: 255 seconds]
nwradio878887987 has joined #ruby
dsmythe has quit [Ping timeout: 245 seconds]
doodlebug has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
crankharder has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
<zachrab> hello
zachrab has quit [Client Quit]
druonysus has quit [Quit: druonysus]
druonysus has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
dsmythe has joined #ruby
dsmythe has quit [Remote host closed the connection]
SuperL4g has joined #ruby
dsmythe has joined #ruby
maxdoubt has quit [Quit: maxdoubt]
Dbugger has quit [Ping timeout: 250 seconds]
<miah> sup
nuh^ has joined #ruby
segy has quit [Ping timeout: 245 seconds]
maryo_ has joined #ruby
segy has joined #ruby
SuperL4g has quit [Quit: WeeChat 2.2]
SuperL4g has joined #ruby
zachk has joined #ruby
maryo has quit [Ping timeout: 246 seconds]
i1nfusion has quit [Remote host closed the connection]
zachk has quit [Changing host]
zachk has joined #ruby
ramfjord has joined #ruby
i1nfusion has joined #ruby
nwradio878887987 has quit [Ping timeout: 255 seconds]
nwradio878887987 has joined #ruby
imadper has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 250 seconds]
nowhereman has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
crankharder has joined #ruby
gix has quit [Ping timeout: 250 seconds]
wallace_mu has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Ping timeout: 245 seconds]
maryo_ has quit [Read error: Connection reset by peer]
maxdoubt has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
lytol has joined #ruby
someuser has joined #ruby
kyrylo has quit [Quit: Textual IRC Client: www.textualapp.com]
duderonomy has joined #ruby
zachk has quit [Read error: Connection reset by peer]
zachk has joined #ruby
zleap has quit [Quit: WeeChat 2.4]
polishdub has quit [Quit: leaving]
Fusl__ is now known as Fusl
maxdoubt has quit [Quit: maxdoubt]
teclator_ has joined #ruby
teclator_ has quit [Client Quit]
teclator_test has joined #ruby
ellcs1 has joined #ruby
teclator_test has left #ruby [#ruby]
jottr has joined #ruby
AJA4350 has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
nowhereman has quit [Ping timeout: 258 seconds]
cisco has joined #ruby
cisco is now known as Guest31420
jottr has quit [Ping timeout: 250 seconds]
someuser has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
lytol has quit [Remote host closed the connection]
Guest31420 has quit [Ping timeout: 255 seconds]
cisco_ has joined #ruby
wallace_mu has joined #ruby
cisco_ has quit [Ping timeout: 246 seconds]
nuh^ has quit []
jottr has joined #ruby
wallace_mu has quit [Client Quit]
amfdsrt^ has joined #ruby
bhaak has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 255 seconds]
jcarl43 has quit [Quit: WeeChat 2.4]
mondz has quit [Ping timeout: 255 seconds]
scientes has joined #ruby
<scientes> how do i send EOF on a IO object?
<scientes> a pipe
<scientes> nvm
orbyt_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
mondz has joined #ruby
jenrzzz has joined #ruby
<scientes> how do i daemonize a script?
<scientes> why is daemonizing a script so painful
<havenwood> scientes: These days with systemd you log to stdout, quit on term/int, reload on hup. Mike Perham wrote a nice summary: https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
<scientes> yeah I was a developer of systemd in its early days
<scientes> but i am running from a git hook
<scientes> and need to daemonize