<erikh>
reddit thanks for reminding me SO QUICKLY why I don't read you
<erikh>
deryldoucette: I don't typically, but I don't mind doing that. one minute.
<deryldoucette>
erikh: thank you
<erikh>
whiskey in the .jar-o
<deryldoucette>
it *might* take a LOT longer than that, thats the issue i'm currently tracking. can't figure out the issue, so the more i get, hopefully the more it points to a *serious* fuckup on my machine.
<erikh>
I'm on a pretty fast machine here
<deryldoucette>
mpapis, remear, headius, and yellow5 are workin on it too
<erikh>
but you're probably right.
<erikh>
what are you seeing?
<erikh>
... should I do this in a vm?
<deryldoucette>
yeah me too. 2.3GHz quad-core with 8GB RAM and STILL seeing > 2h docs build times with 1 out of 3 builds needing a kill -9
<erikh>
ah
<deryldoucette>
yeah just for your own machine's sanity heheh
<erikh>
did you install the latest rdoc before you ran it?
<deryldoucette>
yeah
<erikh>
rdoc 3.x is a *lot* faster.
<deryldoucette>
oh 3.x??
<deryldoucette>
hold on
<erikh>
drbrain: ^5 to that btw
<deryldoucette>
yeah rdoc 3.12
<erikh>
throwing this in the mix just to be certain; gem install rdoc
G-REY has joined #ruby-lang
<erikh>
ok
<deryldoucette>
ooo ooo
<erikh>
deryldoucette: are you on a mac?
<deryldoucette>
dude, java -version please?
<deryldoucette>
yeah
<deryldoucette>
2011 mbp
<erikh>
hit ^T while the docs are building
<erikh>
it might help you.
<erikh>
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
<deryldoucette>
I'll have to kick that to you. idk java and oits commands very well. load: 2.69 cmd: java 40670 waiting 94.63u 3.01s
<erikh>
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
<deryldoucette>
yeah i JUST went to 1.7
<deryldoucette>
but thats what i WAS at and was getting 2h+ doc buidls
<erikh>
it's waiting
<deryldoucette>
and having to kill the task
<erikh>
hrm
<deryldoucette>
ok now THAT was wierd
<erikh>
I remember seeing this before with rdoc, but I don't remember when
<deryldoucette>
sec
<deryldoucette>
I'm running: rvm install jruby --1.9 && rvm use jruby && rvm docs generate all
<erikh>
is it during ri or rdoc generation
<deryldoucette>
the FIRST build after i upgraded java took like 20s
<deryldoucette>
bit THIS build (#2) is taking freakin forever
G-REY has quit [#ruby-lang]
gokul has joined #ruby-lang
<erikh>
just finished
<deryldoucette>
goddamn it
<deryldoucette>
wtf is going on??
<erikh>
I can time it if you'd like
<deryldoucette>
please?
<erikh>
want me to upgrade java?
<deryldoucette>
can you do one with each?
<erikh>
sure
<deryldoucette>
i'm really starting to think its rdoc and not rvm OR jruby
<erikh>
bbiam, going to smoke
<deryldoucette>
np :) mee too
<erikh>
well, i'm on a SSD here
<deryldoucette>
SATA here but it shouldn't be a 2 freakin hour build either way
<erikh>
on an 8 core (after hyperthreading) i7 with about 6G of ram free.
<deryldoucette>
gotta do the friggin radio button crapola to get it
<deryldoucette>
for the license agreement
<erikh>
yep
<erikh>
standard oracle.
<erikh>
I plan on doing some clojure shit soon anyhow so this'll probably be a good thing
<shevy>
where is the enthusiasm!!!
<erikh>
deryldoucette: have you tried on linux?
<deryldoucette>
lol
<deryldoucette>
erikh: no
<erikh>
also what jruby? I was installing 1.6.6
<deryldoucette>
thats next if this proves to be an issue
<deryldoucette>
well an issue for java not just mac
<deryldoucette>
1.6.7 in 1.9 mode
<erikh>
ok
<erikh>
after I get 7 installed, I'll rvm get stable after the first run
<deryldoucette>
yeah thats what i am on
<deryldoucette>
1.6.7 in 1.9 mode. if you get a build that completes fast, do another one immediately
kp666 has joined #ruby-lang
<deryldoucette>
for count in {1,2,3,4,5}; do 'rvm reinstall jruby && rvm use jruby && rvm docs generate all'; done
<erikh>
god damnit
<deryldoucette>
see if any of those take friggin nightmarishly long
<erikh>
did oracle install this in /opt or something retarded?
<deryldoucette>
no you have to click on the pkg
<erikh>
I did.
<erikh>
I installed it.
<deryldoucette>
installs to /usr/bin
<deryldoucette>
∴ which java
<deryldoucette>
/usr/bin/java
<shevy>
you sound happy
<deryldoucette>
bit you do have to go under Utilities and then drag the jdk 1.7 to the TOP of the list
<deryldoucette>
then open a new terminal and then: java -version
<erikh>
right
<deryldoucette>
java version "1.7.0_04-ea"
<deryldoucette>
Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b15)
<deryldoucette>
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b16, mixed mode)
<erikh>
oh
<erikh>
I see
<deryldoucette>
shevy: i'm always happy when I got a bug like this to sink my teeth into :)
<deryldoucette>
aggravating to hell and back but OH so much fun! :)
<deryldoucette>
means i'm not totally nuts :)
<deryldoucette>
close to it, but not all the way there yet. :-)
<shevy>
damn you are one happy code monkey, I would have already picked up a bat and would have crushed things in my surroundings!
wshaddix has joined #ruby-lang
<deryldoucette>
hehehe i was close earlier :)
<erikh>
ok, 1.6.6 with java 7 running
<deryldoucette>
i stepped away and said I'll be damned if a piece of digital CRAP gets the best of ME :)
<erikh>
hey
<erikh>
I spew digital crap in here all the time
<erikh>
I take offense tot hat
<deryldoucette>
lol
<deryldoucette>
and for the record... THIS crap is why I don't code in java!
<erikh>
java's a fine system
<erikh>
if you walked away from every platform because of a few bugs, you'll find yourself with nothing to work on eventually
<deryldoucette>
it might be, but these kinds of issues just blow my friggin mind
<erikh>
( rvm reinstall jruby --1.9 && rvm use jruby && gem install rdoc && rvm docs ) 248.24s user 26.33s system 164% cpu 2:46.60 total
<erikh>
that's with jruby 1.6.6 and java 7
<erikh>
Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b15)
<deryldoucette>
wtf
<erikh>
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b16, mixed mode)
<erikh>
one sec
<erikh>
gonna upgrade rvm
<deryldoucette>
and with 1.7?
<deryldoucette>
ok
<deryldoucette>
yeah rvm get head && rvm get stable && rvm reload
<erikh>
fwiw I'm running 1.10.2 atm
<erikh>
I'm not 'getting head'
<deryldoucette>
then reinstall jruby to build against 1.7 and then rerun the rvm docs generate all
<deryldoucette>
lol
<erikh>
I've throttled more workstations getting the head of rvm than anything else lately.
<deryldoucette>
no no
<deryldoucette>
rvm get head && rvm get stable
<erikh>
right
<deryldoucette>
that will back you down to stable
<erikh>
I'll just get stable :)
<erikh>
1.10.3 now
<deryldoucette>
ok
<erikh>
running 1.6.7 install now
<deryldoucette>
oh did you do rvm instal jruby --1.9 ?
<deryldoucette>
trying to find out if its a 1.9 mode issue or *java* itself
<erikh>
sure
<erikh>
that's why I'm helping by bisecting
<erikh>
if this works great, it's probably your machine :)
<erikh>
so load average is much higher now
<deryldoucette>
yeah thats what I'm praying it is
<erikh>
noticablyy so
<deryldoucette>
thats FAR easier to explain
Nisstyre has joined #ruby-lang
<erikh>
dtruss looks interesting
<erikh>
I think I might have found it
<erikh>
looks like some threading shiz
<deryldoucette>
ooooo
<erikh>
yeah this is all memory barrier code
<deryldoucette>
do tell! :)
<erikh>
*probably* thread-related
<erikh>
it's just looping
Tearan has joined #ruby-lang
<erikh>
nothing exciting, but busy looping
<deryldoucette>
can ya gist for me? (preface it with probably or potentially statements. I might have to show headius)
<erikh>
yeah
<erikh>
oh nevermind it just started going
<erikh>
maybe it was just cpu time?
<erikh>
here, let me tee some of this and then I'll gist it
<deryldoucette>
ok
<erikh>
this is definitely taking a lot longer though
<erikh>
I'll go have a smoke, and it's probably too big for a gist but I'll put it somewhere you guys can get it.
<deryldoucette>
wooT!
<deryldoucette>
at least you're getting closer to where I'm sitting
<erikh>
it may not be useful
<deryldoucette>
yeah i need one too, plus a beeer
<deryldoucette>
erikh: seriously, i'd rather this come out that I'm jsut a dumb ass and did somethign stupid than it being an actual issue
<deryldoucette>
so whatever it takes on your end to figure out if tis just a freaky thing or something real, I'm willing to sit tight for
<erikh>
no, it's definitely looking like something is taking way too long in the CPU department
<erikh>
it calls mprotect a billion times for about 2 minutes straight, then it writes out a file
<deryldoucette>
cool, then i might not have to put away the weed and the beer and become celibate :)
<WillMars_>
If I have a large hash, and I have an array of keys that are in that hash - what would be the most elegant way of getting the subset of my hash that corresponds to my array of keys?
<erikh>
deryldoucette: anyhow, smoke now, gzip -> server in a few minutes.
<erikh>
I'll get you a link when I've done that.
<deryldoucette>
erikh: rockin! :)
<WillMars_>
I can do it with some clunky iterators, but I'm hoping for something pretty
<deryldoucette>
do i have you permission to pass this on to headius?
<erikh>
yep, this isn't java 7 at all
<erikh>
explains the lsof output
<erikh>
yes
<erikh>
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
<erikh>
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
<erikh>
that's what hit it
<erikh>
on rvm 1.10.3
<deryldoucette>
ok lemme do some email magic real quick
<erikh>
remember, 1.10.2 and 1.6.6 in 1.9 mode worked fine
<erikh>
on that build of java
<deryldoucette>
and the fact its 1.6 is fine. thats what originally caused me grief
<deryldoucette>
ok
<deryldoucette>
i'll make sure to point that out
<erikh>
notice that I'm still on java 6 up there
<deryldoucette>
yeah i did
<erikh>
lsof will confirm that.
<erikh>
ok
<deryldoucette>
i had initial success with 1.7, it was with the next set of builds that it acted like it did with 1.6
<erikh>
anyhow, HTH, and i'll be around for another hour or two if headius wants to drop in and chat some more
<deryldoucette>
which you're showing as well.
<deryldoucette>
got ya. he's been quiet since i last tweeted him so he might hav ehit the rack. idk
<erikh>
I doubt I can do anything else to help, he's the java whiz
<deryldoucette>
yeah he's FAR ahead of me.
<erikh>
well that guy (judging from his feed) goes to like 800 conferences a year
<deryldoucette>
heheh
<erikh>
so I imagine he has his fair share of sleep woes
<deryldoucette>
yeah generally when he tells me i'm off in lala land i tend to listen :)
<erikh>
he's good people
<shevy>
wat
pankajdoharey has joined #ruby-lang
<erikh>
anyhow, let me know if you need anything else from me
<shevy>
sex!
<erikh>
I'm pretty sure I've got a repro ready to fire if you need it.
<deryldoucette>
not a problem. thanks for delving in as far as you have. greatly appreciated
Joeysomo has joined #ruby-lang
headius has joined #ruby-lang
pankajdoharey has quit [#ruby-lang]
<deryldoucette>
he tweeted back. think he's joining here
<deryldoucette>
headius: not sure if you've been monitoring or not
<headius>
:)
<headius>
no
<deryldoucette>
hehe
<erikh>
I just profiled it with dtruss and dumped lsof on it
<headius>
watching DS9 and drinking one of enebo's homebrews
<deryldoucette>
i'm not at your level, but i've been asking others to look into it as well. erikh took the time to go through it for me on his end. would you be willing to see the gz and the gist?
<headius>
sure
<deryldoucette>
love that damned show! :)
<headius>
sounds like something's just busted
<headius>
yeah, I never watch DS9 when it was on
<headius>
watched
<headius>
so finally starting it on netflix
<deryldoucette>
yeah but i'm not sure where. i was thinking it was rdoc but now i'm thoroughly confused
<headius>
well one thought that occurs is that it's hitting the default memory cap
<erikh>
it seems to be related to 1.10.3 rvm or 1.6.7 jruby. tried with other combinations
<headius>
that can often cause it to perform extremely slowly, if if finishes at all
<erikh>
it was doing a lot of memory barrier work in the dtruss
<deryldoucette>
for a bit of background, both of us hav edone this on 1.6, and i did it on 1.7 BUT i've had several folks tell me on twitter they get the docs built and done in 8m or less
<deryldoucette>
so not sure where to go to debug this at this point. this is well beyond my personal pay greade :)
<deryldoucette>
err grade
<erikh>
hollensbe.org/dtruss-1.6.7.log.gz
<erikh>
maybe it helps!
<deryldoucette>
headius: one thing i did notice... the FIRST execution under both 1.6 AND 1.6 finished in record time. like < 2m. but subsequent executions .. WOW what a difference
<deryldoucette>
mine's still hung even with the export
<headius>
ok
<headius>
get a thread dump
<headius>
ctrl+\
<headius>
then a memory histogram
<deryldoucette>
^\/Users/me/.rvm/scripts/docs: line 63: 41271 Quit: 3 ( builtin cd "${rvm_src_path}/$rvm_docs_ruby_string/"; rvm_log "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."; rvm_log "( Errors will be logged to ${rvm_log_path}/$rvm_docs_ruby_string/docs.log )"; rdoc -a --ri-site > /dev/null 2>> ${rvm_log_path}/$rvm_docs_ruby_string/docs.log )
<mikkelb>
deryldoucette should go away and never come back
* devn
snickers
<erikh>
zenspider: you around?
<erikh>
deryldoucette: that's what I used to make ctrl+\
<erikh>
work
<mikkelb>
erikh: you haven't seen him outside.. oh i see
<mikkelb>
he's your "personal friend"
<mikkelb>
well alright then
<shevy>
what friend
<deryldoucette>
mikkelb: and muzone no, you guys make effort, use your grey matter and actually put effort into what you're doing I leave you alone. Like this here, I KNOW i'm not ANYWHERE near as good or capable as headius or erikh but you see me putting in every single bit of effort I can into this. I'll GLADLY be told I am being an idiot in this by headius. Why? because I put EFFORT in. I took MY time to chase down a problem whether of my own making ...
<deryldoucette>
... or of the project's that I work on. you guys do that in there instead expecting a friggin handout all the time, and you'll get the SAME level of treatment.
<erikh>
jesus
<deryldoucette>
now leave it alone and let us work
<headius>
I'd say to try master
dr0id has joined #ruby-lang
<shevy>
knife fight!
<erikh>
headius: I'll give it a shot
<mikkelb>
say what?
<shevy>
what
<headius>
if you can reduce this, it would be great, but master's going to be JRuby 1.7 preview or RC for JRubyConf in May
<mikkelb>
deryldoucette: nobody's interested in reading that shit
<deryldoucette>
erikh: sorry. you are right
<devn>
headius: You replied to me on Twitter like I was party to the JVM biggotry, was that a CC or were you under the impression I agreed with dude who posts messages on Twitter?
<headius>
this only happens in 1.9 mode too, right?
<deryldoucette>
headius: right
<headius>
yah
<headius>
pretty sure it's a regexp/encoding bug, and it's almost certainly fixed on master
<headius>
there have been multiple similar hangs
<devn>
hm
<erikh>
ok, building -head now
<devn>
+=1
<headius>
we fixed a bunch for 1.6.7, but there's a ton more work on master
beawesomeinstead has joined #ruby-lang
<erikh>
gonna step away for 5 minutes.
<deryldoucette>
ahh yeah i did the rvm get jruby --1.9 for the install
<deryldoucette>
that pulls the head iiirc
<devn>
deryldoucette: what os? vers of rvm?
<deryldoucette>
lemme look at rvm_path/config/db
<headius>
I don't think that will do head without jruby-head
<headius>
in any case, master should say 1.7.0-dev
<headius>
or 1.7.0.dev
<devn>
headius: yeah you're right
<deryldoucette>
headius: you're right. it pulls 1.6.7 tag
<deryldoucette>
headius: you want me to pull head?
<devn>
is that a euphemism?
<headius>
yes
<headius>
heh
<deryldoucette>
ok sec
<headius>
I always snicker when I say "rvm get head"
<deryldoucette>
hehe me too
<deryldoucette>
wayne and i have a running commentary on that <snicker>
<devn>
i had to explain to a group of 25-30 year olds that "you needed to rvm get head"
mrb_bk has joined #ruby-lang
<deryldoucette>
headius: on -head do i hav eto throw in the --1.9 or is that default now?
<headius>
head is 1.9 by default
<devn>
i dont think you need the --1.9
<deryldoucette>
ok
dominikh has joined #ruby-lang
<devn>
heh i forget headius is in here
<headius>
not for much longer :)
<deryldoucette>
doh!
<devn>
"i think that......."
<devn>
< headius> this is how you do it
<headius>
I'm pretty confident this is encoding+regexp, which means it will work on master
<devn>
"this might be how you do it"
<deryldoucette>
headius: cool
<headius>
which means I can go back to beer and DS9
<deryldoucette>
@ant cext
<deryldoucette>
err s/@/#/
<devn>
headius: what's up with the jvm biggotry?
<deryldoucette>
headius: sorry to pull you in. this was just a bit.. odd
<headius>
I've had to deal with it for 6 years, but it has improved
<headius>
I can't really blame people for hating oracle...they're easy to hate
<deryldoucette>
its on the default gemsets
<devn>
headius: yeah, it's weird. these communities that claim to be all love and art
krzyhoo has joined #ruby-lang
<devn>
they are filled with rage against the things they don't particularly find beautiful
<devn>
it's supreme irony
<devn>
not "they" -- many, many aren't
<headius>
I'm a rubinius fan too, but it's frustrating sometimes...like people like it solely because they don't want to like jruby
<headius>
anyway...nothing new :)
<shevy>
hehe
<deryldoucette>
ok running rvm docs generate all now
<erikh>
hrm
<erikh>
-head still looks like it's failing
<deryldoucette>
yeah same
<erikh>
let me see if I can get the thread dump
<headius>
then we would need to escalate this
<devn>
headius: *nod*, but i feel it's getting to a point where it's *obvious*
<devn>
bytecode optimization, rbx, maglev, yarv
<devn>
there
<shevy>
devn I love beauty! and ugliness makes me angry, I can't help it :(
<devn>
there's not really a competitor against the jvm
<headius>
I'm going to try to do a good survey of ruby VMs at rubyconf india
<devn>
in terms of tooling, support, extension, etc.
<shevy>
I would not mind a programming language that would be like prosa or poetry
<shevy>
or even better
<shevy>
to write ONLY documentation and have things run from that
<shevy>
but I guess there would be so many rules to follow that it would be no fun :(
<workmad3>
I came across a system that would let you do that sort of thing once
<workmad3>
it basically swapped around the 'normal' process of write code with doc comments that get extracted to write docs with code comments that get extracted
<burgestrand>
Sounds similar to literate-styled programming.
<burgestrand>
It’d be like writing a markdown document, only all code blocks is what the code actually consist of.
virunga has joined #ruby-lang
<shevy>
hmm
<shevy>
I like markdown so far
<workmad3>
burgestrand: that's the one, literate programming
<lianj>
andrewvos: and how would you easily get the contents in this case then?
wallerdev has joined #ruby-lang
<andrewvos>
lianj: Well, it seems like the problem is actually that he/she is using regex on html.
malev has joined #ruby-lang
<andrewvos>
lianj: Hence the array of evil
<beiter>
actually i parse an html file with hpricot
<lianj>
for something small and dirty, regex can work fine. but yea, im a huge fan of nokogiri for anything xml too
slyphon has joined #ruby-lang
sbabiy_ has joined #ruby-lang
slyphon_ has joined #ruby-lang
<beiter>
just another question, what is a good data structure to represent a homepage navigation
Austin__ has joined #ruby-lang
tomzx has joined #ruby-lang
QoQOoO has joined #ruby-lang
<canton7>
beiter, personally I've found an ordered flat list, with each element assigned an indent, works very well
Indian has joined #ruby-lang
krz has joined #ruby-lang
ankurgel has joined #ruby-lang
mssola has joined #ruby-lang
igaiga has joined #ruby-lang
Arsen7 has joined #ruby-lang
aroop has joined #ruby-lang
jxie has joined #ruby-lang
mistym has joined #ruby-lang
workmad3 has joined #ruby-lang
Hensley has joined #ruby-lang
dous has joined #ruby-lang
joast has joined #ruby-lang
wmoxam has joined #ruby-lang
Nowaker has joined #ruby-lang
Tukeke has joined #ruby-lang
<ankurgel>
Sorting words in a string by increasing order of their(word's) length. Made http://ideone.com/mIQJ3 . Please to suggest some improvements I can make there.
<apeiros_>
ankurgel: Hash.new --> {}
<apeiros_>
other than that - string.split.uniq.sort_by { |word| word.length }
<apeiros_>
you may also not be happy with using just split(), as e.g. punctuation will then be part of a word
<apeiros_>
you may also want to use downcase before scanning, or even Unicode.downcase.
<apeiros_>
you can also use a different quantifier than +, if you want to enforce minimal word length
<ankurgel>
apeiros_: Oh! I didn't need hash there!
<ankurgel>
Thanks, apeiros_ ! Trying that out in my irb. :)
<apeiros_>
so my final solution would be: require 'unicode'; Unicode.downcase(string).scan(/\b\p{Word}+\b/).uniq.sort_by { |word| word.length }
<apeiros_>
(requires the unicode gem)
<ankurgel>
also, quick question. Which method I can use to generate random number from a given array?
<apeiros_>
see Array#sample
<ankurgel>
ok
ezkl has joined #ruby-lang
<ankurgel>
worked!
dv310p3r has joined #ruby-lang
pw_ has joined #ruby-lang
Joeysomo has joined #ruby-lang
S2kx has joined #ruby-lang
Joeysomo has joined #ruby-lang
slyphon has joined #ruby-lang
rippa has joined #ruby-lang
cdnz has joined #ruby-lang
<workmad3>
apeiros_: or, on 1.9, .sort_by(&:length) (which I think makes it more readable :) )
stef_204 has joined #ruby-lang
Skif has joined #ruby-lang
rolfb has joined #ruby-lang
ezkl has joined #ruby-lang
Tukeke has quit ["
ascarter has joined #ruby-lang
scampbell has joined #ruby-lang
achiu has joined #ruby-lang
dhruvasagar has joined #ruby-lang
dejongge has joined #ruby-lang
riffraff has joined #ruby-lang
divins_ has joined #ruby-lang
headius has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
matti has joined #ruby-lang
heppy has joined #ruby-lang
wyhaines has joined #ruby-lang
shtirlic has joined #ruby-lang
SuperTaz_work has joined #ruby-lang
gnufied1 has joined #ruby-lang
wyhaines has joined #ruby-lang
m3nd3s has joined #ruby-lang
bryancp has joined #ruby-lang
sbabiy has joined #ruby-lang
zmack has joined #ruby-lang
butchanton has joined #ruby-lang
lsegal has joined #ruby-lang
Teddy2steper has joined #ruby-lang
rdavila has joined #ruby-lang
H2H has joined #ruby-lang
srbaker has joined #ruby-lang
achiu has joined #ruby-lang
adambeynon has joined #ruby-lang
RickHull has joined #ruby-lang
RickHull has joined #ruby-lang
dfr|mac has joined #ruby-lang
heppy has joined #ruby-lang
Fullmoon has joined #ruby-lang
burns180 has joined #ruby-lang
io_syl has joined #ruby-lang
heppy_ has joined #ruby-lang
flak has joined #ruby-lang
Tearan has joined #ruby-lang
spinagon has joined #ruby-lang
bryancp has joined #ruby-lang
gnufied has joined #ruby-lang
gnufied has joined #ruby-lang
Nisstyre has joined #ruby-lang
dfr|mac_ has joined #ruby-lang
phlipper has joined #ruby-lang
<shevy>
cool
<shevy>
never saw Unicode before
<matti>
LOL
pbjorklund has joined #ruby-lang
empity has joined #ruby-lang
<RickHull>
sometimes, when i'm deep in the zone, I start to *see* the unicode
<andrewvos>
RickHull: I don't even see the unicode. All I see is blonde, brunette, red-head.
<RickHull>
I can't describe it, like catching a fleeting glimpse of the ghost in the machine
<RickHull>
imagine the best parts of Hackers and Tron mixed with the Unix interface from Jurassic Park
<RickHull>
andrewvos: oh yeah, and The Matrix ;)
bougyman has joined #ruby-lang
heppy has joined #ruby-lang
mrsolo has joined #ruby-lang
brianpWins has joined #ruby-lang
darkf has joined #ruby-lang
achiu has joined #ruby-lang
dejongge has joined #ruby-lang
burgestrand has joined #ruby-lang
r0bby has joined #ruby-lang
JEG2 has joined #ruby-lang
Pip has joined #ruby-lang
Pip has joined #ruby-lang
<Defusal>
wow ok
<Defusal>
im not quite sure of what to make of this one...
<Defusal>
active_support/dependencies.rb:479:in `load_missing_constant': SourceServer is not missing constant Rcon! (ArgumentError)
<Defusal>
how can it try load a missing constant if its not missing? i didn't even know ActiveSupport tries to load missing constants
rorymckinley has joined #ruby-lang
SuperTa__ has joined #ruby-lang
Nss has joined #ruby-lang
<lsegal>
Defusal #rubyonrails
<Defusal>
lsegal, i'm not using rails
<lsegal>
but AS is maintained by that project
<Defusal>
but its fine
<Defusal>
i assume it is because the constant was removed from the module, but there was still a reference to it
<Defusal>
that depending module should have been reloaded my my modular core, so its my fault
<Defusal>
it's just a strange exception which i've never seen before
publicvoid__ has joined #ruby-lang
<lsegal>
my point was, #rubyonrails could better explain why/when that exception gets raised, and what exactly "is not missing" means in that context
<lsegal>
cause yea, it sounds weird
<Defusal>
yup
<Defusal>
lsegal: thing is, in my experience #ror is usually full of clueless users spamming questions, with few answers, let alone people who know the internals of the framework. and so i stand a better chance getting an answer in here from people who actually know about ruby than even having my question read in there
pvh has joined #ruby-lang
<wmoxam>
lol
<apeiros_>
how very surprising
<wmoxam>
Defusal: often true, but not always
<Defusal>
wmoxam, of course not always true, but out of the times i've joined there over the past few years, i think that has been the case about 98% of the time
<wmoxam>
I mean, how dare those noobs ask their trivial questions?
<wmoxam>
shame on them
<wmoxam>
and their kind
<Defusal>
keep in mind, i would not ask a trivial question to begin with
<apeiros_>
wmoxam: I think it's rather a shame that those noob questions rarely get answered well…
<Defusal>
indeed
<wmoxam>
apeiros_: noobs try to help other noobs
<wmoxam>
which is nice of them
<Defusal>
yeah
<apeiros_>
that's not the part I find shameful about :)
<wmoxam>
but the problem is the volume of questions
<Defusal>
which is better than nothing i guess
<Defusal>
exactly wmoxam, combined with the percentage of them which could be answered in 30 seconds with google
<wmoxam>
the quality of the questions asked is generally low, and it's like pulling teeth to get the information needed to answer the question
<Defusal>
that too :(
rdavila has joined #ruby-lang
<Defusal>
i don't suppose anyone here has experience with a recent version of HighCharts and dynamically adding data?
<Defusal>
i know its a long shot, but i probably stand a better chance of finding someone here than any other channel :P
twittard has joined #ruby-lang
virunga has joined #ruby-lang
krzyhoo has joined #ruby-lang
<krzyhoo>
is it possible to do something like this?
<krzyhoo>
where obviously the second values shift should not shift
<krzyhoo>
i bet there is a sexy way to pull this one off
<Defusal>
lol
<Defusal>
@keytype = values.shift || 'NONE'
marcostoledo has joined #ruby-lang
<spinagon>
that would fail on false
<spinagon>
though
<RickHull>
depends if false is a legitimate value
<Defusal>
yeah, i assumed it is not since you're using a string 'NONE'
<krzyhoo>
it is not :)
<Defusal>
if it can be false, then that seems a little dodgy
<krzyhoo>
thanks mate
<krzyhoo>
w2orks like a charm
<Defusal>
np
<erikh>
yeah, they could come in here and spam eventmachine questions instead :P
vpamulap has joined #ruby-lang
<Defusal>
erikh, i have eventmachine questions :P
<Defusal>
well not really, no one else can help with my issue, i just have to find time to do a lot of testing and pinpoint the issue :/
<Defusal>
either way, this channel also stands a better chance of responding to EM questions than #eventmachine erikh
<yxhuvud>
defusal: it may help to always refer to a moule the same way. ie always do the full module::class instea of referring to the class by only name inside the module in question
Nisstyre has joined #ruby-lang
headius has joined #ruby-lang
<Defusal>
yxhuvud, dont worry about that, i'm guessing i broke some part of my modular cores automatic dependency handling when i made some changes in the last day
nofxx has joined #ruby-lang
mrsolo has joined #ruby-lang
gray has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
dejongge has joined #ruby-lang
verto has joined #ruby-lang
tommyvyo has joined #ruby-lang
tekin has joined #ruby-lang
benanne has joined #ruby-lang
TuxmAL has joined #ruby-lang
<krzyhoo>
wtf is eventmachine?? :)
<bougyman>
it's an async library for io
<Defusal>
goodness, i guess i shouldn't be quite so surprised people don't know about EM
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
thrcka has joined #ruby-lang
zmack has joined #ruby-lang
postmodern has joined #ruby-lang
TuxmAL has quit [#ruby-lang]
tekin has joined #ruby-lang
empity has joined #ruby-lang
havenn has joined #ruby-lang
gray has joined #ruby-lang
futurechimp has joined #ruby-lang
<krzyhoo>
guys a whole different question now
<krzyhoo>
i could use a clue on best practice here
<krzyhoo>
i have a class, lets call ot Attribute which describes atributes from a database
<krzyhoo>
dbatabase_type, attribute_type, attr_length etc.
<krzyhoo>
now there is a different software, called Informatica Powercenter
<krzyhoo>
which uses generic names for attribute types
<krzyhoo>
so db2's varchar, oracle's varchar2 mysql's text etc all become "string"
<krzyhoo>
i have a yaml file which is a mapping> dbtypes to informatica types
alerticus has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
<krzyhoo>
should i create a class instance
<krzyhoo>
where i have both types: database and infa?
<krzyhoo>
or should i refrain from doing so?
<krzyhoo>
info: source for creating an instance is a simple csv file
<RickHull>
i can't make a coherent problem / question out of this info
<krzyhoo>
well RickHull: it all comes down to this
<krzyhoo>
this yaml file has to be turned into a hash whcih i use to map the types
<krzyhoo>
should i create this hash in mz class as class variable
<krzyhoo>
or should i refrain from doing so?
<RickHull>
I've got this painting of a woman, and it has a frame, and you have to walk through a glass pyramid to view it. Should I make her smile?
<Defusal>
i couldn't agree more
curtism has joined #ruby-lang
<krzyhoo>
this was a best practice question though
<krzyhoo>
appreciate your help guys :)
<RickHull>
heh, no offense. i just can't understand the basic situation
<RickHull>
your actual question is clear enough
<Defusal>
yeah, same here :/
<Defusal>
argh, im not having a good night
<krzyhoo>
well... since it is clear what's the problem guys??
<krzyhoo>
:/
<Defusal>
instead of solving issues, i just keep finding more
<Defusal>
krzyhoo, try condensing everything you said into a single concise sentence
<krzyhoo>
ok
<krzyhoo>
how about that
gix has joined #ruby-lang
<krzyhoo>
how do i create a class variable the moment the first instance of this class is created and never again?
darkf has joined #ruby-lang
<Asher>
a class instance variable you mean?
<Asher>
just set it in the body of your class
<krzyhoo>
clas variable
<krzyhoo>
\@@
<Asher>
class SomeClass ; @class_instance_var = :value ; end
<Asher>
avoid class variables
<krzyhoo>
@@
<Asher>
they only exist to hurt your soul
<apeiros_>
and to sneak up behind you
<shevy>
and cut off your d...
ayoub has joined #ruby-lang
<krzyhoo>
Asher: and apeiros_ ans shevy: ok, than how should i solve another issue of mine
<krzyhoo>
without them bitchas
<krzyhoo>
example
<krzyhoo>
have 20 rows in my csv file desribing to tables
<krzyhoo>
10 rows table a and ten rows table b
<rue>
krzyhoo: Classes are objects, too. Objects can have instance variables.
<krzyhoo>
i need to calculate an offset of the attribute length
<krzyhoo>
which resets once the table name changes
<krzyhoo>
how else if not with a class variable
<Defusal>
krzyhoo, an instance variable on the class level
<krzyhoo>
Defusal: wtf is that :)
<krzyhoo>
honest to got
<krzyhoo>
have no idea
pzol has joined #ruby-lang
<Defusal>
class Foo; @bar = true; def self.class_method; @bar end end
<krzyhoo>
all i know are @ and @@'s
<krzyhoo>
aaaaaaaa
<Defusal>
you just use an instance variable, @ on the class level
<krzyhoo>
so that's how you call it :)
<Defusal>
i guess its not possible to remove rack middleware
<apeiros_>
just apply enough force
<krzyhoo>
but how it differs (technicall) from a class variable?
<apeiros_>
it doesn't suck
<apeiros_>
I know, not a very technical description of the difference
<krzyhoo>
we have an academic amog us
<Defusal>
i realized, after not thinking my actions through, that using "use Rack::Session::Cookie" a second time in a subclassed application actually adds another rack session to it, which breaks the session completely
<krzyhoo>
since i am just a beginner
<Defusal>
krz
<Asher>
when you set a class variable there is 1 variable for that class and every subclass
<Asher>
so @@class_var in SomeClass is _the same variable_ in SomeSubClass < SomeClass
<krzyhoo>
ok
<krzyhoo>
so this is simply a best practice
<krzyhoo>
and I SHOULD DO IT LIKE THIS
<krzyhoo>
but...
<krzyhoo>
structlyy technically speaking
<Asher>
class var is very rarely what you want
<Asher>
if ever
<Asher>
i've never seen a good use for it
<Asher>
i'll acknowledge the possibility it exists and i just haven't encountered it yet
<Asher>
but i'm not expecting to come across it either
rolfb has joined #ruby-lang
<krzyhoo>
it doesn't differ in it's role from a class var
<krzyhoo>
ok
<erikh>
class vars are usually used in instances
Hakon|mbp has joined #ruby-lang
<Asher>
in ruby "a class var" = @@some_var
<erikh>
class instance vars usually stay on the class.
<Asher>
a "class instance var" is a normal instance var (@var) used in an instance of a class
<erikh>
I guess "stay on the class" is confusing but this topic frequently is for people new to ruby
<tonesfrommars>
Right, usage is the same, just happens that the instance is a class.
<apeiros_>
krzyhoo: not an academic, only a pedant
<erikh>
I farted, guys
<krzyhoo>
i fucking need to digest that
<erikh>
(and gals)
<tonesfrommars>
erikh: congratulations
* apeiros_
hands erikh a medal
<erikh>
yay
<apeiros_>
is farting a side effect of procrastination?
<erikh>
yes.
<apeiros_>
oh
<apeiros_>
that explains a lot
<tonesfrommars>
i think IRC is a side effect of procrastination. :-)
<apeiros_>
no
<apeiros_>
IRC is the main cause for
<apeiros_>
if you remove facebook and irc, procrastination magically disappears
<apeiros_>
in other news, there have been sightings of unicorns dancing on rainbows
<rolfb>
apeiros_: are you sure?
<apeiros_>
of course
<apeiros_>
but about what?
<rolfb>
i have aim, skype and msn to keep me occupied too
ankurgel has joined #ruby-lang
<rolfb>
"if you remove facebook and irc, procrastination magically disappears"
<rolfb>
:)
<erikh>
oh screw that, I'd totally find something else to do
<Asher>
irc helps me keep focused by having a peripheral distraction
<Asher>
that way i don't go elsewhere to get distracted
<erikh>
I'm just in context switching hell today
<apeiros_>
rolfb: I'm just as sure about that as those other news about the unicorns…
<krzyhoo>
Defusal: in your example, how do i modify the @bar
<krzyhoo>
or get it's value?
<Asher>
erikh - you end up checking out cascading-configuration?
<apeiros_>
erikh: time to switch context with beer?
<erikh>
Asher: not yet. it's still tabbed though
<erikh>
apeiros_: it's not even 1pm here yet, heh
<Asher>
cool
<apeiros_>
erikh: that's a poor excuse
<erikh>
Asher: I didn't get much done last weekend, I blame mass effect 3
<Asher>
make sure you use the most recent one whenever you do
<rolfb>
apeiros_: ah
<krzyhoo>
neverminf
<krzyhoo>
:)
<krzyhoo>
stupid me
* apeiros_
converted #ruby-lang to #totally-OT
<erikh>
hehe
<krzyhoo>
stupid me
apeiros_ was kicked from #ruby-lang by apeiros_ [stop that OT talk, duh!]
apeiros_ has joined #ruby-lang
darkf has joined #ruby-lang
<apeiros_>
yeah, sorry apeiros_, I'll not to it again, I promise…
ankurgel has quit [#ruby-lang]
<krzyhoo>
anyone care to explain? why do languages have features no one should use??
<krzyhoo>
please...abyone...?
<krzyhoo>
anyone
<Asher>
course of development
<Asher>
stuff gets added and it remains b/c it's always been there
<erikh>
they're not useless
<krzyhoo>
kinda like guys and tits?
<erikh>
they're just not very useful
<erikh>
yes, exactly.
<rue>
Class variables are shared among the entire inheritance hierarchy, subclasses don't get their own copies.
<rue>
Oh, backscroll…
<Asher>
class variables seem to me like a function created for people who are wary about actually committing to principles of encapsulation
<shevy>
as long as facets remains a community driven project, so long will it be largely irrelevant as barely anyone will adopt it
<dominikh>
good thing that, seeing how facets is a bloated collection of horrible extensions
<drbrain>
shevy: facets seems driven by a community of one
<shevy>
hehe
<yxhuvud>
well are there not parts of facets that has been incorporated in other stuff?
virunga has joined #ruby-lang
<shevy>
dunno, probably people handpick what is useful for them in their own projects and ignore the rest
<yxhuvud>
I may remember wrongly, but wasn't Symbol#to_proc from there originally?
<shevy>
absolutely no idea
r0bby has joined #ruby-lang
<drbrain>
yxhuvud: probably not
petercooper has joined #ruby-lang
ylluminate has joined #ruby-lang
sre-su has joined #ruby-lang
r0bby has joined #ruby-lang
srbartlett has joined #ruby-lang
<yxhuvud>
drbrain: oldest reference I can find is from pragdave who blaim extensions.rubyforge. Dunno if that is the same as facets.
<drbrain>
yxhuvud: facets was calibre
sre-su has quit [#ruby-lang]
r0bby_ has joined #ruby-lang
verto has joined #ruby-lang
r0bby_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
MDmalLION has joined #ruby-lang
r0bby_ has joined #ruby-lang
[dmp] has joined #ruby-lang
[dmp] has joined #ruby-lang
Indian has joined #ruby-lang
<shevy>
anyone happens to know whether it is possible to get a list of USB devices attached in a windows machine via ruby? i.e. my script needs to find out whether someone is connected on D: E: F: and so on
<shevy>
whether *something
<shevy>
not someone
<drbrain>
shevy: imperator probably has a package for that
<shevy>
okay
<drbrain>
if not, you can use WIN32API (or whatever it is called these days) after poking around on MSDN for a bit
<petercooper>
Not that it helps but my hunch on that question, at least, is "yes"
r0bby_ has joined #ruby-lang
r0bby_ has joined #ruby-lang
<petercooper>
At least, if it's available in a system library, etc, since even in the worst case scenario you could FFI to it.
H2H has joined #ruby-lang
MDmalLION has joined #ruby-lang
<petercooper>
shevy: Re-reading that question.. it sounds like you want to specifically find USB mass storage devices and get their equivalent drive letter?
<shevy>
petercooper yeah!
<petercooper>
Was only asking because I suspect it might be possible to approach from the other direction too
<shevy>
my scripts work on linux with "fdisk -l" and automatically find out where something is mounted, now I am trying to make them work on windows too
<petercooper>
that is, rather than querying the USB system.. something in a file API to identify the source for a certain drive letter
<shevy>
hmm
<petercooper>
I've found some code to do it, but might take a bit of pondering to think how to call it from Ruby..
<petercooper>
From IronRuby it'd be easy, but no idea how to interface with a .NET API from standard Ruby
<petercooper>
We just need a Windows API god to swoop in and sprinkle fairy dust around the place.
shtirli__ has joined #ruby-lang
Boohbah has joined #ruby-lang
verto_ has joined #ruby-lang
ezkl has joined #ruby-lang
ezkl has joined #ruby-lang
woollyams has joined #ruby-lang
dhoss has joined #ruby-lang
r0bby_ has joined #ruby-lang
m3nd3s has joined #ruby-lang
FACEFOX has joined #ruby-lang
<rue>
petercooper: You might try imperator
<petercooper>
It's shevy with the issue but seems like a good idea.
<rue>
Oh, late again
<shevy>
yeah I will catch him when he gets online
<petercooper>
I'm not quick enough for Stack Overflow which is why I lurk here instead ;-)
<petercooper>
If you want a really answer, put it on Stack Overflow. In 30 seconds, blam. You'll have an answer. Not necessarily one that works, mind you..
robbyoconnor has joined #ruby-lang
robbyoconnor has joined #ruby-lang
t has joined #ruby-lang
woollyams has joined #ruby-lang
robbyoconnor has joined #ruby-lang
dfr|mac has joined #ruby-lang
Jake232 has joined #ruby-lang
gregf has joined #ruby-lang
robbyoconnor has joined #ruby-lang
bglusman has joined #ruby-lang
Carnage\ has joined #ruby-lang
<Asher>
is there a good way to get a lambda from a block?
<Asher>
rather than a proc
davpoind has joined #ruby-lang
justinxreese has joined #ruby-lang
<Boohbah>
is_positive = lambda {|x| x > 0 }
<Boohbah>
succ = ->(x){ x+1 }
<Asher>
was that to me?
<apeiros_>
Asher: lambda(&block) ?
<Asher>
nope that doesn't seem to work
<apeiros_>
hrm, no, doesn't seem to
<apeiros_>
given that the two differ, that's a shame, really…
<Asher>
it's so annoying that method_missing can't cause an exception to be raised at the point method_missing was called
<apeiros_>
o0
* petercooper
thinks..
<apeiros_>
it's just the backtrace that differs, no?
<apeiros_>
so all you'd have to do is fiddle with the backtrace
<apeiros_>
I'd hate you for it, though
<Asher>
hmmm so you're saying create the exception myself then edit the backtrace array?
<apeiros_>
(fiddling with backtraces is EVIL, don't do it)
<Asher>
why would you hate me for it
<Asher>
i just want the backtrace to show where the method was called that is missing
<apeiros_>
because you will fuck it up
<drbrain>
Asher: I would hate you for it
<petercooper>
it's no more hateful than breaking return semantics.. but no less either ;-P
<apeiros_>
and you'll make debugging more difficult
<workmad3>
Asher: the backtrace for a normal method_missing call looks correct to me
<Asher>
but the method was missing… it shouldn't throw the error in method missing
<drbrain>
if you need to change return semantics… use return!
<drbrain>
from the return_bang gem!
<workmad3>
Asher: it's only if there's an overridden method_missing that method_missing appears on the backtrace
dkannan has joined #ruby-lang
<Asher>
right
<Asher>
i have a method missing method
<Asher>
but it doesn't always handle missing methods
<Asher>
so if methods are actually missing
<Asher>
then i want it to act like there was no method missing error in the middle
slyphon has joined #ruby-lang
<workmad3>
Asher: I'd regard this as correct behaviour... there *are* methods there, they could be part of the problem
abuiles has joined #ruby-lang
<Asher>
but you call super in method missing to get the exception - it raises the exception b/c there is no method to handle it in the super method
<Asher>
*shrug*
<Asher>
it definitely wastes my time debugging
<petercooper>
heh, thought I'd see if defining and using respond_to_missing? properly would help, but alas no.
<workmad3>
Asher: and if I had a method I was sure method_missing was meant to handle but it wasn't, and I didn't see my method_missing on the backtrace, I'd go potty wondering why my method_missing wasn't being called
<workmad3>
Asher: but hey, you could clean up the backtrace if you wanted ;)
Joeysomo has joined #ruby-lang
<Asher>
it just seems like i should be able to do so
<Asher>
if my code works properly then end users shouldn't be seeing it from their errors
<workmad3>
Asher: and you can do so
<workmad3>
Asher: but it's a big assumption that your code is working properly ;)
<workmad3>
Asher: and therefore a big assumption that your code has no place in the backtrace for an error
denysonique__ has joined #ruby-lang
looopy has joined #ruby-lang
<Asher>
ok so exception does actually have set_backtrace for this
<dominikh>
reminds me of my library that hid itself from the backtrace because it "couldn't possibly be wrong"..
<workmad3>
Asher: yup... which is why we were saying you can do it... but it's not generally regarded as good style
<dominikh>
it was fun trying to debug a bug in my library some months later
wyhaines has joined #ruby-lang
<Asher>
well i can arrange it so that it only edits the backtrace in the condition it calls super, in which case i already know the method is missing
<workmad3>
Asher: what you could do is make it optional for your library to appear in backtraces though... something that a library user can turn off if they want less noisy backtraces, but turn on if they think it's in your library
<petercooper>
ooh actually, just e.backtrace.shift seems to do the trick.
<Asher>
yup!
<workmad3>
as long as you remember to do it all up the chain :)
<petercooper>
surprised it lets you play directly on the array like that, but seems to work
<zenspider>
hoe 2.16.1 released
<petercooper>
e.backtrace.push "dhh"
<zenspider>
yay for arrays
nine2five has joined #ruby-lang
<nine2five>
Hey there !
<petercooper>
it's a way to make a livin
nine2five has quit [#ruby-lang]
wyhaines has joined #ruby-lang
savage- has joined #ruby-lang
<zenspider>
image_science 1.2.2 released
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
nofxxx has joined #ruby-lang
achiu1 has joined #ruby-lang
FiXato has joined #ruby-lang
nofxx has joined #ruby-lang
CoverSlide has joined #ruby-lang
slyphon has joined #ruby-lang
Joeysomo has joined #ruby-lang
tran4 has joined #ruby-lang
<tran4>
I'm a senior CS undergrad. I applied to a company for co-op and intern positions: http://pastebin.com/LdAH6eaZ Are they good? no reply from company yet but got a call from a recruiter for the same position. shuold i talk to him if I want the position? his ad has $14/hr listed. I live with my parents and they want me to get some work experience this summer. I havent had many replies for my applications so far.
shevy has joined #ruby-lang
<erikh>
GP is a pretty big company.
<erikh>
that doesn't mean anything else... you'll find shit and gold from the smallest startups to the largest corporations
<erikh>
if I were you, I'd be asking them the questions you'd ask us