apeiros changed the topic of #ruby-lang to: Ruby 2.1.0-p0; 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
enebo has quit [Quit: enebo]
MrZYX is now known as MrZYX|off
mbj has quit [Quit: leaving]
senj has quit [Quit: Textual IRC Client: www.textualapp.com]
basiliothecat has joined #ruby-lang
_aeris_ is now known as [_aeris_]
VTLob has quit [Quit: VTLob]
seanlinsley has quit [Quit: …]
solars has quit [Ping timeout: 246 seconds]
cnivolle has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
ender has joined #ruby-lang
ivanskie has quit [Ping timeout: 245 seconds]
|jemc| has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby-lang
diegoviola has joined #ruby-lang
ledestin has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Ping timeout: 252 seconds]
TheMoonMaster has quit [Excess Flood]
tom025 has quit [Remote host closed the connection]
TheMoonMaster has joined #ruby-lang
robbyoconnor has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
kitak has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
bjh13 has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
basiliothecat has quit [Quit: Page closed]
vlad_starkov has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby-lang
|jemc| has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
seanlinsley has joined #ruby-lang
brownies has quit [Ping timeout: 252 seconds]
brownies has joined #ruby-lang
brownies has quit [Changing host]
brownies has joined #ruby-lang
hahuang61 has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby-lang
havenwood has joined #ruby-lang
mistym has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
enebo has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
amerine has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 245 seconds]
mistym has joined #ruby-lang
CaptainJet has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
mehlah has quit [Quit: Leaving...]
brianpWins has quit [Quit: brianpWins]
marr has quit [Ping timeout: 260 seconds]
enebo has quit [Quit: enebo]
io_syl has quit []
Johz has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
fijimunkii has quit [Ping timeout: 260 seconds]
Cakey has joined #ruby-lang
dwknoxy has quit [Quit: Computer has gone to sleep.]
Cakey has quit [Quit: Changing server]
Cakey has joined #ruby-lang
tylersmith has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
presidentbeef has quit [Ping timeout: 272 seconds]
Barrin6 has joined #ruby-lang
tylersmith has quit [Ping timeout: 252 seconds]
DevDoo has joined #ruby-lang
stonerfish has joined #ruby-lang
skmp1 has quit [Quit: Leaving.]
CaptainJet has quit []
deens has joined #ruby-lang
<zenspider> argh. who's got experience with proftools.rb ?
<zenspider> or any other good profiling tool for that matter... I'm stumped
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
jerrytgarcia1 has joined #ruby-lang
jerrytgarcia has quit [Ping timeout: 260 seconds]
<Barrin6> sorry
<Barrin6> nope
<Barrin6> I was trying to write a script today at work for ruby
<Barrin6> and I haven't done it in a while. Just a simple script to find unique values in a column
<Barrin6> I wanted to throw my computer
<zenspider> cut -f 6 blah.txt | uniq
<zenspider> or sort -u
yfeldblum has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
daikan has quit [Remote host closed the connection]
drollwit has joined #ruby-lang
saarinen has quit [Quit: saarinen]
havenwood has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
amclain has joined #ruby-lang
ledestin has joined #ruby-lang
JEG2 has quit [Quit: Connection closed for inactivity]
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
mannyt has joined #ruby-lang
<ddd> zenspider ever find out why your magical script was speeding up.. well... magically?
daikan has joined #ruby-lang
arooni-mobile has joined #ruby-lang
mannyt has quit [Client Quit]
prc has quit [Remote host closed the connection]
daikan has quit [Ping timeout: 248 seconds]
prc has joined #ruby-lang
mistym has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
mannyt has joined #ruby-lang
deens has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
r0bgleeson has quit [Ping timeout: 265 seconds]
drollwit has quit []
kirin` has quit [Ping timeout: 245 seconds]
amcoder has joined #ruby-lang
yfeldblum has joined #ruby-lang
mannyt has quit []
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
mistym has joined #ruby-lang
kirin` has joined #ruby-lang
<simi> Hello. Any idea how to print ruby value in gdb? I tried rp macro, but without luck.
daikan has joined #ruby-lang
vinhbachsy has joined #ruby-lang
daikan has quit [Ping timeout: 252 seconds]
lfox has quit [Quit: ZZZzzz…]
lfox has joined #ruby-lang
lfox has quit [Client Quit]
Cakey has joined #ruby-lang
<badeball> simi: it's really straight forward. take a look a this for instance: http://robots.thoughtbot.com/using-gdb-to-inspect-a-running-ruby-process. by using ruby_eval, you can access the variable as you would in ruby.
<simi> I'm using rb_eval_string, but I'm getting only object id.
<simi> And I want to inspect string value.
<simi> badeball, ^
<lianj> "These ruby_eval commands will output into the tempfile that redirect_stdout created, so you'll need to tail -f that file in a different console. "
<lianj> badeball: thats the problem
<badeball> lianj: uhm, I think you need to take a closer look at that. it will only do that if you follow those exact steps. however, if you don't use the defined redirect_stdout and only ruby_eval, you can easily access variables with only gdb.
deens has joined #ruby-lang
<badeball> given the following test.rb: https://gist.github.com/badeball/8468469, I got gdb to output "123 test" by just executing ruby_eval "a", which seems to me to be what simi is asking for
tuttinator has quit [Quit: Leaving...]
rahul_j has joined #ruby-lang
<badeball> simi: rb_eval_string returns a VALUE (object) and I guess what you're seeing is the actual reference
<simi> badeball, yup
<simi> ruby_eval macro solved it
<simi> thanks a lot
deens has quit [Ping timeout: 272 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<simi> I just wonder if I can get string value from VALUE. Probably with something like printf("%s", RSTRING(value)->ptr).
<simi> But how can I get that VALUE?
<simi> in gdb
vlad_starkov has joined #ruby-lang
r0bgleeson has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
deens has joined #ruby-lang
huma has joined #ruby-lang
deens has quit [Ping timeout: 265 seconds]
robbyoconnor has joined #ruby-lang
Lewix has joined #ruby-lang
Paradox has quit [Ping timeout: 276 seconds]
Paradox has joined #ruby-lang
Cakey has quit [Ping timeout: 248 seconds]
mogox has joined #ruby-lang
<badeball> well, RSTRING is a macro and is not available as a function in the compiled ruby-binary
Cakey has joined #ruby-lang
<badeball> I think this explains how to make those available, without having actually tried it myself: http://blog.mrkn.jp/2009/12/to-use-preprocessor-macros-on-gdb.html
arooni-mobile has quit [Ping timeout: 252 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<badeball> other than that, I'd assume you could do exactly the code you're suggesting
havenwood has joined #ruby-lang
deens has joined #ruby-lang
Cakey has quit [Ping timeout: 272 seconds]
deens has quit [Client Quit]
daikan has joined #ruby-lang
r0bby_ has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 272 seconds]
GaelanAintAround is now known as Gaelan
daikan has quit [Ping timeout: 252 seconds]
r0bby_ has quit [Ping timeout: 248 seconds]
mechanicles has joined #ruby-lang
tylersmith has joined #ruby-lang
simi has quit [Read error: Operation timed out]
Gaelan is now known as GaelanAintAround
achru has joined #ruby-lang
Barrin6 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
soba has joined #ruby-lang
<Lewix> hey guys
<Lewix> what's foreach
<Lewix> I never ever use it
dingus_khan has joined #ruby-lang
dingus_khan has left #ruby-lang [#ruby-lang]
vlad_sta_ has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
<whitequark> ruby doesn't have foreach
vlad_starkov has quit [Ping timeout: 252 seconds]
<tpope> unless you mean IO#foreach
<Lewix> that's right
<Lewix> IO#foreach
<Lewix> ah ill have to read it over
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
rue has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 272 seconds]
vinhbachsy has quit [Ping timeout: 260 seconds]
skade has joined #ruby-lang
vinhbachsy has joined #ruby-lang
ivanskie has joined #ruby-lang
<Lewix> is there a better way to do this: a,b,c = some_array.map [|i| i]
RobertBirnie has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
rue has joined #ruby-lang
vlad_starkov has joined #ruby-lang
daikan has joined #ruby-lang
<whitequark> .map{|i|i} is a no-op
<Lewix> whitequark: no-op?
vlad_starkov has quit [Read error: Connection reset by peer]
daikan has quit [Ping timeout: 248 seconds]
amclain has quit [Quit: Leaving]
h_kon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<whitequark> Lewix: yes, it does nothing
bzalasky has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bjh13 has quit [Quit: leaving]
vlad_starkov has quit [Remote host closed the connection]
<Lewix> whitequark: yes. that's what i wanna do
<Lewix> >> a,b,c = ["never ","mind","sorry"].map(&:capitalize) ; a
<eval-in> Lewix => "Never " (https://eval.in/90768)
<whitequark> I don't understand what do you want to do.
rue_XIV has joined #ruby-lang
rue has quit [Ping timeout: 252 seconds]
jonahR has quit [Quit: jonahR]
skade has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
arBmind has joined #ruby-lang
AKASkip has joined #ruby-lang
heftig has quit [Quit: Quitting]
<Lewix> whitequark: never mind I wasn't thinking. thanks
jtw has quit []
jtw has joined #ruby-lang
mannyt has joined #ruby-lang
jtw has quit [Client Quit]
vinhbachsy has joined #ruby-lang
fijimunkii has joined #ruby-lang
zlogan has joined #ruby-lang
dik_dak has quit [Quit: Leaving]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
rue_XIV has quit [Read error: Connection reset by peer]
m6n has quit [Ping timeout: 272 seconds]
ryanf has quit [Ping timeout: 272 seconds]
m6n has joined #ruby-lang
ryanf has joined #ruby-lang
apeiros has quit [Ping timeout: 272 seconds]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
jerrytgarcia1 has quit [Quit: WeeChat 0.4.2]
AKASkip has quit [Ping timeout: 245 seconds]
r0bby_ has joined #ruby-lang
rue has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
vinhbachsy has quit [Ping timeout: 265 seconds]
rue has quit [Remote host closed the connection]
daikan has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
daikan has quit [Ping timeout: 252 seconds]
<Lewix> whitequark: I should be able to call an instance method in the block of File.open, right?
r0bby_ is now known as robbyoconnor
vinhbachsy has joined #ruby-lang
vinhbach_ has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 260 seconds]
vinhbachsy has joined #ruby-lang
bougyman has quit [Read error: Operation timed out]
vinhbach_ has quit [Ping timeout: 246 seconds]
paramg has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
vinhbachsy has quit [Read error: Connection reset by peer]
vinhbachsy has joined #ruby-lang
vinhbach_ has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 252 seconds]
mehlah has joined #ruby-lang
mistym has quit [Remote host closed the connection]
rue_XIV has joined #ruby-lang
rue_XIV has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
vinhbach_ has quit [Ping timeout: 246 seconds]
mistym has joined #ruby-lang
skade has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 252 seconds]
zz_dlu has quit [Ping timeout: 245 seconds]
vinhbachsy has joined #ruby-lang
robmiller has joined #ruby-lang
GaelanAintAround has quit [Ping timeout: 276 seconds]
GaelanAintAround has joined #ruby-lang
pglombardo has joined #ruby-lang
pglombardo has quit [Client Quit]
zz_dlu has joined #ruby-lang
DevDoo has quit [Remote host closed the connection]
phansch has joined #ruby-lang
CoreData has joined #ruby-lang
Newbie0086 has joined #ruby-lang
CoreData has quit [Client Quit]
CoreData has joined #ruby-lang
fusi0n has quit [Quit: .]
toretore has joined #ruby-lang
fijimunkii has quit [Ping timeout: 252 seconds]
CoreData has quit [Read error: Connection reset by peer]
CoreData1 has joined #ruby-lang
CoreData1 has quit [Client Quit]
Newbie0086 has quit [Ping timeout: 246 seconds]
daikan has joined #ruby-lang
Newbie0086 has joined #ruby-lang
mechanicles has joined #ruby-lang
cannie has joined #ruby-lang
cannie has quit [Remote host closed the connection]
cannie has joined #ruby-lang
cannie has quit [Client Quit]
vondruch has joined #ruby-lang
tylersmith has joined #ruby-lang
relix has joined #ruby-lang
lysw123 has joined #ruby-lang
solars has joined #ruby-lang
daikan has quit [Ping timeout: 248 seconds]
apeiros has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
tbuehlmann has joined #ruby-lang
tylersmith has quit [Ping timeout: 272 seconds]
<yorickpeterse> morning
vinhbachsy has quit [Read error: Connection reset by peer]
vinhbachsy has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
mechanicles has joined #ruby-lang
arBmind has joined #ruby-lang
Newbie0086 has quit [Quit: 离开]
mechanicles_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
[_aeris_] is now known as _aeris_
zz_dlu has quit [Read error: Operation timed out]
GaelanAintAround has quit [Ping timeout: 260 seconds]
waxjar has quit [Ping timeout: 252 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
waxjar has joined #ruby-lang
kurko__ has joined #ruby-lang
michael_mbp has quit [Excess Flood]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby-lang
Phoop has joined #ruby-lang
nirix has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
nirix has joined #ruby-lang
vinhbachsy has quit [Read error: Connection reset by peer]
<lysw123> morning~
vinhbachsy has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
dagobah has joined #ruby-lang
GaelanAintAround has joined #ruby-lang
workmad3 has joined #ruby-lang
zz_dlu has joined #ruby-lang
Mon_Ouie has quit [Read error: Connection reset by peer]
michd is now known as MichD
Mon_Ouie has joined #ruby-lang
daikan has joined #ruby-lang
vinhbachsy has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
elia has joined #ruby-lang
relix has joined #ruby-lang
daikan has quit [Ping timeout: 265 seconds]
vinhbachsy has quit [Ping timeout: 272 seconds]
lysw123 has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
heftig has joined #ruby-lang
daikan has joined #ruby-lang
_rgn has joined #ruby-lang
<_rgn> is there something like the unix column command for ruby? a lib or something. also tried to pipe a string to column within ruby without success
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
caral has joined #ruby-lang
<yorickpeterse> great, looks like I have a memory leak in Nokogiri
<yorickpeterse> or at least ObjectSpace keeps showing Nokogiri elements long after they should no longer exist
<yorickpeterse> up to the point where my process sits content with around 2,5GB
<yorickpeterse> then it grows again, runs out of memory, repeat
jerrytgarcia has joined #ruby-lang
<apeiros> short-term workaround: process the documents in a fork?
<yorickpeterse> that's not an option
cnivolle has joined #ruby-lang
<yorickpeterse> that means I'll be forking a dozen times per second
<yorickpeterse> I can see it skyrocket here locally at least
diegoviola has quit [Quit: WeeChat 0.4.2]
<maloik> gnufied: my colleague vaguely remembered something about a public call for paper voting system, was that your conference ?
<whitequark> yorickpeterse: valgrind!
<yorickpeterse> whitequark: except this is Ruby
<maloik> (mostly a blog post about the process)
<yorickpeterse> I'd love to have something like Valgrind for Ruby code
<yorickpeterse> (not C extensions, actual Ruby code)
h_kon has joined #ruby-lang
Phoop has quit [Quit: Textual IRC Client: www.textualapp.com]
Phoop has joined #ruby-lang
<whitequark> yorickpeterse: oh, right, ObjectSpace
<whitequark> I think there was a tool
<yorickpeterse> I'm already mucking with ObjectSpace
<yorickpeterse> that's how I found Nokogiri in the list of potential suspects
<yorickpeterse> Though I'm not sure if ObjectSpace.each_object also includes destroyed objects
<whitequark> yes, I meant "you mentioned ObjectSpace hence valgrind won't work"
<whitequark> well, definitely not after GC.collect
ender has quit [Ping timeout: 248 seconds]
<yorickpeterse> needs patches
<yorickpeterse> we're still on 1.9
tkuchiki has quit [Remote host closed the connection]
<yorickpeterse> but it could be an option
tkuchiki has joined #ruby-lang
<_rgn> whitequark: thanks
<yorickpeterse> ok so at least it's not Rollbar by the looks of it
<whitequark> yorickpeterse: um, patches, yeah, so?
tkuchiki has quit [Ping timeout: 245 seconds]
<yorickpeterse> I'd prefer to keep things close to $PROD to rule out whatever crap they might introduce
daikan has quit [Remote host closed the connection]
<yorickpeterse> gdb tiem
francisfish has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
huma has quit [Ping timeout: 252 seconds]
Voker57 has quit []
chouhoulis has quit [Remote host closed the connection]
ender has joined #ruby-lang
caral has quit [Quit: caral]
robbyoconnor has joined #ruby-lang
caral has joined #ruby-lang
<yorickpeterse> HAHA, I can segfault this app
<yorickpeterse> start 4 threads, let them do stuff, attach gdb, GC.start
<yorickpeterse> segfault
<yorickpeterse> yay
quizzicol has joined #ruby-lang
<yorickpeterse> great, and it seems to be in Nokogiri
marr has joined #ruby-lang
<_rgn> what's the best doc to find out all the ways you can use str[/regex/] w/ back references and capture groups and all that stuff
daikan has joined #ruby-lang
<yorickpeterse> well, off to the IRC channel we go
<apeiros> _rgn: ri String#[]
ender has quit [Ping timeout: 272 seconds]
stonerfish has quit [Quit: Leaving.]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
h_kon has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
marcofernandez has joined #ruby-lang
marcofernandez_ has joined #ruby-lang
marcofernandez has quit [Client Quit]
Johz has joined #ruby-lang
Thanatermesis has joined #ruby-lang
Thanatermesis has left #ruby-lang [#ruby-lang]
tkuchiki has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Asher1 has joined #ruby-lang
danijoo_ has joined #ruby-lang
Asher has quit [Read error: Connection reset by peer]
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Elico has quit [Ping timeout: 272 seconds]
danijoo has quit [Ping timeout: 246 seconds]
Elico has joined #ruby-lang
daikan has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
daikan has joined #ruby-lang
skade has quit [Ping timeout: 272 seconds]
skade has joined #ruby-lang
h_kon has joined #ruby-lang
Voker57 has joined #ruby-lang
mbr has quit [Quit: leaving]
mechanicles_ has quit [Quit: Computer has gone to sleep.]
mechanicles has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
cyndis has quit [Ping timeout: 245 seconds]
Jamo has quit [Ping timeout: 246 seconds]
shaman42 has quit [Ping timeout: 276 seconds]
MrZYX|off is now known as MrZYX
mechanicles has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mechanicles_ has joined #ruby-lang
<yorickpeterse> so to confirm, does anybody know if ObjectSpace.each_object only includes objects that are still being used?
<yorickpeterse> or does it simply iterate over everything ever created?
mechanicles_ has quit [Remote host closed the connection]
<yorickpeterse> I'm assuming the former, but that makes this memory issue even weirder as it would mean Nokogiri somewhere (or something else) holds on to all parsed documents
mbr has joined #ruby-lang
cyndis has joined #ruby-lang
mannyt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby-lang
shaman42 has joined #ruby-lang
Jamo has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
chouhoulis has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
daikan has quit [Remote host closed the connection]
mnngfltg has joined #ruby-lang
Onixs_ has joined #ruby-lang
Onixs has quit [Read error: Connection reset by peer]
cyndis has quit [Quit: No Ping reply in 180 seconds.]
cyndis has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
<r0bgleeson> yorickpeterse: how do you mean? that'd be a bug of fucked up proportions
<r0bgleeson> you shouldnt be able to reach an object thats been GC'ed
paramg has quit [Quit: Nettalk6 - www.ntalk.de]
<yorickpeterse> just checking to be sure, but that means that something holds on to all fucking Nokogiri objects
<yorickpeterse> no wonder this memory skyrockets to GBs
vlad_starkov has joined #ruby-lang
<yorickpeterse> trying cirwin's code mentioned above but it's taking forever to generate the graph
<r0bgleeson> cloudy on what you're doing, but i saw your tweet
<r0bgleeson> nokogiri and sigsegv
<yorickpeterse> that might've been unrelated, still not sure
<yorickpeterse> not sure if you were supposed to trigger a GC run during object allocations
<yorickpeterse> ObjectSpace.find_references(Nokogiri::XML::Element).count # => 1134
<r0bgleeson> GC.enable shouldn't bomb the interpreter ever though
<yorickpeterse> WHAT THE FUCK
<r0bgleeson> what are you parsing?
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<yorickpeterse> HTML
<yorickpeterse> lots of it
<yorickpeterse> fuck
<yorickpeterse> there's apparently a reference of the current thread to the elements list?
<yorickpeterse> that should keep that stuff around forever though
<r0bgleeson> are you sure the GC is being run?
<yorickpeterse> yes
<yorickpeterse> Because manually starting it after jobs didn't do squat
<r0bgleeson> what does your code look like? how do you reference the document etc
<yorickpeterse> None of the documents are long lived, they're used and thrown away nicely
<r0bgleeson> alright
<r0bgleeson> im not sure then
<yorickpeterse> tl;dr there's no global state so it should be freed properly
<r0bgleeson> you could be really extreme and try locals
<r0bgleeson> to see if it made any difference
<r0bgleeson> but sounds like an issue in nokogiri maybe
<yorickpeterse> locals?
<r0bgleeson> parse the document within a method that only uses local variables
<r0bgleeson> you shouldnt ever have to worry about them hanging around
<yorickpeterse> ObjectSpace.find_references(Nokogiri::XML::Element).reject { |c| c.is_a?(Nokogiri::XML::Element) } yields...
<yorickpeterse> [Nokogiri::XML,#<Class:Nokogiri::XML::Element>,#<Thread:0x00000001c42fd8 run>]
<yorickpeterse> that second one worries me
<yorickpeterse> oh wait no derp, that's the object in the current scope so that's correct
<yorickpeterse> ugh I need lunch first, brb
<r0bgleeson> yeah
<r0bgleeson> not a bad idea
skade has joined #ruby-lang
quizzicol has quit [Quit: Leaving.]
judofyr has joined #ruby-lang
<yorickpeterse> hm, I think the prime suspect is actually me
<yorickpeterse> but I need to confirm that first
quizzicol has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
benlovell has quit [Ping timeout: 265 seconds]
daikan has joined #ruby-lang
quizzicol has quit [Ping timeout: 245 seconds]
quizzicol has joined #ruby-lang
mehlah has joined #ruby-lang
<yorickpeterse> yup, I'm a fucking dumbass
<yorickpeterse> tl;dr recursive method would parse document, then call itself
<yorickpeterse> so if you have 200 calls it would keep 200 documents until the call stack would unwind itself
<yorickpeterse> this prevents Nokogiri (or anything else) from re-using memory
<yorickpeterse> since the object is still there
daikan has quit [Ping timeout: 260 seconds]
benlovell has joined #ruby-lang
<workmad3> yorickpeterse: oops
<yorickpeterse> yeah it's fucking retarded that I'm even allowed near a computer
<workmad3> yorickpeterse: heh :) maybe you intended to turn on TCO?
<yorickpeterse> doubt that would've solved this problem
<r0bgleeson> yorickpeterse: lol
<workmad3> yorickpeterse: well, it would have let the call stack release the frame that was holding the document surely?
<r0bgleeson> this made my day, "yeah it's fucking retarded that I'm even allowed near a computer"
benlovell has quit [Ping timeout: 248 seconds]
<yorickpeterse> http://hastebin.com/raw/vopururamo commit explains it
<r0bgleeson> nice catch!
<yorickpeterse> right, lets see how this holds up in production
<workmad3> yorickpeterse: I'm guessing it can't be any worse than the current situation? :)
<yorickpeterse> har har
<yorickpeterse> in my defense, it is Friday
<r0bgleeson> yeaaah
<r0bgleeson> friiiiday
<r0bgleeson> !!!!
<yorickpeterse> Hm, thinking of it I could probably check for problems like these in ruby-lint
<yorickpeterse> that would actually be helpful
<r0bgleeson> how would you detect it?
<yorickpeterse> https://github.com/YorickPeterse/ruby-lint/issues/95 it's actually not that hard
<yorickpeterse> you'd have to check for the creation of variables and check if a method call is recursive, the latter is already tracked
quizzicol has quit [Quit: Leaving.]
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
quizzicol has joined #ruby-lang
mechanicles has joined #ruby-lang
smashwilson has joined #ruby-lang
mbj has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
judofyr has quit [Remote host closed the connection]
kurko__ has quit [Ping timeout: 252 seconds]
ahmedelgabri has quit [Remote host closed the connection]
<r0bgleeson> yorickpeterse: what about logic to detect the exit clause?
<r0bgleeson> if youre doing it like 5 times its probably not terrible
<r0bgleeson> but yeah could be useful as a warning point
danijoo_ has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
<r0bgleeson> yorickpeterse: can ruby not just do a better job here?
<yorickpeterse> No
<yorickpeterse> There's nothing you can do about it
patriciomacadden has joined #ruby-lang
<yorickpeterse> the object simply lives until the variable goes out of scope, which is when the method returns
<yorickpeterse> due to the recursive nature the first object allocated will be freed the last
<yorickpeterse> unless you were to first go into recursion, then assign stuff
<yorickpeterse> but that wouldn't work in my case since in order to recurse I had to have the object
<r0bgleeson> hm yeah, i guess it only needs to stay for the first case though
<r0bgleeson> the first case is probably the case returned to and who may use it later on
tbuehlmann has quit [Quit: Konversation terminated!]
<r0bgleeson> instead of just returning early
<r0bgleeson> otherwise youre just passing the same local over and over again
mechanicles has quit []
<r0bgleeson> but indeed i dont understand this stuff well enough to make a good comment about it
diegoviola has quit [Ping timeout: 260 seconds]
cored has joined #ruby-lang
codebauss has joined #ruby-lang
symm- has joined #ruby-lang
quizzicol has quit [Quit: Leaving.]
patriciomacadden has quit [Ping timeout: 252 seconds]
daikan has joined #ruby-lang
patriciomacadden has joined #ruby-lang
canton7-mac has joined #ruby-lang
benlovell has joined #ruby-lang
daikan has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
yalue has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
quizzicol has joined #ruby-lang
benlovell has joined #ruby-lang
ledestin has quit [Quit: ledestin]
skade has joined #ruby-lang
sepp2k has joined #ruby-lang
bin7me has joined #ruby-lang
prc has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
quizzicol has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
daikan has joined #ruby-lang
Squarepy has joined #ruby-lang
lfox has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
quizzicol has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
quizzicol has quit [Quit: Leaving.]
enebo has joined #ruby-lang
daikan has quit [Remote host closed the connection]
cbreeze has joined #ruby-lang
<ljarvis> moin
breakingthings has joined #ruby-lang
soba has quit [Ping timeout: 252 seconds]
symm- has quit [Ping timeout: 246 seconds]
Phoop has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Phoop has joined #ruby-lang
daikan has joined #ruby-lang
guns has joined #ruby-lang
IceColdMax has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
bradcliffe has joined #ruby-lang
shinnya has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vxr74 has joined #ruby-lang
marcofernandez_ has quit [Ping timeout: 246 seconds]
thmzlt has joined #ruby-lang
mannyt has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
vxr74 has quit [Quit: peace]
vxr74 has joined #ruby-lang
IceColdMax has quit [Quit: Soiya!]
IceColdMax has joined #ruby-lang
mannyt has quit [Ping timeout: 252 seconds]
phansch has quit [Quit: Leaving]
cbreeze has quit [Quit: Textual IRC Client: www.textualapp.com]
IceColdMax has left #ruby-lang [#ruby-lang]
patriciomacadden has quit [Ping timeout: 245 seconds]
nigerianceo has joined #ruby-lang
patriciomacadden has joined #ruby-lang
rippa has joined #ruby-lang
mrevd has joined #ruby-lang
mrevd has quit [Changing host]
mrevd has joined #ruby-lang
marcofernandez_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
simi has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Jacky has quit [Excess Flood]
_aeris_ has left #ruby-lang ["Konversation terminated!"]
marcofernandez_ has quit [Ping timeout: 252 seconds]
Jacky has joined #ruby-lang
ulisescab has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse> it now sits nice and stable at 200 MB
vxr74 has quit [Quit: peace]
enebo has quit [Quit: enebo]
relix has joined #ruby-lang
ender has joined #ruby-lang
tylersmith has joined #ruby-lang
Phoop has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
francisfish has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 272 seconds]
<workmad3> yorickpeterse: yay :)
d4rkr4i has joined #ruby-lang
paramg has joined #ruby-lang
<d4rkr4i> is there any construct in Array, which can shift first element in place? Like: [1,2,3].shift! #=> [2,3]; and changes original object
<apeiros> d4rkr4i: shift *is* in-place
<apeiros> and the definition of in-place is that it changes the original, so that's kinda redundant.
<apeiros> >> a = [1,2,3]; a.shift; a
<eval-in> apeiros => [2, 3] (https://eval.in/91155)
<d4rkr4i> apeiros: yes. But it should return the mutated object, instead of dropped element.
<apeiros> d4rkr4i: ah well, maybe you should have stated that requirement then :-p
<apeiros> ary.tap(&:shift)
<apeiros> >> a = [1,2,3]; a.tap(&:shift)
<eval-in> apeiros => [2, 3] (https://eval.in/91160)
<apeiros> if you want a single method, you'll have to add it
<d4rkr4i> apeiros: brilliant. that will do.
<d4rkr4i> apeiros: I never thought to use #tap like that!
bjh13 has joined #ruby-lang
skade has joined #ruby-lang
<d4rkr4i> apeiros: including Enumerable mixin in class add enumerable methods like map, select, find etc for that class (upon defining each method).
<d4rkr4i> Any mixin available to mix method like 'shift' ?
<apeiros> d4rkr4i: no
<apeiros> mutating methods via mixin are difficult
<d4rkr4i> apeiros: mm-hm. makes sense. thanks..
<d4rkr4i> apeiros: in mixin like Enumerable, we are just yielding some part of that class to a block. It will be entirely different thing for method like shift.
<workmad3> d4rkr4i: it's not really because of that
<apeiros> d4rkr4i: actually the reason something like Enumerable works, is that it can be based on a single method: #each
havenwood has joined #ruby-lang
<workmad3> d4rkr4i: it's that to mixin something like enumerable, it relies on an interface (e.g. .each). So in order to mixin mutating methods, you need to rely on a method that's definitely mutating... which is a heavy restriction for people using the mixin
<d4rkr4i> workmad3: apeiros true true.
kfpratt has joined #ruby-lang
serroft has joined #ruby-lang
d4rkr4i has quit [Ping timeout: 248 seconds]
brettweavnet has joined #ruby-lang
heftig has quit [Quit: Quitting]
saarinen has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
bjh13 has quit [Quit: leaving]
enebo has joined #ruby-lang
apeiros has quit [Ping timeout: 265 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
skade has quit [Ping timeout: 252 seconds]
d4rkr4i has joined #ruby-lang
stonerfish has joined #ruby-lang
ivanskie has joined #ruby-lang
symm- has joined #ruby-lang
deception has joined #ruby-lang
senj has joined #ruby-lang
diegoviola has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
diegoviola has quit [Client Quit]
diegoviola has joined #ruby-lang
AKASkip has joined #ruby-lang
Resty has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby-lang
snarfmason has quit [Quit: Textual IRC Client: www.textualapp.com]
|jemc| has joined #ruby-lang
Resty has quit [Client Quit]
enebo has quit [Quit: enebo]
snarfmason has joined #ruby-lang
wallerdev has joined #ruby-lang
AKASkip has quit [Ping timeout: 245 seconds]
seanlinsley has quit [Quit: …]
Lewix has joined #ruby-lang
CaptainJet has joined #ruby-lang
guns has quit [Quit: guns]
skade has joined #ruby-lang
rafeed has joined #ruby-lang
d4rkr4i has left #ruby-lang [#ruby-lang]
saarinen has quit [Quit: saarinen]
<rafeed> hey guys, if I want to make a REST client, what are the best resources for that? Almost all the books I see are for designing REST services, but not from a client perspective.
zlogan has quit [Ping timeout: 245 seconds]
bjh13 has joined #ruby-lang
rue has joined #ruby-lang
MartynKeigher has quit [Read error: Connection reset by peer]
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Read error: Connection reset by peer]
vmoravec_ has quit [Quit: Leaving]
apeiros has joined #ruby-lang
VTLob has joined #ruby-lang
jtw has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MartynKeigher has joined #ruby-lang
thmzlt has quit [Remote host closed the connection]
skade has joined #ruby-lang
thmzlt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
deception is now known as deception_away
chouhoulis has joined #ruby-lang
ender has quit [Ping timeout: 245 seconds]
brooks has joined #ruby-lang
thmzlt has quit [Ping timeout: 272 seconds]
arooni-mobile has joined #ruby-lang
patriciomacadden has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
brooks_ has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
brooks_ has quit [Client Quit]
paramg has quit [Ping timeout: 246 seconds]
paramg2 has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
achru has joined #ruby-lang
jeff_r has joined #ruby-lang
imperator has joined #ruby-lang
ProfArithmetic has joined #ruby-lang
brooks has quit [Ping timeout: 272 seconds]
rahul_j has quit [Quit: rahul_j]
robmiller has quit [Quit: robmiller]
achru has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby-lang
seanlinsley has joined #ruby-lang
brooks has joined #ruby-lang
bzalasky has joined #ruby-lang
mistym has joined #ruby-lang
elia has joined #ruby-lang
|jemc| has quit [Ping timeout: 272 seconds]
jeff_r has quit [Remote host closed the connection]
melter has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 265 seconds]
phansch has joined #ruby-lang
dagobah has quit [Quit: Leaving...]
momomomomo has quit [Quit: momomomomo]
arooni-mobile has quit [Ping timeout: 272 seconds]
jeff_r has joined #ruby-lang
paramg2 has quit [Quit: Nettalk6 - www.ntalk.de]
bzalasky has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
skade has joined #ruby-lang
|jemc| has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 265 seconds]
__butch__ has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
thmzlt has joined #ruby-lang
thmzlt has quit [Remote host closed the connection]
thmzlt has joined #ruby-lang
AndChat|220596 has joined #ruby-lang
kurko__ has joined #ruby-lang
canton7-mac has quit [Quit: Leaving]
saarinen has quit [Quit: saarinen]
AndChat|220596 has quit [Client Quit]
Iskarlar has joined #ruby-lang
ivanskie has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 252 seconds]
chouhoul_ has joined #ruby-lang
nanno has joined #ruby-lang
nanno__ has joined #ruby-lang
<brettweavnet> @rafeed I typically look at other clients out there and use them as guidance. Heroku's is a good ref https://github.com/heroku/heroku
marcofernandez has joined #ruby-lang
serroft has quit [Quit: Leaving.]
chouhoulis has quit [Ping timeout: 260 seconds]
bantic has joined #ruby-lang
RobertBirnie has joined #ruby-lang
saarinen has joined #ruby-lang
skade has joined #ruby-lang
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
<zzak> yorickpeterse: pong?
elia has quit [Ping timeout: 252 seconds]
arooni-mobile has joined #ruby-lang
marcofernandez has quit [Ping timeout: 252 seconds]
rahul_j has joined #ruby-lang
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charlies_ has joined #ruby-lang
<rafeed> thanks @brettweavnet, i'll take a look
relix has joined #ruby-lang
skade has quit [Ping timeout: 246 seconds]
albertgrala has joined #ruby-lang
charliesome has quit [Ping timeout: 248 seconds]
mbj has quit [Quit: leaving]
dwknoxy has joined #ruby-lang
diegovio1 has joined #ruby-lang
diegoviola has quit [Ping timeout: 252 seconds]
diegovio1 has quit [Changing host]
diegovio1 has joined #ruby-lang
diegovio1 is now known as diegoviola
arooni-mobile has quit [Remote host closed the connection]
marcofernandez has joined #ruby-lang
patriciomacadden has joined #ruby-lang
yfeldblum has joined #ruby-lang
benanne has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
rafeed has quit [Quit: Leaving.]
brooks has quit [Quit: brooks]
vlad_starkov has joined #ruby-lang
wolfsoul has joined #ruby-lang
brooks has joined #ruby-lang
Asher has quit [Quit: Leaving.]
rahul_j has quit [Quit: rahul_j]
wolfsoul has left #ruby-lang [#ruby-lang]
wolfsoul has joined #ruby-lang
albertgrala has quit [Quit: Leaving]
wolfsoul has quit [Client Quit]
joshsz has joined #ruby-lang
MichD is now known as michd
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
<joshsz> Anyone know if it's a bad idea to build a Net::HTTPResponse on by own? I'm seeing this in the code: def initialize(httpv, code, msg) #:nodoc: internal use only
dwknoxy has joined #ruby-lang
<joshsz> on my own*
dwknoxy has quit [Client Quit]
jeff_r has quit [Remote host closed the connection]
<joshsz> zzak: I'm going to poke you about this because you might know ;)
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deception_away is now known as deception
dwknoxy has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
cnivolle has quit [Ping timeout: 252 seconds]
brooks has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
<Lewix> I have a piece of code where i do something like this method?(args).tap {} , method?(args) returns a number or a string
<Lewix> or rather this: method?(arg1, arg2).tap {} , method?(args) returns a number or a string
<Lewix> syntax error, unexpected ',', expecting ')'
ProfArithmetic has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby-lang
<Lewix> apeiros: ?
jeff_r has joined #ruby-lang
<Lewix> nevermind. stupid stuff
ahmedelgabri has quit []
io_syl has joined #ruby-lang
dwknoxy has quit [Quit: Computer has gone to sleep.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brooks has joined #ruby-lang
dwknoxy has joined #ruby-lang
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
daikan has quit [Remote host closed the connection]
daikan has joined #ruby-lang
daikan has quit [Remote host closed the connection]
daikan has joined #ruby-lang
patriciomacadden has joined #ruby-lang
brianpWins has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.2]
Senjai has quit [Ping timeout: 276 seconds]
huma has joined #ruby-lang
patriciomacadden has quit [Ping timeout: 252 seconds]
rahul_j has joined #ruby-lang
patriciomacadden has joined #ruby-lang
Senjai has joined #ruby-lang
<zzak> joshsz: what do other net/http clients do?
|jemc| has quit [Ping timeout: 245 seconds]
senj has quit [Quit: Textual IRC Client: www.textualapp.com]
senj has joined #ruby-lang
francisfish has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
benlovell has joined #ruby-lang
cnivolle has joined #ruby-lang
caral has quit [Quit: caral]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> Lewix: what's up?
|jemc| has joined #ruby-lang
<Lewix> apeiros: that was some stupid stuff i fixed. however i have a real question this time
|jemc| has quit [Read error: Operation timed out]
<drbrain> joshsz: I build them for testing purposes
coca_rails has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
stonerfish has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
vlad_starkov has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
coca_rails has quit [Remote host closed the connection]
jsrn has joined #ruby-lang
jsrn has quit [Client Quit]
breakingthings has quit []
danijoo_ has quit [Remote host closed the connection]
danijoo has joined #ruby-lang
testing_limechat has joined #ruby-lang
coca_rails has joined #ruby-lang
jtw has quit []
testing_limechat has left #ruby-lang [#ruby-lang]
testing_limechat has joined #ruby-lang
bottico has joined #ruby-lang
kirin` has quit [Ping timeout: 248 seconds]
kirin` has joined #ruby-lang
testing_limechat has left #ruby-lang [#ruby-lang]
kirin` has quit [Changing host]
kirin` has joined #ruby-lang
breakingthings has joined #ruby-lang
simi has quit [Read error: Operation timed out]
benlovell has quit [Ping timeout: 272 seconds]
dorei has joined #ruby-lang
wolfsoul has joined #ruby-lang
|jemc| has quit [Ping timeout: 265 seconds]
coca_rails has quit [Remote host closed the connection]
wolfsoul has quit [Client Quit]
thmzlt has quit []
coca_rails has joined #ruby-lang
|jemc| has joined #ruby-lang
phansch has quit [Ping timeout: 272 seconds]
jevs has joined #ruby-lang
serroft has joined #ruby-lang
phansch has joined #ruby-lang
|jemc| has quit [Ping timeout: 260 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
bradcliffe has joined #ruby-lang
daikan has quit [Ping timeout: 246 seconds]
MrZYX|off is now known as MrZYX
Mon_Ouie has quit [Ping timeout: 245 seconds]
danijoo_ has joined #ruby-lang
relix has joined #ruby-lang
danijoo has quit [Read error: Operation timed out]
CaptainJet has quit [Ping timeout: 265 seconds]
coca_rails has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
mbj has joined #ruby-lang
DevDoo has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
vlad_starkov has quit [Ping timeout: 246 seconds]
vlad_sta_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
mehlah has joined #ruby-lang
fijimunkii has joined #ruby-lang
havenwood has joined #ruby-lang
daikan has joined #ruby-lang
daikan has quit [Read error: Connection reset by peer]
daikan has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mrevd has quit [Quit: Leaving.]
chouhoulis has joined #ruby-lang
sandbags has joined #ruby-lang
mrevd has joined #ruby-lang
chouhoul_ has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
prc has joined #ruby-lang
postmodern has joined #ruby-lang
daikan has quit [Remote host closed the connection]
daikan has joined #ruby-lang
daikan_ has joined #ruby-lang
daikan has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-lang
yalue has quit [Quit: Leaving]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
deception has quit [Quit: Goodbye]
caral has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
ddd has quit [Quit: leaving]
ddd has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblu_ has quit [Remote host closed the connection]
caral has quit [Quit: caral]
dragonkh has joined #ruby-lang
caral has joined #ruby-lang
elia has joined #ruby-lang
patriciomacadden has joined #ruby-lang
<yorickpeterse> zzak: eh, that was a skype misclick
<yorickpeterse> zzak: for some reason it keeps showing you called me months ago, so I figured "meh, double click it and it will be gone". Apparently that starts a call
<zzak> yorickpeterse: np, i figured :D
<zzak> i thought i sleep called you
<zzak> sometimes i fall asleep with skype running D:
<yorickpeterse> heh
DevDoo has quit [Remote host closed the connection]
<zzak> ljarvis: wheres my inkjet :(
jtw has joined #ruby-lang
<yorickpeterse> in the toner
DevDoo has joined #ruby-lang
x0f has quit [Ping timeout: 246 seconds]
benlovell has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
x0f has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
kurko__ has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby-lang
prc has left #ruby-lang [#ruby-lang]
kurko__ has joined #ruby-lang
achru has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
mucker has quit [Ping timeout: 265 seconds]
__butch__ has quit [Quit: Leaving.]
francisfish has quit [Remote host closed the connection]
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
deens has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
patriciomacadden has joined #ruby-lang
iliketurtles has joined #ruby-lang
huma has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
bradcliffe has quit [Quit: Textual IRC Client: www.textualapp.com]
nisstyre has joined #ruby-lang
benlovell has joined #ruby-lang
fijimunkii has quit [Ping timeout: 246 seconds]
AKASkip has quit [Ping timeout: 272 seconds]
iliketurtles has quit [Quit: zzzzz…..]
atmosx has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
thumpba__ has joined #ruby-lang
phansch has quit [Quit: Leaving]
|jemc| has joined #ruby-lang
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wnd has quit [Excess Flood]
snarfmason has quit [Read error: Connection reset by peer]
wnd has joined #ruby-lang
DevDoo has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
prc has joined #ruby-lang
<Lewix> PEI?
<Lewix> apeiros: ?
amerine has quit [Ping timeout: 245 seconds]
amerine has joined #ruby-lang
kurko__ has quit [Quit: Computer has gone to sleep.]
<Lewix> anyone has better eyes than i do
<Lewix> ?
achru has quit [Remote host closed the connection]
<yorickpeterse> line 44
<yorickpeterse> oh wait, there's none
<yorickpeterse> lol wat
<Lewix> lol
<ryanf> Lewix: you have a line that's empty string
<ryanf> split returns [], cust_id is nil
<yorickpeterse> oh
<yorickpeterse> you're missing an end
<yorickpeterse> line 43 needs an `end`
<yorickpeterse> (to close the method)
mistym has joined #ruby-lang
<ryanf> he just didn't paste it. otherwise the exception would be a syntax error.
fijimunkii has joined #ruby-lang
<yorickpeterse> eh?
<ryanf> maybe we're talking about different things?
<ryanf> w/e
<yorickpeterse> oh wait, I missed the error at the top of the gist
<zenspider> the more I dig in and profile this beast the more I realize it's "just faster" and there isn't any one thing that really accounts for it... but 50%?!?!? wtf
vlad_sta_ has quit [Remote host closed the connection]
deens has quit [Remote host closed the connection]
<Lewix> ryanf: im hell of confused cause it used to work
<Lewix> ryanf: and the output spit everything correctly then the error message
<drbrain> Lewix: then the last line probably doesn't have one of those values set
<drbrain> rather, has it set to nil which does not respond to #center
<Lewix> drbrain: the last line is also outputed
<drbrain> Lewix: add p data after line 12
yfeldblum has joined #ruby-lang
<drbrain> Lewix: I bet you get a [] for the last line
<Lewix> drbrain: ["108000601", "1", "N", "20080529", "99991231", "2011", "6", "33", "20110606", "A", "28320", "\n"]
mykoweb has joined #ruby-lang
<Lewix> drbrain: no man
melter has quit [Quit: Client exiting]
<drbrain> huh
<drbrain> and that's the correct number of columns?
EngierkO has quit [Ping timeout: 252 seconds]
<Lewix> yes sir
<drbrain> then you should break the print line out with all the centers to figure out which one has nil
<Lewix> drbrain: i spent about an hour on this. its such a pain
mykoweb has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
kotk has joined #ruby-lang
mykoweb has joined #ruby-lang
smashwilson has quit [Quit: Leaving]
seanlinsley has quit [Quit: …]
brooks has quit [Quit: brooks]
ulisescab has quit [Ping timeout: 272 seconds]
<Lewix> drbrain: thanks
<drbrain> Lewix: this is separate from your bug, but I would write line 38 as:
<drbrain> puts data.map { |item| item.center c }.join '|'
<Lewix> drbrain: please feel free to give some suggestion
<drbrain> or maybe join '| '
<Lewix> drbrain: not as pretty and to fix the previous bug i had to check one of the data on that line
<drbrain> Lewix: how is it not as pretty? all I did was roll up your loop
<Lewix> drbrain: not really
<Lewix> drbrain: it wasnt exactly the same thing
nisstyre has quit [Read error: Connection reset by peer]
deens has joined #ruby-lang
melter has joined #ruby-lang
<drbrain> also, you should be checking data integrity when you're reading it in, not after you've completed all your work and and are printing it back out
<Lewix> drbrain: you forgot '\n'. and thanks
<drbrain> Lewix: puts adds the "\n" for you
wallerdev has quit [Quit: wallerdev]
rkroeker2 has left #ruby-lang [#ruby-lang]
saarinen has quit [Quit: saarinen]
workmad3 has joined #ruby-lang
tkuchiki has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
digs has joined #ruby-lang
digs is now known as Guest33976
<Lewix> drbrain: data.each_with_index {|item, i| print "#{item.center c}| " ; print "\n" if i == data.length - 1}
<Lewix> seems so cryptic
<drbrain> that's why I used map and join
<drbrain> and puts
nisstyre has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
Guest33976 has quit [Client Quit]
jsullivandigs has joined #ruby-lang
dik_dak has joined #ruby-lang
yfeldblum has joined #ruby-lang
serroft has quit [Quit: Leaving.]
brianpWi1s has joined #ruby-lang
<Lewix> drbrain: your version is so much cleaner
brettweavnet has quit [Quit: Bye]
solars has quit [Ping timeout: 272 seconds]
<zenspider> every time you use #each, question whether or not Enumerable already solves your problem
<Lewix> zenspider: what do you mean, each and map can only be used with enumerable
<Lewix> [{1000=>[{:one=>"one", :two=>"two", :three=>"three"}, {:one=>"one", :two=>"two", :three=>"trois"}]}, {4000=>[{:four=>"four", :five=>"five", :six=>"six"}]}]
<Lewix> drbrain: i have something like the array above and I want to grab all the items that hat the nested value "trois" on the key :three
fijimunkii has quit [Ping timeout: 252 seconds]
<drbrain> here's a start: ary.select { |hash| hash.values.any? { … } }
thumpba__ has quit [Remote host closed the connection]
<zenspider> I'd start by saying that that's a horrible data structure and should be revisited using proper objects that model whatever domain this is
<zenspider> an array of hashes with one key each and a value of an array of hashes of symbols to strings
<zenspider> ugh
bantic has quit [Quit: bantic]
<drbrain> yeah
<drbrain> it's pretty impenetrable
vlad_starkov has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
heftig has joined #ruby-lang
bin7me has quit [Ping timeout: 245 seconds]
nigerianceo has quit []
jsullivandigs has quit [Remote host closed the connection]
<Lewix> drbrain: yea, any tips on how to have a better feel for data structures
<drbrain> Lewix: I usually break complex stuff down into objects so I can write meaningful methods for manipulation and querying
<jaimef> localhost:<%= node[:nginx][:backend_port]? ? node[:nginx][:backend_port] : 8080 %>; # how do you do a ternary in erb?
deens has quit [Remote host closed the connection]
<drbrain> jaimef: you have an extra ? following the first :backend_port
<jaimef> derp thanks
chouhoulis has quit [Ping timeout: 272 seconds]
jonahR has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 252 seconds]
relix has joined #ruby-lang
fijimunkii has joined #ruby-lang
ivanskie has joined #ruby-lang
caral has quit [Quit: caral]
bjh13 has quit [Quit: leaving]
ivanskie has quit [Read error: Connection reset by peer]
jay_m has joined #ruby-lang
mrevd has quit [Quit: Leaving.]
ivanskie has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
ivanskie has quit [Client Quit]
ivanskie has joined #ruby-lang