havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
rsh has quit [Ping timeout: 248 seconds]
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
tpanarch1st has joined #ruby
fphilipe_ has quit [Ping timeout: 257 seconds]
DaRock has joined #ruby
lucasb_ has quit [Quit: Connection closed for inactivity]
<AndreYuhai> phaul: I wrote the setter for my instance variable as you suggested. But why can I not use it in my initialize? I mean it didn't work this way.
bradleyprice has joined #ruby
CCDelivery has joined #ruby
CCDelivery has quit [Max SendQ exceeded]
jenrzzz_ has quit [Ping timeout: 272 seconds]
CCDelivery has joined #ruby
AJA4351 has joined #ruby
tdy has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
bradleyprice has quit [Ping timeout: 252 seconds]
ricekrispie has quit [Quit: YEET]
Exuma has joined #ruby
CCDelivery has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
patronus has joined #ruby
brool has joined #ruby
tpanarch1st_ has joined #ruby
tpanarch1st has quit [Ping timeout: 272 seconds]
CCDelivery has quit [Read error: Connection reset by peer]
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
CCDelivery has joined #ruby
AJA4351 has joined #ruby
fphilipe_ has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
rsh has joined #ruby
rsh has quit [Ping timeout: 245 seconds]
Guest83989 has quit [Read error: Connection reset by peer]
Guest83989 has joined #ruby
CCDelivery has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
code_zombie has quit [Quit: Leaving]
CCDelivery has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
duderonomy has joined #ruby
CCDelivery has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 272 seconds]
AJA4351 is now known as AJA4350
fphilipe_ has quit [Ping timeout: 258 seconds]
bambanx has quit [Quit: Leaving]
CCDelivery has quit [Read error: Connection reset by peer]
CCDelivery has joined #ruby
CCDelivery has quit [Remote host closed the connection]
<baweaver> My thoughts on the new pipeline operator:
queip has quit [Ping timeout: 248 seconds]
AJA4350 has quit [Ping timeout: 244 seconds]
queip has joined #ruby
gix has quit [Ping timeout: 245 seconds]
<ule> baweaver: cool
<ule> Great article
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
Exuma has joined #ruby
AJA4350 has joined #ruby
AJA4350 has quit [Client Quit]
chimkan has joined #ruby
fphilipe_ has joined #ruby
cd has quit [Quit: cd]
chimkan has quit [Client Quit]
vjacob has quit [Ping timeout: 272 seconds]
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 268 seconds]
Xiti` has joined #ruby
greypack has quit [Ping timeout: 248 seconds]
Xiti has quit [Ping timeout: 248 seconds]
jinie_ has joined #ruby
jinie has quit [Ping timeout: 248 seconds]
dviola has quit [Quit: WeeChat 2.5]
cerulean_ has quit [Ping timeout: 272 seconds]
tpanarch1st_ has quit [Ping timeout: 272 seconds]
ricekrispie has joined #ruby
greypack has joined #ruby
dar123 has joined #ruby
braincrash has quit [Quit: bye bye]
evdubs_ has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
evdubs has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
ltp has quit [Ping timeout: 248 seconds]
ltp has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
_whitelogger_ has joined #ruby
Frobozz_ has joined #ruby
axsuul- has joined #ruby
_whitelogger has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 248 seconds]
Frobozz has quit [Ping timeout: 248 seconds]
ErhardtMundt has quit [Ping timeout: 248 seconds]
ErhardtMundt has joined #ruby
evdubs_ has quit [*.net *.split]
dar123 has quit [*.net *.split]
ur5us has quit [*.net *.split]
russt has quit [*.net *.split]
universa1 has quit [*.net *.split]
coreyja has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
lupine has quit [*.net *.split]
interruptinuse has quit [*.net *.split]
oz has quit [*.net *.split]
supergeek[m] has quit [*.net *.split]
sparc has quit [*.net *.split]
ricer2 has quit [*.net *.split]
Quintasan has quit [*.net *.split]
mnemon has quit [*.net *.split]
mjacob has quit [*.net *.split]
ozzloy has quit [*.net *.split]
Momentum has quit [*.net *.split]
bhaak has quit [*.net *.split]
zxq2 has quit [*.net *.split]
patronus has quit [*.net *.split]
Eiam has quit [*.net *.split]
shtirlic has quit [*.net *.split]
donofrio has quit [*.net *.split]
Inline has quit [*.net *.split]
Bish has quit [*.net *.split]
rafadc has quit [*.net *.split]
wolfshappen has quit [*.net *.split]
Furai has quit [*.net *.split]
DTZUZU has quit [*.net *.split]
thunderbirdtr has quit [*.net *.split]
twe4ked has quit [*.net *.split]
znz_jp has quit [*.net *.split]
szulak has quit [*.net *.split]
pwnd_nsfw` has quit [*.net *.split]
Yxhuvud has quit [*.net *.split]
camilasan has quit [*.net *.split]
unixcat has quit [*.net *.split]
kashike has quit [*.net *.split]
harmaahylje has quit [*.net *.split]
Cork has quit [*.net *.split]
afisher has quit [*.net *.split]
BrianWGray has quit [*.net *.split]
planigan has quit [*.net *.split]
noobineer has quit [*.net *.split]
marahin has quit [*.net *.split]
Leopere has quit [*.net *.split]
mkaito has quit [*.net *.split]
brer has quit [*.net *.split]
DTZUZU has joined #ruby
donofrio has joined #ruby
irdr has quit [Remote host closed the connection]
irdr has joined #ruby
edwardly_ has joined #ruby
edwardly_ has quit [Changing host]
edwardly_ has joined #ruby
edwardly has quit [Ping timeout: 248 seconds]
edwardly_ is now known as edwardly
Guest69 has joined #ruby
fphilipe_ has joined #ruby
evdubs_ has joined #ruby
ur5us has joined #ruby
dar123 has joined #ruby
russt has joined #ruby
coreyja has joined #ruby
universa1 has joined #ruby
tobiasvl has joined #ruby
interruptinuse has joined #ruby
lupine has joined #ruby
oz has joined #ruby
mjacob has joined #ruby
Quintasan has joined #ruby
sparc has joined #ruby
ricer2 has joined #ruby
ozzloy has joined #ruby
Momentum has joined #ruby
zxq2 has joined #ruby
mnemon has joined #ruby
supergeek[m] has joined #ruby
bhaak has joined #ruby
patronus has joined #ruby
Eiam has joined #ruby
Furai has joined #ruby
rafadc has joined #ruby
Inline has joined #ruby
znz_jp has joined #ruby
pwnd_nsfw` has joined #ruby
camilasan has joined #ruby
Yxhuvud has joined #ruby
harmaahylje has joined #ruby
wolfshappen has joined #ruby
Bish has joined #ruby
shtirlic has joined #ruby
szulak has joined #ruby
twe4ked has joined #ruby
kashike has joined #ruby
unixcat has joined #ruby
thunderbirdtr has joined #ruby
Cork has joined #ruby
BrianWGray has joined #ruby
afisher has joined #ruby
planigan has joined #ruby
marahin has joined #ruby
Leopere has joined #ruby
noobineer has joined #ruby
mkaito has joined #ruby
brer has joined #ruby
Guest69 has quit [Client Quit]
phenom has quit [Ping timeout: 248 seconds]
oreja55 has joined #ruby
ricer2 has quit [Ping timeout: 252 seconds]
ricer2 has joined #ruby
Fusl has quit [Remote host closed the connection]
phenom has joined #ruby
Fusl has joined #ruby
brool has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
dar123 has quit [Quit: Textual IRC Client: www.textualapp.com]
dar123 has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
fphilipe_ has quit [Ping timeout: 252 seconds]
donofrio has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
bradleyprice has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
jenrzzz has joined #ruby
Azure has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
uplime is now known as lime[_]
LtHummus has quit [Ping timeout: 245 seconds]
_whitelogger has joined #ruby
Azure has quit [Ping timeout: 248 seconds]
Swyper has joined #ruby
LtHummus has joined #ruby
fphilipe_ has joined #ruby
Swyper has quit [Remote host closed the connection]
Azure has joined #ruby
CrazyEddy has quit [Ping timeout: 248 seconds]
Inline has quit [Quit: Leaving]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
rsh has joined #ruby
bradleyprice has quit [Remote host closed the connection]
sauvin has joined #ruby
rsh has quit [Ping timeout: 272 seconds]
bradleyprice has joined #ruby
bradleyprice has quit [Remote host closed the connection]
sauvin has quit [Remote host closed the connection]
dar123 has joined #ruby
sauvin has joined #ruby
conta has joined #ruby
xco has joined #ruby
bradleyprice has joined #ruby
CrazyEddy has joined #ruby
bradleyprice has quit [Ping timeout: 252 seconds]
miskatonic has joined #ruby
vjacob has joined #ruby
cats has quit [Ping timeout: 268 seconds]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
hiroaki has quit [Ping timeout: 245 seconds]
Exuma has joined #ruby
ur5us has joined #ruby
conta has quit [Ping timeout: 246 seconds]
cats has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
conta has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
lxsameer has joined #ruby
fphilipe_ has quit [Ping timeout: 250 seconds]
morozovm has joined #ruby
fphilipe_ has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
jinie_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
nowhere_man has quit [Ping timeout: 272 seconds]
rsh has joined #ruby
jenrzzz has joined #ruby
schne1der has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goldbox has joined #ruby
vondruch has joined #ruby
rsh has quit [Ping timeout: 258 seconds]
mayurvpatil has joined #ruby
goldbox has quit [Remote host closed the connection]
NL3limin4t0r_afk is now known as NL3limin4t0r
conta1 has joined #ruby
conta has quit [Ping timeout: 244 seconds]
conta1 is now known as conta
goldbox has joined #ruby
dellavg_ has joined #ruby
aupadhye has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
fphilipe_ has quit [Read error: Connection reset by peer]
aupadhye has quit [Client Quit]
aupadhye has joined #ruby
fphilipe_ has joined #ruby
vondruch has joined #ruby
jenrzzz has joined #ruby
dellavg_ has quit [Ping timeout: 268 seconds]
Swyper has joined #ruby
dellavg_ has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
mayurvpatil has quit [Quit: This computer has gone to sleep]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Ping timeout: 246 seconds]
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.]
jenrzzz has quit [Ping timeout: 248 seconds]
crankharder has joined #ruby
bradleyprice has joined #ruby
al2o3-cr has joined #ruby
bradleyprice has quit [Ping timeout: 248 seconds]
mayurvpatil has joined #ruby
mayurvpatil has quit [Remote host closed the connection]
old_relik has joined #ruby
<old_relik> I have a list of maps like this: [{"id"=>"3e8f493a-5662-4f10-9ac7-04fff7988009", "data"=>87}]
andikr has joined #ruby
<old_relik> how can I easily turn this into {"3e8f493a-5662-4f10-9ac7-04fff7988009" => {"data" => 87}, "2312f493a-5662-4f10-1831-04fff7988009" => {"data" => 81}}
tdy has quit [Read error: Connection reset by peer]
tdy has joined #ruby
jenrzzz has joined #ruby
bradleyprice has joined #ruby
<phaul> AndreYuhai: probably you were setting a local variable. class X; attr_accessor :blah; def foo; blah=13; end; end; end here blah is a local variable. self.blah = 13 would set the instance variable
<phaul> or just @blah = 13
bradleyprice has quit [Ping timeout: 250 seconds]
shtirlic has quit [Quit: ZNC - http://znc.in]
<AndreYuhai> phaul: Can you take a look at this ? https://paste.ofcode.org/RqAXcvvqpf9Z46XUjre7Q3
shtirlic has joined #ruby
<phaul> looks good to me, do you have an issue with it?
ur5us has joined #ruby
ur5us has quit [Client Quit]
<AndreYuhai> phaul: Yes, this does not work. It simply assigns the values to the instance variables without evaluating them with my setter methods as if they don't exist.
<phaul> &>> old_relik [{"id"=>"3e8f493a-5662-4f10-9ac7-04fff7988009","data"=>87}].to_h { |h| [h["id"], {"data" => h["data"]}] }
<rubydoc> stderr: playpen: timeout triggered! (https://carc.in/#/r/72jb)
<phaul> &>> [{"id"=>"3e8f493a-5662-4f10-9ac7-04fff7988009","data"=>87}].to_h { |h| [h["id"], {"data" => h["data"]}] } # old_relik
<rubydoc> # => {"3e8f493a-5662-4f10-9ac7-04fff7988009"=>{"data"=>87}} (https://carc.in/#/r/72jc)
<old_relik> had no idea you could to a block with to_h
<phaul> it's a new thing
<phaul> 2.6 I think
<phaul> AndreYuhai: if you want the check to happen there as well you have to use the self.blah=(value) form
<phaul> difference is that the former is just an assignent to an instance variable, self.blah=() is a method call
<phaul> you can be liberal with the () and spaces around = though, so it's not evident that its a method call
<phaul> so self.blah = 13 is also method call
<AndreYuhai> phaul: But with self wouldn't it be a class method?
<phaul> no. it's just the default receiver.
<phaul> method() is usually equivalent to self.method()
<phaul> the method definition is a bit of exception..
oreja55 has quit [Quit: Textual IRC Client: www.textualapp.com]
<AndreYuhai> Now I am confused. :D And I guess it didn't work either.
tdy1 has joined #ruby
mayurvpatil has joined #ruby
<phaul> AndreYuhai: but does it work if you fix it the way I suggested? It should..
jenrzzz has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
<phaul> I can recommend a pretty good explanation of the ruby object model from a video lecture, about 1.5 hr https://www.youtube.com/watch?v=X2sgQ38UDVY
<AndreYuhai> phaul: Yes I did. I converted them into self.method=(foo) but they still get set directly.
tdy has quit [Ping timeout: 244 seconds]
<AndreYuhai> phaul: And I found this answer, https://stackoverflow.com/a/10465235/4796762
<phaul> &>> class X; attr_reader :blah; def initialize(blah) ; self.blah = blah; end; end; def blah=(val); @blah = val * 2; end; end; X.new(21); X.blah
<rubydoc> stderr: -e:3: syntax error, unexpected end, expecting end-of-input (https://carc.in/#/r/72jd)
shtirlic has quit [Quit: ZNC - http://znc.in]
shtirlic has joined #ruby
<phaul> &>> class X; attr_reader :blah; def initialize(blah) ; self.blah=(blah); end; def blah=(val); @blah = val * 2; end; end; x = X.new(21); x.blah
<rubydoc> # => 42 (https://carc.in/#/r/72je)
<phaul> there we go
<AndreYuhai> phaul: When I set the value using the method like obj.file_date = '04/01/2019' then it works and gives me => '2019-04-01' but I don't know why in initialization it does not work.
<phaul> it does
<AndreYuhai> phaul: oh let me check. I hadn't change the methods in initializer
<phaul> I just demonstrated it
<AndreYuhai> to self.method
queip has quit [Ping timeout: 248 seconds]
unixcat has quit [Quit: ZNC 1.7.2+deb2~bpo9+1 - https://znc.in]
unixcat has joined #ruby
<AndreYuhai> phaul: Now it works. Thank you. But what is the difference between using self.method and @variable_name? Because one uses the setter method we wrote and the other one just assigns the value and I didn't even have a attr_accessor
<AndreYuhai> or attr_writer
<phaul> I explained it already, please read back .. │092331 phaul | difference is that ...
xco has quit [Quit: xco]
<phaul> I really recommend watching that video about the object model too, there you will learn that there is no class methods. Like in the matrix. There is no spoon :)
<NL3limin4t0r> baweaver: You could also use the coposition operator as pipe.
xco has joined #ruby
queip has joined #ruby
<NL3limin4t0r> baweaver: You could also use the coposition operator as pipe.
<AndreYuhai> phaul: Hahaha thank you, I added it to my watch list! :) Thanks for the help!
<NL3limin4t0r> oops, double message
<NL3limin4t0r> &>> double = ->(n) { n * 2 }; increment = ->(n) { n + 1 }; (double >> double >> increment >> double).call(5)
<rubydoc> # => 42 (https://carc.in/#/r/72ji)
<NL3limin4t0r> &>> double = ->(n) { n * 2 }; increment = ->(n) { n + 1 }; 5.then(& double >> double >> increment >> double)
<rubydoc> # => 42 (https://carc.in/#/r/72jn)
donofrio has joined #ruby
old_relik has quit [Quit: Page closed]
jenrzzz has quit [Ping timeout: 245 seconds]
queip has quit [Ping timeout: 248 seconds]
jlebrech has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
drale2k_ has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
morozovm has quit []
rsh has joined #ruby
fphilipe_ has joined #ruby
rsh has quit [Ping timeout: 245 seconds]
queip has joined #ruby
mayurvpatil_ has joined #ruby
mayurvpatil has quit [Ping timeout: 272 seconds]
tdy1 has quit [Ping timeout: 244 seconds]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
conta has quit [Ping timeout: 245 seconds]
queip has quit [Ping timeout: 246 seconds]
DaRock has quit [Ping timeout: 248 seconds]
conta has joined #ruby
queip has joined #ruby
<AndreYuhai> How do I escape a single quote in my string with gsub or etc.? :D gsub("'", "\'") does not work
lunarkitty7 has quit [Ping timeout: 258 seconds]
<phaul> &>> "hello 'world'".gsub("'", "\\\\'")
fphilipe_ has quit [Ping timeout: 257 seconds]
<rubydoc> # => "hello \\'world\\'" (https://carc.in/#/r/72jq)
mello has joined #ruby
<AndreYuhai> wow that's a lot of backslashes haha. Thank you once again. :)
<phaul> np
goldbox has quit [Remote host closed the connection]
conta has quit [Ping timeout: 258 seconds]
jinie has joined #ruby
jinie has quit [Client Quit]
jinie has joined #ruby
ellcs has joined #ruby
lunarkitty7 has joined #ruby
conta has joined #ruby
crankharder has joined #ruby
fphilipe_ has joined #ruby
donofrio_ has joined #ruby
ghormoon has quit [Excess Flood]
ghormoon has joined #ruby
zululee_ has quit [Ping timeout: 248 seconds]
zululee_ has joined #ruby
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
donofrio has quit [Ping timeout: 248 seconds]
Freshnuts has quit [Quit: Leaving]
ellcs has quit [Ping timeout: 248 seconds]
mayurvpatil_ has joined #ruby
arahael has joined #ruby
mayurvpatil_ has quit [Quit: This computer has gone to sleep]
xco has quit [Quit: xco]
xco has joined #ruby
rafadc has quit [Remote host closed the connection]
queip has quit [Ping timeout: 248 seconds]
fphilipe_ has quit [Ping timeout: 248 seconds]
queip has joined #ruby
rafadc has joined #ruby
rsh has joined #ruby
rsh has quit [Ping timeout: 245 seconds]
ellcs has joined #ruby
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndreYuhai has quit [Remote host closed the connection]
jenrzzz has joined #ruby
AndreYuhai has joined #ruby
goldbox has joined #ruby
rsh has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
mayurvpatil_ has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
crankharder has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby
gb_away has quit [Ping timeout: 245 seconds]
fphilipe_ has joined #ruby
doodlebug has joined #ruby
gb_away has joined #ruby
doodlebug has quit [Excess Flood]
violentE has joined #ruby
rsh has quit [Ping timeout: 272 seconds]
doodleb45 has joined #ruby
Ai9zO5AP has joined #ruby
Swyper has joined #ruby
violentE has quit [Ping timeout: 245 seconds]
drale2k_ has joined #ruby
jlebrech has quit [Remote host closed the connection]
doodleb45 has quit [Read error: Connection reset by peer]
doodleb77 has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta2 has joined #ruby
conta has quit [Ping timeout: 245 seconds]
conta2 is now known as conta
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
mayurvpatil_ has quit [Quit: Leaving]
goldbox has quit [Ping timeout: 258 seconds]
codefriar has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
violentE has joined #ruby
conta has quit [Ping timeout: 248 seconds]
AJA4350 has quit [Ping timeout: 268 seconds]
fphilipe_ has joined #ruby
AJA4350 has joined #ruby
GodFather has joined #ruby
violentE has quit [Quit: Leaving]
Fischmiep has quit [Quit: WeeChat 2.3]
rem_ has joined #ruby
GodFather has quit [Ping timeout: 248 seconds]
griffindy has joined #ruby
Swyper has quit [Remote host closed the connection]
crankharder has quit [Quit: Lost terminal]
goldbox has joined #ruby
cd has joined #ruby
Swyper has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
AndroidKitKat has quit [Remote host closed the connection]
cvz has joined #ruby
<cvz> WHat am I doing wrong if I get `require': cannot load such file -- influxdb after succesfully doing gem install influxdb
drale2k_ has joined #ruby
queip has quit [Ping timeout: 248 seconds]
AndroidKitKat has joined #ruby
queip has joined #ruby
rem_ has quit [Ping timeout: 248 seconds]
arahael has quit [Quit: "Relocating the machine..."]
xco has quit [Quit: xco]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has left #ruby ["Leaving"]
Jonopoly has joined #ruby
arahael has joined #ruby
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
drale2k_ has joined #ruby
conta has joined #ruby
drale2k_ has quit [Client Quit]
rsh has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
apparition has joined #ruby
doodleb77 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
jcalla has joined #ruby
queip has quit [Ping timeout: 245 seconds]
Creatornator has joined #ruby
GodFather has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
queip has joined #ruby
<sagax> hi all!
conta has quit [Quit: conta]
<sagax> what better, what true - call method throw `.` or call method throw `::` ?
powerbit has quit [Ping timeout: 258 seconds]
Jonopoly has quit [Quit: WeeChat 2.4]
queip has quit [Ping timeout: 248 seconds]
conta has joined #ruby
conta has quit [Client Quit]
arahael1 has joined #ruby
queip has joined #ruby
arahael has quit [Ping timeout: 248 seconds]
<mozzarella> sagax: I don't understand your question
Azure has quit [Read error: Connection reset by peer]
<sagax> example File.join('foo', 'bar') vs File::join('foo', 'bar')
<sagax> what better?
Azure has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
<sagax> . vs ::
<mozzarella> I only use :: for constants
code_zombie has joined #ruby
Jonopoly has joined #ruby
<sagax> . and :: does it what must be do
<sagax> but
Inline has joined #ruby
<sagax> i don't know what better, maybe some methodology message about this
theRoUS has quit [Ping timeout: 245 seconds]
<havenwood> sagax: Use . for method calls.
<havenwood> sagax: . is better
jeremycw has joined #ruby
deathwishdave has joined #ruby
renich has quit [Ping timeout: 248 seconds]
Esa_ has joined #ruby
queip has quit [Ping timeout: 245 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
codefriar has joined #ruby
queip has joined #ruby
<sagax> thanks
Exuma has joined #ruby
dante has quit [Quit: bye]
Jonopoly has quit [Quit: WeeChat 2.4]
powerbit has joined #ruby
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
queip has quit [Ping timeout: 272 seconds]
AJA4350 has quit [Ping timeout: 248 seconds]
violentE has joined #ruby
marz_d`ghostman has joined #ruby
miskatonic has joined #ruby
queip has joined #ruby
rippa has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
Exuma has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
renich has joined #ruby
renich has quit [Remote host closed the connection]
renich has joined #ruby
Rudd0 has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
renich has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 272 seconds]
themsay has quit [Ping timeout: 248 seconds]
violentE has quit [Ping timeout: 245 seconds]
themsay has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
Rudd0 has joined #ruby
schne1der has quit [Ping timeout: 268 seconds]
lxsameer has quit [Quit: out]
bradleyprice has joined #ruby
deathwishdave has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
queip has quit [Ping timeout: 248 seconds]
apparition has quit [Quit: Bye]
SeepingN has joined #ruby
fphilipe_ has joined #ruby
queip has joined #ruby
xco has joined #ruby
agent_white has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fphilipe_ has quit [Ping timeout: 272 seconds]
gfawcett has joined #ruby
AJA4350 has joined #ruby
mtuckerbradford has joined #ruby
moei has joined #ruby
fphilipe_ has joined #ruby
jenrzzz has joined #ruby
gfawcett has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
gfawcett has joined #ruby
xco has quit [Quit: xco]
fphilipe_ has quit [Ping timeout: 252 seconds]
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
leeijaw has joined #ruby
leeijaw has left #ruby [#ruby]
fphilipe_ has joined #ruby
queip has quit [Ping timeout: 272 seconds]
linduxed has quit [Quit: WeeChat 2.4]
fphilipe_ has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
queip has joined #ruby
fphilipe_ has joined #ruby
andikr has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 252 seconds]
mtuckerbradford has quit [Quit: mtuckerbradford]
yokel has quit [Ping timeout: 245 seconds]
gfawcett has quit [Ping timeout: 245 seconds]
tdy1 has joined #ruby
yokel has joined #ruby
tdy1 is now known as tdy
duderonomy has joined #ruby
fphilipe_ has joined #ruby
bradleyprice_ has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
fphilipe_ has quit [Ping timeout: 258 seconds]
xco has joined #ruby
drale2k_ has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has joined #ruby
chalkmonster has joined #ruby
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has quit [Ping timeout: 248 seconds]
bradleyprice_ has quit [Remote host closed the connection]
bradleyprice has joined #ruby
tdy has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Changing host]
chalkmonster has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 246 seconds]
seaef has joined #ruby
fphilipe_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
dellavg_ has quit [Ping timeout: 246 seconds]
fphilipe_ has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
fphilipe_ has joined #ruby
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
fphilipe_ has quit [Ping timeout: 248 seconds]
tpanarch1st_ has joined #ruby
mochiyoda has quit [Quit: Konversation terminated!]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
fphilipe_ has joined #ruby
mochiyoda has joined #ruby
orbyt_ has joined #ruby
agent_white has quit [Quit: happyfriday]
fphilipe_ has quit [Ping timeout: 248 seconds]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
fphilipe_ has joined #ruby
sameerynho has joined #ruby
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
howdoi has joined #ruby
xco has quit [Quit: xco]
fphilipe_ has quit [Ping timeout: 248 seconds]
doodleb74 has joined #ruby
code_zombie has quit [Quit: Leaving]
joshuacronemeyer has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
jenrzzz has joined #ruby
Creatornator has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
AJA4350 has quit [Ping timeout: 248 seconds]
infernix has quit [Ping timeout: 258 seconds]
GodFather has joined #ruby
themsay has quit [Read error: Connection reset by peer]
sauvin has quit [Ping timeout: 248 seconds]
seaef has quit [Remote host closed the connection]
themsay has joined #ruby
infernix has joined #ruby
doodleb74 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
doodlebug has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goldbox has quit [Ping timeout: 244 seconds]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
patronus has quit [Quit: leaving]
patronus has joined #ruby
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
patronus has quit [Quit: leaving]
patronus has joined #ruby
gnufied has quit [Quit: Leaving]
bradleyprice has quit [Remote host closed the connection]
Creatornator has joined #ruby
bradleyprice has joined #ruby
JoeA2552 has joined #ruby
bradleyprice has quit [Ping timeout: 272 seconds]
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
bradleyprice has joined #ruby
doodleb22 has joined #ruby
doodlebug has quit [Ping timeout: 244 seconds]
<Vaevictus> anyone around that has worked with net-ssh ? i'm strugging on figuring out how to issue a series of commands... IOError - closed stream
<Vaevictus> i can issue one command, no problem, but 3 sequential commands ... i've not had luck with yet, doing it wrong i assume
<havenwood> Vaevictus: show your code?
nowhere_man has joined #ruby
<Vaevictus> sure, lemme read the topic a sec
<Vaevictus> oops, that ssh.loop shouldn't be there
iffraff has joined #ruby
<adam12> Vaevictus: You're trying to do this in serial? One command at a time?
<Vaevictus> yeah
<adam12> Vaevictus: You shouldn't need loop.
<Vaevictus> conf t, int gi1/0/22, sw acc vlan 168
<adam12> Vaevictus: At least not with the methods that block (ala exec!)
<Vaevictus> agreed
<Vaevictus> and i've gotten a lot accomplished with just using one exec! at a time
<Vaevictus> so it works
<Vaevictus> but two sequential instructions, not yet
<adam12> Really? so you can't call ssh.exec! twice in a row?
<Vaevictus> i'm ripping this code out and making a simpler app for testing this
<Vaevictus> but apparently not
<adam12> What commands are you running? Can you share?
<Vaevictus> i did
<Vaevictus> 14:47 <Vaevictus> conf t, int gi1/0/22, sw acc vlan 168
<Vaevictus> i'm configuring a cisco switch
marz_d`ghostman has quit [Ping timeout: 256 seconds]
<adam12> What happens if you do it manually with the 3 execs on their own line?
GodFather has quit [Ping timeout: 248 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Vaevictus> i'm just about there.
<adam12> I just did this exact same thing a few days ago without issue. I can't share the code because it's propietary but I call ssh.exec! 3 times in a row, near sequential. I doubt this is your use of Net::SSH.
<adam12> (near sequential because I do update a progress bar around each)
kapilp has quit [Quit: Connection closed for inactivity]
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Vaevictus> closed stream (IOError)
<adam12> Vaevictus: Out of curiosity, what is the SSH version on the router? Is it an OpenSSH release like Juniper would be?
<Vaevictus> on the 2nd exec!
<Vaevictus> uh
<Vaevictus> it's a catalyst
<Vaevictus> doesn't run unix
<adam12> Juniper just repackages FreeBSD
<Vaevictus> or openssh i'd guess
<adam12> Ah.
<adam12> I feel like these commands aren't SSH commands
<adam12> Like a shell.
<Vaevictus> it's telnet over ssh
<adam12> Sounds like it might be something interactive where you'd have better luck with Expect?
<adam12> or rather, exec! first, then expect on the IO stream provided by it.
reaVer has quit [Remote host closed the connection]
reaVer has joined #ruby
<Vaevictus> apparently in old net::ssh there was a "shell" service
<adam12> Vaevictus: Net::SSH::Telnet was a thing at one time
GodFather has joined #ruby
<adam12> Vaevictus: Can you type out those commands manually and paste their output in a gist?
Creatornator has joined #ruby
<adam12> (provided they show output)
kapilp has joined #ruby
<Vaevictus> sure
jenrzzz has joined #ruby
gfawcett has joined #ruby
CCDelivery has joined #ruby
tdy has quit [Ping timeout: 248 seconds]
GodFather has quit [Ping timeout: 245 seconds]
ua_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
gfawcett has quit [Client Quit]
<Vaevictus> i don't think any of that is sensitive :D
<Vaevictus> except my stupid ip at the bottom :D
ua has quit [Ping timeout: 244 seconds]
<Vaevictus> adam12: ^--
<adam12> *hack*
shansen has quit [Quit: ZNC 1.7.2+deb1+bionic0 - https://znc.in]
lime[_] is now known as uplime
<Vaevictus> oh noes my gibson
<adam12> I gotta run, but take a look at this. https://gist.github.com/3e9eec0d5480fcd655f2b94cc3ba1076
<Vaevictus> thanks man
<adam12> The idea being, the only command actually run as SSH is `conf t`. Once that command is run it's an interactive session and you need to feed it data.
<adam12> When data is recieved on the channel, it's compared. From your paste, it looks like maybe config and config-if are safe stages to send more data.
<Vaevictus> i wonder how the data buffers
<adam12> If that works.. then I'd look at some sort of `expect` library that works on Net::SSH.
<adam12> If this doesn't work .. perhaps look at generating a list of commands into a temporary file on the router, then sourcing them.
cliluw has quit [Read error: Connection reset by peer]
<adam12> This is just my guess.
<adam12> Good luck.
CCDelivery has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
<Vaevictus> doing this in irb only gets me a => nil
fphilipe_ has joined #ruby
<Vaevictus> anyway, i'll work along those lines
rsh has quit [Quit: Lost terminal]
shansen has joined #ruby
houhoulis has joined #ruby
kyrylo has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
houhoul__ has joined #ruby
houhoulis has quit [Ping timeout: 245 seconds]
tdy has joined #ruby
houhoulis has joined #ruby
houhoul__ has quit [Ping timeout: 248 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
<Vaevictus> guess i could pitch the net-ssh lib and just wrap an ssh client
<Vaevictus> ugh
bradleyprice has quit [Remote host closed the connection]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12> Vaevictus: Does just using ssh work?
bradleyprice has joined #ruby
<Vaevictus> just using ssh?
sameerynho has quit [Ping timeout: 272 seconds]
<Vaevictus> i saw no signs that any of my subsequent commands have ever executed
<adam12> Vaevictus: Maybe use the normal ssh client and use expect to drive it.
<Vaevictus> yeah, well, i expected to have better luck with this and probably wont' feel like it's tested enough to give to a tech in 75 minutes
<Vaevictus> even if i have success at this point
<Vaevictus> and vacation in 76 minutes :D
<Vaevictus> i'm going to attempt a pty version
kyrylo has quit [Ping timeout: 245 seconds]
dviola has joined #ruby
<adam12> Vaevictus: Enjoy your vacation.
<Vaevictus> yeah, thanks for the hel
<Vaevictus> help
bradleyprice has quit [Ping timeout: 246 seconds]
jinie has quit [Ping timeout: 248 seconds]
<Vaevictus> oh man
<Vaevictus> looks like the cisco gem actually works
<Vaevictus> cisco-0.0.1 lol
bradleyprice has joined #ruby
<Vaevictus> well, i haven't really tested it yet
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
thebetrayer has joined #ruby
dar123 has joined #ruby
AJA4350 has joined #ruby
jenrzzz has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
doodleb22 has quit [Read error: Connection reset by peer]
<Vaevictus> dang, i'm getting different results from irb as i do from running it in the script
Creatornator has joined #ruby
<Vaevictus> actually, no, it's working
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
jenrzzz has quit [Ping timeout: 248 seconds]
JoeA2552 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 268 seconds]
joshuacronemeyer has joined #ruby
queip has quit [Ping timeout: 245 seconds]
doodlebug has joined #ruby
doodlebug has quit [Excess Flood]
<Vaevictus> adam12: i don't know what this ciscolib is doing differently, but it appears to work
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
queip has joined #ruby
doodlebug has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.4]
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
fphilipe_ has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miskatonic has joined #ruby
cschneid has joined #ruby
jinie has joined #ruby
jinie has quit [Client Quit]
jeremycw has quit [Ping timeout: 244 seconds]
miskatonic has quit [Remote host closed the connection]
joshuacronemeyer has joined #ruby
tpanarch1st_ has quit [Quit: Thanks for your help, nice to see you, take care.]
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
fphilipe_ has quit [Ping timeout: 248 seconds]
jinie has joined #ruby
orbyt_ has quit [Read error: Connection reset by peer]
thebetrayer has quit [Ping timeout: 248 seconds]
zapata has quit [Ping timeout: 258 seconds]
greypack has quit [Read error: Connection reset by peer]
greypack has joined #ruby
dviola has quit [Quit: WeeChat 2.5]
orbyt_ has joined #ruby
gb_away has quit [Ping timeout: 245 seconds]
LtHummus has quit [Quit: ZNC 1.7.3 - https://znc.in]
bradleyprice_ has joined #ruby
Swyper has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 258 seconds]
bradleyprice_ has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
Swyper has quit [Remote host closed the connection]
LtHummus has joined #ruby
joshuacronemeyer has joined #ruby
thebetrayer has joined #ruby
schne1der has quit [Ping timeout: 248 seconds]
patronus has quit [Quit: leaving]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
houhoulis has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
Exagone313 has quit [Quit: see ya!]
Exagone313 has joined #ruby
greypack has quit [Read error: Connection reset by peer]
greypack has joined #ruby
joshuacronemeyer has joined #ruby
greypack has quit [Read error: Connection reset by peer]
jacobnollette_ has joined #ruby
tdy has quit [Ping timeout: 248 seconds]
jacobnollette_ has quit [Read error: Connection reset by peer]
brool has joined #ruby
greypack has joined #ruby
<adam12> Vaevictus: I pulled the source and it's similar to what I pasted you earlier.. in some ways.
brool has quit [Read error: Connection reset by peer]
dviola has joined #ruby
Xiti` is now known as Xiti
fphilipe_ has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Xiti]
joshuacronemeyer has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Xiti has joined #ruby
nowhere_man has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
queip has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
teclator_home has quit [Ping timeout: 245 seconds]
teclator_ has joined #ruby
queip has joined #ruby