coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Barrin6 has joined #ruby-lang
coca_rails has quit [Ping timeout: 240 seconds]
kyrylo has quit [Quit: Hi, Rob!]
matp has quit [Quit: ZZZzzz…]
simoz7 has quit [Ping timeout: 265 seconds]
|jemc| has joined #ruby-lang
matp has joined #ruby-lang
coca_rails has joined #ruby-lang
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tylersmith has joined #ruby-lang
coca_rails has quit [Ping timeout: 240 seconds]
lfox has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
amclain has joined #ruby-lang
kfpratt has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 272 seconds]
kfpratt has quit [Ping timeout: 272 seconds]
cored has quit [Ping timeout: 248 seconds]
brettweavnet has joined #ruby-lang
centrx has joined #ruby-lang
brettweavnet has quit [Client Quit]
judofyr has joined #ruby-lang
imjacobclark has joined #ruby-lang
jtw has quit []
julweber has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
judofyr has quit [Ping timeout: 252 seconds]
imjacobclark has quit [Ping timeout: 265 seconds]
jstewart has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
knu has joined #ruby-lang
jtw has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
r0bglees0n has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
presidentbeef has quit [Ping timeout: 272 seconds]
setmeaway has quit [Ping timeout: 272 seconds]
julweber has joined #ruby-lang
Rubasdotorg has quit [Quit: Lost terminal]
julweber has quit [Ping timeout: 252 seconds]
_mtr has joined #ruby-lang
jonahR has quit [Quit: jonahR]
knu has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby-lang
knu has joined #ruby-lang
judofyr has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
simoz7 has joined #ruby-lang
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
knu has joined #ruby-lang
judofyr has quit [Ping timeout: 240 seconds]
imjacobclark has joined #ruby-lang
vlad_starkov has joined #ruby-lang
CJD14 has joined #ruby-lang
imjacobclark has quit [Ping timeout: 264 seconds]
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
fijimunkii has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
shado has joined #ruby-lang
<shado>
evening, folks :)
<shado>
anybody feeling up for a memory/performance question?
* centrx
steps into the ring
<shado>
oo, cool :)
<shado>
so, problem: collection(roughly organized into a tree) of approximately 15-20k items.
<shado>
about 3-4 levels deep, about 100 nodes wide at each level.
<shado>
for example, root node has 120 children, each first-level child has 10-20 direct children, some of whom have another 10-20. tree isn't really more than about 4-5 levels deep
<shado>
when building the tree, I can rip through the iterations pretty quickly, but it will run out of memory near the end. I can get around this by manually forcing gc after creation of every one of the 120 subtrees
mistym has joined #ruby-lang
<shado>
however, from that point on, any enumeration/iteration through the tree causes memory to INSANE, jumping up to like 1gb+(in MRI) or 3-4gb(in jruby)
<shado>
even seemingly simple things like an array.each {} op
<shado>
it doesn't seem to matter how small the subtree is that I'm working in for those array.each ops, either...
<shado>
so, is there some behind-the-scenes object copying I'm not aware of?
<shado>
btr, this is all seen when poking around in IRB
<shado>
*btw*
<centrx>
What version of Ruby are you using?
<shado>
I've tried 1.9.3 and 2.0.0 for MRI, and 1.7.10 for jruby
CaptainJet has joined #ruby-lang
<centrx>
2.1.0 has huge garbage collection changes. I am not familiar enough to say it directly applies to your issue, but it seems like it is worth a try
<shado>
sounds like it's worth trying
mistym has quit [Ping timeout: 245 seconds]
<shado>
oh, btw, this is on windows.
<centrx>
Also, there might be some optimizations on what the nodes contains
<centrx>
Okay, that may also explain it :)
<shado>
I'm sure there are, I read that for hash keys literals are better than strings, which I was originally using
<shado>
the nodes basically contain a handful of strings, most of which are under 20-30 chars, some of which(urls) may be ~100
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
Yes, changing hash keys to symbols would certainly help somewhat
<centrx>
Are the objects all hashes and strings?
<shado>
I think so. some fixnums
<centrx>
Is there some sample code you can pastebin?
<shado>
not sure. I'm probably making it way too complex
<zenspider>
shado: enumeration doesn't take extra memory by itself... what are you doing in your enumerations?
jstewart has joined #ruby-lang
<shado>
zenspider, I can do nothing and run out of memory. rootNode.children.each { |child| puts "child type is #{child.class.to_s}" } will print out all the child types quickly, and then blow the heap
<shado>
is it copying everything for the sake of printing the return value in IRB, perhaps?
<zenspider>
irb? that's a bad place to run this type of code
<centrx>
shado, irb does call "inspect" on whatever is returned from the line
<zenspider>
run rootNode.children.each { |child| puts "..." } ; nil
<shado>
ah, that's probably it
<shado>
thats' where a lot of the stacktraces point
<zenspider>
but if you're blowing heap on something that's only 4-5 levels deep, you're prolly making an inadvertant cycle
em0ral has quit [Read error: Connection reset by peer]
<shado>
It's possible, but I don't think so.
<zenspider>
which you can counter by either keeping a "visited" hash during your enumeration, or enumerate shallow
<shado>
it's basically foreach through source arrays
<shado>
(nested) source arrays, that is
<zenspider>
then you shouldn't have a problem.
<shado>
I'll try adding nil on each line and see if that helps
<zenspider>
I'd suggest designing this via tests instead of hacking at it on irb personally...
<zenspider>
esp w/ big structures. you can use minitest's assert_equal's diffing on error
<zenspider>
that an `make_my_diffs_pretty!` in your test case is a great combo for structural testing
<shado>
cool method :)
vlad_starkov has quit [Remote host closed the connection]
<shado>
the nil suggestion seems like it did the trick. but I'll still work on moving towards tests, too... thanks a ton zenspider and centrx :)
mdub has joined #ruby-lang
centrx has quit [Quit: Leaving]
woollyams has quit [Ping timeout: 252 seconds]
jstewart has quit [Quit: Leaving.]
tuttinator has joined #ruby-lang
simoz7 has quit [Ping timeout: 240 seconds]
kurko_ has joined #ruby-lang
judofyr has joined #ruby-lang
<shado>
zenspider, the nil trick is definitely an immediate improvement. thanks again :)
mdub has quit [Ping timeout: 252 seconds]
shado has quit [Quit: you rubyists ROCK]
<zenspider>
n/p
woollyams has joined #ruby-lang
dik_dak has joined #ruby-lang
judofyr has quit [Ping timeout: 272 seconds]
nathanstitt has quit [Quit: I growing sleepy]
RobertBirnie has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
imjacobclark has joined #ruby-lang
yfeldbl__ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
knu has joined #ruby-lang
imjacobclark has quit [Ping timeout: 248 seconds]
woollyams has quit [Ping timeout: 252 seconds]
rahul_j has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
tylersmith has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
sree has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
vpretzel has quit [Quit: Adios!]
ledestin has quit [Quit: ledestin]
CaptainJet has quit []
knu has quit [Ping timeout: 252 seconds]
woollyams has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
clayreed has joined #ruby-lang
woollyams has joined #ruby-lang
rahul_j has joined #ruby-lang
judofyr has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
sree has quit [Ping timeout: 272 seconds]
woollyams has quit [Ping timeout: 252 seconds]
judofyr has quit [Ping timeout: 252 seconds]
tuttinator has quit [Quit: Leaving...]
fijimunkii has quit [Ping timeout: 240 seconds]
ahmedelgabri has joined #ruby-lang
kurko__ has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
houhoulis has quit [Remote host closed the connection]
imjacobclark has joined #ruby-lang
clayreed has quit []
sree has joined #ruby-lang
imjacobclark has quit [Read error: Operation timed out]
kurko_ has joined #ruby-lang
conquerio has joined #ruby-lang
tonni has quit [Remote host closed the connection]
sree has quit [Read error: Connection reset by peer]
sree has joined #ruby-lang
kurko__ has quit [Ping timeout: 240 seconds]
jeff_r has quit [Remote host closed the connection]
sree has quit [Read error: Connection reset by peer]
sree has joined #ruby-lang
CJD14 has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ledestin has joined #ruby-lang
AKASkip has joined #ruby-lang
mistym has quit [Ping timeout: 264 seconds]
sree has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
woollyams has joined #ruby-lang
judofyr has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
saneax__ has joined #ruby-lang
saneax__ has quit [Client Quit]
knu has joined #ruby-lang
14WABVY7A has joined #ruby-lang
14WABVY7A is now known as sanjayu
judofyr has quit [Ping timeout: 272 seconds]
judofyr has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
phansch has joined #ruby-lang
arBmind has joined #ruby-lang
knu has joined #ruby-lang
judofyr has quit [Ping timeout: 272 seconds]
huma has joined #ruby-lang
mistym has joined #ruby-lang
D9 has quit [Quit: Leaving]
JoshuaPaling has quit [Read error: Connection reset by peer]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Quit: Leaving.]
knu has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
knu has joined #ruby-lang
imjacobclark has joined #ruby-lang
julweber has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
imjacobclark has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
ahmedelgabri has quit [Remote host closed the connection]
knu has joined #ruby-lang
Barrin6 has quit [Quit: Leaving]
jeff_r has joined #ruby-lang
arBmind has joined #ruby-lang
xxaM has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
havenwood has joined #ruby-lang
apeiros_ has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
jeff_r has quit [Ping timeout: 245 seconds]
heftig has quit [Quit: Quitting]
woollyams has quit [Ping timeout: 252 seconds]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
Pupeno_w has joined #ruby-lang
judofyr has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
yfeldblum has joined #ruby-lang
knu has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
judofyr has quit [Ping timeout: 265 seconds]
AKASkip has quit [Ping timeout: 252 seconds]
woollyams has quit [Ping timeout: 252 seconds]
toretore has joined #ruby-lang
sree has joined #ruby-lang
jtw has quit []
h_kon has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
huma has quit [Ping timeout: 252 seconds]
knu has quit [Ping timeout: 252 seconds]
conquerio has quit []
amclain has quit [Quit: Leaving]
knu has joined #ruby-lang
phansch has quit [Quit: Leaving]
JohnBat26 has joined #ruby-lang
imjacobclark has joined #ruby-lang
apeiros has joined #ruby-lang
imjacobclark has quit [Ping timeout: 252 seconds]
mytrile has joined #ruby-lang
mistym_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
mistym has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
knu has quit [Ping timeout: 252 seconds]
RoxasShadowRS has joined #ruby-lang
knu has joined #ruby-lang
hahuang65 has joined #ruby-lang
achru has joined #ruby-lang
mistym_ has quit [Ping timeout: 248 seconds]
mistym has joined #ruby-lang
havenwood has quit []
knu has quit [Ping timeout: 252 seconds]
zlogan has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
judofyr has joined #ruby-lang
knu has joined #ruby-lang
solars has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
judofyr has quit [Ping timeout: 264 seconds]
_1_mmm has joined #ruby-lang
<_1_mmm>
hi
solars has quit [Quit: WeeChat 0.4.1]
<_1_mmm>
hi
_1_mmm has quit [Client Quit]
amerine has joined #ruby-lang
ahmedelgabri has quit [Ping timeout: 240 seconds]
ahmedelg_ has joined #ruby-lang
solars has joined #ruby-lang
ahmedelg_ has quit [Remote host closed the connection]
mehlah has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
achru has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
ledestin has quit [Quit: ledestin]
julweber has joined #ruby-lang
tylersmith has joined #ruby-lang
dik_dak has quit [Remote host closed the connection]
mnngfltg has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
rahul_j has joined #ruby-lang
tylersmith has quit [Ping timeout: 240 seconds]
sree has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
RoxasShadowRS has quit [Read error: Connection reset by peer]
RoxasShadowRS has joined #ruby-lang
imajes has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
knu has joined #ruby-lang
fumduq has quit [Ping timeout: 260 seconds]
mistym has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
imajes has joined #ruby-lang
vlad_starkov has joined #ruby-lang
imjacobclark has joined #ruby-lang
sree has joined #ruby-lang
<yorickpeterse>
morning
ylluminate has joined #ruby-lang
yfeldblum has joined #ruby-lang
sree has quit [Client Quit]
yfeldblum has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
knu has joined #ruby-lang
achru has joined #ruby-lang
jsullivandigs has quit [Client Quit]
imjacobclark has quit [Remote host closed the connection]
<ljarvis>
moin
julweber has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
imjacobclark has joined #ruby-lang
imjacobclark has quit [Remote host closed the connection]
rue has quit [Remote host closed the connection]
judofyr has quit [Ping timeout: 240 seconds]
ahmedelgabri has joined #ruby-lang
tbuehlmann has joined #ruby-lang
h_kon is now known as hkon_
<maloik>
Anyone happen to use Braintree and know if certain cards require a billing address to be submitted ?
<maloik>
Can't seem to find a detailed explanation in their docs
rue has joined #ruby-lang
julweber has joined #ruby-lang
RobertBirnie has joined #ruby-lang
julweber has quit [Remote host closed the connection]
ahmedelgabri has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
jsrn has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
ahmedelgabri has joined #ruby-lang
DouweM has quit [Ping timeout: 272 seconds]
jsrn has quit [*.net *.split]
Kabaka has quit [*.net *.split]
x0f_ has quit [*.net *.split]
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
mytrile has quit [Remote host closed the connection]
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
Asher has quit [Quit: Leaving.]
mytrile has joined #ruby-lang
jsrn has joined #ruby-lang
x0f_ has joined #ruby-lang
Kabaka has joined #ruby-lang
francisfish has joined #ruby-lang
rue has quit [Ping timeout: 260 seconds]
|jemc| has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
jsrn has quit [*.net *.split]
x0f_ has quit [*.net *.split]
jsrn has joined #ruby-lang
x0f has joined #ruby-lang
hkon_ has left #ruby-lang [#ruby-lang]
Asher has joined #ruby-lang
ivanskie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rue has quit [Read error: Connection reset by peer]
mucker has joined #ruby-lang
judofyr has quit [Ping timeout: 245 seconds]
relix has joined #ruby-lang
Pupeno_w has quit []
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
marr has joined #ruby-lang
camilleldn has joined #ruby-lang
imjacobclark has joined #ruby-lang
xxaM has quit []
cnivolle has quit [Ping timeout: 265 seconds]
francisfish has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
<whitequark>
zenspider: marked, duh
imjacobclark has quit [Ping timeout: 252 seconds]
camilleldn has quit [Ping timeout: 252 seconds]
<yorickpeterse>
ugh, REXML
rahul_j has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidae has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
cnivolle has joined #ruby-lang
mehlah_ is now known as mehlah
mytrile has quit [Remote host closed the connection]
<ljarvis>
rexmllll
mistym has joined #ruby-lang
Squarepy has joined #ruby-lang
<yorickpeterse>
chokes one some illegal character, annoying to fix ;<
<yorickpeterse>
* :<
<r0bglees0n>
require 'rexml/police'
<darix>
yorickpeterse: if the character is illegal isnt it valid to reject the document?
<yorickpeterse>
Not an option in my case
workmad3 has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
<r0bglees0n>
why don't you use nokogiri?
<yorickpeterse>
because this thing uses REXML?
<yorickpeterse>
I'm not going to rewrite this entire Gem today to use Nokogiri
mistym has quit [Ping timeout: 248 seconds]
<r0bglees0n>
oh i didnt know a gem was involved
phansch has joined #ruby-lang
<r0bglees0n>
rexml is pretty terrible compared to nokogiri
<yorickpeterse>
I'm aware of it's shittyness
<yorickpeterse>
having said that, if there's some Gem that takes XML and shits out a Hash that would be baller
rahul_j has joined #ruby-lang
<yorickpeterse>
right now this crap uses Hash.from_xml() from ActiveSupport
<r0bglees0n>
ah
<r0bglees0n>
and that uses rexml?
<yorickpeterse>
yes
francisfish has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
<r0bglees0n>
i don't think it'd be a huge amount of work to do that implementation in nokogiri but not sure what the hash is suppose to look like
francisfish has joined #ruby-lang
<yorickpeterse>
neither do I, hence I don't want to go down that route
<r0bglees0n>
you could do something terrible like replace the illegal character with a safe character, parse, and then do the replace again. it's terribly flawed because you'd have to walk the whole hash. so not sure how to work around it, maybe rexml can be configured to be silent?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ItSANgo has quit [Quit: Leaving...]
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pupeno_w has quit [Ping timeout: 272 seconds]
jigfox has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
jstewart has joined #ruby-lang
ItSANgo has joined #ruby-lang
Kero has quit [Ping timeout: 260 seconds]
patriciomacadden has joined #ruby-lang
sanjayu has quit [Quit: Lost terminal]
vlad_starkov has joined #ruby-lang
kurko_ has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby-lang
Kero has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
ecnalyr has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
judofyr has joined #ruby-lang
Kero has quit [Ping timeout: 260 seconds]
lfox has joined #ruby-lang
Kero has joined #ruby-lang
brettweavnet has joined #ruby-lang
ecnalyr has quit [Ping timeout: 240 seconds]
judofyr has quit [Ping timeout: 248 seconds]
ahmedelgabri has joined #ruby-lang
ahmedelgabri has quit [Remote host closed the connection]
AdityaRaj has joined #ruby-lang
<AdityaRaj>
hey guys i have spent many many hours today trying to get nokogiri to install my new mac machine.. can anyone please help me out..
rahul_j has quit [Quit: rahul_j]
<yorickpeterse>
what's giving you trouble with it?
<AdityaRaj>
yorickpeterse: it keeps saying libconv missing.. i have gone through the install section of the nokogiri site and followed the steps but still
<yorickpeterse>
What OS?
mistym has joined #ruby-lang
<AdityaRaj>
yorickpeterse: it is a mac.. mountain lion
<gnufied>
two things:
<gnufied>
a. paste the full error log.
<gnufied>
b. which os (you already answered it)
<gnufied>
;D
vlad_starkov has joined #ruby-lang
<yorickpeterse>
AdityaRaj: did you install whatever required dev tools you need? Not familiar with OS X but I believe you need xcode/gcc-installer and crap like that
francisfish has joined #ruby-lang
<AdityaRaj>
yorickpeterse: yes i have installed gcc and xcode etc.. that was when i was trying to install rvm
<gnufied>
AdityaRaj: can you paste make or configure step errors in full?
<AdityaRaj>
but then it says nokogiri requires some higher version of ruby or something
<workmad3>
AdityaRaj: don't point to things in Cellar :(
<ljarvis>
AdityaRaj: those are all confirmed correct paths?
CJD14 has joined #ruby-lang
<AdityaRaj>
ljarvis: it is a client project.. so i have very little choice
<ljarvis>
AdityaRaj: first, make sure your ruby is the rvm one and not system ruby
<AdityaRaj>
workmad3: i think i copied it from nokogiri docs
<ljarvis>
AdityaRaj: right, but most updates were bug fixes
<workmad3>
AdityaRaj: /usr/local/include/libxml2 should be what you want/need
<gnufied>
AdityaRaj: thats why I am saying you are not compiling with right version of ruby
patriciomacadden has quit [Ping timeout: 252 seconds]
<gnufied>
you are running gem install with ruby which comes bundled with osx
<AdityaRaj>
ljarvis: how do i make sure that.. please excuse my lack of knowledge here
<gnufied>
which is now age old
<workmad3>
gnufied: if it's mavericks, then I think the system ruby is 2.0 ;)
<ljarvis>
AdityaRaj: workmad3 is right, brew links stuff into the cellar so you dont need to do it directly so it can be managed properly, most online resources get that wrong, if the nokogiri docs state that please open a bug report and I'll fix it
<gnufied>
workmad3: sadly it is not. he is on ML or something
<AdityaRaj>
workmad3: no it is mountain lion
<ljarvis>
AdityaRaj: `which ruby` returns what?
<workmad3>
pre-10.9 though, it was 1.8.7
<AdityaRaj>
ljarvis: /usr/bin/ruby
<ljarvis>
AdityaRaj: then rvm isn't working or you haven't selected a ruby
<workmad3>
ljarvis: latest version of nokogiri bundles libxml2 and compiles it on install...
kfpratt has joined #ruby-lang
<ljarvis>
workmad3: I know
<ljarvis>
workmad3: he's installing 1.5.4 not 1.6.x
<workmad3>
ljarvis: without specifying a version in the gem install command??
<AdityaRaj>
ljarvis: when i do rvm list i get: =* ree-1.8.7-2012.02 [ missing bin/ruby ]
<whitequark>
not much better? SORM works on request
<darix>
right
<whitequark>
it simply does not have the capacity to siphon all traffic. hell, there isn't even capacity to filter connections by URL (as opposed to IP)
dvxam_ has quit [Ping timeout: 252 seconds]
<whitequark>
same for phone calls/SMS. although, abuse is still rampant.
kurko_ has joined #ruby-lang
<darix>
whitequark: i would still bet that hotspots like e.g. sotschi will have enough capacity
<whitequark>
it's hard to say
CJD14 has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby-lang
dvxam has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
clayreed has quit [Remote host closed the connection]
jtw has joined #ruby-lang
achru has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
naps62 has joined #ruby-lang
clayreed has joined #ruby-lang
havenwood has joined #ruby-lang
anulman has joined #ruby-lang
julweber has quit [Remote host closed the connection]
jsrn has quit [Quit: Leaving]
francisfish has quit [Remote host closed the connection]
mnngfltg has quit [Quit: Ex-Chat]
jeff_r has quit [Remote host closed the connection]
achru has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby-lang
jeff_r has joined #ruby-lang
dagobah has quit [Quit: Leaving...]
senj has quit [Ping timeout: 252 seconds]
mistym has quit [Remote host closed the connection]
clayreed has quit [Remote host closed the connection]
clayreed has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
styped has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
naps62_ has joined #ruby-lang
__butch__ has joined #ruby-lang
naps62 has quit [Ping timeout: 245 seconds]
CaptainJet has joined #ruby-lang
mistym has joined #ruby-lang
judofyr has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<timelord_cout>
havenwood: yeah but in that case you have an assignment to _
<havenwood>
timelord_cout: indeed, and arguable less intention revealing
<havenwood>
splatting the rest
<timelord_cout>
but more backward-compatibilty
<havenwood>
1.8 is dead, long live 2.1!!! \o/
<timelord_cout>
haha, I was thinking of 1.6 :)
<havenwood>
Zombie Rubies back from the dead!
<timelord_cout>
I think Lyle Johnson and I were the last two 1.6 users on the planet
<drbrain>
timelord_cout: haha
dik_dak has joined #ruby-lang
vlad_starkov has joined #ruby-lang
chouhou__ has quit [Ping timeout: 245 seconds]
jeff_r has joined #ruby-lang
ecnalyr has joined #ruby-lang
chouhoulis has joined #ruby-lang
<Mon_Ouie>
crankharder: Because you're using a method that doesn't exist
<crankharder>
Mon_Ouie: I noticed that, refresh the gist
<Mon_Ouie>
(I believe there's a method of the same name in a library called activesupport)
<crankharder>
oh hell.
<crankharder>
ty
fragamus has joined #ruby-lang
momomomomo has joined #ruby-lang
ivanskie has joined #ruby-lang
diegoviola has quit [Read error: Operation timed out]
yfeldblu_ has quit [Remote host closed the connection]
imjacobclark has quit [Remote host closed the connection]
jeff_r has quit [Read error: Connection reset by peer]
kfpratt has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
kfpratt has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
amcoder has quit [Quit: ZZZzzz…]
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
iliketurtles has quit [Excess Flood]
yfeldbl__ has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
kfpratt has quit [Ping timeout: 252 seconds]
serroft has joined #ruby-lang
MichD is now known as michd
yfeldblu_ has quit [Ping timeout: 245 seconds]
solars has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
danijoo_ has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby-lang
danijoo has joined #ruby-lang
DouweM has quit [Ping timeout: 252 seconds]
judofyr has joined #ruby-lang
cnivolle has joined #ruby-lang
loincloth has joined #ruby-lang
mykoweb_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
mykoweb has joined #ruby-lang
judofyr has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby-lang
mykoweb has quit [Ping timeout: 272 seconds]
huma has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
<zzak>
eam: for the record, this keyboard is amazing but i wish the usb hub would also charge my phone
vlad_starkov has quit []
rue|w has quit [Disconnected by services]
rue_ has joined #ruby-lang
<zzak>
yorickpeterse: ^
rue|w has joined #ruby-lang
<whitequark>
I would like my USB hub to make me tea at morning
vlad_starkov has joined #ruby-lang
<zzak>
i mean, its usb why doesnt it charge something
<zzak>
maybe if they made it thunderbolt there would be enough power
<eam>
heh, never tried that
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
jtw has quit []
elia has joined #ruby-lang
dsferreira has joined #ruby-lang
imjacobclark has joined #ruby-lang
<zzak>
also, cant switch back to mac keyboard now :/
<whitequark>
zzak: not enough current. the upstream port only supplies so much
<zzak>
delete key is 1 row up.. :(
skade has quit [Quit: Computer has gone to sleep.]
<zzak>
i make a lot of typos
<whitequark>
afaik the USB spec has rather strict requirements on what would provide how much power
<yorickpeterse>
zzak: you only have 1 USB adapter?
<yorickpeterse>
also yes, once you go cuprubber you never go back
<zzak>
i have 2, but at work my laptop sits far enough away where i dont want to leave my phone over there
<zzak>
so i just dont go to work
<zzak>
thats my current workaround
<zzak>
:trollface:
momomomomo has joined #ruby-lang
<yorickpeterse>
the arrow keys take some getting used to
<zzak>
yeah, it took me about a week of steady use
<zzak>
` and | also
<yorickpeterse>
I'm still getting used to the page up/down ones
<zzak>
whenever i switch back to regular keyboard i forget where ` is
serroft has quit [Quit: Leaving.]
<zzak>
im constantly hitting esc between context switches
<zzak>
i dont use pg up/dn
<yorickpeterse>
So I have a work macbook. the < sits next to the Z
<yorickpeterse>
however
<yorickpeterse>
on Linux it's actually next to the 1
<yorickpeterse>
so it's even more annoying
<zzak>
lol
ahmedelgabri has quit []
imjacobclark has quit [Ping timeout: 252 seconds]
marcofernandez has quit [Quit: 전 이만 갑니다.]
judofyr has joined #ruby-lang
<dsferreira>
Hi. I'm trying to figure out how best design a library where I would like to have an Interface class (class MyLIb). And then I will have several classes (class A, class B, class C, ...). I would like to access at the MyLib.new instance level, instances of A.new, B.new, C.new and make this instances available between each other. What would be the best pattern to achieve this?
DouweM has joined #ruby-lang
<poor_leno>
Anyone know if there are free hosts out there that provide free hosting for educational initiatives?
<poor_leno>
Like if I want to host a site that teaches how to program XYZ
serroft has joined #ruby-lang
imjacobclark has joined #ruby-lang
<poor_leno>
nvm i could just use heroku
<yorickpeterse>
poor_leno: github pages
judofyr has quit [Ping timeout: 265 seconds]
mehlah has joined #ruby-lang
<poor_leno>
thanks yorickpeterse
brooks has joined #ruby-lang
brooks has quit [Remote host closed the connection]
brooks has joined #ruby-lang
AdityaRaj has joined #ruby-lang
yfeldbl__ has quit [Read error: Connection reset by peer]
<AdityaRaj>
hey guys i am trying to install ruby-oci gem on mountain lion.. i have gone through several links online and have setup oracle instant libs etc but still i am having errors
Lewix has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
postmodern has quit [Quit: Leaving]
simoz7 has joined #ruby-lang
achru has joined #ruby-lang
cnivolle has joined #ruby-lang
diegoviola has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby-lang
deception has quit [Quit: Goodbye]
x0f_ has joined #ruby-lang
heftig has joined #ruby-lang
x0f has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby-lang
judofyr has joined #ruby-lang
amerine_ has joined #ruby-lang
amcoder has joined #ruby-lang
charliesome has joined #ruby-lang
amerine has quit [Ping timeout: 245 seconds]
judofyr has quit [Ping timeout: 252 seconds]
achru has quit []
amcoder has quit [Quit: ZZZzzz…]
tsou has quit [Quit: brb]
amerine_ has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby-lang
amerine has joined #ruby-lang
<Authenticator>
Do Ruby threads get replicated into the new processes by a fork? I can only seem to wait for threads in the process they were created in.
<whitequark>
no, they're all killed before forking
<whitequark>
well, right after forking in the child process, semantically.
<Authenticator>
Is there a writeup about the issue? Or is that the only real "gotcha"?
centrx has joined #ruby-lang
<charliesome>
whitequark: i believe ruby threads are copied through to new processes
<yorickpeterse>
here's what I need to do for a passport:
<yorickpeterse>
1) go to city council 2) pay 40 Euros 3) wait 2 weeks
<yorickpeterse>
previously there was an extra step where they had to take fingerprints
<yorickpeterse>
which is luckily no longer needed
<ljarvis>
iwant google fibre
mrevd1 has joined #ruby-lang
* yorickpeterse
has fibre
<ljarvis>
cereal does not count
<yorickpeterse>
in fact, this entire town has fibre
<whitequark>
it's not significantly more complicated, but I had to go to the office like ten times AND it's in such a horrible distant shithole I'd rather not do it even once
mrevd1 has quit [Read error: Connection reset by peer]
<naquad>
ljarvis, ... whole page... that means parse page, figure out its resource dependencies, javascripts, stylesheets, images, @imports and download it all
<ljarvis>
no
<ljarvis>
'whole page' to me means the markup
<ljarvis>
anyway
<ljarvis>
you want to scrape everything
<ljarvis>
just use wget
<naquad>
doesn't fit in my scenario
<ljarvis>
okay
simoz8 has joined #ruby-lang
<yorickpeterse>
Open a browser and save the page :D
* yorickpeterse
runs
phansch has quit [Quit: Leaving]
<ljarvis>
yorickpeterse: that doesn't fit my scenario
coca_rails has quit [Remote host closed the connection]
phracker has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 272 seconds]
coca_rails has joined #ruby-lang
charliesome has joined #ruby-lang
fijimunkii has quit [Ping timeout: 240 seconds]
smashwilson has quit [Quit: Leaving]
threeifbywhiskey has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
brettweavnet has quit [Quit: Bye]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
ugh, String#scrub is weird
havenwood has quit [Read error: Connection reset by peer]
<yorickpeterse>
with no argument it replaces stuff with some bogus Unicode thing
tedstriker has joined #ruby-lang
<yorickpeterse>
plus when you give it a block it acts completely different in terms of replacing things compared to when just giving it a string
threeifbywhiskey has quit [Quit: Leaving.]
havenwood has joined #ruby-lang
<yorickpeterse>
e.g. with a string it replaces individual sequences, with a block it replaces an entire group at once (so "foo[invalid char][invalid char]" becomes "foo[replacement]" opposed to "foo[replacement][replacement]")
<threeifbywhiskey>
I'm looking to add a few more programs to this collection, and Fibonacci seems like a reasonable target.
<threeifbywhiskey>
But I need a Float to get a 0.5 to take the square root of 5. :)
<centrx>
Seems unlikely...
<threeifbywhiskey>
Yeah, there aren't any in the default global variables.
vlad_starkov has joined #ruby-lang
<threeifbywhiskey>
I was going to take the iterative approach by pushing into an array, but $* can only take Strings that exist as files. :/
bjh13 has quit [Quit: leaving]
<serroft>
some_num = some_num * 0.0
<threeifbywhiskey>
0 is numeric.
<serroft>
0.0 will turn some_num into float
yfeldblu_ has quit [Remote host closed the connection]
<threeifbywhiskey>
Yes, I know, but I want a Float without using any letters or numbers.
<serroft>
implicit casting
yfeldblum has joined #ruby-lang
<serroft>
oh no numbers
<serroft>
lol
<threeifbywhiskey>
Right. :)
<threeifbywhiskey>
I mean, it's really easy to get numbers, since $$ / $$ is always 1, but Floats are much trickier, and probably not feasible.
havenwood has joined #ruby-lang
JEG2 has joined #ruby-lang
<threeifbywhiskey>
Hi, James.
<JEG2>
zenspider: What needs encoding??? :)
<JEG2>
threeifbywhiskey: Hello.
relix has joined #ruby-lang
<threeifbywhiskey>
JEG2: Do you know if it's possible to acquire a Float without using any alphanumeric characters?
<zenspider>
OH THANK gOD. Please put on your wizard hat and robe
<threeifbywhiskey>
I realize it's a little silly, but I'm scratching an itch.
<zenspider>
threeifbywhiskey: back off. he's mine
<threeifbywhiskey>
zenspider: Fair enough.
* JEG2
laughs
<zenspider>
JEG2: ok. ruby_parser. I'm down to 30 failed files out of ~850k
<zenspider>
almost all of that is encodings bullshit
Squarepy has quit [Quit: Leaving]
<zenspider>
specifically, currently ruby_parser reads in a file, looks for an encodings magic comment, validates the encoding on the string, and then re-encodes to utf8
<JEG2>
I believe you.
<zenspider>
all my source specifies utf8
<zenspider>
the problem is that some code can't re-encode to utf8
<zenspider>
SOME crazy code actually specify ascii-8bit
<JEG2>
Interesting.
<zenspider>
because they do crazy shit like binary/blob strings ... like compressed PDF headers and the like
<zenspider>
instead of... you know... reading that in or the uncompressed source or...
symm- has joined #ruby-lang
* JEG2
nods
<zenspider>
the problem falls down mainly on one regexp that matches identifier chars
<JEG2>
I think I understand.
centrx has quit [Quit: Leaving]
<zenspider>
currently: /[\w\u0080-\u{10ffff}]/u
<JEG2>
threeifbywhiskey: I can't think of a way to do it without alphanumerics. Sorry.
<whitequark>
zenspider: fyi: I solved the problem by not reencoding BINARY to UTF_8
serroft has quit [Quit: Leaving.]
<zenspider>
the fact that ruby_parser assumes that utf-8 will "just work" in all cases is false, so I'm trying to flip the lexer source over to ascii-8bit
<whitequark>
this still leaves the code which doesn't specify utf-8 but has invalid characters in comments, which I don't handle at all (about 180 gems)
<zenspider>
but then I can't specify that regexp because regexps don't have encoding setters and fall down all over the place. terrible API
<zenspider>
and that's gotten me over my hump... but I have to assume that everyone who uses this lexer is gonna die (or kill me) when it flips from utf8 to binary
tedstriker has quit [Ping timeout: 245 seconds]
<JEG2>
Is that a regex to match UTF-8???
<zenspider>
yeah
<zenspider>
whitequark: you're also parsing your codepoints, not lexing, right? that's the part where your code lost me
<JEG2>
Wild. I have a non-regex script I use.
<whitequark>
zenspider: I'm lexing and parsing codepoints.
<zenspider>
I'm sorta stuck with regexps because ruby_parser uses stringscanner for lexing
<whitequark>
I convert all the code to either ASCII-8BIT or UTF-8 before lexing
<whitequark>
and the identifier regexp is defined as, roughly, [A-Za-z0-9\u80-\u10ffff]
<whitequark>
well, its ragel equivalent
<zenspider>
JEG2 / whitequark: I'm assuming my pessimism about my change is 1) horrible 2) gonna fail. I'd like something that works w/o having to port ruby 1.8 strings to a C extension
<zenspider>
it's the "ragel equivalent" that trips me up. I'm stuck with ruby regexps being applied against ruby strings... when the encodings don't match, ruby pukes on me
<whitequark>
zenspider: that utf-8 regexp will work, I believe.
tsou has joined #ruby-lang
<zenspider>
I'm not an encodings wiz... but I don't think I'm missing anything on that part
<whitequark>
but here's the catch, what do you do with non-utf8 encodings which are also not binary?
<whitequark>
shift-jis for example.
<zenspider>
I'm not sure how to do a mix of utf-8 for 99% of the cases out there but still have the code work when I can't re-encode and leave it binary
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<JEG2>
zenspider: OK, so I think I want to understand the core problem a bit more. So before, you tried to find and encoding comment, but if you couldn't you assumed UTF-8? And that didn't work, because of some crazy code in the wild?
<zenspider>
in the case where there isn't an encoding comment, I try various encodings based on numbers I gathered analyzing 850k files. First one wins. Then I re-encode to utf8
jstewart has quit [Quit: Leaving.]
<zenspider>
but some of them are ascii-8bit (and some even specify that)
coca_rails has quit [Remote host closed the connection]
<zenspider>
whitequark: I haven't run across any shift-jis files that gave me problems... so I'm assuming that they do re-encode to utf-8, no?
<whitequark>
zenspider: it depends on how do you intend to use that regexp. let me rephrase the problem a bit.
<zenspider>
I'd prefer to stick to utf8 for lexing. not sure what to do for the cases where it can't be. I don't want to have 2 lexers. I don't even want 2 rules for that matter, but if I have to do that I can live with it
<whitequark>
ruby accepts as identifier characters certain characters in 0x0-0x7f range *and* the 0x80-∞ range
<JEG2>
Oh. I think I see. And you can't parse them in the native encoding? That's what I did with CSV. I transcode the parse to the desired encoding, then parse. Is that not an option?
<zenspider>
it's an option for 99.995+% of the files I've come across :)
<whitequark>
but, different encodings have different code units for 0x80-∞ range. ascii-8bit is 0x80-0xff. utf-8 is 0x80-0x1ffff. shift-jis is something else
<zenspider>
but ascii-8bit doesn't translate to utf-8
<whitequark>
in ragel, I deal with this by defining "ident_high = any - 0x0..0x80"
<whitequark>
(yeah, cheating)
<whitequark>
so you need an equivalent for this for your lexer.
<whitequark>
here's things which won't work:
<zenspider>
I was thinking about cheating and just using my 1.8 definition [\w\x80-\xff]
<whitequark>
actually, scratch that
<zenspider>
and letting context deal with the rest.
<whitequark>
one thing that will work is using utf-8 and [\u80-\u10ffff], and another for binary [\x80-\xff]
skade has quit [Quit: Computer has gone to sleep.]
apeiros has quit [Remote host closed the connection]
skade has joined #ruby-lang
apeiros has joined #ruby-lang
<whitequark>
your 1.8 definition will work if you always treat the source as binary, but then you'd force that binary over to your clients
<zenspider>
JEG2: can you think of a unified strategy that makes sense? flipping this whole thing over to binary seems like I'd need to roll out 4.0
<whitequark>
I've considered that option for parser and it sucks
<whitequark>
it's as good as just not handling 0x80-0xff, because they're essentially useless for clients
skade has quit [Client Quit]
<JEG2>
Dinner time here. Let me think on it a bit and see if I have a good idea. Not very hopeful though.
<JEG2>
Back in a bit…
<zenspider>
JEG2: thanks. appreciate your time
<zenspider>
whitequark: I don't think mixing and matching will work.
jeff_r has joined #ruby-lang
nathanstitt has joined #ruby-lang
<zenspider>
I still have my lexer file that specicifies that it is utf-8
<whitequark>
zenspider: why? it's the only place where ruby ever mentions non-ascii characters
<zenspider>
therefore ALL the regexps will blow up when trying to match against a binary encoded string
<eval-in>
whitequark => /tmp/execpad-fd93b47012d5/source-fd93b47012d5:2: warning: regexp match /.../n against to UTF-8 string ... (https://eval.in/94494)
<whitequark>
hrm
coca_rails has joined #ruby-lang
<whitequark>
it still works though. need to figure out why the warning arises.
<zenspider>
I hate this so much
<whitequark>
word
mykoweb has quit [Remote host closed the connection]
<zenspider>
I'm considering converting the lexer to C, but then I'd hate my life
<zenspider>
that or porting ruby 1.8's string class to CString