<cout>
Cope: maybe there's some other uri.rb in the path
spuk has joined #ruby-lang
znz_jp has joined #ruby-lang
tomzx has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
yannis has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
bglusman has joined #ruby-lang
mikeric has joined #ruby-lang
qpingu has joined #ruby-lang
bryno has joined #ruby-lang
neoesque has joined #ruby-lang
Karmaon has joined #ruby-lang
yannis has joined #ruby-lang
savage- has joined #ruby-lang
jtoy has joined #ruby-lang
FACEFOX-DOT-COM has joined #ruby-lang
indeterminate has joined #ruby-lang
Karmaon has joined #ruby-lang
QaDeS has joined #ruby-lang
indeterminate has joined #ruby-lang
srbaker has joined #ruby-lang
indeterminate has joined #ruby-lang
Watcher7 has joined #ruby-lang
Gracie has joined #ruby-lang
sei has joined #ruby-lang
Gracie has quit [#ruby-lang]
indeterminate has joined #ruby-lang
fgomez has joined #ruby-lang
Manhose_ has joined #ruby-lang
Manhose__ has joined #ruby-lang
sei has joined #ruby-lang
<slyphon>
oh noes!
<slyphon>
rubydoc.info is down!
* slyphon
panics!
Karmaon has joined #ruby-lang
Manhose has joined #ruby-lang
indeterminate has joined #ruby-lang
<rue>
What's a ruby?
<postmodern>
slyphon, it's up for me
<slyphon>
hrm
<slyphon>
ah back now
<slyphon>
whew
* slyphon
calls 911 back to tell them everything's ok
msisk has joined #ruby-lang
indeterminate has joined #ruby-lang
msisk has joined #ruby-lang
zwevans has joined #ruby-lang
Watcher7 has joined #ruby-lang
Karmaon has joined #ruby-lang
flebel has joined #ruby-lang
kiddorails has joined #ruby-lang
igaiga has joined #ruby-lang
Manhose_ has joined #ruby-lang
bryancp has joined #ruby-lang
headius has joined #ruby-lang
tevren1 has joined #ruby-lang
tevren1 has quit [#ruby-lang]
tevren1 has joined #ruby-lang
kvirani has joined #ruby-lang
yannis has joined #ruby-lang
jfelchner has joined #ruby-lang
flebel has joined #ruby-lang
neoesque has joined #ruby-lang
jmfcool has joined #ruby-lang
brianpWins has joined #ruby-lang
andrewhl has joined #ruby-lang
jmfcool has joined #ruby-lang
sholden has joined #ruby-lang
Brainix has joined #ruby-lang
S2kx has joined #ruby-lang
heftig has joined #ruby-lang
<erikh>
i'm drunk
<erikh>
you are all better people for knowing this
mistym has joined #ruby-lang
Oloryn_lt1 has joined #ruby-lang
bglusman has joined #ruby-lang
<rking>
Ewyuck. I'm having to manually set: LD_LIBRARY_PATH=~/.rbenv/versions/1.9.3-p194/lib/:$LD_LIBRARY_PATH
<rking>
This shouldn't be.
havenn has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
adpirz has joined #ruby-lang
Karmaon has joined #ruby-lang
mikeric has joined #ruby-lang
jarred has joined #ruby-lang
ruskie has joined #ruby-lang
RubyRedGirl has joined #ruby-lang
dankest has joined #ruby-lang
dc5ala has joined #ruby-lang
davesq has quit [#ruby-lang]
heftig has joined #ruby-lang
elephants has joined #ruby-lang
replore has joined #ruby-lang
|Vargas| has joined #ruby-lang
rippa has joined #ruby-lang
divins has joined #ruby-lang
rohit has joined #ruby-lang
workmad3 has joined #ruby-lang
ryanf has joined #ruby-lang
solars has joined #ruby-lang
Asher has joined #ruby-lang
x0F_ has joined #ruby-lang
jmfcool has joined #ruby-lang
gianlucadv has joined #ruby-lang
ryanf has joined #ruby-lang
sei has joined #ruby-lang
andkerosine has joined #ruby-lang
zmack has joined #ruby-lang
andkerosine has quit [#ruby-lang]
gsav has joined #ruby-lang
neoesque has joined #ruby-lang
QaDeS has joined #ruby-lang
tallship has joined #ruby-lang
knu has joined #ruby-lang
RubyRedGirl_ has joined #ruby-lang
Manhose has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
heftig has joined #ruby-lang
Namenone has joined #ruby-lang
mikeric has joined #ruby-lang
Namenone has quit [#ruby-lang]
kiddorails has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
rue has joined #ruby-lang
srbartlett has joined #ruby-lang
roha has joined #ruby-lang
workmad3 has joined #ruby-lang
AndChat| has joined #ruby-lang
apeiros_ has joined #ruby-lang
pp01bit has joined #ruby-lang
roha has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Natch| has joined #ruby-lang
S1kx has joined #ruby-lang
Gekz has joined #ruby-lang
Gekz has joined #ruby-lang
francisfish has joined #ruby-lang
Mchl has joined #ruby-lang
roha has joined #ruby-lang
cantonic has joined #ruby-lang
s3mi0 has joined #ruby-lang
Mutton has joined #ruby-lang
kain has joined #ruby-lang
Nowaker has joined #ruby-lang
virunga has joined #ruby-lang
Mchl has joined #ruby-lang
Manhose_ has joined #ruby-lang
AndChat| has joined #ruby-lang
kitallis has joined #ruby-lang
hrpxj has joined #ruby-lang
justinmcp has joined #ruby-lang
roha has joined #ruby-lang
hrpxj has joined #ruby-lang
hrpxj has quit [#ruby-lang]
h4y4shi has joined #ruby-lang
h4y4shi has quit [#ruby-lang]
tekin has joined #ruby-lang
h4y4shi has joined #ruby-lang
replore_ has joined #ruby-lang
h4y4shi has joined #ruby-lang
fayimora has joined #ruby-lang
<h4y4shi>
hi
<jondot>
hello, any tdd fanatics here?
<h4y4shi>
What does it stand for?
<andrewvos>
jondot: I don't consider myself a fanatic, but I do practice TDD.
<jondot>
well i have a question i presented in #ruby, but i can show it here since i've got my registered nick back
<jondot>
im trying to model an integration test with a 3rd party, but i'm mocking it out. thing is - the 3rd party service is stateful and i _dont_ want to code even a dumbified mocked version of it in my tests
<jondot>
the solution i'm using right now is to break up the test into 2 separate sections, so that i wouldn't have to validate the service's side effects
<h4y4shi>
Could someone help me with a path issue I am having. Source hero = Marshal.load(File.read("/saveGames/#{file_name}")) I have a folder named saveGames in the same directory as my ruby code but when I run the program and type the name of the file I want to load out of the folder it says the directory doesnt exist.
<jondot>
because i *know* how the service behaves. problem is, i don't want to *know* anything about it.
<jondot>
so my question is, how would you handle that? i already know that many developers would just succumb to coding up that knowledge in some way and some degree, but i'm kinda looking for the better solution
<virunga>
h4y4shi: are you using a linux os?
s3mi0 has joined #ruby-lang
<jondot>
andrewvos, any thoughts about this?
<h4y4shi>
virunga: I am using windows 7
bcardarella has joined #ruby-lang
<bcardarella>
How do I read the current line of text in the termina? For example, text was sent to STDOUT, I want to find out what text that was and capture it
<virunga>
h4y4shi: i think you have to put the dir where you code stays in the $LOAD_PATH or use an absolute path
<virunga>
h4y4shi: and don't start with /
<h4y4shi>
Okay thanks man I really appreciate the help
<virunga>
h4y4shi: no problem
<virunga>
bcardarella: maybe using a IO stream
<bcardarella>
virunga: will that allow me to read the content that has been printed to STDOUT?
<bcardarella>
I guess the question is, once it is pushed to STDOUT can I access that data or is it gone as far as Ruby is concerend?
<virunga>
bcardarella: i think you should open the stream before the data is send
<bcardarella>
virunga: I don't hace access to that point
<virunga>
*sent
<virunga>
bcardarella: eh, redirect the stdout on a file and read the file?
<bcardarella>
I could do that but then it won't ever print to the terminal, right? I want to capture what was printed.
<virunga>
bcardarella: if you have access to the terminal i think it's possible to do both, print on stdout and a file.. but i dont remember how
<virunga>
bcardarella: yes, the tee command
<bcardarella>
I suspect because $stdout is just an IO object I could get the data from that... but it seems that it cannot be read
<bcardarella>
tee?
dejongge has joined #ruby-lang
<virunga>
maybe isn't the right solution
<h4y4shi>
virunga: I changed the sourcecode to this hero = Marshal.load(File.read("./saveGames/#{file_name}")) but I am using ruby 1.9.2 how do I add current directory to $LOAD_PATH ? I have never used this before
<virunga>
h4y4shi: if you wanna do that not permanently, just add the name of the dir as a string in the $LOAD_PATH array from the program itself, yes because it's an array.
<virunga>
:)
<virunga>
otherwise you can use the -I command or ruby interpreter
<virunga>
ruby -I path_name
<virunga>
h4y4shi: maybe just add the "." dir
<virunga>
once for all
<virunga>
so u dont have to add a different dir each time
<h4y4shi>
Sorry I am lost. I dont know how to add a directory using $LOAD_PATH '
Pip has joined #ruby-lang
<andrewvos>
h4y4shi: $LOAD_PATH.unshift("/lol")
<virunga>
h4y4shi: $LOAD_PATH << "." or $LOAD_PATH.push "." there're lots of way
<h4y4shi>
virunga: Thanks
<virunga>
h4y4shi: you welcome
Nss has joined #ruby-lang
<apeiros_>
just that . is unreliable. any chdir in code may wreak havoc
<apeiros_>
(which is why it was removed in the first place)
<apeiros_>
also, more likely to happen: pwd isn't what you expect it to be right from the start.
<virunga>
apeiros_: what's the right way?
<virunga>
or the best
<apeiros_>
I didn't read the scrollback, so just the generic answer: rely on proper installation. all requires should be relative to the lib dir. the lib dir's addition to $LOAD_PATH is handled by the proper installation (e.g. rubygems, or setup.rb)
<apeiros_>
for development, use -I
<apeiros_>
e.g. ruby -I. (the . will be expanded)
<virunga>
apeiros_: ah, ok. So, for example "../../mydir" ?
<apeiros_>
you mean ruby -I../../mydir ?
<apeiros_>
or you mean in the require?
<virunga>
-I option
<apeiros_>
then yes, even though I have a hard time picturing a case where you'd need ../ :)
<apeiros_>
ok, maybe when you cd'ed into your project's test dir…
<apeiros_>
cd YOURPORJECT/test; ruby -I../lib testrunner.rb # or whatever runs your tests…
<virunga>
ah, ok, now i understand
<virunga>
apeiros_: thank you
<apeiros_>
yw
<virunga>
i'm going to lunch
<virunga>
bye
bcardarella has quit [#ruby-lang]
dhruvasagar has joined #ruby-lang
replore_ has joined #ruby-lang
toretore has joined #ruby-lang
bryancp has joined #ruby-lang
kvirani has joined #ruby-lang
dv310p3r has joined #ruby-lang
heftig has joined #ruby-lang
igaiga has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Kero_ has joined #ruby-lang
mark_locklear has joined #ruby-lang
lele has joined #ruby-lang
youngin has joined #ruby-lang
roha has joined #ruby-lang
rue has joined #ruby-lang
gianlucadv has joined #ruby-lang
adpirz has joined #ruby-lang
Fullmoon has joined #ruby-lang
tomzx has joined #ruby-lang
adpirz_ has joined #ruby-lang
hynkle has joined #ruby-lang
Namenone has joined #ruby-lang
<Namenone>
Hey guys, does messagepack work with rails?
bglusman has joined #ruby-lang
dhruvasagar has joined #ruby-lang
codewrangler has joined #ruby-lang
elephants has joined #ruby-lang
znz_v has joined #ruby-lang
<kyrylo>
Namenone, hello. Try to ask on #rubyonrails
fattastic has joined #ruby-lang
heftig has joined #ruby-lang
mistym has joined #ruby-lang
shevy has joined #ruby-lang
Manhose_ has quit [#ruby-lang]
mistym has joined #ruby-lang
JEG2 has joined #ruby-lang
jtoy has joined #ruby-lang
tevren2 has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
slyphon has joined #ruby-lang
kyrylo has joined #ruby-lang
gianlucadv has joined #ruby-lang
andrewhl has joined #ruby-lang
Austin__ has joined #ruby-lang
gsav has joined #ruby-lang
s3mi0 has joined #ruby-lang
havenn has joined #ruby-lang
jtoy has joined #ruby-lang
fireglow has joined #ruby-lang
wwkeyboard has quit ["WeeChat 0.3.7"]
bryancp has joined #ruby-lang
rue has joined #ruby-lang
dfr|mac has joined #ruby-lang
RubyRedGirl has quit [#ruby-lang]
enebo has joined #ruby-lang
imperator has joined #ruby-lang
outoftime has joined #ruby-lang
<imperator>
good morning
kiddorails has joined #ruby-lang
Apo_ has joined #ruby-lang
blowmage` has quit [#ruby-lang]
blowmage has joined #ruby-lang
<erikh>
imperator: good luck on your kickstarter project!
datanoise has joined #ruby-lang
thone_ has joined #ruby-lang
youngin has quit [#ruby-lang]
youngin has joined #ruby-lang
frem has joined #ruby-lang
<imperator>
erikh, danke
* imperator
posts to reddit, hacker news
dv310p3r has joined #ruby-lang
* imperator
waits for the hate mail
<erikh>
I RT'd that stuff
<erikh>
yeah, heh
<erikh>
well, you gotta give it a shot at least.
<imperator>
yep, if i fail, at least i know i tried
<erikh>
imperator: can you re-upload the video? might want to run it through a high-pass filter
<erikh>
it's got a high pitched whine to it
<imperator>
it does? hm
mistym has joined #ruby-lang
<imperator>
i'm afraid my video skills suck
<imperator>
i probably just thought it was my tinnitus ;)
oqa75 has joined #ruby-lang
tevren2 has quit [#ruby-lang]
<erikh>
ah, heh
<erikh>
my skills in that department suck too, I might be recommending the wrong thing
<erikh>
it's not terrible, just audible
zmack has joined #ruby-lang
cantonic has joined #ruby-lang
jxie has joined #ruby-lang
<imperator>
i'll see what i can do
nahhh has joined #ruby-lang
msisk has joined #ruby-lang
mistym has joined #ruby-lang
oqa has joined #ruby-lang
<oddmunds>
i hope your tinnitus doesn't sound like that. that's horrible. :(
Karmaon has joined #ruby-lang
<oqa>
hi, i'm using ruby 1.9.3-p194 on Windows 7 server and Net::HTTP read_body corrupts downloaded files (they're too large). I'm using code that's almost the same as in the Net::HTTP example and the code works on 1.9.3-p0 on linux server. any suggestions on how to proceed?
<oqa>
actually the code works on 1.9.3-p194 on linux too
<imperator>
oddmunds, didn't sound bad when I replayed it on my laptop; maybe their "processing" did something? not sure
<imperator>
i'll try to filter it out, though, thanks
<oddmunds>
i think the speakers i have here accentuate that type of sound. tinny squeaky things.
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
zmack_ has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
dustacio has joined #ruby-lang
<musl>
imperator: Good luck! :)
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
apeiros_ has joined #ruby-lang
kyrylo has joined #ruby-lang
<imperator>
musl, thanks
Defusal_ has joined #ruby-lang
Defusal_ has joined #ruby-lang
<erikh>
I have some good headphones and it was audible
<erikh>
anyhow. yes, good luck.
<erikh>
I have to disappear for a bit
<oddmunds>
imperator: yeah. good luck. have you got any juicy hate from reddit or hn yet?
elephants has joined #ruby-lang
bryancp has joined #ruby-lang
nahhh has joined #ruby-lang
<andrewvos>
Ummm, should I expect String#insert to modify the original string?
<andrewvos>
canton7: What I really mean is "what the fuck why doesn't it have a !"
<canton7>
because ! does not mean "modifies the object it acts on"
<andrewvos>
canton7: Well, it does most of the time.
Dreamer3 has joined #ruby-lang
<canton7>
it's used (generally) when there's a pair of similar methods but one is more "dangerous" than the other
<andrewvos>
Ok, so next question. String.insert is fuckign up my original string. I don't want this. Should I String.clone or is there something else I should be doing?
manojhans has joined #ruby-lang
kara_sweets has joined #ruby-lang
<andrewvos>
canton7: Oh ok i thought it was just there as a kind of "some shit is going to happen" marker.
<andrewvos>
No this is not consistent.
<canton7>
and yeah, I can't think of a nicer way than string.dup.insert, though there probably is one
<andrewvos>
This is really not consistent at all. If there's gsub and gsub! why is there no insert/insert! ?
<kara_sweets>
if a function returns a value, how do you set the function so that the value gets placed in a variable?
<canton7>
yeah, I agree, I would have expected there to be two versions here
<andrewvos>
This makes me sad.
macmartine has joined #ruby-lang
<rue>
It's inserting, not splicing
<andrewvos>
rue: gsub is substituting, but I don't see it modifying the original string.
<erikh>
well it's like replace and friends
<erikh>
in that grey area
<erikh>
ok I really need to get away from the computer
<dominikh>
andrewvos: because nobody needs a non-modifying insert?
<andrewvos>
dominikh: The point is, it does modify the original string.
<andrewvos>
Oh wait.
<dominikh>
andrewvos: the meaning of ! isn't "self modifying", it means "does more/is more dangerous/bla than the non-bang version"
<andrewvos>
Yeah I get that
dabradley has joined #ruby-lang
<dominikh>
and if there is no other version, there's no need for a bang
<andrewvos>
But there is no consistency.
<andrewvos>
I want to insert a value into a string, and have that string as a return value.
<andrewvos>
The resulting string I mean
<rue>
You can, by the power of programming!
tenderlove has joined #ruby-lang
hynkle has joined #ruby-lang
<imperator>
oddmunds, already got some reddit hate, woohoo!
<imperator>
"just install ubuntu" - um, ok
<andrewvos>
rue: I hate you.
* andrewvos
uses .dup
<rue>
It's OK, I hate myself too
<andrewvos>
:(
<imperator>
but most of us love you rue
<andrewvos>
imperator: I was just joking. You don't have to get all bro :)
<imperator>
oh, no. am i.....a brogrammer?!?
<kara_sweets>
if a function returns a value how do you capture it in a variable in ruby?
QaDeS has joined #ruby-lang
<heftig>
var = function
<kara_sweets>
same as js?
<heftig>
maybe i'm misunderstanding you
<heftig>
this is really basic
<oddmunds>
imperator: heh. "if you can't figure out how to use it on Windows, you're gonna have a bad time doing much else with Ruby anyway"
<imperator>
i think these people have missed the point, but ok
<oddmunds>
yeah.
<kara_sweets>
no i think you're right and yes its pretty basic, ive never written this sort of thing in ruby and wasnt sure if theres a lambda, or proc usage
headius has joined #ruby-lang
<imperator>
kara_sweets, basically, yes
<imperator>
you can use lambda's if you like, but using anonymous functions everywhere isn't typical ruby style
<oddmunds>
i didn't exactly break out in applause from "for ruby to succeed it must succeed on windows", but i definatly see the merit of making ruby work in windows.
<heftig>
too bad ironruby didn't take off
<imperator>
oddmunds, but has ruby really succeeded outside of rails? i would say only chef & puppet have made it big; perhaps i've overstated it
<imperator>
i guess what i really mean is that i want ruby to "win"
<imperator>
and by "win" I mean crush our enemies, see them driven into irrelevance, and hear the lamentations of the perl programmers
<oddmunds>
yeah, i'm not quite sure what it means to "succeed"
<heftig>
becoming the next perl?
<heftig>
python seems to be heading there, I think. though I never bothered learning it
kish_ has joined #ruby-lang
havenn has joined #ruby-lang
<singpolyma>
imperator: using anonymous functions isn't typical ruby style? What sort of blockless ruby are *you* writing?
<singpolyma>
imperator: sorry, that sounded trollish. I just mean... what do you mean?
<imperator>
singpolyma, i guess i'm old fashioned; i use classes and methods :)
<imperator>
not this new fangled fp stuff you young whippersnappers are using.
<chris2>
thats so 1995
<singpolyma>
sure, but classes and methods do no preclude blocks. I mean, all our iterators (.each, etc) are block-using, even
<rue>
FP is so 1956
<chris2>
rue: you wish
<singpolyma>
I guess ruby has a for loop somewhere... I've never seen it used
<chris2>
it maps to each
<rue>
for…in loop
<oddmunds>
Don't get fooled by the objects i got, i'm still Jenny from the block.
<imperator>
a jennifer lopez reference, you don't see those around here every day
<imperator>
singpolyma, true, i'm generalizing
caleon has joined #ruby-lang
<singpolyma>
Also, there's nothnig strictly FP about it. I use blocks in ruby *way* more than lambda in the FP environments I've worked in
<singpolyma>
anyway
<chris2>
thats just because ruby sucks for higher order programming :P
<singpolyma>
chris2: in what way? you mean because we don't have partial application and can't refer to methods as functions by name easily?
<chris2>
yes
<chris2>
especially the latter
<singpolyma>
sure
<chris2>
nor pass multiple blocks in a nice way
<singpolyma>
Symbol#to_proc partially solves it for some cases
<chris2>
nor have proper scoping for methods
olesu has joined #ruby-lang
<imperator>
oqa, got a code snippet? wonder if it's a binary mode thing
<singpolyma>
yeah... multiple blocks you end up needing an explicit lambda, which is less nice
crackity_jones has joined #ruby-lang
brianpWins has joined #ruby-lang
<andrewvos>
Gahh I went away. Did I miss a comeback or funny retort?
<imperator>
andrewvos, yes, but i deleted them, and kicked several people for having the audacity to be more clever than i am
<andrewvos>
imperator: I'm sure your actions were within reason.
<andrewvos>
Ok but seriously. Is there a non-destructive insert because this line of code isn't obvious: highlighted = search_result.object.text.clone
<oqa>
imperator: start uses Url.parse and some method from Net::HTTp
elephants has joined #ruby-lang
mrsolo has joined #ruby-lang
<imperator>
oqa, humor me, and try adding a "b" to the open, e.g. open 'large_file', 'wb' do |io|
bryancp has joined #ruby-lang
<oqa>
imperator: thanks, I'll try that out on Wednesday.. public holiday here til then
<oqa>
imperator: I'll also do some binary diffs to see what the additional characters are
<oqa>
I checked the files quickly with notepad++ and most of the content seemed to be the same binary, but there were possibly some additional linebreaks
<imperator>
so much for the public holiday ;)
<imperator>
well, maybe that's it, maybe not, but it's something to eliminate as a possibility :)
<oqa>
I mean I checked the files previously
Kero has joined #ruby-lang
<imperator>
ah, ok
toertore has joined #ruby-lang
mikeric has joined #ruby-lang
toretore has joined #ruby-lang
jxie has joined #ruby-lang
digestives has quit [#ruby-lang]
sholden has joined #ruby-lang
toertore has joined #ruby-lang
fayimora has joined #ruby-lang
jacobwg has joined #ruby-lang
RORgasm has joined #ruby-lang
phwd has joined #ruby-lang
<phwd>
Hey which irc channel can I ask about gems and bundler?
mikeric has joined #ruby-lang
kara_sweets has joined #ruby-lang
<asahi>
I sent a message to an @rubyforge.org mailing list. I received a response but it's in the form of a digest and I'm not sure how to respond to the specific topic. can someone guide me?
<erikh>
phwd: #bundler
<erikh>
or #rubygmes
<erikh>
#rubygems.
brianpWins has joined #ruby-lang
<erikh>
depending on the topic, #rubygems will send you to #bundler
<erikh>
anyhow
<erikh>
asahi: replying to the digest is probably ok. just be sure to only include the text you're replying to.
<erikh>
some email clients can handle mime digests better than others.
havenn has joined #ruby-lang
<asahi>
erikh: okay, it seems like maybe I should also change the subject line
<erikh>
sure, but it won't matter for most clients.
<erikh>
email clients use what's called a "reference id" to track threading -- and the subject is a nice fallback, but frequently causes trouble
<erikh>
if you plan on participating in the list frequently, turn digesting off. I know that doesn't solve your existing problem but it will solve future ones.
<imperator>
"backlog: a land of forgotten dreams" - indeed
<slyphon>
it's so fucking true
jondot__ has joined #ruby-lang
<slyphon>
at work, they're doing "agile" in the most orthodox, corporate way you can imagine
<slyphon>
it's depressing as hell
<imperator>
oof
benanne has joined #ruby-lang
<imperator>
we did agile at my last job
<imperator>
mix of good and bad
<imperator>
"daily scrum: weekly two-hour long meeting" - been there, done that
<imperator>
spent more time in meetings in 1.5 years in an agile environment than i did in 8 years in a corporate environment
<imperator>
well, too be fair, it wasn't all agile related, but still
<virunga>
Look at my horse. My horse is amazing.
<imperator>
is it an american horse?
* imperator
's gone crazy, completely crazy
nofxxxx has joined #ruby-lang
<imperator>
slyphon, this is awesome
fattastic has joined #ruby-lang
<slyphon>
yeah!
nofxxx has joined #ruby-lang
S1kx has joined #ruby-lang
dv310p3r has joined #ruby-lang
olesu has joined #ruby-lang
travisjeffery has joined #ruby-lang
nofxxxx has joined #ruby-lang
<asahi>
if I rescue an exception and invoke pry, how can I access the exception, including information like file and line number that caused the exception?
<Mon_Ouie>
$!, or some local variable you may have stored the exception into
jarred has joined #ruby-lang
<asahi>
Mon_Ouie: ah okay thanks
wmoxam has joined #ruby-lang
<Defusal>
ged: ok, good to know you are here
diegoviola has joined #ruby-lang
nofxxx has joined #ruby-lang
<Defusal>
ged, if it can tell what kinds word each is, the following should be possible: "person was".pluralize => "people were"
<Defusal>
*kind each word
Manhose has joined #ruby-lang
<Defusal>
too much caffeine heh :P
<Defusal>
i need to be able to load a module/class without evaluating class methods and other code written in the class scope. the only way to do so that i have thought of so far is stubbing and storing all method and constant calls and storing them in order until ready to evaluate the loaded module. if anyone can think of a better solution, please let me know
rippa has joined #ruby-lang
<Mon_Ouie>
Maybe you could just create the class/module object (like SomeClass = Class.new(MaybeSomeSuperclass)), and use load or require later
raph_io has joined #ruby-lang
dejongge has joined #ruby-lang
erics has joined #ruby-lang
francisfish has joined #ruby-lang
<ridders24>
Why does the gets.chomp() not work correctly on my script and doesnt wait for me to input somthing? http://pastebin.com/eBmgx2eR
Skif has joined #ruby-lang
<imperator>
ridders24, does for me? what version, what platform?
<ridders24>
imperator: really?! im running ruby 1.8.7 on win7
<Mon_Ouie>
Because ARGV[0] is set
shevy has quit [#ruby-lang]
<Mon_Ouie>
And therefore, ARGF interprets it as a filename to read from
<ridders24>
Mon_Ouie: what should it be?
<Mon_Ouie>
and gets is short for ARGF.gets
<Mon_Ouie>
You should use $stdin.gets
<Mon_Ouie>
And, you should use a loop instead of repeating all those calls to Dir.glob with the same block
wdperson has joined #ruby-lang
<ridders24>
even though the path is different each time?
l0st1 has joined #ruby-lang
<Mon_Ouie>
That's what the loop would be for
<ridders24>
ok cheers I'll look into that
RORgasm has joined #ruby-lang
<ridders24>
Mon_Ouie: actually somthing else I wanted to ask was ive noticed that if my input file has more than 6000 lines of potential paths, the script doesnt give a proper path a just repeats the drive letter over and over, but any less than 6000 roughly the script works perfectly. What would cause this?
Zolrath has joined #ruby-lang
avdi has joined #ruby-lang
wallerdev has joined #ruby-lang
<ridders24>
Mon_Ouie: any ideas?
<rue>
Only repeats, or starts repeating at some point?
replore_ has joined #ruby-lang
imajes has joined #ruby-lang
kyrylo has joined #ruby-lang
<yorickpeterse>
Problem: I'm using a Gem that uses Tempfile for storing data. However, this gem does not unlink the tempfiles after it no longer needs them, thus these files stay around until the process is stopped.
<yorickpeterse>
Is there a nice way of removing these files or is Dir.glob the way to go?
<ridders24>
rue: how do you mean ?
<yorickpeterse>
(the file names have a common prefix)
hahuang65_ has joined #ruby-lang
justinmcp has joined #ruby-lang
lsegal has joined #ruby-lang
banseljaj has joined #ruby-lang
carloslopes has joined #ruby-lang
kyrylo has joined #ruby-lang
<Defusal>
Mon_Ouie: thing is certain methods need to be loaded before everything else
<Defusal>
i forgot to mention that
<ridders24>
why does my script on handle roughly 6000 lines in the input? if I have an input file with more than 6000 lines it just produces a list of the drive letter that Dir.glob is looking at. http://pastebin.com/eBmgx2eR
<Defusal>
basically, i need modules to be able to define methods that get added to the base module of all modules, including class methods which are in the class body of modules, so i need to stop all methods from being called until the methods have been added from every module
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
havenn has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
_Andres has joined #ruby-lang
Watcher7 has joined #ruby-lang
tenderlove has joined #ruby-lang
willdrew has joined #ruby-lang
melter has joined #ruby-lang
hahuang65_ has joined #ruby-lang
Austin__ has joined #ruby-lang
tenderlo_ has joined #ruby-lang
elephants has joined #ruby-lang
skiz has joined #ruby-lang
srbartlett has joined #ruby-lang
s0ber has joined #ruby-lang
A124 has joined #ruby-lang
wdperson has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
singpolyma has joined #ruby-lang
s3mi0 has joined #ruby-lang
<ridders24>
mistym: are you there?
<mistym>
ridders24: Yup.
<ridders24>
mistym: does dir.glob have a limit of how many things it can do ?
<mistym>
What do you mean?
<drbrain>
ridders24: how much memory can your process allocate?
<andrewvos>
ridders24: It can do all the things.
<mistym>
the only limit at zombocom is yourself
petercooper has joined #ruby-lang
<ridders24>
the problem I have is when i load an input into my script that has more than 6000 lines it, the output just procduces the drive letter not the complete path
<ridders24>
anything less than 6000 the script works fine and produces a list of full paths
pmros has joined #ruby-lang
<ridders24>
I dont know why its doing that?
<skiz>
"drive letter" *wild guess*
elephants has joined #ruby-lang
<ridders24>
what about the drive letter?
davidtspf01 has joined #ruby-lang
bglusman has joined #ruby-lang
davidtspf03 has joined #ruby-lang
davidtspf has joined #ruby-lang
macmartine has joined #ruby-lang
<asahi>
hello, I can I rescue the exception 404 => Net::HTTPNotFound?
davidtspf has joined #ruby-lang
pmros_ has joined #ruby-lang
davidtspf05 has joined #ruby-lang
<apeiros_>
asahi: sure
<carloslopes>
asahi: yes, begin rescue end don't resolve your problem?
<asahi>
nevermind. I should've googled it first. it's a Mechanize::ResponseCodeError
<asahi>
carloslopes: I was trying to figure out how to rescue that specific exception
<canton7>
rescue Net::HTTPNotFound ?
<carloslopes>
asahi: canton7 give you the response :)
s3mi0 has quit [#ruby-lang]
elephants has joined #ruby-lang
<asahi>
I learned that it's a Mechanize::ResponseCodeError, which has a to_s method that makes it look like a Net::HTTPNotFound
<carloslopes>
asahi: you can use 'rescue Exception => e' and handle the exception if it is Net::HTTPNotFound, if it's not, throw it again
Kero has joined #ruby-lang
workmad3 has joined #ruby-lang
<asahi>
carloslopes: what's the difference between that and 'rescue'?
<apeiros_>
rescue Exception is a *very* bad idea
<apeiros_>
don't do it
krz has joined #ruby-lang
<apeiros_>
(it rescues things like Interrupt, SystemExit, NoMemoryError etc. - which you usually do not want to rescue)
<carloslopes>
apeiros_: asahi: well, i didn't know about this.... sorry asahi :/
<apeiros_>
a plain rescue defaults to StandardError btw.
<carloslopes>
hmm yes
<carloslopes>
it's better
<canton7>
I have seen 'rescue Object'... that was in shotgun, in a fork, and causes that process to die gracefully
<canton7>
*forked process, I should say
<apeiros_>
it's pointless
<apeiros_>
you can't raise anything that doesn't inherit from Exception.
<carloslopes>
i forgot that StandardError is a sub-class of Exception and all other exception (except Memory and etc) inherit from it
<apeiros_>
carloslopes: yeah, sadly some 3rd party lib authors fail and inherit from Exception instead of StandardError (or even something more appropriate, like ArgumentError)
<carloslopes>
apeiros_: yes, sorry, my bad :/
<apeiros_>
carloslopes: no, I mean… you rescued Exception. but some people write exception classes like: class MySpecialException < Exception
<apeiros_>
(which is bad too)
<carloslopes>
apeiros_: ahh, yes.. i have seen this but the correct is inherit from StandardError
<carloslopes>
the convention says this :)
<apeiros_>
yes, or as said, where possible something more appropriate, like e.g. ArgumentError
roha has joined #ruby-lang
<apeiros_>
(if your exception is a specialization of an argument error, like e.g. InvalidPort)
<carloslopes>
asahi: so, it's better you use rescue StandardError => e and to answer your question the difference is that this way, you have the 'e' object that have the exception details
<rue>
No, just rescue => e
<carloslopes>
rue: what's the difference between them?
<rue>
The difference is that if you write StandardError, people are going to wonder why you did that
<asahi>
thanks all. gotta run
<carloslopes>
rue: hmm it's only and a small form to do this.. fine :)
<rue>
Then you're the people
havenn has joined #ruby-lang
<carloslopes>
rue: ;)
headius has joined #ruby-lang
francisfish has joined #ruby-lang
rdavila has joined #ruby-lang
Skif has joined #ruby-lang
pygmael has joined #ruby-lang
roha has joined #ruby-lang
Watcher7_ has joined #ruby-lang
ridders24 has joined #ruby-lang
bryancp has joined #ruby-lang
imperator has joined #ruby-lang
<zenspider>
rawr
<any-key>
agh
Radium has joined #ruby-lang
<apeiros_>
I never knew spiders rawred
roha has joined #ruby-lang
havenn has joined #ruby-lang
Jade- has joined #ruby-lang
TheDracle has joined #ruby-lang
iosctr has joined #ruby-lang
dankest has joined #ruby-lang
travisjeffery has joined #ruby-lang
mistym_ has joined #ruby-lang
bryancp has joined #ruby-lang
kara_sweets has quit [#ruby-lang]
msisk has joined #ruby-lang
TheDracle has joined #ruby-lang
srbartlett has joined #ruby-lang
RORgasm has joined #ruby-lang
<rue>
Eek
havenn has joined #ruby-lang
postmodern has joined #ruby-lang
havenn has joined #ruby-lang
adpirz has joined #ruby-lang
brianpWins has joined #ruby-lang
erics has joined #ruby-lang
<erikh>
Ook
_tca has joined #ruby-lang
dejongge1 has joined #ruby-lang
<zenspider>
so... since we added the extra voice measures to the channel... what's the concensus?
headius has joined #ruby-lang
wmoxam has joined #ruby-lang
<imperator>
seems to be going alright
<rue>
Everything's peachy except erikh seems to have been turned into an orangutan
rdeshpande has joined #ruby-lang
* imperator
now refers to erikh as "Clyde"
<zenspider>
good good
igaiga has joined #ruby-lang
<erikh>
I haven't been able to notice
<erikh>
(which is good)
bryancp has joined #ruby-lang
tomzx has joined #ruby-lang
Zolrath has joined #ruby-lang
ironcamel has joined #ruby-lang
<ironcamel>
gem now lets you install gems locally?
<ironcamel>
i just did gem install vagrant as a regular user and it worked
<zenspider>
that's been the case for too long
<zenspider>
I honestly wish that never went into play
mikeric has joined #ruby-lang
<imperator>
locally?
<zenspider>
I think he means ~/.gem
<zenspider>
aka --user-install
cantonic has joined #ruby-lang
<ironcamel>
yeah, ~/.gem
<imperator>
oic
<ironcamel>
zenspider: why don't you like that?
<ironcamel>
zenspider: should i be installing gems as root?
<ironcamel>
i tried installing it as root, but it then put the vagrant executable inside /root/.gem/ruby/1.9.1/bin ... which is kinda nasty
<zenspider>
because it was poorly tested, shoddy impl, lots of bugs and we already support gem install -i location
<drbrain>
ironcamel: wow, your GEM_HOME is really weird
<zenspider>
yeah. that's not right
<ironcamel>
drbrain: its a fresh arch linux box
<zenspider>
that'd be why... :P
<zenspider>
don't install rubygems on linux via pkg mgmt
rdavila has joined #ruby-lang
<ironcamel>
zenspider: what is the right way?
<zenspider>
invariably their dogma breaks everything
<ironcamel>
zenspider: i didn't actually
<ironcamel>
i did gem install vagrant
<zenspider>
I meant rubygems itself
<zenspider>
the general consensus is to use rvm to install ruby on linux
<ironcamel>
ah, i don't know how that got installed
<ironcamel>
i just installed ruby package
<ironcamel>
oh, i was hoping i wouldnt have to deal with rvm
<zenspider>
it has much better troubleshooting and properly handles ruby/rubygems
<ironcamel>
arch even ships ruby 1.9 by default
<zenspider>
if you want to deal with broken... stick with what you have
<ironcamel>
you guys should like that
<zenspider>
osx ships with ruby... and apple doesn't fuck with it. no dogma. I like that.