<ruboto>
eam # => /tmp/execpad-ced249f786d8/source-ced249f786d8:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/450118)
<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
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
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.
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]
<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]
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]
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
<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]
<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]
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?
<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
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?
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]
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"
<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
<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]]
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
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]
<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]
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.
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
<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>
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 +
<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
<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
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…]
<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
<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
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>
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]
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)
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]
<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