apeiros changed the topic of #ruby-lang to: Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste code on https://gist.github.com
baweaver has joined #ruby-lang
ybathia has quit [Quit: ybathia]
delongG_ has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
delongG_ has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
ecnalyr has joined #ruby-lang
ecnalyr has quit [Client Quit]
ruby-lang396 has joined #ruby-lang
mcclurmc_ has quit [Ping timeout: 264 seconds]
Contigi has joined #ruby-lang
ruby-lang396 has quit [Ping timeout: 246 seconds]
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
momomomomo has quit [Quit: momomomomo]
michaeldeol has quit [Ping timeout: 255 seconds]
crankharder has quit [Ping timeout: 245 seconds]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
yfeldblu_ has quit [Remote host closed the connection]
haraoka has joined #ruby-lang
yfeldblum has joined #ruby-lang
fclausen has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
crankharder has joined #ruby-lang
Zen-Zen has quit []
crankharder has quit [Quit: leaving]
bturker_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
Astrologos_ has quit []
zendrix has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
workmad3 has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
hendranata_ has joined #ruby-lang
kfpratt has joined #ruby-lang
wallerdev has quit [Ping timeout: 272 seconds]
crankharder has joined #ruby-lang
car has joined #ruby-lang
hahuang65 has joined #ruby-lang
car_ has joined #ruby-lang
car has quit [Ping timeout: 252 seconds]
unreal_ has joined #ruby-lang
danzilio has joined #ruby-lang
unreal has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 240 seconds]
fedexo has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 265 seconds]
aaeron has quit [Quit: aaeron]
konr has quit [Quit: Connection closed for inactivity]
michael_mbp has quit [Excess Flood]
kfpratt has quit [Remote host closed the connection]
michael_mbp has joined #ruby-lang
fujimura has joined #ruby-lang
kfpratt has joined #ruby-lang
ogpastaling has joined #ruby-lang
alestuber has joined #ruby-lang
Respek has joined #ruby-lang
kfpratt has quit [Ping timeout: 255 seconds]
car_ has quit [Quit: Leaving]
amclain has joined #ruby-lang
bungoman has joined #ruby-lang
fedexo has quit [Ping timeout: 265 seconds]
alestuber has quit [Remote host closed the connection]
jacaballero has joined #ruby-lang
joaomdmoura has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
car has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
zenspider has quit [Remote host closed the connection]
danzilio has quit [Quit: Baiii!]
workmad3 has joined #ruby-lang
car has quit [Ping timeout: 256 seconds]
ozialien has quit [Ping timeout: 264 seconds]
zenspider has joined #ruby-lang
workmad3 has quit [Ping timeout: 276 seconds]
Respek has quit [Quit: gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
auzty has joined #ruby-lang
Fooster has joined #ruby-lang
gambl0re has joined #ruby-lang
Fooster has quit [Ping timeout: 256 seconds]
car has joined #ruby-lang
djbkd has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
jacaballero has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dvlwrk has quit [Ping timeout: 255 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby-lang
gix has joined #ruby-lang
bruno- has quit [Ping timeout: 246 seconds]
pepperbreath has quit [Read error: Connection reset by peer]
pepperbreath has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
auzty has quit [Ping timeout: 244 seconds]
ogpastaling has quit [Remote host closed the connection]
ogpastaling has joined #ruby-lang
ogpastaling has quit [Ping timeout: 265 seconds]
duderonomy has quit [Ping timeout: 272 seconds]
|jemc|_ has joined #ruby-lang
auzty has joined #ruby-lang
|jemc| has quit [Ping timeout: 256 seconds]
bungoman has joined #ruby-lang
VinnyBoy has joined #ruby-lang
michaeldeol has joined #ruby-lang
zenspider has quit [Quit: bye]
workmad3 has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
RobertBirnie has joined #ruby-lang
akkad has quit [Excess Flood]
_whitelogger has joined #ruby-lang
riotjones has joined #ruby-lang
akkad has joined #ruby-lang
hinbody has quit [Quit: leaving]
riotjones has quit [Read error: Connection reset by peer]
riotjones has joined #ruby-lang
Miphix has joined #ruby-lang
riotjones has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby-lang
hinbody has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
allomov has joined #ruby-lang
gambl0re has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby-lang
dellavg_ has joined #ruby-lang
|jemc|_ has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
VinnyBoy has quit [Read error: Connection reset by peer]
RobertBirnie has quit [Read error: Connection reset by peer]
riotjones has joined #ruby-lang
RobertBirnie has joined #ruby-lang
car has quit [Ping timeout: 265 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
slumos has joined #ruby-lang
rippa has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
fusillicode has joined #ruby-lang
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Remote host closed the connection]
leat4 has quit [Ping timeout: 256 seconds]
lapide_viridi has joined #ruby-lang
allomov has quit [Remote host closed the connection]
leat4 has joined #ruby-lang
leat4 has quit [Remote host closed the connection]
leat4 has joined #ruby-lang
harlen has quit [Remote host closed the connection]
Forgetful_Lion has joined #ruby-lang
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
allomov has joined #ruby-lang
allomov has quit [Remote host closed the connection]
allomov has joined #ruby-lang
hendranata_ has quit [Ping timeout: 240 seconds]
MrSkinny has joined #ruby-lang
MrSkinny has quit [Changing host]
MrSkinny has joined #ruby-lang
charliesome has quit [Quit: zzz]
MrSkinny has quit [Client Quit]
charliesome has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
futilegames has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
fujimura_ has joined #ruby-lang
fujimura has quit [Ping timeout: 265 seconds]
Fooster has joined #ruby-lang
skade has joined #ruby-lang
joaomdmoura has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fooster has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
Miphix has quit [Ping timeout: 246 seconds]
joaomdmoura has joined #ruby-lang
toretore has joined #ruby-lang
solars has joined #ruby-lang
Iskarlar has joined #ruby-lang
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
tomaz_b has joined #ruby-lang
bruno- has joined #ruby-lang
jacaballero has joined #ruby-lang
jacaballero has quit [Client Quit]
dhjondoh has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
bruno- has quit [Ping timeout: 264 seconds]
nedp has joined #ruby-lang
charliesome has quit [Quit: zzz]
futilegames has quit [Quit: futilegames]
lapide_viridi has quit [Quit: Leaving]
marr has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
fujimura_ has joined #ruby-lang
<yorickpeterse> morning
<yorickpeterse> headius: that's the parser, it uses Arrays for action arguments (that is, it's that ticket you reported a while ago)
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
araujo has joined #ruby-lang
benlovell has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
fawefeawfewa has joined #ruby-lang
aewffwea has quit [Ping timeout: 248 seconds]
leat4 has quit [Quit: leat4]
stan has joined #ruby-lang
postmodern has quit [Quit: Leaving]
Ropeney has quit [Remote host closed the connection]
Miphix has joined #ruby-lang
arBmind has joined #ruby-lang
tomaz_b has quit [Quit: Leaving]
lloyd is now known as Lloyd
workmad3 has joined #ruby-lang
<maloik> zzz importing data for data migrations followed by consistency and integrity check scripts
<maloik> shit takes like 4h for one go, one mistake and you can start over
ta has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
<yorickpeterse> bro do you even multi-thread?
k3asd` has joined #ruby-lang
bruno- has joined #ruby-lang
<ljarvis> srsly
<ljarvis> there are never enough threads
<ljarvis> and there are never too many threads
<ljarvis> a wise monk once said
symm- has joined #ruby-lang
sarkyniin has joined #ruby-lang
<yorickpeterse> clearly that monk never tried Node.js
bruno- has quit [Ping timeout: 256 seconds]
dhjondoh has quit [Quit: dhjondoh]
<yorickpeterse> Allrighty, lets see if I can solve this over-a-year-old issue with the AWS SDK
<yorickpeterse> (https://github.com/aws/aws-sdk-ruby/issues/455 this one for the curious)
* yorickpeterse tries very hard not to rant about this particular problem
ta has joined #ruby-lang
arBmind has quit [Read error: Connection reset by peer]
arBmind has joined #ruby-lang
dorei has joined #ruby-lang
benlovell has quit [Ping timeout: 255 seconds]
benlovell has joined #ruby-lang
bruno- has joined #ruby-lang
wprice has joined #ruby-lang
apt-get_ has joined #ruby-lang
ledestin has joined #ruby-lang
sarkyniin has quit [Ping timeout: 252 seconds]
ta has quit [Remote host closed the connection]
Fooster has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
Fooster has quit [Ping timeout: 255 seconds]
fclausen has joined #ruby-lang
thelastinuit has joined #ruby-lang
dagda1 has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
Iskarlar has quit [Quit: Textual IRC Client: www.textualapp.com]
araujo has quit [Quit: Leaving]
Iskarlar has joined #ruby-lang
workmad3 has joined #ruby-lang
kibou has joined #ruby-lang
ta has joined #ruby-lang
apt-get__ has joined #ruby-lang
apt-get_ has quit [Ping timeout: 252 seconds]
<yorickpeterse> how do I mutex?
cornerma1 has joined #ruby-lang
mike_c_11 has joined #ruby-lang
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
fclausen has quit [Ping timeout: 272 seconds]
<yorickpeterse> I swear to raptor jesus, if this was the cause of my signature problems...
k3asd` has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse> hm no, thankfully
gregf_ has quit [Ping timeout: 246 seconds]
gregf_ has joined #ruby-lang
shazaum has joined #ruby-lang
kr3ssh has joined #ruby-lang
Fooster has joined #ruby-lang
dhjondoh has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 256 seconds]
banister has joined #ruby-lang
sgambino has joined #ruby-lang
dvlwrk has joined #ruby-lang
Lloyd is now known as lloyd
yfeldblum has quit [Ping timeout: 265 seconds]
alestuber has joined #ruby-lang
ohsix has quit [Ping timeout: 256 seconds]
atomical has joined #ruby-lang
benlovell has joined #ruby-lang
<yorickpeterse> * ._.
<yorickpeterse> magical journey through the AWS SDK
<yorickpeterse> I need beer
auzty has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 256 seconds]
ohsix has joined #ruby-lang
hanachin has joined #ruby-lang
arBmind has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 240 seconds]
kr3ssh has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
lloyd is now known as Lloyd
unreal_ is now known as unreal
apt-get_ has joined #ruby-lang
apt-get__ has quit [Ping timeout: 255 seconds]
sankaber has joined #ruby-lang
imperator has joined #ruby-lang
benlovell has joined #ruby-lang
araujo has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
kr3ssh has joined #ruby-lang
alestuber has quit [Ping timeout: 265 seconds]
skade has joined #ruby-lang
alestuber has joined #ruby-lang
enebo has joined #ruby-lang
nedp has quit [Remote host closed the connection]
banister has quit [Read error: Connection reset by peer]
joaomdmoura has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
VinnyBoy has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby-lang
malconis has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
k3asd` has joined #ruby-lang
Lloyd_ has joined #ruby-lang
<VinnyBoy> hi
joaomdmoura has quit [Remote host closed the connection]
airdisa has joined #ruby-lang
Lloyd has quit [Ping timeout: 256 seconds]
Lloyd_ is now known as Lloyd
bungoman has joined #ruby-lang
joaomdmoura has joined #ruby-lang
dhjondoh has quit [Remote host closed the connection]
banister has joined #ruby-lang
ta has quit [Remote host closed the connection]
caseypatrickdris has quit [Remote host closed the connection]
riotjones has quit [Remote host closed the connection]
<imperator> my cousin VinnyBoy, what's up?
apt-get_ has quit [Quit: Quit]
joaomdmoura has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 256 seconds]
bungoman has quit [Remote host closed the connection]
allomov has joined #ruby-lang
alestuber has joined #ruby-lang
<VinnyBoy> your cousin?
joaomdmoura has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
bungoman has joined #ruby-lang
ta has joined #ruby-lang
mcclurmc_ has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Read error: Connection reset by peer]
alestuber has joined #ruby-lang
dvlwrk has quit [Ping timeout: 255 seconds]
iamninja has quit [Ping timeout: 250 seconds]
kibou has quit [Ping timeout: 240 seconds]
joaomdmoura has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
kr3ssh has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
airdisa_ has joined #ruby-lang
airdisa has quit [Ping timeout: 256 seconds]
dreamwalker has joined #ruby-lang
gambl0re has quit [Ping timeout: 265 seconds]
alestuber has quit [Ping timeout: 272 seconds]
alestuber has joined #ruby-lang
nertzy has joined #ruby-lang
<imperator> VinnyBoy, just a joke (you know, the movie)
Mon_Ouie has joined #ruby-lang
whippythellama has joined #ruby-lang
riotjones has joined #ruby-lang
<ljarvis> c wat
<ljarvis> wat
alestuber has quit [Ping timeout: 276 seconds]
alestuber has joined #ruby-lang
<VinnyBoy> i dunno, what movie?
riotjones has quit [Ping timeout: 240 seconds]
<imperator> My Cousin Vinny
|jemc| has joined #ruby-lang
<VinnyBoy> oh
<VinnyBoy> never heard of it, sorry
nertzy has quit [Quit: This computer has gone to sleep]
ogpastaling has joined #ruby-lang
Caius has quit [Ping timeout: 276 seconds]
airdisa_ has quit []
<yorickpeterse> .-.
Caius has joined #ruby-lang
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 245 seconds]
bungoman has quit [Remote host closed the connection]
yalue has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
benlovell has joined #ruby-lang
<VinnyBoy> lack of comments wounds my heart
leat has joined #ruby-lang
joaomdmoura has joined #ruby-lang
<yorickpeterse> The comments are the least of my worries
skade has quit [Quit: Computer has gone to sleep.]
benlovell has quit [Ping timeout: 256 seconds]
joaomdmoura has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 245 seconds]
kr3ssh has joined #ruby-lang
dvlwrk has joined #ruby-lang
benlovell has joined #ruby-lang
alestuber has joined #ruby-lang
dreamwalker has quit [Ping timeout: 246 seconds]
bturker has joined #ruby-lang
DivineEntity has quit [Quit: Lost terminal]
RickCH has joined #ruby-lang
benlovell has quit [Ping timeout: 245 seconds]
<RickCH> Hi all serious newb here.
<RickCH> I am trying to bundle and gettting OpenSSL::X509::StoreError: system lib
<RickCH> anyone know how the heck to fix?
momomomomo has joined #ruby-lang
momomomomo has quit [Client Quit]
jgpawletko has joined #ruby-lang
dzejrou has joined #ruby-lang
slawrence00 has joined #ruby-lang
charliesome has joined #ruby-lang
DivineEntity has joined #ruby-lang
<imperator> i don't even want to think about the ruby openssl source code
bungoman has joined #ruby-lang
imperator2 has joined #ruby-lang
<RickCH> LOL
<RickCH> any suggestions
bb010g has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby-lang
<jhass> RickCH: environment?
<RickCH> centos
<RickCH> RUBYGEMS VERSION: 2.0.3
kr3ssh has quit [Ping timeout: 252 seconds]
<jhass> let me guess, ruby 1.8?
<RickCH> ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
<jhass> oh, centos 7, how "recent" :P
<RickCH> 6.6
k3asd` has quit [Quit: leaving]
<jhass> huh, that has 2.0?
<jhass> is that the full error output?
<RickCH> It does output the gem install as well
<RickCH> OpenSSL::X509::StoreError: system lib An error occurred while installing rack (1.6.1), and Bundler cannot continue. Make sure that `gem install rack -v '1.6.1'` succeeds before bundling.
<RickCH> any gem
wprice has quit [Quit: wprice]
<imperator> gem update --system
<jhass> mh, yeah, try latest rubygems
<RickCH> gem update --system ERROR: While executing gem ... (OpenSSL::X509::StoreError) system lib
rcvalle has joined #ruby-lang
alestuber has quit [Ping timeout: 240 seconds]
<jhass> are system ca certificates installed?
<RickCH> Yup.
<jhass> whatever the package on cent is, ca-certificates too?
<RickCH> that was the first thing I check
<darix> RickCH: strace -s 1024 -e trace=file -fF gem install -v 1.6.0 rack
momomomomo_ has joined #ruby-lang
<RickCH> Sadly this all worked fine until I tried to use a gem to talk to a REST api.
<darix> RickCH: and is the 2.2.0 installed from rpm or via rvm and friends?
bungoman has quit [Remote host closed the connection]
<RickCH> rpm
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
alestuber has joined #ruby-lang
x44x45x41x4E has joined #ruby-lang
nifoc has quit [Ping timeout: 264 seconds]
nifoc has joined #ruby-lang
<RickCH> darix what should I look for?
<darix> RickCH: the strace might help to see where it looks for the certs
<RickCH> ERROR: While executing gem ... (OpenSSL::X509::StoreError) system lib [pid 12660] open("/proc/self/maps", O_RDONLY) = 7 Process 12661 detached
__butch__ has joined #ruby-lang
x44x45x41x4E has quit [Client Quit]
<darix> RickCH: put the whole thing on some paste site/your webserver
gambl0re has joined #ruby-lang
noli_woli has joined #ruby-lang
skade has joined #ruby-lang
<noli_woli> why is generating the ri/rdoc docs for a gem often so slow?
<jhass> RickCH: open("/usr/lib64/ruby/2.0.0/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem", O_RDONLY) = -1 EACCES (Permission denied)
<jhass> looks like your gem can't read it
<darix> could be selinux or permissions problems
<darix> although i would assume redhat deletes /usr/lib64/ruby/2.0.0/rubygems/ssl_certs/* too
<darix> so that ruby uses the system store
<RickCH> interesting
<RickCH> wonder why it changed.
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
nifoc has quit [Ping timeout: 264 seconds]
nifoc has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
slawrence00 has joined #ruby-lang
<RickCH> Perms it was thank you
zendrix has joined #ruby-lang
noli_woli has quit [Quit: Page closed]
momomomomo has joined #ruby-lang
RickCH has quit [Quit: Page closed]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
skade has quit [Quit: Computer has gone to sleep.]
delongG_ has joined #ruby-lang
futilegames has joined #ruby-lang
ta has quit [Read error: Connection reset by peer]
caseypatrickdris has quit [Remote host closed the connection]
ta has joined #ruby-lang
michaeldeol has joined #ruby-lang
michaeldeol has quit [Client Quit]
bturker has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
LBo has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby-lang
fclausen has joined #ruby-lang
leat has quit [Ping timeout: 252 seconds]
leat has joined #ruby-lang
bungoman has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
nertzy has joined #ruby-lang
leat has quit [Ping timeout: 240 seconds]
bungoman has quit [Ping timeout: 250 seconds]
leat has joined #ruby-lang
bungoman has joined #ruby-lang
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
leat has quit [Ping timeout: 252 seconds]
alestuber has joined #ruby-lang
leat has joined #ruby-lang
allomov has quit [Remote host closed the connection]
byprdct has joined #ruby-lang
chinmay_dd has joined #ruby-lang
wallerdev has joined #ruby-lang
jacaballero_ has joined #ruby-lang
alestuber has quit [Ping timeout: 255 seconds]
stan has quit [Ping timeout: 265 seconds]
fusillicode has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby-lang
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Ping timeout: 256 seconds]
goseek has joined #ruby-lang
<goseek> Hi Everyone. I'm a beginner about three weeks into Ruby. I'm having trouble getting my own version of a sample hash to work from Zed Shaw's LRTHW. I was wondering if someone could give me some guidance.
<goseek> The screen shot of the code and the output is here
<goseek> Any help is much appreciated.
<jhass> goseek: that's very difficult to read, use https://gist.github.com to share code, don't forget to enable syntax highlighting and use a separate file for the error/output
<goseek> Ok
<goseek> but you can click it twice to enlarge
<goseek> I will work on figureing out GitHub
chinmay_dd_ has joined #ruby-lang
alestuber has joined #ruby-lang
futilegames has quit [Quit: futilegames]
<goseek> Below is the code on gist: if anyone has a moment
jacaballero_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> you can edit your gist to enable syntax highlighting and add a second file for the output
<goseek> ok
chinmay_dd has quit [Ping timeout: 256 seconds]
<jhass> so what's your issue?
<goseek> I was just writing a description and trying to find syntax highlighting
<jhass> next to the filename (or automatically if you choose a proper filename)
<goseek> I want it to pull from the actors hash to show who the actress is dating
<goseek> I can't understand why actor = actors[name]
<goseek> doesn't work
<jhass> well, what's name?
<goseek> it's just showing "and dates " blank
<jhass> yes, think about what values nick and name point at
<goseek> name is the value
<jhass> concrete values
<jhass> first iteration, what's nick, what's name
<goseek> so for the first actor it would be "Brad Pitt"
<goseek> ok, nick is brad
<goseek> name is Bradd Pitt
<goseek> Brad*
<jhass> that part is working, let's start at line 21
<goseek> ok
joaomdmoura has joined #ruby-lang
<goseek> So, what I understand that this is supposed to do is pull the key, value from the actresses, and then I've assigned the actor[nick] to the variable 'actors'
<goseek> and it will list those out, right after the actresses, each iteration
<goseek> but it's just blank in the output
joaomdmoura has quit [Remote host closed the connection]
<jhass> yeah, let's do what I said, play through what the program does, expression by expression
<jhass> so line 21/22, what's nick and name in the first iteration
<goseek> for each item in actresses, do key - nick, value -name. Put the value name, followed by key. Lastly put "actor" which i've set to be actors[nick]
futilegames has joined #ruby-lang
<jhass> okay, then not.
<goseek> 'scarjo' is the nick, and 'Scarlett Johansson' is the name for 21 iteration 1
<goseek> well
<jhass> okay, does the hash actors have the key "scarjo"?
<goseek> addtionally adding "brad" at the end
<goseek> correct
<goseek> oh
<goseek> no it doesn't
<jhass> so what value is returned by actors[nick] ?
<goseek> The way I understand this, is that by assigning that variable " actor = actors[nick] " it will pull from the actors hash and not the actresses
<goseek> according to my output, nothing. But I don't understand why because the actors hash has the same nick, name set
<jhass> what did we determine nick is?
<goseek> the key
joaomdmoura has joined #ruby-lang
<goseek> Hm.
<jhass> your concepts are wrong, stop thinking in them, think in concrete values
<jhass> what did we determine, what value nick is?
<goseek> Alright
ybathia has joined #ruby-lang
ducklobster has quit [Ping timeout: 272 seconds]
<goseek> The key is 'brad' and the value is 'Brad Pitt'
sarkyniin has joined #ruby-lang
<goseek> the nick key has a value of 'Brad Pitt'
futilegames has quit [Ping timeout: 256 seconds]
<jhass> we're in line 22, right?
<goseek> correct
<goseek> actor = actors[nick]
<jhass> you're iterating actresses, right?
alestuber has quit [Ping timeout: 240 seconds]
<goseek> that's correct.
<goseek> and practicing pulling from two hashes at the same time to display something
<jhass> "brad" => "Brad Pitt" is in actors right?
<goseek> correct
<jhass> so what's nick?
<jhass> in line 22?
<goseek> it's the first key in the hash called actors
stardiviner has joined #ruby-lang
<jhass> no
<jhass> simple no
<goseek> Yeah, sorry for not getting it
<jhass> you already said the right thing
<jhass> you're outputting the value in a loop that does the same thing above
alestuber has joined #ruby-lang
<jhass> (the value of nick)
araujo has quit [Ping timeout: 272 seconds]
<goseek> ok
<goseek> I'll practice this some more. I appreciate the time you've taken to help me
<goseek> thanks
<jhass> sigh
<jhass> nick is "scarjo"
<jhass> actors does not have the key "scarjo"
bungoman has quit [Remote host closed the connection]
<jhass> thus actors[nick] (== actors["scarojo"] in the first iteration) returns nil
<jhass> so actor is nil
<jhass> >> "#{nil}"
<eval-in> jhass => "" (https://eval.in/338420)
<goseek> I appreciate that. I just don't understand why in his book, the exact same thing using states and state abbreviations works for him and even for me
futilegames has joined #ruby-lang
bungoman has joined #ruby-lang
araujo has joined #ruby-lang
<goseek> but if I change the values and make it print a different sentence it doesn't work
<goseek> states.each do |state, abbrev|
<goseek> city = cities[abbrev]
<goseek> puts "#{state} is abbreviated #{abbrev} and has the city of #{city}"
<goseek> end
<goseek> that works just fine pulling from two hashes and listing the right output
<goseek> frustrating
<jhass> because his hashes are setup so that it works
<goseek> Interesting link - what is it (Eval.in)?
<jhass> just something we use here to run demos
<goseek> Hey since we last spoke I made a cool little game
<goseek> it's still text-based but it's progress
<goseek> Yesterday I started learning about classes
fusillicode has joined #ruby-lang
<jhass> so, with for example states = {"Germany" => "DE"} and cities = {"DE" => "Berlin"}
<goseek> ok
<jhass> state = "Germany", abbrev = "DE"
<goseek> right right
<jhass> cities does have the key "DE"
joaomdmo_ has joined #ruby-lang
<goseek> ohhhhhhhhhhhhhhhhh
<goseek> wow
joaomdmoura has quit [Read error: Connection reset by peer]
futilegames has quit [Ping timeout: 252 seconds]
<goseek> Ok
<goseek> I get it
<goseek> in his examples cities['NY']
<goseek> they're all sort of linked by sharing that in common
<goseek> in mine, I just have some arbitray names
<goseek> arbitrary*
<goseek> I'm not sure why I wasn't grasping that
joaomdmoura has joined #ruby-lang
joaomdmo_ has quit [Read error: Connection reset by peer]
alestuber has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby-lang
symm- has joined #ruby-lang
alestuber has joined #ruby-lang
marr has quit [Ping timeout: 240 seconds]
jacaballero has joined #ruby-lang
benlovell has joined #ruby-lang
aaeron has joined #ruby-lang
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
intinig has joined #ruby-lang
jacaballero_ has joined #ruby-lang
benlovell has quit [Ping timeout: 246 seconds]
<goseek> This is a very basic text-based game that I'm building. I intend to keep improving it until it has graphics and real logic
zendrix has quit [Remote host closed the connection]
chinmay_dd_ has quit [Quit: Leaving]
<goseek> It's as interactive as it can be at my level of Ruby but in the future I intend for it to also have more advanced user input
jacaballero has quit [Ping timeout: 250 seconds]
k3asd` has quit [Quit: leaving]
zendrix has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
goseek has quit [Quit: Leaving]
zendrix has joined #ruby-lang
Astrologos_ has joined #ruby-lang
haraoka has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby-lang
dorei has quit [Ping timeout: 252 seconds]
zendrix has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
atomical has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 256 seconds]
Fooster has quit [Ping timeout: 264 seconds]
Astrologos_ is now known as dorei
workmad3 has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby-lang
alestuber has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
Astrologos_ has joined #ruby-lang
dorei has quit [Ping timeout: 246 seconds]
zendrix has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
slackR has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
slackR has quit [Client Quit]
michaeldeol has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
ogpastaling has quit [Remote host closed the connection]
joaomdmo_ has joined #ruby-lang
kibou has joined #ruby-lang
joaomdmoura has quit [Read error: No route to host]
kibou has quit [Client Quit]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bungoman has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
<hal_9000> who’s awake?
dagda1 has joined #ruby-lang
charliesome has quit [Quit: zzz]
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
zendrix has quit [Remote host closed the connection]
ogpastaling has joined #ruby-lang
marr has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<imperator> heya hal_9000
<hal_9000> heyyy, long time know C
<imperator> ha
fawefeawfewa has quit [Ping timeout: 248 seconds]
<hal_9000> i haven’t seen any activity on ruby-talk today — did my two posts go thru?
alestuber has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
<imperator> i don't follow ruby-talk that closely any more, but lemme check
<imperator> yeah, i see them
michaeldeol has joined #ruby-lang
benlovell has joined #ruby-lang
alestuber has joined #ruby-lang
<hal_9000> i don’t follow it much either, but i’m trying to do it more, as it is sort of my bread and butter
<hal_9000> for now
<imperator> responded to one :)
delongG_ has quit [Remote host closed the connection]
<hal_9000> but i’m also drinking the KoolAid^H^H^H^H^H^H^H Elixir ;)
aaeron has quit [Quit: aaeron]
<imperator> ah, yes, looks promising
jacaballero_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmi has joined #ruby-lang
<imperator> i'm dealing with ruby + azure at the moment :)
6A4ABYMS5 has quit [Ping timeout: 256 seconds]
<hal_9000> azure?
<imperator> ms cloud platform
aaeron has joined #ruby-lang
<hal_9000> looking now
<hal_9000> oh em gee, another microsoftism
<hal_9000> did silverlight ever go anywhere?
benlovell has quit [Ping timeout: 245 seconds]
<imperator> dunno, still around as far as i know
<imperator> it's all about the cloud now hal_9000 :)
<hal_9000> yeah, it’s hard to complain much about a cloud solution
bruno- has quit [Quit: Lost terminal]
<hal_9000> you don’t ever use osx do you?
banister has joined #ruby-lang
<imperator> sure do, i'm on it right now (work laptop)
<imperator> my home desktop is actually a mac tower that i've setup with bootcamp
baweaver has joined #ruby-lang
<imperator> so i've got snow leopard and windows 7 as my "main" operating systems
<imperator> plus a bunch of VM's on the mac using vmware fusion
guillaume-rb has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
bungoman has joined #ruby-lang
<imperator> lemme take a look at ffi-curses
<hal_9000> i’ll give you my code if you’re interested
woodruffw_ has joined #ruby-lang
woodruffw has quit [Read error: Connection reset by peer]
<hal_9000> it’s so prelim it’s not in source control :)
woodruffw_ is now known as woodruffw
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator> hm, hasn't seen an update in 4 years, that may be a bad sign
bruno- has joined #ruby-lang
jacaballero has joined #ruby-lang
<hal_9000> yeah, i know
<imperator> 10 test failures running the suite, but no errors
<hal_9000> if i find a better/different one, hopefully it will be mostly a drop-in replacement
<imperator> got a gist i can look at?
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hal_9000> duh, i hadn’t even noticed there was a suite
<hal_9000> i sent u email, if you are at the same old address?
<imperator> yep
dagda1 has joined #ruby-lang
<hal_9000> brb 5 min
alestuber has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
intinig has quit []
postmodern has joined #ruby-lang
Miphix has quit [Quit: Leaving]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
|jemc| has quit [Ping timeout: 256 seconds]
<hal_9000> imperator:
<hal_9000> making sense?
<imperator> don't see it
|jemc| has joined #ruby-lang
<hal_9000> no? weird. i can create gists then
<imperator> yeah, do that
alestuber has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
<hal_9000> ok - the demo code is at https://gist.github.com/Hal9000/1dcc9eb2c1c3f6bbcfad
<hal_9000> and it calls a lib which is https://gist.github.com/Hal9000/d43b67595b491a56014b
Miphix has joined #ruby-lang
benlovell has joined #ruby-lang
jds has quit [Quit: Connection closed for inactivity]
<imperator> and you're getting an error? can you pastie the error message?
momomomomo has joined #ruby-lang
<imperator> or it's just not working as expected?
Fooster has joined #ruby-lang
<hal_9000> well, the demo works for me (does it for you?) - but the inchstr functions basically return all NULLs
<hal_9000> they aren’t used in the demo - they’re just for retrieving data from the “screen”
bertocode has joined #ruby-lang
<imperator> yep, demo worked
<imperator> pretty cool, btw :)
hahuang65 has joined #ruby-lang
banister has joined #ruby-lang
<hal_9000> thx, not bad for an afternoon’s work
k3asd` has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby-lang
<imperator> hm, looks like some of this code is autogenerated
<imperator> :inchnstr, [:chtype_p, :int], :int is the prototype
<imperator> sorry, :inchstr, [:chtype_p], :int
futilegames has joined #ruby-lang
<imperator> where chtype_p is just an alias for :pointer
kfpratt has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
skade has joined #ruby-lang
fusillicode has joined #ruby-lang
alestuber has quit [Ping timeout: 245 seconds]
fusillicode has quit [Read error: Connection reset by peer]
aewffwea has joined #ruby-lang
<hal_9000> i’m sure he used some kind of tool to bind to the library
benlovell has quit [Ping timeout: 256 seconds]
futilegames has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 276 seconds]
fusillicode has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<imperator> hm, it does look like there are some newer ncurses libs, but they're C extensions
bruno-_ has joined #ruby-lang
<imperator> ncurses-ruby and ncursesw-ruby
alestuber has joined #ruby-lang
<imperator> well, i think you're going to have to create a minimal example using [] that i can step into via a debugger
jacaballero has quit [Read error: Connection reset by peer]
fusillicode1 has joined #ruby-lang
dzejrou has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
<hal_9000> hmm
fusillicode has quit [Ping timeout: 252 seconds]
zendrix has joined #ruby-lang
fusillicode has joined #ruby-lang
fusillicode1 has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
Guest24 is now known as lele
bturker has joined #ruby-lang
shazaum has quit [Quit: Leaving]
<hal_9000> well, this gives me an argument error - https://gist.github.com/Hal9000/d6f1a75a4781d25c4a22
<hal_9000> i assumed it would return a string rather than making me pass on in (as in C)
<hal_9000> at some point, i got one variation to do something, but it returned mostly nulls
workmad3 has quit [Ping timeout: 255 seconds]
<hal_9000> actually scr_dump is the same way
moretti has joined #ruby-lang
Astrologos_ is now known as dorei
skade has quit [Quit: Computer has gone to sleep.]
alestuber has quit [Read error: Connection reset by peer]
jacaballero has joined #ruby-lang
araujo has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
<imperator> k, lemme look
symm- has joined #ruby-lang
alestuber has joined #ruby-lang
michaeldeol has joined #ruby-lang
<imperator> in `mvinchstr': :pointer argument is not a valid pointer (ArgumentError)
<imperator> yep, dat looks like a bug to me
<imperator> well, wait
<hal_9000> did you try scr_dump(file) ?
<hal_9000> yeah, i was trying to guess what the ruby form should be based on the C form
<imperator> looking at the C func, looks like 3rd arg should be a string
<hal_9000> how would i pass in a string ptr in ruby?
<hal_9000> it’s a butfer for the result to be placed into
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hal_9000> i assumed the ruby version would return a string instead
wallerdev has joined #ruby-lang
<imperator> so, you may have to create your own buffer
<imperator> hard for me to tell, as i don't seem to have stdout
<imperator> but, try buf = 0.chr * 2; and then pass buf as 3rd arg
<hal_9000> hmm ok
yalue has quit [Quit: return 0;]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator> does NC.endwin mess with my stdout or something?
<hal_9000> it should restore everything to normal
ducklobster has joined #ruby-lang
<hal_9000> like stty sane
<hal_9000> you can always open a file and write to it
Fooster has quit [Remote host closed the connection]
<hal_9000> ok - i tried this and it crashed with “Bug:…”
<hal_9000> buf = “0”*3; ch = NC.mvinchstr(1,1,buf) # Expecting ch = "XY"
pr0ton has joined #ruby-lang
<hal_9000> when i substsitute: NC.scr_dump("crap.txt") then it writes a crap.txt file, but i can’t make any sense out of it
aaeron has quit [Quit: aaeron]
<imperator> i guess the first thing is to see if the function is returning OK
<hal_9000> the scr_dump function?
joaomdmo_ has quit [Remote host closed the connection]
<imperator> any function really
<hal_9000> well, the demo calls plenty of functions
joaomdmoura has joined #ruby-lang
<imperator> unless the lib is automatically checking return values
<imperator> but it doesn't look like it is
<hal_9000> oh, i thought you meant it might have crashed on scr_dump
<imperator> well, that method is returning 99 for me
<imperator> which is neither 0 nor -1, so maybe that's a red herring
<hal_9000> maybe even a plaid herring
pr0ton has quit [Quit: pr0ton]
pr0ton has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 264 seconds]
kadoppe has quit [Ping timeout: 265 seconds]
pr0ton has quit [Client Quit]
pr0ton has joined #ruby-lang
<imperator> i tried using a FFI::MemoryPointer directly
<imperator> it did not like that one bit
alestuber has quit [Ping timeout: 272 seconds]
dellavg_ has quit [Ping timeout: 264 seconds]
kadoppe has joined #ruby-lang
<imperator> not sure where to go from here
pr0ton has quit [Client Quit]
alestuber has joined #ruby-lang
<imperator> 3rd arg should definitely be a buffer, it just...doesn't seem to send anything back
michaeldeol has joined #ruby-lang
pr0ton has joined #ruby-lang
<imperator> lol, can't use the command line debugger, ncurses messes with it
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hal_9000> all i want is the functionality :)
skade has joined #ruby-lang
<hal_9000> msybe i should try another curses gem
dagda1 has joined #ruby-lang
<imperator> yep, may have to try one of the more recent ones
jgpawletko has quit [Quit: jgpawletko]
joaomdmoura has joined #ruby-lang
duderonomy has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
joaomdmoura has quit [Ping timeout: 256 seconds]
joaomdmoura has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
gambl0re has quit [Ping timeout: 272 seconds]
joaomdmoura has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
workmad3 has joined #ruby-lang
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alestuber has quit [Ping timeout: 276 seconds]
banister has joined #ruby-lang
alestuber has joined #ruby-lang
begal-sop__ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
ldnunes has quit [Quit: Leaving]
joaomdmoura has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby-lang
michaeldeol has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michaeldeol has quit [Client Quit]
momomomomo has joined #ruby-lang
Astrologos_ has joined #ruby-lang
skade has joined #ruby-lang
LBo has joined #ruby-lang
allomov has joined #ruby-lang
michaeldeol has joined #ruby-lang
dorei has quit [Ping timeout: 264 seconds]
Astrologos_ is now known as dorei
zendrix has quit []
guillaume-rb has quit [Quit: guillaume-rb]
djbkd has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alestuber has quit [Ping timeout: 272 seconds]
Astrologos_ has joined #ruby-lang
dorei has quit [Ping timeout: 256 seconds]
alestuber has joined #ruby-lang
Astrologos_ is now known as dorei
baweaver has joined #ruby-lang
joaomdmoura has joined #ruby-lang
futilegames has joined #ruby-lang
baweaver has quit [Ping timeout: 265 seconds]
bungoman has quit [Remote host closed the connection]
futilegames has quit [Ping timeout: 240 seconds]
joaomdmoura has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
<aaeron> Hey
<aaeron> What is the best way to run shell commands in Ruby
<aaeron> ?
<aaeron> Shall I use a gem like mixlib-shellout?
<aaeron> Or plain simple ``
<aaeron> ?
djbkd has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<jhass> aaeron: best is entirely subjective and depending on your usecase/demands
<aaeron> I just need to be able to unit test it using respec
<aaeron> rspec
<aaeron> I am trying to use mixlib-shellout
<aaeron> But I dont know how to test mixlib::shellout
<aaeron> I am not able ot mock it
<aaeron> Nor do I see any examples. I am using rspec 3.0
djbkd has joined #ruby-lang
<jhass> just allow(Mixli::ShellOut).to receive(:new).and_return(double(run_command: nil, stdout: "bar")) ?
<aaeron> Let me check
<jhass> depending on what you want to test
Squarepy has joined #ruby-lang
Squarepy has quit [Changing host]
Squarepy has joined #ruby-lang
baweaver has joined #ruby-lang
<aaeron> NoMethodError:
<aaeron> undefined method `stderr' for nil:NilClass
bturker has quit [Ping timeout: 244 seconds]
<aaeron> I think u made it very close for me
<aaeron> I just want to check the response in response = Mixlib::ShellOut.new(cmd).run_command
<jhass> "check the response"?
<aaeron> Yep
<aaeron> For response.stdout and response.stderr
<jhass> you mean you want to check your program acts accordingly for a given output of stderr?
<aaeron> yes
<aaeron> and stdout respectively
<jhass> double(run_command: double(stdout: "foo", stderr: "bar"))
djbkd has quit [Remote host closed the connection]
<aaeron> Oh. A step closer. Cool
<aaeron> Where do I learn rspec from? U are an expert in it
<aaeron> definitely
alestuber has quit [Ping timeout: 246 seconds]
alestuber has joined #ruby-lang
<jhass> not really
enebo has quit [Quit: enebo]
<jhass> just check the docs
<aaeron> U seem to know how to mock a module, class
<aaeron> And I have not seen any documentation on that
<aaeron> rspec.info does not provide much information.
<aaeron> the information u provided is not available anywhere on google as far as I know.
<aaeron> Thanks jhass
benlovell has joined #ruby-lang
<aaeron> Thanks jhass
<aaeron> Thanks a lot
imperator has quit [Quit: Leaving]
djbkd has joined #ruby-lang
imperator2 has quit [Quit: Valete!]
benlovell has quit [Ping timeout: 246 seconds]
Forgetful_Lion has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
skade has quit [Quit: Computer has gone to sleep.]
joaomdmoura has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joaomdmoura has quit [Ping timeout: 245 seconds]
__butch__ has quit [Quit: Leaving.]
djbkd has quit [Remote host closed the connection]
<aaeron> jhass - How do we test for fails ‘’ unless conditions
baweaver has quit [Remote host closed the connection]
<aaeron> ?
duderonomy has joined #ruby-lang
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 256 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Astrologos_ has joined #ruby-lang
jacaballero has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby-lang
astro-logos has joined #ruby-lang
dorei has quit [Ping timeout: 256 seconds]
astro-logos is now known as dorei
Astrologos_ has quit [Ping timeout: 250 seconds]
gambl0re has joined #ruby-lang
k3asd` has quit [Quit: leaving]
workmad3 has quit [Ping timeout: 250 seconds]
malconis has joined #ruby-lang
bungoman has joined #ruby-lang
xavier has joined #ruby-lang
xavier is now known as Guest75332
Guest75332 is now known as xshay
<xshay> hello friends, it appears to me that json.rb is not included in core redhat RPMs
malconis has quit [Ping timeout: 264 seconds]
<xshay> is this a thing people know about? Or am I doing it wrong?
<xshay> 2nd question: why are ruby and ruby-libs (the stdlib AFAICT?) distributed separately?
bungoman has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
ogpastaling has quit [Ping timeout: 256 seconds]
banister has joined #ruby-lang
ysuo85 has joined #ruby-lang
<ysuo85> hi, is anybody here?
<xshay> ysuo85: depends on what your question is
<baweaver> xshay: heh, didn't know you were on here
<ysuo85> would anybody be kind to drill me on some basic ruby array and string methods? only if you are free..
astro-logos has joined #ruby-lang
<baweaver> >> p 'we have repl'
<eval-in> baweaver => "we have repl" ... (https://eval.in/339174)
<baweaver> ah good
<ljarvis> ysuo85: check the documentation?
<baweaver> Ah all in good fun though
<baweaver> here are a few for you on Arrays
<baweaver> or rather Enumerable
<baweaver> Given an Array of the numbers 1 to 10, return the sum of all of the elements
<bnagy> >> 10*11/2 # gauss
<eval-in> bnagy => 55 (https://eval.in/339175)
Astrologos_ has joined #ruby-lang
<baweaver> ysou85 ^
<baweaver> (not the point)
<bnagy> :D
<baweaver> (but points for clever)
<bnagy> well I didn't want to spoil the answer
<baweaver> fair enough
<ysuo85> 55
<ysuo85> I used each
dorei has quit [Ping timeout: 264 seconds]
<baweaver> >> p 'use me use me!'
<eval-in> baweaver => "use me use me!" ... (https://eval.in/339178)
<baweaver> Each is now off limits
<xshay> baweaver: I'm not normally, but I got questions that need answers :P
astro-logos has quit [Ping timeout: 272 seconds]
<baweaver> Fair enough
<ysuo85> what is that # gauss?
<baweaver> I'll give you a hint that the solution without each is in Enumerable and starts with an R
<ysuo85> r...
<ljarvis> lies, it starts with an i
<ljarvis> you cant use that in Ruby, there's too many aliases
* baweaver uses Haskell, it's FoldL
<baweaver> There are aliases for everything in ruby :D
djbkd has joined #ruby-lang
<baweaver> r..... is more intention revealing for me coming from there as you're r....ing a list into a single element
<ljarvis> baweaver: this really isn't helping ysuo85
<ysuo85> well I lucked up the documentation. its (1..10).reduce(:+)
<ysuo85> but what is it actually doing?
<baweaver> bingo
<baweaver> >> (1..10).reduce(:+)
<eval-in> baweaver => 55 (https://eval.in/339180)
<baweaver> or long hand
<baweaver> >> (1..10).reduce { |accumulator, n| accumulator + n }
<eval-in> baweaver => 55 (https://eval.in/339181)
<baweaver> knowing map and reduce are pretty handy tools to have.
<baweaver> ysuo85: Same documentation area, use map to double all the elements from 1 to 10
<ysuo85> (1..10).map {|n| n*2} ?
<baweaver> bingo
hackeron has quit [Remote host closed the connection]
<baweaver> same area, give me only the even numbers in the array of 1 to 10
<bnagy> >> (1..10).map.with_object([0]) {|n, i| i[0]+=n}.last
<eval-in> bnagy => 55 (https://eval.in/339212)
<bnagy> rawr
dorei has joined #ruby-lang
<baweaver> methods to look into are select and filter
<ysuo85> (1..10).select {|n| n % 2 == 0}
<baweaver> you can also do this:
<baweaver> >>(1..10).select(&:even?)
<eval-in> baweaver => [2, 4, 6, 8, 10] (https://eval.in/339213)
<ysuo85> interesting.. ruby seems to have a shortcut for everything lol
sarkyniin has quit [Quit: Quit]
<baweaver> A lot of them, yeah
<baweaver> Now then, for something a bit more
hackeron has joined #ruby-lang
<baweaver> %w(the person the manager sent to the office)
<baweaver> count each word in that array
Squarepy has quit [Quit: Leaving]
<baweaver> same area, there's a grouping function that could help
<ysuo85> %w(the person the manager sent to the office).split(" ").count
Astrologos_ has quit [Ping timeout: 272 seconds]
<baweaver> >> %w(the person the manager sent to the office)
<eval-in> baweaver => ["the", "person", "the", "manager", "sent", "to", "the", "office"] (https://eval.in/339214)
<ljarvis> ysuo85: use >> then your code
<baweaver> already an array
* baweaver forgets that's not something some people know
<ysuo85> oh
<baweaver> count of each word though
<ysuo85> >> %w(the person the manager sent to the office).count
<eval-in> ysuo85 => 8 (https://eval.in/339215)
<baweaver> the has 3 instances for instance
dorei has quit [Ping timeout: 240 seconds]
<ysuo85> oh so you want each distinct word?
<baweaver> yep
<baweaver> there's a grouping function that could be of use here
<baweaver> and you already know map
dorei has joined #ruby-lang
<baweaver> and conveniently count as well
<ysuo85> well I know how to do it with a new array. you iterate through each element and push the word in and if it include? the same element it wont push it in again. but you sound like there is a one liner for this too
<baweaver> It can be done
<baweaver> Going through some of the more fun bits of Ruby
<bnagy> there's a one-liner for everything
sankaber has joined #ruby-lang
<bnagy> the trick is knowing when they're stupid
<baweaver> in Common Lisp everything's a one liner :D
xshay has quit [Ping timeout: 246 seconds]
<baweaver> >> (1..10).group_by(&:even?)
<eval-in> baweaver => {false=>[1, 3, 5, 7, 9], true=>[2, 4, 6, 8, 10]} (https://eval.in/339216)
wallerdev has quit [Quit: wallerdev]
<ljarvis> ^ partition
<baweaver> in that case, yes, better idea
<baweaver> just giving hints for a word count
<baweaver> >> (1..10).partition(&:even?)
<eval-in> baweaver => [[2, 4, 6, 8, 10], [1, 3, 5, 7, 9]] (https://eval.in/339217)
<baweaver> ysuo85: need any help?
<ysuo85> still trying to figure out. could use some hint yeah
<baweaver> See the group by up there?
<ysuo85> group_by(&:even?)?
dorei has quit [Ping timeout: 244 seconds]
<baweaver> %w(the person the manager sent to the office).group_by(&:itself)
<baweaver> >> %w(the person the manager sent to the office).group_by(&:itself)
<eval-in> baweaver => {"the"=>["the", "the", "the"], "person"=>["person"], "manager"=>["manager"], "sent"=>["sent"], "to"=>["to"], "office"=>["office"]} (https://eval.in/339218)
<baweaver> how would you transform that into word => count?
<baweaver> using map
arBmind1 has quit [Quit: Leaving.]
<bnagy> itself??
<bnagy> 2.2 bullshit
<ysuo85> >> %(the person the manager sent to the office).group_by(&:itself).keys.count
<eval-in> ysuo85 => undefined method `group_by' for "the person the manager sent to the office":String (NoMethodError) ... (https://eval.in/339222)
<ysuo85> oops
<baweaver> %w
<ysuo85> >> %w(the person the manager sent to the office).group_by(&:itself).keys.count
<eval-in> ysuo85 => 6 (https://eval.in/339244)
<baweaver> you'll want to use map though
<baweaver> that only tells you uniq words
<baweaver> %w(the person the manager sent to the office).uniq
* baweaver keeps forgetting repl >>s
<baweaver> >> %w(the person the manager sent to the office).uniq
<eval-in> baweaver => ["the", "person", "manager", "sent", "to", "office"] (https://eval.in/339250)
izzimus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> >> %w(the person the manager sent to the office).uniq.count
<eval-in> baweaver => 6 (https://eval.in/339251)
<ysuo85> oh. thats a lot shorter.
<baweaver> except you need the counts of each word
<baweaver> not uniq words
<ysuo85> >> %w(the person the manager sent to the office).count
<eval-in> ysuo85 => 8 (https://eval.in/339252)
<ysuo85> sorry I don't get it. this is counting each word right?
<baweaver> >> %w(the person the manager sent to the office).group_by(&:itself).map { |word, occurrences| [word, occurrences.count] }.to_h
<eval-in> baweaver => {"the"=>3, "person"=>1, "manager"=>1, "sent"=>1, "to"=>1, "office"=>1} (https://eval.in/339253)
<ysuo85> oooh, thats what you meant
<baweaver> group_by gives you a hash indexed by the result of the block
<baweaver> >> 1.itself
<eval-in> baweaver => 1 (https://eval.in/339254)
<baweaver> itself is literally the object itself
zendrix has joined #ruby-lang
<baweaver> so if you group it by that, you get the word
<baweaver> and all occurrences as an array
<ysuo85> I didn't know hash had a map function
<baweaver> so you can map that for a count
<baweaver> Hash has Enumerable methods
<bnagy> assuming you never encounter a pre 2.2 interpreter
<baweaver> BUT
<baweaver> notice this
<baweaver> >> %w(the person the manager sent to the office).group_by(&:itself).map { |word, occurrences| [word, occurrences.count] }
<eval-in> baweaver => [["the", 3], ["person", 1], ["manager", 1], ["sent", 1], ["to", 1], ["office", 1]] (https://eval.in/339255)
<baweaver> it returns arrays more often than not, and even if you returned a hash from that block it wouldn't be merged
<baweaver> >> %w(the person the manager sent to the office).group_by(&:itself).map { |word, occurrences| {word => occurrences.count} }
<eval-in> baweaver => [{"the"=>3}, {"person"=>1}, {"manager"=>1}, {"sent"=>1}, {"to"=>1}, {"office"=>1}] (https://eval.in/339256)
<baweaver> You could
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> >> %w(the person the manager sent to the office).group_by(&:itself).map { |word, occurrences| {word => occurrences.count} }.reduce(&:merge!)
<eval-in> baweaver => {"the"=>3, "person"=>1, "manager"=>1, "sent"=>1, "to"=>1, "office"=>1} (https://eval.in/339257)
<baweaver> but the to_h solution is a bit more succinct.
<ljarvis> :|
<baweaver> Going through Enumerable is perhaps one of the best things you can do to get a grasp on Ruby list manipulations
duderonomy has quit [Ping timeout: 240 seconds]
<baweaver> Anyways, off I go, need to finish a few things off.
alestuber has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
<baweaver> and identity functions are useful, mind. (itself)
Forgetful_Lion has quit [Remote host closed the connection]
<bnagy> uh huh
<bnagy> totally needed something that replicates existing functionality but longer
<baweaver> To each their own
slawrence00 has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
pipework is now known as spaceghostc2c
spaceghostc2c is now known as pipework
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
<ysuo85> sorry kid started crying
bungoman has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby-lang
bungoman has quit [Ping timeout: 256 seconds]
ysuo85 has left #ruby-lang [#ruby-lang]
dvlwrk has quit [Read error: Connection reset by peer]
dvlwrk has joined #ruby-lang
marr has quit []