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
<h4y4shi> so I should learn ruby before I start c?
* dominikh blinks
tommyvyo_ has joined #ruby-lang
qpingu has joined #ruby-lang
<dominikh> you should learn basic concepts first.
<zenspider> h4y4shi: are you trying to be obtuse or does it just come natural?
<h4y4shi> Natural
<zenspider> then maybe you should learn python
srbaker has joined #ruby-lang
<Banistergalaxy> zenspider: sup spides
<zenspider> hey
achiu has joined #ruby-lang
nguerin has joined #ruby-lang
<Banistergalaxy> Do you know if it's possible to revive core files
<Banistergalaxy> You would think all the info of there to make it happen
<Banistergalaxy> Is
<zenspider> revive in what way?
knightMBP has joined #ruby-lang
<Banistergalaxy> Convert into executable again, but halted by gdb.i just want a core file I can call functions on
<whatasunnyday> h4y, i missed your question, what was it? you can pm it to me if you want.
<whatasunnyday> <h4y4shi>
<zenspider> Banistergalaxy: well... you can attach to it to see it's static state for sure. I _think_ you can call functions w/in gdb
<zenspider> it's been a while, but the binary is loaded and I doubt gdb cares how it started
<zenspider> `gdb /path/to/ruby corefile`
<Banistergalaxy> Hmm I always get errors about how the program isn't running when I try to use call on a core file
<Banistergalaxy> Anyway I'll keep playing, thx
RomyRomy has joined #ruby-lang
<zenspider> good luck
knightMBP has joined #ruby-lang
<andrewvos> godspeed
takaokouji has joined #ruby-lang
knightMBP has joined #ruby-lang
jkyle has joined #ruby-lang
<jkyle> I'm getting the following error from the holidays gem: invalid date format in specification: "2011-10-19 00:00:00.000000000Z"
<jkyle> this is the line in the gemspec: s.date = %q{2011-10-19 00:00:00.000000000Z}
Karmaon has joined #ruby-lang
delinquentme has joined #ruby-lang
jredville has joined #ruby-lang
<manveru> jkyle: rm the gemspec and install the gem again
darkf_ has joined #ruby-lang
<manveru> hopefully that'll help :)
<jkyle> did not solve the issue
<samuelkadolph> drbrain: What's ☹ about OpenDNS?
<manveru> jkyle: oh, did you clean out the cached gem?
<jkyle> um
<jkyle> gem uninstall foo?
<manveru> i don't think that removes the cached one
<jkyle> how do you remove a cached gem?
<manveru> oh, it does
<manveru> unlink("/home/manveru/.rvm/gems/ruby-1.9.3-p0/cache/sprockets-2.3.1.gem") = 0
<manveru> well then i'm out of advise, and it's way past bedtime here
<zenspider> gem source -c
brownies has joined #ruby-lang
<zenspider> jkyle: what's the gem?
<jkyle> holidays
jasonw22 has joined #ruby-lang
<jkyle> where can I find a reference of what the correct date format should look like?
<jkyle> seems like this should be a rather easy fix
<jkyle> here we go
DRCALKIN has joined #ruby-lang
<jkyle> change this: 2011-10-19 00:00:00.000000000Z to this 2011-10-19
shtirlic has joined #ruby-lang
cube526 has joined #ruby-lang
havenn has joined #ruby-lang
dhruvasagar has joined #ruby-lang
slyphon has joined #ruby-lang
postmodern has joined #ruby-lang
kurko_ has joined #ruby-lang
fayimora has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<oddmunds> i wonder how hard it would be for github to have a link to the children of a commit along with it's parent(s)
<dominikh> oddmunds: that might get messy real quick
<oddmunds> yeah
<oddmunds> but it would be nice to follow along a branch and see the commits
felipe has joined #ruby-lang
<oddmunds> they manage to list the commits in the commits tab
<dominikh> given a branch, you get the topmost commit which has the parent information, so you have a chain. given a single commit, you only know the parent, not any "children" (there's no such relation)
nanothief has joined #ruby-lang
<dominikh> and given a single commit, there is no way to "follow along a branch" because there can be an infinite number of branches that have "children" of that commit
erpuds has joined #ruby-lang
nguerin has joined #ruby-lang
rushed has joined #ruby-lang
QoQOoO has joined #ruby-lang
qpingu has joined #ruby-lang
looopy has joined #ruby-lang
<oddmunds> yeah, i know
<oddmunds> but github has impressed me before
Choobie has joined #ruby-lang
<oddmunds> if i knew javascript i could make it a greasemonkey plugin
Indian_ has joined #ruby-lang
neoesque has joined #ruby-lang
konr has joined #ruby-lang
rohit has joined #ruby-lang
nguerin has joined #ruby-lang
Heimidal has joined #ruby-lang
slimfit has joined #ruby-lang
<konr> Is there a method of a string that iterates over its characters and returns the concatenation of everything, like "ab ÇÇÇc".mymethod {|c| c =~ /[A-Za-z]/ ? c : nil} -> "abc"?
nguerin has joined #ruby-lang
<ben> Sounds like str.gsub(/[^A-Za-z]+/, '')
ilyam has joined #ruby-lang
macmartine has joined #ruby-lang
<konr> that's even simpler! thanks!
ryanf has joined #ruby-lang
tomzx has joined #ruby-lang
shtirlic_ has joined #ruby-lang
Heimidal has joined #ruby-lang
WillMarshall has joined #ruby-lang
looopy has joined #ruby-lang
shtirlic has joined #ruby-lang
willdrew has joined #ruby-lang
fayimora_ has joined #ruby-lang
Boohbah has joined #ruby-lang
nguerin has joined #ruby-lang
m3nd3s has joined #ruby-lang
setmeaway has joined #ruby-lang
damien__ has joined #ruby-lang
<Boohbah> hi, how can i get a useful value out of Process.times? the values in Struct::Tms seem to have no relation to the timers i've setup. http://pastie.org/3500831
dhruvasagar has joined #ruby-lang
bhrgunatha has joined #ruby-lang
twittard has joined #ruby-lang
macmartine_ has joined #ruby-lang
macmartine has joined #ruby-lang
aroop has joined #ruby-lang
Luxx_ has joined #ruby-lang
aza_kibou has joined #ruby-lang
fayimora has joined #ruby-lang
brownies has joined #ruby-lang
achiu has joined #ruby-lang
gnufied has joined #ruby-lang
whatasunnyday has joined #ruby-lang
twittard has joined #ruby-lang
twittard has joined #ruby-lang
kurko__ has joined #ruby-lang
bryancp has joined #ruby-lang
whatasunnyday has joined #ruby-lang
<whatasunnyday> MaRk-I, it activated and asked me to reset
<whatasunnyday> I've reset however I can't find the additional drivers thing and its still stuck in fall back mode.
<whatasunnyday> i found the additional drivers, it says its active but not currently in use
savage- has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
srbaker has joined #ruby-lang
skryking has joined #ruby-lang
kurko___ has joined #ruby-lang
sush24 has joined #ruby-lang
<sush24> Hi... I'm writing a program consisting of arrays consisting of hash to store values and then marshal it to save it in a file... Something tells me this not the "Ruby" way to do things... I'm thinking of creating a custom class with one major method where I can check if a hash with a same :name exist else add a new hash to the array... How do I go about it?
<sush24> PS: Im a noob
gianlucadv has joined #ruby-lang
rohit has joined #ruby-lang
jxie has joined #ruby-lang
macmartine has joined #ruby-lang
robbyoconnor has joined #ruby-lang
ivanoats has joined #ruby-lang
wyhaines has joined #ruby-lang
rippa has joined #ruby-lang
Dreamer3 has joined #ruby-lang
twittard_ has joined #ruby-lang
jkyle has joined #ruby-lang
Karmaon has joined #ruby-lang
fayimora_ has joined #ruby-lang
fayimora_ has joined #ruby-lang
kurko__ has joined #ruby-lang
brianpWins has joined #ruby-lang
RomyRomy has joined #ruby-lang
ryanf has joined #ruby-lang
brownies has joined #ruby-lang
mephux has joined #ruby-lang
Joeysomo_ has joined #ruby-lang
chessguy has joined #ruby-lang
achiu has joined #ruby-lang
machine1 has joined #ruby-lang
knightMBP has joined #ruby-lang
twittard has joined #ruby-lang
Karmaon has joined #ruby-lang
<TTilus> sush24: what are you _actually_ doing with it?
<TTilus> sush24: whats the problem you are trying to solve
<TTilus> sush24: it is by no means non-ruby to and save serialized structures to files
<sush24> It just seemed a little "hacky" that's all ... I thought I could've made a custom class with attributes (instead of keys in the hash)
x0F__ has joined #ruby-lang
<TTilus> sush24: whats the problem you are trying to solve with the program you are writing?
neoesque has joined #ruby-lang
<sush24> saving objects into a file..
andrewhl has joined #ruby-lang
<TTilus> sush24: why are you saving objects into a file?
<sush24> persistence
<TTilus> shajith: why do you need persistence for the objects?
<TTilus> sush24: ^
<TTilus> shajith: sorry for the hilight, bad tab-completion
<sush24> to use it later... thats what serialization is for right?
<TTilus> sush24: why do you need the objects later?
<sush24> to use it..
<TTilus> sush24: you can cut the corners and just plain tell me what are you writing that program for
<sush24> anyways... i got it working...
<TTilus> ok
toretore has joined #ruby-lang
ovnimancer has joined #ruby-lang
<sush24> wrote another class...
<sush24> thanks!
<TTilus> if you at some point later on want to find out if your way is "the ruby way", be prepared to show your code or give a use case ;)
<TTilus> and if you don't want to, you can tell that too, just to save us from asking "why" =D
QoQOoO has joined #ruby-lang
yxhuvud has joined #ruby-lang
QaDeS has joined #ruby-lang
fayimora has joined #ruby-lang
brownies- has joined #ruby-lang
brownies has joined #ruby-lang
JohnBat26 has joined #ruby-lang
RomyRomy has joined #ruby-lang
Tick-Tock has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
rohit has joined #ruby-lang
<shevy> TTilus you are a curious person ;)
csherin has joined #ruby-lang
erpuds has joined #ruby-lang
frangiz has joined #ruby-lang
rippa has joined #ruby-lang
wallerdev has joined #ruby-lang
QoQOoO has joined #ruby-lang
dc5ala has joined #ruby-lang
brownies has joined #ruby-lang
pandora17 has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<TTilus> shevy: aslak taught me that
<TTilus> shevy: pop the "why" stack
Giddeon has joined #ruby-lang
solars has joined #ruby-lang
ando has joined #ruby-lang
machine1 has joined #ruby-lang
tyman has joined #ruby-lang
QoQOoO has joined #ruby-lang
machine2 has joined #ruby-lang
retro-in-better- has joined #ruby-lang
retro|cz has joined #ruby-lang
brianpWins has joined #ruby-lang
piglop has joined #ruby-lang
lsegal has joined #ruby-lang
rippa has joined #ruby-lang
minsa has joined #ruby-lang
twelvechairs has joined #ruby-lang
takaokouji has joined #ruby-lang
burns180 has joined #ruby-lang
kek1 has joined #ruby-lang
<yorickpeterse> Morning lads
gasbakid has joined #ruby-lang
francisfish has joined #ruby-lang
IPGlider has joined #ruby-lang
roadkith has joined #ruby-lang
burns180 has joined #ruby-lang
davidw has joined #ruby-lang
zmack has joined #ruby-lang
shtirlic_ has joined #ruby-lang
adambeynon has joined #ruby-lang
cyri_ has joined #ruby-lang
burns180_ has joined #ruby-lang
tekin has joined #ruby-lang
rohit has joined #ruby-lang
d3vic3 has joined #ruby-lang
saLOUt_ has joined #ruby-lang
futurechimp has joined #ruby-lang
burns180 has joined #ruby-lang
fayimora_ has joined #ruby-lang
saLOUt_ has joined #ruby-lang
burns180_ has joined #ruby-lang
workmad3 has joined #ruby-lang
jmeeuwen has joined #ruby-lang
burns180_ has joined #ruby-lang
rolfb has joined #ruby-lang
canton7 has joined #ruby-lang
voker57 has joined #ruby-lang
machine2 has joined #ruby-lang
jmeeuwen has joined #ruby-lang
gianlucadv has joined #ruby-lang
adambeynon has joined #ruby-lang
ramonmaruko has joined #ruby-lang
burns180_ has joined #ruby-lang
burns180 has joined #ruby-lang
dejongge has joined #ruby-lang
ramonmaruko has joined #ruby-lang
Arsen7 has joined #ruby-lang
mytrile has joined #ruby-lang
IPGlider has joined #ruby-lang
davidw has joined #ruby-lang
francisfish has joined #ruby-lang
burns180 has joined #ruby-lang
My_Hearing has joined #ruby-lang
gjaldon has joined #ruby-lang
burns180 has joined #ruby-lang
havenn has joined #ruby-lang
corsican has joined #ruby-lang
Indian has joined #ruby-lang
QoQOoO has joined #ruby-lang
equazen has joined #ruby-lang
hoonforever has joined #ruby-lang
burns180_ has joined #ruby-lang
<equazen> pastie: hi
rue has joined #ruby-lang
gasbakid__ has joined #ruby-lang
rohit has joined #ruby-lang
burns180 has joined #ruby-lang
Faris has joined #ruby-lang
<Faris> Why does 'sleep' sleep forever in loop blocks ?
publicvoid_ has joined #ruby-lang
<masterkorp> Faris: cause you didn't told it how much to sleep ?
<Faris> loop{print 'lol'; sleep 1}
<Faris> that's 1 sec right ?
<Faris> Oh I use 1.8.7
<Faris> they deal with threads the same way right
tomzx has joined #ruby-lang
burns180_ has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
Faris has joined #ruby-lang
thone has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
judofyr has joined #ruby-lang
rolfb has joined #ruby-lang
rohit has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
burns180 has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
robbyoconnor has joined #ruby-lang
nguerin has joined #ruby-lang
canton7 has joined #ruby-lang
KU0N has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
gianlucadv has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
adambeynon has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
nguerin has joined #ruby-lang
<rue> Yes. I suspect that's not your actual code?
nfxgosu has joined #ruby-lang
<nfxgosu> are there any drawbacks of having a puts statement and gets.chomp in one method
fdhsfdsgdsg has joined #ruby-lang
<kke> anyone using roar? how do i do something like Company.first.members.to_json?
<rue> nfxgosu: Drawbacks like?
nfxgosu has joined #ruby-lang
burns180 has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
<shevy> roar?
<shevy> the sound the dragon makes?
pw_ has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
nfxgosu has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
nfxgosu has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
mark_locklear has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
<shevy> awww
fdhsfdsgdsg has joined #ruby-lang
Joeysomo has joined #ruby-lang
Fullmoon has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
kek1 has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
burns180_ has joined #ruby-lang
Joeysomo has joined #ruby-lang
zenChild has joined #ruby-lang
gentz has joined #ruby-lang
gentz has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
dv310p3r has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
ramonmaruko has joined #ruby-lang
v0yager has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
enebo has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
nfxgosu has joined #ruby-lang
<Silex> ruby 1.9.x Hash is sorted? so it remembers insertion order and I can get the order back?
fdhsfdsgdsg has joined #ruby-lang
<andrewvos> Silex: 80% sure of that yes
<Silex> k thanks
<judofyr> Silex: I'm 95% sure, so that means we're 175% sure!
nguerin has joined #ruby-lang
<Silex> sorry guys I can only do it if you're 200% sure
<Silex> someone throws 25% in!
rippa has joined #ruby-lang
tommyvyo has joined #ruby-lang
Indian has joined #ruby-lang
nfxgosu has joined #ruby-lang
burns180 has joined #ruby-lang
dous has joined #ruby-lang
<rue> A framework-agnostic framework
<judofyr> andrewvos: bad example though because you inserted the keys in sorted order
<judofyr> A framework-agnostic rue
<Silex> andrewvos: that's a bad test... much better is {'z' => 1, 'a' => 2}
<judofyr> A rue-agnostic framework
<Silex> which shows it keeps order
<andrewvos> judofyr: Argh yeah true
<rue> Gnostic arue
<Silex> insertion order*
<andrewvos> !script eval m.reply({'z' => 1, 'a' => 2})
<andrewvos> corundum: You are useless
<corundum> but You are <reply> I am here for everyone's benefit or an ri bot, because ri is everybody's friend or cool
tekin has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
d3vic3 has joined #ruby-lang
<rue> So is roar <> draper thing?
vereteran has joined #ruby-lang
bradland has joined #ruby-lang
<judofyr> corundum: you are?
<corundum> you best check yo'self!
<judofyr> corundum: You are
<judofyr> corundum: You are seriously useless
<corundum> but You are <reply> I am here for everyone's benefit or an ri bot, because ri is everybody's friend or cool
<judofyr> gah
bagratte has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
<andrewvos> corundum: Nice script bro
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has quit [#ruby-lang]
<Silex> @status = :person_not_found and return unless person
<Silex> is that bad practice? (the "assign and return unless" part)
<andrewvos> Silex: use: if person.nil?
<andrewvos> More readable
<andrewvos> Just my opinion though
<andrewvos> Oh wait
willdrew has joined #ruby-lang
justinxreese has joined #ruby-lang
l0st1 has joined #ruby-lang
virunga has joined #ruby-lang
Sailias|work has joined #ruby-lang
burns180_ has joined #ruby-lang
bagratte has joined #ruby-lang
<shevy> it's a bit long
<shevy> it is usually better to try to make things obvious with one glance (when possible)
<shevy> I have not seen "and return unless foo" much though
<dominikh> that line of code is horrible imo.
<Silex> I just wrote it the 4 lines way
vereteran has joined #ruby-lang
<Silex> if person.nil?; @status = :person_not_found; return; end
<Silex> with a line break
<Silex> s/a line/lines/
bagratte has quit [#ruby-lang]
havenn has joined #ruby-lang
bagratte has joined #ruby-lang
vereteran has joined #ruby-lang
dejongge has joined #ruby-lang
bagratte has quit [#ruby-lang]
bagratte has joined #ruby-lang
bagratte has quit [#ruby-lang]
bagratte has joined #ruby-lang
bagratte has joined #ruby-lang
tekin has joined #ruby-lang
bglusman has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
<denysonique__> How can I execute in another chosen thread?
<denysonique__> I want to force a snippet of code to be executed in that other tread
<denysonique__> or in the main thread
<judofyr> denysonique__: there's no easy way to do that
fdhsfdsgdsg has joined #ruby-lang
<denysonique__> hmm
<denysonique__> Is there some sort of workaround?
<judofyr> denysonique__: it's a little bit easier if the thread is *only* going to execute code sent from other threads
<denysonique__> judofyr: ok, I would like to try this as well
<judofyr> but you can't easily say "hey thread, now run this!"
<denysonique__> as one method in QtRuby needs to be only executed within the same thread where QtRuby app is initialised
<denysonique__> s/initialized/run
<judofyr> denysonique__: http://cl.ly/0v180h2I0M430s0D0h3t
burns180 has joined #ruby-lang
<judofyr> denysonique__: Queue#pop is making the thread go to sleep
<judofyr> until someone pushes
<denysonique__> judofyr: what if I do a `sleep' loop which polls for code in a variable?
<judofyr> denysonique__: ehm, that's what the code does
<denysonique__> or a lambda etc
<denysonique__> judofyr: ok, thanks, I will try this out
fdhsfdsgdsg has joined #ruby-lang
v0yager has joined #ruby-lang
mistym has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
v0yager has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
Indian has joined #ruby-lang
fdhsfdsgdsg has joined #ruby-lang
<denysonique__> judofyr: thanks this approach works
<judofyr> denysonique__: great!
fdhsfdsgdsg has joined #ruby-lang
<denysonique__> judofyr: I have done it like this: https://gist.github.com/bb26b6a4c4220deb69c2
<judofyr> denysonique__: if you're the one setting the $eval_js-global, you can use #wakeup and #sleep instead: http://cl.ly/0W2o1V3I191D2K1U0j2e
bglusman has joined #ruby-lang
langbiangplaza has joined #ruby-lang
<judofyr> denysonique__: or a Mutex + ConditionVariable: http://cl.ly/1a2f2o26122m3S2m2w0V
tommyvyo has joined #ruby-lang
<denysonique__> judofyr: ok, when I will be back from a walk I will defo check those out
<denysonique__> judofyr: I am writing an IRC client btw
<judofyr> nice
dhruvasagar has joined #ruby-lang
jkyle has joined #ruby-lang
mssola has joined #ruby-lang
burns180_ has joined #ruby-lang
zenChild has quit [#ruby-lang]
outoftime has joined #ruby-lang
<erikh> hello internet
andrewvos has quit [#ruby-lang]
theinternet has joined #ruby-lang
d3vic3 has joined #ruby-lang
<theinternet> hi erikh!
<theinternet> I must be on my way!
theinternet has quit [#ruby-lang]
andrewvos has joined #ruby-lang
leonL has joined #ruby-lang
<rob_> hi hi
jkyle has joined #ruby-lang
jkyle has joined #ruby-lang
<erikh> nice andrew, nice.
<erikh> are you at the BBC? I know of people interviewing there.
<rob_> if i have an array of hashes each with a :position key, how can i keep the hashes in order when im adding and removing hashes to the array?
<erikh> rob_: you mean sort by the value hash[:position] holds?
<erikh> array.sort_by { |x| x[:position] }
<rob_> erikh: aye but then if i delete some of the hashes there are 'gaps'
<erikh> how are you deleting?
<erikh> also, have you considered just using the index that the array provides?
<rob_> just removing the hash from the array
<erikh> I imagine you have -- but I'd like to know why that's not suitable
<rob_> the problem with that is that my user can re-order the objects in the array
<erikh> ok, so reorder them in the array as that happens?
<erikh> how many objects are we talking about here?
<rob_> oh, not a lot
fayimora has joined #ruby-lang
<erikh> I'd strongly consider just letting array be an array instead of a linked list
<rob_> this is for a todo/diary style app
<erikh> sure.
<rob_> see, i thought about that
<rob_> but how can you reorder an array?
srbaker has joined #ruby-lang
<erikh> Array#splice will probably give you some clues, and Array.delete as well
<erikh> Array#delete
<rob_> ahh not used splice before, thanks for the tip
<erikh> of course you could always re-order into a new variable too
<erikh> depending on how many edits you're making at a time, that might make more sense
rayners has joined #ruby-lang
wallerdev has joined #ruby-lang
<rob_> just one at a time
<erikh> ok, yeah. splice is probably what you want.
<rob_> .slice?
<rob_> splice doesn't seem to exist
<rob_> unless im being stupid..
<rippa> splice is from javascript
<erikh> no, I'm probably confusing perl with ruby again
<rob_> ah :)
<erikh> it might also be in enumerable
<erikh> sec.
<erikh> slice and []= or shift/push will probably do what you want.
<erikh> anyhow, the point is you have options for using this like a proper array
<rob_> ok :)
<erikh> it's also going to be a LOT faster in almost all cases than an independent index-tracking solution
<erikh> which probably doesn't matter now, but might be useful to know in the future.
Sailias|work has joined #ruby-lang
kitallis has joined #ruby-lang
machine1 has joined #ruby-lang
slimfit has joined #ruby-lang
burns180_ has joined #ruby-lang
KU0N has joined #ruby-lang
machine1 has joined #ruby-lang
KU0N has quit [#ruby-lang]
Spooner has joined #ruby-lang
fayimora_ has joined #ruby-lang
dr_bob has joined #ruby-lang
wyhaines has joined #ruby-lang
havenn has joined #ruby-lang
macmartine has joined #ruby-lang
coreydaley has joined #ruby-lang
fayimora has joined #ruby-lang
erpuds has joined #ruby-lang
asdfdsfjnick has joined #ruby-lang
<asdfdsfjnick> I keep running out of memory with my multi-dimensional array. Can I use malloc() and free() to solve my problem? How to use them? Will this work with my pastebin code? http://pastebin.com/19ksR8eE int array=malloc(71*49*33); /*initialize array*/char array[71][49][33]=...; /*draw pixels*/ free(array); /* re assign array vars*/array[1][2][3]=...*/ /*draw pixels again*/
Shvillr has joined #ruby-lang
burns180 has joined #ruby-lang
<shevy> if ruby could just replace all of C
<shevy> the world would be a more beautiful place
Jake232 has joined #ruby-lang
jkyle has joined #ruby-lang
<Shvillr> Hello, everyone. This code: http://pastie.org/3505141 works in 1.9.2, but not 1.9.3. Anything I can do to make it work without changing the block? That is, I don't want to change B to self.class::B.
<lianj> shevy: nah, just replace all of python is enough to do the job
srbaker has joined #ruby-lang
bradland has joined #ruby-lang
kyrylo has joined #ruby-lang
<erikh> Shvillr: A::B work?
<Shvillr> erikh: Yes, but I don't want to change the code inside the block. I was hoping there's some kind of class_eval_with_constants or something, anything that actually acknowledges the possibility of defining classes dynamically.
<erikh> I suspect namespace evaluation happens differently
<erikh> if you can use A::B, that's the safest route anyhow.
<Shvillr> Yes, yes, they're cleaning up after that change in 1.9.1 when they allowed dynamic constant lookup in instance_eval and its kin. A pity, really. Breaking backwards compatibility is an issue, I understand, but why remove it outright and not rename it?
<Shvillr> So okay, no way to refer to just B. Thanks for the clarification!
rippa has joined #ruby-lang
hagebake has joined #ruby-lang
pandora17 has joined #ruby-lang
pandora17 has joined #ruby-lang
rippa has joined #ruby-lang
tyman has joined #ruby-lang
tenderlove has joined #ruby-lang
srbaker has joined #ruby-lang
pablo_ has joined #ruby-lang
burns180_ has joined #ruby-lang
havenn has joined #ruby-lang
fayimora has joined #ruby-lang
wmoxam has joined #ruby-lang
headius has joined #ruby-lang
jredville has joined #ruby-lang
ttilley has joined #ruby-lang
ascarter has joined #ruby-lang
burns180 has joined #ruby-lang
bglusman has joined #ruby-lang
andrewhl has joined #ruby-lang
h4y4shi has joined #ruby-lang
apeiros_ has joined #ruby-lang
<apeiros_> howdy ho you rubyists!
h4y4shi_ has joined #ruby-lang
<apeiros_> so what european ruby conference should I visit this year?
<any-key> apeiros_: come to Texas for the Lone Star Ruby Conference!
<any-key> :D
<apeiros_> any-key: sorry, US is on my no-fly list
<any-key> :'(
achiu has joined #ruby-lang
<apeiros_> as much as I love to be touched on my genitals, the strict requirement is it must be done by a pretty woman
<apeiros_> and your TSA agents just ain't that
<any-key> ugh fine
<lianj> ^^
<any-key> LSRC is worth getting fondled
<any-key> in fact, that should be the tagline
<any-key> I'm telling the organizer
<apeiros_> g
<any-key> h?
mssola has joined #ruby-lang
<apeiros_> g = grin
<any-key> why not :) ??
<apeiros_> 18:40 any-key: I'm telling the organizer <-- I found it funny, so I smirked/grinned
<any-key> apeiros_: :p
csherin has joined #ruby-lang
amerine has joined #ruby-lang
<any-key> when I'm in Austin I see him at the weekly "Ruby Users Group" lunches
<any-key> so he'll actually hear it :P
<apeiros_> ^^
<apeiros_> you'll get a free 100 line refactor if you make him do that :-D
<any-key> haha
<apeiros_> or a virtual beer
<any-key> I'll take it
<any-key> at the last one spiceworks took everyone out for free beer after the first night
s_dana has joined #ruby-lang
<Harzilein> hmm
burns180 has joined #ruby-lang
<Harzilein> any idea how i can make it work?
<Harzilein> :
<Harzilein> > require 'open-uri' ; open("http://admin:admin@10.0.0.1/")
<Harzilein> ArgumentError: userinfo not supported. [RFC3986]
heppy has joined #ruby-lang
<any-key> http doesn't do that
<any-key> that notation for username etc isn't really a valid URI for open-uri
m3nd3s has joined #ruby-lang
<any-key> maybe net::http supports it
bagratte has joined #ruby-lang
<lianj> ruby -ropen-uri -e 'open("http://127.0.0.1:8000/", :http_basic_authentication=>["foo", "bar"])'
<Harzilein> lianj: thanks :)
mrsolo has joined #ruby-lang
jacobwg has joined #ruby-lang
robbyoconnor has joined #ruby-lang
zmack has joined #ruby-lang
pemeon has joined #ruby-lang
trying2007 has joined #ruby-lang
<trying2007> hello
zmack has joined #ruby-lang
sly_it has joined #ruby-lang
<sly_it> Hi fellas :)
burns180_ has joined #ruby-lang
havenn has joined #ruby-lang
<trying2007> Dir.glob('speeches/*txt').each do |file|
<trying2007> File.readlines(file).each do |lines|
<trying2007> end
<trying2007> end
<trying2007> i am new to ruby and progamming
<trying2007> where a text parsing script woudl go in the above code i have just pasted
<trying2007> i am having trouble finding information on running Dir file method in conjuction with File method
skipper has joined #ruby-lang
<trying2007> the program will go a folder and read contents of files and run through script
robbyoconnor has joined #ruby-lang
<sly_it> if i had an array of values [1,2,3,4] and an array of keys, [a,b] and i want to obtain: [[a,1],[b,2],[a,3],[b,4]] what i should do ?
<apeiros_> trying2007: Dir.glob already takes a block, no need for that .each
ascarter has joined #ruby-lang
<apeiros_> trying2007: text parsing - well, File.readlines will give you all lines of a file, so the .each will yield you the individual lines. you'd process them in that loop
jxie has joined #ruby-lang
<lianj> sly_it: [1,2,3,4].each_slice(2).map{|i| [:a,:b].zip(i) }.flatten(1)
<apeiros_> lianj: flat_map
<trying2007> where do i put the code between 3 and 4th line or between second and third line?
<apeiros_> trying2007: do you know irb?
<trying2007> lets say for simplicity puts lines
<trying2007> yes i have irb
<sly_it> lianj: each_slice is not in plain ruby ?
achiu has joined #ruby-lang
<apeiros_> trying2007: you should probably start playing around with fragments of that code then
<lianj> sly_it: no, its plain
<sly_it> lianj: yeah sorry i was checking on array but is part of enumerable :)
<apeiros_> see what File.readlines("some/file/path.txt") does
<trying2007> my problem is when i run just readlines method and read file directly from folder i get an array i believe
<apeiros_> see what File.readlines("some/file/path.txt").each do |line| puts line end does
<trying2007> when i do it with the afore mentioned code i get a string
<apeiros_> trying2007: that's the point. DONT believe.
<apeiros_> try it in irb and KNOW
robbyoconnor has joined #ruby-lang
<trying2007> ok
<apeiros_> programming is not a religion. you can check the facts.
gianlucadv has joined #ruby-lang
<trying2007> thanks
lenilson_dias has joined #ruby-lang
francisfish has joined #ruby-lang
solars has joined #ruby-lang
<shevy> trying2007 with File.readlines you'll always have an array
<trying2007> when do puts lines.obj it says string ?
<trying2007> i mean lines.class
dbussink has joined #ruby-lang
<apeiros_> trying2007: you do .each
burns180 has joined #ruby-lang
<apeiros_> and .each will yield you each line separately
<apeiros_> one per iteration
<apeiros_> and a line is a string, of course.
<trying2007> thanks
<trying2007> it like you said it said string repeatedly
wyhaines has joined #ruby-lang
<shevy> it
<shevy> what is it
<shevy> joe said jump
<shevy> it said hello
<trying2007> i am going to step out and try some of this thank you for your help aperios
Austin__ has joined #ruby-lang
heppy has joined #ruby-lang
davidw has joined #ruby-lang
flak has joined #ruby-lang
jredville has joined #ruby-lang
GiambalaGiambala has joined #ruby-lang
beiter has joined #ruby-lang
<dominikh> apeiros_: :D
<apeiros_> howdy dominikh
burns180_ has joined #ruby-lang
<dominikh> ahoi
<yorickpeterse> I wonder if I can get away with using a cat picture for my Euruko proposal
<yorickpeterse> (for a profile picture that is)
<shevy> just dress it like a hipster and off you go
<yorickpeterse> haha
<apeiros_> meh, where's euruko 2012's website? o0
<yorickpeterse> euruko2012.org
<apeiros_> odd, only 3rd result in google…
<yorickpeterse> warning: the font looks like comic sans on Linux
<yorickpeterse> I already bitches about that
<yorickpeterse> * bitched
<apeiros_> oooh, amsterdam!
<apeiros_> I'm *very* inclined to attend euruko 2012 :D
krzyhoo has joined #ruby-lang
<yorickpeterse> Living close to Amsterdam?
<krzyhoo> hi guys
<krzyhoo> a quick question
<apeiros_> relatively. I'm in switzerland.
<krzyhoo> will colorize gem also work on windows???
<yorickpeterse> apeiros_: Ah. I live 20 min away from it by train :)
<yorickpeterse> krzyhoo: depends on the terminal you're using
<apeiros_> but I haven't yet visited amsterdam, and it's on my citytrip-list
<yorickpeterse> krzyhoo: does it support ANSI?
<apeiros_> oooh, it's only 2 days? :(
<krzyhoo> yorickpeterse: well, regular windows cmd
<krzyhoo> and does it??
<krzyhoo> yorickpeterse: to make it clear
<krzyhoo> am using linux myself
<krzyhoo> bur writing a script that should also work on windows
<yorickpeterse> Don't think the command prompt of windows does ANSI
<yorickpeterse> apeiros_: meh, just stick a few days longer to explore Amsterdam
<apeiros_> yorickpeterse: oh, I'll do that anyway
<apeiros_> at railsconf there was never time to explore during the conf
<apeiros_> so I always added a day. with amsterdam, I'll probably add 3 days
l0st1 has joined #ruby-lang
<Defusal> Rack::Directory.new(valid_path) says: undefined method `sub' for nil:NilClass
<Defusal> any ideas?
<apeiros_> yorickpeterse: wow, only 1.5h flight time, and ~170€ cost (flight only)
<apeiros_> yorickpeterse: you don't happen to know a good hotel? :)
<yorickpeterse> Could probably take the train
<yorickpeterse> Eh, not in Amsterdam no
<Defusal> (i am using the latest version of rack...)
<yorickpeterse> From what I know the hotels in Amsterdam aren't the cheapest
<yorickpeterse> Defusal: valid_path doesn't happen to be nil by any chance? :)
<Defusal> yorickpeterse, i wouldn't have said valid_path if there was any chance of that.
<yorickpeterse> heh, true
curtism has joined #ruby-lang
slimfit has joined #ruby-lang
<yorickpeterse> Lets see if I can take a shitty profile photo of myself
<Defusal> i just want to simulate exposing the directory listing publicly, but requiring the rack session that the rest of the application uses for security
<Defusal> i was excited when i found Rack::Directory, but now i guess i can't use it :(
<apeiros_> yorickpeterse: yay, hotels in amsterdam seem to be pretty expensive…
<Defusal> if anyone has a simple alternative solution for me, please let me know
benanne has joined #ruby-lang
<yorickpeterse> apeiros_: Yeah
Indian_ has joined #ruby-lang
voker57 has joined #ruby-lang
v0yager has joined #ruby-lang
brianpWins has joined #ruby-lang
burns180 has joined #ruby-lang
workmad3 has joined #ruby-lang
<krzyhoo> bur writing a script that should also work on windows
ilyam has joined #ruby-lang
qpingu has joined #ruby-lang
<amerine> tenderlove: I hope you enjoyed that hug. ;-)
<tenderlove> amerine: I did, thank you!!
<amerine> tenderlove: Thats all Eric's plan. He should probably get a real Monday hug.
<tenderlove> hahaha
<amerine> drbrain: ^^
magicbeef has joined #ruby-lang
<yorickpeterse> Poor krzyhoo, writing Windows code
qpingu has quit [#ruby-lang]
heppy has joined #ruby-lang
robbyoconnor has joined #ruby-lang
robbyoconnor has joined #ruby-lang
burns180_ has joined #ruby-lang
S1kx has joined #ruby-lang
gasbakid has joined #ruby-lang
<yorickpeterse> Oh look at that, I might have a decent picture for Euruko. No need for cat pictures after all
gix has joined #ruby-lang
ryez has joined #ruby-lang
wdperson has joined #ruby-lang
robbyoconnor has joined #ruby-lang
adambeynon has joined #ruby-lang
srbaker has joined #ruby-lang
<Harzilein> hmm
<Harzilein> is there any solution already for vim not correctly formatting blocks inside method chains inside assignments
<Harzilein> ?
Heimidal has joined #ruby-lang
gjaldon has joined #ruby-lang
twittard has joined #ruby-lang
<manveru> Harzilein: poking tpope ?
<shevy> no poking
<shevy> kissing!
burns180 has joined #ruby-lang
Dreamer3 has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
heftig has joined #ruby-lang
<Defusal> amazing!
Asher has joined #ruby-lang
<Defusal> exactly what i was looking for, but didn't know existed :)
DRCALKIN has joined #ruby-lang
fayimora has joined #ruby-lang
futurechimp has joined #ruby-lang
coreydaley has joined #ruby-lang
darkf has joined #ruby-lang
<yorickpeterse> Aww yeah, proposal sent to Euruko
<yorickpeterse> And my picture didn't turn out as bad as I feared
chimkan has joined #ruby-lang
amerine_ has joined #ruby-lang
burns180_ has joined #ruby-lang
Jonis has joined #ruby-lang
darkf_ has joined #ruby-lang
sgmac has joined #ruby-lang
tbuehlmann has joined #ruby-lang
trying2007 has joined #ruby-lang
m3nd3s has joined #ruby-lang
slimfit has joined #ruby-lang
chimkan has joined #ruby-lang
sgmac has quit [#ruby-lang]
dejongge1 has joined #ruby-lang
corsican has joined #ruby-lang
machine1 has joined #ruby-lang
schroedinbug has joined #ruby-lang
jredville has joined #ruby-lang
whatasunnyday has joined #ruby-lang
solars has joined #ruby-lang
burns180 has joined #ruby-lang
robbyoconnor has joined #ruby-lang
amerine has joined #ruby-lang
Asher has joined #ruby-lang
Fullmoon has joined #ruby-lang
robbyoconnor has joined #ruby-lang
tenderlove has joined #ruby-lang
robbyoconnor has joined #ruby-lang
lsegal has joined #ruby-lang
machine1 has joined #ruby-lang
burns180 has joined #ruby-lang
jamw has joined #ruby-lang
robbyoconnor has joined #ruby-lang
tenderlove has joined #ruby-lang
headius has joined #ruby-lang
berth_ has joined #ruby-lang
h4y4shi has joined #ruby-lang
S1kx has joined #ruby-lang
robbyoconnor has joined #ruby-lang
Guest43823 has joined #ruby-lang
s0ber_ has joined #ruby-lang
y3llow_ has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
havenn has joined #ruby-lang
y3llow has joined #ruby-lang
r0bby has joined #ruby-lang
heretoday has joined #ruby-lang
y3llow has joined #ruby-lang
burns180_ has joined #ruby-lang
Tearan has joined #ruby-lang
y3llow has joined #ruby-lang
davidw has joined #ruby-lang
srbaker has joined #ruby-lang
hrnt has joined #ruby-lang
y3llow has joined #ruby-lang
srbaker has joined #ruby-lang
GiambalaGiambala has joined #ruby-lang
slimfit has joined #ruby-lang
burns180 has joined #ruby-lang
<berth_> Is anyone using rvm on cygwin here?
<Boohbah> sounds painful
<berth_> It is quite slow, when you do a cd into a directory
<berth_> So what do you use to get ruby 1.9.x on Windows?
<manveru> rubyinstaller?
<berth_> and then you use the normal Windows command line (cmd.exe)?
<manveru> you can use terminal2 or any other term
<erikh> console2
<bougyman> Console2
<bougyman> yep
<manveru> right :)
<bougyman> it's much nicer.
<manveru> sorry, long time no windows
<bougyman> and Console2 will run bash as your shell, if you like (and have a non-cygwin one installed)
<bougyman> i always install msysgit and let it replace the windows cli with GNU
<bougyman> love that feature of the msysgit installer.
<erikh> I think it's mildly amusing it seems to go that way for a lot of windows devs
<bougyman> at least if I have to be on win I get a real command line.
<berth_> and will it give me forward slashes for pathes/to/subdirectories?
<erikh> even the types doing more traditional windows programming.
<erikh> berth_: windows supports that natively
<bougyman> berth_: if you set Console2 to run bash? yes, it's regular bash.
<bougyman> with ssh, git, etc.
<bougyman> make it full screen and you almost can't smell Redmond anymore.
<manveru> i thought pik was still alive
<erikh> saw a blog post about it today
<erikh> on ey's site
<erikh> actually, sec, it might be helpful for this convo
<manveru> https://github.com/L2G/pik is the latest
ascarter has joined #ruby-lang
<erikh> berth_: ^
brownies has joined #ruby-lang
<berth_> Oh, OK. Thanks a lot! I didn't know about Console2 and bash.
<berth_> We've started using cygwin to do java dev
<bougyman> does pik include a mingw build env, too?
<berth_> and now we're wanting to get a cross platform env for ruby and rails.
<bougyman> that's what I liked about msysgit, gave the mingw build env, as well (including ssl)
<manveru> erikh: the pik repo they link to doesn't have anything newer than 1.9.1
<manveru> bougyman: no idea
m3nd3s has joined #ruby-lang
vpamulap has joined #ruby-lang
<erikh> ah, maybe it is dead
<erikh> berth_: check out the railsinstaller linked above there
<erikh> it's done by the rvm guy, wayneeseguin
<berth_> I see, :)
<berth_> Wow. That was very helpful, thank you all!
m3nd3s has joined #ruby-lang
<manveru> take care
<erikh> enjoy
<Boohbah> wow this console2 sounds interesting
Boohbah has joined #ruby-lang
<Harzilein> hmm... if i have some_enum_of_arrays = some_enum.map do |d| [d.foo, d.bar] end, how can i have the result be a hash of foo elements to bar elements instead?
<manveru> Harzilein: Hash[a.map{|d| [d.foo, d.bar] }]
Boohbah_ has joined #ruby-lang
<Harzilein> manveru: thanks. i had hoped for a method, but i guess it's too specialized...
ronsonol has joined #ruby-lang
burns180_ has joined #ruby-lang
<manveru> it is a method
<manveru> just not on Array
brianpWins has joined #ruby-lang
ged has joined #ruby-lang
<berth_> member:identifier:harzilein: elems = [1,2,3]
<berth_> elems.inject({}) do |result, elem| result[elem.to_s] = elem.abs; result end
<berth_> ... but inject is not very readable most of the time
<Boohbah> eww
burns180 has joined #ruby-lang
<apeiros_> berth_: the `; result` is a hint that you don't want inject
<manveru> Boohbah: it's also way slower :)
<apeiros_> see #each_with_object
<apeiros_> hash creation can also often be done in a nicer way using Hash::[]
<apeiros_> (that's the class method…)
<listrophy_> i need to run an external, long-running command... and I'd like to output its stdout as it goes. how? most solutions i've come up with buffer the output until the command finishes, then outputs one giant string
<berth_> Harzilein: I'd try to be readable and write it in two lines
<berth_> result = Hash.new
<apeiros_> ew
<berth_> elems.each { |elem| result[elem.to_s] = elem.abs }
<apeiros_> Hash.new is instafail :-p
<berth_> what do you mean? because I don't write {} ?
<apeiros_> yupp
<apeiros_> result = Hash[elems.map { |e| [e.to_s, e.abs] }] # does the same as the above
<Boohbah> manveru said that about 20 minutes ago :)
<berth_> listrophy_: i
<berth_> 
<apeiros_> Boohbah: I take that as proof of it being a good solution ;-)
<berth_> listrophy_:
<berth_> # cause the IO stream to be flushed after every write / print / puts
<berth_> # so we can get progress dots
<berth_> STDOUT.sync = true
chimkan_ has joined #ruby-lang
<berth_> ... that should help
<Boohbah> nice
<listrophy> berth_: thx!
wyhaines has joined #ruby-lang
<listrophy> berth_: not working :(
<berth_> hm,
<manveru> listrophy: you use open3?
<berth_> I've been using this in a rails project
<listrophy> manveru: well, popen2e
WillMarshall has joined #ruby-lang
<listrophy> so, yeah, more or less
corsican has joined #ruby-lang
<berth_> maybe your stream is not STDOUT but something else
<listrophy> i know it's stdout
steeljav has joined #ruby-lang
<listrophy> manveru: still not working :(
<manveru> listrophy: are you on windows or something?
<listrophy> manveru: nope. os x
<shevy> si, so, se, senor!
<listrophy> running instruments through popen2e
<manveru> are you sure it outputs data to non-tty ?
<listrophy> when i run the instruments command in the CLI proper, it outputs as it goes
<listrophy> and when i puts the second return value of popen2e (the stdout+stderr stream), the contents are there... but i can't get it to stream
<berth_> just guessing: the instrument has an "in" buffer?
<listrophy> berth_: well, it doesn't take any stdin
<berth_> your script --> [unbuffered STDOUT] -> [instrument's input buffer] -> instruments reaction
<listrophy> berth_: nope. just calling instruments with a command line flag to tell it where to load a file from
<manveru> err
<manveru> stdout.sync = true
<manveru> not STDOUT
<listrophy> that gist outputs the correct stuff, but it doesn't stream it
<manveru> inside the block
burns180_ has joined #ruby-lang
<berth_> yes, it needs to go inside the block because you want the streams that you defined in |stdin, stdout, wait_thr|
Fullmoon has joined #ruby-lang
havenn has joined #ruby-lang
<berth_> there is still a chance that stdout === STDOUT,
<berth_> but I wouldnt bet on that.
<manveru> there is no chance
<berth_> :-)
<manveru> also use $stdout, STDOUT shouldn't ever be used without good reason
<listrophy> sry, eating pizza :)
<dominikh> manveru: heh, I always confuse the two.
corsican has joined #ruby-lang
outoftime has joined #ruby-lang
<listrophy> i'm trying lots of combos here... nothing seems to be working
<manveru> does osx have strace?
<listrophy> don't think so
<listrophy> how do i check?
<manveru> google, i guess
<listrophy> heh
<listrophy> well, no manpage for it
<manveru> ktrace, it seems
<manveru> though that's from a mail from 2004
<manveru> dtruss from 2011
<manveru> anw, i'm not much help there
<erikh> lsof -p <pid>
<erikh> see where fd's 0,1 & 2 are going.
<erikh> you can sudo dtruss -p <pid> as well, but unless your low-level C is sharp you're not going to learn much -- lsof is a lot more obvious
burgestrand has joined #ruby-lang
<manveru> well, it's not hanging, so getting the pid before it exits is probably kinda hard :)
<erikh> oh, use -f to debug over a fork
<erikh> to dtruss.
burgestrand has joined #ruby-lang
<erikh> works for strace too, fwiw
<berth_> you can try to replace instruments with a shell script that simulates it
<berth_> .. to see if your right in what you think about how instrument works.
<berth_> ... and to make it wait long enough to get a pid
<berth_> listrophy: how about trying a screensharing session to discuss this?
<berth_> I have google+ hangout
brushbox has joined #ruby-lang
<listrophy> berth_: i'm probably gonna call it for the day, but thanks for the offer!
<berth_> Sure, all I coul do would be ask stupid questions ;-)
<listrophy> berth_: bah, i don't know about that =)
<berth_> ... be the rubber duck in http://en.wikipedia.org/wiki/Rubber_duck_debugging
<shevy> cute little ducklings
Sailias|work has joined #ruby-lang
<shevy> eaten by the big bad wolf
burns180_ has joined #ruby-lang
* zenspider yawns
<zenspider> man... I've been running on fumes since our anniversary party on tuesday
ascarter has joined #ruby-lang
<erikh> I had a 17 hour rollout that day
<erikh> I know how you feel
<erikh> on the bright side, we're equipped to handle four different kinds of ruby for our applications now
jredvill` has joined #ruby-lang
willdrew has joined #ruby-lang
machine2 has joined #ruby-lang
burns180 has joined #ruby-lang