ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
t59124 has quit [Remote host closed the connection]
t39725 has joined #ruby-lang
Nisstyre_ has joined #ruby-lang
sora_h is now known as s0ra_h
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby-lang
Axsuul has quit [Ping timeout: 272 seconds]
s0ra_h is now known as sora_h
guns has quit [Quit: guns]
chendo has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
havenn has joined #ruby-lang
_|christian|_ has quit []
Axsuul has joined #ruby-lang
woollyams has joined #ruby-lang
guns has joined #ruby-lang
Xzyx987X has joined #ruby-lang
gsav has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
Skif has joined #ruby-lang
t39725 has quit [Remote host closed the connection]
t66626 has joined #ruby-lang
saxy has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
toretore has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Ping timeout: 268 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
spuk has quit [Ping timeout: 248 seconds]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
Criztian has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
saxy has joined #ruby-lang
chendo_ has quit [Ping timeout: 245 seconds]
nXqd has quit [Ping timeout: 244 seconds]
woollyams has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
AnarchoTroll has quit [Quit: Leaving]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
ghanima has joined #ruby-lang
saxy has quit [Remote host closed the connection]
dous has quit [Remote host closed the connection]
<ghanima> hey guys quick question I am in the process of implementing a rest client and doing some research on the Web Their seems to be 2 main options the gem rest_client or ActiveResource
<ghanima> just curious if anyone has any opinion of the 2 options above
m3nd3s has quit [Remote host closed the connection]
t66626 has quit [Remote host closed the connection]
t39356 has joined #ruby-lang
deryl has joined #ruby-lang
ando has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
saxy has joined #ruby-lang
ruby-lang522 has joined #ruby-lang
ruby-lang522 has quit [Client Quit]
Torrieri has quit [Ping timeout: 244 seconds]
areil has joined #ruby-lang
justinseiter has joined #ruby-lang
justinseiter has quit [Client Quit]
woollyams has quit [Quit: Computer has gone to sleep.]
stardiviner has joined #ruby-lang
<erikh> rest-client is a really poorly named Net::HTTP simplification layer / abstraction
<erikh> ghanima: the short of it is anything that can speak HTTP will probably do what RestClient can
<ghanima> erikh: with rest_client how do you set http headers
<erikh> it's in the third argument as a hash, iirc
<erikh> it's in the docs.
toretore has joined #ruby-lang
t39356 has quit [Remote host closed the connection]
t43424 has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]
alex_kira has joined #ruby-lang
yankov has joined #ruby-lang
yankov_ has quit [Ping timeout: 244 seconds]
alex_kira has quit [*.net *.split]
Skif has quit [*.net *.split]
pygmael has quit [*.net *.split]
mahlon has quit [*.net *.split]
jmcphers has quit [*.net *.split]
Guest23084 has quit [*.net *.split]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
stardiviner has joined #ruby-lang
jdub has joined #ruby-lang
jdub has quit [Client Quit]
jdub-ruby-lang39 has joined #ruby-lang
pygmael has joined #ruby-lang
deryl has quit [Quit: deryl]
Torrieri has joined #ruby-lang
t43424 has quit [Remote host closed the connection]
t8853 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
kingCrawlerx has joined #ruby-lang
slyphon has joined #ruby-lang
spuk has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
justinmcp has joined #ruby-lang
guns has quit [Quit: guns]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
neocoin has joined #ruby-lang
Tearan has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
rohit has joined #ruby-lang
havenn has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
havenn has joined #ruby-lang
deryl has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
banisterfiend has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 260 seconds]
ghanima has quit [Quit: Leaving.]
gsav has quit [Read error: Connection reset by peer]
woollyams has quit [Quit: Computer has gone to sleep.]
t8853 has quit [Remote host closed the connection]
guns has joined #ruby-lang
t85076 has joined #ruby-lang
havenn_ has joined #ruby-lang
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
mistym has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
ghanima has joined #ruby-lang
slyphon_ has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
banisterfiend has quit [Ping timeout: 264 seconds]
countdigi has quit [Read error: Connection reset by peer]
Marc3000 has joined #ruby-lang
Fullmoon has joined #ruby-lang
deryl has quit [Quit: deryl]
Defusal_ has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
Defusal has quit [Ping timeout: 265 seconds]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
burgestrand has joined #ruby-lang
burgestrand has quit [Client Quit]
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
ruskie has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby-lang
ghanima has quit [Ping timeout: 248 seconds]
deryl has joined #ruby-lang
countdigi has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
ramonmaruko has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
ramonmaruko has joined #ruby-lang
gsav has joined #ruby-lang
cha1tanya has joined #ruby-lang
pygmael has quit [Read error: Connection reset by peer]
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
pygmael has joined #ruby-lang
rohit has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
t85076 has quit [Remote host closed the connection]
t5212 has joined #ruby-lang
sepp2k has joined #ruby-lang
gsav has quit [Ping timeout: 256 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
Nisstyre_ has quit [Ping timeout: 246 seconds]
saxy has quit [Remote host closed the connection]
gsav has joined #ruby-lang
yxhuvud has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
gsav has quit [Read error: Connection reset by peer]
perryh is now known as perry
ryanf has quit [Quit: leaving]
s1n4 has joined #ruby-lang
yats has joined #ruby-lang
ghanima has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
WillMarshall has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
havenn has joined #ruby-lang
chendo_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
havenn has quit [Remote host closed the connection]
ttilley has joined #ruby-lang
rohit has joined #ruby-lang
Fullmoon has quit [Quit: Fullmoon]
dmartenson has joined #ruby-lang
ruskie has joined #ruby-lang
dmartenson has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 244 seconds]
deryl has quit [Quit: deryl]
nXqd has quit [Ping timeout: 268 seconds]
pbjorklund has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby-lang
ghanima1 has joined #ruby-lang
ghanima has quit [Ping timeout: 244 seconds]
nXqd has joined #ruby-lang
burgestrand has joined #ruby-lang
Tearan has quit [Quit: Sleepy Badger....]
gsav has joined #ruby-lang
gsav has quit [Client Quit]
gsav has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
rohit has quit [Ping timeout: 252 seconds]
mytrile has joined #ruby-lang
kain has quit [Ping timeout: 260 seconds]
saxy has joined #ruby-lang
x0F_ has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
saxy has quit [Ping timeout: 246 seconds]
Skif has joined #ruby-lang
Guest23084 has joined #ruby-lang
mahlon has joined #ruby-lang
jmcphers has joined #ruby-lang
alex_kira has joined #ruby-lang
jdub-ruby-lang39 has quit [Changing host]
jdub-ruby-lang39 has joined #ruby-lang
dc5ala has joined #ruby-lang
<banisterfiend> drbrain: yo
<banisterfiend> drbrain: what's the new API for Gem.all_load_paths ?
cirwin has joined #ruby-lang
zmack has joined #ruby-lang
sinclair has joined #ruby-lang
kingCrawlerx has quit [Quit: Computer has gone to sleep]
gsav has quit [Read error: Connection reset by peer]
<sinclair> hi everyone
gsav has joined #ruby-lang
guns has quit [Ping timeout: 264 seconds]
sinclair has left #ruby-lang [#ruby-lang]
zmack has quit [Remote host closed the connection]
t5212 has quit [Remote host closed the connection]
t46341 has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
gsav has quit [Read error: Connection reset by peer]
jdub-ruby-lang39 has quit [Ping timeout: 245 seconds]
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 244 seconds]
cha1tanya has quit [Read error: Connection reset by peer]
yats has quit [Read error: Connection reset by peer]
chendo_ has quit [Ping timeout: 272 seconds]
<yorickpeterse> ohai
kitallis has joined #ruby-lang
rue has quit [Ping timeout: 268 seconds]
rue has joined #ruby-lang
chendo_ has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
runeb has joined #ruby-lang
cha1tanya has joined #ruby-lang
yats has joined #ruby-lang
vesan has quit [Ping timeout: 260 seconds]
yankov has quit [Quit: yankov]
Banistergalaxy has quit [Ping timeout: 252 seconds]
znake has joined #ruby-lang
thone has joined #ruby-lang
d3vic3 has joined #ruby-lang
rue has quit [Remote host closed the connection]
Jan_ has joined #ruby-lang
thone_ has quit [Ping timeout: 264 seconds]
saxy has joined #ruby-lang
heftig has joined #ruby-lang
saxy has quit [Ping timeout: 246 seconds]
t46341 has quit [Remote host closed the connection]
t45994 has joined #ruby-lang
goshakkk has joined #ruby-lang
graemenelsonpdx has joined #ruby-lang
graemenelsonpdx has left #ruby-lang [#ruby-lang]
chendo_ has quit [Ping timeout: 240 seconds]
<Marc3000> Hello guys, I am having a little problem trying use a path to a file as an argument to my script... right after processing the file I have a "gets" method that asks user for input but when I pass any argument to the script through ARGV "gets" fails to get any input.
Hakon has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
stardiviner has joined #ruby-lang
ttilley has quit [Quit: ttilley]
runeb has quit [Remote host closed the connection]
kaz_ has quit [Remote host closed the connection]
znake has quit [Quit: znake]
Jan_ has left #ruby-lang [#ruby-lang]
DefV has joined #ruby-lang
slyphon_ has quit [Ping timeout: 245 seconds]
chendo_ has quit [Ping timeout: 264 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
zmack has joined #ruby-lang
Hakon has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby-lang
rolfb has joined #ruby-lang
runeb has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
solars has joined #ruby-lang
Torrieri has quit [Quit: Saliendo]
vlad_starkov has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
t45994 has quit [Remote host closed the connection]
t28876 has joined #ruby-lang
<yorickpeterse> Put some code in a pastebin
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
sora_h is now known as s0ra_h
goshakkk has quit [Quit: Computer has gone to sleep.]
<Marc3000> here it is: http://pastebin.com/Bb7EUF65
<Marc3000> I'm on linux, by the way
qwerxy has quit [Quit: offski]
goshakkk has joined #ruby-lang
<yorickpeterse> marc3000: please don't re-invent the wheel of parsing CLI options
<yorickpeterse> use OptionParser instead (comes with stdlib) or one of the billion gems for it
<Marc3000> man, this is for educational purposes, have you any idea of why this happens?
<yorickpeterse> Also, just the statement `a1 == "-o" and a2.size > 0` isn't useful since you're not doing anything with the returned value
cirwin has quit [Ping timeout: 276 seconds]
<yorickpeterse> Also, in your case you're better off doing `File.open('...').lines { |line| ... }`
<yorickpeterse> In your case you're processing each character so reading it character by character gives you no performance benefit
dhruvasagar has quit [Ping timeout: 240 seconds]
<yorickpeterse> Oh wait, #gets() in this case returns the line
<Marc3000> which line do you mean?
dhruvasagar has joined #ruby-lang
qwerxy has joined #ruby-lang
JohnBat26 has joined #ruby-lang
s0ra_h is now known as sora_h
charliesome has joined #ruby-lang
<DefV> marc3000: a1 and a2 are terrible variable names, btw
<DefV> if it's meant for educational purposes
toretore has joined #ruby-lang
<Marc3000> hehehe
<Marc3000> I just made something real fast for pasting
<rolfb> yeah, short variables sucks for understanding
<rolfb> but then again it's better to have short variables than no examples
<rolfb> ^^
<Marc3000> I am just trying to get this argument open the file and then ask the user if he wants to read the results or not, a quite simple demonstration program.
<Marc3000> then when I get to that line...
<Marc3000> >> print "Type here: "
<Marc3000> >> choix = gets.to_i
<Marc3000> some weird errors happen
ACK__ has joined #ruby-lang
<yorickpeterse> gets will, if I'm not mistaken, return `nil` upon no value
<yorickpeterse> to #to_i will fail in that case
ACK__ has quit [Client Quit]
goshakkk has quit [Quit: Computer has gone to sleep.]
<DefV> yorickpeterse: nil.to_i is 0
<yorickpeterse> hm
<Marc3000> well, anyway, thank you guys.
sora_h is now known as s0ra_h
<DefV> marc3000: what fails on your end is the chomp clal
<Marc3000> chomp isnt the problem
<Marc3000> i tried without it
Marc3000 has left #ruby-lang [#ruby-lang]
runeb has quit [Remote host closed the connection]
solars has quit [Ping timeout: 260 seconds]
wooze has joined #ruby-lang
t28876 has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
t26406 has joined #ruby-lang
yats has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
runeb has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
yats has joined #ruby-lang
neocoin has joined #ruby-lang
banisterfiend has quit [Ping timeout: 260 seconds]
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
runeb- has joined #ruby-lang
runeb has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
runeb- is now known as runeb
banisterfiend has joined #ruby-lang
WillMarshall has joined #ruby-lang
WillMarshall has quit [Client Quit]
runeb has quit [Ping timeout: 265 seconds]
chendo_ has quit [Ping timeout: 246 seconds]
wooze has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
woollyams has joined #ruby-lang
qwerxy has quit [Quit: offski]
s0ra_h is now known as sora_h
Banistergalaxy has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
solars has quit [Ping timeout: 248 seconds]
asaaki has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
workmad3 has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
Hakon has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
solars has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
pygmael has quit [Read error: Connection reset by peer]
pygmael has joined #ruby-lang
ruurd has joined #ruby-lang
chendo_ has quit [Ping timeout: 244 seconds]
runeb has joined #ruby-lang
sora_h is now known as s0ra_h
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
neocoin has joined #ruby-lang
pygmael has quit [Read error: Connection reset by peer]
foucist has joined #ruby-lang
Criztian has quit []
<foucist> hey guys, what's the preferred loop when the count is from 22 to 106000 ? is (22..106000).each efficient or wasteful?
cha1tanya has quit [Quit: Leaving]
<foucist> or is i= 22, begin.. end unless i ==10600 better ?
<bnagy> neither
<bnagy> if you're fretting about 'wasteful' loop constructs you're doing it wrong
<bnagy> use whatever is more readable
<bnagy> personally I like (x..y).each {|i|, some people like x.upto(y)
ruurd has quit [Quit: Leaving...]
runeb has quit [Remote host closed the connection]
judofyr has quit [Read error: Connection reset by peer]
ruurd has joined #ruby-lang
judofyr has joined #ruby-lang
runeb has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby-lang
<yorickpeterse> `22.upto(10600) { |n| ... }` works as well
dhruvasagar has quit [Remote host closed the connection]
<yorickpeterse> ah, bnagy mentioned that already
<foucist> yeah, went with that
adambeynon has joined #ruby-lang
petercooper has joined #ruby-lang
judofyr_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
judofyr_ has left #ruby-lang [#ruby-lang]
judofyr has joined #ruby-lang
s0ra_h is now known as sora_h
<matti> ;-)
asaaki has quit [Quit: Computer has gone to sleep.]
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
JoshWines has quit [Quit: Leaving]
d3vic3 has quit [Read error: Connection reset by peer]
goshakkk has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Axsuul has quit [Ping timeout: 260 seconds]
woollyams has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
brunocoelho has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
brunocoelho has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
asaaki has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
slyphon_ has joined #ruby-lang
asaaki has quit [Quit: Bye!]
dhruvasagar has quit [Ping timeout: 268 seconds]
dhruvasagar has joined #ruby-lang
t26406 has quit [Remote host closed the connection]
t21992 has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
yats has quit [Quit: Leaving]
d3vic3 has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
rue_XIV has joined #ruby-lang
saxy has joined #ruby-lang
rue_XIV has quit [Disconnected by services]
rue has joined #ruby-lang
rue has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
|Vargas| has quit [Ping timeout: 268 seconds]
b3nt_pin has joined #ruby-lang
sush24 has joined #ruby-lang
t21992 has quit [Remote host closed the connection]
t43668 has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<sush24> Can I do something like this on Ruby? http://pastebin.com/avT0eujm
<banisterfiend> sush24: retry ?
<yorickpeterse> Doesn't that start it over again?
<darix> banisterfiend: retry would call that long running method again i think
<sush24> banister I actually not want to do that
<sush24> *dont
<yorickpeterse> I think the only do-able way is to keep track of the state of the method call yourself
<darix> i think he wants to check every second if the @processcanceled is set
<darix> sush24: what sets @processCancelled ?
<darix> signal handler?
m3nd3s has quit [Read error: Connection timed out]
<sush24> darix, umm.. it's a variable..
<darix> sush24: when and why do you set it?
<banisterfiend> sush24: so, you just want a no-op ?
<darix> sush24: and what exactly are you trying to achieve
<sush24> darix, it's actually set from objective C runtime..
<sush24> darix, implement a cancel feature
<darix> then yorickpeterse is right ... check it in your long running function
<darix> or in a 2nd thread that then will kill the first thread
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<sush24> darix, hmm.. the first one is out of my hand
<sush24> darix, killing.. isn't that looked down upon
<sush24> ?
seele1 has joined #ruby-lang
<sush24> banisterfiend, I'm not sure what that means *googling*
<banisterfiend> sush24: nm
dhruvasa1ar has joined #ruby-lang
<darix> sush24: are you sure your long running function is still running when you reach that exception handler?
tbuehlmann has joined #ruby-lang
<banisterfiend> darix: so he wants to continue on from inside the long running method?
<darix> banisterfiend: yes
<banisterfiend> he can use callcc for that maybe
<banisterfiend> ah, sounds like a use for callcc
dhruvasagar has quit [Ping timeout: 244 seconds]
<banisterfiend> i use callcc for something similar in one of my libs
runeb has quit [Remote host closed the connection]
<darix> banisterfiend: can you jump back to the place where you were before the exception got fired?
<banisterfiend> darix: Yeah
<banisterfiend> so long as you save it before the exception got raisd ;)
<darix> hmhm
runeb has joined #ruby-lang
<darix> given the timeout is external to the long running function ...
<darix> but well
<sush24> darix, Method: Net::IMAP#uid_fetch is the long running process.. this thing is unpredictable due to bandwidth… internet and stuff
mistym has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
voker57 has quit [Ping timeout: 264 seconds]
sailias has joined #ruby-lang
<darix> so again ... why not run it in a thread. and have 2nd thread handling UI/objective C stuff
<darix> and when you want to cancel ... you just kill that other thread
runeb has quit [Read error: Connection reset by peer]
runeb has joined #ruby-lang
<sush24> darix, i did ask that in the objective c irc… they said.. that's not recommended as that'll screw up data structures… file lock etc
carloslopes has joined #ruby-lang
m3nd3s has quit [Read error: Connection reset by peer]
<darix> uhm
<darix> ok .... just one last question ... why do you use ruby in an objective C app?:)
m3nd3s has joined #ruby-lang
<sush24> darix, macruby… :) i love how easy it is
<banisterfiend> darix: i think u asked about this ages ago http://cirw.in/blog/pry-to-the-rescue
<darix> banisterfiend: woot! :D
FierceApollo has joined #ruby-lang
<darix> sush24: uhm ... so macruby doesnt support ruby threads properly?
<darix> also i dont see how 2 threads that do totally different things can interfer with each others datastructures
<judofyr> sush24: doesn't MacRuby support Grand-Central-Dispatch too?
<sush24> judofyr, yes..
<sush24> darix, hmm..
<sush24> i have implemented the conditional loop breaking usually done for cancel functionality … this is one thing I'm stuck
<sush24> darix, i guess i could run only uid_fetch on a different thread..
<darix> sush24: that was the idea :)
rue|w has joined #ruby-lang
FierceApollo has quit []
<rue|w> Hmm
icooba has quit [Ping timeout: 244 seconds]
<darix> moin rue
sailias has quit [Quit: Leaving.]
icooba has joined #ruby-lang
<rue|w> Hidyho
m3nd3s has quit [Read error: Connection timed out]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
jxie has quit [Quit: leaving]
<zzak> good morning!
m3nd3s has joined #ruby-lang
<judofyr> morning!
d3vic3 has quit [Ping timeout: 256 seconds]
d3vic3 has joined #ruby-lang
workmad3 has joined #ruby-lang
ghanima1 has quit [Quit: Leaving.]
<rue|w> It’s so not morning
<yorickpeterse> Just say "good morning/afternoon/evening/night" next time
<yorickpeterse> that way you're bound to have all the TZs right
Guedes_out is now known as Guedes
s1n4 has quit [Quit: leaving]
<judofyr> didn't we decide on using UGT here?
<judofyr> *bad rue|w*
<yorickpeterse> ha
wallerdev has joined #ruby-lang
<judofyr> (it's 15:06 here)
<judofyr> but the moment zzak entered, it magically became morning
<judofyr> quite amazing
<yorickpeterse> judofyr: you lie
<yorickpeterse> your message was sent at 15:07:10
<judofyr> Norwegian clocks are 11 seconds too slow
<judofyr> (by definition)
<yorickpeterse> Ah yes, must be the altitude
<judofyr> it's always the altitude
<yorickpeterse> Though if that were true my clocks would be several seconds ahead
<yorickpeterse> seeing how the altitude I live at is a negative value
<judofyr> yorickpeterse: where is that?
heftig has quit [Ping timeout: 246 seconds]
<yorickpeterse> NL
<judofyr> yorickpeterse: I have a dutch guy right next to me here :D
<banisterfiend> judofyr: is his hair slicked back with hair gel
<yorickpeterse> haha
m3nd3s has quit [Read error: Connection timed out]
<judofyr> banisterfiend: http://mlkshk.com/p/IMA8
<banisterfiend> jesus that guy is all forearms and elbows
<yorickpeterse> dat hipster
<banisterfiend> i bet he knocks computer monitors off desks when he walks through the room
<banisterfiend> nice sweater btw ;)
m3nd3s has joined #ruby-lang
rue has joined #ruby-lang
<foucist> hipster? it's retro-hipster
<foucist> pre-hipster? hmm
<banisterfiend> hipster before it was cool
heftig has joined #ruby-lang
stardiviner has joined #ruby-lang
<matti> LOL
<judofyr> he's also created my favorite font: http://robmientjes.nl/item/comic-serif
justinmcp has joined #ruby-lang
dabradley has quit [Read error: Connection reset by peer]
<matti> ROTFL
<matti> Comic Serif
<matti> Is like a bastard child of Courier New and Cominc Sans
<banisterfiend> judofyr: can he use interface builder?
<banisterfiend> judofyr: i need a designer who can use interface builder
rue has quit [Ping timeout: 256 seconds]
<jaska> aargh @ that font
<darix> wtf is interface builder?
t43668 has quit [Remote host closed the connection]
t25097 has joined #ruby-lang
bryancp has joined #ruby-lang
<banisterfiend> darix: the xcode tool for building UIs
<darix> ah
<judofyr> banisterfiend: I think he has plenty of other stuff to do
<banisterfiend> judofyr: well it would just be a little freelance side project if he was interested
<banisterfiend> judofyr: probalby wouldn't take him more than a weekend, but i was just curious if he had those skills
sepp2k1 has joined #ruby-lang
<banisterfiend> judofyr: essentially prettifying my own feeble attempt at a UI ;)
codewrangler has joined #ruby-lang
deryl has joined #ruby-lang
dabradley has joined #ruby-lang
<banisterfiend> finding designers with IB skills is a bit difficult
sepp2k has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby-lang
slyphon_ has quit [Ping timeout: 245 seconds]
<foucist> comic serif seems pretty nice to me
<foucist> i downloaded it
justinmcp has quit [Remote host closed the connection]
m3nd3s has quit [Read error: Connection timed out]
mistym has quit [Remote host closed the connection]
jbsan has quit [Quit: jbsan]
m3nd3s has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
goshakkk has joined #ruby-lang
scampbell has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
kain has joined #ruby-lang
mistym has quit [Remote host closed the connection]
t25097 has quit [Remote host closed the connection]
t41672 has joined #ruby-lang
saxy has quit [Remote host closed the connection]
asaaki has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
asaaki has quit [Client Quit]
bytephilia has joined #ruby-lang
asaaki has joined #ruby-lang
vesan has joined #ruby-lang
headius has joined #ruby-lang
m3nd3s has quit [Read error: Connection timed out]
slyphon_ has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
fgomez has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
Austin__ has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
slyphon_ is now known as slyphon
m3nd3s has joined #ruby-lang
t41672 has quit [Remote host closed the connection]
t36858 has joined #ruby-lang
rins has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
qwerxy has joined #ruby-lang
JohnBat26 has joined #ruby-lang
ghanima has joined #ruby-lang
nXqd has quit [Ping timeout: 244 seconds]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
t36858 has quit [Remote host closed the connection]
sailias has joined #ruby-lang
t20572 has joined #ruby-lang
jordan` has quit [Ping timeout: 245 seconds]
lcdhoffman has joined #ruby-lang
jordan` has joined #ruby-lang
tjadc has joined #ruby-lang
anaconda99 has quit [Remote host closed the connection]
dhruvasa1ar has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
bytephilia has quit [Ping timeout: 244 seconds]
rippa has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
jxie has joined #ruby-lang
KING has joined #ruby-lang
KING is now known as Guest15856
Guest15856 has left #ruby-lang [#ruby-lang]
fgomez has joined #ruby-lang
KINGSABRI has joined #ruby-lang
Tearan has joined #ruby-lang
KINGSABRI has quit [Client Quit]
KINGSABRI has joined #ruby-lang
<KINGSABRI> guys ,, I'm using net/ssh to send group of commands via ssh ,, but I need to keep the pty opened during sending commands because some commands are related like ,, cd /path , pwd
<KINGSABRI> I don't need work around like cd /path ; pwd
<sush24> darix, I actually got it working by looking at the source of timeout… thanks for the help http://pastebin.com/Bs3T4Pyr
<KINGSABRI> any idea please ?
Gues_____ has joined #ruby-lang
enroxorz-work has joined #ruby-lang
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
dammitradar has joined #ruby-lang
<judofyr> sush24: else-blocks in begin always make my head hurt. the moment I "refactored" it outside in my head I got it :)
<Mon_Ouie> KINGSABRI: I think you want to run all your commands on the same channel
<sush24> judofyr, :) thats the exact code from timeout.rb shipped with ruby
saxy has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
goshakkk has joined #ruby-lang
ltd- has quit [Ping timeout: 260 seconds]
saxy has quit [Ping timeout: 246 seconds]
m3nd3s has quit [Ping timeout: 252 seconds]
m3nd3s_ has quit [Remote host closed the connection]
<KINGSABRI> Mon_Ouie, yes true bro ,, but i tried that here http://pastebin.com/PKZzRyNX
<KINGSABRI> it returns nil if I run it in chunnle
bfreeman has quit [Quit: bfreeman]
saxy has joined #ruby-lang
<KINGSABRI> even I run the commands as an array ,,, It'll send each command in new channel
Hakon has quit [Quit: Leaving...]
<judofyr> KINGSABRI: exec is async. use exec! inside the channe l
t20572 has quit [Remote host closed the connection]
<judofyr> or no
<judofyr> that doesn't work
t30453 has joined #ruby-lang
<judofyr> there's no Channel#exec!
<Mon_Ouie> Use ch.exec then ch.wait
<KINGSABRI> judofyr, yes true ,, no exec! it :(
<Mon_Ouie> Also try passing a block to Channel#exec to see if the command succeeded
saxy has quit [Ping timeout: 248 seconds]
headius has quit [Quit: headius]
<KINGSABRI> I tried to send ch.exec with ch.wait ,, it return nothing!
ltd- has joined #ruby-lang
<judofyr> KINGSABRI: I think it's something like this: channel.exec("ls") { |c| c.on_data { |c2, data| p data } }
headius has joined #ruby-lang
gsav has joined #ruby-lang
headius has quit [Client Quit]
<Mon_Ouie> More like |c, success| — otherwise c would be an array
<judofyr> yes, listen to Mon_Ouie
<KINGSABRI> judofyr, it's working but it's about one command ,, when i did rotation of array on it it return nothing again :)
headius has joined #ruby-lang
<KINGSABRI> Mon_Ouie, judofyr the main issue is to keep pty open as you know ,, and still not solved with your good help
<eam> KINGSABRI: you'll probably be best served by copying over and running a script
<eam> sending commands through a channel with a pty is dangerous due to quoting issues
rue has joined #ruby-lang
<KINGSABRI> eam, here is the core of scrip http://pastebin.com/PKZzRyNX
runeb has quit [Remote host closed the connection]
<KINGSABRI> to even I did rotation on cmds array ,, it doesnt works
<eam> KINGSABRI: I mean put cmds into a file, copy the file to the remote host, and run it in a single command
<KINGSABRI> eam, got your idea ,, but I'v long list of servers It's so hard to send files , execute it , parse the outputs for each one ... etc
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<eam> well, that's just an issue of scheduling
areil has quit [Remote host closed the connection]
gmci has quit [Remote host closed the connection]
t30453 has quit [Remote host closed the connection]
t59366 has joined #ruby-lang
gmci has joined #ruby-lang
petercooper has quit [Remote host closed the connection]
<steveklabnik> KINGSABRI: http://docs.fabfile.org/en/1.4.3/index.html , while written in python, is basically 'run a bunch of commands over ssh'
<steveklabnik> i havent read the full backlog, but it seems like that might help you
sush24 has quit [Quit: This computer has gone to sleep]
guns has joined #ruby-lang
guns is now known as Guest10638
Guest10638 has quit [Client Quit]
gsav has quit [Read error: Connection reset by peer]
m3nd3s has joined #ruby-lang
gsav has joined #ruby-lang
yankov has joined #ruby-lang
<eam> steveklabnik: fabric has the same issue
<eam> the problem is fundamentally related to how the ssh protocol works
slyphon has quit [Quit: WeeChat 0.3.7]
dfr|mac has joined #ruby-lang
slyphon has joined #ruby-lang
<rue> It’s in the fabric of the universe
<KINGSABRI> steveklabnik, great ,, here is the issue how to send a bunch of commands ? (http://docs.fabfile.org/en/1.4.3/usage/execution.html#execution-strategy)
workmad3 has joined #ruby-lang
<KINGSABRI> during send an array ,, i've to rotate on it ,, so we'll return again to the same issue ,, each command in separate connection :(
burgestrand has quit [Quit: Leaving.]
dfr|mac has quit [Remote host closed the connection]
<zzak> how else would you run them concurrently?
<darix> KINGSABRI: JFYI: you can reuse existing ssh connections and just use different channels.
judofyr has quit [Remote host closed the connection]
m3nd3s has quit [Read error: Connection timed out]
savage- has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
dfr|mac has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Quit: Leaving.]
t59366 has quit [Remote host closed the connection]
t84691 has joined #ruby-lang
<steveklabnik> eam: fair enough, like i said, didnt read the backlog
workmad3 has quit [Ping timeout: 256 seconds]
m3nd3s has quit []
saxy has joined #ruby-lang
m3nd3s has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
m3nd3s has quit [Remote host closed the connection]
gsav has joined #ruby-lang
m3nd3s has joined #ruby-lang
<eam> darix: reusing the connection is not quite the same as reusing a persistent shell
<darix> eam: but still saves some overhead
<eam> KINGSABRI: the best you can do is run /bin/sh and write to it via stdin
sora_h is now known as s0ra_h
<eam> darix: sure, but his issue is environment persisting between commands
<darix> aha
<eam> KINGSABRI: the problem with that approach is that you'll end up having to use something like expect
Banistergalaxy has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby-lang
deryl has quit [Quit: deryl]
saxy has quit [Ping timeout: 260 seconds]
tjadc has quit [Ping timeout: 265 seconds]
dfr|mac has quit [Remote host closed the connection]
<KINGSABRI> eam, net-ssh-telnet has good part too but missing ssh-net flixabilities http://net-ssh-telnet.rubyforge.org/classes/Net/SSH/Telnet.html
yats has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
<eam> yes, it essentially does what I described above, opens a shell and lets you send commands to it
<eam> it's not a great idea to do things this way because you can't collect the success/failure of each command you sent. Screen-scraping gets ugly
heftig has quit [Quit: leaving]
S1kx has joined #ruby-lang
jbsan has joined #ruby-lang
butchanton has joined #ruby-lang
burgestrand has joined #ruby-lang
Carnage\ has joined #ruby-lang
runeb has joined #ruby-lang
bfreeman has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
Tearan has quit [Remote host closed the connection]
chimkan_ has joined #ruby-lang
t84691 has quit [Remote host closed the connection]
t53158 has joined #ruby-lang
<darix> KINGSABRI: uploading a shell script and running that is not an option right? or things like mcollective (if you have many hosts)
alex_kira has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 246 seconds]
Tearan has joined #ruby-lang
savage- has joined #ruby-lang
heftig has joined #ruby-lang
alexkane has quit [Ping timeout: 252 seconds]
runeb has quit [Ping timeout: 268 seconds]
gsav has joined #ruby-lang
lcdhoffman has quit [Ping timeout: 252 seconds]
alexkane has joined #ruby-lang
Skif has joined #ruby-lang
lcdhoffman has joined #ruby-lang
goshakkk has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
deryl has joined #ruby-lang
alex_kira has joined #ruby-lang
sepp2k1 has quit [Ping timeout: 246 seconds]
yankov has quit [Quit: yankov]
mrsolo has joined #ruby-lang
tenderlove has joined #ruby-lang
macmartine has joined #ruby-lang
t53158 has quit [Remote host closed the connection]
t61391 has joined #ruby-lang
limeds has joined #ruby-lang
Carnage\ has quit []
brianpWins has quit [Quit: brianpWins]
gsav has quit [Read error: Connection reset by peer]
Theueip has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
<KINGSABRI> darix, yes , can't upload shellscripts on the serves ,,, >> production
<eam> KINGSABRI: I understand corporate policy can be difficult, but get that policy changed if you can. It's nonsense
gsav has joined #ruby-lang
<KINGSABRI> eam, policies like gate ,, if you open it ,, everyone can pass it :(
sepp2k has joined #ruby-lang
Carnage\ has joined #ruby-lang
rue|w has joined #ruby-lang
elux has joined #ruby-lang
bfreeman has quit [Ping timeout: 272 seconds]
carloslopes has joined #ruby-lang
carloslopes has quit [Client Quit]
carloslopes has joined #ruby-lang
t61391 has quit [Remote host closed the connection]
t62466 has joined #ruby-lang
ttilley has joined #ruby-lang
saxy has joined #ruby-lang
r0bby has joined #ruby-lang
jperry2_ has joined #ruby-lang
alex_kir_ has joined #ruby-lang
zmack_ has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
dmwuw_ has joined #ruby-lang
saxy has quit [Read error: Connection reset by peer]
saxy has joined #ruby-lang
ando_ has joined #ruby-lang
neocoin_ has joined #ruby-lang
bryancp_ has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
jwollert- has joined #ruby-lang
s0ra_h is now known as sora_h
VGoff has joined #ruby-lang
chris2_ has joined #ruby-lang
bougyman_ has joined #ruby-lang
asaaki has quit [Remote host closed the connection]
agib has quit [Remote host closed the connection]
bytephilia has joined #ruby-lang
asaaki has joined #ruby-lang
hachiya_ has joined #ruby-lang
brianpWins has joined #ruby-lang
zmack__ has joined #ruby-lang
foca_ has joined #ruby-lang
zmack__ has quit [Remote host closed the connection]
rue has quit [Remote host closed the connection]
towski has joined #ruby-lang
<eam> KINGSABRI: yeah, shouldn't be an issue. This is a gate everyone should pass
workmad3 has joined #ruby-lang
alex_kir_ has quit [Remote host closed the connection]
zmack_ has quit [Ping timeout: 256 seconds]
bfreeman has joined #ruby-lang
Theueip has quit [*.net *.split]
alex_kira has quit [*.net *.split]
m3nd3s has quit [*.net *.split]
bryancp has quit [*.net *.split]
neocoin has quit [*.net *.split]
zmack has quit [*.net *.split]
ando has quit [*.net *.split]
agile has quit [*.net *.split]
anekos has quit [*.net *.split]
crackity_jones has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
nibbo has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
bougyman has quit [*.net *.split]
jwollert has quit [*.net *.split]
jperry2 has quit [*.net *.split]
beawesomeinstead has quit [*.net *.split]
VGoffl has quit [*.net *.split]
hachiya has quit [*.net *.split]
dmwuw has quit [*.net *.split]
foca has quit [*.net *.split]
rking has quit [*.net *.split]
tris has quit [*.net *.split]
chris2 has quit [*.net *.split]
jstemmer has quit [*.net *.split]
jperry2_ is now known as jperry2
nibbo has joined #ruby-lang
ltd- has quit [Ping timeout: 240 seconds]
cirwin has joined #ruby-lang
anekos has joined #ruby-lang
jstemmer has joined #ruby-lang
ltd- has joined #ruby-lang
agile has joined #ruby-lang
rking has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
yankov has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
alex_kira has joined #ruby-lang
rue has joined #ruby-lang
agib has joined #ruby-lang
tris has joined #ruby-lang
runeb has joined #ruby-lang
m3nd3s_ has quit [Read error: Connection timed out]
rue|w has quit [Remote host closed the connection]
beawesomeinstead has joined #ruby-lang
t62466 has quit [Remote host closed the connection]
t89466 has joined #ruby-lang
crudson has joined #ruby-lang
runeb has quit [Ping timeout: 256 seconds]
m3nd3s has joined #ruby-lang
enroxorz-work is now known as PeeWee
PeeWee has left #ruby-lang ["Leaving"]
sora_h is now known as s0ra_h
kvirani has joined #ruby-lang
bytephilia has quit [Quit: Computer has gone to sleep.]
m3nd3s has quit [Remote host closed the connection]
m3nd3s_ has joined #ruby-lang
s1n4 has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
t89466 has quit [Remote host closed the connection]
t50944 has joined #ruby-lang
rue has quit [Ping timeout: 248 seconds]
solars has joined #ruby-lang
chimkan_ has joined #ruby-lang
s1n4 has left #ruby-lang ["leaving"]
t50944 has quit [Remote host closed the connection]
t52976 has joined #ruby-lang
chris2_ is now known as chris2
mistym_ has joined #ruby-lang
bfreeman has quit [Ping timeout: 248 seconds]
bfreeman has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
rue has joined #ruby-lang
s0ra_h is now known as sora_h
yats has quit [Ping timeout: 246 seconds]
flak has joined #ruby-lang
flak is now known as Guest51539
rippa has quit [Ping timeout: 244 seconds]
rue|w has joined #ruby-lang
sora_h is now known as s0ra_h
m3nd3s_ has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
thejspr has joined #ruby-lang
rue|w has quit [Ping timeout: 256 seconds]
benanne has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
Guest51539 has left #ruby-lang [#ruby-lang]
tenderlove has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
viking has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
m3nd3s has joined #ruby-lang
rippa has joined #ruby-lang
workmad3 has joined #ruby-lang
zmack has joined #ruby-lang
nXqd has joined #ruby-lang
qwerxy has quit [Quit: offski]
CoverSlide has quit [Quit: leaving]
CoverSlide has joined #ruby-lang
CoverSlide has quit [Client Quit]
CoverSlide has joined #ruby-lang
viking has left #ruby-lang [#ruby-lang]
jbsan has quit [Quit: jbsan]
scampbell has quit [Quit: Ex-Chat]
pfaff_ has quit [Quit: Leaving]
s0ra_h is now known as sora_h
wallerdev has joined #ruby-lang
qpingu has joined #ruby-lang
t52976 has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
t748 has joined #ruby-lang
sora_h is now known as s0ra_h
Tearan has quit [Ping timeout: 244 seconds]
<mistym> http://pastie.org/4599031 - This successfully closes IO stream 2, but doesn't successfully reopen it. How can I reopen stderr to the correct stream after redirecting it?
jackhammer2022 has joined #ruby-lang
<Mon_Ouie> You can't do that with reopen
<erikh> mistym:
jbsan has joined #ruby-lang
<Mon_Ouie> You can do $stderr = File.open(File::NULL) and then restore the old value
<erikh> use dup
<Mon_Ouie> Ah, well, maybe you can then :p
<rue> dup is dup2
<rue> I think
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<mistym> erikh: Thanks!
mojo_pojo has joined #ruby-lang
Tearan has joined #ruby-lang
Axsuul has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
t748 has quit [Remote host closed the connection]
t72535 has joined #ruby-lang
limeds has quit [Quit: limeds]
krz has joined #ruby-lang
cirwin has left #ruby-lang [#ruby-lang]
limeds has joined #ruby-lang
cantonic has joined #ruby-lang
Guedes is now known as Guedes_out
tenderlove has joined #ruby-lang
s0ra_h is now known as sora_h
t72535 has quit [Remote host closed the connection]
t95731 has joined #ruby-lang
nXqd has quit [Remote host closed the connection]
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
bougyman_ is now known as bougyman
Hakon has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
sockmonk has joined #ruby-lang
<jarib> huh. 1.9.2 doesn't use #=== for case statements?! https://gist.github.com/3491976
tenderlo_ has joined #ruby-lang
tenderlove has quit [Ping timeout: 260 seconds]
sora_h is now known as s0ra_h
zmack has quit [Remote host closed the connection]
pfaff_ has joined #ruby-lang
pfaff_ has quit [Client Quit]
<Mon_Ouie> I don't have 1.9.2 to test here, but I am certain #=== was already used for case-statements (as it was in 1.8.x)
<Mon_Ouie> And for the record, 2 === obj is the one to be called
<jarib> that makes the behaviour i gisted hard to explain, though
<jarib> oops
<jarib> my mistake
<jarib> hm, no
Guest23084 has left #ruby-lang [#ruby-lang]
<jarib> there, gist updated
ged has joined #ruby-lang
<jarib> still looks odd to me
gix has joined #ruby-lang
<Mon_Ouie> I don't really get it either. What if you try when 2.0 or even when w?
leonL has joined #ruby-lang
rue|w has joined #ruby-lang
<jarib> both 2.0 and w prints "2"
dmwuw_ has quit [Remote host closed the connection]
<jarib> guess i should just stick to 1.9.3 unless i want odd bugs..
kvs has quit [Ping timeout: 248 seconds]
Hakon has quit [Quit: Leaving...]
relix has quit []
kvs has joined #ruby-lang
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
bfreeman has quit [Read error: Connection reset by peer]
bfreeman has joined #ruby-lang
Carnage\ has quit []
rippa has quit [Ping timeout: 265 seconds]
deryldoucette has joined #ruby-lang
deryl has quit [Ping timeout: 246 seconds]
<burgestrand> Huh, cool.
sailias has quit [Quit: Leaving.]
Austin__ has left #ruby-lang [#ruby-lang]
deryl has joined #ruby-lang
deryldoucette has quit [Ping timeout: 248 seconds]
Spaceghostc2c has quit [Excess Flood]
Spaceghostc2c has joined #ruby-lang
s0ra_h is now known as sora_h
sockmonk has quit [Ping timeout: 246 seconds]
qwerxy has joined #ruby-lang
qwerxy has quit [Client Quit]
limeds has quit [Quit: limeds]
qwerxy has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
lcdhoffman has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
postmodern has joined #ruby-lang
bfreeman has joined #ruby-lang
stardiviner has joined #ruby-lang
AntiTyping has joined #ruby-lang
sora_h is now known as s0ra_h
dracco23 has joined #ruby-lang
jbsan has quit [Quit: jbsan]
carloslopes has quit [Quit: Leaving.]
qwerxy has quit [Quit: offski]
t95731 has quit [Remote host closed the connection]
t21047 has joined #ruby-lang
chimkan has joined #ruby-lang
Jay_Levitt has quit [Ping timeout: 246 seconds]
zmack has joined #ruby-lang
sailias has joined #ruby-lang
saxy has quit [Remote host closed the connection]
saxy has joined #ruby-lang
yxhuvud has quit [Ping timeout: 248 seconds]
saxy has quit [Ping timeout: 265 seconds]
elux has quit [Quit: Bye!]
butchanton has quit [Quit: Leaving.]
butchanton has joined #ruby-lang
butchanton has quit [Client Quit]
chendo_ has quit [Ping timeout: 252 seconds]
zmack has quit [Remote host closed the connection]
bfreeman has quit [Ping timeout: 260 seconds]
leonL has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
kingCrawlerx has joined #ruby-lang
kingCrawlerx has quit [Client Quit]
kingCrawlerx has joined #ruby-lang
lcdhoffman has quit [Ping timeout: 256 seconds]
<rhizmoe> can someone humiliate me a little by critiquing these methods? http://pastie.org/4599860
<rhizmoe> i have a feeling some standard algorithms are buried in there somewhere
rue|w has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
<rhizmoe> it feels bashy to me, and my CS is weak
t21047 has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
t3457 has joined #ruby-lang
bfreeman has joined #ruby-lang
sailias has quit [Quit: Leaving.]
rue|w has quit [Ping timeout: 245 seconds]
neocoin_ has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
<steveklabnik> for one, you jam a lot into a few lines
<steveklabnik> rhizmoe: ^
<steveklabnik> i can barely even tell what your algorithms are, that's very dense
<rhizmoe> could be perl genes rearing their heads
<steveklabnik> your first method has a pattern of 'days = 0; some loop; days' which really means you want an inject
kvirani has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
<rhizmoe> yeah, but i couldn't figure out how to combine that with the while...i spent some time thinking about it
s0ra_h is now known as sora_h
<rhizmoe> since i'm using inject/reduce in the other, of course i wanted to use it everwhere
<steveklabnik> :)
<steveklabnik> yeah, i'm not 100% sure either, it's just a mathematical fact
<steveklabnik> honestly, i'm having a hard time digging in just because I don't konw what a lot of the domain stuff does.
<rhizmoe> pastie is updated with initialize method, where @date and amt come from
<steveklabnik> i would certainly try to not sqish so much in at once
bryancp_ has quit [Remote host closed the connection]
<rhizmoe> another problem i had with inject was increasing the date while decreasing the remaining amt. does it make sense just to work backwards from the desired return type?
oddmunds has quit [Quit: leaving]
<rhizmoe> seemed like a double-loop mobius confusion tangle
<steveklabnik> i would calculate both as offsets
<steveklabnik> then perform the operations
<steveklabnik> then return the answer
<steveklabnik> basically
<steveklabnik> i think
<steveklabnik> i would try to show you a refactoring, but without context and some tests, it'd take me a while to make sure i didnt screw it up
m3nd3s has quit [Remote host closed the connection]
bougyman has quit [Quit: leaving]
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
<steveklabnik> recurrances needs a amt_used and amt is a float, right?
<steveklabnik> i think those might be the only two
bougyman has quit [Client Quit]
toretore has quit [Quit: Leaving]
<steveklabnik> oh, just saw the update
<steveklabnik> gimme a few minutes :)
benanne has quit [Quit: kbai]
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
bougyman has quit [Client Quit]
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
<rhizmoe> recurrence is a day of week or "daily", with an amount and optional start/end dates
t_ has joined #ruby-lang
<rhizmoe> i wish that coursera algo class in january hadn't gotten all screwed up
mistym has quit [Remote host closed the connection]
<steveklabnik> ugh, yeah, the recurrance has some internal stuff that's annyoing to replicate
Dawk has joined #ruby-lang
<steveklabnik> ehhhh it's not that bad
havenn has joined #ruby-lang
jscherff has joined #ruby-lang
skipper has joined #ruby-lang
Dawk has quit [Client Quit]
<steveklabnik> ahahahah
<steveklabnik> your freaking obsession with types
<steveklabnik> sorry
<steveklabnik> i just passed in Ints and it freaked
<steveklabnik> even though they'd work just as well ;)
<kuja> duck typing best typing
t3457 has quit [Remote host closed the connection]
t33904 has joined #ruby-lang
<rhizmoe> hmm!
havenn has quit [Remote host closed the connection]
<rhizmoe> yeah, i can loosen that type stuff up. it's just initial cruft
hramrach has quit [Remote host closed the connection]
solars has quit [Ping timeout: 264 seconds]
<steveklabnik> i know ;)
<steveklabnik> just teasing you after our conversation
skipper has quit [Remote host closed the connection]
<steveklabnik> trying to get some test data together before i change things
jscherff has quit [Remote host closed the connection]
<steveklabnik> almost got it working
havenn has joined #ruby-lang
<kuja> it's valid criticism though, good thing you pointed it out early on before he got too crazy with type checks
<steveklabnik> we had the discussion the other day
sora_h is now known as s0ra_h
<steveklabnik> about it specifically
<kuja> ah cool, nevermind then :p
hramrach has joined #ruby-lang
neocoin has joined #ruby-lang
qwerxy has joined #ruby-lang
qwerxy has quit [Client Quit]
havenn has quit [Ping timeout: 246 seconds]
<rhizmoe> :)
<steveklabnik> rhizmoe: in case you find it useful: http://pastie.org/4600102
<steveklabnik> rhizmoe: that works if oyu comment out the 'fixnum' line of course
tenderlo_ has quit [Remote host closed the connection]
<rhizmoe> sure sure. i only use three recurrences in my test, but i appreciate the source material :)
diegoviola has joined #ruby-lang
wpaulson has joined #ruby-lang
<steveklabnik> yeah. i actually have to go, so i can't give you some refactorings, but at least you can know if it breaks or not :)
<steveklabnik> peace
<rhizmoe> right on, thanks
wallerdev has quit [Quit: wallerdev]
<rhizmoe> i'll meditate on inject for a little bit
<steveklabnik> it might be less clear
<steveklabnik> for sure
<steveklabnik> but right now, none of it is really clear
<steveklabnik> :)
saxy has joined #ruby-lang
tenderlove has joined #ruby-lang
kingCrawlerx has quit [Quit: Computer has gone to sleep]
saxy has quit [Ping timeout: 260 seconds]
justinmcp has joined #ruby-lang
sailias has joined #ruby-lang
isale-eko has joined #ruby-lang
chimkan__ has joined #ruby-lang
deryl has quit [Quit: deryl]
justinmcp has quit [Remote host closed the connection]
deryl has joined #ruby-lang
chimkan has quit [Ping timeout: 260 seconds]
chimkan__ is now known as chimkan
<rhizmoe> heh, i love how 100% of blog posts on inject are "getting started with inject" or "an introduction..."
havenn has joined #ruby-lang
tenderlo_ has joined #ruby-lang
wpaulson_ has joined #ruby-lang
<drbrain> it's a strong sign you shouldn't be thinking about using inject
wpaulson_ has quit [Client Quit]
<drbrain> if it's application to your problem wasn't obvious you may as well start driving nails with a screwdriver
t_ has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 260 seconds]
wpaulson has quit [Ping timeout: 252 seconds]
m3nd3s has joined #ruby-lang
t33904 has quit [Remote host closed the connection]
t90731 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
guns has joined #ruby-lang
havenn has joined #ruby-lang
qwerxy has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
slyphon has quit [Quit: WeeChat 0.3.7]
mojo_pojo has left #ruby-lang [#ruby-lang]
Nisstyre_ has joined #ruby-lang
s0ra_h is now known as sora_h
<rhizmoe> well, the application was that the code has a pattern that indicates it
sailias has quit [Quit: Leaving.]
<freedrull> my factories are such a mess
<freedrull> (ノ`Д´)ノ \`,゚・
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
t90731 has quit [Remote host closed the connection]
t8512 has joined #ruby-lang
Aphelion has joined #ruby-lang
r0bby_ has joined #ruby-lang
r0bby has quit [Ping timeout: 244 seconds]
saxy has joined #ruby-lang