Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
<andkerosine> Hm, well thanks, guys.
<andkerosine> Lot to chew on.
<andkerosine> drbrain: I'll probably go with Persistent, and I'll submit the request if and when I finally decide on it.
<drbrain> andkerosine: can you submit it regardless?
<drbrain> that way I have a reminder to move the code from mechanize
<andkerosine> Will do.
andkerosine [andkerosine!~andkerosi@adsl-067-034-186-046.sip.mco.bellsouth.net] has quit [#ruby-lang]
<andrewvos> I was bored so made a shitty site http://fuckingawesomesongs.com/
<injekt> lol
<andrewvos> hehe
<injekt> wait, I was waiting for them to change when I refreshed
<andrewvos> hah nope
<andrewvos> injekt: That would be cool though
<injekt> aye
<andrewvos> playingmeafuckingawesomesong.com
<andrewvos> haha
<injekt> fuckingawesomesongs.com/genre/rock
<injekt> etc
<injekt> gogo
<andrewvos> Damnit I need sleep
<andrewvos> Stop giving me ideas
<injekt> damnit it's 12:10
<injekt> YOU NEED CODE
<andrewvos> NOOOOO
<andrewvos> Maybe it should just play a random song?
<injekt> open source?
<andrewvos> That's probably a great idea
<injekt> fuck that people hate that shit
<rue> Not a random song, an AWESOME song.
<andrewvos> injekt: Then how should it work?
<injekt> rue++
<injekt> lol
<andrewvos> rue: But they are all awesome
<injekt> andrewvos: i dunno, but dont force play on a user
<andrewvos> Hmmm
<injekt> a random awesome song* fixed it
<injekt> or an awesome random song?
<andrewvos> injekt: Ok we're on the same page
<injekt> omg so many choices
<andrewvos> But no autoplay
<injekt> +1
<andrewvos> Ok making a git repo
<andrewvos> Ummm
<andrewvos> Is github broked?
<andrewvos> I push, but nothing happens
<erikh> I think its resque processor is buuuuuusted
<injekt> I think they're having issues
<injekt> aye
<andrewvos> Aww bloody hell. I'm trying to do open source here
<erikh> open sores
<andrewvos> heh
<drbrain> I did a push a while back and it hasn't made it to the website
<andrewvos> I [].choice not a method?
<andrewvos> Is*
<erikh> it is if you require highline I think
<rue> #sample
<rue> I think it got changed along the way
andrewhl [andrewhl!~andrew@24.246.14.26] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.172.4] has joined #ruby-lang
<andrewvos> Ok it is being pushed as we speak
<andrewvos> injekt: If I become rich off your idea I'm going to keep all the money
<erikh> just buy him a bottle of whisky
<erikh> he's easy to please
<andrewvos> The new and improved
<injekt> he's right
<erikh> you should have it use youtube's api
<andrewvos> That was quite some pivot guys!
postmodern [postmodern!~postmoder@c-76-105-237-23.hsd1.or.comcast.net] has joined #ruby-lang
<erikh> and just pull down 5 starred songs
<erikh> call it a mashup
<andrewvos> erikh: They wouldn't be "fucking awesome".
<erikh> over night success
<erikh> I'm going back to listening to aphex twin kthxbai
<andrewvos> When it's on github people can fork it and add fucking awesome songs?
<andrewvos> Where do I find those "fork me" buttons?
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby-lang
twittard_ [twittard_!~twittard@66.180.192.214] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.172.4] has joined #ruby-lang
<andrewvos> Oh shit I have to stop using duckduckgo :(
<andrewvos> I found them first time with google
<brownies> why?
blackoteka [blackoteka!~blackotek@180.251.174.207] has joined #ruby-lang
<theconartist> ruby is bad for my health, i keep wasting my time on stuff like this
<erikh> if I told you &foo invoked foo.to_proc...
<erikh> :)
<drbrain> theconartist: you should learn scheme
<vbatts> haha
<vbatts> drbrain: you might expect more submits from me now.
<drbrain> vbatts: great!
<drbrain> vbatts: maybe I can make you a committer someday?
<vbatts> i've just taken on a new gig that is *much* more ruby, and *very* community oriented
<theconartist> drbrain: im learning CL
<vbatts> at akamai, i was doing mostly c, c++ and python
<drbrain> vbatts: where at?
<drbrain> theconartist: close enough!
<theconartist> some guy's macro i saw made me think of doing this in ruby
<vbatts> drbrain: i'm at red hat now
daglees [daglees!~belvedere@178.238.185.26] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
<drbrain> nice!
<vbatts> it'll be good
<theconartist> erikh: i don't quite understand what you are trying to tell me but it made me realize there was a much better way to do this
<vbatts> drbrain: heh, working toward the committer carrot sounds tempting ;)
<erikh> yeah -- in retrospect, I'm not sure how that would work either.
<injekt> theconartist: fn(&-> a,b { .. }.(..)
<erikh> ugh
<erikh> stabby
* injekt runs
blackoteka [blackoteka!~blackotek@180.251.163.242] has joined #ruby-lang
<injekt> >> foo(&-> x { x.reverse }).("foo")
<injekt> ArgumentError: wrong number of arguments (0 for 1)
<injekt> wut
<injekt> oops
<injekt> bad paren placement
<injekt> meh
<injekt> lol @ me yielding instead of returning the proc
<injekt> it's too late
<theconartist> what about that 2nd oen injekt
<injekt> too normal
<injekt> :D
<theconartist> i want ruby macros :(
<drbrain> I don't
<drbrain> we're still removing damage from rails abuses of non-macro'd ruby
<drbrain> like alias_method_chain
flowerpot [flowerpot!~flower@ec2-177-71-177-109.sa-east-1.compute.amazonaws.com] has joined #ruby-lang
<andrewvos> I have a pull request!
Tref [Tref!~Tref@cpe-74-76-102-56.nycap.res.rr.com] has joined #ruby-lang
<andrewvos> hahaha
<andrewvos> Ok now it's really sleep time
<andrewvos> Thanks for ruining my night with code ideas everyone
<injekt> \o/
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<andrewvos> Especially you
<andrewvos> heh adding it to hacker news
<andrewvos> Fucking Awesome Songs Considered Harmful
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
<injekt> drbrain: fu!
<injekt> drbrain: "Fix missing = in SYNOPSIS for POST. Submitted by inject"
<drbrain> DAMNIT
<injekt> why not go one step further and use 'inkjet'
<andrewvos> He spelled your name wrong
<andrewvos> hahaha
<andrewvos> "needle"
<injekt> :D
<andrewvos> Right yeah I was going to bed. Night
<injekt> andrewvos: where's your repo?
<andrewvos> ...
<andrewvos> There's a link here http://fuckingawesomesongs.com/
<injekt> it's late and im lazy
<injekt> cmon
harlanhorbach [harlanhorbach!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
<drbrain> injekt: I fixed it locally in the history while I work on my other problem
<injekt> word
<injekt> drbrain: don't worry im not THAT offended
* injekt wipes tears
<drbrain> injekt: two one-letter commits in a row!
<andrewvos> Change to python injekt? People have more respect there.
<injekt> :D
<injekt> andrewvos: they dont like me there
Seuss [Seuss!~seuss@unaffiliated/seuss] has joined #ruby-lang
harlanhorbach_ [harlanhorbach_!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
sideshownz [sideshownz!~sideshown@121.98.77.84] has joined #ruby-lang
<drbrain> I voted
<andrewvos> haha
<andrewvos> Thanks :)
<petercooper> +1
<andrewvos> mwuhahahaha
<shevy> oh dear python
<petercooper> btw, stupid HN trick.. if you're ever deliberately trying to get votes, link people to the /newest page instead of the direct page
<andrewvos> Oh?
<petercooper> HN has detection for lots of new traffic going direct to a post and voting up
<petercooper> and will apply automatic flags
blackoteka [blackoteka!~blackotek@180.251.172.67] has joined #ruby-lang
<petercooper> not sure what the threshold is but it's been tested and pg admitted to this tactic.. so the workaround is to push people to /newest
<petercooper> it's mostly to tackle people tweeting "vote this up!!" etc.
<drbrain> my vote won't count ☹
<injekt> Your opinion does not count!
<injekt> andrewvos: how's the sleep going?
<andrewvos> eh
chimkan [chimkan!~chimkan@206.248.173.91] has joined #ruby-lang
chimkan [chimkan!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby-lang
<andrewvos> haha
<andrewvos> Ok sleep time. Also, another pull request
<flowerpot> If I have a variable length which is the string "33:44", then if I write min, sec = length.scan(/\d+/), min will be 33 and sec will be 44. What syntactic magic is this, and how does Ruby do it...?
<petercooper> scan is a method that accepts a regular expression and returns consecutive matches of it against the string
<petercooper> so maybe "regular expression" is the term you're looking for? :)
<savage-> flowerpot: search for "parallel assignment" here for the rules: http://phrogz.net/programmingruby/language.html
<petercooper> Ohhh, *that* part, haha
<flowerpot> I get that part, but not the part where different values are assigned to hte variable in the order they appear in the resulting array
<petercooper> More Red Bull required ;-)
<flowerpot> haha
<savage-> :-)
<injekt> flowerpot: one, two = ['foo', 'bar'] -- it splats it on assignment
<drbrain> flowerpot: the array is unpacked left to right and each part is put in the next variable
<flowerpot> thanks savage-
<drbrain> min, sec = ['33', '44']
<petercooper> On the plus side, I don't live on Stack Overflow.
<flowerpot> makes total intuitive sense, just haven't seen it before
<drbrain> which is like min, sec = '33', '44'
<flowerpot> a nice surprise.
<drbrain> which is like min = '33'; sec = '44'
<drbrain> you can also a, b = b, a to swap
<petercooper> you can do some craziness like a, *b, c = [*1..10] too
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
harlanhorbach [harlanhorbach!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
<petercooper> andrewvos: It made front page
<injekt> only post 1.8.7
<petercooper> at the risk of inciting warfare, 1.9 is > 3 years old in production so I tend to ignore 1.8 nowadays
<petercooper> (this is not a judgment, just a preference ;-))
<injekt> me too, I just wish everyone else was the same
<injekt> I feel like I HAVE to say things :(
<injekt> 'injekt, y u no support 1.8.7??' I get this a lot
<petercooper> Amen. Although if they complain about it, it's a good opportunity to proselytize.
<drbrain> I think it's fine to push any newbs to 1.9.3
<drbrain> preferred, even
<injekt> definitely
<petercooper> roll on jruby 1.7
<injekt> what happens in jruby 1.7? 1.9 default?
<petercooper> yeah
<injekt> ah
<petercooper> they had a ticket based vote on it the other week
<injekt> wow it sucks that they had to vote on it
<petercooper> lol
<petercooper> I think it was a unanimous yes
<injekt> thank god
<petercooper> once jruby 1.7 and rubinius 2.0 are out, it might even be beyond "mentioning" stage.
<injekt> :)
<injekt> the only thing I really get caught out on sometimes is chaining enums
<injekt> otherwise it's still pretty easy to support 1.8.7
<injekt> screw anything before that
<petercooper> I like stuff like rand(5..9) too much
<petercooper> although that doesn't even work on 1.9.2 so I'm probably taking the piss as we say here..
<injekt> :D
<savage-> petercooper: you can still do Random.new.rand(5..9) :-)
<petercooper> Random.new.rand(5..9) does though! Yay Rub!
<petercooper> Hahaha
<savage-> haha
<petercooper> Craziness..
<savage-> yup
<drbrain> the upgrade barrier from 1.9.2 to 1.9.3 is pretty short
<injekt> I cant say I use it much
<injekt> yeah
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
<petercooper> I'd have to look it up. The only other one I really remember off the top of my head is String#prepend. And a few encodings.
<injekt> is that insert(0, str) ?
<drbrain> injekt: yes
Defusal [Defusal!Defusal@dsl-240-230-07.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
<injekt> heh
<drbrain> s0ra_h added #prepend
<injekt> is #codepoints new?
<injekt> haven't seen that
<injekt> 'foobar'.codepoints.to_a #=> [102, 111, 111, 98, 97, 114]
<drbrain> 1.9.2 had codepoints
<injekt> ah
blackoteka [blackoteka!~blackotek@180.251.171.139] has joined #ruby-lang
hagabaka [hagabaka!~quassel@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~quassel@unaffiliated/hagabaka] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby-lang
<shevy> hmm
Gekz [Gekz!~gekz@115-64-60-202.static.tpgi.com.au] has joined #ruby-lang
Gekz [Gekz!~gekz@unaffiliated/gekz] has joined #ruby-lang
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-rmwjepzasbpewpyx] has joined #ruby-lang
harlanhorbach_ [harlanhorbach_!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
harlanhorbach_ [harlanhorbach_!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
Tref [Tref!~Tref@cpe-74-76-102-56.nycap.res.rr.com] has joined #ruby-lang
harlanhorbach [harlanhorbach!~harlanhor@99-47-150-117.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.170.22] has joined #ruby-lang
Luxx_ [Luxx_!~highoh@c-67-171-35-186.hsd1.wa.comcast.net] has joined #ruby-lang
gentz_ [gentz_!ilab@ancient.webfoundation.net] has joined #ruby-lang
<andrewvos> injekt: WTF pull requests keep on waking me up
<andrewvos> There's 5 new ones
<andrewvos> And this has 14 points http://news.ycombinator.com/item?id=3559984
<andrewvos> hahahaha
<andrewvos> Amazing
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
<andrewvos> Number 9 on the front page :|
<shevy> andrewvos you do weird things
<andrewvos> Right turning off email notifications
<andrewvos> Night everonye
<andrewvos> 400 hits so far
gnufied [gnufied!~gnufied@122.178.200.63] has joined #ruby-lang
<andrewvos> The internet is fucking weird
qpingu [qpingu!~Adium@67.218.117.238] has quit [#ruby-lang]
blackoteka [blackoteka!~blackotek@180.251.167.183] has joined #ruby-lang
slimfit [slimfit!~slimfit@c-98-245-122-231.hsd1.co.comcast.net] has joined #ruby-lang
<darkf> andrewvos: have you discovered horsecocks?
<ozzloy> i'm getting a raw "\xe9" over the wire. how do i make that print out as a é? here's what i currently get: http://pastie.org/3331637
<ozzloy> i can put a raw lambda in there, but if i try to puts \xE9 i get a questionmark diamond
savage-_ [savage-_!~savage_@istep.static.monkeybrains.net] has joined #ruby-lang
gregf [gregf!~gregf@207.5.168.94] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
fireglow [fireglow!fireglow@irssi.eu] has joined #ruby-lang
<shevy> darkf lol
blackoteka [blackoteka!~blackotek@110.136.247.41] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
kain_ [kain_!~kain@151.64.232.240] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.174.178] has joined #ruby-lang
djcercone [djcercone!~djcercone@cpe-184-57-48-50.columbus.res.rr.com] has joined #ruby-lang
djcercone [djcercone!~djcercone@cpe-184-57-48-50.columbus.res.rr.com] has quit [#ruby-lang]
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<ozzloy> never mind, i fixed it without having to deal with encoding stuff
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
<ozzloy> "fixed it" meaning i put a bandaid on a mortar wound
twittard_ [twittard_!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
Kichael [Kichael!~Kichael@70-36-49-167.dyn.novuscom.net] has joined #ruby-lang
chimkan [chimkan!~chimkan@184.175.39.28] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
dbussink [dbussink!~dbussink@ec2-46-137-118-125.eu-west-1.compute.amazonaws.com] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.170.47] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
skiz [skiz!~skiz@c-69-181-211-4.hsd1.ca.comcast.net] has joined #ruby-lang
plusk [plusk!~plusk@201-34-216-120.gnace703.dsl.brasiltelecom.net.br] has quit ["Leaving"]
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.254.184.53] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:1:225:bcff:fedc:e1fe] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
Transformer [Transformer!~Transform@ool-4a59e397.dyn.optonline.net] has joined #ruby-lang
Luthraz [Luthraz!~Luthraz@68.179.172.242] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.251.161.141] has joined #ruby-lang
Luthraz [Luthraz!~Luthraz@68.179.172.242] has quit [#ruby-lang]
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
Dreamer3 [Dreamer3!~Dreamer3@74-134-33-91.dhcp.insightbb.com] has joined #ruby-lang
jayeffess [jayeffess!~jfs@c-65-96-213-90.hsd1.ma.comcast.net] has joined #ruby-lang
lsegal` [lsegal`!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
levifig [levifig!~levifig@levifig.com] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
andkerosine [andkerosine!~andkerosi@adsl-067-034-186-046.sip.mco.bellsouth.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
blackoteka [blackoteka!~blackotek@180.254.185.181] has joined #ruby-lang
dfr|mac_ [dfr|mac_!dfr|work@nat/google/x-bjneaahnqvgvstsf] has joined #ruby-lang
mikeric [mikeric!~mike@24.84.47.18] has joined #ruby-lang
ascarter [ascarter!~ascarter@209.180.212.112] has joined #ruby-lang
hagabaka [hagabaka!~quassel@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~quassel@unaffiliated/hagabaka] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
csherin [csherin!~csherin@61.17.32.84] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
gokul [gokul!~gokulnath@115.111.177.122] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
pp01bit [pp01bit!~pp01bitDo@111.92.240.242] has joined #ruby-lang
jaafar [jaafar!~jet@adsl-76-200-166-49.dsl.pltn13.sbcglobal.net] has joined #ruby-lang
<jaafar> hi ruby experts. I want to provide useful information on a failed call to rb_eval_string_protect ("state" nonzero, result Qnil) to my users. Is there something in the embedded API like "last_error_humanreadable" or something like that?
<jaafar> I see references to rb_errinfo out there but it looks like that might be deprecated
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-iecndniozufhdnuf] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has quit [#ruby-lang]
amerine [amerine!~mturner@216.228.171.197] has joined #ruby-lang
andkerosine [andkerosine!~andkerosi@adsl-067-034-186-046.sip.mco.bellsouth.net] has quit [#ruby-lang]
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
lsegal` [lsegal`!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-75dde655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
MistyM_ [MistyM_!MistyM@conference/code4lib/x-ynjyvtaeukvucbtp] has joined #ruby-lang
kain [kain!~kain@151.64.208.144] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
savage- [savage-!~savage_@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-vtqsyrxmnezozjjk] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.179.38.48] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.178.202.187] has joined #ruby-lang
muzone_ [muzone_!~holla@84.16.208.227] has joined #ruby-lang
Karmaon [Karmaon!~john@gateway/tor-sasl/karmaon] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
yumike [yumike!~yumike@213.154.168.130] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-49-193.a212.priv.bahnhof.se] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host165-130-dynamic.244-95-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
lsegal` [lsegal`!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
Dreamer3__ [Dreamer3__!~Dreamer3@74-134-33-91.dhcp.insightbb.com] has joined #ruby-lang
jordan` [jordan`!~gromit@2001:660:3302:2826:225:90ff:fe20:d9a8] has joined #ruby-lang
dc5ala [dc5ala!~dc5ala@stgt-5f7096b3.pool.mediaWays.net] has joined #ruby-lang
kp666 [kp666!~kp666@115.111.177.122] has joined #ruby-lang
<manveru> andrewvos: you got tabs in your repo!!!!
take_cheeze [take_cheeze!~Adium@pc06224.anc-tv.ne.jp] has joined #ruby-lang
<manveru> guess i haven o choice but to fix that
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby-lang
jordan` [jordan`!~gromit@2001:660:3302:2826:225:90ff:fe20:d9a8] has joined #ruby-lang
<andrewvos> manveru: No I don't
<andrewvos> manveru: I removed them
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
thone_ [thone_!~thone@g226051222.adsl.alicedsl.de] has joined #ruby-lang
qpingu [qpingu!~Adium@99-45-170-65.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<andrewvos> I really need to put each file in it's own config file
<andrewvos> Or something
<andrewvos> Merging sucks
<manveru> each song, you mean?
<andrewvos> Yeah perhaps
<manveru> i think you should just accept urls where people put atom feeds of songs :)
<andrewvos> haha
<andrewvos> No
<andrewvos> People would put crappy songs in there
<manveru> oh noes!
<manveru> yeah... awesome isn't what it used to be
<andrewvos> :/
<andrewvos> Wonder how I should split it into multiple songs?
<andrewvos> Or make it more merge friendly
<manveru> it gets better once the list is longer, if you require that it's sorted in some way
<andrewvos> Maybe yaml?
<manveru> how's that better?
<andrewvos> manveru: Maybe just merging would be better
<manveru> dunno, you could require each gh user to make their own file
<andrewvos> manveru: Would be too much work
<manveru> that would at least solve merging, then you just have to worry about duplicates
<andrewvos> manveru: And each file would need it's own name
<manveru> or you just use the github api to check the files of all forks and merge them that way :)
<andrewvos> A lot of unneeded typing
<andrewvos> manveru: Something like this would merge a lot easier
<andrewvos> (I think?)
<manveru> because?
<shevy> I wanna hear matz talk about ruby this year :(
<andrewvos> Hmm
<andrewvos> manveru: Not suer actually... Just looks like it would :)
<manveru> making things whitespace-sensitive just adds another headache :P
<andrewvos> manveru: Do you not think so?
<manveru> of course shevy will tell you how great yaml is
<shevy> depends
<shevy> psych.rb hates my yaml files still
<shevy> I dont think you can decouple how good something is from the tools. the best software can suck if the tools that interact with it are the ultimate suck
<shevy> and in yaml world there is a lot of suck :(
<manveru> yaml just needs a json.org :)
<shevy> oh man
<shevy> if ruby just would have been used instead of javascript ...
<shevy> :(
<bnagy> in the director's cut of Event Horizon, turns out it was just YAML
<shevy> lol
<manveru> :)
<shevy> andrewvos on that yaml file
<shevy> first line
<shevy> if you only store songs in that file, I would get rid of "songs:"
Eising [Eising!~allan@82.180.29.6] has joined #ruby-lang
<shevy> you save one indent level that way and still keep all the info you need!
Cope [Cope!~stephen@91.194.75.218] has joined #ruby-lang
<manveru> i'd still use json, you still have to serve it anyway
<manveru> unless there's some awesome yaml.js that i'm not aware of
<andrewvos> I'm having to manually merge pretty much everything now :(
scottj [scottj!~scott@206.212.250.58] has joined #ruby-lang
<scottj> is there a way to tell if a subprocess was closed with C-c or the gui close button if it still returns status 0?
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
<shevy> scottj what gui close button? rails? or something like ruby-gtk?
<shevy> if it is a text program from the commandline and someone does Control-C SIGINT is sent, I think, and you can use begin;rescue Interrupt;end or something like that
<scottj> shevy: window manager, the subprocess is some generic app
<shevy> (or "rescue Exception => error; pp error" if you forgot the name)
<shevy> hmm
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<scottj> so ruby app a starts some app b as a sub process. if b is killed with C-c then is there a way for a to see?
<shevy> you mean in a thread?
Defusal [Defusal!Defusal@dsl-240-230-07.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
<shevy> it's a bit hard to say, but you should design the apps so that they can exit gracefully. like, if SIGINT happens in the subprocessed-app, quit only that app and pass control to the main program
<shevy> I usually tend to return a symbol to determine when I can exit from a program
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
unsymbol [unsymbol!unsymbol@gateway/shell/anapnea.net/x-ejueieyhpfuepvdo] has joined #ruby-lang
cyri_ [cyri_!~cyri_@152.107.70.86.rev.sfr.net] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-klqcceaclutdvxmq] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-skdzmgywtbgmllok] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@dhcp-187030.eduroam.chalmers.se] has joined #ruby-lang
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-hpeasmuschvccfik] has joined #ruby-lang
beawesomeinstead [beawesomeinstead!u1643@gateway/web/irccloud.com/x-bnewgjqidutnizzy] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-kekqxpkscfoqjxja] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-tmaofuvnkzhuwxwo] has joined #ruby-lang
<andrewvos> Really don't know what to do here? https://github.com/AndrewVos/fuckingawesomesongs.com/issues/28
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-taszlesfmtegwmad] has joined #ruby-lang
<andrewvos> A shitload of json files?
<andrewvos> How do I name them?
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-dwyolotafjlkfghc] has joined #ruby-lang
soahccc [soahccc!chaos@d2-1.debian-02.ppps.hosts.project-production.de] has joined #ruby-lang
newbold_cloud [newbold_cloud!u5179@gateway/web/irccloud.com/x-olftmsgbagdrsmvw] has joined #ruby-lang
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-wdxpfgfjuipmuyvi] has joined #ruby-lang
sei [sei!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-pvgrdegzeikezrzu] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-123-58.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
beawesomeinstead [beawesomeinstead!u1643@gateway/web/irccloud.com/x-zqcgpzxsyyifqavo] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.178.202.187] has joined #ruby-lang
<brownies> andrewvos: do the names have any meaning? if not, just generate UUIDs, eh
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
Foxmaster [Foxmaster!~root@c-83-219-199-232.cust.bredband2.com] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
yumike [yumike!~yumike@213.154.168.130] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp121-44-86-68.lns20.syd6.internode.on.net] has joined #ruby-lang
shevy [shevy!~shevy@91-113-90-64.adsl.highway.telekom.at] has joined #ruby-lang
<andrewvos> hm
<injekt> hm
<andrewvos> injekt: What you think?
antinitro_ [antinitro_!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
workmad3 [workmad3!~workmad3@vpn187.its.manchester.ac.uk] has joined #ruby-lang
<injekt> andrewvos: eh, if it were me I would add a submit form and a backend where you can accept submissions, seems to be getting enough interest to warrant something like that, and I'd be too lazy to merge and restart every time
<andrewvos> injekt: There's an issue for that
tbuehlmann [tbuehlmann!~tobias@unaffiliated/tovias] has joined #ruby-lang
sideshownz [sideshownz!~sideshown@121.98.77.84] has joined #ruby-lang
<andrewvos> injekt: Oh wait so you mean have a DB?
<injekt> andrewvos: sure unless you want to use files
<tbuehlmann> andrewvos, did you sleep at all? :>
<andrewvos> tbuehlmann: haha yeah
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby-lang
<andrewvos> I turned off email notifications becaue they were being irritating
<injekt> andrewvos: I would make it a heroku app plug it into pg and add simple auth :)
<andrewvos> injekt: It is heroku
<andrewvos> I just need to be able to allow or deny songs
<andrewvos> But that's work
<andrewvos> I suppose it could be real quick
<andrewvos> simple admin page with cookie support. Put the auth code in an environment variable
<injekt> I would just tab into warden
<injekt> it's super easy
yvon_ [yvon_!~yvon@82.247.155.250] has joined #ruby-lang
<andrewvos> warden?
<andrewvos> Hmmm
<andrewvos> Looks cool
<andrewvos> Though, might just be easier with bare sinatra
<andrewvos> Hmm
<tbuehlmann> btw, authentication what for exactly?
<andrewvos> tbuehlmann: The admin page
<andrewvos> To allow or deny songs
<tbuehlmann> ah
<andrewvos> Oh, I also want autoplay mode
<andrewvos> So it just plays songs endlessly
<tbuehlmann> you could make the videos a playlist and automagically add new items
<andrewvos> hmmm
<andrewvos> I want to be able to select, or maybe let people vote on the songs
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
<tbuehlmann> reminds me to hate GEMA for blocking 50% youtube songs :(
<andrewvos> Yeah
<andrewvos> I had to remove one last night because of a song being blocked
<andrewvos> Fuckers
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
<erikh> I want a pony
<erikh> you guys got a ruby library that'll give me a pony?
<rue> 3D printer pony
<erikh> 1044681370 19% 8.17MB/s 0:08:23
<erikh> aws at it's finest
* erikh sighs
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
kp666 [kp666!~kp666@115.111.177.122] has joined #ruby-lang
<andrewvos> erikh: YOU WOULDN'T DOWNLOAD A PONY?
<bnagy> not at only 8MB/s he wouldn't
<erikh> the MPAA (mustang pony association of america) would probably sue me
<andrewvos> heh
<erikh> this rsync is absolutely retarded
<erikh> ec2 is such fail.
<erikh> I'm *peaking* at 10MB/s
<bnagy> are you using an rsync server on the remote?
<erikh> well fsvo rsync server -- I mean, that's how rsync works
<erikh> it's over ssh if that's what you're asking
<bnagy> yeah there is a dedicated server thing you can do
<erikh> right
<erikh> but that's plaintext
<erikh> ... which I can't do for this data, unfortunately.
<bnagy> bummer. fwiw that's about the speed I get on my cluster boxes on Gb
<bnagy> you might be looking at an rsync / ssh limitation, not ec2 sucking
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
DefV [DefV!~Jan@node-hahmcop4no4a1ruk1w.ipv6.as30961.net] has joined #ruby-lang
<andrewvos> I have an internal svn repo with our code in it, and I have a private github account. We're committing to the private github account but need to have the svn repo up to date too just so we don't get in trouble.
<andrewvos> Thoughts?
<bnagy> 'down the road, not across the tracks'?
<andrewvos> hahaha
<rue> You should include an encrypted backup of the SVN repo as a pre-commit hook
<erikh> heh
<erikh> actually, I'm going to be writing a small tool RSN to leverage the GH api to backup our repos periodically
<erikh> maybe raggi will let me OSS it
<erikh> it should be pretty stupid and simple
WillMarshall [WillMarshall!~willmarsh@ppp121-44-86-68.lns20.syd6.internode.on.net] has joined #ruby-lang
<bnagy> can you use git-svn somehow?
<bnagy> I haven't used subversion for like 5 years :S
dc5ala [dc5ala!~dc5ala@stgt-4d039d86.pool.mediaWays.net] has joined #ruby-lang
<shevy> long live CVS!
<rue> I'm not sure if you can regenerate the SVN repo just from the git data. I'd imagine so
<lianj> yea, git-svn rocks.
gnufied [gnufied!~gnufied@122.179.38.48] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.239.36] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
<andrewvos> bnagy: Not sure if git-svn is what I want. I want it to be transparent.
<andrewvos> bnagy: Like, we shouldn't need to be reminded of th epain of svn
<andrewvos> bnagy: But it should be there
<andrewvos> (don't ask)
<bnagy> I don't know either, I was thinking out loud
<bnagy> I thought maybe you could make your svn repo look like a remote for git-svn and your git repo look like a remote for git
<bnagy> and magically use the same repo
gnufied [gnufied!~gnufied@122.179.38.48] has joined #ruby-lang
<andrewvos> hmm
<lianj> i dont see why git-svn wont work
<andrewvos> Hmmm.
<andrewvos> lianj: On the server this script has to run, I don't have the git binary
gix [gix!~gix@e180012052.adsl.alicedsl.de] has joined #ruby-lang
<lianj> git fetch github; git svn dcommit ...
<lianj> sorry, gotta catch a train
<andrewvos> You best run then. They're pretty fast!
<shevy> run lianj, ruuuun!
<shevy> andrewvos yeah but lianj is fast
<shevy> and good at tackling
Minimalist [Minimalist!~minimalis@41.142.229.108] has joined #ruby-lang
futurechimp [futurechimp!~futurechi@109.239.86.106] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-155.as13285.net] has joined #ruby-lang
<Spooner> I have a large data structure that I'm deleting and that isn't being reclaimed by the GC. Are there any tools to help me find where I have a reference to it, because I can't think where it is being kept alive from?
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<erikh> ObjectSpace probably
<erikh> although I don't know it too well -- so I'm goign to use the mighty power of RTFM on you
babinho [babinho!~babinho@babinho.net] has joined #ruby-lang
<Spooner> erikh: Yeah, I used ObjectSpace to check what objects were floating about. I know I can work out a way to check all my references that way with a bit of time; just wondered if there were magic tools already written :)
<erikh> ah, that I do not know
<erikh> sorry
twelvechairs [twelvechairs!12chairs@c122-106-226-169.belrs3.nsw.optusnet.com.au] has joined #ruby-lang
<rue> How do you know it's not reclaimed?
futurechimp [futurechimp!~futurechi@host81-137-247-132.in-addr.btopenworld.com] has joined #ruby-lang
<shevy> by intense superstition
<bnagy> Spooner: I have sometimes been able to use either GC.start (gross) or move stuff into a method to make it easier for the GC to work out I am done with large stuff
<bnagy> or use jruby ;)
<Spooner> rue: I do a count on all objects of in ObjectSpace and it just keeps going up every time I re-create the datastructure and memory footprint goes up (by 20MB a time). Since GC is running about once a second, I am expecting it to delete it, but it never does.
<Spooner> rue: I mean count objects of the classes I'm using specifically; not just all objects.
<bnagy> Spooner: you can just select, can't you? I had some code like this but I might have factored it out when I moved stuff to jruby :/
<Spooner> bnagy: jruby would still have the same problem, since I'm assuming I have a reference to something in the structure, but I don't know where it is.
<bnagy> if that's the problem, yeah, could just be GC sucking though
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
hugsy [hugsy!~hugsy@sd-23457.dedibox.fr] has joined #ruby-lang
<erikh> TIL thread.join actually schedules other threads while it's running
<erikh> I always thought it was "stop the world and finish this thread"
<bnagy> srsly?
<bnagy> you never saw the [bunh_o_threads].each {|t| t.join} pattern?
<erikh> acutally i was using it
<erikh> I thought a track-threads-and-sleep approach was more performant
<erikh> guess i was wrong
<erikh> still learning this stuff I guess.
<bnagy> I dunno if it's a good pattern but I have seen it a lot
<erikh> yeah; co-worker did a source dive
<erikh> apparently join reschedules right after setting the thread lifetime to infinite
<bnagy> guess that makes sense
xopus [xopus!~x@ip68-96-110-31.lv.lv.cox.net] has joined #ruby-lang
Defusal_ [Defusal_!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
futurechimp [futurechimp!~futurechi@109.239.86.106] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
cyri_ [cyri_!~cyri_@152.107.70.86.rev.sfr.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
spuk [spuk!~spuk@189.61.115.27] has joined #ruby-lang
jxie [jxie!~jxie@115.197.80.26] has joined #ruby-lang
dmathieu [dmathieu!u2561@gateway/web/irccloud.com/x-cbwihjvyvlzurczx] has joined #ruby-lang
nemesit [nemesit!~nemesit@fbivpn.informatik.uni-hamburg.de] has joined #ruby-lang
cjs226 [cjs226!~cjs226@99-61-65-242.lightspeed.austtx.sbcglobal.net] has joined #ruby-lang
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5d84e1ce.pool.mediaWays.net] has joined #ruby-lang
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
singpolyma [singpolyma!~singpolym@69.171.154.34] has joined #ruby-lang
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
ankurgel [ankurgel!~ankur@59.178.41.125] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
sideshownz [sideshownz!~sideshown@121.98.77.84] has joined #ruby-lang
kain [kain!~kain@151.64.208.144] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
dabradley [dabradley!~bradley@office.vivisimo.com] has joined #ruby-lang
rippa [rippa!~rippa@87-253-30-45.pppoe.yaroslavl.ru] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
jesly [jesly!~jesly@49.137.106.239] has joined #ruby-lang
dbussink [dbussink!~dbussink@ec2-46-137-118-125.eu-west-1.compute.amazonaws.com] has joined #ruby-lang
JEG2 [JEG2!~JEG2@72.198.103.217] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.167] has joined #ruby-lang
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-jvdzerjfgahfodil] has joined #ruby-lang
take_cheeze [take_cheeze!~Adium@pc06224.anc-tv.ne.jp] has joined #ruby-lang
Utkarsh [Utkarsh!~quassel@li118-209.members.linode.com] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
slimfit [slimfit!~slimfit@c-98-245-122-231.hsd1.co.comcast.net] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.178.200.63] has joined #ruby-lang
divins [divins!u2451@gateway/web/irccloud.com/x-ilobtbqeqkkeqzjs] has joined #ruby-lang
andkerosine [andkerosine!~andkerosi@adsl-067-034-186-046.sip.mco.bellsouth.net] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-pyyimewkpnhnabor] has joined #ruby-lang
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby-lang
djcercone [djcercone!~djcercone@cpe-184-57-48-50.columbus.res.rr.com] has joined #ruby-lang
djcercone [djcercone!~djcercone@cpe-184-57-48-50.columbus.res.rr.com] has quit [#ruby-lang]
alexkane [alexkane!~alexkane@38.117.157.141] has joined #ruby-lang
andkerosine [andkerosine!~andkerosi@adsl-067-034-186-046.sip.mco.bellsouth.net] has quit [#ruby-lang]
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
sk_2 [sk_2!43a14ce4@gateway/web/freenode/ip.67.161.76.228] has joined #ruby-lang
Tref [Tref!~Tref@cpe-74-76-102-56.nycap.res.rr.com] has joined #ruby-lang
antinitro [antinitro!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
akahn [akahn!u2243@gateway/web/irccloud.com/x-krtkabrteaayymbs] has joined #ruby-lang
skiz [skiz!~skiz@c-69-181-211-4.hsd1.ca.comcast.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby-lang
Nss [Nss!~mosca@2001:1418:16b:1:90bc:39ff:fea7:79be] has joined #ruby-lang
erics [erics!~Skif@74.115.253.42] has joined #ruby-lang
lordofthedance [lordofthedance!~daddycool@wnpgmb0909w-ad01-198-160.dynamic.mtsallstream.net] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
lordofthedance [lordofthedance!~daddycool@wnpgmb0909w-ad01-198-160.dynamic.mtsallstream.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-stadhdpvcpzuxfua] has joined #ruby-lang
<whitequark> can someone hint me where the hell ActiveRecord 3 nested attribute validations are performed?
<whitequark> I'm searching for them in the entire codebase for a few hours already
<rue> Maybe someone on #ror can.
<Tref> hey guys, what's the best way to set a variable if another variable exists?
<Tref> and make a condition out of it
<Tref> I'm doing something like " if @omniauth = env["omniauth.auth"] "
<Tref> ...
<Tref> but i believe that's incorrect
<rue> Do you mean @omniauth &&= meh ?
<Tref> i've never seen that operator :)
<rue> It's = &&
<Tref> whats it called?
slimfit [slimfit!~slimfit@50-76-131-66-static.hfc.comcastbusiness.net] has joined #ruby-lang
<Tref> and is it &&= or =&&
<rue> && is the logical AND
<rue> = is assignment. a &&= b == a = b if a
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
<Tref> what I'm doing is relatively simple
<Tref> I'm trying to refactor this
<outoftime> anybody know if it's possible to do a mixture of GET and POST requests using curb's Curl::Multi?
<Tref> rue: any pointers on that?
<Tref> thanks for having a short handle btw :)
Skif [Skif!~Skif@72.1.92.57] has joined #ruby-lang
<rue> Tref: What's @omniauth if there's no env?
<rue> Or should be
<rue> @omniauth = env
<Tref> nothing
<Tref> there should be an else...
<rue> So then you can assign regardless of whether the env is set or not
<Tref> i updated it
solars [solars!~solars@mk089144206251.a1.net] has joined #ruby-lang
<rue> If there *is* a default value, then @omniauth = env || "default" might work
<Tref> no there's no default value
<rue> So it's either the env or nil?
<Tref> I don't need to set it if env['omniauth.auth'] doesn't exist
savage- [savage-!~savage_@istep.static.monkeybrains.net] has joined #ruby-lang
<MistyM> Tref: Is env a hash?
<Tref> yeah
<MistyM> Are you worried about @omniauth being overwritten by a nil value?
<Tref> no
<MistyM> Default value of a hash when the key doesn't exist is nil. So if you just do `@omniauth = env['omniauth.auth']` with no conditional, the ivar will be set to nil when it doesn't exist.
<MistyM> Since the default value of an unset ivar is nil, it's functionally identical to the ivar not being set.
ohsix [ohsix!ohsix@208.100.175.111] has joined #ruby-lang
<rue> Of course, if you need to branch logic based on that, you'll need to check
<rue> The sensible default (or, more elaborately, null object pattern) would be useful here
dejongge [dejongge!~jonke@pD9E0C72D.dip0.t-ipconnect.de] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.167] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
gasbakid [gasbakid!~gasbakid@41.96.83.197] has joined #ruby-lang
jxie [jxie!~jxie@115.197.80.26] has joined #ruby-lang
publicvoid [publicvoid!~publicvoi@p5DC156BA.dip.t-dialin.net] has joined #ruby-lang
<injekt> who's running 1.9.3 generally?
<shevy> 1.8.x forever!!!
* shevy shakes fist!
<injekt> drbrain: ping
<burgestrand> I do
<burgestrand> At work, at home, on my gfs laptop, everywhere!
musl [musl!~mike@li44-23.members.linode.com] has joined #ruby-lang
<injekt> burgestrand: does your irb save history?
<injekt> in 1.9.2 it works fine, in 1.9.3 it doesn't save history
<burgestrand> injekt: between sessions?
<injekt> yessir
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
<burgestrand> Let’s see
<injekt> I use irb/ext/save_history
<injekt> save-history*
<burgestrand> Yep, it does
<burgestrand> I have no .irbrc
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<injekt> blegh
gasbakid [gasbakid!~gasbakid@41.96.54.13] has joined #ruby-lang
<injekt> dammit
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
Skif [Skif!~Skif@72.1.92.57] has joined #ruby-lang
skiz [skiz!~skiz@216-75-227-188.static.wiline.com] has joined #ruby-lang
harlanhorbach [harlanhorbach!~harlanhor@174-127-47-2.static-ip.telepacific.net] has joined #ruby-lang
harlanhorbach [harlanhorbach!~harlanhor@174-127-47-2.static-ip.telepacific.net] has quit [#ruby-lang]
thegeekinside [thegeekinside!~thegeekin@200-52-45-239.dynamic.axtel.net] has joined #ruby-lang
urbanmonk [urbanmonk!~rom@216.191.220.85] has joined #ruby-lang
urbanmonk [urbanmonk!~rom@216.191.220.85] has joined #ruby-lang
SubSpawn [SubSpawn!~spawn@193.191.186.131] has joined #ruby-lang
<urbanmonk> I'm calling a method on an object that has method_missing implemented ... i'm trying to raise and exception in method_missing but I never get in to the rescue code in the caller ... any idea what I could be doing wrong?
<lianj> ruby -e 'class A; def method_missing(*a); raise "foo"; end; end; begin; A.new.bar; rescue Exception => ex; p ex, ex.message; end'
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
daglees [daglees!~belvedere@91.186.252.236] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
loincloth [loincloth!~greatseth@165.1.1.4] has joined #ruby-lang
<rue> rescue => ex
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
<shevy> ex <= rescue
ivanoats [ivanoats!~ivanoats@pdpc/supporter/active/ivanoats] has joined #ruby-lang
<apeiros_> you rescue your ex, or you need rescuing from your ex? o0
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-lhyegnaiqxfpqssr] has joined #ruby-lang
Manhose [Manhose!~Manhose@193.136.33.133] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-75dde655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
<shevy> I just wanted to think differently! Why not write code from right to left like in the arabic countries (or, dunno where they write from right to left)
<apeiros_> you could probably even do that using bidi codes in unicode…
<apeiros_> then again, ruby probably doesn't give a f'ck about bidi codes :)
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.239.36] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
nemesit [nemesit!~nemesit@p5DC0C925.dip.t-dialin.net] has joined #ruby-lang
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
antinitro_ [antinitro_!~adam@cpc1-stap4-0-0-cust418.12-2.cable.virginmedia.com] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@95.74.101.124] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
<drbrain> I donated to Travis CI: https://love.travis-ci.org
<MistyM> Hey drbrain, what's seattlerb usually like?
<drbrain> MistyM: we usually hack on individual projects and ask each other questions
<drbrain> like a ruby social hour(s)
<MistyM> drbrain: Sounds like fun :D
<MistyM> Was thinking of popping down tonight, I'm in Seattle for a conference.
harlanhorbach [harlanhorbach!~harlanhor@174-127-47-2.static-ip.telepacific.net] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<drbrain> cool
<drbrain> 532 E Broadway
<MistyM> Thanks
wyhaines [wyhaines!~wyhaines@swiftcore.org] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC1598E.dip.t-dialin.net] has joined #ruby-lang
sideshownz [sideshownz!~sideshown@121.98.77.84] has joined #ruby-lang
<drbrain> and, 7PM is when we start in the bubble room
<drbrain> 7PMish
niklasb [niklasb!~codeslay0@p5B310A82.dip0.t-ipconnect.de] has joined #ruby-lang
mrgraeme [mrgraeme!~mrgraeme@cpc2-brig7-0-0-cust312.3-3.cable.virginmedia.com] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
benanne [benanne!~rijdier@ip-83-134-149-44.dsl.scarlet.be] has joined #ruby-lang
<rue> BYOBubble
<MistyM> Oh no, I didn't bring one with me!
WillMarshall [WillMarshall!~willmarsh@ppp121-44-86-68.lns20.syd6.internode.on.net] has joined #ruby-lang
lordofthedance [lordofthedance!~daddycool@wnpgmb0909w-ad01-198-160.dynamic.mtsallstream.net] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
LanceHaig [LanceHaig!4b72c7ec5c@vm10.hosting.betterhosted.com] has joined #ruby-lang
<unsymbol> o/
<manveru> unsymbol.to_sym
carlosed [carlosed!~carlosed@5ac60f73.bb.sky.com] has joined #ruby-lang
* apeiros_ wonders whether unsymbol means he's falling apart…
probst [probst!~probst@global-1-92.nat.csx.cam.ac.uk] has joined #ruby-lang
<unsymbol> manveru: you've opened up the doors to hell.
<unsymbol> apeiros_: :D
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
chimkan [chimkan!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp121-44-86-68.lns20.syd6.internode.on.net] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.239.36] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
erics [erics!~Skif@72.1.92.57] has joined #ruby-lang
mrgraeme [mrgraeme!~mrgraeme@cpc2-brig7-0-0-cust312.3-3.cable.virginmedia.com] has joined #ruby-lang
Jake232 [Jake232!~textual@5e04bafa.bb.sky.com] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby-lang
Zolrath [Zolrath!~Zolrath@cpe-98-148-138-177.socal.res.rr.com] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
<frem> I'm using the json module in ruby 1.9.2, and when I run to_json on a string, I get an object with a ton of \\t and \\n junk in the keys and values.
<hagabaka> working for me
<apeiros_> frem: puts it
<apeiros_> you're probably looking at an inspect, and see the escaped newlines & tabs
<apeiros_> which in turn are escaped again by inspect
<frem> hastebin.com/ficogexeqe
<frem> seriously firefox? http://hastebin.com/ficogexeqe
<apeiros_> frem: exactly what I said.
<apeiros_> also your file seems to contain json already
<apeiros_> so you to_json a json string
<apeiros_> but double-quadruble-encoding stuff is cool…
tbuehlmann [tbuehlmann!~tobias@unaffiliated/tovias] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.195.193] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby-lang
<apeiros_> maybe you just misunderstand what .to_json is about. the idea is that you can convert a ruby datastructure to json. e.g. {:foo => "bar"}.to_json => "{\"foo\": \"bar\"}"
<frem> yeah
<frem> I think I'm looking for new() or something
robbrit [robbrit!~rob@38.108.76.250] has quit [#ruby-lang]
<apeiros_> or JSON.parse
<frem> that works. thank you! :3
<znouza> hi all. having some troubles with "1.9.1/net/http.rb:678: [BUG] Segmentation fault" .. tried to reinstall openssl to rvm (separate from system) - using osx, but it's still the same.. any idea?
MistyM [MistyM!MistyM@conference/code4lib/x-pwdyguvdsticgkaq] has joined #ruby-lang
<outoftime> this is strange, but has anyone run into a situation where Kernel.load / Kernel.require report that a file doesn't exist, even if it does?
loincloth [loincloth!~greatseth@165.1.1.4] has joined #ruby-lang
<rue> No
<apeiros_> outoftime: yes, most of the time the person in question forgot about how $LOAD_PATH works
<rue> That I have seen, though.
<outoftime> apeiros_: ah, it's an absolute path though...
<apeiros_> and the other times, the person in question forgot that a return value of false doesn't mean it's not there.
<outoftime> apeiros_: raising a LoadError
<rue> Or forgot to check permissions
<apeiros_> other than that, ruby usually knows better whether something is really there…
<apeiros_> oh, good one (permissions)
<outoftime> permissions are fine -- this only happens after running a Curl::Multi request. something very odd seems to be happening to the runtime. the files are definitely there and accessible.
imperator [imperator!~Daniel@216-160-167-151.hlrn.qwest.net] has joined #ruby-lang
<rue> outoftime: What does person's computer say if person does an `ls #{string}`?
s0ber_ [s0ber_!~s0ber@114-36-231-66.dynamic.hinet.net] has joined #ruby-lang
y3llow_ [y3llow_!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby-lang
<outoftime> rue: it's there. File.stat says it's there. it's definitely there.
<rue> You're using the same variable?
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby-lang
<outoftime> rue: it's a Rails project. it can't autoload its own files the first time constants are referenced. i'm seeing the same behavior with use of ruby's autoload in a library. and the same behavior when calling Kernel.load directly. if i reference the constants before invoking the Curl::Multi request, everything is peachy.
<necromancer> if i do attr_accessor :foo in my ParentClass, does that get inherited in the ChildClass? so in other words, if i wanted to access ChildClass.foo would I need to re-define attr_accessor() in ChildClass?
<outoftime> necromancer: no -- attr_accessor just defines getter/setter methods. they're inherited like any other.
y3llow [y3llow!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby-lang
<necromancer> sweet
<necromancer> <3 ruby
<necromancer> thanks outoftime
<rue> So it's not just load/require
<apeiros_> outoftime: multiple threads?
<apeiros_> if so - autoload ain't threadsafe
<apeiros_> (which is one reason why it's stupid to use it…)
<outoftime> apeiros_: sitting in a console calling Kernel.load -- I don't think threading is an issue
<apeiros_> outoftime: so in your console, File.readable?(path) # => true, but Kernel.require(path) raises?
<outoftime> apeiros_: but that's good to know in general about autoload
<outoftime> apeiros_: let me double check ::readable?
<apeiros_> yes
<apeiros_> also, Object.instance_method(:class).bind(path).call # => String ?
y3llow [y3llow!~y3llow@114-36-231-66.dynamic.hinet.net] has joined #ruby-lang
<apeiros_> after that, I run out of ideas I think…
<imperator> good afternoon
<rue> Good Charlesdickensbicentennialday, imperator
<outoftime> apeiros_: cool -- give me a minute, it's a bit nontrivial to reproduce the error
<imperator> rue, not a fan i'm afraid
<rue> We can't all be perfect
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<outoftime> rue: to answer your previous question, the problem can be seen calling Kernel.load directly; I was just pointing out that it was first observed autoloading perfectly reasonable constants to give some assurance that the problem isn't a typo.
<outoftime> apeiros_: File.readable?(path) #=> true
<outoftime> apeiros_: Kernel.load(path) #=> LoadError
<outoftime> apeiros_: Object.instance_method(:class).bind(path).call #=> String
<outoftime> apeiros_: that's a nifty trick, by the way.
kyrylo [kyrylo!~kyrylo@46.118.195.193] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
<apeiros_> outoftime: oh, you might have an exception while loading the file…
<apeiros_> open it, add something like "puts"
<apeiros_> *like puts "foo"
<outoftime> apeiros_: yeah but if I load it before running this Curl::Multi block, it's peachy -- but sure, I'll try that. at the top, right?
<apeiros_> yes, just to see whether that file really is the origin of the exception. rails does some ugly mutilation with backtraces…
slimfit [slimfit!~slimfit@50-76-131-66-static.hfc.comcastbusiness.net] has joined #ruby-lang
bougyman [bougyman!bougyman@63.133.184.126] has joined #ruby-lang
<outoftime> apeiros_: k one second
<outoftime> apeiros_: no output from the puts before i catch the loaderror
<apeiros_> k, I'm out of ideas then
<outoftime> damn. i'm two for two on async http libraries with completely inexplicable errors.
<Asher> what are the errors?
<outoftime> Asher: in Curl::Multi, after running a request, I suddenly get LoadErrors when Kernel.load is called on files that definitely exist / are readable
dabradley [dabradley!~bradley@office.vivisimo.com] has joined #ruby-lang
<outoftime> Asher: in Typhoeus, the C layer raises an "error on thread select" -- full explanation here: https://github.com/dbalatero/typhoeus/issues/137
<Asher> well the load errors aren't lying
<Asher> probably Kernel.load is getting different parameters than you think
<outoftime> Asher: I stuck a debugger in a rescue right after the call to Kernel.load -- calling File.readable?(path) returns true with the same `path` variable that was just passed into Kernel.load
<Asher> the thread error is probably a mutual exclusion issue but i'd have to dig in to see.. the load error seems easier to address
<Asher> what error do you get from Kernel.load
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
<outoftime> LoadError: no such file to load -- /path/to/my/source/file/that/definitely/exists/i/promise.rb
<outoftime> if I call Kernel.load and retype the path as a string literal, same thing.
yalue [yalue!98177b75@gateway/web/freenode/ip.152.23.123.117] has joined #ruby-lang
<Asher> what if you Kernel.load the same path from another file doing only that
blueblank [blueblank!~qx@unaffiliated/blueblank] has joined #ruby-lang
<outoftime> Asher: excellent question. let's find out.
<Asher> it would shock me if the problem was in Kernel.load
<outoftime> Asher: unbelievable -- that works.
<Asher> are you using an absolute or relative path
<Asher> and is it the same user?
<outoftime> Asher: absolute
urbanmonk [urbanmonk!~rom@216.191.220.85] has joined #ruby-lang
<outoftime> Asher: I just created a new file, typed the Kernel.load statement into it, and loaded it from the same debugger session where I had caught the error -- and it worked.
<Asher> what if you dump the path to a file and then load that file
<outoftime> Asher: let's find out
<outoftime> Asher: so what you have in mind is File.open('/tmp/some_file.rb', 'w') { |f| f << "Kernel.load(#{path.inspect}) }; Kernel.load('/tmp/some_file.rb')
<outoftime> Asher: except without the missing closing double-quotes : )
<Asher> right
<outoftime> Asher: cool, on it.
<outoftime> Asher: awesome. you've inadvertantly(?) led me to the answer.
<outoftime> Asher: too many open files.
jfelchner [jfelchner!~jfelchner@c-68-53-88-7.hsd1.tn.comcast.net] has joined #ruby-lang
<Asher> great
<Asher> :)
<Asher> ok i'll be back around in 20 gotta drive home
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
lordofthedance [lordofthedance!~daddycool@wnpgmb0909w-ad01-198-160.dynamic.mtsallstream.net] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@96.49.120.25] has joined #ruby-lang
shajahan [shajahan!~shajahan@77-58-133-173.dclient.hispeed.ch] has joined #ruby-lang
Manhose [Manhose!~Manhose@dial-b1-238-132.telepac.pt] has joined #ruby-lang
Faris [Faris!~amnay@adsl196-102-19-217-196.adsl196-9.iam.net.ma] has joined #ruby-lang
<Faris> How do I get two infinite-loop threads to run at the same time please ?
<theconartist> Faris: by starting two infinite loop threads
<MistyM> Faris: MRI doesn't have true concurrent multithreading :(
<burgestrand> concurrent yes, parallel no
<MistyM> *parallel, good point
<burgestrand> ;)
<burgestrand> one could argue true concurrency is parallelism in some sense I guess :d
<rue> outoftime: Interesting, could have sworn that error got changed
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
blueblank [blueblank!~qx@unaffiliated/blueblank] has quit [#ruby-lang]
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
andkerosine [andkerosine!~donnie@adsl-067-034-186-046.sip.mco.bellsouth.net] has joined #ruby-lang
<andkerosine> petercooper: You wouldn't happen to be in at the moment, would you?
<petercooper> I am
<andkerosine> Glorious!
<petercooper> lol
<andkerosine> Just watched your 24 tricks.
<petercooper> Awesome, hope you didn't fall asleep
<andkerosine> Only just near the end.
<petercooper> haha
<andkerosine> But Procs, lambdas and closures woke me right back up.
<outoftime> rue: I'm running 1.9.2-p290, if that makes it make more sense
<andkerosine> I'm curious, what're you using to run your code?
<rue> outoftime: It doesn't work on HEAD either
<outoftime> rue: interesting. i was thinking it'd be nice if the error had been more explicit.
<outoftime> rue: but it did make for a nice tale of adversity overcome
<rue> It certainly should be. I'll file a bug…
<outoftime> rue: awesome : )
chimkan_ [chimkan_!~chimkan@76-10-173-74.dsl.teksavvy.com] has joined #ruby-lang
WillMars_ [WillMars_!~willmarsh@203.48.101.90] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
twittard_ [twittard_!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
werwolf_ [werwolf_!~llakey@174-127-47-2.static-ip.telepacific.net] has joined #ruby-lang
twittard__ [twittard__!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
Jake232 [Jake232!~textual@5e0e09ea.bb.sky.com] has joined #ruby-lang
<rue> ESRCH
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<petercooper> andkerosine: Sorry, got distracted. What do you mean? Just regular old Ruby 1.9.3 :)
<andkerosine> The, erm, output window.
<petercooper> andkerosine: If you mean the bits that are windowed rather than terminal, that's just a Textmate feature.
<andkerosine> Ah, my assumption.
<andkerosine> Having errors shown more clearly is always nice.
<rue> petercooper: Apparently you should have moved trick #45: Cause Electric Shock Through Keyboard up to #15 or so
livinded [livinded!~lolwut@s042n230.csun.edu] has joined #ruby-lang
<petercooper> trick #101: delete ruby
<outoftime> anybody have a favorite way of parsing an HTTP header string?
<andkerosine> Are you not using a library?
<andkerosine> petercooper: '' << n emulates Python's unichr(n).
<outoftime> andkerosine: using curb, which as far as I can tell doesn't parse response headers out for me -- just gives them to me as a string
<manveru> if you're not using rack, you're doing it wrong :P
<outoftime> manveru: parsing response headers from an HTTP client request
<andkerosine> outoftime: Paste one?
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<petercooper> andkerosine: nice!
<outoftime> andkerosine: http://hastebin.com/kowadocule.txt
<andkerosine> Mm-hmm, just wanted to make sure.
<outoftime> andkerosine: such is the way of things : )
<manveru> outoftime: is there one line you need?
<manveru> or do you need everything?
<outoftime> manveru: no, just one line. i could grep for it, but in theory headers can be multi-line...
<outoftime> manveru: in practice, it may not be worth worrying about.
<manveru> yeah
<manveru> parsing it correctly is just an headache if what you want is short enough
<outoftime> manveru: yeah, and I control the web service I'm talking to in this case
<manveru> hm
<rue> CGI?
<outoftime> manveru: in fact, the value of the header in question can't even have whitespace, so multiline is pretty much out of the question
<outoftime> rue: does CGI have a method for header parsing? I was looking for one...
<rue> I dunno
<manveru> Net::HTTP has one i'm sure
<manveru> but that response doesn't have status code, so i guess it'd fail
<outoftime> manveru: yeah, not to worry. i think in this case a regexp match should do the trick nicely.
<andkerosine> There's a really rough approach that handles multiple Set-Cookie headers, with the unfortunate side effect of making every other value a length-1 array.
<andkerosine> That's pretty easily remedied, of course. I'm not sure how robust you need it to be.
<outoftime> andkerosine: thanks!
<outoftime> andkerosine: in this case the answer is, not really robust at all : )
<andkerosine> Sure thing.
<andkerosine> Then you're good, so long as none of the header values contain a colon followed by a space.
<andkerosine> They're usually encoded, though...
Skif [Skif!~Skif@74.115.253.42] has joined #ruby-lang
<outoftime> andkerosine: word
<andkerosine> How would you recommend integrating reddit's captcha into my wrapper?
cored [cored!~homer@201.229.129.230] has joined #ruby-lang
cored [cored!~homer@unaffiliated/cored] has joined #ruby-lang
<cored> hello all
<cored> have you ever seem this error http://www.pastie.org/3337627
<cored> Ruby 1.9.2
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
<drbrain> not a very good error
kyrylo [kyrylo!~kyrylo@46.118.222.175] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
<cored> I see
<cored> well, is just doing that in travis-ci
<cored> the specs works fine locally
<cored> drbrain: http://travis-ci.org/#!/hybridgroup/ticketmaster-bugzilla/jobs/641236 maybe you can see something there
<drbrain> I'd go look at lib/provider/bugzilla.rb and see why it's raising that exception
<cored> drbrain: ok
<drbrain> nope
snuxoll [snuxoll!~stefan@2001:470:8077:817c:c57a:9986:b2:c065] has joined #ruby-lang
snuxoll [snuxoll!~stefan@2001:470:8077:817c:c57a:9986:b2:c065] has quit [#ruby-lang]
rpowell [rpowell!~rpowell@CPE-121-216-75-94.lnse1.ken.bigpond.net.au] has joined #ruby-lang
<andkerosine> drbrain: I imagine you were able to reproduce the issue?
<drbrain> andkerosine: haven't gotten to it yet, I'm refactoring a design bug
<andkerosine> Ah, no worries.
<andkerosine> Any thoughts on how best to go about letting the programmer take over for a second if their bot encounters a captcha?
<andkerosine> Converting it to 80x24 ASCII is the only thing I've come up with, but it's usually only /just/ legible.
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<drbrain> andkerosine: display the captcha via WEBrick and have them fill it in
<andkerosine> Do you reckon most users will write their bots on the Web?
<andkerosine> Popping open a new tab feels intrusive, too.
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
bougyman [bougyman!bougyman@pdpc/supporter/gold/bougyman] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
cricket [cricket!4a5db3c6@gateway/web/freenode/ip.74.93.179.198] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby-lang
harlanhorbach [harlanhorbach!~harlanhor@174-127-47-2.static-ip.telepacific.net] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.53] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-129-247.aei.ca] has joined #ruby-lang
MistyM [MistyM!MistyM@conference/code4lib/x-xrowrqajuakyhxpp] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<drbrain> andkerosine: it can be a localhost webrick
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby-lang
<drbrain> and you can run `open http://localhost:8123/path/to/captcha`
<andkerosine> Fair enough.
<drbrain> fixed your bug
<drbrain> I added override_headers
eyelight [eyelight!~eyelight@pool-71-106-82-182.lsanca.dsl-w.verizon.net] has joined #ruby-lang
<drbrain> release coming shortly, since I need it for a mechanize commit
<andkerosine> Thank you. Very much appreciated.
Nss [Nss!~mosca@2001:1418:16b:1:bcc5:b4ff:fe10:cd61] has joined #ruby-lang
naz [naz!~n@70.44.235.1.res-cmts.bus.ptd.net] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
nebbie [nebbie!Neb@c-65-96-71-27.hsd1.ma.comcast.net] has joined #ruby-lang
<drbrain> andkerosine: released!
<andkerosine> My many gratitudes.
<andkerosine> Heh, sorry to have bothered you over an issue that likely nobody else'll ever have.
<andkerosine> Any potential gotchas?
<drbrain> andkerosine: nope
<drbrain> and, somebody, eventually, would have it
<erikh> drbrain doesn't write bugs, he writes happy little features
<drbrain> I can probably simplify some things in mechanize, too
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
imperator [imperator!~Daniel@216-160-167-151.hlrn.qwest.net] has joined #ruby-lang
<drbrain> erikh: I wish!
<andkerosine> I must admit, Persistent's code is a really nice look into how to code Ruby properly.
<erikh> you need to do a show on PBS where you do screencasts in a calm, soothing voice
<rue> drbrain occasionally writes in future learning opportunities
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
<drbrain> andkerosine: someday I should fix the rest of my test warnings
<drbrain> andkerosine: I think the only thing I'm dissatisfied at in that code is the thread-local variables
<drbrain> they make it really convenient to use across threads, but they look really messy
<andkerosine> Just an aesthetic thing, then?
<drbrain> mostly
<rue> Explicit threading is always narsty
<andkerosine> You don't like that it's key-based, or‒?
<drbrain> andkerosine: I don't like that the lines are so long
<andkerosine> Yep, my next guess.
<drbrain> and I don't like the extra indirection it involves
gregf [gregf!~gregf@207.5.168.94] has joined #ruby-lang
<andkerosine> I noticed that's where the code first gets a bit "wordy".
<drbrain> especially now that I've added "set any parameter at any time"
<andkerosine> Threading /is/ indirect, though, no?
<drbrain> rue: I saw that
<drbrain> rue: or is it really you?
<rue> Of course it is! Who else could it be? *shifty eyes*