apeiros changed the topic of #ruby-lang to: Ruby 2.1.0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || RubyConf 2013 at http://www.justin.tv/confreaks
dm78 has quit [Remote host closed the connection]
specialblend has joined #ruby-lang
dm78 has joined #ruby-lang
skade has joined #ruby-lang
kurko_ has joined #ruby-lang
dm78 has quit [Ping timeout: 265 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
<hfp> I have another one. Consider this: http://pastie.org/8683906. Why was a variable used rather than a literal? I would say it's for concision. Am I missing something?
elliotec has quit [Remote host closed the connection]
feinbergscott has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> hfp, Yes, it is for clarity
<rickhull> is there a way to use fork, and have the parent capture the child's output?
specialblend has quit [Quit: specialblend]
<hfp> centrx: Alright, thanks
<rickhull> i know i can make an io pipe to do so explicitly
ric__ has quit []
thiagoborges has joined #ruby-lang
thiagoborges has quit [Remote host closed the connection]
thiagoborges has joined #ruby-lang
kurko__ has joined #ruby-lang
jsrn has quit [Quit: Leaving]
rushed has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
makoto_ has quit [Remote host closed the connection]
bin7me has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
mistym has quit [Remote host closed the connection]
brettweavnet has quit [Quit: Bye]
mistym has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
anulman has joined #ruby-lang
|jemc| has quit [Ping timeout: 264 seconds]
enebo has quit [Quit: enebo]
micalexander has quit [Remote host closed the connection]
Lewix_ has quit [Remote host closed the connection]
micalexander has joined #ruby-lang
Lewix has joined #ruby-lang
nonnatus has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
ric__ has joined #ruby-lang
seanlinsley has quit [Quit: …]
ric__ has quit [Remote host closed the connection]
ric__ has joined #ruby-lang
ric__ has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 252 seconds]
ric__ has joined #ruby-lang
ric__ has quit [Client Quit]
nathanstitt has joined #ruby-lang
futureshocked has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
tkuchiki has joined #ruby-lang
|jemc| has joined #ruby-lang
nonnatus has joined #ruby-lang
rushed has quit [Quit: rushed]
kalehv_ has joined #ruby-lang
CaptainJet has quit []
kalehv has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
rushed has joined #ruby-lang
Szop_ has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
snarfmason has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
nonnatus has quit [Ping timeout: 245 seconds]
dm78 has joined #ruby-lang
enebo has joined #ruby-lang
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
makoto_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
hagabaka has joined #ruby-lang
ssb123_ has joined #ruby-lang
ssb123_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 248 seconds]
dm78 has quit [Ping timeout: 252 seconds]
ssb123 has quit [Ping timeout: 240 seconds]
makoto_ has quit [Ping timeout: 265 seconds]
nonnatus has joined #ruby-lang
plurt has joined #ruby-lang
elliotec has joined #ruby-lang
mykoweb has joined #ruby-lang
kalehv_ has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
enebo has quit [Quit: enebo]
seanlinsley has joined #ruby-lang
<hfp> Is `hash` a special variable or something? hash.class returns Fixnum, hash.empty? doesn't exist and hash.size is 8 on my machine but 4 on repl.it. What gives?
plurt has quit [Quit: Computer has gone to sleep.]
<rickhull> hash is a method on Object or Kernel i think
<rickhull> you can assign to it, to create a local var with that name
<rickhull> but unless the local var exists, you're actually calling a method
kalehv has joined #ruby-lang
<whitequark> yorickpeterse: open an issue
<ledestin> rickhull: popen? or alternative popen3
<rickhull> yeah, really i need nonblocking behavior
<rickhull> which popen/3 may provide, not sure
<ledestin> well, just use read_nonblock
<rickhull> i mean, the call to popen will block until the command finishes
cored has quit [Ping timeout: 245 seconds]
<rickhull> though maybe there is a flag or different method. i want to create N subprocesses in the background, and then wait on them and capture their status and outputs
<ledestin> IO.popen returns io if you don't pass block
makoto_ has joined #ruby-lang
<rickhull> ok, cool. i think i'm just a bit brain damaged from using popen in a blocking fashion for years
<drbrain> rickhull: checkout Process.spawn too
<drbrain> rickhull: it's easier than using popen, IMO
<rickhull> drbrain: yeah, a coworker pointed me there since i asked the q in here
<rickhull> haven't digested it yet, but i think that's what i'll do
<rickhull> also looking at https://github.com/jarib/childprocess
thiagoborges has quit []
makoto_ has quit [Ping timeout: 260 seconds]
<drbrain> rickhull: r, w = IO.pipe; Process.spawn "date", out: w; w.close; p r.read
vlad_starkov has quit [Read error: Connection reset by peer]
<rickhull> pretty slick, the example helps. thx
<drbrain> the documentation for Process.spawn is rather thorough but also terse
plurt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<rickhull> for my case, i'd collect N pids and then Process.wait on them?
setmeaway has joined #ruby-lang
plurt has quit [Client Quit]
<rickhull> nvm, yeah
<drbrain> yeah
<rickhull> n.times { pids << spawn }; pids.each { wait }; writes.each { close }; reads.each { capture } # pseudocode
<rickhull> and get status from $?
<drbrain> I would do it:
<rickhull> are stdout and stderr merged?
<rickhull> nvm, spawn docs :)
<drbrain> values = n.times { Thread.new { pid, io = spawn; status = Process.wait pid; io.close; capture io.read } }.map { |t| t.join }
r0bglees0n has quit [Quit: z]
jtw has joined #ruby-lang
<drbrain> you can merge them if you set out: and err: to the same IO
<rickhull> right, ok
<rickhull> are threads necessary, cf my pseudocode?
RobertBirnie has quit [Ping timeout: 272 seconds]
<drbrain> no, but it allows you to start processing output sooner
<rickhull> i actually have a threaded solution in the works, so it's not like 'scared of threads'
<rickhull> oh, side note. Process.wait just returns the pid you gave it i think. you have to use $? from what i can tell
<drbrain> you're right, but I thought I did this once
<rickhull> i thought returning a status would make more sense
<drbrain> ah, Process.wait2
<rickhull> obviously i know what the friggin pid is
<rickhull> oh Process.wait(0) makes sense to return thepid
<drbrain> pid, status = Process.wait2 pid
<rickhull> cool
<rickhull> i really hate those implicit globals
<rickhull> they seem to be very dangerous in concurrent situations
<drbrain> $? might be a magic thread-local
<drbrain> yeah, it is
kurko__ has quit [Quit: Computer has gone to sleep.]
elliotec has quit [Remote host closed the connection]
kalehv has quit [Remote host closed the connection]
Barrin6 has joined #ruby-lang
RoxasShadowRS has quit [Read error: Connection reset by peer]
elliotec has joined #ruby-lang
RobertBirnie has joined #ruby-lang
vlad_starkov has joined #ruby-lang
kurko_ has joined #ruby-lang
ecnalyr has joined #ruby-lang
lfox has joined #ruby-lang
ecnalyr has quit [Ping timeout: 240 seconds]
jsullivandigs has joined #ruby-lang
mistym has joined #ruby-lang
insidious has joined #ruby-lang
plurt has joined #ruby-lang
flori has quit [Ping timeout: 252 seconds]
flori has joined #ruby-lang
plurt has quit [Quit: Computer has gone to sleep.]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
postmodern has quit [Quit: Leaving]
marr has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
makoto_ has joined #ruby-lang
tylersmith has joined #ruby-lang
nonnatus has left #ruby-lang ["Leaving"]
jsullivandigs has quit [Remote host closed the connection]
makoto_ has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
plurt has joined #ruby-lang
tylersmith has quit [Ping timeout: 252 seconds]
mistym has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby-lang
mistym_ has joined #ruby-lang
plurt has quit [Client Quit]
mistym has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
CJD14 has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
flip_digits has quit []
havenwood has joined #ruby-lang
Johz has quit [Quit: Leaving]
elliotec has joined #ruby-lang
dm78 has joined #ruby-lang
Kabaka has quit [Ping timeout: 245 seconds]
jsullivandigs has joined #ruby-lang
Lewix has joined #ruby-lang
jamto11 has joined #ruby-lang
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
nathanst_ has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
ric__ has joined #ruby-lang
kalehv has joined #ruby-lang
yfeldblum has joined #ruby-lang
thmzlt has quit [Remote host closed the connection]
kalehv has quit [Ping timeout: 253 seconds]
sepp2k has quit [Read error: Connection reset by peer]
thmzlt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
<Lewix> anyone here need a contractor?
thmzlt has quit [Ping timeout: 269 seconds]
|jemc| has quit [Ping timeout: 252 seconds]
tylersmith has joined #ruby-lang
|jemc| has joined #ruby-lang
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
retro|cz has quit [Ping timeout: 272 seconds]
mistym_ has quit [Remote host closed the connection]
makoto_ has joined #ruby-lang
Wardrop has joined #ruby-lang
Kabaka has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
<Wardrop> Just to double check, if I run a bunch of external commands using the #system method in multiple Ruby threads, those external commands will run in parallel correct?
makoto_ has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
Cakey has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
lfox has joined #ruby-lang
lfox has quit [Client Quit]
therealtesseract has joined #ruby-lang
<centrx> Wardrop, I assume so, it spawns a new process
<centrx> Wardrop, You could also use #spawn to do it in one thread
<centrx> from one thread
<Wardrop> I've just worked out that LibreOffice is single threaded. I'm using `soffice` to convert Word documents (among others) to PDF. It seems only one `soffice` process can actually do anything at any given the moment. The rest of the instances wait around. It surely must be terribly designed software to have to have separate independent processes wait on one another. Dodgy.
<Wardrop> centrx: I was using the `peach` gem to actually handle the threading.
lsegal has joined #ruby-lang
hahuang65 has joined #ruby-lang
yfeldblum has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsullivandigs has quit [Remote host closed the connection]
anulman has quit [Quit: Leaving.]
dorei has quit []
face has joined #ruby-lang
faces has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
charliesome has quit [Ping timeout: 252 seconds]
kitak has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
dvorak has quit [Remote host closed the connection]
JoshuaPaling has joined #ruby-lang
havenwood has joined #ruby-lang
dvorak has joined #ruby-lang
insidious has quit []
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
kitak has joined #ruby-lang
nathanst_ has quit [Quit: I growing sleepy]
jsullivandigs has quit [Ping timeout: 248 seconds]
skade has joined #ruby-lang
rahul_j has joined #ruby-lang
havenwood has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
havenwood has joined #ruby-lang
skade has quit [Client Quit]
mistym has joined #ruby-lang
arooni-mobile has joined #ruby-lang
skade has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
makoto_ has joined #ruby-lang
goatish_mound has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
nonnatus has joined #ruby-lang
rsl has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
makoto_ has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
saarinen has joined #ruby-lang
rsl has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
rsl has joined #ruby-lang
rsl has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
CaptainJet has quit []
saarinen has quit [Quit: saarinen]
alekst has quit [Quit: Computer has gone to sleep.]
kitak has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
jamto11 has quit [Remote host closed the connection]
flori has quit [Ping timeout: 252 seconds]
kitak has joined #ruby-lang
kitak has quit [Remote host closed the connection]
anulman has joined #ruby-lang
kitak has joined #ruby-lang
flori has joined #ruby-lang
vlad_starkov has joined #ruby-lang
mistym_ has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
kitak has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 260 seconds]
rahul_j has quit [Quit: rahul_j]
therealtesseract has quit [Quit: therealtesseract]
jamto11 has joined #ruby-lang
CJD14 has quit [Ping timeout: 240 seconds]
bzalasky has joined #ruby-lang
d4rkr4i has joined #ruby-lang
rahul_j has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
phansch has joined #ruby-lang
makoto_ has joined #ruby-lang
kitak has joined #ruby-lang
supyo has quit [Read error: Operation timed out]
makoto_ has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
yatish27 has joined #ruby-lang
marcofernandez has joined #ruby-lang
skade has joined #ruby-lang
d4rkr4i has quit [Quit: Leaving.]
supyo has joined #ruby-lang
jtw has quit []
yfeldblum has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
dm78 has quit [Remote host closed the connection]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
vlad_starkov has joined #ruby-lang
dm78 has joined #ruby-lang
d4rkr4i has joined #ruby-lang
dm78 has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
tkuchiki has quit [Remote host closed the connection]
setmeaway has quit [Quit: Leaving]
Szop_ has joined #ruby-lang
AKASkip has joined #ruby-lang
heftig has quit [Quit: Quitting]
wallerdev has joined #ruby-lang
yfeldblum has joined #ruby-lang
mykoweb has joined #ruby-lang
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby-lang
arBmind has joined #ruby-lang
iliketurtles has quit [Excess Flood]
d4rkr4i has quit [Ping timeout: 240 seconds]
makoto_ has joined #ruby-lang
NemesisD has joined #ruby-lang
amclain has joined #ruby-lang
apeiros_ has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
skade has quit [Ping timeout: 264 seconds]
makoto_ has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
rahul_j has quit [Quit: rahul_j]
relix has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
AKASkip has quit [Ping timeout: 245 seconds]
RobertBirnie has joined #ruby-lang
knu has joined #ruby-lang
snarfmason has quit [Quit: Textual IRC Client: www.textualapp.com]
feinbergscott has joined #ruby-lang
d4rkr4i has joined #ruby-lang
feinbergscott has quit [Client Quit]
Barrin6 has quit [Quit: Leaving]
rahul_j has joined #ruby-lang
<RobertBirnie> i've got a ruby method that is reaching out to a web API. it seems somewhere i'm getting a random never ending method. like something isn't timing out that should
<RobertBirnie> it works fine 99% of the time and i can't reproduce it
<RobertBirnie> any ideas on what you'd do to track down where it gets stuck?
NemesisD has quit [Ping timeout: 265 seconds]
snarfmason has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
skade has joined #ruby-lang
michd is now known as MichD
<whitequark> RobertBirnie: trap(:SIGQUIT) { puts caller }
<whitequark> then press Ctrl+\
Lewix has quit [Quit: Leaving...]
apeiros has quit [Ping timeout: 248 seconds]
wallerdev has quit [Quit: wallerdev]
robbyoconnor has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
jamto11 has quit [Remote host closed the connection]
knu has joined #ruby-lang
riffraff has joined #ruby-lang
vlad_starkov has joined #ruby-lang
skade has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
jamto11 has joined #ruby-lang
kitak has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
charliesome has quit [Ping timeout: 264 seconds]
dm78 has quit [Ping timeout: 272 seconds]
kitak has joined #ruby-lang
AKASkip has joined #ruby-lang
skade has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has quit [Remote host closed the connection]
dagobah has joined #ruby-lang
makoto_ has joined #ruby-lang
jamto11 has joined #ruby-lang
rsl has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
makoto_ has quit [Ping timeout: 272 seconds]
elliotec has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
rsl has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
AKASkip has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: Leaving]
fragamus has joined #ruby-lang
phansch has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
mistym_ has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 265 seconds]
amclain has quit [Quit: Leaving]
elliotec has joined #ruby-lang
ruby-lang484 has joined #ruby-lang
<ruby-lang484> Hey guys. How can I remove a block of text in a file which begins with "[blockxy]"?
elliotec has quit [Remote host closed the connection]
kitak has joined #ruby-lang
<ruby-lang484> Can someone help?
nifoc has joined #ruby-lang
ruby-lang205 has joined #ruby-lang
<ruby-lang205> Can someone help?
ruby-lang484 has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
<ledestin> ruby-lang205: use sed(1)
<ljarvis> moin
jamto11 has joined #ruby-lang
<ljarvis> ruby-lang205: also agreed you should use sed, but if you want to use ruby, you'd need to rewrite the file line by line without that block if text
arBmind has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
solars has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
jamto11 has joined #ruby-lang
apeiros has joined #ruby-lang
fragamus has quit [Ping timeout: 245 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has quit [Remote host closed the connection]
ruby-lang205 has quit [Ping timeout: 245 seconds]
RoxasShadowRS has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
rahul_j has quit [Quit: rahul_j]
knu has joined #ruby-lang
symm- has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
arBmind has joined #ruby-lang
nifoc has quit []
skade has joined #ruby-lang
makoto_ has joined #ruby-lang
Voker57 has quit [Ping timeout: 264 seconds]
cnivolle has joined #ruby-lang
makoto_ has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
relix has joined #ruby-lang
AKASkip has joined #ruby-lang
tbuehlmann has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
arctaruz has joined #ruby-lang
phansch has joined #ruby-lang
mikecmpbll has joined #ruby-lang
nifoc has joined #ruby-lang
mucker_ has joined #ruby-lang
mucker has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
jsrn has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
korpz has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
francisfish has joined #ruby-lang
marr has joined #ruby-lang
rahul_j has joined #ruby-lang
benlovell has quit [Ping timeout: 260 seconds]
feinbergscott has joined #ruby-lang
benlovell has joined #ruby-lang
<yorickpeterse> morning kids
nofxx has quit [Ping timeout: 272 seconds]
jamto11 has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
|jemc| has quit [Ping timeout: 252 seconds]
benlovell has quit [Ping timeout: 272 seconds]
jamto11 has quit [Ping timeout: 252 seconds]
<yorickpeterse> support request:
<yorickpeterse> "If I push to http://foo.bar I get a 301 moved permanently"
<yorickpeterse> it uses SSL
<yorickpeterse> this is documented
<yorickpeterse> you can't redirect POST
* yorickpeterse facedesk
<ljarvis> :/
<ljarvis> you have the funnest problems
elia has joined #ruby-lang
feinbergscott has quit [Ping timeout: 265 seconds]
solars has joined #ruby-lang
feinbergscott has joined #ruby-lang
nifoc has quit []
nifoc has joined #ruby-lang
benlovell has joined #ruby-lang
makoto_ has joined #ruby-lang
stef_204 has joined #ruby-lang
<yorickpeterse> meh, I'd prefer it if these EC2s would actually tell me why they are slow
makoto_ has quit [Ping timeout: 245 seconds]
<apeiros> it's friday. they're slacking off.
<yorickpeterse> they have been for a week now
makoto_ has joined #ruby-lang
<ljarvis> bad week
makoto_ has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
retro|cz has joined #ruby-lang
stef_204 has joined #ruby-lang
stef_204 has quit [Client Quit]
mistym has joined #ruby-lang
chaos_ has joined #ruby-lang
stef_204 has joined #ruby-lang
chaos_ has left #ruby-lang [#ruby-lang]
soahccc has joined #ruby-lang
mistym has quit [Ping timeout: 248 seconds]
yatish27 has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
<yorickpeterse> I find it amazing how hard it actually is to get an accurate picture of what is causing your network performance to go to hell on The Linux
arctaruz has left #ruby-lang ["Leaving"]
<yorickpeterse> especially with Ruby
rsl has quit [Read error: Connection reset by peer]
ItSANgo has quit [Ping timeout: 272 seconds]
rsl has joined #ruby-lang
heftig has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
rsl has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<yorickpeterse> at least it's never boring
r0bgleeson has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
<heftig> any idea if Matijs van Zuijlen is on Freenode? Neither 'matijs' nor 'mvz' belong to him
<yorickpeterse> not sure, don't think I've seen him around here
arBmind has quit [Quit: Leaving.]
rahul_j has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 245 seconds]
rolfb has joined #ruby-lang
rsl has quit [Read error: Connection reset by peer]
goatish_mound has joined #ruby-lang
_tockitj has joined #ruby-lang
makoto_ has joined #ruby-lang
kitak has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
francisfish has joined #ruby-lang
makoto_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
phansch has quit [Remote host closed the connection]
phansch has joined #ruby-lang
kirin` has joined #ruby-lang
benlovell has joined #ruby-lang
ItSANgo has joined #ruby-lang
ric__ has quit []
yfeldblum has quit [Ping timeout: 272 seconds]
arBmind has joined #ruby-lang
yatish27 has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
robmiller has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
ledestin has quit [Ping timeout: 252 seconds]
yatish27 has quit [Ping timeout: 240 seconds]
thmzlt has joined #ruby-lang
solars has joined #ruby-lang
rghose has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<rghose> hello am getting Net::HTTPNotFound:0x000000028376b8
<yorickpeterse> ok
diegoviola has joined #ruby-lang
<rghose> I am trying to open an url and get the contents
<rghose> but getting an 406
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse> use the correct URL and/or Accept header?
<yorickpeterse> https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error -> 406 means your Accept header is not correct
vlad_starkov has joined #ruby-lang
yfeldblum has joined #ruby-lang
samlambert has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
ecnalyr has joined #ruby-lang
charliesome has joined #ruby-lang
ledestin has joined #ruby-lang
<rghose> however, similar code works in python!
<rghose> well yes doing a curl gives me an error
<rghose> application/json not accepted
makoto_ has joined #ruby-lang
<rghose> "must accept application/json"
marr has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
kurko_ has joined #ruby-lang
makoto_ has quit [Ping timeout: 252 seconds]
enkristoffer has joined #ruby-lang
korpz has quit [Remote host closed the connection]
mistym has joined #ruby-lang
<darix> rghose: curl -H 'Accept: application/json' url
skade has quit [Quit: Computer has gone to sleep.]
<whitequark> zenspider: restraining myself so hard from telling that guy over on RP issue tracker to just use parser
mistym has quit [Ping timeout: 272 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
MichD is now known as michd
solars has quit [Read error: Operation timed out]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
bin7me has joined #ruby-lang
Lewix has quit [Ping timeout: 240 seconds]
michd is now known as MichD
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
phansch_ has joined #ruby-lang
Lewix has quit [Ping timeout: 272 seconds]
phansch has quit [Ping timeout: 245 seconds]
phansch_ is now known as phansch
prc has joined #ruby-lang
phansch has quit [Read error: Operation timed out]
vondruch has quit [Quit: Ex-Chat]
<rghose> @darix thanks :)
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
yfeldblum has joined #ruby-lang
vondruch has joined #ruby-lang
jamto11 has joined #ruby-lang
EngierkO has joined #ruby-lang
stef_204 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
<rghose> when I do : resp,data = http.get(request,{'Accept'=>'application/json'}
<rghose> data come as nil!
<rghose> the status code is 200 OK however
yalue has joined #ruby-lang
<href> isn't resp.data ?
<manveru> isn't that resp, err ?
<rghose> oh, that is err code ?
<manveru> usually
<manveru> if it's anything like http.Get
<rghose> um not really, resp.data does not exist
<href> >This method returns a Net::HTTPResponse object.
<href> there is just resp
<href> maybe body?
<href> yeah body.
<manveru> resp.Body
jamto11 has quit [Ping timeout: 245 seconds]
kirin` has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
<rghose> resp.body works thanks !
<apeiros> manveru: autoupcase? :)
makoto_ has joined #ruby-lang
kirin` has joined #ruby-lang
<manveru> fuck... wrong language
<apeiros> go?
<apeiros> rust?
<manveru> go :P
<apeiros> like it?
<manveru> yeah
<manveru> it's my fulltime job since summer
<apeiros> recommend it over C?
<apeiros> ooooh, nice scoop
<apeiros> in austria?
soraher has quit [Quit: Tiarra 0.1+svn-39192: SIGTERM received; exit]
<manveru> nah, i work from germany, company is in texas
<apeiros> ah, telework
<manveru> as always
<manveru> it's been like 10 years since i had local work
symm- has quit [Ping timeout: 252 seconds]
<apeiros> dunno, I don't think I could do that
<manveru> i don't have much choice
makoto_ has quit [Ping timeout: 245 seconds]
<manveru> for IT jobs around here you need 15 MS certificates and a CS degree
<manveru> just to toggle the off switch on windows machines
<apeiros> ohcraplol
* darix toggles off switch on manveru's computer
soraher has joined #ruby-lang
* apeiros 's computer has no switch to toggle…
<manveru> now you wish it wasn't kid-tamper-safe
<apeiros> now what? all those 15 certificates won't help you!
<manveru> :)
<manveru> i still have my boot here to... reboot
<apeiros> I prefer sandals
* apeiros is random noise today
yatish27 has joined #ruby-lang
benlovell has quit [Read error: Operation timed out]
d4rkr4i has quit [Ping timeout: 252 seconds]
<manveru> i bet if you put some sox on you could make a pretty cool sound still
<apeiros> I got sox
<apeiros> sadly, while sandals are allowed, it's not allowed without sox, which sux
<apeiros> (yeah, that part would be nice about telework…)
Mon_Ouie has quit [Ping timeout: 245 seconds]
<manveru> it's too cold here for sandals anyway :(
<apeiros> it's never too cold for sandals indoors…
<manveru> i wish i had your passive energy house then :)
<apeiros> I don't heat my apartment the whole year
phansch has joined #ruby-lang
rahul_j has joined #ruby-lang
benlovell has joined #ruby-lang
smashwilson has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
d4rkr4i has joined #ruby-lang
yatish27 has joined #ruby-lang
robmiller has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
sepp2k has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
yatish27 has quit [Remote host closed the connection]
solars has joined #ruby-lang
cored has quit [Quit: leaving]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
benlovell has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
cored has joined #ruby-lang
<yorickpeterse> Hm, I need to come up with a Euruko talk
<yorickpeterse> one that doesn't involve complaining about Mongo
yatish27 has joined #ruby-lang
benlovell has joined #ruby-lang
<maloik> you're saying you do other things as well?
<maloik> :-)
<yorickpeterse> I hate on CentOS some times
jamto11 has joined #ruby-lang
<ljarvis> i hate centos all the times
Lewix has quit [Ping timeout: 245 seconds]
<wnd> "doctor, it hurts when I do this"
plurt has joined #ruby-lang
vpretzel has joined #ruby-lang
sferik has joined #ruby-lang
enkristoffer has quit [Quit: ❤]
jamto11 has quit [Ping timeout: 272 seconds]
toretore has joined #ruby-lang
makoto_ has joined #ruby-lang
yatish27 has quit []
nonnatus has quit [Ping timeout: 252 seconds]
makoto_ has quit [Ping timeout: 240 seconds]
Thanatermesis has joined #ruby-lang
breakingthings has joined #ruby-lang
<yorickpeterse> nice, co-workers seem to be pretty much done with their 150 page PDF report
<yorickpeterse> usind html, d3 and the whole shebang
<yorickpeterse> our current PDF generator stuff is a mess :<
rghose has quit [Ping timeout: 265 seconds]
<yorickpeterse> (prawn)
robbyoconnor has quit [Ping timeout: 245 seconds]
solars has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
mistym has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby-lang
makoto_ has joined #ruby-lang
robmiller has joined #ruby-lang
vlad_starkov has joined #ruby-lang
lfox has joined #ruby-lang
jtw has joined #ruby-lang
<maloik> has anyone here done those exercism things ?
<yorickpeterse> daily basis
<r0bgleeson> lol
<yorickpeterse> Why? You want the ghost of Christ to compell you?
<maloik> Messing around with Hash.new [] and not quite getting wtf is going on
<maloik> sec
<yorickpeterse> So you are posessed?
<yorickpeterse> I can heal you for 3000 EUR
<maloik> you're doing vocabulary wrong yorickpeterse
<maloik> theres no O in exercism
<maloik> nor is there a second C
<maloik> :-)
<r0bgleeson> there's only a 3 prefix baby
<maloik> what?
<yorickpeterse> maloik: oh, in that form it will re-use the same array
<maloik> yea that's what I thought
<maloik> year the nitpicks I got on that submission are that I should use Hash.new([])
<yorickpeterse> Hash.new { |hash, key| hash[key] = {} }
<maloik> hmm
<yorickpeterse> errr
<yorickpeterse> []
<maloik> yea
<r0bgleeson> what do you mean by "exercism" ?
<r0bgleeson> ah
<r0bgleeson> hah
<maloik> okay this is starting to make sense, I guess he was just less verbose in the comment he left
<maloik> yorickpeterse: isnt this more elegant then: Hash.new(Array.new)
<maloik> appears to work
<maloik> or does it
<r0bgleeson> Hash.new(Array.new) is a reference to a single object, but the block form is invoked whenever a key is not found(creating a new object)
yfeldblum has joined #ruby-lang
<maloik> yea... have Hash.new { |h, k| h[k] = Array.new } now
<maloik> bit more verbose but super clear in what it does
<maloik> well I don't use h and k, but I was too lazy to go and copy/paste
<apeiros> use [], not Array.new
<maloik> why ?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> for the same reason that you write x = [1,2,3] and not x = Array.new; x << 1; x << 2; x << 3
<yorickpeterse> maloik: in that case Array.new and [] are identical
<yorickpeterse> They are evaluated before the hash is accessed
yfeldblum has quit [Ping timeout: 245 seconds]
cnivolle has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
sferik has joined #ruby-lang
<maloik> yea I know but I found that it's just more readable
<maloik> as in "you definately want a new array here, and that is the difference with Hash.new([])"
<maloik> thought I'd remember it more easily that way
vpretzel has left #ruby-lang ["Adios!"]
prc has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby-lang
houhoulis has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
symm- has joined #ruby-lang
micalexander has joined #ruby-lang
mrevd has joined #ruby-lang
jamto11 has joined #ruby-lang
riffraff has quit [Quit: This computer has gone to sleep]
micalexander has quit [Ping timeout: 265 seconds]
rahul_j has quit [Quit: rahul_j]
riffraff has joined #ruby-lang
riffraff has quit [Remote host closed the connection]
momomomomo_ has joined #ruby-lang
<yorickpeterse> lol for editing servers with Capistrano
<yorickpeterse> too lazy to start imaging and stuff just to test things
momomomomo has quit [Read error: Connection reset by peer]
momomomomo_ is now known as momomomomo
<momomomomo> What are you trying to achieve yorickpeterse
<yorickpeterse> less shit network performance
tylersmith has joined #ruby-lang
<yorickpeterse> but I'm running tests on 5 instances and I cbf doing the same changes 5 times
<yorickpeterse> so I run them using Crapistrano
houhoulis has quit [Remote host closed the connection]
<yorickpeterse> best test is production test
enebo has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
micalexander has joined #ruby-lang
momomomomo has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
nigerianceo has joined #ruby-lang
cnivolle has joined #ruby-lang
rahul_j has joined #ruby-lang
sferik has quit [Quit: Textual IRC Client: www.textualapp.com]
melter has joined #ruby-lang
tomAnthonyShacha has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
rolfb has quit [Quit: Leaving...]
micalexander has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 272 seconds]
hhatch has joined #ruby-lang
houhoulis has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 248 seconds]
symm-_ has joined #ruby-lang
tomAnthonyShacha is now known as tomshacham
symm- has quit [Read error: Connection reset by peer]
rahul_j has quit [Quit: rahul_j]
nathanstitt has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
serroft has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
jamto11 has joined #ruby-lang
yfeldblum has joined #ruby-lang
rahul_j has joined #ruby-lang
plurt has quit [Quit: Computer has gone to sleep.]
micalexander has joined #ruby-lang
dm78 has joined #ruby-lang
d4rkr4i has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
lcdhoffman has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
micalexander has quit [Remote host closed the connection]
brooks has joined #ruby-lang
seanlinsley has quit [Quit: …]
brooks has quit [Client Quit]
bin7me has quit [Quit: Leaving]
Mon_Ouie has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
bin7me has joined #ruby-lang
d4rkr4i has joined #ruby-lang
brooks has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
brooks has quit [Client Quit]
micalexander has joined #ruby-lang
brooks has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
brooks has quit [Client Quit]
ecnalyr has quit [Ping timeout: 240 seconds]
arooni-mobile has joined #ruby-lang
micalexander has quit [Ping timeout: 265 seconds]
jamto11 has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
heftig has quit [Quit: Quitting]
mistym has joined #ruby-lang
mbj has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
pabloh has joined #ruby-lang
NemesisD has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
danijoo has quit [Quit: Leaving...]
cored has quit [Ping timeout: 252 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
skade has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Quit: Leaving]
brooks has joined #ruby-lang
Lewix has joined #ruby-lang
|jemc| has joined #ruby-lang
hackeron has quit [Remote host closed the connection]
gix has quit [Read error: Connection reset by peer]
gix has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
seanlinsley has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
hackeron has joined #ruby-lang
jamto11 has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
nathanstitt has joined #ruby-lang
jamto11 has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
brettweavnet has joined #ruby-lang
elliotec has joined #ruby-lang
jvrmaia has joined #ruby-lang
yfeldblum has joined #ruby-lang
elliotec has quit [Ping timeout: 252 seconds]
existensil has joined #ruby-lang
brooks has quit [Quit: brooks]
havenwood has joined #ruby-lang
NemesisD has quit [Quit: WeeChat 0.4.2]
yfeldblum has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
nifoc has quit [Ping timeout: 272 seconds]
emptyflask has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 245 seconds]
mistym has quit [Remote host closed the connection]
apeiros has quit []
tomshacham has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 248 seconds]
jamto11 has quit [Remote host closed the connection]
phansch has quit [Quit: Leaving]
RobertBirnie has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
francisfish has joined #ruby-lang
kith has quit [Quit: kith]
mikecmpbll has joined #ruby-lang
jsrn has quit [Ping timeout: 240 seconds]
makoto_ has quit [Remote host closed the connection]
emptyflask has quit []
nomadicoder has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
dagobah has quit [Quit: Leaving...]
skade has joined #ruby-lang
elliotec has joined #ruby-lang
tomshacham has joined #ruby-lang
brooks has joined #ruby-lang
tomshacham has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
francisfish has joined #ruby-lang
kith has joined #ruby-lang
AKASkip has joined #ruby-lang
Senjai has quit [Quit: WeeChat 0.3.7]
Senjai`work has joined #ruby-lang
Senjai`work has quit [Changing host]
Senjai`work has joined #ruby-lang
hahuang61 has quit [Ping timeout: 240 seconds]
cid404 has joined #ruby-lang
Senjai`work is now known as Senjai
yfeldblum has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
nszceta has joined #ruby-lang
benlovell has quit [Quit: leaving]
yfeldblum has quit [Ping timeout: 245 seconds]
Johz has joined #ruby-lang
MrZYX|off is now known as MrZYX
nomadicoder has left #ruby-lang [#ruby-lang]
elia has quit [Ping timeout: 260 seconds]
jvrmaia has quit []
elliotec has quit [Remote host closed the connection]
nomadicoder has joined #ruby-lang
nszceta has quit [Read error: Connection reset by peer]
goatish_mound is now known as rsl
makoto_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
elliotec has joined #ruby-lang
makoto_ has quit [Read error: No route to host]
makoto_ has joined #ruby-lang
bjh13 has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d4rkr4i has quit [Remote host closed the connection]
mistym has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
makoto_ has quit [Ping timeout: 252 seconds]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
dm78_ has joined #ruby-lang
dm78 has quit [Read error: Connection reset by peer]
brooks has quit [Ping timeout: 264 seconds]
jsrn has joined #ruby-lang
priodev has quit [Ping timeout: 272 seconds]
brooks has joined #ruby-lang
enebo has quit [Quit: enebo]
MichD is now known as michd
hahuang61 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
CaptainJet has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
Lewix has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
deception has joined #ruby-lang
tylersmith has joined #ruby-lang
priodev has joined #ruby-lang
AKASkip has quit [Ping timeout: 240 seconds]
nszceta has joined #ruby-lang
senj has joined #ruby-lang
mbj has quit [Ping timeout: 252 seconds]
brettweavnet has quit [Quit: Bye]
thmzlt_ has joined #ruby-lang
thmzlt has quit [Ping timeout: 248 seconds]
lfox has joined #ruby-lang
lfox has quit [Client Quit]
phansch has joined #ruby-lang
lfox has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
thmzlt has joined #ruby-lang
thmzlt_ has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby-lang
francisfish has joined #ruby-lang
brettweavnet has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Read error: No route to host]
francisfish has joined #ruby-lang
yfeldblum has joined #ruby-lang
makoto_ has joined #ruby-lang
mbj has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
loincloth has quit [Remote host closed the connection]
brettweavnet has quit [Quit: Bye]
nszceta has quit [Remote host closed the connection]
nszceta has joined #ruby-lang
lcdhoffman has joined #ruby-lang
mbj has quit [Ping timeout: 272 seconds]
enebo has joined #ruby-lang
jeer has joined #ruby-lang
dm78_ has quit [Remote host closed the connection]
serroft has quit [Quit: Leaving.]
dm78 has joined #ruby-lang
sandbags has joined #ruby-lang
francisfish has joined #ruby-lang
dm78 has quit [Ping timeout: 240 seconds]
dm78 has joined #ruby-lang
<_tockitj> how to tell `gem` to remove all gem versions except the given one
rahul_j has quit [Quit: rahul_j]
marr has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: ciao.]
<havenwood> _tockitj: For example: gem uninstall pry --version '!= 0.9.12.5' --force
heftig has joined #ruby-lang
<havenwood> _tockitj: --version flag takes an argument, you can use <=, < etc
<_tockitj> havenwood, thanks a lot!
<havenwood> np ;)
<_tockitj> i did not realize there was != version comparator
blarghlarghl has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
<blarghlarghl> Hi all. Quick question: I see a lot of methods for transcoding a String's encoding from one to another (ie String#encode and so on). I don't see one for specifying its encoding (a la "No, you *think* that's UTF-8, but it's actually ASCII, here, treat it as ASCII, dumbass.")
arBmind has joined #ruby-lang
<blarghlarghl> How do I do that?
__butch__ has joined #ruby-lang
loincloth has joined #ruby-lang
ecnalyr has joined #ruby-lang
vlad_starkov has joined #ruby-lang
__butch__ has quit [Client Quit]
__butch__ has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.2]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
<_tockitj> blarghlarghl, str.bytes ?
diegoviola has joined #ruby-lang
saarinen has joined #ruby-lang
<blarghlarghl> _tockitj: not sure what you mean?
ecnalyr has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<_tockitj> blarghlarghl, sorry it was wrong method
<_tockitj> you should use offending_string.force_encoding('ascii-8bit')
<blarghlarghl> ah, there it is. thanks!
serroft has joined #ruby-lang
benlovell has joined #ruby-lang
senj has quit [Quit: Sleep Now]
Johz has quit [Ping timeout: 248 seconds]
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
benanne has joined #ruby-lang
kurko_ has joined #ruby-lang
Johz has joined #ruby-lang
jsrn has quit [Ping timeout: 245 seconds]
francisfish has quit [Remote host closed the connection]
fragamus has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
fragamus has quit [Quit: Computer has gone to sleep.]
specialblend has joined #ruby-lang
makoto_ has quit [Remote host closed the connection]
symm-_ is now known as symm-
symm- has quit [Quit: Leaving...]
symm- has joined #ruby-lang
pabloh has quit [Quit: Saliendo]
benlovell has joined #ruby-lang
robmiller has quit [Quit: robmiller]
brooks has quit [Quit: brooks]
specialblend has quit [Quit: specialblend]
arooni-mobile has joined #ruby-lang
centrx has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
retro|cz has quit [Remote host closed the connection]
brooks has joined #ruby-lang
Cakey has joined #ruby-lang
brettweavnet has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vpretzel_ has joined #ruby-lang
vpretzel_ has quit [Remote host closed the connection]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
workmad3 has joined #ruby-lang
dm78 has quit [Read error: Connection reset by peer]
dm78_ has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
arooni-mobile__ has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
Cakey has quit [Ping timeout: 264 seconds]
arooni-mobile___ has joined #ruby-lang
toms has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
senj has joined #ruby-lang
toms is now known as tomshacham
makoto_ has joined #ruby-lang
elliotec has quit [Ping timeout: 252 seconds]
dik_dak has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 272 seconds]
dm78_ has quit [Remote host closed the connection]
tomshacham has quit [Read error: Connection reset by peer]
dm78 has joined #ruby-lang
nifoc has joined #ruby-lang
chouhoul_ has joined #ruby-lang
dm78 has quit [Read error: Connection reset by peer]
chouhoul_ has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
makoto_ has quit [Ping timeout: 248 seconds]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 272 seconds]
benlovell has quit [Quit: leaving]
Lewix has joined #ruby-lang
rh1n0 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
dm78 has quit [Ping timeout: 260 seconds]
chrisco has joined #ruby-lang
mistym_ is now known as mistym
chrisco has quit [Client Quit]
dm78 has joined #ruby-lang
heftig has quit [Quit: Quitting]
agarie has joined #ruby-lang
cored has quit [Ping timeout: 272 seconds]
cored has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
makoto_ has joined #ruby-lang
loincloth has joined #ruby-lang
heftig has joined #ruby-lang
dm78 has quit [Ping timeout: 248 seconds]
prc has joined #ruby-lang
makoto_ has quit [Ping timeout: 272 seconds]
diegoviola has quit [Ping timeout: 240 seconds]
robmiller has joined #ruby-lang
loincloth has quit []
prc has quit [Ping timeout: 272 seconds]
serroft has quit [Quit: Leaving.]
elliotec has joined #ruby-lang
dm78 has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
elliotec has joined #ruby-lang
sandbags has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
robmiller has quit [Quit: robmiller]
elliotec has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
elliotec has joined #ruby-lang
sandbags has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
AKASkip has joined #ruby-lang
robmiller has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
dorei has joined #ruby-lang
deception has quit [Quit: Goodbye]
ssb123 has quit [Remote host closed the connection]
ratmav has joined #ruby-lang
elliotec has joined #ruby-lang
<hfp> Hey guys, is `hash` a special variable? Why is it that it seems to always exist?
elliotec has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 272 seconds]
<centrx> Hash is a built-in class
arooni-mobile___ has quit [Ping timeout: 252 seconds]
<centrx> hfp, Is this what you mean?
<hfp> centrx: no
<hfp> One sec
chouhoulis has joined #ruby-lang
<centrx> Oh okay
<hfp> What is `hash` ? I certainely didn't create it yet it seems to always exist and always contains a Fixnum
<darix> hfp: it is not a variable
<centrx> That is calling a method on Kernel
<darix> you call the method has
<darix> hash
chouhoulis has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby-lang
x0f_ has quit [Read error: Operation timed out]
<hfp> Ok, what is it for? And what happens then when you do `hash = Hash.new` ?
<centrx> Actually object
elliotec has joined #ruby-lang
<centrx> a hash is like a checksum, a unique way of identifying an object
<hfp> centrx: So it is somewhat similar to #object_id?
<centrx> Yes, except you might have two different objects that have the same data
<centrx> So:
<centrx> a = [1,2]; b = [1,2]
<centrx> a.object_id != b.object_id
<centrx> a.hash == b.object_id
<hfp> I understand.
<centrx> When you do: p hash
<centrx> It is actually running: kernel.p console_root.hash
<centrx> Or something like that
kurko_ has quit [Quit: Computer has gone to sleep.]
brettweavnet has quit [Remote host closed the connection]
<hfp> Oh I see
<centrx> Because Kernel and Object methods are always available without specifying
<hfp> Does it work with any method? Could I do `p object_id`?
<centrx> Since everything descends from Object
<centrx> hfp, Yes, any method that is in the Object class (which includes the Kernel module)
<hfp> I understand, thanks
andrewhl has joined #ruby-lang
manny has quit [Quit: Connection closed for inactivity]
<hfp> Now there is something else I don't understand here: https://eval.in/96786
<hfp> I would expect `p hash[:one]` to return "uno" only, why does it return the whole array?
brooks has quit [Quit: brooks]
ssb123 has joined #ruby-lang
x0f has joined #ruby-lang
<drbrain> hfp: in line one you use the same array for all undefined keys
<centrx> hfp, irb always runs #inspect on every command you run in it
<drbrain> hfp: you want hash = Hash.new { |h, key| h[key] = [] }
mistym has joined #ruby-lang
<centrx> yeah I guess drbrain has this one right
yalue has quit [Quit: Leaving]
<hfp> Hmm. To give you some context, I am going through the Ruby Koans
<hfp> This is where I am stuck: http://pastie.org/8686757
<hfp> in assert_equal I have to replace "uno" by whatever I thing the second argument will evaluate to
<hfp> So I put "uno" but I have this:
<hfp> And I don't understand how hash[:one] can be ["uno", "dos'] rather than "uno'.
<hfp> Does that make sense?
ratmav has quit [Quit: Leaving]
<dorei> hfp: hashes have key and values, hash[:one] references the value of key :one
cored has quit [Ping timeout: 245 seconds]
<hfp> dorei: Which should contain the value "uno", right?
<dorei> nop
elliotec has quit [Remote host closed the connection]
<hfp> I'm confused
mistym has quit [Remote host closed the connection]
<dorei> u access them by the key, not the value
makoto_ has joined #ruby-lang
elliotec has joined #ruby-lang
<dorei> it contains what u put in there
<drbrain> hfp: hash[:one] and hash[:two] have the same value because line 1 is wrong
<drbrain> well, line 1 tells the Hash to use the same object for unknown keys
<havenwood> hfp: I think you are confusing the expectation of `test_default_value_is_the_same_object` with `test_default_value_with_block`: https://github.com/neo/ruby_koans/blob/master/src/about_hashes.rb#L107
<hfp> Line 1 means that if I ask for a key that doesn't exist it will give it the value of the whole object? That's what the Hash.new([]) means?
<drbrain> hfp: yes, but a new Array isn't created every time
<havenwood> hfp: In your example, the Array literal `[]` is the same object so both "uno" and "dos" go into that same Array.
<drbrain> it reuses the same array every time
makoto_ has quit [Ping timeout: 240 seconds]
arBmind has quit [Quit: Leaving.]
<hfp> I still don't get it. I understant that `hash = Has.new("foo")` means that it will return "foo" for a key that doesn't exist or the value for that key if the key exists, correct?
<hfp> understand*
<drbrain> hfp: p h[:one].object_id, h[:two].object_id, h[:three].object_id
<drbrain> or: default = []; hash = Hash.new(default); hash[:one] << 'uno'; hash[:two] << 'dos'; p default
<havenwood> hfp: It would be the same with a string: hash = Hash.new('foo'); hash[:bar] << 'bar'; hash[:baz] << 'baz'; hash[:anything] #=> "foobarbaz"
brooks has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
arooni-mobile has joined #ruby-lang
robmiller has quit [Quit: robmiller]
<drbrain> hfp: you need to use the default_proc to create a new Array instance for each unknown key
<drbrain> hfp: you want: hash = Hash.new { |h, key| h[key] = [] }
<arooni-mobile> hey folks im trying to get a keyboard to work; i'm seeing this error message: connect-debounce failed, port 2 disabled .... when i try to plug in the keyboard. what can i do now?
<drbrain> but who was keyboard?
brooks has quit [Quit: brooks]
<drbrain>
<arooni-mobile> ideas?
<hfp> I still don't get it. Is this what I should look at in the doc that explains it? http://www.ruby-doc.org/core-2.1.0/Hash.html#method-c-5B-5D
<drbrain> hfp: what result do you get for either of the three examples above?
<drbrain> (two by me, one by havenwood)
<hfp> drbrain: For the second one, I get ["uno", "dos"]
<hfp> For the first one they all have the same object ID
<drbrain> hfp: what do these things mean to you?
<drbrain> can you describe what is happening?
jsullivandigs has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
<hfp> for the first one, it means that the object `h` is always the same, for the second example it means that whatever I put in hash goes into default?
arooni-mobile has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
<drbrain> it's not that `h` is the same, what object is #object_id called on?
<drbrain> for the second example, yes, everything goes into default
elliotec has joined #ruby-lang
nigerianceo has quit []
<drbrain> also, for the example with default and the other two, what is the difference between `default = []; hash = Hash.new default` and `hash = Hash.new []`
<hfp> it's called on h[:symbol]. Is h.object_id and h[:lala].object_id not the same?
<drbrain> it wouldn't be the same for those examples because `h` is a hash and `h[:lala]` is the value in `h` at key `:lala`
vlad_starkov has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
<drbrain> hfp: please ask more questions :D
elliotec has quit [Remote host closed the connection]
<hfp> But why are h[:one].object_id == h[:two].object_id == h[:three].object_id?
elliotec has joined #ruby-lang
<drbrain> because of the way Hash.new is defined
<drbrain> (that's not a good answer)
jamto11 has joined #ruby-lang
<drbrain> The Hash.new documentation says: If obj is specified, this single object will be used for all default values.
robmiller has joined #ruby-lang
<drbrain> since you have h = Hash.new [] then *the same* [] will be returned for all keys without values
<hfp> Ok, that I understand.
<drbrain> default = []; h = Hash.new default is an alternate way of writing this same thing
<centrx> You may want: Hash.new { |hash, key| hash[key] = [] }
<hfp> centrx: Do you mean this is equivalent to hash = Hash.new([])?
<drbrain> hfp: not exactly
<hfp> :'(
<centrx> hfp, It is similar to it, but it solves your issue with it
<drbrain> both provide default values to unset keys
<drbrain> the block form creates new objects for each key
<centrx> With Hash.new([]), Hash will use that same array [] you passed in for every default value.
<hfp> centrx: I appreciate it, but the point of the exercise is to understand why it is happening; not fix it.
<centrx> oh...
<drbrain> default = []; Hash.new { |hash, key| hash[key] = default } and Hash.new([]) are equivalent
<hfp> Right. Does [] refer to an empty array or something else in Hash.new([])
<drbrain> hfp: [] refers to an empty array
<drbrain> for the block form, the block is executed every time you access an unknown key
<havenwood> hfp: [] == Array.new # it is know as an 'Array literal', and is the idiomatic way to create empty Arrays
brettweavnet has joined #ruby-lang
<drbrain> so it creates a new empty array (rather than using the same default array as with Hash.new [])
<havenwood> hfp: `{}` is a Hash literal, like `[]` is an Array literal and `""` is a String literal.
feinbergscott has quit [Ping timeout: 252 seconds]
smashwilson has quit [Quit: Leaving]
elliotec has quit [Remote host closed the connection]
<hfp> Ok. So. When I do `hash = Hash.new([])`, it creates a new Hash with the name `hash` and puts en empty array for every possible key, right?
<havenwood> hfp: not just 'an' empty Array, but the exact same empty Array (same exact object, which is the only way to end up with the same object_id).
<drbrain> hfp: right
<havenwood> hfp: Or `Hash.new('')` would mean the same String, so each default key would be modifying that same string, like in the example above where the String mutates.
<hfp> Ok. Now why does `hash[:one] << "uno"; hash[:two] << "dos"; p hash[:uno]` return ["uno", "dos"] ?
<hfp> Would it be different if it was hash[:one] = "uno"; hash[:two] = "dos" ?
feinbergscott has joined #ruby-lang
<hfp> Yes I think I get it
<havenwood> hfp: because `hash[:one].object_id == hash[:any_default].object_id`, you're putting them in the same Array.
<hfp> << adds the "uno" and "dos" after the empty array
<hfp> Which is the same for all keys
<havenwood> hfp: yup, into the same array, which isn't empty once the first goes in
<hfp> whereas = removes the [] and replaces it by "string"
<havenwood> hfp: Do you think this will be true or false?: hash = Hash.new([]); hash[:anything] << :stuff; hash[:whatever].empty?
<hfp> havenwood: No, it will be false
<hfp> I get it now
<hfp> (please tell me it's indeed false havenwood)
<havenwood> hfp: indeed! ;)
<hfp> Awesome
<hfp> I understand it now, thanks
<drbrain> \o/
elliotec has joined #ruby-lang
<crankharder> whyyy... can't I override == to change how Array#uniq works?
relix has joined #ruby-lang
<drbrain> crankharder: because Array#uniq uses Hash equality
<drbrain> crankharder: … it is documented
<hfp> I juste hope I took me so long not because I'm slow but because it's hard to comprehand at the beginning...
<drbrain> hfp: Hash.new [] vs Hash.new { |h,k| h[k] = [] } is a very common early stumbling block
<drbrain> hfp: probably the most difficult thing to work through early on
<hfp> drbrain: I'm getting there, it's the next question in the koans, we'll soon know if I can get it or will need more help :)
<crankharder> drbrain: curious where you see those docs
<drbrain> or ri Array#uniq
<crankharder> and so it is
<drbrain> looks like it was added in ruby 2.0.0
<drbrain> (that line is missing from the 1.9.3 documentation)
nszceta has quit [Remote host closed the connection]
bjh13 has quit [Quit: leaving]
<Senjai> o/ drbrain
<drbrain> Senjai: hi
elliotec has quit [Remote host closed the connection]
<Senjai> drbrain: not sure if you remember me but I came to you asking for advice on what I should contribute to. Eventually got a job because of that
<drbrain> Senjai: oh awesome! \o/
<Senjai> drbrain: since Nov 1st
<drbrain> I vaguely remember
<Senjai> didn't apply or anything, just a company that uses the product
<drbrain> nice
elliotec has joined #ruby-lang
nifoc has quit []
gianlucadv has quit [Ping timeout: 260 seconds]
<hfp> Senjai: I'm curious, what did you do?
elliotec has quit [Remote host closed the connection]
robmiller has quit [Quit: robmiller]
<Senjai> hfp: I ended up contributing to Spree
<Senjai> and was getting tasks delegated to me in their IRC channel
robbyoconnor has joined #ruby-lang
elliotec has joined #ruby-lang
senj has quit [Quit: Sleep Now]
diegoviola has joined #ruby-lang
<hfp> Senjai: Interesting, it's a competitor to Shopify, yes?
senj has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
makoto_ has joined #ruby-lang
<Senjai> hfp: Not really, shopify really doesnt involve code afaik. Spree is meant for developers as a springboard to creating an ecommerce store
<Senjai> Spree requires a developer to get a store running, whereas shopify doesnt
enebo has joined #ruby-lang
<Senjai> but there are some prety big companies running spree
prc has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
<hfp> I see. This is inspiring, I'm hoping to change careers and get into software development. I hope you don't mind my asking: were you working as a dev before?
<Senjai> hfp: Nope. I was a Business Development consultant for a city, and before that I sold and promoted securities
postmodern has joined #ruby-lang
breakingthings has quit []
<hfp> Senjai: Awesome, how long did it take you to be good enough to contribute to Spree? And what did you contribute specifically?
<Senjai> hfp: I started in January seriously. I did hobbiest programming all my life, just never put any time into it
<hfp> You are me haha
<Senjai> hfp: whatever they delegated to me, mostly low hanging fruit around the API
makoto_ has quit [Ping timeout: 272 seconds]
<hfp> I have time off now so I am learning more seriously to bridge the gaps
<Senjai> I'm not good, and I'm still not good :P
<Senjai> But I *tried*
<Senjai> not all of my attempts at solutions made it in, but I got good feedback
<hfp> What was the process like? Did you apply and they said "sure, please fix this" and eventually hired you?
<Senjai> No, one of the other contributors owned the company I work at. He gave me something to attempt, gave me feedback and asked me to try again, then I tried it given that feedback.
<Senjai> Afterwards he asked me to send him my resume
<Senjai> I was also geographically near, so that helps
EngierkO_ has joined #ruby-lang
mistym has joined #ruby-lang
<hfp> I see
<Senjai> also got an interview from someone in #rubyonrails
<Senjai> but I didn't get that position
EngierkO has quit [Ping timeout: 252 seconds]
<Senjai> Same thing
<Lewix> oh ya
<hfp> One company I have in my sights have offices here but they require in the job offer that applicants are contributors to OSS and I'm not sure where to start with that
<Lewix> is it from canada?
<Lewix> Im looking for a job myself
<Lewix> =)
<Lewix> s/it/he
<Senjai> Lewix: Victoria Canada yea
<hfp> Yay Canada here too
<Senjai> hfp: I just have everything I do open sourced, and I dont have many. I'd apply anyway
<Senjai> github.com/Senjai
<Lewix> Senjai: hfp: can you link me
<Lewix> to the company
flori has quit [Read error: Operation timed out]
flori has joined #ruby-lang
<Senjai> Lewix: www.freerunningtech.com
elliotec has quit [Remote host closed the connection]
seanlinsley has quit [Quit: …]
ssb123 has quit [Remote host closed the connection]
EngierkO_ has quit [Ping timeout: 252 seconds]
elliotec has joined #ruby-lang
<Lewix> Senjai: ah I see. thanks
hhatch has quit [Ping timeout: 252 seconds]
<Senjai> Not sure they're hiring atm
senj has quit [Quit: Sleep Now]
enebo has quit [Quit: enebo]
<hfp> Aaaand I'm back with: `hash = Hash.new {|hash, key| hash[key] = [] }`. This means that for unknown keys it will return []. But it is different from the previous example because in this one it is not the same object so `hash[:one] << "one"; hash[:two] << "dos"` pushes the strings into separate and distinct empty arrays, correct?
brettweavnet has quit [Quit: Bye]
<drbrain> correct
vlad_starkov has joined #ruby-lang
<hfp> Yay
yfeldblum has quit [Remote host closed the connection]
<hfp> When one does `Hash.new([])`, how does it work internally? Does it create every possible key with the object or are they created on the fly? And once you have accessed them, does that create them or do you have to explicitly do an assignation to create the keys?
brettweavnet has joined #ruby-lang
<hfp> by on the fly I mean whenever a non-existent key is accessed
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain> hfp: Hash.new([]) is a shortcut for `default = []; Hash.new { |hash, key| hash[key] = default }`
vlad_starkov has quit [Read error: Connection reset by peer]
phansch has quit [Quit: Leaving]
<hfp> I see, thanks
<dacamp> ls
<dacamp> aahhh fuck, carry on.
<hfp> su -
yfeldblu_ has joined #ruby-lang
<hfp> Yeh, didn't think so
robmiller has joined #ruby-lang
<dacamp> at least it wasn't a password
nathanstitt has quit [Quit: I growing sleepy]
nisstyre has joined #ruby-lang
workmad3 has joined #ruby-lang
flori has quit [Read error: Operation timed out]
jsrn has joined #ruby-lang
flori has joined #ruby-lang
mistym has quit [Remote host closed the connection]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
workmad3 has quit [Quit: Lost terminal]
brettweavnet has quit [Quit: Bye]
MrZYX is now known as MrZYX|off
unlol_ has joined #ruby-lang
unlol_ has left #ruby-lang [#ruby-lang]
elliotec has quit [Remote host closed the connection]
robmiller has quit [Quit: robmiller]
lcdhoffman has quit [Quit: lcdhoffman]
abcxyz has joined #ruby-lang
elliotec has joined #ruby-lang
ssb123 has joined #ruby-lang
<abcxyz> hi guys, I'm new to ruby and I was wondering if someone could explain why running the unit-tests found in the main repo takes so long. e.g. ./ruby test/ruby/test_yield.rb takes 4 seconds on my machine to run 12 tests, none of which seem very complex
<abcxyz> it hangs on the last 3 or so, out of 12, for a couple of seconds
<abcxyz> (in the above 'test/ruby/test_yield.rb' is in the top level directory of the repository)
andrewhl has quit [Quit: andrewhl]
dm78 has quit []
jsrn has quit [Quit: Leaving]
brettweavnet has joined #ruby-lang
dm78 has joined #ruby-lang
makoto_ has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
<centrx> abcxyz, Do you have a link?
<drbrain> abcxyz: Finished tests in 3.237649s, 3.7064 tests/s, 7306.8452 assertions/s
<hfp> If I wanted to find what does `string=<<EOS;foo;EOS` do in the doc, what should I search for? I tried `=<<` but no luck
ssb123 has quit [Ping timeout: 240 seconds]
<abcxyz> drbrain: that was running the same test?
<centrx> hfp, It is called a "heredoc" or "here document"
<drbrain> considering there's nearly twenty-four thousand assertions I think that's pretty good
<drbrain> abcxyz: yup
<hfp> centrx: Thanks
<abcxyz> drbrain: aahhh, I guess I misread something
<drbrain> abcxyz: also, you should run `make test-all TESTS=ruby/test_yield.rb`
<drbrain> that makes sure everything is set up correctly and you don't get pollution from gems, etc.
makoto_ has quit [Ping timeout: 245 seconds]
<drbrain> abcxyz: some of the test files generate a ton of assertions on the fly
<drbrain> so they don't look very big but end up doing lots of work
<abcxyz> drbrain: I wanted to isolate the running of each test as I'm testing something in the interpreter.
<abcxyz> So I am setting RUBY/RUBYLIB/PATH as is done in tool/runruby.rb
<abcxyz> which seemed to be what is used to setup the running of test/runner.rb
<drbrain> make test-all TESTS='ruby/test_yield.rb -n test_hash_each' then
brettweavnet has quit [Quit: Bye]
<abcxyz> ah, thanks
<drbrain> and if you don't know the test names, -v will show them
mrevd has quit [Quit: Leaving.]
<abcxyz> k, that makes my life easier. Probably should have come here earlier instead of trawling through strace output to piece together what make test-all was doing :P
<drbrain> np
kalehv has joined #ruby-lang
feinbergscott has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit []
mistym has joined #ruby-lang