havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
naztharune has quit [Read error: No route to host]
JammyHammy has quit [Read error: Connection reset by peer]
Porfa has quit [Quit: Porfa]
senayar has quit [Ping timeout: 240 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
jamesaxl|2 has quit [Read error: Connection reset by peer]
michaeldeol has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
Motoservo has quit [Read error: No route to host]
diegoviola has quit [Ping timeout: 268 seconds]
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Motoservo has joined #ruby
EllisTAA has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
duderonomy has quit [Ping timeout: 240 seconds]
clebrun has quit [Quit: leaving]
chopin_ has quit [Ping timeout: 252 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
acke has joined #ruby
tier has joined #ruby
vF3hNGxc47h8 has quit [Read error: Connection reset by peer]
serialaxel has joined #ruby
shmilan has joined #ruby
barhum2013 has quit [Ping timeout: 268 seconds]
barhum2013 has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
bryanray has joined #ruby
pygospa has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
acke has quit [Ping timeout: 240 seconds]
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saddad has joined #ruby
joneshf-laptop has quit [Remote host closed the connection]
stannard has joined #ruby
umgrosscol has quit [Quit: End of Line]
davedev24 has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
cdg has quit [Remote host closed the connection]
root has joined #ruby
root has quit [Client Quit]
cdg has joined #ruby
gambl0re has quit [Ping timeout: 260 seconds]
pcfreak30 has quit [Remote host closed the connection]
bmurt has joined #ruby
kayloos has joined #ruby
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
stannard has quit [Ping timeout: 256 seconds]
Yzguy has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 240 seconds]
kalusn has quit [Ping timeout: 264 seconds]
Guest123456666 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjone_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
riotjon__ has joined #ruby
pygospa has joined #ruby
serialaxel has quit [Quit: Palaver]
spider-mario has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
nateberkopec has quit [Quit: Leaving...]
Guest123456666 has joined #ruby
axl_ has joined #ruby
serialaxel has joined #ruby
chrisja has quit [Quit: leaving]
eminencehc has quit [Remote host closed the connection]
riotjon__ has quit [Ping timeout: 255 seconds]
djbkd has quit [Remote host closed the connection]
eminencehc has joined #ruby
jamto11 has joined #ruby
serialaxel has quit [Client Quit]
Sceko has joined #ruby
serialaxel has joined #ruby
momomomomo has quit [Quit: momomomomo]
djbkd has joined #ruby
serialaxel has quit [Client Quit]
serialaxel has joined #ruby
freerobby has joined #ruby
marr has quit []
mase-chatter has quit [Quit: Leaving]
jamto11 has quit [Ping timeout: 268 seconds]
zenguy_pc has quit [Ping timeout: 256 seconds]
serialaxel has quit [Client Quit]
Pupeno_ has joined #ruby
baweaver has quit [Remote host closed the connection]
spuk has joined #ruby
serialaxel has joined #ruby
serialaxel has quit [Client Quit]
djbkd has quit [Ping timeout: 252 seconds]
Pupeno has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
icarus has quit [Ping timeout: 272 seconds]
willardg has joined #ruby
haraoka has joined #ruby
kristian_ has quit [Quit: Leaving]
workmad3 has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
EllisTAA has quit [Quit: EllisTAA]
barhum2013 has quit [Quit: barhum2013]
Igorshp has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
barhum2013 has joined #ruby
Palaver has joined #ruby
willardg has quit [Client Quit]
northfurr has joined #ruby
nateberkopec has joined #ruby
freerobby has joined #ruby
Cyther has quit [Read error: Connection reset by peer]
nateberkopec has quit [Client Quit]
freerobby has quit [Client Quit]
Palaver has quit [Remote host closed the connection]
willardg has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
Sceko has quit [Quit: www.oklop.me]
f3lp has joined #ruby
spicymagpie has joined #ruby
zenguy_pc has joined #ruby
bruno- has joined #ruby
shakes has joined #ruby
barhum2013 has quit [Quit: barhum2013]
Palaver has joined #ruby
kyle__ has quit [Ping timeout: 260 seconds]
Palaver has quit [Client Quit]
senayar has joined #ruby
serialaxel has joined #ruby
goldfish6744 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Organize your IRC]
craysiii has quit [Remote host closed the connection]
<diegoviola> how do I know if a number in a array is a power of 2?
kyle__ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Guest123456666 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
<diegoviola> #even?
serialaxel has quit [Client Quit]
<banister> diegoviola Math.log2(4) == Math.log2(4).to_int
serialaxel has joined #ruby
mloy has joined #ruby
senayar has quit [Ping timeout: 265 seconds]
<banister> diegoviola no, 6 is even but is nto a power of 2 :)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
serialaxel has quit [Client Quit]
serialaxel has joined #ruby
<diegoviola> ok
Spami has joined #ruby
serialaxel has quit [Client Quit]
serialaxel has joined #ruby
senayar has joined #ruby
serialaxel has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> >> (2..300).select { |x| x & (x - 1) < 1 } # diegoviola
<ruboto> Ox0dea # => [2, 4, 8, 16, 32, 64, 128, 256] (https://eval.in/450115)
<Ox0dea> But probably don't.
cwong_on_irc has quit [Quit: Leaving.]
<Ox0dea> `Math.log2(x) % 1 == 0` is much clearer.
martin_work has quit [Ping timeout: 265 seconds]
<diegoviola> thanks
hooper has quit [Quit: Leaving.]
stamina has quit [Ping timeout: 252 seconds]
<Ox0dea> banister: Do you know if it's possible to invoke a singleton class's instance methods without dropping to C?
<banister> Ox0dea huh? they should be invoked by default
<banister> the hard part is invoking anything BUT singleton methods
<Ox0dea> You misread.
<banister> explain bb
serialaxel has joined #ruby
<banister> example
serialaxel has quit [Client Quit]
dopamean_ has joined #ruby
serialaxel has joined #ruby
<Ox0dea> banister: https://eval.in/450116
<banister> Ox0dea that's not a realistic context, you're note even assigning Class.new to anything
<banister> give an honest example
<banister> cos i can't imagine this being an issue in real life
<Ox0dea> It's just a curiosity.
<Ox0dea> I immediately rethought the thing I thought I wanted this for.
unreal_ has joined #ruby
Yzguy has quit [Ping timeout: 240 seconds]
unreal has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
stardiviner has joined #ruby
freerobby has joined #ruby
maletor has joined #ruby
serialaxel has quit [Remote host closed the connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
XxionxX has quit [Quit: Leaving.]
jessemcgilallen has joined #ruby
jessemcgilallen has quit [Client Quit]
bruce_lee2 has joined #ruby
Psychesworld has joined #ruby
towski_ has quit [Remote host closed the connection]
devoldmx has joined #ruby
Psychesworld has quit [Quit: Leaving]
riotjone_ has joined #ruby
bruce_lee has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Psychesworld has joined #ruby
Psychesworld has quit [Max SendQ exceeded]
<eam> >> lass << Class.new; def foo; "invoked"; end; end; ObjectSpace.each_object(Class).select {|c| c.respond_to? :foo}.map { |c| c.send :foo }
<ruboto> eam # => /tmp/execpad-ced249f786d8/source-ced249f786d8:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/450118)
<eam> >> Class << Class.new; def foo; "invoked"; end; end; ObjectSpace.each_object(Class).select {|c| c.respond_to? :foo}.map { |c| c.send :foo }
<ruboto> eam # => /tmp/execpad-9dee561db904/source-9dee561db904:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/450119)
<eam> ugh, maybe I shouldn't have downed that pitcher
martin_work has joined #ruby
<eam> >> class << Class.new; def foo; "invoked"; end; end; ObjectSpace.each_object(Class).select {|c| c.respond_to? :foo}.map { |c| c.send :foo }
<ruboto> eam # => ["invoked"] (https://eval.in/450120)
<eam> Ox0dea: ^^
pocketprotector- has joined #ruby
swgillespie has joined #ruby
<Ox0dea> eam: I have bad news.
mdih has quit [Ping timeout: 268 seconds]
riotjone_ has quit [Ping timeout: 264 seconds]
diegoaguilar has joined #ruby
<Ox0dea> I'm not entirely sure what's going on just yet, but your one doesn't invoke an instance method on a singleton class.
pdoherty has joined #ruby
<diegoviola> is there something like %w() but that will give me numbers instead of string
<diegoviola> so I can pass an array of numbers
<Ox0dea> diegoviola: Alas, not yet.
<diegoviola> sigh ok
<Ox0dea> I've been meaning to add it. :<
moeabdol has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
<diegoviola> np
diegoaguilar has quit [Quit: Leaving]
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
northfurr has quit [Quit: northfurr]
Asher has quit [Quit: Leaving.]
joufflu has joined #ruby
tkuchiki has joined #ruby
greedo has quit [Ping timeout: 264 seconds]
greedo has joined #ruby
f3lp has quit [Ping timeout: 260 seconds]
Motoservo has quit [Quit: Over & out.]
oetjenj has quit [Ping timeout: 244 seconds]
moeabdol has quit [Quit: WeeChat 1.3]
workmad3 has joined #ruby
oetjenj has joined #ruby
iamjarvo_ has joined #ruby
eminencehc has quit [Remote host closed the connection]
senayar has quit []
workmad3 has quit [Ping timeout: 264 seconds]
jaygen has quit [Read error: Connection reset by peer]
unreal_ has quit [Ping timeout: 240 seconds]
Ox0dea has quit [Read error: Connection reset by peer]
gregoriokusowski has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
jaygen has joined #ruby
beauby has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Remote host closed the connection]
Ox0dea has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
acke has joined #ruby
renderfu_ has joined #ruby
moeabdol has joined #ruby
oliver_ has joined #ruby
jzigmund has quit [Read error: Connection reset by peer]
krz has joined #ruby
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby
maikowblue has quit [Quit: .]
wallerdev has quit [Client Quit]
kayloos has quit [Remote host closed the connection]
acke has quit [Ping timeout: 256 seconds]
renderfu_ has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
dravine_ has joined #ruby
dravine has quit [Ping timeout: 264 seconds]
dravine_ is now known as dravine
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalusn has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
bmurt has joined #ruby
Moblin has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
Feyn has joined #ruby
arthurnn has joined #ruby
amclain has quit [Quit: Leaving]
Musashi007 has joined #ruby
baweaver has joined #ruby
Musashi007 has quit [Client Quit]
unreal has joined #ruby
Ebok has quit [Ping timeout: 240 seconds]
ksteck has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EasyCo has joined #ruby
Musashi007 has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdih has joined #ruby
RobertBirnie has joined #ruby
martin_work has quit [Ping timeout: 256 seconds]
rushed has quit [Quit: rushed]
Asher has joined #ruby
beast has joined #ruby
kalusn has quit [Remote host closed the connection]
NeverDie has joined #ruby
stardiviner has quit [Ping timeout: 264 seconds]
arescorpio has joined #ruby
bryanray has joined #ruby
jdawgaz has joined #ruby
stardiviner has joined #ruby
Musashi007 has quit [Quit: Musashi007]
l_tonz has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee has joined #ruby
bruce_lee2 is now known as bruce_lee
phutchins has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
bl0ndie has joined #ruby
rushed has joined #ruby
riotjones has joined #ruby
cdg has joined #ruby
devoldmx has joined #ruby
cdg has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
htmldrum has joined #ruby
axl_ has quit [Quit: axl_]
riotjones has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
arup_r has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bb010g has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
zenguy_pc has quit [Ping timeout: 264 seconds]
stevednd has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
rushed has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<diegoviola> let's say I have two arrays, like [1,2,3] and [2,3], how can I find if there's a sequence between the two?
workmad3 has joined #ruby
sanjayu has quit [Ping timeout: 246 seconds]
molay has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`tim` has joined #ruby
<molay> hi all
gregoriokusowski has quit [Quit: gregoriokusowski]
PhantomS_ has joined #ruby
tmtwd has joined #ruby
Rutix has quit [Remote host closed the connection]
<Radar> diegoviola: Sequence? Same elements occurring in the same order?
tmtwd has quit [Client Quit]
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
willardg has joined #ruby
yfeldblum has joined #ruby
<diegoviola> err, I mean, I'm trying to find a missing number in an array, or lowest common denominator
Ox0dea has joined #ruby
PhantomSpank has quit [Ping timeout: 264 seconds]
<diegoviola> I think I found a way
zenguy_pc has joined #ruby
icarus has joined #ruby
bl0ndie has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
bryanray has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 255 seconds]
l_tonz has quit [Remote host closed the connection]
gregf has quit [Ping timeout: 265 seconds]
gener1c_ has quit [Ping timeout: 260 seconds]
amystephen has quit [Quit: amystephen]
<diegoviola> array = [1,4,3]; a = (1..4).to_a; a - array #=> [2]
braincrash has quit [Quit: bye bye]
<diegoviola> it's stupid but it does what I need
gener1c has joined #ruby
djbkd has quit [Quit: My people need me...]
gix has quit [Ping timeout: 255 seconds]
braincrash has joined #ruby
ICantCook has joined #ruby
icarus has quit [Ping timeout: 264 seconds]
gambl0re has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
hinbody has joined #ruby
gix has joined #ruby
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
willardg has quit [Read error: Connection reset by peer]
gdoteof has joined #ruby
Musashi007 has joined #ruby
<gdoteof> i am trying to install the gem airplay, it has some dependency contradictions.. i am not sure if it's because of stuff i've done in ruby from some time ago
<Ox0dea> >> a = [6,4,1,5]; b = [3,5,6,2]; (a + b).uniq.sort == [*1..6] # diegoviola
<ruboto> Ox0dea # => true (https://eval.in/450138)
<Ox0dea> I can't say for certain, but I think that's more in line with what you're after?
<gdoteof> i'm happy to blow things out
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
spicymagpie has quit [Quit: leaving]
<Radar> gdoteof: It's not anything you're doing. the airplayer gem has an incompatible dependency specified for the reel gem
<Radar> gdoteof: airplayer requires EXACTLY 0.4.0, but airplay depends on reel ~> 0.5.0, which means any version from the 0.5.x series.
<Radar> Looks like the airplayer gem needs to be updated.
<diegoviola> Ox0dea: no, I want to return an integer, the missing number from the array in a sequence
<Radar> gdoteof: You could probably fork it from here https://github.com/Tomohiro/airplayer and then change the version yourself in the .gemspec
<Ox0dea> diegoviola: Ah, there will always be exactly one missing number, then?
<diegoviola> yes
toretore has quit [Quit: This computer has gone to sleep]
<gdoteof> Radar: i could probably just force an install version too somehow right? or just run it from the repo itself rather than as a gem?
<gdoteof> i'm not very familiar with the ruby world
michaeldeol has joined #ruby
dorei has quit []
davedev2_ has joined #ruby
<gdoteof> oh.. i was told to update to ruby 2.. i did that but i'm still getting the old install. that could be my problem
ramfjord_ has quit [Ping timeout: 250 seconds]
<Radar> gdoteof: If the dependencies don't match, you're going to have a hard time installing that gem.
davedev24 has quit [Ping timeout: 244 seconds]
<Radar> gdoteof: As I said before: It's not anything you're doing.
<Radar> (yet) :)
<gdoteof> so i did this: sudo apt-add-repository ppa:brightbox/ruby-ng
<gdoteof> and installed ruby2.0-dev
<gdoteof> which went through.. on my ubuntu machine
<gdoteof> but ruby -v is still 1.8.7 though i also have 1.9.1 in my /usr/bin but i can't seem to find 2.x
stannard has joined #ruby
ruby-lang844 has joined #ruby
<ruby-lang844> Y
<gdoteof> havenwood: sweet
<gdoteof> except it only lists 1.8 and 1.9 :(
sankaber has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
willardg has joined #ruby
<gdoteof> 4067614387597213696
sankaber has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
ruby-lang844 has quit [Ping timeout: 246 seconds]
<gdoteof> how do i ruby 2.x :(
<havenwood> gdoteof: sudo apt-get install ruby2.0
Thomas-0725 has joined #ruby
<havenwood> gdoteof: but do use Ruby 2.2
Eiam_ has joined #ruby
gregf has joined #ruby
<Ox0dea> gdoteof: Do you want to have more than one version of Ruby available on your system?
<havenwood> gdoteof: sudo apt-get install -y ruby2.2 ruby2.2-dev
<gdoteof> havenwood: >.< that's embarassing i just did the -dev
<gdoteof> seems to be fine now
<gdoteof> Ox0dea: i don't actually care about my ruby environment, just trying to run this one gem
<Ox0dea> Oh, right.
darkf has joined #ruby
rushed has quit [Quit: rushed]
bryanray has joined #ruby
<gdoteof> havenwood: Ox0dea Radar thanks.. updating to ruby2 made everything work
<gdoteof> well.. it installed
<gdoteof> if it will actually push to this appletv or not will remain to be seen =D
psy_ has quit [Ping timeout: 260 seconds]
riotjones has joined #ruby
scripore has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
devoldmx has joined #ruby
haraoka has quit [Ping timeout: 264 seconds]
<gdoteof> it works! but for mp4 not my avi file :(
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user1138__ has quit [Ping timeout: 246 seconds]
<Ox0dea> ffmpeg to the rescue!
riotjones has quit [Ping timeout: 264 seconds]
rushed has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
avahey has joined #ruby
rushed has quit [Client Quit]
pygospa has quit [Ping timeout: 240 seconds]
pygospa has joined #ruby
maletor has joined #ruby
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
l_tonz has quit [Remote host closed the connection]
Bellthoven has quit []
devoldmx has quit [Ping timeout: 264 seconds]
<gdoteof> hmm faster to to convert to mp4 or find a version already in mp4
favadi has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gdoteof> anyway thanks for the help guys
diegoaguilar has joined #ruby
gdoteof has quit [Quit: leaving]
joneshf-laptop has joined #ruby
workmad3 has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rushed has joined #ruby
`tim` has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
l_tonz has joined #ruby
rushed has quit [Client Quit]
hahuang65 has joined #ruby
hahuang6_ has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
hahuang6_ has quit [Client Quit]
renderfu_ has joined #ruby
acke has joined #ruby
maletor has quit [Ping timeout: 272 seconds]
Melpaws has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Remote host closed the connection]
renderfu_ has quit [Ping timeout: 250 seconds]
acke has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
freerobby has quit [Quit: Leaving.]
govg has joined #ruby
mistermocha has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maletor has joined #ruby
tmtwd has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
Moblin has quit [Read error: Connection reset by peer]
Brando753 has quit [Ping timeout: 240 seconds]
tmtwd has left #ruby [#ruby]
mistermocha has quit [Ping timeout: 264 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
benlieb has joined #ruby
snick007 has joined #ruby
tmtwd has joined #ruby
stardiviner has quit [Ping timeout: 265 seconds]
jun__ has joined #ruby
WizJin has joined #ruby
peteykun has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has joined #ruby
RobertBirnie has joined #ruby
stardiviner has joined #ruby
tmtwd has quit [Quit: Leaving]
WizJin has quit [Excess Flood]
anisha has joined #ruby
simplyianm has joined #ruby
saddad has quit [Quit: WeeChat 1.4-dev]
pdoherty has quit [Ping timeout: 240 seconds]
moeabdol has quit [Quit: WeeChat 1.3]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
devoldmx has joined #ruby
WizJin has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
Asher has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
moeabdol has quit [Client Quit]
icarus has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gaboesquivel has joined #ruby
psy_ has joined #ruby
moeabdol has joined #ruby
anisha has quit [Quit: Leaving]
psy_ has quit [Max SendQ exceeded]
mistermocha has joined #ruby
t0code has quit []
psy_ has joined #ruby
bl0ndie has joined #ruby
arescorpio has quit [Quit: Leaving.]
zenguy_pc has quit [Ping timeout: 260 seconds]
rushed has joined #ruby
djbkd has joined #ruby
icarus has quit [Quit: Lost terminal]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 256 seconds]
arup_r has quit [Quit: Leaving]
rushed has quit [Client Quit]
spuk has quit [Ping timeout: 272 seconds]
simplyianm has quit [Remote host closed the connection]
rushed has joined #ruby
user083 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
bl0ndie has quit [Ping timeout: 272 seconds]
baroquebobcat_ has joined #ruby
simplyianm has joined #ruby
baroquebobcat_ has quit [Client Quit]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
SammoSideKick has joined #ruby
SammoSideKick has left #ruby ["Leaving"]
rushed has quit [Client Quit]
workmad3 has joined #ruby
Asher has joined #ruby
ponga has joined #ruby
keen__________13 has joined #ruby
keen__________12 has quit [Ping timeout: 240 seconds]
Gaspar_ has joined #ruby
rushed has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
zenguy_pc has joined #ruby
eminencehc has joined #ruby
rushed has quit [Client Quit]
rushed has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
rushed has quit [Client Quit]
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
freezevee has joined #ruby
postmodern has quit [Quit: Leaving]
bruno- has joined #ruby
RobertBirnie has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
andersoldahl has joined #ruby
axisys_ has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 265 seconds]
chrissonar has joined #ruby
djbkd has quit [Quit: My people need me...]
gaboesquivel has quit [Remote host closed the connection]
chrissonar has quit [Client Quit]
chrissonar has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
krz has quit [Ping timeout: 264 seconds]
rushed has joined #ruby
rushed has quit [Client Quit]
eminencehc has quit [Remote host closed the connection]
rushed has joined #ruby
beast has quit [Quit: Leaving]
gaboesquivel has joined #ruby
dhjondoh has joined #ruby
Eiam_ has quit [Ping timeout: 272 seconds]
Oog has joined #ruby
l_tonz has quit [Remote host closed the connection]
jun__ has quit [Read error: Connection reset by peer]
BustyLoliChan has joined #ruby
chipotle has joined #ruby
opensource_ninja has joined #ruby
jun__ has joined #ruby
<BustyLoliChan> I want to get jekyll working
gaboesquivel has quit [Ping timeout: 240 seconds]
<BustyLoliChan> I currently have a Slackware vm that I would like to install ruby onto
simplyianm has quit [Remote host closed the connection]
<BustyLoliChan> I've trying to look up how to install ruby and rails and I came across a blog post that's trying to promote rvm
<Radar> BustyLoliChan: Change the name, thanks.
eminencehc has joined #ruby
techsethi has joined #ruby
<Radar> p.s. hi again
<BustyLoliChan> noto disu shito again
<Ox0dea> A buzzword troll?
weemsledeux has joined #ruby
jun__ has quit [Read error: Connection reset by peer]
<Radar> *shrug*
freezevee has quit [Ping timeout: 256 seconds]
htmldrum has joined #ruby
<Radar> I await the torrent of PM abuse with eagerness
simplyianm has joined #ruby
jun__ has joined #ruby
DoubleMalt has joined #ruby
riotjones has joined #ruby
Eiam_ has joined #ruby
devbug has joined #ruby
riotjones has quit [Read error: Connection reset by peer]
andersoldahl has quit [Quit: Goodbye everyone.]
riotjones has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has quit [Ping timeout: 250 seconds]
iateadonut has joined #ruby
UtkarshRay has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
astrobunny has joined #ruby
blueOxigen has joined #ruby
tagrudev has joined #ruby
_blizzy_ has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
bluOxigen has quit [Ping timeout: 264 seconds]
v4n has joined #ruby
oldrobot has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oldrobot has left #ruby ["Textual IRC Client: www.textualapp.com"]
sanguisdex has left #ruby [#ruby]
krz has joined #ruby
skade has joined #ruby
user1138 has joined #ruby
axisys has joined #ruby
nekomimimaid has joined #ruby
phutchins has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
mdih has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Quit: dhjondoh]
_blizzy_ has joined #ruby
sanjayu has joined #ruby
Psychesworld has joined #ruby
Psychesworld has quit [Max SendQ exceeded]
User458764 has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Client Quit]
cgrieger^away has quit [Quit: -)(- If you can't see the fnords, they can't eat you.]
dhjondoh has joined #ruby
govg has quit [Ping timeout: 252 seconds]
simplyianm has quit [Remote host closed the connection]
lxsameer has joined #ruby
lxsameer has joined #ruby
workmad3 has joined #ruby
michael_mbp has quit [Excess Flood]
stardiviner has quit [Ping timeout: 246 seconds]
helpa has quit [Remote host closed the connection]
Radar has quit [Quit: ZNC - http://znc.in]
avahey has quit [Quit: Connection closed for inactivity]
codecop has joined #ruby
dikaio has joined #ruby
helpa has joined #ruby
michael_mbp has joined #ruby
favadi has joined #ruby
l_tonz has joined #ruby
<Oog> what is wrong with return if self.name.present? then self.name else self.location_name end
workmad3 has quit [Ping timeout: 264 seconds]
<Oog> replacing then with ; fixes it but i dont understand why
opensource_ninja has quit [Quit: opensource_ninja]
stardiviner has joined #ruby
mdih has joined #ruby
<Ox0dea> Oog: You've got that all on one line, then?
mdih has quit [Max SendQ exceeded]
mdih has joined #ruby
Helius has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
bl0ndie has joined #ruby
<Oog> yes
nekomimimaid is now known as bustynekomimimai
TheRinger has joined #ruby
<Ox0dea> You might consider using the ternary operator for such cases.
<certainty> moin ladies, gentlemen and all other fine hackers
<Oog> Ox0dea yeah i know about that. was just curious about this
<Oog> reading online this this should work
CloCkWeRX has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
<Ox0dea> Oog: Your source is mistaken.
<Ox0dea> That's Python syntax, not Ruby.
bustynekomimimai is now known as nekomimimaid
<Oog> ha
<Oog> so is there no then keyword in ruby?
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<certainty> >> if true then "yo" else "no"
<ruboto> certainty # => /tmp/execpad-bd43b40af718/source-bd43b40af718:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/450187)
riotjones has joined #ruby
<Ox0dea> Oog: There is, but its effectively useless.
<Ox0dea> *it's
<certainty> woops
<certainty> >> if true then "yo" else "no" end
<ruboto> certainty # => "yo" (https://eval.in/450189)
<Oog> certainty yeah i was just going to do that it seems to work there but why not with my example...
<certainty> Oog: what's the actual error you get?
<Oog> its the return... return (if self.name.present? then self.name else self.location_name end) works
<certainty> depends on where that line appears :D
<Ox0dea> Oog: You... want to write it like that?
<Oog> syntax error, unexpected keyword_then, expecting keyword_end ...turn if self.name.present? then self.name else self.location... ... ^ user_address.rb:143: syntax error, unexpected keyword_end, expecting end-of-input
<Oog> i changed it to ternary return self.name.present? ? self.name : self.location_name since im more used to that .i was sort of just curious
<certainty> self.name.present? && self.name || self.location
* certainty trolls
<Oog> certainty lol not doing that. i thought if then else end was mroe clear than ternary which is why i was doing it
<Ox0dea> In general, programmers are much less symbol-averse than the average reader.
<Ox0dea> It's okay for code to look like code.
<certainty> :D
<certainty> so cobol was a bad idea?
<Ox0dea> I'd have to say the same of LOLCODE, and I won't.
<certainty> :)
<certainty> but back to all seriousness. I don't think if .. then .. else .. end is too bad
lkba has quit [Remote host closed the connection]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
shoutsid06 has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
<certainty> doesn't convince me. I think the ternary operator is ugly
<certainty> i still use it
yeshacker has joined #ruby
diegoaguilar has joined #ruby
davedev24 has joined #ruby
Psychesworld has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Read error: Connection reset by peer]
ruurd has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
diegoaguilar has joined #ruby
Spami has joined #ruby
CloCkWeRX has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
molay has quit [Quit: Leaving]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
pocketprotector- has quit [Ping timeout: 268 seconds]
yardenbar has joined #ruby
nekomimimaid has quit [Disconnected by services]
diegoaguilar has quit [Remote host closed the connection]
CloCkWeRX has quit [Read error: Connection reset by peer]
CloCkWeRX1 has joined #ruby
nekomimimaid has joined #ruby
ruurd has joined #ruby
ruurd has quit [Client Quit]
Pupp3tm4st3r has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
tkuchiki has quit [Quit: Leaving...]
Pupp3tm4st3r has joined #ruby
tkuchiki has joined #ruby
firstdayonthejob has joined #ruby
shoutsid has joined #ruby
jun__ has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 252 seconds]
bl0ndie has quit [Ping timeout: 272 seconds]
bl0ndie has joined #ruby
troulouliou_div2 has joined #ruby
Radar has joined #ruby
RobertBirnie has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby
eGGsha has joined #ruby
Thomas-0725 has joined #ruby
cwong_on_irc has quit [Read error: No route to host]
acke has joined #ruby
eminencehc has quit [Remote host closed the connection]
davedev24 has quit [Remote host closed the connection]
eminencehc has joined #ruby
bigkevmcd has joined #ruby
shmoon_ has joined #ruby
freezevee has joined #ruby
andikr has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
devoldmx has quit [Remote host closed the connection]
benlieb has joined #ruby
eminencehc has quit [Ping timeout: 264 seconds]
jas02 has joined #ruby
riotjones has quit [Quit: Leaving...]
tkuchiki has quit [Remote host closed the connection]
favadi has joined #ruby
cwong_on_irc has joined #ruby
mdih has quit [Ping timeout: 240 seconds]
moeabdol has quit [Quit: WeeChat 1.3]
datanoise has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
BSaboia has joined #ruby
Macaveli has joined #ruby
solars has joined #ruby
tkuchiki has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
zenguy_pc has joined #ruby
beast has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stan has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
subscope has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
weemsledeux has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> yeah it's not pretty especially when you have methods that end with '?'
<shevy> this is weird - when Ox0dea is on lately, [k- is not
ruurd has joined #ruby
<baweaver> but baweaver is
<baweaver> conspiracy?
<baweaver> I think so.
atmosx has joined #ruby
<shevy> lol
<shevy> yeah
<shevy> a dam conspiracy tis is
ndrei has joined #ruby
bruno- has joined #ruby
roshanavand has joined #ruby
Kovensky has left #ruby ["Textual IRC Client: www.textualapp.com"]
mdih has joined #ruby
shoutsid has quit [Remote host closed the connection]
<certainty> i wonder why so many talks/papers oppose Haskell with "real world needs". As if that was a contradiction
kwd has joined #ruby
<shevy> yeah
<shevy> for real world needs one can just use ruby
<certainty> -.-
* shevy copies certainty from above
bruno- has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 264 seconds]
kimegede has joined #ruby
kwd has quit [Client Quit]
<certainty> that's stupid. That's if I said that ruby is good for webapps but for all other apps we need to consider a different language.
ruurd has quit [Quit: ZZZzzz…]
<certainty> or better yet, ruby is good for embedded DSLs but for all else you need to consider a different language
nekomimimaid has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
<awk> Hi, please can someone assist... https://gist.github.com/anonymous/5dc3dd5221060733169b on line 4, I have a VALUE that I must increment I have tried a few different ways, but what I wan't is for ID to be incremented everytime I run this function .. ID is currently set to "0.succ"
Oog has quit []
BSaboia has quit [Ping timeout: 255 seconds]
<TomyWork> awk that doesnt look valid
<TomyWork> dont you mean #{0.succ}?
<baweaver> also prone to SQL injection
<TomyWork> also, .... yeah that
kalusn has joined #ruby
<awk> not worried about SQL injection, this a basic script I run once off to do some data manipulation
<awk> TomyWork: let me try
psy_ has quit [Read error: Connection reset by peer]
<TomyWork> sqlValues = '1); DROP TABLE users'
<baweaver> that might help for later.
benlieb has quit [Quit: benlieb]
Sam_Gerber has quit [Quit: Leaving]
<awk> TomyWork: well now all fields are set to 1
<shevy> certainty ruby is just good for everything except when speed really matters!
<TomyWork> awk and your users table is gone. oops
<bougyman> DB[ParseTableName(csvFile).to_sym].insert(safe_from_sql_injection_stuff_goes_here)
<certainty> little bobby tables
<bougyman> wrt sequel.
ramfjord has joined #ruby
<awk> TomyWork: nobody is going to use this, it isnt public its for some data manipulation im doing.. the database is going to be blank too
<shevy> I like booby tables
[k- has joined #ruby
<awk> just trying to increment that ID
terlar has joined #ruby
ndrei has joined #ruby
mdih has quit [Ping timeout: 240 seconds]
<TomyWork> I'm writing an .erb with quite a bit of code in it. In order to make the erb's ruby code distinguishable from the code around it (which is also ruby due to it being a Vagrantfile), i'm putting <% ... -%> around every line of it instead of only where it's required. Good idea or bad idea?
<bougyman> that's a personal call.
<bougyman> there's no technical argument either way. if it looks good to you, no worries.
nfk|laptop has joined #ruby
shoutsid has joined #ruby
<TomyWork> the plan is that other people can read it well :)
mark3 has joined #ruby
firstdayonthejob has quit [Ping timeout: 244 seconds]
<TomyWork> "firstdayonthejob has quit (Ping timeout: 244 seconds)" :D
<shevy> in general I found erb code very ugly, similar spaghetti code to php atrocities
<TomyWork> shevy well it's a template, you have to compromise
adac has joined #ruby
<certainty> shevy: nah
subscope has quit [Quit: Leaving]
ruurd has joined #ruby
<certainty> shevy: the same is true for haskell, so why the distinction
<certainty> anyway, that just struck me as odd. Nevermind
wpp has joined #ruby
<shevy> haskell is a very academic language
<shevy> :)
Pupp3tm4_ has joined #ruby
<certainty> i'd say every PL is somewhat academic
<certainty> maybe except basic
joonty has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
chipotle has quit [Ping timeout: 250 seconds]
<TomyWork> that must be how it found its way into oracle databases, next to sql :P
Voker57 has joined #ruby
<TomyWork> oh you didnt mean plsql
ndrei has quit [Ping timeout: 250 seconds]
<certainty> nope :)
XxionxX has joined #ruby
stirc has joined #ruby
Musashi007 has joined #ruby
lenwood has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
rgtk_ has joined #ruby
chipotle has quit [Max SendQ exceeded]
rgtk has quit [Ping timeout: 264 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
devbug has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
Oog has joined #ruby
mdih has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 240 seconds]
<[k-> how dare you!
<[k-> Ox0dea!
<shevy> speak of the devil
minimalism has joined #ruby
<shevy> <shevy> this is weird - when Ox0dea is on lately, [k- is not
Pupeno_ has quit [Remote host closed the connection]
snick007 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
MeMoc has quit [Quit: Connection closed for inactivity]
step1step2_ has joined #ruby
c0m0 has joined #ruby
<[k-> i has skool
krz has quit [Ping timeout: 246 seconds]
l_tonz has quit [Remote host closed the connection]
roshanavand has joined #ruby
datanoise has joined #ruby
Asher has quit [Quit: Leaving.]
Macaveli has joined #ruby
step1step2 has quit [Ping timeout: 246 seconds]
Macaveli has quit [Client Quit]
Pupeno has joined #ruby
KnownSyntax_ has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
rgtk_ has quit [Remote host closed the connection]
rgtk has joined #ruby
Macaveli has quit [Remote host closed the connection]
freggles has joined #ruby
KnownSyntax has quit [Ping timeout: 246 seconds]
pocketprotector has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
scripore has quit [Client Quit]
krz has joined #ruby
workmad3 has joined #ruby
platzhirsch has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
WizJin has quit [Excess Flood]
Pupeno has joined #ruby
lubarch has joined #ruby
Archyme has quit [Quit: Leaving]
blaxter has joined #ruby
senayar has joined #ruby
l_tonz has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
platzhirsch has quit [Ping timeout: 244 seconds]
astrobunny has quit [Remote host closed the connection]
norc has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<norc> [k-: I actually did it. I ordered the book. :<
<norc> For the second time in my life Im buying an actual book.
renderfu_ has joined #ruby
<[k-> :>
<certainty> oO
<Ropeney> good book?
yfeldblum has joined #ruby
<norc> That remains to be seen.
yfeldblum has quit [Remote host closed the connection]
<Ropeney> you got us all in suspense now, what book?
yfeldblum has joined #ruby
<norc> Ruby Under a Microscope
XxionxX has quit [Ping timeout: 252 seconds]
<shevy> Ruby Under a Stone
scripore has joined #ruby
<norc> shevy, will you be hating my code today?
Ropeney has quit [Read error: No route to host]
<shevy> I still don't think you are actually using ruby :)
<certainty> haters gotta hate
Ropeney_ has joined #ruby
renderfu_ has quit [Ping timeout: 264 seconds]
<norc> Im actually curious what makes you say that.
<Ropeney_> did you say what book i got reset
<norc> I made sure I told everybody while you were gone.
<norc> To increase the suspense even more
pocketprotector has joined #ruby
<certainty> ^.^
<shevy> Ropeney_ <norc> Ruby Under a Microscope
<certainty> aww shevy
<norc> :(
<Ropeney_> hahaha
<shevy> lol
<Ropeney_> norc: i heard number 2 came out?
BustyLoliChan has quit [Quit: Leaving]
dhjondoh has quit [Quit: dhjondoh]
astrobunny has joined #ruby
bruno- has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
JammyHammy has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
KnownSyntax has joined #ruby
JohnBat26 has joined #ruby
KnownSyntax has quit [Remote host closed the connection]
JohnBat26 has quit [Client Quit]
KnownSyntax has joined #ruby
dhjondoh has joined #ruby
mikecmpbll has joined #ruby
KnownSyntax_ has quit [Ping timeout: 256 seconds]
JohnBat26 has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
roshanavand has quit [Remote host closed the connection]
v4n has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> who was the one who told you that
scripore has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
Macaveli has joined #ruby
<Ropeney_> was in one of these channels the other day, but i can't find it so i guess not
Macaveli has quit [Client Quit]
krisquigley has joined #ruby
htmldrum has joined #ruby
Xeago has quit [Remote host closed the connection]
<[k-> it seems the second edition has not arrived/or has been written even
KnownSyntax has quit [Ping timeout: 256 seconds]
DEA7TH has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
Macaveli has joined #ruby
kalusn has joined #ruby
roshanavand has joined #ruby
karapetyan has joined #ruby
goldfish6744 has joined #ruby
astrobunny has quit [Remote host closed the connection]
stannard has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Ropeney_ has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 246 seconds]
neanderslob has quit [Remote host closed the connection]
l_tonz has quit [Remote host closed the connection]
yeshacker has quit [Ping timeout: 255 seconds]
tomphp has joined #ruby
darkf_ has joined #ruby
WizJin has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
lubarch has quit [Quit: leaving]
<yorickpeterse> HELLO CHILDREN
<yorickpeterse> NOT DOING ANY DRUGS OK?
ruurd has joined #ruby
<certainty> no worries, you're reserevoir
<certainty> ah too early
marr has joined #ruby
darkf has quit [Ping timeout: 240 seconds]
<certainty> no worries, your reservoir is not in danger
neanderslob_ has joined #ruby
neanderslob_ has quit [Remote host closed the connection]
KnownSyntax has joined #ruby
neanderslob has joined #ruby
<yorickpeterse> you ruined the joke didn't you?
<yorickpeterse> 2/10
<certainty> yeah
<certainty> totally :(
<certainty> that's my superpower
JohnBat26 has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<goldfish6744> that's more useful than the superpower of being able to finish a bottle of coke through a straw in your nostrils in less than 30 seconds :P
<yorickpeterse> At least with that you can show off
<goldfish6744> well, there are certain comical duos where one is always ruining the other one's joke (and gets hit/kicked/etc because of that)
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niemcu has joined #ruby
roshanavand has quit [Remote host closed the connection]
Peg-leg has joined #ruby
norc has quit [Ping timeout: 246 seconds]
pandaant has joined #ruby
Macaveli has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
Macaveli has quit [Client Quit]
VeryBewitching has quit [Quit: Konversation terminated!]
bl0ndie has quit [Ping timeout: 252 seconds]
roshanavand has joined #ruby
<shevy> yeah
user1138 has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
<shevy> Laurel and Hardy
<shevy> certainty and yorickpeterse
Macaveli has quit [Client Quit]
<goldfish6744> for one. Many Osaka comedians, also
Oog has quit []
phutchins has joined #ruby
<goldfish6744> one is the "straight guy", the other is the "idiot"
Kendos-Kenlen has joined #ruby
Macaveli has joined #ruby
<goldfish6744> much hitting with foldable paper fans ensues
sivoais has quit [Ping timeout: 255 seconds]
lubarch has joined #ruby
atmosx has quit [Read error: Connection reset by peer]
Macaveli has quit [Client Quit]
atmosx_laptop has joined #ruby
<[k-> Ox0dea :(
ndrei has joined #ruby
<shevy> Osaka comedians?
<[k-> Oxdea
<[k-> oops
<shevy> Oxdea is a comedian?
Macaveli has joined #ruby
<shevy> hey
sivoais has joined #ruby
dmolina has joined #ruby
<shevy> did you get his nick wrong [k- :)
Macaveli has quit [Client Quit]
Pupeno has quit [Quit: Leaving...]
<shevy> that's like calling your girlfriend by another name!
<[k-> no, they was not meant to be his nick
platzhirsch has joined #ruby
<[k-> there is no link between the two people
Xeago has quit [Remote host closed the connection]
atmosx_laptop has quit [Read error: Connection reset by peer]
<certainty> what's the gender neutral possessive pronoun?
<certainty> their?
Macaveli has joined #ruby
<goldfish6744> 0x0dea... "Sinhala lith digit four". Looks like a honeypot with a spoon in it for me, at least the Unicode letter does
roshanavand has quit [Read error: Connection reset by peer]
darkf_ is now known as darkf
nym has quit [Quit: Connection closed for inactivity]
<platzhirsch> certainty: I believe so, try #english
<yorickpeterse> certainty: yes
roshanavand has joined #ruby
Macaveli has quit [Client Quit]
<certainty> thanks :)
<goldfish6744> certainty: one's
Macaveli has joined #ruby
<shevy> try #english because people here don't speak it!
Macaveli has quit [Client Quit]
<awk> Please can some regex guru help me here... I am returning a a whole bunch of values for SQL... what i'm working from in my paste is 'eachRow' and I'm doing some subsitution.. What I need to do is the following, anytime it finds a string it must put a " in the begining and the end ... but only for strings going into the DB so I', using gsub(/[\z,a-zA-Z]/, '"') I can use $ for the other in the sub too.. the proble
<awk> m I face is that it must only be between ,'s unless it's already wrapped in "blah, blah" for example.. VALUES (45,'active',NOW(),0,1,""ubsistence farmers, fishers, hunters and gatherers","Subsistence farmers, <---- that example because someone did farmers, fishers, .... in a csv file it already wrapped it with "" .. Hope I made that clear cut of code https://gist.github.com/tripolitrax/fe02742954b7d43fb8a6
Macaveli has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
Macaveli has quit [Client Quit]
chthon has joined #ruby
wpp has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
Xeago has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
dnewkerk has quit [Quit: dnewkerk]
Macaveli has joined #ruby
rgtk has quit [Remote host closed the connection]
<goldfish6744> ... maybe I'm dumb, but... why not write a quote() function, then call it only if the first char of the string matches " or ' ?
atmosx has joined #ruby
Macaveli has quit [Client Quit]
<goldfish6744> *not matches
rgtk has joined #ruby
sivoais has quit [Ping timeout: 264 seconds]
zenguy_pc has quit [Ping timeout: 255 seconds]
jgt has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
<apeiros> awk: use a prepared statement and bind variables
sivoais has joined #ruby
Macaveli has quit [Client Quit]
lubarch has quit [Ping timeout: 268 seconds]
ndrei has quit [Ping timeout: 240 seconds]
ruurd has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
astrobunny has joined #ruby
Macaveli has joined #ruby
skade has joined #ruby
Macaveli has quit [Client Quit]
yeshacker has joined #ruby
Macaveli has joined #ruby
rdark has joined #ruby
Macaveli has quit [Client Quit]
A124 has quit [Ping timeout: 268 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
A124 has joined #ruby
Macaveli has joined #ruby
timonv has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
shmoon_ has quit [Quit: Connection closed for inactivity]
sivoais has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
subscope has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
Novalenka has joined #ruby
Macaveli has quit [Client Quit]
sivoais has joined #ruby
krz has quit [Quit: WeeChat 1.2]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
zenguy_pc has joined #ruby
bMalum has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Xeago has quit [Remote host closed the connection]
Macaveli has quit [Client Quit]
rdark has quit [Quit: leaving]
rdark has joined #ruby
Macaveli has joined #ruby
Xeago has joined #ruby
Hounddog has joined #ruby
Macaveli has quit [Client Quit]
roshanav_ has joined #ruby
Macaveli has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Macaveli has quit [Client Quit]
norc has joined #ruby
subscope has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
sivoais has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
Macaveli has joined #ruby
niemcu has quit [Ping timeout: 264 seconds]
Macaveli has quit [Client Quit]
TvL2386 has joined #ruby
oliver_ has quit []
sivoais has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
bruno- has joined #ruby
Macaveli has joined #ruby
yeshacker has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
Macaveli has quit [Client Quit]
<TvL2386> hi guys, I'm having a piece of code that is calling IO.popen a lot of times to execute commands. I want to migrate this to eventmachine using EM.popen. The problem is: the commands must be executed sequentially and if something goes wrong, it should be aborted. The problem I have, is that I don't know how to make it go sequentially. I was hoping somebody can steer me in the right direction
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
<TvL2386> the reason it should be in eventmachine, is because it's already present and now these IO.popen calls are blocking the EM
Novalenka has left #ruby [#ruby]
borkdude_ has quit [Ping timeout: 252 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
Macaveli has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Macaveli has quit [Client Quit]
<jhass> TvL2386: so you want to do other stuff while those are running?
Macaveli has joined #ruby
<TvL2386> jhass, definitely!!!!
tomaz_b has joined #ruby
Macaveli has quit [Client Quit]
bruno- has quit [Ping timeout: 264 seconds]
<jhass> mh, dunno eventmachine but that it would block the event loop sounds weird
<jhass> anyway, does it have a way to wait for a thread without blocking the event loop?
Macaveli has joined #ruby
<jhass> if so you could just stick to IO.popen and spawn a thread where you do your stuff sequentially
<TvL2386> hmmm
Macaveli has quit [Client Quit]
sivoais has quit [Ping timeout: 268 seconds]
Macaveli has joined #ruby
<TvL2386> jhass, gonna check if it really blocks the process
Macaveli has quit [Client Quit]
sivoais has joined #ruby
Macaveli has joined #ruby
<TvL2386> jhass, yeah putting this "IO.popen(['sleep','120']) { |out| puts out.read }" in, blocks everything
<jhass> sure
Macaveli has quit [Client Quit]
<jhass> that EM.popen still would is weird
<TvL2386> jhass, I'm not saying that!!!
Musashi007 has joined #ruby
<jhass> oh, misread I guess, sorry
<TvL2386> :)
<TvL2386> no worries :)
<jhass> well, do the next one the success callback or whatever?
Macaveli has joined #ruby
timonv has quit [Quit: WeeChat 1.3]
Macaveli has quit [Client Quit]
<TvL2386> I'm having a hard time to untangle the current code to fit in such a scheme.... I'm kind of hoping if there is a way to just execute something in EM and kinda stall the execution until it is finished
borkdude has joined #ruby
<TvL2386> my google searches lead to em-synchrony
Macaveli has joined #ruby
sgambino has joined #ruby
<jhass> I don't follow, now do you want other stuff to continue to happen or not?
Macaveli has quit [Client Quit]
<jhass> you just kinda said both
ruurd has quit [Quit: ZZZzzz…]
<TvL2386> yeah, I understand... This app consists of multiple parts... The other parts are running fine but are blocked by this part.... This part may be blocked, that's fine, as long as it doesn't block the other parts
<TvL2386> if you can still follow lol
<jhass> well, so you have an array or something of the commands to run, right?
Guest34461 is now known as Affix
<TvL2386> I'm having multiple parts... 1 part is handling a socket that is unrelated to this part executing commands.
Affix has quit [Changing host]
Affix has joined #ruby
Gaspar_ has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
<TvL2386> jhass, what I'm actually doing: check if dir exists, call git pull or git clone, chdir into there, check if some subdir exists and call git pull or git clone..... etcetera.... it's cloning / pulling a lot of repos that are sub repos
<jhass> do they actually need to be the same process at all? maybe you actually meant to write two programs?
sivoais has quit [Ping timeout: 240 seconds]
leafybasil has quit [Remote host closed the connection]
<TvL2386> jhass, good question!
maletor has quit [Ping timeout: 256 seconds]
<TvL2386> let me digest that...
sivoais has joined #ruby
<jhass> like, is there any interaction between the two at all and what does it look like
f4cl3y has joined #ruby
<jhass> or is there any global state both refer to
<jhass> (and what would that look like)
<certainty> except for the time :)
bb010g has quit [Quit: Connection closed for inactivity]
<Diabolik> what's up everyone?
mattprelude has joined #ruby
karapetyan has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
neanderslob has quit [Remote host closed the connection]
<jhass> rain clouds :/
<TvL2386> jhass, well, based on any updated files in the git pull, some other part will start executing.... I'm conveniently using the EM as a scheduler and uses the integrated logging that's in there as well... Main thing is that it's quite handy to make this thing a single gem that's easily distributed
<shevy> jhass hah same here but I have to stay outside for 2 hours soon :(
Igorshp has joined #ruby
SCHAAP137 has joined #ruby
nettoweb has joined #ruby
peteykun has quit [Quit: Leaving]
sivoais has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<jhass> TvL2386: well, from what I've gathered so far your options are to untangle your code into something like the command pattern that you can use to build a sequential chain of commands from, see if you can join a thread with EM and if so just spawn one doing the sequential stuff or do the same conceptually but writing a helper script so you can launch it as a single external process
ruurd has joined #ruby
sivoais has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shmoon_ has joined #ruby
bMalum has quit [Quit: bMalum]
roshanav_ has quit []
solocshaw has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
Kendos-Kenlen has joined #ruby
joonty has quit [Quit: joonty]
bMalum has joined #ruby
allcentury has joined #ruby
Archyme has joined #ruby
leafybasil has joined #ruby
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
tvw has joined #ruby
devoldmx has joined #ruby
nfk|laptop has quit [Ping timeout: 250 seconds]
Psychesworld has quit [Ping timeout: 240 seconds]
sivoais has quit [Ping timeout: 268 seconds]
<platzhirsch> shevy: stay outside
<shevy> hehe
Archyme has quit [Client Quit]
<shevy> they plan to gather datasets for some rural area nearby to vienna... and I have to record some crap
Archyme has joined #ruby
sivoais has joined #ruby
sivoais has quit [Changing host]
sivoais has joined #ruby
spider-mario has joined #ruby
<certainty> you're outside recording? Sounds like active record
devoldmx has quit [Ping timeout: 256 seconds]
ruurd has quit [Quit: ZZZzzz…]
ndrei has joined #ruby
GT|away is now known as Gnomethrower
yeshacker has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<ddv> since shevy hardly comes outside I think this is a healthy thing for him
<certainty> i heard rumors about shevy being an outdoor freak. Climbing buildings and making selfies on top of them
sivoais has quit [Read error: Connection reset by peer]
sivoais has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
renderfu_ has joined #ruby
oetjenj has joined #ruby
_blizzy_ has joined #ruby
BSaboia has joined #ruby
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
scripore has joined #ruby
jenrzzz has joined #ruby
renderfu_ has quit [Ping timeout: 255 seconds]
Helius has quit [Quit: Helius]
_blizzy_ has quit [Read error: Connection reset by peer]
sivoais has quit [Ping timeout: 240 seconds]
oetjenj has quit [Ping timeout: 250 seconds]
Igorshp has quit [Ping timeout: 264 seconds]
sivoais has joined #ruby
Xeago has joined #ruby
bruno- has joined #ruby
Igorshp has joined #ruby
_blizzy_ has joined #ruby
joonty has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby
terlar has joined #ruby
sivoais has quit [Ping timeout: 255 seconds]
bl0ndie has joined #ruby
Xeago has quit [Remote host closed the connection]
UtkarshRay has quit [Quit: Leaving]
bMalum has quit [Quit: bMalum]
sivoais has joined #ruby
j416 has quit [Quit: o/]
<certainty> this one
Rickmasta has joined #ruby
bMalum has joined #ruby
j416 has joined #ruby
datanoise has quit [Ping timeout: 240 seconds]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Xeago has joined #ruby
sjums has joined #ruby
subscope has joined #ruby
Kendos-Kenlen has joined #ruby
<sjums> is there any ruby gems for cross-platform notifications? using the windows notification center or notify-send on linux?
<sjums> and whatever it is on OSX :P
Psychesworld has joined #ruby
bl0ndie has quit [Ping timeout: 272 seconds]
Psychesworld has quit [Client Quit]
j416 has quit [Client Quit]
darkf_ has joined #ruby
j416 has joined #ruby
Xeago has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
darkf has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
sivoais has quit [Ping timeout: 250 seconds]
Flipez has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
minimalism has quit [Quit: leaving]
yashinbasement has joined #ruby
sivoais has joined #ruby
TheRokh has joined #ruby
Xeago has quit [Remote host closed the connection]
ruurd has joined #ruby
karapetyan has quit [Remote host closed the connection]
UtkarshRay has joined #ruby
karapetyan has joined #ruby
mdih has quit [Ping timeout: 240 seconds]
constantinexvi has quit [Ping timeout: 250 seconds]
darkf_ is now known as darkf
constantinexvi has joined #ruby
scripore has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
<sjums> darix, so there is "notify". It makes use of growl, but isn't growl a 3rd party app on windows or is that the name of the native notifications?
<darix> sjums: I already typed the search for you. documentation reading i leave to you.
sivoais has quit [Ping timeout: 250 seconds]
CloCkWeRX1 has quit [Ping timeout: 268 seconds]
<awk> guys im still struggling .. I need to go through a file (I wrote a script to download a google sheet to a csv), the csv has headers and values.. I use the header for a SQL insert statement and the values as just that. The problem is in the sheet if someone writes ... Hello, how are you doing ... it comes down as "Hello, how are you doing" .. perfect this will insert into a SQL query perfectly. however, if someon
sdothum has joined #ruby
<awk> e writes .. Hello .. or .. How you doing .. it doesn't contain " " around it so it will not work. I need to find a way to wrap strings so something like gsub(/[^a-zA-Z]/ '"') for example <-- that example is actually overwriting the first line eg: Hello becomes "ello ... so I need assistance building a regex that will loop through all the csv's and the ones that don't already have "" around the string to add, but
<awk> leave the ones that do... I don't want to wrap numeric values though..
<sjums> if you knew it would be nice if we could share knowledge :) how to use the gem I'll read about myself, ofc.
sivoais has joined #ruby
hectortrope has quit [Remote host closed the connection]
<sjums> awk, isn't all the fields in the cvs per default strings? So in theory all strings should be wrapped in "". So if someone writes "ello" the content of the string will be "ello" and not ello.
<darix> sjums: you are wrong on the csv
j416 has quit [Quit: o/]
dnewkerk has joined #ruby
zenguy_pc has quit [Ping timeout: 256 seconds]
j416 has joined #ruby
ohcibi has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 240 seconds]
ohcibi has joined #ruby
<sjums> then what is right? :)
dikaio has quit [Quit: ........]
Xeago has joined #ruby
<sjums> nvm.. I'll just stop talking. Nothing is right anyway!
sivoais has joined #ruby
mdih has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
htmldrum has quit [Ping timeout: 268 seconds]
CloCkWeRX has joined #ruby
lxsameer has joined #ruby
<awk> sjums: it doesn't seem to be that way with Google Sheets and using the google drive gem to download and export to csv
<awk> it seems only if someone uses a , it then add's the "" so I need another soolution
Xeago has quit [Remote host closed the connection]
Macaveli has joined #ruby
mdih has quit [Ping timeout: 264 seconds]
rodfersou has joined #ruby
<sjums> awk, there's a gem called csv_parser. Is that possibly something for you?
<workmad3> awk: sounds like you should be using the csv library from the stdlib to read your file
tulak has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
sivoais has quit [Ping timeout: 244 seconds]
<awk> workmad3: thats great and it reads it as an array or hash and has the " " around the values, when I write it to a file its gone ;(
<awk> nnot allot of examples on that gem
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has quit [Quit: WeeChat 1.3]
<tagrudev> wut
zenguy_pc has joined #ruby
<workmad3> awk: err... the CSV library correctly removes " quotes from around the value... are you sure you're not getting confused with IRB then displaying strings with "" around them?
sivoais has joined #ruby
<workmad3> awk: also, you shouldn't be trying to quote values yourself for SQL... read up on prepared statements
stirc has quit [Quit: Leaving.]
datanoise has joined #ruby
nfk|laptop has joined #ruby
devoldmx has joined #ruby
<workmad3> awk: e.g. `[["hello", "world"], ["quoted,", "unquoted"]]` is the output of a quick CSV file I just created... *none* of those actually contain a " in the string value
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> s/output/IRB display of the CSV parse
tomaz_b has quit [Quit: Leaving]
lubarch has joined #ruby
lenwood has quit [Ping timeout: 252 seconds]
terlar has joined #ruby
Xeago has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
gregoriokusowski has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
lenwood has joined #ruby
supergeek has joined #ruby
hectortrope has joined #ruby
<awk> workmad3: you right..
<awk> its just the hash / array showing them
lubarch has quit [Client Quit]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
<awk> its just the hash / array showing them
<awk> erp sorry
<awk> *sigh* :(
dhjondoh has quit [Quit: dhjondoh]
<awk> then let me move away from CSV and try find a way to use gsub and replace
mdih has joined #ruby
howdoi has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
<jhass> I didn't follow the conversation, but that sounds so wrong...
Pupp3tm4_ has quit [Remote host closed the connection]
<jhass> awk: did you look into bind params/prepared statements yet?
<jhass> I think you're completely ignoring that advice
<workmad3> awk: you really should parse a CSV using the CSV lib... and send the data to the database via prepared statements or, at a minimum, the database-driver provided SQL escaping, and not hand-roll this stuff
bruno- has quit [Ping timeout: 255 seconds]
<jhass> awk: apeiros gave it two and a half hours ago already, please consider researching it, it's the correct solution
stamina has joined #ruby
Xeago has quit [Remote host closed the connection]
lenwood has quit [Ping timeout: 252 seconds]
dhjondoh has joined #ruby
<awk> workmad3: I dont want to send the data my mysql YET... I have many scripts that pass directly to mysql... my problem here is the google sheets layout and having certain things with a , wrapped with "" and other strings not
<awk> inserting into the DB is the easy part.. this is difficult, i
<workmad3> awk: the CSV library handles that
<workmad3> awk: seriously... what google sheets is giving you is correctly quoted, valid CSV... the CSV library parses it correctly... doing it yourself will either re-implement the CSV library or do it wrong
step1step2_ has quit [Quit: Leaving]
step1step2 has joined #ruby
nateberkopec has joined #ruby
<awk> workmad3: but I have to do a million modifications before I take th 'few' fields that are in the sheet.. I have major SQL that I have prior to adding this last little piece.. where all I pass at the end is #{sqlValues})
<jhass> most likely the latter, given you try to do it with regex, which is hard to get right
<apeiros> on another note: most dbs can load csv directly
<awk> the problem is the sqlValues the stuff im describing above, not the 99.9% of the SQL stuff that the file already has in it, .. truncate, foreign keys off etc etc
<ddv> I doubt you really have a million modifications
<jhass> awk: I think you
<jhass> 're trying to find a reason to not learn the proper way
Xeago has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ddv> sometimes people will get stubborn if you offer them a different path to a possible solution
<ddv> because they are so invested in their current thinking
<apeiros> unless you're cutting away *a lot* of data, it's probably faster and easier to load the csv directly via db mechanisms into a temp table and then do what you need there
<apeiros> ddv: I think that's even got a name
scripore has joined #ruby
<ddv> it's called the apeiros-paradox
<ddv> j/k :p
JammyHammy has quit [Read error: Connection reset by peer]
<apeiros> hah :D
<workmad3> apeiros: it's a form of sunk-cost fallacy, I believe :)
<jhass> awk: so, instead of spending countless hours here trying to get somebody to code up the solution you imagine, how about you start describing your actual problem. What's your actual data, what's your RDBMS, what's your driver library, what's the modifications/operation you need to do
<apeiros> workmad3: ah yes
<awk> apeiros: listen i don't want this to turn into an argument you can assume what you want... the way the code is written requires me to regex / gsub and im needing help with that... csv has an option to force ALL output with "" not just fields...
Flipez has joined #ruby
<apeiros> awk: *shrug* it's your time and pain
<ddv> awk: we need to verify your claims
<apeiros> you're getting a lot of quite experienced people telling you you're almost certainly doing it wrong. up to you what you make of that.
<awk> ok, thanks
<workmad3> 'the way the code is written' <-- oh look, there's code forcing this route... if only there was some way to... I don't know... *edit* that to change how things work?
Xeago has quit [Remote host closed the connection]
<jhass> workmad3: I heard there are these "programmers" (or something?) doing that, maybe we should try and find one?
Pupp3tm4st3r has joined #ruby
<jhass> anybody knows a good channel?
<jhass> wait
<jhass> ?anybody
<ruboto> jhass is anybody
<jhass> shit
<apeiros> lol
<apeiros> nobody knows a good channel!
<apeiros> wait
<apeiros> ?nobody
<ruboto> apeiros is nobody
<workmad3> jhass: and people say that sarcasm is the lowest form of wit :)
tulak has quit []
<jhass> I have no idea what you're talking about!
yeshacker has quit [Ping timeout: 264 seconds]
JammyHammy has joined #ruby
supergeek has quit [Quit: WeeChat 1.3]
phutchins has joined #ruby
p0wn3d_ has joined #ruby
jgt has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TvL2386 has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
mdih has quit [Ping timeout: 272 seconds]
phutchins has quit [Quit: WeeChat 1.1.1]
araujo has joined #ruby
karapetyan has joined #ruby
araujo has quit [Max SendQ exceeded]
stamina has quit [Quit: WeeChat 1.3]
prateekp has joined #ruby
araujo has joined #ruby
<prateekp> what is the difference between ~> and >= in gem version specification
<prateekp> ?
izzol has joined #ruby
<izzol> Hi.
govg has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<certainty> prateekp: basically ~> allows you to constrain the version parts that are drawn into consideration in the comparison. e.g. ~> 1.1 would allow any version within 1.1
s00pcan has joined #ruby
<certainty> >= 1.1 would for example allow 1.2 where ~> 1.1 would not
<certainty> thank i was looking for a link like that
ldnunes has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
<izzol> I have a problem to solve one problem :(
Azure has quit [Ping timeout: 250 seconds]
Helius has joined #ruby
<izzol> Can some please explain me why I'm getting error on second version?
HammyJammy has joined #ruby
sankaber has joined #ruby
<izzol> I simply added Module name.
Novalenka has joined #ruby
JammyHammy has quit [Ping timeout: 260 seconds]
htmldrum has joined #ruby
senayar has quit [Remote host closed the connection]
TvL2386 has joined #ruby
<izzol> I think the problem is with "include RSpec::Matchers".
<jhass> include at the toplevel adds methods to Object, Object is in the ancestor chain of Execute and thus the methods can be found
senayar has joined #ruby
<izzol> When I delete it in first example I'm getting same problem.
<jhass> include into a module does not make methods magically appear in classes defined in the namespace
Rollabunna has joined #ruby
phutchins has joined #ruby
<norc> jhass: It might if it brings an included callback that does things depending on where its included.
<jhass> norc: it's not a good general assumption and would require domain knowledge of the thing you include
shredding has joined #ruby
<jhass> norc: and clearly not happening here
<izzol> hmm, so how to include it? When I move it on the top of everything I'm getting: uninitialized constant RSpec (NameError)
<jhass> because you moved it before the require ...
htmldrum has quit [Ping timeout: 246 seconds]
<jhass> why are those nested into the module anyway? makes no difference at all
kalusn has quit [Remote host closed the connection]
<izzol> ahh
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
<izzol> I have it in the different file but that was much simple to just show what is the problem.
<norc> izzol: I recommend you use RSpec the way its meant to though, with describe blocks.
<izzol> Ok now I know, I have it on the different file but still in the same Module.
yashinbasement has quit [Quit: Leaving]
tesuji has joined #ruby
synthroid has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> izzol: https://relishapp.com/rspec/docs/gettingstarted is a great start.
<izzol> norc: yes, I just started with RSpec. It's kind of strange right now. I will check that docs.
noura32015 has joined #ruby
<noura32015> hi
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
noura32015 has quit [Client Quit]
diegoaguilar has joined #ruby
subscope has joined #ruby
_el_fer_ has joined #ruby
prefixed has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
renderfu_ has joined #ruby
kalusn has joined #ruby
hx___ has joined #ruby
<izzol> hmm, also one more thing :P
<hx___> is alias a method in ruby? alias :newmethodname :oldmethodname
pathrocle has joined #ruby
Renich has joined #ruby
<jhass> hx___: alias is a keyword, alias_method is a method
mdih has joined #ruby
<izzol> I'm trying like: :@browser or :#{@browser}
<jhass> hx___: you can tell by it having no , between the arguments
TvL2386 has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
<jhass> izzol: I don't follow
<ytti> man alias pisses me off
<hx___> jhass: So that's just syntax? Ruby figures it out from the whitespace between the new and old method names yeah?
cantaberry has joined #ruby
<jhass> hx___: I would expect alias is coded into the parser as a keyword and then it proceeds to look for arguments based on that
bryanray has joined #ruby
<jhass> it's never parsed the same way as a method call
renderfu_ has quit [Ping timeout: 252 seconds]
shakes has quit [Quit: Leaving]
chrissonar has quit [Ping timeout: 252 seconds]
sanjayu has quit [Quit: Leaving]
<norc> izzol: wrap the string in quotes, then prepend a colon: :"@foo"
<norc> For example
sanjayu has joined #ruby
<norc> Or use .to_sym
<hx___> jhass: Where is alias_method defined?
<jhass> mmh, I guess Module
<jhass> &ri Module#alias_method
<izzol> norc: I did but I'm getting: `initialize': invalid desired capability: :@browser (Selenium::WebDriver::Error::WebDriverError)
<certainty> >> method(:alias_method).owner
<ruboto> certainty # => undefined method `alias_method' for class `Object' (NameError) ...check link for more (https://eval.in/450370)
<certainty> :(
<norc> That was ruboto's way of saying "NO!"
<jhass> izzol: just desired_capabilities: @browser ?!
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hakunin has quit [Remote host closed the connection]
syath has joined #ruby
<izzol> jhass: `create_response': unexpected respons :(
<jhass> ?
atmosx has quit [Ping timeout: 268 seconds]
<jhass> we don't see your screen
<hx___> jhass: Which one should I use and why? (alias or alias_method)
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<norc> hx___: alias_method generally
sgambino has joined #ruby
<jhass> I think alias_method is more popular for its semantics
<jhass> since it makes a copy you can do things to the old one afterwards without screwing up the copy
<jokke> join #travis
* jhass hands jokke a /
marienz has quit [Changing host]
marienz has joined #ruby
<jokke> :)
ggcstop_ has joined #ruby
<hx___> jhass: but alias_method can only be used inside modules and classes. just found out.
Xeago has quit [Remote host closed the connection]
sgambino has joined #ruby
ggcstop_ has left #ruby ["Leaving"]
joonty has quit [Quit: joonty]
<norc> hx___: The main thing to consider is that alias is a keyword (and thus the behavior depends on the lexical scope), while alias_method works at runtime.
TvL2386 has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Porfa has joined #ruby
bruno- has quit [Quit: Lost terminal]
BSaboia has quit [Ping timeout: 244 seconds]
DexterLB has quit [Read error: Connection reset by peer]
diegoaguilar has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
devoldmx has joined #ruby
Xeago has joined #ruby
jgt has quit [Ping timeout: 256 seconds]
chrissonar has joined #ruby
hx___ has quit [Quit: Page closed]
gusTester has joined #ruby
jgt has joined #ruby
jamesaxl has joined #ruby
dhjondoh has joined #ruby
DexterLB has joined #ruby
shmoon_ has quit [Quit: Connection closed for inactivity]
cajone has quit [Remote host closed the connection]
dorei has joined #ruby
Renich has quit [Quit: Lost terminal]
BSaboia has joined #ruby
prestorium has joined #ruby
spcmastertim has joined #ruby
Kruppe has quit [Ping timeout: 255 seconds]
cajone has joined #ruby
<TvL2386> jhass, I've now used a Fiber. In my command execution cycle I now call fiber.yield EM.popen(.....) and in the callback, I call fiber.resume. This seems to work great
murder_guido has joined #ruby
<jhass> interesting, thanks for the follow up
yosemitesam has joined #ruby
diegoaguilar has joined #ruby
<TvL2386> yw! Thanks for helping me! It was very easy to implement. Just put the code in a @fiber = Fiber.new { ... } and replace "IO.popen([command])" with "Fiber.yield EM.popen([command], MyObj, self)". The MyObj calls the calling object in it's #unbind method to inform it is done and what the exitstatus was. The original object then calls @fiber.resume to continue with the next command
Porfa has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
govg has quit [Ping timeout: 255 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.2]
Porfa has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
lxsameer has quit [Quit: Leaving]
_blizzy_ has quit [Read error: Connection reset by peer]
subscope has joined #ruby
dstarh has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
zenguy_pc has quit [Ping timeout: 264 seconds]
phutchins has quit [Ping timeout: 272 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matp has quit [Ping timeout: 250 seconds]
Xeago_ has joined #ruby
Coldblackice has quit [Ping timeout: 264 seconds]
Novalenka has quit [Ping timeout: 264 seconds]
matp has joined #ruby
<awk> ok, I used CSV .. I pushed it into my File.open and I just used gsub and removed the [] ... all done all working, thanks for the direction
Xeago has quit [Ping timeout: 256 seconds]
sanjayu has quit [Ping timeout: 240 seconds]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
<jhass> which you didn't take at all ..
<certainty> :D
<jhass> well, not our problem
yosemitesam has quit [Quit: leaving]
Melpaws has quit [Quit: Leaving.]
fauzan has joined #ruby
devoldmx has quit [Remote host closed the connection]
murder_guido has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
Balzrael has joined #ruby
fauzan has quit [Client Quit]
ruurd has quit [Quit: ZZZzzz…]
grekko has joined #ruby
e1senhorn has joined #ruby
zenguy_pc has joined #ruby
Xeago has joined #ruby
balazs has joined #ruby
tier has joined #ruby
favadi has joined #ruby
victortyau has joined #ruby
User458764 has joined #ruby
favadi has quit [Max SendQ exceeded]
ruurd has joined #ruby
<Takumo> Hi all, how do I include a Builder::XmlMarkup within another Builder::XmlMarkup??
<Takumo> I've got a big document that gets generated and I've split out some of the blocks into separate functions that return XmlMarkups, and I want to then include them in my main document
tier has quit [Ping timeout: 240 seconds]
JDiPierro has joined #ruby
Xeago has quit [Remote host closed the connection]
tkuchiki has joined #ruby
BSaboia has quit [Quit: Leaving]
eGGsha has quit [Max SendQ exceeded]
Xeago has joined #ruby
ruurd has quit [Client Quit]
bryanray has quit [Ping timeout: 250 seconds]
tier has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
e1senhorn has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has quit [Quit: bMalum]
joonty has joined #ruby
`tim` has joined #ruby
duoi has quit [Ping timeout: 240 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki_ has joined #ruby
davedev24 has joined #ruby
Xeago has quit [Remote host closed the connection]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
snick007 has joined #ruby
rushed has quit [Quit: rushed]
Xeago has joined #ruby
cdg has joined #ruby
whippythellama has joined #ruby
s2013 has joined #ruby
Novalenka has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
leafybas_ has joined #ruby
TheRokh has quit [Read error: Connection reset by peer]
pathrocle has quit []
_el_fer_ has quit [Quit: Leaving]
tier_ has joined #ruby
s2013 has quit [Client Quit]
subscope has joined #ruby
_blizzy_ has joined #ruby
leafybasil has quit [Ping timeout: 260 seconds]
tier has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
User458764 has joined #ruby
<EdwardIII> hey how come the number 1 doesn't have a method instance_methods? i.e. i can't do 1.instance_methods?
sankaber has joined #ruby
<jhass> EdwardIII: it's Module#instance_methods and Object#methods
<EdwardIII> that makes sense
riotjones has joined #ruby
<jhass> eg. Fixnum.instance_methods == 1.methods
<EdwardIII> cool, got it
lipoqil has joined #ruby
sankaber has quit [Remote host closed the connection]
devoldmx has joined #ruby
sankaber has joined #ruby
andikr has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
leafybas_ has quit [Remote host closed the connection]
caliostro has joined #ruby
leafybasil has joined #ruby
<caliostro> goodmorning people
TheRinger has quit [Read error: Connection reset by peer]
umgrosscol has joined #ruby
bitsapien has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
_blizzy_ has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheRinger has joined #ruby
jzigmund has joined #ruby
<bitsapien> hey everyone!
datanoise has quit [Ping timeout: 260 seconds]
A124 has quit [Ping timeout: 268 seconds]
A124 has joined #ruby
<umgrosscol> good morning
jessemcgilallen has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
__chris has joined #ruby
<bitsapien> Here is a line of code, and I have no idea, whats going on here : "aa%40e.com" % nil . Can anyone explain, please?
<bitsapien> "aa%40e.com" % nil
<adaedra> &ri String#% Kernel#sprintf
troulouliou_div2 has quit [Ping timeout: 256 seconds]
wpp has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<bitsapien> Thanks a lot adaedra and derpy, makes sense now
dopamean_ has quit [Ping timeout: 250 seconds]
<`derpy> You're welcome
hakunin has joined #ruby
jschmid has joined #ruby
basiles has joined #ruby
Cyther has joined #ruby
bruno- has joined #ruby
troulouliou_div2 has joined #ruby
devdazed has joined #ruby
subscope has joined #ruby
ksteck has joined #ruby
stannard has joined #ruby
Zai00 has joined #ruby
mase-chatter has joined #ruby
hakunin has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 252 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jschmid has quit [Remote host closed the connection]
oetjenj has joined #ruby
subscope has joined #ruby
Bish_ is now known as Bish
Guest31368 has joined #ruby
<Guest31368> how i can change my name? help me please
htmldrum has joined #ruby
<certainty> depends on the regulations in your country
<certainty> if your country happens to be the irc republic /nick newnick will do
Guest31368 is now known as TrueNapsy
<TrueNapsy> thank you! =)
oetjenj has quit [Ping timeout: 244 seconds]
tagrudev has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has joined #ruby
jzigmund has quit [Quit: Lost terminal]
htmldrum has quit [Ping timeout: 264 seconds]
duoi has joined #ruby
xcesariox has joined #ruby
kimegede has quit [Quit: Leaving...]
Feyn has quit [Quit: Leaving]
prateekp has quit [Quit: Page closed]
prestorium_ has joined #ruby
bkxd has joined #ruby
jmignault has joined #ruby
JohnBat26 has joined #ruby
TrueNapsy has quit [Remote host closed the connection]
prestorium has quit [Ping timeout: 255 seconds]
beast has quit [Disconnected by services]
freezevee has quit [Remote host closed the connection]
beast_ has joined #ruby
renderfu_ has joined #ruby
techsethi has quit [Quit: techsethi]
joonty has quit [Quit: joonty]
TrueNapsy has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
jessemcgilallen has quit [Quit: jessemcgilallen]
Gnomethrower has quit [Max SendQ exceeded]
TrueNapsy is now known as Funky
DanKnox[away] is now known as DanKnox
p0wn3d_ has quit [Ping timeout: 255 seconds]
Funky is now known as TrueNapsy
spcmastertim has quit [Ping timeout: 246 seconds]
<TrueNapsy> tell me please what is better ruby or python?
jenrzzz has joined #ruby
Dopagod has joined #ruby
Dopagod has joined #ruby
renderfu_ has quit [Ping timeout: 256 seconds]
<apeiros> TrueNapsy: seriously?
<adaedra> TrueNapsy: none.
<jhass> TrueNapsy: Piet
<havenwood> TrueNapsy: tell me please what is better black bears or brown bears?
tkuchiki has quit [Remote host closed the connection]
<jhass> havenwood: ice bears, obviously
cwong_on_irc has quit [Quit: Leaving.]
<apeiros> teddy bears. clearly.
FernandoBasso has quit [Quit: Leaving]
<havenwood> Bears, beats, Battlestar Galactica.
<jhass> gummy bears beat them all though
<havenwood> Care Bears stare!
<adaedra> Identity theft is not a joke, havenwood!
<havenwood> adaedra: ;)
<apeiros> you mean gummi bears?
baroquebobcat has joined #ruby
ruurd has joined #ruby
<jhass> dunno, dict.cc translated it as gummy
jenrzzz has quit [Ping timeout: 255 seconds]
<apeiros> two different things ;-)
hj2007 has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
baroquebobcat has quit [Client Quit]
<jhass> I mean either works
<Rennex> havenwood: it was beets tho
Kendos-Kenlen has joined #ruby
mase-chatter has quit [Remote host closed the connection]
TrueNapsy has quit [Remote host closed the connection]
<havenwood> Rennex: I suppose so, yes, I suppose so.
<hj2007> is <Object_name>.invoke_command(<command_name>, <command_options_hash>) not the right way to call a Thor command?
<hj2007> I mean call a Thir command from another script
<havenwood> Rennex: A beet farmer not a beat farmer. :O
diegoaguilar has quit [Remote host closed the connection]
<Rennex> havenwood: what about beet poetry tho
dopamean_ has joined #ruby
<havenwood> Rennex: with some pickled beats
beauby has joined #ruby
decoponio has joined #ruby
<EdwardIII> back to Schrute Farms with the lot of you
marsjaninzmarsa has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
marsjaninzmarsa has joined #ruby
Cyther has quit [Quit: Leaving]
<Rennex> don't take the beat route
lubarch has joined #ruby
Igorshp has quit [Remote host closed the connection]
<izzol> norc: thanks, to.sym was something that I was looking for :-)
JohnBat26 has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
deepu has joined #ruby
nfk|laptop has quit [Quit: yawn]
nertzy2 has quit [Quit: This computer has gone to sleep]
chrissonar has quit [Remote host closed the connection]
yardenbar has joined #ruby
djcp has joined #ruby
techsethi has joined #ruby
skweek has quit [Read error: Connection reset by peer]
Igorshp has quit [Ping timeout: 250 seconds]
speaking1ode has quit [Remote host closed the connection]
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-438-e879203 - http://znc.in]
marsjaninzmarsa has joined #ruby
gnufied has joined #ruby
devoldmx has joined #ruby
norc has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby
terlar has quit [Read error: No route to host]
<havenwood> hj2007: Is that working?
freerobby has quit [Quit: Leaving.]
<hj2007> havenwood: it is not identifying the method: "undefined local variable or method"
yardenbar has quit [Quit: Leaving]
ruby-lang020 has joined #ruby
shmilan has joined #ruby
gnufied has quit [Client Quit]
axiomatic_345 has joined #ruby
ckinniburgh has joined #ruby
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Igorshp has joined #ruby
bitsapien has joined #ruby
ckinniburgh has quit [Client Quit]
CJKinni has joined #ruby
sivsushruth has quit [Ping timeout: 244 seconds]
sivsushruth has joined #ruby
axl_ has joined #ruby
<havenwood> hj2007: So `undefined local variable or method `invoke_command'` or another method?
<Takumo> So I'm trying to include a Builder::XmlMarkup in another Builder::XmlMarkup
ndrei has joined #ruby
<Takumo> but instead of what I expect of <a><b>..</b></a>
synthroid has quit [Remote host closed the connection]
<Takumo> I get <a:<b> ...</b>/>
weihan has joined #ruby
lenwood has joined #ruby
<hj2007> havenwood: not the "invoke_command" itself but the method name that I'm passing to it as the first parameter. Though when I do <Object_name>.methods I can see that method listed.
aryaching has joined #ruby
bitsapien has quit [Client Quit]
basiles has quit [Ping timeout: 265 seconds]
ruby-lang020 has quit [Quit: Page closed]
yardenbar has joined #ruby
riotjones has quit [Remote host closed the connection]
<dorei> is there some other way than self.class.new in order to create new object?
skweek has joined #ruby
<tobiasvl> dorei: what do you mean?
joonty has joined #ruby
momomomomo has joined #ruby
datanoise has quit [Ping timeout: 244 seconds]
<dorei> tobiasvl: i have a def y inside a class X and i want inside that def y to create a new object of X
stardiviner has joined #ruby
chouhoulis has joined #ruby
<tubbo> dorei: X.new? :D
<oddmunds> was just going to suggest that
bruno- has joined #ruby
<tubbo> j/k
yeshacker has joined #ruby
<dorei> X.new
<dorei> but i change the name of the class
<dorei> that needs changing too
<dorei> :p
<dorei> if i change even
<[k-> k > j
<tobiasvl> why can't you use self.class.new then?
<dorei> tobiasvl: i looks ugly :p
<tobiasvl> really
<tubbo> so no reason then
<dorei> i'm using that but i wonder if there's something more beautiful
polishdub has joined #ruby
<tubbo> dorei: how about this? const_get("#{self.class.name}").new
yardenbar has quit [Ping timeout: 256 seconds]
<tobiasvl> haha
<dorei> +1 tubbo xD
ndrei has quit [Ping timeout: 265 seconds]
<tubbo> dorei: you could always map an emoji symbol like a beautiful bird or a snowflake to a method, because utf-8 characters can be method names. then all you'd have to do is something like
axiomatic_345 is now known as gnufied
bitsapien has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<Xeago> There goes my contrast…
<gnufied> when did we make #ruby-lang invite only?
<dorei> gnufied: it was merged with #ruby :D
tkuchiki has joined #ruby
<Xeago> #ruby-lang is deprecated afaik? 3months maybe?
Rickmasta has joined #ruby
ndrei has joined #ruby
chouhoulis has joined #ruby
Xeago has left #ruby [#ruby]
Xeago has joined #ruby
<yorickpeterse> gnufied: somebody has been living under a rock
bkxd has quit [Ping timeout: 246 seconds]
<yorickpeterse> it was merged into #ruby like...months ago
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<gnufied> yorickpeterse, he he, yeah was out of these things for last couple of months.
<Rennex> dorei: you can leave out the "self." :)
txp2 has joined #ruby
<[k-> no you cant!
<Rennex> or maybe not :P
<darix> gnufied: it should redirect you to #ruby if they set it up correctly
<[k-> class is a keyword, remember
<darix> gnufied: you will only see the "invite only" bit if you are already in #ruby
yeshacker has quit [Ping timeout: 252 seconds]
<jhass> darix: redirect won't happen if you're already in the target, get a invite only message then
<darix> jhass: isnt that what i just said?
sivsushruth has quit [Ping timeout: 264 seconds]
<jhass> aw, too slow
<gnufied> yep.
lenwood has quit [Ping timeout: 252 seconds]
<jhass> was typing it up while you were and didn't check before pressing enter, sorry
txp2 has quit [Client Quit]
f4cl3y has quit [Ping timeout: 264 seconds]
<[k-> ha! a slow jhass!
sivsushruth has joined #ruby
zenguy_pc has quit [Ping timeout: 250 seconds]
spcmastertim has joined #ruby
peteykun has joined #ruby
Jardayn has joined #ruby
skweek has quit [Ping timeout: 255 seconds]
phutchins has joined #ruby
karapetyan has quit [Remote host closed the connection]
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapety_ has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
beauby has quit [Ping timeout: 264 seconds]
speakingcode has joined #ruby
The_Phoenix has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
avril14th has joined #ruby
Kendos-Kenlen has joined #ruby
Dopagod has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
yeshacker has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 268 seconds]
c0m0 has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
aryaching_ has joined #ruby
thistle has joined #ruby
CJKinni_ has joined #ruby
zenguy_pc has joined #ruby
f4cl3y has joined #ruby
prestorium_ is now known as prestorium
aryaching has quit [Ping timeout: 264 seconds]
f4cl3y has quit [Client Quit]
Skelz0r has quit [Ping timeout: 256 seconds]
northfurr has joined #ruby
sanjayu has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
thistle_ has joined #ruby
Timba-as has joined #ruby
acke has quit [Remote host closed the connection]
CJKinni has quit [Ping timeout: 240 seconds]
treehug88 has joined #ruby
RobertBirnie has joined #ruby
thistle has quit [Ping timeout: 272 seconds]
Helius has quit [Remote host closed the connection]
pl1ght has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
_wldcordeiro has joined #ruby
Renich has joined #ruby
pdoherty has joined #ruby
lkba has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
northfurr has quit [Quit: northfurr]
shmilan has quit [Ping timeout: 246 seconds]
avril14th has quit [Read error: Connection reset by peer]
spider-mario has quit [Ping timeout: 246 seconds]
Skelz0r has joined #ruby
northfurr has joined #ruby
gnomex has joined #ruby
momomomomo has quit [Quit: momomomomo]
techsethi has quit [Ping timeout: 240 seconds]
ruurd has quit [Quit: ZZZzzz…]
<gnomex> What's the difference between private & protected methods in ruby?
<[k-> private -- only belongs to /me/
_wldcordeiro has quit [Quit: WeeChat 1.1.1]
_wldcordeiro has joined #ruby
l_tonz has joined #ruby
nertzy2 has joined #ruby
<[k-> protected -- belongs to people in my family, (my descendents)
<gnomex> [k-: What do you mean by belongs to?
<apeiros> gnomex: private methods can only be called without an explicit receiver
Eiam_ has quit [Ping timeout: 250 seconds]
<apeiros> gnomex: protected methods can only be called by instances of the same class (maybe also ancestry)
ndrei has quit [Ping timeout: 240 seconds]
<apeiros> you can bypass both using Object#send
<gnomex> apeiros: Why can't I call protected methods outside the class? They're still being called by instances of the same class, are they not?
datanoise has joined #ruby
l_tonz has quit [Remote host closed the connection]
bMalum has quit [Quit: bMalum]
iateadonut has quit [Quit: Leaving.]
<tubbo> not if you're calling an instance method outside of the definition of that class..
ndrei has joined #ruby
northfurr has quit [Client Quit]
<apeiros> gnomex: please make a concrete example. use gist to paste it.
eminencehc has joined #ruby
Igorshp has quit [Remote host closed the connection]
cucumber_ has joined #ruby
arturmartins has joined #ruby
ruurd has joined #ruby
<gnomex> apeiros: For protected methods, what do you mean by they can only be called by instances of the same class? A method will always be called on the instance of the same class.... I'm confused.
michaeldeol has joined #ruby
T1loc has quit [Quit: crash-test aborted]
T1loc has joined #ruby
T1loc has quit [Changing host]
T1loc has joined #ruby
weihan has quit [Ping timeout: 240 seconds]
<apeiros> gnomex: class A; protected def foo; end; end; class B; def call_foo(x); x.foo; end; end; B.new.call_foo(A.new)
ruurd has quit [Client Quit]
thistle has joined #ruby
<apeiros> an instance of class B calling foo on an instance of class A.
northfurr has joined #ruby
<apeiros> so no, a method is by far not always called by an instance of the same class.
weihan has joined #ruby
l_tonz has joined #ruby
michaeldeol has quit [Client Quit]
<gnomex> apeiros: Outside a class definition when we invoke a method on an object. Who is the method being called by?
skweek has joined #ruby
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
p0wn3d_ has joined #ruby
jzigmund has joined #ruby
gaboesquivel has joined #ruby
thistle_ has quit [Ping timeout: 240 seconds]
sanjayu has quit [Ping timeout: 240 seconds]
weihan has quit [Client Quit]
northfurr has quit [Client Quit]
<apeiros> gnomex: no matter where you are: self.
<gnomex> apeiros: For example, 'somestring'.upcase, who is the method 'upcase' being called by?
weihan has joined #ruby
basiles has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
failshell has joined #ruby
ndrei has joined #ruby
<gnomex> apeiros: Outside a class definition, protected methods can't get invoked. But I'm just confused because self is still the object itself right? The object is calling the method.
<apeiros> again, please gist an example
<[k-> are you sure you can't invoke a protected method outside of a clads definition?
segfalt has joined #ruby
Igorshp has joined #ruby
stan has quit [Ping timeout: 252 seconds]
<[k-> that almost certainly is as restrictive as private
<[k-> that's*
<[k-> oh wait, i put the is after
<[k-> @.@
<cucumber_> Hi! I'm installing something that installs net-ssh, but it requires ruby >= 2.0. I have 1.9.1 and 2.0 installed (ubuntu). How can I "tell" to the "gem install" command to use Ruby 2.0? I don't have rvm
<karapety_> jhass: hi there, is it ok for 3rd level in Ruby warrior? http://pastie.org/10481344
<gnomex> apeiros: https://eval.in/450565
jas02 has quit [Quit: jas02]
<apeiros> [k-: the diff is that you can call a protected on an object other than self
<jhass> karapety_: I don't know
<apeiros> gnomex: not sure why you think self being a there. it's not.
<shevy> ddv I am back again! it was only half-raining though, not too heavy
SCHAAP137 has quit [Remote host closed the connection]
<apeiros> gnomex: a.equal?(self) will return false there.
davispuh has joined #ruby
<[k-> but class definition is so restrictive, sounds like private
<cucumber_> if I install ruby 2.0 (sudo apt-get install ruby2.0) it install 1.9.1 too.
<shevy> workmad3 I'd chicken out before jumping down from anything too high :)
<[k-> cucumber_ i think gem is packaged with the ruby version
<[k-> so you are using the 1.9.1 gem command
cantaberry has quit []
<cucumber_> [k-, how can run gem 2.0?
<[k-> i don't know without a ruby manager
<cucumber_> oh.. /usr/bin/gem2.0
<cucumber_> easy
<cucumber_> :)
eminencehc has quit [Remote host closed the connection]
<cucumber_> let's see
<[k-> karapety_: your code looks so...much work
solars has quit [Ping timeout: 256 seconds]
<[k-> that is obviously the work of a compiler
<[k-> expanding code
<cucumber_> [k-, is there any way to install rvm with apt-get in ubuntu?
<havenwood> cucumber_: You can select the ruby and gem you'd like with update-alternatives or Ubuntu has a ruby-switch package.
<[k-> ask havenwood!
mikecmpbll has quit [Quit: ciao.]
<cucumber_> havenwood, there you go.. thx
<havenwood> cucumber_: Or if you tire of apt-get packaged Ruby and want to build your own: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
Dopagod has joined #ruby
danman has quit [Ping timeout: 255 seconds]
<havenwood> cucumber_: The update alternatives way is: sudo update-alternatives --config ruby
<cucumber_> havenwood, I will try with apt-get first.. I need ruby only for this step. Thanks!
<karapety_> [k-: ?
<havenwood> cucumber_: Aye, if you only need one Ruby you don't need a switcher!
DEA7TH has quit [Quit: DEA7TH]
<havenwood> cucumber_: Brightbox does make good up-to-date Ruby packages if you want to use 2.2.
rcvalle has joined #ruby
<cucumber_> havenwood, the problem is with apt-get I don't have the option of only having ruby 2.0. It also installs 1.9.1
__chris has quit [Quit: Textual IRC Client: www.textualapp.com]
eGGsha has joined #ruby
<cucumber_> havenwood, I'll check it out
codecop has quit [Remote host closed the connection]
<karapety_> [k-: don't understand :)
<[k-> karapety_: try spaces = %i[left forward right back].map { |sym| warrior.feel sym }; if !spaces.any?(&:enemy?) { ... }
kobain has joined #ruby
shinnya has joined #ruby
<karapety_> [k-: ok.
<[k-> you are writing way too mucj
<[k-> very verbose
<[k-> think higher level
<[k-> that is what ruby is for, programmer happiness
eminencehc has joined #ruby
<karapety_> [k-: can't
riotjones has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kobain has quit [Max SendQ exceeded]
<havenwood> karapety_: Does it pass the third level?
<karapety_> yet
<karapety_> havenwood: yes.
<havenwood> karapety_: nice
kobain has joined #ruby
<[k-> i gave you the starting code, now you just have to repeat the pattern!
<[k-> think map, any?, all?, reduce
<karapety_> [k-: i'try
ndrei has quit [Ping timeout: 250 seconds]
<[k-> not each and other low level methods
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
SamGerber has joined #ruby
<[k-> well im going to sleep now, good byes
mistermocha has joined #ruby
gnomex has left #ruby [#ruby]
<karapety_> [k-: thx, bye
ItSANgo has quit [Quit: Leaving...]
<shevy> karapety_ less code is more
sivsushruth has quit [Ping timeout: 244 seconds]
sivsushruth has joined #ruby
tercenya has quit []
step1step2_ has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
p0wn3d_ has quit [Ping timeout: 240 seconds]
danman has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
yeshacker has quit [Read error: Connection reset by peer]
barhum2013 has joined #ruby
danman has quit [Remote host closed the connection]
[Butch] has joined #ruby
<EdwardIII> sleep? what time is it over there?
<EdwardIII> madness
hagebake has quit [Quit: No Ping reply in 180 seconds.]
psy_ has joined #ruby
arup_r has quit [Quit: Leaving]
psy_ has quit [Max SendQ exceeded]
htmldrum has joined #ruby
psy_ has joined #ruby
hagabaka has joined #ruby
momomomomo has joined #ruby
step1step2_ has quit [Quit: Leaving]
yeshacker has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
DanKnox is now known as DanKnox[away]
phutchins has quit [Ping timeout: 264 seconds]
skade has joined #ruby
tercenya has joined #ruby
jpfuentes2 has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
chopin has joined #ruby
big|bad|wolf has joined #ruby
trautwein has joined #ruby
big|bad|wolf has quit [Max SendQ exceeded]
DanKnox[away] is now known as DanKnox
shoutsid has quit [Remote host closed the connection]
l_tonz has quit [Remote host closed the connection]
maletor has joined #ruby
niemcu has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
iceweasel has joined #ruby
<shevy> he is in Singapore
l_tonz has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Timba-as has quit [Quit: Be back later ...]
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
Timba-as has joined #ruby
astrobunny has quit [Remote host closed the connection]
roshanavand has joined #ruby
rodfersou is now known as rodfersou|lunch
p0wn3d_ has joined #ruby
shredding has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby
willardg has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amclain has joined #ruby
twohlix_ has quit [Ping timeout: 264 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
l_tonz has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
joonty has quit [Quit: joonty]
wpp has quit [Quit: ZZZzzz…]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
twohlix has joined #ruby
l_tonz has joined #ruby
Timba-as has quit [Client Quit]
bMalum has joined #ruby
rgtk has quit [Remote host closed the connection]
Guest50 has joined #ruby
darkxploit has joined #ruby
rgtk has joined #ruby
l_tonz has quit [Remote host closed the connection]
joshmyers has joined #ruby
joshmyers is now known as bubu
krisquigley has quit [Remote host closed the connection]
gizmore has joined #ruby
oetjenj has joined #ruby
kies^ has joined #ruby
Peg-leg has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
raazdaan has joined #ruby
SCHAAP137 has joined #ruby
<Guest50> Likely very easy question: If you are persisting a value that must be a member of a list of things (i.e. %w{this that the other}.include?(value)) and the value is only for internal use, is it more common to persist this value in all caps or as a symbol? Or some other method I'm not familiar with?
subscope has quit [Quit: Textual IRC Client: www.textualapp.com]
towski_ has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
devoldmx has joined #ruby
michaeldeol has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
l_tonz has joined #ruby
failshell has quit [Remote host closed the connection]
<bubu> Hi, I'm trying to gsub, but in an indepotent way. 'https://?.bar.com'.gsub('bar.com', 'foo.bar.com'). If I run this multiple times I get https://foo.foo.foo.bar.com etc
Cyther has joined #ruby
phutchins has joined #ruby
Cyther has quit [Max SendQ exceeded]
<jhass> well, find a regex that doesn't match the replaced result
The_Phoenix1 has joined #ruby
<jhass> for example using a negative lookbehind assertion
Cyther has joined #ruby
Cyther has quit [Max SendQ exceeded]
The_Phoenix has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
Cyther has joined #ruby
momomomomo has joined #ruby
Cyther has quit [Max SendQ exceeded]
basiles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnufied has quit [Ping timeout: 246 seconds]
Cyther has joined #ruby
Cyther has quit [Max SendQ exceeded]
basiles has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
Cyther has joined #ruby
p0wn3d_ has quit [Ping timeout: 264 seconds]
l_tonz has quit [Ping timeout: 265 seconds]
Lucky__ has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Cyther has quit [Max SendQ exceeded]
<havenwood> Guest50: [:egrets, :finches].include? :pie
<Guest50> havenwood: So symbols for you?
Cyther has joined #ruby
<bubu> jhass: Am trying a negative look behind but having problems
Cyther has quit [Max SendQ exceeded]
The_Phoenix1 has quit [Ping timeout: 268 seconds]
duderonomy has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
<havenwood> Guest50: What do you mean by "persist" the value? What are you considering as an alternative?
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> >> %i{this that the other}
<ruboto> havenwood # => [:this, :that, :the, :other] (https://eval.in/450597)
Thomas-0725 has joined #ruby
senayar has quit []
ViolentR has joined #ruby
eminencehc has quit [Remote host closed the connection]
<havenwood> Guest50: You can use %i in place of %w for an Array of Symbols.
dionysus69 has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
__chris has joined #ruby
DLSteve has joined #ruby
eminencehc has joined #ruby
<havenwood> Guest50: It's more common to see ()s or []s instead of {}s for that notation.
__chris has quit [Client Quit]
shoutsid has joined #ruby
<Guest50> havenwood: Maybe I confused it by my explanation. I'll just give an example: So I have a user that can wants notifications, either daily, hourly, or constantly. So for this user preference, would one generally store :daily, :hourly and :constantly or would one persist "DAILY", "HOURLY", or "CONSTANTLY"?
__chris has joined #ruby
<Guest50> This is a style question more than anything.
diegobiavati has joined #ruby
<havenwood> Guest50: Not all-caps Strings.
Asher has joined #ruby
n008f4g_ has joined #ruby
symm- has joined #ruby
TomyWork has quit [Remote host closed the connection]
<havenwood> Guest50: Symbols.
<Guest50> havenwood: Not all lowercase either?
<ishikawa91> lowercase is completely acceptable
<ishikawa91> i assume you mean to store it in a database?
<Guest50> ishikawa91: Correct.
<havenwood> Guest50: Say more about what you mean by persisting them?
oetjenj has joined #ruby
<havenwood> Ah.
JDiPierro has joined #ruby
<ishikawa91> you can either store them as strings in the database, or you can have a join table where the join would be on notification_id or something
roshanavand has quit [Remote host closed the connection]
<Guest50> Sorry, I know that this is likely an opinionated question, but I'd never seen anyone's opinion on it.
<ishikawa91> and have a notification_rate table that contains the different rates
roshanavand has joined #ruby
<havenwood> Guest50: We just need to figure out what you're asking. I was on the wrong track.
<Guest50> ishikawa91: In this case, that would be overkill.
<havenwood> Guest50: Postgres?
<ishikawa91> or just keep it simple and store "daily", "hourly"in a column
<Guest50> MySQL for now.
gambl0re has quit [Ping timeout: 250 seconds]
Igorshp has joined #ruby
bubu has quit [Remote host closed the connection]
<jhass> bubu: you know, you're allowed to ask questions about it ...
anisha has joined #ruby
Igorshp has quit [Remote host closed the connection]
<jhass> ah well, timing
<Guest50> havenwood, ishikawa91: Thanks for the input.
benlieb has joined #ruby
<ishikawa91> did you figure what you need to do now?
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
<Guest50> ishikawa91: Yup, just really looking for _some_ sort of opinion. I've got it from here.
<ishikawa91> alright, cool
joncol has joined #ruby
roshanav_ has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
<joncol> What are the conventions for specifying the version of an application I'm developing? I'm using bundler and want to access my application's version number from within my code...
tno has joined #ruby
<heftig> joncol: SemVer
roshanavand has quit [Ping timeout: 240 seconds]
<heftig> joncol: if your application is packaged as a gem, you can ask gem for the version
<ishikawa91> you could also create a module within your app that contains VERSION="1.0"
<ishikawa91> then do ModuleName::VERSION
<joncol> OK, thanks
perrier has joined #ruby
weihan has quit [Ping timeout: 246 seconds]
Kendos-Kenlen has joined #ruby
bryanray has joined #ruby
l_tonz has joined #ruby
nertzy2 has joined #ruby
p0wn3d_ has joined #ruby
joncol has quit [Client Quit]
SamGerber has quit [Quit: Leaving]
peteykun has quit [Quit: Leaving]
grekko has quit [Quit: Textual IRC Client: www.textualapp.com]
allcentury has quit [Ping timeout: 240 seconds]
<caliostro> gem install GEMNAME -v VERSION_NUM
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
helpa-bot has joined #ruby
bluOxigen has joined #ruby
barhum2013 has quit [Quit: barhum2013]
barhum2013 has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
sonOfRa_ has joined #ruby
helpa-bot has quit [Remote host closed the connection]
_fumk has joined #ruby
helpa has quit [Remote host closed the connection]
freerobby has joined #ruby
helpa-bot has joined #ruby
grumpycat has joined #ruby
df- has joined #ruby
[ace]_ has joined #ruby
bartj3_ has joined #ruby
devyn_ has joined #ruby
speaking1ode has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
helpa-bot has quit [Remote host closed the connection]
erichmenge_ has joined #ruby
dmolina has quit [Quit: Leaving.]
bluOxigen has quit [Read error: No route to host]
bluOxigen has joined #ruby
adac has quit [Ping timeout: 250 seconds]
oetjenj has joined #ruby
heinrich5991_ has joined #ruby
\13k has joined #ruby
ausec_ has joined #ruby
Karunamon|2 has joined #ruby
fumduq- has joined #ruby
bahar_ has joined #ruby
mayamai has joined #ruby
lady3bean_ has joined #ruby
julie_harshaw has joined #ruby
Junaos_ has joined #ruby
imajes_ has joined #ruby
hfp__work has joined #ruby
Renich has quit [Ping timeout: 240 seconds]
toretore has joined #ruby
Junaos has quit [Disconnected by services]
gril has joined #ruby
barhum2013 has quit [Quit: barhum2013]
oz` has joined #ruby
lorn_ has joined #ruby
ruurd has joined #ruby
Renich has joined #ruby
helpa has joined #ruby
Zai00 has quit [Quit: Zai00]
Junaos_ is now known as Junaos
Junaos has quit [Changing host]
Junaos has joined #ruby
Danishman has joined #ruby
Zai00 has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
Ankhers_ has joined #ruby
CustosLim3n has joined #ruby
allcentury has joined #ruby
caliostro_ has joined #ruby
rgtk has quit [*.net *.split]
n008f4g_ has quit [*.net *.split]
aryaching_ has quit [*.net *.split]
speakingcode has quit [*.net *.split]
chouhoulis has quit [*.net *.split]
cdg has quit [*.net *.split]
prefixed has quit [*.net *.split]
step1step2 has quit [*.net *.split]
Voker57 has quit [*.net *.split]
julieeharshaw has quit [*.net *.split]
devyn has quit [*.net *.split]
astrobun_ has quit [*.net *.split]
mrtomme has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
matugm has quit [*.net *.split]
Pro| has quit [*.net *.split]
arthurnn has quit [*.net *.split]
Contigi has quit [*.net *.split]
EdwardIII has quit [*.net *.split]
ausec has quit [*.net *.split]
Puffball has quit [*.net *.split]
fumk has quit [*.net *.split]
sphex has quit [*.net *.split]
Ankhers has quit [*.net *.split]
nibbo has quit [*.net *.split]
absolutejam has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
sami has quit [*.net *.split]
marienz has quit [*.net *.split]
Norm has quit [*.net *.split]
sross07 has quit [*.net *.split]
oz has quit [*.net *.split]
hfp_work has quit [*.net *.split]
\13k_ has quit [*.net *.split]
sonOfRa has quit [*.net *.split]
df has quit [*.net *.split]
crowell has quit [*.net *.split]
ozzloy has quit [*.net *.split]
BaNzounet has quit [*.net *.split]
fumduq has quit [*.net *.split]
DefV has quit [*.net *.split]
c0ncealed has quit [*.net *.split]
bw_ has quit [*.net *.split]
bluntman has quit [*.net *.split]
heinrich5991 has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
mblagden has quit [*.net *.split]
lorn has quit [*.net *.split]
devn has quit [*.net *.split]
CustosLimen has quit [*.net *.split]
bahar has quit [*.net *.split]
romero has quit [*.net *.split]
nifoc has quit [*.net *.split]
erichmenge has quit [*.net *.split]
iamayam has quit [*.net *.split]
scepticulous has quit [*.net *.split]
go|dfish has quit [*.net *.split]
Sthebig has quit [*.net *.split]
cats has quit [*.net *.split]
Killerkeksdose has quit [*.net *.split]
klaas has quit [*.net *.split]
cscheib has quit [*.net *.split]
freeze has quit [*.net *.split]
d0lph1n98 has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
bartj3 has quit [*.net *.split]
darix has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
KillerFox has quit [*.net *.split]
ekem has quit [*.net *.split]
ss_ss has quit [*.net *.split]
raenk has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
imajes has quit [*.net *.split]
yorickpeterse has quit [*.net *.split]
inukshuk has quit [*.net *.split]
_mh_ has quit [*.net *.split]
wjimenez5271 has quit [*.net *.split]
awk has quit [*.net *.split]
ryotarai has quit [*.net *.split]
Muz has quit [*.net *.split]
FifthWall has quit [*.net *.split]
Karunamon has quit [*.net *.split]
[ace] has quit [*.net *.split]
forgot has quit [*.net *.split]
mame2 has quit [*.net *.split]
lady3bean has quit [*.net *.split]
hypnosb has quit [*.net *.split]
l_tonz has quit [*.net *.split]
Asher has quit [*.net *.split]
devoldmx has quit [*.net *.split]
towski_ has quit [*.net *.split]
kies^ has quit [*.net *.split]
rcvalle has quit [*.net *.split]
jzigmund has quit [*.net *.split]
jmignault has quit [*.net *.split]
caliostro has quit [*.net *.split]
balazs has quit [*.net *.split]
blaxter has quit [*.net *.split]
blueOxigen has quit [*.net *.split]
pygospa has quit [*.net *.split]
arthurix_ has quit [*.net *.split]
ajaiswal has quit [*.net *.split]
havenwood has quit [*.net *.split]
jtperreault has quit [*.net *.split]
PierreRambaud has quit [*.net *.split]
weaksauce has quit [*.net *.split]
woodruffw has quit [*.net *.split]
DrCode has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
headius has quit [*.net *.split]
dfoolz has quit [*.net *.split]
RazorX- has quit [*.net *.split]
stacybir1 has quit [*.net *.split]
nug has quit [*.net *.split]
konopka has quit [*.net *.split]
joast has quit [*.net *.split]
acidrainfall has quit [*.net *.split]
mprelude has quit [*.net *.split]
scottstamp has quit [*.net *.split]
amoeba` has quit [*.net *.split]
kurzweil has quit [*.net *.split]
Kharma has quit [*.net *.split]
jbw has quit [*.net *.split]
three18t- has quit [*.net *.split]
shawnacscott has quit [*.net *.split]
Hamled|Erp has quit [*.net *.split]
nisstyre has quit [*.net *.split]
Guest64609 has quit [*.net *.split]
Liothen has quit [*.net *.split]
BraddPitt has quit [*.net *.split]
perry has quit [*.net *.split]
bradland has quit [*.net *.split]
benaiah has quit [*.net *.split]
tokik has quit [*.net *.split]
Eising has quit [*.net *.split]
p7r has quit [*.net *.split]
alol has quit [*.net *.split]
bmn has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
kramsee has quit [*.net *.split]
erichmenge_ is now known as erichmenge
oz` is now known as oz
df- is now known as df
hfp__work is now known as hfp_work
grumpycat is now known as cats
imajes_ is now known as imajes
heinrich5991_ is now known as heinrich5991
ViolentR has quit [Ping timeout: 272 seconds]
Antiarc has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegobiavati has quit [Ping timeout: 244 seconds]
roshanav_ has quit [Remote host closed the connection]
dostoyevsky has joined #ruby
graingert has joined #ruby
<graingert> Does anyone know how to override and extend a method that uses the yield keyword through sub-classing?
last_staff has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Remote host closed the connection]
caliostro_ has quit [Ping timeout: 240 seconds]
ngscheur1 has joined #ruby
oetjenj has joined #ruby
ValicekB has quit [Ping timeout: 240 seconds]
ItSANgo has joined #ruby
<graingert> but as soon as I call super parse yields (time, record) into the passed block
<graingert> but I want to be able to modify those values
nisstyre has joined #ruby
petricore has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
<toretore> first of all get rid of that return on L16
shinnya has quit [Ping timeout: 250 seconds]
<toretore> then get rid of the yield
caliostro_ has joined #ruby
raazdaan has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
symm- has quit [Quit: Leaving...]
<toretore> wait
<toretore> nm
kalusn has quit [Remote host closed the connection]
oetjenj has quit [Client Quit]
ViolentR has joined #ruby
arturmartins has quit [Quit: Leaving...]
bitsapien has joined #ruby
<graingert> @toretore that gives me a syntax error
arashb has joined #ruby
roshanavand has joined #ruby
<graingert> stringified_values_json_parser.rb:19: syntax error, unexpected '\n', expecting '='
shoutsid has quit [Remote host closed the connection]
symm- has joined #ruby
<toretore> time, record = super(text); change(time, record); if block_given?; yield time, record; end; time, record]
<toretore> time, record = super(text); change(time, record); if block_given?; yield time, record; end; [time, record]
rdark has quit [Quit: leaving]
shortdudey123 has joined #ruby
Asher has joined #ruby
l_tonz has joined #ruby
towski_ has joined #ruby
kies^ has joined #ruby
scottstamp has joined #ruby
acidrainfall has joined #ruby
Hamled|Erp has joined #ruby
jtperreault has joined #ruby
bmn has joined #ruby
connor_goodwolf has joined #ruby
RazorX- has joined #ruby
p7r has joined #ruby
arthurix_ has joined #ruby
Guest64609 has joined #ruby
joast has joined #ruby
balazs has joined #ruby
stacybir1 has joined #ruby
amoeba` has joined #ruby
DrCode has joined #ruby
headius has joined #ruby
dfoolz has joined #ruby
tokik has joined #ruby
mprelude has joined #ruby
nug has joined #ruby
PierreRambaud has joined #ruby
ajaiswal has joined #ruby
shawnacscott has joined #ruby
konopka has joined #ruby
rcvalle has joined #ruby
bradland has joined #ruby
perry has joined #ruby
havenwood has joined #ruby
kramsee has joined #ruby
benaiah has joined #ruby
Kharma has joined #ruby
kurzweil has joined #ruby
Eising has joined #ruby
three18t- has joined #ruby
jbw has joined #ruby
alol has joined #ruby
BraddPitt has joined #ruby
jzigmund has joined #ruby
weaksauce has joined #ruby
pygospa has joined #ruby
jaredrhine has joined #ruby
woodruffw has joined #ruby
Liothen has joined #ruby
diegoaguilar has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
three18t- has quit [Max SendQ exceeded]
zenguy_pc has joined #ruby
jessemcgilallen has joined #ruby
firstdayonthejob has joined #ruby
cek has quit [Ping timeout: 240 seconds]
three18ti has joined #ruby
jackjackdripper has joined #ruby
diegobiavati has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__butch__ has joined #ruby
ViolentR has quit [Ping timeout: 244 seconds]
<graingert> @toretore what happens when the super class removes the deprecated return statement?
cek has joined #ruby
_wldcordeiro has quit [Quit: WeeChat 1.1.1]
<toretore> what
naztharune has joined #ruby
<toretore> code pls
QORRiE has joined #ruby
QORRiE has joined #ruby
marienz has joined #ruby
yorickpeterse has joined #ruby
basiles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 240 seconds]
__butch__ has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
l_tonz has quit [*.net *.split]
Asher has quit [*.net *.split]
towski_ has quit [*.net *.split]
kies^ has quit [*.net *.split]
rcvalle has quit [*.net *.split]
jzigmund has quit [*.net *.split]
balazs has quit [*.net *.split]
pygospa has quit [*.net *.split]
arthurix_ has quit [*.net *.split]
ajaiswal has quit [*.net *.split]
havenwood has quit [*.net *.split]
jtperreault has quit [*.net *.split]
PierreRambaud has quit [*.net *.split]
weaksauce has quit [*.net *.split]
woodruffw has quit [*.net *.split]
DrCode has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
headius has quit [*.net *.split]
dfoolz has quit [*.net *.split]
RazorX- has quit [*.net *.split]
stacybir1 has quit [*.net *.split]
nug has quit [*.net *.split]
konopka has quit [*.net *.split]
joast has quit [*.net *.split]
acidrainfall has quit [*.net *.split]
mprelude has quit [*.net *.split]
scottstamp has quit [*.net *.split]
amoeba` has quit [*.net *.split]
kurzweil has quit [*.net *.split]
Kharma has quit [*.net *.split]
jbw has quit [*.net *.split]
shawnacscott has quit [*.net *.split]
Hamled|Erp has quit [*.net *.split]
Guest64609 has quit [*.net *.split]
Liothen has quit [*.net *.split]
BraddPitt has quit [*.net *.split]
perry has quit [*.net *.split]
benaiah has quit [*.net *.split]
bradland has quit [*.net *.split]
tokik has quit [*.net *.split]
Eising has quit [*.net *.split]
p7r has quit [*.net *.split]
alol has quit [*.net *.split]
bmn has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
kramsee has quit [*.net *.split]
darix has joined #ruby
[Butch] has quit [Ping timeout: 250 seconds]
sami has joined #ruby
freeze has joined #ruby
DefV has joined #ruby
cscheib has joined #ruby
klaas has joined #ruby
devn has joined #ruby
Killerkeksdose has joined #ruby
BaNzounet has joined #ruby
KillerFox has joined #ruby
mblagden has joined #ruby
EdwardIII has joined #ruby
matugm has joined #ruby
matugm has joined #ruby
Muz has joined #ruby
absolutejam has joined #ruby
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Puffball has joined #ruby
arthurnn has joined #ruby
nibbo has joined #ruby
Pro| has joined #ruby
raenk has joined #ruby
bluntman has joined #ruby
hypnosb has joined #ruby
ekem has joined #ruby
mrconfused has joined #ruby
BrazenBraden has joined #ruby
sphex has joined #ruby
Sthebig has joined #ruby
Sthebig has quit [Changing host]
Sthebig has joined #ruby
ss_ss has joined #ruby
sross07 has joined #ruby
step1step2 has joined #ruby
ryotarai has joined #ruby
shortdudey123 has joined #ruby
FifthWall has joined #ruby
mame2 has joined #ruby
cdg has joined #ruby
tno has quit [Quit: Ex-Chat]
chouhoulis has joined #ruby
yeltzooo has joined #ruby
go|dfish has joined #ruby
astrobunny has joined #ruby
bitsapien has joined #ruby
hypnosb has quit [Max SendQ exceeded]
step1step2 has quit [Max SendQ exceeded]
rgtk has joined #ruby
_mh_ has joined #ruby
_mh_ has quit [Changing host]
_mh_ has joined #ruby
mrtomme has joined #ruby
nifoc has joined #ruby
TheBrayn has joined #ruby
dennis_ has joined #ruby
step1step2 has joined #ruby
hypnosb has joined #ruby
Gnubie_ has joined #ruby
crowell has joined #ruby
crowell has joined #ruby
d0lph1n98 has joined #ruby
wjimenez5271 has joined #ruby
aryaching has joined #ruby
rodfersou|lunch is now known as rodfersou
wedgwood has joined #ruby
basiles has joined #ruby
<graingert> toretore: in fluend v1 these plugins will only yield
Zai00 has joined #ruby
<toretore> ruby methods always return something
<toretore> yield returns whatever the block returns
bw_ has joined #ruby
Voker57 has joined #ruby
__butch__ has joined #ruby
l_tonz has joined #ruby
Asher has joined #ruby
jzigmund has joined #ruby
kies^ has joined #ruby
acidrainfall has joined #ruby
ajaiswal has joined #ruby
joast has joined #ruby
jtperreault has joined #ruby
dfoolz has joined #ruby
havenwood has joined #ruby
amoeba` has joined #ruby
rcvalle has joined #ruby
RazorX- has joined #ruby
Liothen has joined #ruby
konopka has joined #ruby
mprelude has joined #ruby
arthurix_ has joined #ruby
nug has joined #ruby
DrCode has joined #ruby
weaksauce has joined #ruby
shawnacscott has joined #ruby
scottstamp has joined #ruby
Guest64609 has joined #ruby
BraddPitt has joined #ruby
balazs has joined #ruby
Kharma has joined #ruby
headius has joined #ruby
Hamled|Erp has joined #ruby
PierreRambaud has joined #ruby
stacybir1 has joined #ruby
pygospa has joined #ruby
jbw has joined #ruby
perry has joined #ruby
p7r has joined #ruby
kramsee has joined #ruby
jaredrhine has joined #ruby
connor_goodwolf has joined #ruby
tokik has joined #ruby
bmn has joined #ruby
benaiah has joined #ruby
alol has joined #ruby
Eising has joined #ruby
towski_ has joined #ruby
woodruffw has joined #ruby
kurzweil has joined #ruby
bradland has joined #ruby
c0ncealed has joined #ruby
<graingert> toretore: in this case the caller of this method provides a block
<graingert> always
<graingert> and soon the super class will always yield to this block
headius has quit [Quit: ZNC - http://znc.in]
arthurix has joined #ruby
<graingert> if you try to do foo = super(text), foo will be nil
headius has joined #ruby
shoutsid has joined #ruby
tokik has quit [Max SendQ exceeded]
<Eising> oh wow, netsplit. No wonder why nobody answered my question before.
dionysus69 has joined #ruby
<graingert> when they remove the checks for block_given
tokik has joined #ruby
skade has joined #ruby
<Eising> I'll try again:
Sp4rKy has joined #ruby
_wldcordeiro has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
<Eising> I need a bit of advice. I've quit my job, and I've been asked to document a sinatra web application I've written. Is there are the current smart ways of documentation? Still rdoc? Speaking in general terms
inukshuk has joined #ruby
romero has joined #ruby
forgot has joined #ruby
awk has joined #ruby
romero is now known as Guest36750
awk is now known as Guest84489
<sjums> did you solve your csv problem, Guest84489?
Zai00 has quit [Client Quit]
<dorei> Eising: maybe yard
<Eising> yard looks interesting, yes
Zai00 has joined #ruby
TheNet has joined #ruby
arthurix_ has quit [Ping timeout: 265 seconds]
mrconfused has quit [Ping timeout: 268 seconds]
<toretore> Eising: comments in code and then a readme if that doesn't suffice
<Eising> yeah, am going to go through my code
hanmac has joined #ruby
<toretore> or you could make a word document and upload it to the company's intranet server
<Eising> I'm waiting for the CTOs approval to open source it.
mark3 has quit [Remote host closed the connection]
<Eising> toretore: wow, that sounds like something some people I know would do :P
<graingert> toretore: I want to make Bar.handler alter the data yielded into the block from Foo.handler
ValicekB has joined #ruby
<toretore> be sure to take a picture of the code and then convert that picture into a pdf
<toretore> graingert: did you try the code i pasted?
<graingert> toretore: yeah it works perfectly
<graingert> but it's using the deprecated code path
<Eising> toretore: you mean a screenshot and then paste it in to a powerpoint presentation?
Soda has joined #ruby
<toretore> yes, if by screenshot you mean a polaroid that you then scan
<Eising> excellent!
<iceweasel> Someone help me fix my spinner https://gist.github.com/anonymous/4a970a635445ca1df05a ?
<toretore> graingert: what do you mean deprecated?
<Eising> toretore: I don't have a polaroid camera. Can I take a phone picture and then photo copy my phone's screen?
Alina-malina has joined #ruby
krisquigley has joined #ruby
<TheNet> I want to scan a string with an expression and get an array of all the matches. when I use scan with capturing groups through I get a multidimensional array. Here's the regex and string http://regexr.com/3c00u, what's the best way to solve this?
blackmesa has joined #ruby
<TheNet> here's the array I get when I run it through ruby's scan: [["10 s", nil], ["10k", nil]]
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
<toretore> iceweasel: define "no worky"
<toretore> Eising: sure, that'll work
<iceweasel> toretore, it doesn't print anything out
basiles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
Zai00 has quit [Quit: Zai00]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore> >> '10 s 10k 10'.scan(/\b[0-9]+ {0,1}[A-z]\b|\b[0-9]+\b/g)
<ruboto> toretore # => /tmp/execpad-902eb49fecf5/source-902eb49fecf5:2: unknown regexp option - g (https://eval.in/450653)
<toretore> fuck
<toretore> >> '10 s 10k 10'.scan(/\b[0-9]+ {0,1}[A-z]\b|\b[0-9]+\b/)
<ruboto> toretore # => ["10 s", "10k", "10"] (https://eval.in/450654)
DEA7TH has joined #ruby
Zai00 has joined #ruby
<toretore> iceweasel: add a puts after it's done printing
`tim` has joined #ruby
<toretore> or STDOUT.flush
stannard_ has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
caliostro_ has quit [Quit: Exit-Chat]
<iceweasel> toretore, ok one sec
jgt has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
<TheNet> toretore: thanks, didn't realize I didn't need the capture groups
roshanavand has quit [Remote host closed the connection]
<graingert> I don't have access to edit the Foo class
<cucumber_> with /usr/bin/gem2.0 worked fine. Thank you all!
<iceweasel> toretore, No luck :(
darkxploit has quit [Quit: Leaving]
ndrei has quit [Ping timeout: 250 seconds]
<iceweasel> let me have another look through it
<toretore> graingert: i don't see how this is relevant to the problem
stannard_ has quit [Remote host closed the connection]
Zai00 has quit [Client Quit]
arturmartins has joined #ruby
TheNet has quit [Remote host closed the connection]
Zai00 has joined #ruby
<toretore> the method you're overriding does return the values when no block is given
`tim` has quit [Client Quit]
bMalum has quit [Quit: bMalum]
<toretore> so: don't give super the block, take the return values, change them how you want, then yield/return them
`tim` has joined #ruby
failshell has joined #ruby
stannard_ has joined #ruby
`tim` has quit [Client Quit]
stannard has quit [Ping timeout: 264 seconds]
<graingert> toretore: it's obvious now thanks: https://gist.github.com/graingert/269b72e119428e53b8b3
stannard_ has quit [Remote host closed the connection]
sonOfRa_ is now known as sonOfRa
<toretore> graingert: i think you're confused as to how super works. if you call `super` it will call the parent with exactly the same arguments, including the block
<graingert> yes but I want to override the block
<adaedra> `super` != `super()`
<toretore> super() -> no args, super(text) -> 1 arg, super(text, &b) -> arg+blk
<adaedra> if you want to override, you'll have to explicitely give arguments to super
<iceweasel> toretore, Found the problem, nano saved it as two seperate files, must of one has spin_thr.join the other didn't. Thanks anyway
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
p0wn3d_ has quit [Ping timeout: 250 seconds]
<toretore> graingert: there is no need to "override the block"
Zai00 has quit [Client Quit]
[Butch] has joined #ruby
snockerton has joined #ruby
Zai00 has joined #ruby
<snockerton> using the system("command") method, is there a way i can get the stdout back into a ruby variable?
bMalum has joined #ruby
<graingert> toretore: can you fork my gist to explain?
<toretore> which?
basiles has joined #ruby
adac has joined #ruby
pch has joined #ruby
pch has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<graingert> so I'm doing my override by wrapping the block and call to yield with a call to downcas
<graingert> downcase
<graingert> is there a way to do it more Rubonicly?
<iceweasel> snockerton, Use IO.popen
<toretore> graingert: that code is not comparable to the one you're working with
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<graingert> toretore: true the code I'm working with does an optional return
<graingert> toretore: but they are going to remove that in v1
leafybas_ has joined #ruby
<graingert> and make it more like the example I pasted
<toretore> then yes, do that
<graingert> so I do need to override the block?
<toretore> you should have mentioned this at the beginning
bitsapien has joined #ruby
s2013 has joined #ruby
<graingert> I did, maybe you missed it in the netsplit
TheNet has joined #ruby
Zai00 has quit [Client Quit]
<toretore> ok, i see it now sorry
roshanavand has joined #ruby
Zai00 has joined #ruby
<adaedra> snockerton: if you just have to get the output, just use the backticks, i.e. `command`
stannard has joined #ruby
leafybasil has quit [Ping timeout: 252 seconds]
Zai00 has quit [Client Quit]
Hounddog has quit [Remote host closed the connection]
Zai00 has joined #ruby
skweek has joined #ruby
leafybas_ has quit [Ping timeout: 256 seconds]
<iceweasel> snockerton, Yeah use backticks for just stdout if you need stderr to use something like var = IO.popen('ls 2>&1').read
apfeluser has joined #ruby
S_Walker has quit [Quit: ZNC - http://znc.in]
TheNet has quit [Ping timeout: 264 seconds]
<toretore> just use open4 :P
<iceweasel> toretore, or that :)
<snockerton> iceweasel: thx, that's what i need
TheNet has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
shmilan has joined #ruby
<iceweasel> snockerton, np :)
apfeluser has quit [Client Quit]
ht__ has joined #ruby
northfurr has joined #ruby
diegobiavati has quit [Remote host closed the connection]
riotjone_ has joined #ruby
ericjphillips has joined #ruby
<toretore> graingert: what you have is basically the way to do it, yes
bMalum has quit [Quit: bMalum]
bMalum has joined #ruby
bMalum has quit [Client Quit]
TheNet has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
momomomomo has quit [Quit: momomomomo]
<adaedra> Stop netsplitting
yeshacker has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
Spami has joined #ruby
davedev2_ has joined #ruby
urubuz has joined #ruby
pdoherty has quit [Quit: Leaving]
baweaver has joined #ruby
Snarkz has joined #ruby
riotjone_ has quit [Ping timeout: 252 seconds]
oetjenj has joined #ruby
northfurr has quit [Quit: northfurr]
DanKnox is now known as DanKnox[away]
darkxploit has joined #ruby
ndrei has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
platzhirsch has left #ruby [#ruby]
skweek has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
Zai00 has quit [Quit: Zai00]
davedev2_ has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
genpaku has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
Zai00 has joined #ruby
Brando753 has joined #ruby
wharr has joined #ruby
<wharr> I have two rails methods that I want to redirect to the same action after completion. Can I use an after filter for this?
genpaku has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
<toretore> wharr: ?rubyonrails
<toretore> wharr: ?rails
<iceweasel> ?rails wharr
<ruboto> wharr, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<toretore> shit
<adaedra> ?coffee toretore
<ruboto> toretore, here's a coffee, you seem to need it: ☕
<wharr> :( I didn't want to register
htmldrum has quit [Ping timeout: 240 seconds]
<toretore> coffee coffee coffee coffee coffee http://media.giphy.com/media/KFmOfbl5mrbK8/giphy.gif
darkf has quit [Quit: Leaving]
<iceweasel> Is that a cockatail?
symbol_ has joined #ruby
kalusn has joined #ruby
northfurr has quit [Client Quit]
Zai00 has quit [Client Quit]
psy_ has joined #ruby
rwilcox has joined #ruby
cucumber_ has quit [Quit: chau]
Zai00 has joined #ruby
TheNet has joined #ruby
Zai00 has quit [Client Quit]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> it's a coffatoo
<iceweasel> lol :)
TheNet has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
basiles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Quandl has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
baweaver has quit [Remote host closed the connection]
ZucchiniZe is now known as ZucchiniZe-
devdazed has quit [Quit: Computer has gone to sleep.]
tier_ has quit [Remote host closed the connection]
ZucchiniZe- is now known as ZucchiniZe
devdazed has joined #ruby
tier has joined #ruby
thistle_ has joined #ruby
skweek has joined #ruby
willardg has quit [Quit: Textual IRC Client: www.textualapp.com]
diegoviola has quit [Ping timeout: 255 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
renderfu_ has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermo_ has joined #ruby
lian has joined #ruby
eminencehc has quit [Remote host closed the connection]
lian is now known as lianj
htmldrum has quit [Ping timeout: 240 seconds]
craysiii has joined #ruby
lianj has quit [Changing host]
lianj has joined #ruby
bb010g has joined #ruby
thistle has quit [Ping timeout: 246 seconds]
eminencehc has joined #ruby
petricor_ has joined #ruby
diegoviola has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
Musashi007 has joined #ruby
renderfu_ has quit [Ping timeout: 240 seconds]
petricore has quit [Ping timeout: 256 seconds]
mistermocha has joined #ruby
mistermo_ has quit [Ping timeout: 265 seconds]
yeshacker has joined #ruby
__chris has quit [Quit: Textual IRC Client: www.textualapp.com]
petricor_ has quit [Client Quit]
K3VA has joined #ruby
karapety_ has quit [Remote host closed the connection]
qwertme has joined #ruby
petricore has joined #ruby
qwertme has quit [Client Quit]
karapetyan has joined #ruby
TheNet has joined #ruby
mrconfused has joined #ruby
failshell has quit [Remote host closed the connection]
BSaboia has joined #ruby
podman has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
baweaver has joined #ruby
jackjackdripper has joined #ruby
failshell has joined #ruby
l_tonz has quit [Remote host closed the connection]
baweaver has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
baweaver has joined #ruby
TheNet has quit [Read error: Connection reset by peer]
willardg has joined #ruby
TheNet has joined #ruby
hakunin has joined #ruby
saddad has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
SCHAAP137 has quit [Quit: Leaving]
TheNet has quit [Read error: Connection reset by peer]
hololeap has joined #ruby
<hololeap> is anyone here familiar with celluloid? #celluloid seems pretty dead...
TheNet has joined #ruby
I has joined #ruby
I has quit [Client Quit]
<hololeap> i want to know how to shut down my actors cleanly so i don't get "Couldn't cleanly terminate all actors in 10 seconds!" every time i quit
dopie has joined #ruby
tier_ has joined #ruby
TheNet has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
`tim` has joined #ruby
<hololeap> i have some long sleeps that i've refactored `wait_time.times { sleep 1 }` hoping this would give each actor a chance to respond, but it would be helpful to know if there was a way to check if an actor has recieved a shutdown signal so that i can clean it up
baweaver has quit [Remote host closed the connection]
willardg has quit [Quit: Textual IRC Client: www.textualapp.com]
tier has quit [Ping timeout: 246 seconds]
Novalenka has quit [Quit: leaving]
hobodave has joined #ruby
EmeraldExplorer has joined #ruby
lubarch has quit [Quit: leaving]
yfeldblum has joined #ruby
jenrzzz has joined #ruby
SCHAAP137 has joined #ruby
haylon has joined #ruby
<hololeap> toretore: that's helpful :)
momomomomo has joined #ruby
<toretore> i don't really understand exactly what the problem you're having is though
lkba has quit [Read error: Connection reset by peer]
<toretore> and i don't really know much about celluloid either
ericjphillips has quit [Quit: Leaving.]
<hololeap> i don't either... to both of those
lkba has joined #ruby
<toretore> it sounds like either 1) your actor doesn't have any shutdown logic or 2) it blocks and isn't able to respond to a shutdown signal in time
l_tonz has joined #ruby
gusrub has joined #ruby
Guest15240 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Porfa has quit [Quit: Porfa]
TheNet has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
TheNet has joined #ruby
cdg has quit [Remote host closed the connection]
Guest15240 has quit [Client Quit]
gusrub has quit [Client Quit]
gusrub has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheNet has quit [Read error: Connection reset by peer]
gusrub has quit [Client Quit]
mdih has quit [Ping timeout: 246 seconds]
Guest50 has joined #ruby
ramfjord has joined #ruby
gusrub has joined #ruby
TheNet has joined #ruby
lubarch has joined #ruby
lubarch has quit [Client Quit]
<hololeap> toretore: true... so i should have cleared up the block problem by breaking the sleeps into multiple 1 second sleeps, no? and the shutdown logic would just be with the finalizer method?
symm- has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
ericjphillips has joined #ruby
codecop has joined #ruby
tier_ has quit [Remote host closed the connection]
TheNet has quit [Read error: Connection reset by peer]
<toretore> hololeap: gist the code?
thistle_ has quit [Ping timeout: 246 seconds]
TheNet has joined #ruby
tier has joined #ruby
stevednd has joined #ruby
user1138 has joined #ruby
devoldmx has joined #ruby
riotjone_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
nym_ has joined #ruby
<hololeap> it's a bit too big for that...
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
howdoi has quit [Quit: Connection closed for inactivity]
tier_ has joined #ruby
bitsapien has joined #ruby
Xeago has joined #ruby
riotjone_ has quit [Ping timeout: 252 seconds]
mrconfused has quit [Ping timeout: 265 seconds]
karapetyan has quit [Ping timeout: 264 seconds]
tier has quit [Ping timeout: 240 seconds]
Timba-as has joined #ruby
lenwood has joined #ruby
dikaio has joined #ruby
TheNet has quit [Read error: Connection reset by peer]
zenguy_pc has quit [Ping timeout: 264 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
TheNet has joined #ruby
leafybasil has joined #ruby
chrisja has joined #ruby
dmolina1 has joined #ruby
saddad has quit [Ping timeout: 255 seconds]
mistermocha has quit [Remote host closed the connection]
A124 has quit [Ping timeout: 268 seconds]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
p0wn3d_ has joined #ruby
A124 has joined #ruby
Guest50 has joined #ruby
atmosx has joined #ruby
mrconfused has joined #ruby
mistermocha has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
niemcu has quit [Ping timeout: 252 seconds]
last_staff has quit [Ping timeout: 255 seconds]
BrunoSaboia has joined #ruby
p0wn3d_ has quit [Ping timeout: 260 seconds]
worstcase has joined #ruby
bitsapien has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
TheNet has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 265 seconds]
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tier_ has quit [Ping timeout: 250 seconds]
tier has joined #ruby
TheNet has joined #ruby
zenguy_pc has joined #ruby
Xiti has quit [Quit: Xiti]
<worstcase> any pointers how i can do const_get and spawn a class in the right namespace?
tvon has joined #ruby
Musashi007 has quit [Quit: Musashi007]
TheNet has quit [Ping timeout: 252 seconds]
<tvon> Q: I had thought ruby ditched patchlevels after 2.0.0, however for ruby 2.2.3 I see the version as 2.2.3p173. Pointers to finding out more about that p173?
mistermocha has joined #ruby
mary5030 has quit [Remote host closed the connection]
bmurt has joined #ruby
dmolina1 has quit [Quit: Leaving.]
symbol__ has joined #ruby
kadoppe has quit [Ping timeout: 268 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symbol_ has quit [Ping timeout: 260 seconds]
kadoppe has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
adac has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
<havenwood> TvL2386: Ruby 2.2.3 happens to be patch level 173 but the patch level isn't part of the version.
Xiti has joined #ruby
jessemcgilallen has quit [Read error: Connection reset by peer]
<havenwood> TvL2386: When Ruby 2.2.3 was released there had been 173 patches since Ruby 2.2.0.
<havenwood> TvL2386: When Ruby 2.0 maintenance mode is ended on Feb 24 all Rubies will be sem ver: https://www.ruby-lang.org/en/news/2013/12/21/ruby-version-policy-changes-with-2-1-0/
mistermocha has quit [Remote host closed the connection]
naztharune has quit [Quit: BitchX: now Y2K compatible!]
symm- has joined #ruby
gusrub has quit [Remote host closed the connection]
bryanray has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
gusrub has joined #ruby
krisquigley has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
pandaant has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
Dopagod has quit [Ping timeout: 256 seconds]
krisquigley has quit [Ping timeout: 265 seconds]
ericjphillips has quit [Quit: Leaving.]
baweaver has joined #ruby
adac has joined #ruby
baweaver has quit [Remote host closed the connection]
bw_ has left #ruby [#ruby]
blackmesa has joined #ruby
baweaver has joined #ruby
urubuz has quit [Remote host closed the connection]
<tvon> interesting
<tvon> havenwood: you got bitten by autocomplete there, btw :)
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SylarRuby has joined #ruby
<havenwood> TvL2386: Sorry for the misstell.
<havenwood> tvon: Oops, a disconnect borked my <tab>.
codecop has quit [Quit: Išeinu]
bluOxigen has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Remote host closed the connection]
bluOxigen has joined #ruby
<SylarRuby> anyone could help with this please? https://gist.github.com/SylarRuby/ff1d756bded295c495f5
DLSteve has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
funguy1 has joined #ruby
lenwood has quit [Ping timeout: 252 seconds]
<funguy1> anyone home
Oog has joined #ruby
Snarkz has joined #ruby
saddad has joined #ruby
mistermocha has joined #ruby
opensource_ninja has joined #ruby
A124 has quit [Ping timeout: 268 seconds]
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
SylarRuby has quit [Remote host closed the connection]
musou has joined #ruby
<korolyov> :-)
balazs has quit [Ping timeout: 265 seconds]
* tvon tips his fedora
tvon has quit [Quit: leaving]
maletor has quit [Quit: Computer has gone to sleep.]
mdih has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
A124 has joined #ruby
V1s1ble has joined #ruby
<V1s1ble> Question. So in this example: http://pastie.org/10481865 If I uncomment that puts, the output of this function actually changes
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<V1s1ble> like the return value changes..... I understand there is a return .. unless .. else .. end, set of control statements goin on there, but why does the puts before everything change the output?!
bluOxigen has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: Leaving]
nfk has joined #ruby
Snarkz has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
baweaver has quit [Remote host closed the connection]
kirun has joined #ruby
acke has joined #ruby
_aeris_ has quit [Ping timeout: 250 seconds]
s2013 has joined #ruby
pocketprotector- has joined #ruby
oetjenj has joined #ruby
_aeris_ has joined #ruby
Thomas-0725 has joined #ruby
balazs has joined #ruby
thistle has joined #ruby
ngscheurich has joined #ruby
<toretore> V1s1ble: puts changes base_directory somehow. what is it?
htmldrum has joined #ruby
jgt has quit [Quit: WeeChat 1.2]
jgt has joined #ruby
<V1s1ble> toretore, it pumps a bunch of stuff through there... /home/cassius/webspace/jekyll-foundation to start with. But if I puts twice, they're equal...how can puts change something like that. The .class is a string...unless it's string function is a lambda or some rubbish
gusrub has quit [Remote host closed the connection]
ngscheur1 has quit [Ping timeout: 240 seconds]
<toretore> V1s1ble: if it's really a String, then that's not possible and something else is going on
<toretore> what are you leaving out?
joneshf-laptop has quit [Ping timeout: 246 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
<V1s1ble> That's literally the only code I change....I add that puts and all the output paths change...it's straight off jekyll master...actually never mind...I think I found a better place to make the changes I need
davedev24 has quit []
thistle_ has joined #ruby
Soda has quit [Remote host closed the connection]
bMalum has joined #ruby
bMalum has quit [Remote host closed the connection]
renderfu_ has joined #ruby
Xeago has quit [Remote host closed the connection]
thistle has quit [Ping timeout: 256 seconds]
<shevy> ;)
thistle_ has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 265 seconds]
thistle has joined #ruby
roshanavand has quit [Remote host closed the connection]
krisquigley has joined #ruby
renderfu_ has quit [Ping timeout: 268 seconds]
tvw has quit [Ping timeout: 264 seconds]
neanderslob has joined #ruby
leafybas_ has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
leafybas_ has quit [Remote host closed the connection]
__butch__ has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
leafybas_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 244 seconds]
krisquigley has quit [Ping timeout: 246 seconds]
VeryBewitching has joined #ruby
QORRiE has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jun has joined #ruby
mistermocha has joined #ruby
symbol__ has quit [Quit: WeeChat 1.1]
shmilan has joined #ruby
leafybasil has quit [Ping timeout: 244 seconds]
gril has quit [Remote host closed the connection]
leafybas_ has quit [Ping timeout: 240 seconds]
benkant has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
bruce_lee has quit [Read error: Connection reset by peer]
<benkant> what's up ruby, have you guys heard the latest Carly Rae Jepsen?
__butch__ has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
<BraddPitt> no please share it
<benkant> I used to program in ruby once that's why I'm here
Dopagod has joined #ruby
Dopagod has quit [Changing host]
Dopagod has joined #ruby
<benkant> BraddPitt: it's on the internet everywhere, on web on iTunes on bing
<ddv> yeah it sucks man
<benkant> i don't believe that
sent-hil has joined #ruby
tier has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
ngscheurich has quit [Ping timeout: 252 seconds]
<benkant> when I was programming computers with ruby there were these great dramas all the time
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benkant> do they still happen
skweek has quit [Remote host closed the connection]
huddy has joined #ruby
<benkant> just an example, ruby skrillex would be a communist and where is he now
<nullwarp> Hi guys, i have a rails question, i am trying to pull an object that has a one to many w/ subobject - but i only want it to return one of the subobjects (basically the last one)
<nullwarp> I did this and i see the query works @servers = Server.joins(:heartbeats).where('servers.last_heartbeat = heartbeats.created_at')
<toretore> ?rails nullwarp
<ruboto> nullwarp, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
skweek has joined #ruby
<nullwarp> aw crap sorry
tomphp has joined #ruby
<benkant> that's okay, you can stay
<benkant> I would suggest a database
blackmesa has quit [Ping timeout: 240 seconds]
skweek has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<odigity> I just checked, and self is 'main' in a Rakefile. also, printing out self.methods doesn't reveal a method called 'task'. So how come I can call task in a Rakefile and it works?
ngscheurich has joined #ruby
<benkant> oh hoho odigity you got yourself a pickle there. see you can call methods on objects and not know where the darn thing is!
<benkant> it's why we keep coming back
<odigity> I'm aware that I *can* remain ignorant. I'm trying not to.
aryaching has joined #ruby
SpyderSnake has joined #ruby
<tubbo> odigity: because `task` is a method included into Kernel.
<odigity> ah ha -- .methods() doesn't show private methods
<benkant> my suggestion would be to fire up gdb and break in MRI's method call dispatch and see where it's coming from
<SpyderSnake> ciao
<SpyderSnake> !list
<tubbo> no need to use gdb
SpyderSnake has left #ruby [#ruby]
<odigity> tubbo, no it is not. It comes from rake, it's not built in to the standard Kernel module.
<benkant> if all else fails, there's always make, which works pretty well
<tubbo> odigity: that's why i said it was INCLUDED into Rake.
<tubbo> err, Kernel
<tubbo> odigity: what is your problem exactly/
tomphp has quit [Ping timeout: 268 seconds]
<tubbo> or are you just curious
<odigity> Just trying to understand the context in a Rakefile.
hahuang65 has joined #ruby
<odigity> tubbo, yes, trying to understand generally how Rake works so it's not just a black box
eminencehc has quit [Remote host closed the connection]
<odigity> I just read this article, and was wondering "is he using Kernel.load, or is that another rake DSL method?" http://andyatkinson.com/blog/2014/06/23/sharing-rake-tasks-in-gems
<odigity> So, I start digging
<tubbo> odigity: awesome, yeah it's the same mechanics that bundler would use in Gemfile, or berkshelf would use in Berksfile.
bweston92 has quit [Read error: Connection reset by peer]
<tubbo> odigity: yeah that's definitely Kernel.load
bitsapien has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<tubbo> odigity: the reason one would use load is to be able to safely inject their own bound methods to the top level of the file
<tubbo> it's how bundler can inject its DSL into Gemfile, the same goes for Rakefile, RSpec, et. al.
pocketprotector- has quit [Ping timeout: 250 seconds]
maletor has joined #ruby
bitsapien has quit [Client Quit]
bitsapien has joined #ruby
<odigity> tubbo, I don't understand. When the load executes, am I in the main context or in the Rake module? (here's where I think it is in the code: https://github.com/ruby/rake/blob/c34d9e0afbaee050a4202d045a42efb8aae65117/lib/rake/rake_module.rb#L28)
<odigity> because when I print self in my Rakefile, I do get main. but you're saying I also have access to the methods defined in the scope in which load() is called...
benkant has quit [Ping timeout: 244 seconds]
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
bitsapien has quit [Client Quit]
bitsapien has joined #ruby
<tubbo> odigity: the reason why you have to define tasks within a Rakefile is because (i believe) Rake prepends its own DSL module prior to loading your Rakefile. so, you're still in the 'main' scope, but Rake has injected its own methods into 'main'.
atomical has quit [Ping timeout: 255 seconds]
benkant has joined #ruby
<odigity> tubbo, is there a straight-forward way to determine what those methods are? The RDoc for Rake::DSL doesn't even have basic info: http://www.rubydoc.info/gems/rake/Rake/DSL
<tubbo> odigity: and the reason it can do that is because it does a Kernel.send :include, Rake::DSL right before it loads your Rakefile, which when you use `load` is basically the same as just copy/pasting the code inside your file at the point you ran `load`...so it gets all of the "current" scope.
benlieb has joined #ruby
<tubbo> odigity: you mean the DSL methods?
tubuliferous has joined #ruby
<odigity> yes
bitsapien has quit [Client Quit]
jchu4483 has joined #ruby
Channel6 has joined #ruby
Coldblackice has joined #ruby
bitsapien has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<odigity> I searched the repo for Kernel, and only found two files with it -- and neither do anything relevant to this discussion: https://github.com/ruby/rake/search?utf8=%E2%9C%93&q=kernel
funguy1 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<odigity> Unraveling ruby magic is consistently a frustrating experience.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tubbo> odigity: you're the one who's "trying to understand the context", and now you're complaining that it's frustrating?
<jchu4483> Hello, is this the proper channel to ask general Ruby questions/problems?
<tubbo> :P you create your own problems!
<slash_nick> jchu4483: sure is
<odigity> tubbo, I don't understand you. are you discouraging me from trying to understand how the core tools work?
law has joined #ruby
<law> hey all, I've got (what I hope is) a very simple hash question
bitsapien has quit [Client Quit]
<slash_nick> odigity: one does not reach enlightenment overnight... maybe tubbo's suggesting you practice using the language instead of getting hung up on understanding it
acke has quit [Remote host closed the connection]
<tubbo> odigity: no, but i am discouraging you from complaining about the things you're trying to learn.
nettoweb has joined #ruby
<tubbo> :P
<law> I've got a big ol' hash of hosts (keys) and various properties about the hosts (values), and I'm searching the hash-values for a string and returning the key which matches
bitsapien has joined #ruby
benlieb has quit [Client Quit]
<law> basically like this: hosts.select{ |m, n| n.run_list.include?('recipe[bespoke::mysql_master]') }
<odigity> It's a form of feedback. Every community that cares about it's future should care about the learning curve.
<law> I'd like to add each key that matches to a new hash, and then delete the key from the old hash
<law> is there a method that does that for me?
<tubbo> odigity: it just sounds a little pretentious, that's all.
mrconfused has quit [Ping timeout: 246 seconds]
<tubbo> rubbed me the wrong way
<law> the .select! method seems to nuke the entire hash except for the keys that match, which is... the opposite of what I want
* slash_nick sure doesn't want to know everything a ruby interpreter knows
bitsapien has quit [Client Quit]
jun has quit [Remote host closed the connection]
<toretore> law: use each_with_object
nb_bez___ has joined #ruby
bitsapien has joined #ruby
mrconfused has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freggles has quit [Ping timeout: 272 seconds]
bitsapien has quit [Client Quit]
riotjone_ has joined #ruby
bitsapien has joined #ruby
Rickmasta has joined #ruby
oddmunds has quit [Quit: WeeChat 1.3]
<jchu4483> I have a beginner-level question: How do I check and return any 2 elements of an array that sum to 0? I think I should the array's index to loop through each element - but I don't know how to get past the 2nd element, i.e, go beyond from 3rd element +
_aeris_ has quit [Ping timeout: 240 seconds]
bitsapien has quit [Client Quit]
<law> is that an Enumberable method?
<law> *reads docs* why yes, yes it is :-)
<law> thanks much, I'll give that a shot
syath has quit [Quit: WeeChat 1.2]
bafbomb has joined #ruby
spuk has joined #ruby
Musashi007 has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
<jchu4483> So anybody can help me with my query?
riotjone_ has quit [Ping timeout: 240 seconds]
quarcu has quit [Quit: ZNC - http://znc.in]
graingert has quit [Ping timeout: 240 seconds]
<law> unless I'm using each_with_object totally wrong, which I freely admit I'm probably doing
haylon has quit [Quit: Leaving]
<law> it looks like it's trying to execute .run_list.include on an empty hash, instead of on the 'hosts' hash
<toretore> Hash doesn't have a run_list method
<toretore> and you are using each_with_object wrong
K3VA has quit [Remote host closed the connection]
zenguy_pc has quit [Ping timeout: 240 seconds]
<law> what's the correct way to use each_with_object? I'm staring at the example on rubydocs, and not understanding it :-\
leafybasil has joined #ruby
<apeiros> jchu4483: any 2? that's actually beyond beginner. check Array#combination and #select
jchu4483 has quit [Ping timeout: 246 seconds]
<law> it could be a hash of object-type Chef-nodes. Doing some poking with pry, I get this: https://gist.github.com/law/ef8663ac1c8903b32896
Skelz0r has quit [Ping timeout: 260 seconds]
<atmosx> If there was a way to get a crepe teleported here, I'd pay 35 USD for one. Possibly a French one.
<atmosx> with nutella
<toretore> >> [1,2,3,4,5].each_with_object({}){|n,h| h[n] = n*2 }
<ruboto> toretore # => {1=>2, 2=>4, 3=>6, 4=>8, 5=>10} (https://eval.in/450700)
<toretore> law ^
<law> oh here we go, it's a hash of strings with Chef::Nodes as the values - https://gist.github.com/law/e5c8fbc874ed02ea68da
jenrzzz has quit [Ping timeout: 255 seconds]
<law> ok, I really like that bot
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
aryaching has quit [Ping timeout: 265 seconds]
bitsapien has joined #ruby
atmosx has quit [Quit: Lost in trance]
baweaver has joined #ruby
bitsapien has quit [Client Quit]
<law> I guess I'm still not understanding wtf is going on with each_with_object. I don't want to feed a bare array (or a bare hash) to it, I want my previously-existing hash 'hosts' to run it.
p0wn3d_ has joined #ruby
<ruurd> why not use each then?
momomomomo has quit [Quit: momomomomo]
<law> because every time I find a Hash that has the string I'm searching for, I want the key deleted from the original Hash
<law> basically, I'm searching for all hosts in my environment htat have a certain 'run_list' property, and I want to build a new hash of ONLY those hosts. I then want the original hash to no longer have those hosts
ayonkhan has joined #ruby
eminencehc has joined #ruby
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
shmilan has quit [Ping timeout: 240 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
<ruurd> Then use keep_if on it
yfeldblum has joined #ruby
<law> but it doesn't remove the found hosts from the 'hosts' hash
<ruurd> keep_if
<law> keep_if, at least the way I'm using it, nukes ALL the hosts from the original 'hosts' hash except the one I found
mikecmpbll has joined #ruby
ayonkhan has quit [Client Quit]
baweaver has quit [Ping timeout: 264 seconds]
NeverDie has quit [Max SendQ exceeded]
p0wn3d_ has quit [Ping timeout: 250 seconds]
<ruurd> keep_if {| key, value | block } → hsh
mrconfused has quit [Ping timeout: 244 seconds]
NeverDie has joined #ruby
<law> I want 'hosts.size' to be '35' in this case, not '1' (as I know already there's only one host in there that matches n.run_list.include?('recipe[bespoke::mysql_master]'))
<ruurd> hosts.keep_if{ | k, v | v.run_list.include?('recipe[bespoke::mysql_master]') }
tynamite has joined #ruby
stannard has quit [Remote host closed the connection]
<law> check out that gist, I do exactly that
<toretore> law: each_with_object(o) will yield o along with each (k,v) and return o. that's it
tynamite is now known as Guest27803
jenrzzz has joined #ruby
JimmyNeutron has joined #ruby
<ruurd> then
zenguy_pc has joined #ruby
<ruurd> then: hosts = hosts.keep_if{ | k, v | v.run_list.include?('recipe[bespoke::mysql_master]') }
<toretore> so: while iterating, populate o with the data you want
<toretore> the data comes from the other hash, from where it gets deleted
stannard has joined #ruby
oddmunds has joined #ruby
alasi has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
Guest27803 has quit [Client Quit]
spcmastertim has quit [Ping timeout: 240 seconds]
skade has joined #ruby
sdwrage has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<law> that does... the same thing as before. I'm left with JUST the results of my search
<alasi> Dumb question. I'm trying to install a gem into my current directory, but it's trying to install it into /Library/Ruby/Gems/2.0.0 (OSX), so I get a permissions error
<alasi> Not sure if I should do sudo because it seems like it wants to put it in my home instead of the current project?
<ruurd> Oh ah you want to chuck out the one that matches right?
CpuID has joined #ruby
<shevy> but the installation of a gem always goes either (a) system-wide or in (b) user home dir if --user-install is used
<law> I want two hashes - one that has just the results of my search, and the original hash which has the contents of the new hash subtracted from it
eminencehc has quit [Remote host closed the connection]
<law> where 'the new hash' is the results of my search
<alasi> shevy: ahh that's normal? haha. I come from node.js where everything goes into ./node_modules
<shevy> yeah; I think bundler manages gems additionally somewhere else
<alasi> Should I even install anything onto my local machine then? or just stick it into Gemfile and call it a day?
<ruurd> newhosts = orighosts.keep_if{ | k, v | !v.run_list.include?('recipe[bespoke::mysql_master]') }
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[Butch] has joined #ruby
<toretore> newhosts = hosts.keys.each_with_object({}) { |k, h| h[k] = hosts.delete(k) if hosts[k].run_list.include?('recipe[bespoke::mysql_master]') } #law
<shevy> alasi no idea about bundler sorry, I am just using normal gems alone, bundler is sorta the advanced-gem-management thing
<alasi> so is Bundler the only platform which uses Gemfiles?
<alasi> alright good to know, thx
<shevy> I think so, "gem" itself is older, bundler came lateron mostly from the rails ecosystem since they wanted a better way to handle multiple versioned gems, presumably so that the casual user does not have to do much gem-shuffling on his own. I myself am happy with gems alone :)
<law> booyah, that's what I needed toretore, thank you
jenrzzz has quit [Ping timeout: 264 seconds]
<toretore> law: but do you understand it?
blackmesa has joined #ruby
<law> regrettably, no
devoldmx has joined #ruby
<ruurd> toretore nice
<toretore> i could have given you that in the beginning, but you should come to the solution by yourself
<toretore> now you'll paste that in some file and forget about it
<law> believe me, I'd rather learn to fish any day, but I'm under the gun on this, so I greatly appreciate you giving me the fish
<law> (to mix a metaphor)
anisha has quit [Ping timeout: 250 seconds]
<shevy> spank him with the herring
<ruurd> now go find the bbq to cook it on...
maletor has quit [Quit: Computer has gone to sleep.]
<law> why would you do 'hosts.keys', for instance
<law> ?
<ruurd> iterate over the keys
<toretore> because you shouldn't mutate a collection while iterating over it
<ruurd> delete matching key from hosts and put in new hash
iamjarvo_ has joined #ruby
<toretore> newhosts = {}; hosts.keys.each{ |k| newhosts[k] = hosts.delete(k) if hosts[k].run_list.include?('recipe[bespoke::mysql_master]') }
diego4 has joined #ruby
<toretore> this is the same thing
Danishman has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
diego4 has quit [Changing host]
diego4 has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
diego4 is now known as diegoviola
<law> see, that makes way more sense to me
<ruurd> each_with_object is just merging those two into one statement. that's all
prestorium has quit [Quit: Leaving]
<law> couldn't I get the same merge by doing:
Asher has quit [Read error: Connection reset by peer]
<law> newhosts = hosts.keys.each{ |k| newhosts[k] = hosts.delete(k) if hosts[k].run_list.include?('recipe[bespoke::mysql_master]') }
Asher has joined #ruby
ldnunes has quit [Quit: Leaving]
nopc0de is now known as j2k
NatesHiggers has joined #ruby
<ruurd> what does hosts.keys.each return?
<law> or does .each just iterate, and not necessarily return an object?
<ruurd> it returns an enumerator
<NatesHiggers> iterate returns an object since everything in Ruby is an object
<ruurd> so no
<toretore> in this case, it returns hosts
mrconfused has joined #ruby
<law> ah hah, I see now
<NatesHiggers> the enumerator is part of the enumerable module which is an object
eminencehc has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<law> and we want the block to return a Hash object, which is why we use each_with_object
rodferso1 has joined #ruby
kalusn has quit [Remote host closed the connection]
<NatesHiggers> or you could use a loop
<law> we tell the block what we want it to return, with .ewo
<shevy> someone wants to be banned
<NatesHiggers> nobody
<shevy> no worries the countdown has already started
<law> ...what did I do?
<shevy> not you
<NatesHiggers> I guess they don't like the law
<law> oh, ok
solocshaw has joined #ruby
<law> ....and it dawns on me. derp. apologies.
<shevy> yeah yeah as if you did "accidentally" put that nick..
<shevy> law it's the old regular here, every some days he gets bored and comes back :)
V1s1ble has quit [Read error: Connection reset by peer]
V1s1ble has joined #ruby
PlasmaStar has quit [Disconnected by services]
<law> *shrug* some people are just compelled to pee in the punchbowl
tubuliferous has quit [Read error: Connection reset by peer]
rodfersou has quit [Ping timeout: 240 seconds]
<NatesHiggers> or shit where they eat
adac has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
<ruurd> say law what environment are you using?
<ruurd> osx?
<law> what do you mean by environment?
<law> oh, yes. why?
mrconfused has quit [Ping timeout: 250 seconds]
rodferso1 has quit [Client Quit]
PlasmaStar has joined #ruby
<ruurd> go get yourself dash
<law> dash?
scripore has joined #ruby
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Quit: Leaving.]
* law googles
<law> oh. hell. yes.
Oog has quit []
<NatesHiggers> God damn it
<NatesHiggers> you linked it before I did
<NatesHiggers> the problem with dash is that it takes up a nice chunk of your had space
diego4 has joined #ruby
<NatesHiggers> so you're going to need 3 10TB drives to store all that documentation
diego4 has quit [Changing host]
diego4 has joined #ruby
diegoviola is now known as Guest68981
<drbrain> !ban NatesHiggers
diego4 is now known as diegoviola
<NatesHiggers> lol
<NatesHiggers> why do you want to ban me?
<drbrain> !ban NatesHiggers !P badnick
NatesHiggers was kicked from #ruby by ChanServ [Banned: badnick]
<drbrain> I DID IT
TheNet has joined #ruby
<shevy> yay! \o/
<law> whee!
<law> tbh, I was initially parsing that as 'Nate Shiggers'
Guest68981 has quit [Ping timeout: 264 seconds]
<law> I'm woefully undercaffinated today
<shevy> law no worries, he'll be back one day :P
<law> I can hardly wait. This is my hardly-waiting face - :-\
momomomomo has joined #ruby
<shevy> entry #10 refers to the above http://ruby-community.com/pages/user_rules
<shevy> hehe
rgtk has quit [Remote host closed the connection]
baweaver has joined #ruby
nofxx has joined #ruby
oetjenj has joined #ruby
rgtk has joined #ruby
<ruurd> drbrain obrigado
<shevy> ooooh portuguese!
Skelz0r has joined #ruby
<ruurd> shevy yes well that is about the extent of my Portugese sorry...
l_tonz has quit [Remote host closed the connection]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
<shevy> mine's not much better! though I could sing some capoeira songs for a while
arthurix_ has joined #ruby
<drbrain> they responded, I said DAWWWW and sent them the Spongebob clip with the world's tiniest violin
baweaver has quit [Remote host closed the connection]
Thomas-0725 has joined #ruby
Twi7ch has joined #ruby
TheNet has quit [Ping timeout: 246 seconds]
_aeris_ has joined #ruby
_aeris_ has quit [Remote host closed the connection]
<shevy> lol
Macaveli has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
<ruurd> so law did you have a looksee?
_aeris has joined #ruby
rgtk has joined #ruby
arthurix has quit [Ping timeout: 246 seconds]
<Twi7ch> Hi, I'm having problems setting a shell environment variable in a Rakefile. I want to do something like sh "export VERSION=1.0.0" because I'm calling another rake project which builds the artifact and does a version = ENV['VERSION']
_aeris is now known as _aeris_
scripore has quit [Quit: This computer has gone to sleep]
<law> ruurd: yes, and this does almost exactly what I want
<law> regrettably, computers never do what you want them to do, they only do what you tell them to do
weemsledeux has joined #ruby
<benkant> if we are going to sing, can I suggest we take notes from Carly Rae Jepsen?
<benkant> that new album is amazing
diego4 has joined #ruby
<ruurd> love it to pieces - most of my docs in 1 place
jessemcgilallen has joined #ruby
Rutix has quit []
pdoherty has joined #ruby
jenrzzz has joined #ruby
<ruurd> and shows you the ruby source when you double click on a method
diegoviola has quit [Ping timeout: 260 seconds]
diego4 has quit [Changing host]
diego4 has joined #ruby
diego4 is now known as diegoviola
kalusn has joined #ruby
Azure has joined #ruby
<ruurd> Twi7ch if you invoke rake from rake can you prefix VERSION=1.0.0 right before the rake invocation?
rwilcox has quit [Quit: WeeChat 1.2-dev]
<benkant> why did they make rake when there's make?
tynamite has joined #ruby
<dorei> make is awful, especially when it comes to whitespace vs tabs
maletor has joined #ruby
<ruurd> maven? ant? sbt? cmake?
tynamite is now known as Guest75627
<benkant> dorei: surely that can't be the reason
<ruurd> I'll see your make and raise you a configure...
<benkant> ruurd: apples and bananas my friend
<benkant> ruurd: and all those are also questionable
<ruurd> gulp? grunt? bower?
<BraddPitt> if I have my main ruby app running, and I want to execute a shell command in the background which is a constantly running process and I want to periodically send commands from my main ruby app to that shell process, should I use named pipes or a loop with popen3?
<BraddPitt> can I even do it with popen3?
<ruurd> they drive me bonkers. with the exception of maven that is
<benkant> ruurd: I don't know what those things are, but I bet they're terrible
<ruurd> man 3 popen3
bb010g has quit [Quit: Connection closed for inactivity]
<drbrain> if you use Process.spawn you get the PID too
<ruurd> seems to me that everybody is inventing their task processing wheel
joufflu has joined #ruby
<BraddPitt> drbrain can you send commands to a process with only knowing its PID? I thought you needed named pipes for that
<benkant> unix is right there though
weemsledeux has quit [Quit: Textual IRC Client: www.textualapp.com]
David27 has joined #ruby
<drbrain> BraddPitt: the popen family creates pipes for you
<BraddPitt> ah
<BraddPitt> right
umgrosscol has quit [Remote host closed the connection]
<drbrain> there's also open4 that can hand you the pid as one of the arguments
saddad has quit [Ping timeout: 260 seconds]
<law> is there a way to subtract one hash from another?
<benkant> *blicks*
V1s1ble has quit [Read error: No route to host]
<ruurd> sorry?
<benkant> law: what are you trying to accomplish?
<BraddPitt> hmm ill need to play with this a bit more
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
V1s1ble has joined #ruby
kobain has quit [Read error: Connection reset by peer]
<toretore> >> {foo: 'bar', bar: 'baaz'} - {foo: 'bar'}
<ruboto> toretore # => undefined method `-' for {:foo=>"bar", :bar=>"baaz"}:Hash (NoMethodError) ...check link for more (https://eval.in/450708)
<toretore> could have worked
baweaver has joined #ruby
minimalism has joined #ruby
<benkant> oh! I thought you meant a HASH
l_tonz has joined #ruby
<benkant> I was going to say...
northfurr has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
Guest50 has joined #ruby
<dorei> maybe something as ugly as this
<dorei> >> ({a:5, b:6}.to_a - {b:6, c:7}.to_a).to_h
<ruboto> dorei # => {:a=>5} (https://eval.in/450713)
V1s1ble has quit [Read error: Connection reset by peer]
<benkant> I'm no ruby expert but that's set difference
<law> so, end of the day, my boss wants me to have an 'intelligent rebooter' script for each of our environments. And, since we use Chef, he wants it A. written in Ruby, and B. to query Chef to get all the node information
V1s1ble has joined #ruby
<ruurd> hashone.reject_if{ | k, v | hashtwo.has_key(k)}
V1s1ble has quit [Read error: Connection reset by peer]
<law> a rebooter is 'intelligent' if it knows it has to reboot certain hosts FIRST, then wait for them to come back. So, I need to be able to parse through a massive Chef-node hash of all our shit, and find the hosts we're interested in rebooting FIRST
htmldrum has joined #ruby
<law> once those hosts are rebooted, we wait for them to come back. Once they're 'back' (defined as 'port 22 is contactable'), we can continue with rebooting the REST of the hosts in the environment
vF3hNGxc47h8 has joined #ruby
<law> I think it's about the third dumbest thing I've ever seen in my career, but $boss is $boss
<law> if I were to do this in bash, without checking to see if a host comes back, it would look like this: https://gist.github.com/law/cce92a00d020dbcf276c
<benkant> I hope the devs I managed came on IRC and call me a dumbass
northfurr has quit [Client Quit]
<ruurd> hashone = hashone.keep_if{ | k, v | hashtwo.has_key(k) == false}
hobodave has quit [Quit: Computer has gone to sleep.]
NightMonkey has joined #ruby
<law> in Ruby, my monster momma-jamma of a script looks something like this: https://gist.github.com/law/03f58be95ccc2b87d7b3
<law> and yes, it's ghetto-fabulous. I'm working on getting it into an 'it works for me' state, then making it suck less
<law> that above pile o' crap at least definitely connects to a host, and definitely reboots it
n008f4g_ has joined #ruby
<law> right now, the singleton_sort method (which is what I've been working on with you guys) isn't doing quite what I expected. It's pulling EVERY host that matches the string we're comparing it to, and for the initial sort I only want it to pull ONE host
hobodave has joined #ruby
Rickmasta has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
spuk has quit [Ping timeout: 255 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
<law> the above is *weeks* of work on my end, and frankly I'm just sick of the whole mess
<EasyCo> Given this line: ` _, @type, @amount, _, @ref = string.split(',')` - Is the _ just used as a dummy or is something else happening there?
tier has joined #ruby
<law> in this case, IMHO, shell is totally the better way to do this. The ruby-approach is 75% of the way towards making a monitoring system, and it's the equivalent of using a steam-powered platinum-covered jackhammer to swat a housefly
<law> a housefly that needs swatting maybe a couple times a year
hahuang65 has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
<drbrain> EasyCo: it's just a dummy
Snarkz has quit [Quit: Textual IRC Client: www.textualapp.com]
<drbrain> EasyCo: _ is a valid local variable name
<EasyCo> drbrain: Yep, so it's just used so the other variables can be assigned to the correct information.
<toretore> and you won't get warnings for variables starting with _ that aren't used
kobain has joined #ruby
segfalt has quit [Quit: segfalt]
hahuang65 has joined #ruby
kobain has quit [Max SendQ exceeded]
<drbrain> ↑ ruby -w warns if you assign to a variable and don't use it anywhere
agent_white has joined #ruby
kobain has joined #ruby
<law> I see from my massive wall o' text that I've scared the majority of you off :-)
victortyau has quit [Quit: Leaving]
vF3hNGxc47h8 has quit [Ping timeout: 255 seconds]
<drbrain> law: Net::SSH sure is verbose
alasi has quit [Remote host closed the connection]
<toretore> right, with -w
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruurd> zzz work tomorrow.
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<EasyCo> toretore: It wont warn you in what context?
<toretore> EasyCo: when run with -w as drbrain mentioned
ruurd has quit [Quit: ZZZzzz…]
<toretore> ruby -w -e'foo, bar = "foo", "bar"; puts bar'; ruby -w -e'_foo, bar = "foo", "bar"; puts bar'
mrconfused has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 246 seconds]
t0code has joined #ruby
arthurix has joined #ruby
<benkant> how did I get here?
<EasyCo> Gotcha, thanks toretore & drbrain. I'd never heard that vars prefixed with _ were special like that (https://bugs.ruby-lang.org/issues/6693)
<benkant> git reflog
<t0code> what website do you guys use to share code for help?
<drbrain> t0code: gist.github.com
zenguy_pc has quit [Ping timeout: 260 seconds]
chromebar has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
scripore has joined #ruby
<chromebar> hello it's nateshiggers here again because you banned me for no reason my nick was not offensive.... you're offensive
zenguy_pc has joined #ruby
Dopagod has quit [Ping timeout: 250 seconds]
thistle_ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
thistle_ has quit [Read error: Connection reset by peer]
<benkant> HAHA I love this guy
<drbrain> !ban chromebar !T 1 day language
chromebar was banned on #ruby by ChanServ [chromebar!*@*]
chromebar was kicked from #ruby by ChanServ [Banned: day language]
thistle_ has joined #ruby
<t0code> error for string to integer...help
_blizzy_ has quit [Ping timeout: 246 seconds]
<benkant> wait, how is his name offensive?
kirun has quit [Quit: Client exiting]
<law> benkant: capitalize N, capitalize H
snick007 has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> benkant: Pick another reason then, like ban evasion.
arthurix_ has quit [Ping timeout: 252 seconds]
<t0code> with call
maletor has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
<drbrain> t0code: do you want an array of 2 arguments on line 11? remove "Array.new" there
thistle has quit [Ping timeout: 264 seconds]
sanjayu has joined #ruby
Channel6 has quit [Ping timeout: 250 seconds]
tesuji has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
eminencehc has quit [Remote host closed the connection]
northfurr has joined #ruby
northfurr has quit [Client Quit]
kies^ has quit [Ping timeout: 265 seconds]
<t0code> thank you
<drbrain> typical style for ruby is to use [], {}, "" over Array.new, Hash.new, String.new
sankaber has joined #ruby
<t0code> ok
<t0code> just started a few days ago
<t0code> im trying to handle account information with various data types. is [[]] used most or ??
<t0code> {}?
<drbrain> {} is used for key-value data
<drbrain> or key-values
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain> … where the value is an array
<t0code> how would i check the first value of multiple hashes for a match?
<drbrain> the key?
beauby has joined #ruby
baweaver has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
<drbrain> >> h = { 'a' => 1, 'b' => 2 }; [ h['a'], h.find { |k, v| v == 2 } ]
<ruboto> drbrain # => [1, ["b", 2]] (https://eval.in/450797)
benkant has quit [Quit: benkant]
stannard has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
marr has quit [Ping timeout: 252 seconds]
Rixius|Alt has quit [Ping timeout: 255 seconds]
<t0code> whats the ; [ h['a'], part?
<t0code> in terms of the syntax
<drbrain> in IRC we can't type newlines, so ; replaces the newline
<drbrain> in IRC we can't display multiple values, so I put h['a'] and h.find { |k, v| v == 2 } in an Array so you could see both types of search (since I wasn't sure what you wanted from your question)
Rixius has joined #ruby
maletor has joined #ruby
tier has quit [Remote host closed the connection]
<t0code> i see
benlieb has joined #ruby
<t0code> thanks
sepp2k has joined #ruby
jenrzzz has joined #ruby
eminencehc has joined #ruby
cornerma1 has joined #ruby
tier has joined #ruby
thistle has joined #ruby
goldfish6744 has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Wibbly Wobbly IRC]
goldfish6744 has joined #ruby
chinkymorrison has joined #ruby
thistle has quit [Remote host closed the connection]
maletor has quit [Changing host]
maletor has joined #ruby
thistle_ has quit [Ping timeout: 240 seconds]
polishdub has quit [Quit: Leaving]
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
<t0code> whats the .method to apply a users input to the latest place in an array?? .push?
devdazed has joined #ruby
devdazed has quit [Client Quit]
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
tier has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 246 seconds]
<BraddPitt> drbrain as per my popen3 question, how can I continually read input while occasionally sending commands to the pipes? Seems like I have to choose one or the other due to blocking
<drbrain> BraddPitt: you can use different threads for reading and writing
scripore has quit [Quit: This computer has gone to sleep]
<drbrain> or you can use select
whippythellama has quit [Quit: WeeChat 1.3]
mary5030 has quit [Remote host closed the connection]
prettiestPony11 has joined #ruby
dopamean_ has quit [Ping timeout: 240 seconds]
<drbrain> here's an example of something similar using select
mary5030 has joined #ruby
prettiestPony11 has quit [Client Quit]
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
tier has joined #ruby
mistermo_ has joined #ruby
<chinkymorrison> drbrain my previous nick, nateshiggers was not racist you're racist
<BraddPitt> take it back to reddit chinkymorrison
<apeiros> !kick chinkymorrison be gone
chinkymorrison was kicked from #ruby by ruboto [be gone]
datanoise has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 260 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
<drbrain> I responded with https://www.youtube.com/watch?v=8ESgWlzQQag this time
<drbrain> thanks apeiros
dfockler has joined #ruby
nettoweb has quit [Ping timeout: 272 seconds]
<apeiros> no worries. always the same boring racist idiot.
mary5030 has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 252 seconds]
<BraddPitt> drbrain which example?
mrconfused has quit [Remote host closed the connection]
djbkd has joined #ruby
<drbrain> BraddPitt: ha, I got distracted before pasting
<BraddPitt> no worries
[k- has quit [Ping timeout: 272 seconds]
DanKnox[away] is now known as DanKnox
nettoweb has joined #ruby
bffff_ has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
Dopagod has joined #ruby
t0code has quit []
dopie has quit [Quit: This computer has gone to sleep]
Contigi has joined #ruby
Rixius has quit [Ping timeout: 255 seconds]
Rixius has joined #ruby
<BraddPitt> oh fuck yeah drbrain
<BraddPitt> thank you so much
jessemcgilallen has joined #ruby
<BraddPitt> this works perfectly!
<drbrain> law: you might want to check out https://rubygems.org/gems/net-ping/ for your test_hosts method
<law> so, is there a way to do hash subtraction like there's a way to do array subtraction?
<law> thanks drbrain, I'll keep that in my notes
rushed has joined #ruby
devoldmx has joined #ruby
<drbrain> I'm not sure if it does timeouts
<drbrain> I don't think there's a hash subtraction method besides delete
<drbrain> you could take the keys, find the ones to delete then hash.delete(*keys)
Timba-as has quit [Quit: Be back later ...]
riotjone_ has joined #ruby
<law> I must be doing something retarded, then
<eam> h1.delete(*h2.keys)
mattprelude has quit [Ping timeout: 260 seconds]
<law> running that gives me NoMethodError: private method `select' called for nil:NilClass
<law> from ./hostreboot.rb:125:in `block in singleton_sort'
nertzy2 has quit [Quit: This computer has gone to sleep]
<law> on the line AFTER a successful delete
<law> what I think is, once that hosts.delete(k) fires, hosts[k] is suddenly Nil
podman has quit [Quit: Connection closed for inactivity]
<drbrain> yes, it would become nil
hahuang65 has quit [Ping timeout: 260 seconds]
riotjone_ has quit [Ping timeout: 265 seconds]
<eam> does ruby not blow up if you manipulate a hash while iterating it?
<drbrain> I think only for Array
<eam> seems like hash ought to break badly too, unless it's making a copy
<eam> I know it does in other languages
<law> if there was a way to lazy-eval in a block, that might solve my problem
sent-hil has quit [Quit: Connection closed for inactivity]
bryanray has joined #ruby
<drbrain> >> h = { a: 1, b: 2, c: 3 }; h.each { |k, v| h.delete :b }; h
<ruboto> drbrain # => {:a=>1, :c=>3} (https://eval.in/450804)
dmolina has joined #ruby
<drbrain> the way ruby's Hash is implemented allows safe modification
<drbrain> law: can you find all the deletions you want to make then do them all at once?
baweaver has joined #ruby
skade has quit [Ping timeout: 272 seconds]
tier has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
<law> sub-question - why is this giving me an array, when I want it to give me a hash? Also, it's only giving me the LAST select - https://gist.github.com/law/8a15440c8fa351918027
rushed has quit [Quit: rushed]
<drbrain> >> h = { a: 1, b: 2 }; found = h.select { |k,| k == :a }; [found, found.first]
<ruboto> drbrain # => [{:a=>1}, [:a, 1]] (https://eval.in/450805)
<drbrain> also, you reassign newhosts each line, you probably want to merge
Jardayn has quit [Quit: Leaving]
SCHAAP137 has quit [Quit: Leaving]
<drbrain> or, run one select and || all your .include?
<drbrain> hosts.select { |m, n| run_list = n.run_list; run_list.include?('a') || run_list.include?('b') || … }
skweek has joined #ruby
mistermo_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
jobewan has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
Twi7ch has quit [Ping timeout: 246 seconds]
diegobiavati has joined #ruby
thistle has joined #ruby
mistermocha has quit [Remote host closed the connection]
Porfa has joined #ruby
<shevy> dance dance dance with ruby \o/ \o~ ~o/
mistermocha has joined #ruby
<dorei> is there any http gem that supports unix sockets as endpoint?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drbrain> dorei: for output?
<dorei> drbrain: the http server is listening on a unix socket and i want to connect to it
chrisja has quit [Quit: leaving]
shmilan has joined #ruby
BrunoSaboia has quit [Ping timeout: 244 seconds]
<drbrain> dorei: curl seems to support this, so maybe one of the curl-based HTTP clients can do this (perhaps with a patch?)
<drbrain> dorei: the other option is to modify Net::HTTP
mistermo_ has joined #ruby
<drbrain> a subclass that overrides #connect would do it
agent_white has quit [Quit: leaving]
mistermocha has quit [Ping timeout: 244 seconds]
mistermo_ has quit [Remote host closed the connection]
malcolmva has quit [Ping timeout: 264 seconds]
guardianL has joined #ruby
yfeldblum has joined #ruby
<shevy> at "Make pairwise scatterplots"
<shevy> can we do scatterplots like this in ruby too?
pontiki has joined #ruby
<drbrain> "Read in a CSV file" makes me LOL at the ridiculous library names we make for software
dmolina has quit [Quit: Leaving.]
hj2007 has quit [Quit: This computer has gone to sleep]
guardianL has left #ruby [#ruby]
<shevy> the name pandas is indeed strange
devoldmx has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 244 seconds]
<drbrain> I would just use R for this kind of work
jackjackdripper1 has joined #ruby
Ropeney has joined #ruby
stannard has joined #ruby
<drbrain> R has imported 2 libraries by the time you get to plotting clusters while python has 4
<drbrain> given how difficult it is to install things in ecosystems you're unfamiliar with, R is already twice as easy
jackjackdripper has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
<drbrain> I think 5:9 R:python by the end
scripore has joined #ruby
<drbrain> I like the conclusion, I would summarize it as "fetch data with not-R, process data with R"
Balzrael has quit [Quit: Leaving]
gaboesquivel has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 250 seconds]
malcolmva has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> I've had good luck with rsruby to use ruby for all data manipulation and then R for visualization
<zenspider> now if only I had as much luck driving mathematica from ruby...
datanoise has joined #ruby
Porfa has quit [Quit: Porfa]
failshell has joined #ruby
bryanray has joined #ruby
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
finisherr has joined #ruby
<finisherr> What one way I can modify all key strings to symbols in a deep hash?
simplyianm has joined #ruby
<finisherr> I’m not too good with traversing trees and such
<drbrain> finisherr: why do you want to do that?
<darix> so next stop something like julia.rb?
malcolmva has quit [Ping timeout: 250 seconds]
<finisherr> drbrain: I’m loading a .kitchen.yml file which has ERB templating and would like the resulted hash to look like what test kitchen’s hash looks like
<finisherr> for the same file
<finisherr> one method call gives me a hash with symbols as keys
<drbrain> finisherr: use https://github.com/intridea/hashie
DanKnox is now known as DanKnox[away]
<finisherr> but when i load the ERB natually, none of the keys are symbols like the other call
<finisherr> ok
<finisherr> drbrain: Dang! I like that. I’d like to see how it was done too
<finisherr> thanks
kalusn has quit [Remote host closed the connection]
nettoweb has quit [Ping timeout: 265 seconds]
swgillespie has joined #ruby
<finisherr> Cool
<finisherr> Yeah, this would have taken me a while to figure out on my own
<drbrain> PS: I asked "why?" because for some reasons it doesn't make sense (like "it's faster")
<drbrain> because it's often not faster
fullofcaffeine has joined #ruby
finisherr has quit [Quit: finisherr]
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
mary5030 has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
atomical has joined #ruby
mistermocha has joined #ruby
malcolmva has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
shmilan has quit [Ping timeout: 240 seconds]
mistermocha has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
baweaver has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`tim` has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
finisherr has joined #ruby
lapide_viridi has joined #ruby
<darix> drbrain: but it is tailored exactly to your special problem. that has to count for something.
GnuYawk has quit [Ping timeout: 272 seconds]
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
orion has joined #ruby
mistermocha has quit [Remote host closed the connection]
<orion> Hi. What exactly is DataMapper?
Guest75627 has quit []
mistermocha has joined #ruby
<darix> an ORM?
<orion> If you've already designed your DB schema, do you still need an ORM?
<orion> (Designed the schema by hand)
<darix> sure
<darix> because you want to map "DB rows" to "ruby objects"
<darix> and maybe also describe relationships between tables
<orion> Given that the whole schema has been carefully designed at this point, would you recommend DataMapper or something else?
<darix> so you can do someobject.somerelatedobj
<darix> datamapper, sequel, activerecord
<darix> read the documentation, *play* a bit with each and then decide
_blizzy_ has joined #ruby
finisherr has quit [Client Quit]
<orion> ok
orion has left #ruby [#ruby]
Porfa has joined #ruby
toretore has quit [Ping timeout: 240 seconds]
Porfa has quit [Client Quit]
<darix> deciding on a library without playing with it, is like deciding on a car after reading the manual
lapide_viridi has quit [Quit: Leaving]
<drbrain> ↑ yes
finisherr has joined #ruby
davispuh has quit [Remote host closed the connection]
diegobiavati has quit [Read error: No route to host]
failshell has quit [Remote host closed the connection]
diegobiavati has joined #ruby
symm- has joined #ruby
BrazenBraden has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
beast_ has quit [Quit: Leaving]
_blizzy_ has quit [Read error: Connection reset by peer]
GeissT has joined #ruby
chopin has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
gaboesquivel has joined #ruby
baweaver has joined #ruby
AnoHito_ has joined #ruby
Archyme_ has joined #ruby
AnoHito has quit [Read error: Connection reset by peer]
michaeldeol has quit [Read error: Connection reset by peer]
[1]goldfish6744 has joined #ruby
michaeldeol has joined #ruby
rcvalle has quit [Quit: rcvalle]
jobewan has quit [Remote host closed the connection]
crdpink2 has joined #ruby
kith_ has joined #ruby
fumduq has joined #ruby
crdpink has quit [Ping timeout: 240 seconds]
_blizzy_ has joined #ruby
simplyianm has quit []
leafybas_ has joined #ruby
kith has quit [Read error: Connection reset by peer]
fumduq- has quit [Read error: Connection reset by peer]
leafybasil has quit [Read error: Connection reset by peer]
diegobiavati has quit [Read error: Connection reset by peer]