Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
qz joined #ruby-lang
<jorgenpt> That's what the actual plugin looks like. Still some Java-isms to get rid of
<headius> that's pretty slick
<jorgenpt> Also, it lets you use erb instead of Jelly, which I'm a big fan of
pablo_ joined #ruby-lang
<headius> oh man
<headius> it used Jelly before?
<jorgenpt> It still does, for those unfortunate enough to write Java plugins ;-)
<headius> I thought jelly was long dead
<jorgenpt> Wishful thinking
ujihisa joined #ruby-lang
<headius> "Please note that Commons Jelly is enduring a phase with low activity of its developers."
<headius> hahahah
<headius> yeah, I bet
pabloh joined #ruby-lang
<zenspider> headius: 1) I think this needs tests. 2) I think the reject should be in test_methods, not in the _run_suite
<headius> zenspider: hey tests, there's an idea
<jorgenpt> headius: There're tests for my plugin, but they involve using Jenkin's JSON API and such, which is a bit bad :p
<zenspider> I'll gladly change the latter... not entirely sure how to do the former
<headius> zenspider: I can come up with something
<jorgenpt> (Whereas Java plugins allow you to interact more directly with Jenkins through its Java APIs)
<headius> have to see how you're testing right now
<zenspider> ENV['TAG_BASE'] vs options[:tag_base] ?
<zenspider> I assume that slipped through
<headius> zenspider: ahh probably
<jorgenpt> I'm not entirely sure how it works for Java plugins, but I think it starts a Jenkins instance with your test code loaded into it somehow
<jorgenpt> So that it can fiddle with the state directly
Aaaarg joined #ruby-lang
<headius> jorgenpt: yeah, I'd assume something like that
<zenspider> ok... so it'll be easier to test if the reject is in test_methods. that already has full test coverage
<zenspider> and is stupid simple
<zenspider> ah. and we can even bypass the tags method by overriding for the test. awesome
<zenspider> lemme poke for a bit
Asher joined #ruby-lang
<zenspider> also needs doco
<zenspider> and since I don't fully grok... you'll need to write
<jorgenpt> headius: Luckily, kohsuke, the main dev behind Jenkins, is a part of the movement to implement Ruby support, so I'll try to find time to pick his brain on how testing code is loaded for Java stuff currently.
wyhaines joined #ruby-lang
<headius> zenspider: I'm game to make whatever changes you see fit. Let me know when and what, after you're done poking
lightcap joined #ruby-lang
<zenspider> kk
<deryl> headius, my apologies for the confusion about NailGun activation on the Issues.
<headius> deryl: no problem...just wanted to make sure there wasn't something that needed fixing
<deryl> cool beans :)
<headius> RVM turning on by default for a while had led to endless confusion
<deryl> yeah, what confused me was that we turned it off. so when he said something about it i was like uhhh.
<zenspider> headius: format of the file is: "fails for some reason:test_blah" ?
<headius> yeah
<zenspider> are there other things besides fails?
<headius> in mspec it's <tag>[(description)]:<spec text>
<zenspider> I'd almost rather it be "test_blah fails for some reason"
<headius> mspec supports arbitrary tags, but fails is most common...I just did it this was with the assumption there might be other tags, like "hangs" or "windows" as we use in rubyspec in jruby
<headius> this was = this way
<headius> for a simplest-possible version it could perhaps be the text minitest prints for a failure?
wyhaines_ joined #ruby-lang
<headius> I modeled it after mspec, but I don't have any strong opinion on it
<zenspider> so... if you have windows issues that won't be a separate tag dir?
<zenspider> ooh. right. and are you planning on using this on the spec side or the test side?
<headius> presumably most of the failures will be common to all platforms
<zenspider> because that'll effect how the line needs to be formatted
<headius> for rubyspec we tag windows-specific stuff additionally
<headius> ahh hmm
<headius> well probably both, but basically whatever form MRI tests are in
<headius> we'd eventually need to tag either form if MRI uses both
<zenspider> ok. well if this is against MRI, they'll never move to specs. they don't get 'em
<zenspider> so I can try to work towards something readable over mechanical
<headius> that sounds pragmatic enough...I really just want it for running MRI's tests
<zenspider> kk. I'll shoot for that
whitequark joined #ruby-lang
Kichael joined #ruby-lang
dejongge1 joined #ruby-lang
<zenspider> I need to go pick up my CSA... bbiab
slyphon joined #ruby-lang
ilyam joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
Sapient joined #ruby-lang
robotmay joined #ruby-lang
ksinkar joined #ruby-lang
lightcap joined #ruby-lang
ilyam joined #ruby-lang
<andrewvos> Helloooow
kith_ joined #ruby-lang
<banister`sleep> andrewvos: how far are you in skyrim? one guy i know on IRC has been AWOL (not on irc at all) for the last week as a result of skyrim
<andrewvos> banister`sleep: Welll. Not that far to be honest. Though I do tend to go out drinking very often and I don't play games when I've been drinking.
<andrewvos> So, I've missed a few days.
<andrewvos> I did play the whole weekend through though.
Banistergalaxy joined #ruby-lang
<shevy> man
<shevy> this is like a disease
<andrewvos> Yesterday I found a bug where my magicka wasn't getting used up, so I used some tape to press down a button on the controller so that it would be continuously using "heal" all the time. I leveled up quite a lot, but still feel dirty.
<andrewvos> banister`sleep: It is the best game I've ever played.
<andrewvos> banister`sleep: Not even because of how fun it is. Just how well made it is.
<andrewvos> banister`sleep: And the graphics are just beautiful.
neoesque joined #ruby-lang
<banister`sleep> andrewvos: if i buy it will you play with me
<shevy> man
<andrewvos> banister`sleep: It's not multiplayer.
<shevy> DON'T START PLS
<shevy> good!
<banister`sleep> andrewvos: arenn't there some multiplayer aspects?
<andrewvos> banister`sleep: no :(
<banister`sleep> andrewvos: hmmm, what about say, players can leave tips/hints in notes lying around that other players can read?
<banister`sleep> so they dont play together, but they still in some sense share a world
<andrewvos> banister`sleep: You can do that in dark souls
<banister`sleep> i think darksoul had something like that
<banister`sleep> yeah
<andrewvos> SkyRim is the best game I have ever seen. If it had multiplayer then just wow.
<andrewvos> Ok got to sleep it's 1:30AM here
<andrewvos> peace
<shevy> !
<banister`sleep> andrewvos: ok sleep well and believe in yourself
<andrewvos> haha what?
<shevy> destroy the game man
<andrewvos> you weirdo
<andrewvos> (both of you)
<andrewvos> xx <3 <3
<banister`sleep> shevy: let's get skyrim and look for fowl even if we dont find him (which we wont because there's no multiplayer) we can still at least take hear that he's been here before and wonder if he ever sat by this tree...or talked to this person...or pondered the color of the sky above this lake, and so on
<banister`sleep> heart*
<zenspider> huh... ruby's numerical tower isn't all that big. :/
<zenspider> 256 ** 654321 kills it ded
spuk joined #ruby-lang
<zenspider> 256 ** 54321 works tho
<shevy> banister`sleep I fear he is lost permanently
livinded joined #ruby-lang
thomasfedb joined #ruby-lang
thomasfedb left #ruby-lang
thomasfedb joined #ruby-lang
any-key joined #ruby-lang
wyhaines joined #ruby-lang
geekfactor joined #ruby-lang
jrun joined #ruby-lang
chrstphrhrt joined #ruby-lang
lightcap joined #ruby-lang
Banistergalaxy joined #ruby-lang
ilyam joined #ruby-lang
Austin__ joined #ruby-lang
Manhose_ joined #ruby-lang
<chrstphrhrt> tried installing 1.9.3-p0 with ruby-build install 1.9.3-p0 and after it finished I get a ruby command in my shell but when it runs it immediately quits and ruby -v returns nothing.. ideas?
<chrstphrhrt> (did not have any ruby versions installed anywhere before - fresh system)
<zenspider> chrstphrhrt: I can see the problem. no vowels.
<zenspider> what do you mean by "when it runs it immediately quits" ?
towski joined #ruby-lang
zcdny joined #ruby-lang
<chrstphrhrt> zenspider, oops i had forgotten to set the global binary with rbenv.. works now (it's just before that entering the ruby command would not return 'command not found', it would just go to the next bash prompt)
<zcdny> str = 'a,b,c,d,e,' How to delete the last one " , "
<deryl> hrmm. anyone know what flags I have to pass to the ruby 1.9.2 build to work with ruby-debug19 and NOT get Symbol not found: _ruby_threadptr_data_type errors?
<banister`sleep> deryl: gem install ruby-debug19 --pre
<banister`sleep> iirc
<deryl> (get the same thing under 1.9.3-p0 but I'll take 1.9.2 at least)
<banister`sleep> deryl: you shouldnt get that error on 1.9.2
<banister`sleep> bbkl
<zcdny> str = 'a,b,c,d,e,' How to delete the last comma
<deryl> doh
<deryl> hrmm his doesn't work either. gem install ruby-debug19 --pre tells me it couldn't find a valid gem but that there's a possible gem of the same name. hehe fun
<shevy> zcdny if it is just the last char, .chop should work
<shevy> zcdny str = 'a,b,c,d,e,'.chop => "a,b,c,d,e"
kitallis joined #ruby-lang
<zcdny> good, thanks shevy
<zenspider> "a,b,c,".chomp(",") => "a,b,c"
<zenspider> a bit safer
<jtoy> what is the name of this kind of syntax? <<BLOCK blah blah BLOCK ?
<zenspider> heredoc
<zenspider> a horrible invention... messy as all fuck
<zcdny> the chomp specify a parameter, the chop chooses automatically
<whitequark> zenspider: why? it's useful sometimes and don't get in your way all the other time
Phrogz_ joined #ruby-lang
<zenspider> zcdny: no, chop ALWAYS chops... if the string doesn't end in a comma, bad news
<zenspider> "String#chomp is often a safer alternative, as it leaves the string unchanged if it doesn't end in a record separator."
<jtoy> string = "i dont end in a comma"
<shevy> well done jtoy :P
oddmunds joined #ruby-lang
<zenspider> argh I suck at maff
<zenspider> number theory specifically
dv310p3r joined #ruby-lang
<echoprinter> Why doesn't this run? I need to convert something before printing? http://www.pastie.org/2881248
<echoprinter> something like number.to_s but that's not working.
<echoprinter> ok
<echoprinter> read but really don't understand much of it...thanks though.
<echoprinter> Ah, gets.chomp.to_i for some reason works.
<echoprinter> numbers must be really represented as strings and you need to convert them.
Indian joined #ruby-lang
dubz` joined #ruby-lang
bryno joined #ruby-lang
Austin__ joined #ruby-lang
chrstphrhrt joined #ruby-lang
lianj joined #ruby-lang
lianj joined #ruby-lang
scottschecter joined #ruby-lang
<slyphon> ok, WHY THE FUCK doesn't active_support have i18n as a dependency?
<erikh> heh
<slyphon> if you *require* it
<erikh> sorry, not you, rails
<slyphon> IT'S A FUCKING DEPENDENCY
<slyphon> ok, thank you for listening
<erikh> :)
<slyphon> :)
nuclearsandwich joined #ruby-lang
mnoble joined #ruby-lang
ilyam joined #ruby-lang
uzimonkey joined #ruby-lang
aef joined #ruby-lang
nofxx joined #ruby-lang
banister`sleep joined #ruby-lang
jackfu joined #ruby-lang
x0F__ joined #ruby-lang
<ryanf> you can require parts of active_support without needing i18n
<ryanf> it's broken up into smaller components that can be used independently
<zenspider> not declaring the dependency is just broken... regardless of the rationalization..
<zenspider> if they want to not have it as a dep, then the code that needs it should be broken out to its own gem
<erikh> hoe should depend on rdoc!
jackfu left #ruby-lang
<zenspider> it does
<erikh> it doesn't appear to at the moment
<erikh> or at least, hrm
<erikh> http://rubygems.org/gems/hoe # doesn't appear to
<erikh> wanted to make sure I was right
<erikh> fwiw it does not work without rdoc, at least 'rake gem' doesn't.
<erikh> sorry to be a pest about it, it's just been some trouble the last few days.
jacky123 joined #ruby-lang
<jacky123> i want to get rid of these warnings/notices - http://pastie.org/2881490 , how ?
<ryanf> zenspider: I agree, on balance it would be better to just make everyone install i18n
<ryanf> jacky123: uninstalling and reinstalling the gems should do it
<ryanf> oh just one gem
<ryanf> uninstalling and reinstalling the gem should do it
<jacky123> i tried gem uninstall therubyracer, but it says therubyracer not installed
<zenspider> erikh: s.add_development_dependency(%q<rdoc>, ["~> 3.9"])
<zenspider> *shrug*
<zenspider> I'd guess that's a problem with gemcutter
<erikh> fair enough, I wasn't treating it as a dev dep in my case
<zenspider> nope... looks like it is wrong in the published gem too
<zenspider> hrm...
<erikh> maybe the array notation?
<erikh> I don't know the sig of that particular method
samshull joined #ruby-lang
flip_digits joined #ruby-lang
ujihisa joined #ruby-lang
<jacky123> will it be safe to delete /usr/local/lib/ruby/gems/1.9.1/specifications/therubyracer-0.9.8.gemspec to solve the provb
<jacky123> ?
<erikh> is it still installed?
<jacky123> gem uninstall therubyracer says its nor installed
<erikh> go for it
<jacky123> cool
<jacky123> that did it
<jacky123> do any of you know sinatra ?
<banisterfiend> jacky123: no u
tomzx joined #ruby-lang
<jacky123> mk
aef_ joined #ruby-lang
aef__ joined #ruby-lang
nuclearsandwich joined #ruby-lang
RickHull1 joined #ruby-lang
scottj left #ruby-lang
sulo joined #ruby-lang
Austin__ joined #ruby-lang
gokulnath joined #ruby-lang
lightcap joined #ruby-lang
robbyoconnor joined #ruby-lang
ryanf joined #ruby-lang
beawesomeinstead joined #ruby-lang
lightcap joined #ruby-lang
dkannan joined #ruby-lang
srbaker joined #ruby-lang
lightcap joined #ruby-lang
ryanf joined #ruby-lang
misham joined #ruby-lang
ujihisa joined #ruby-lang
ryanf joined #ruby-lang
brianpWins joined #ruby-lang
nofxx joined #ruby-lang
meth joined #ruby-lang
Austin__ left #ruby-lang
ujihisa joined #ruby-lang
ksinkar joined #ruby-lang
senthil joined #ruby-lang
ujihisa joined #ruby-lang
yxhuvud joined #ruby-lang
ujihisa joined #ruby-lang
AndChat- joined #ruby-lang
_inc joined #ruby-lang
maarten joined #ruby-lang
_whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
tallship joined #ruby-lang
solars joined #ruby-lang
robotmay joined #ruby-lang
Mchl joined #ruby-lang
krz joined #ruby-lang
S1kx joined #ruby-lang
S1kx joined #ruby-lang
dc5ala joined #ruby-lang
cyri_ joined #ruby-lang
ecin joined #ruby-lang
workmad3 joined #ruby-lang
roadkith joined #ruby-lang
whitequark joined #ruby-lang
roadkith joined #ruby-lang
ammar01 joined #ruby-lang
sandelius joined #ruby-lang
vesan joined #ruby-lang
Defusal_ joined #ruby-lang
Defusal_ joined #ruby-lang
molgrew joined #ruby-lang
zmack joined #ruby-lang
companyb1t joined #ruby-lang
yann3 joined #ruby-lang
Banistergalaxy joined #ruby-lang
_inc joined #ruby-lang
dine_ joined #ruby-lang
<dine_> Hello, Can you please help me in this problem , I have an array which is equal to this a = ["1,2"]
<dine_> now I need to retrive 1 and 2 from this array
<banisterfiend> dine_: why aren't you storing it as [1, 2] ?
frankz joined #ruby-lang
<dine_> no, they are coming from js function and in the parameter I can see that they are coming in this format
<dine_> so in the controller , I need to extract these numbers
<banisterfiend> dine_: oh ok, then do this: string.split(",").map(&:to_i)
<banisterfiend> dine_: so in your case: a.first.split(",").map(&:to_i)
<dine_> banisterfiend: ok, let me try this
<dine_> yes it is removing double quotes i think now i can use in controller properly..Thanks banisterfiend
hebz0rl joined #ruby-lang
benanne joined #ruby-lang
RomD joined #ruby-lang
workmad3 joined #ruby-lang
gnufied joined #ruby-lang
<ksinkar> what is the equivalent of c macros (#define AB x) in ruby? something that just replaces the text that the interpreter is going to read
<woollyams> ksinkar: There isn't a direct equivalent, ie. macros, but you can usually get similar results with a little meta-programming.
<woollyams> ksinkar: What are you trying to achieve?
<shevy> ksinkar a CONSTANT or a call to a method
<manveru> neither will influence what's being read
<ksinkar> a call to a method
<ksinkar> lh.method
<ksinkar> where lh is the object
<ksinkar> the method is variable
<manveru> lh.send(method)
<woollyams> manveru: +1
<shevy> manveru.send +1
<manveru> oO
<manveru> TypeError: 1 is not a symbol
<shevy> I patched ruby
dhruvasagar joined #ruby-lang
<ksinkar> manveru: thanx
sirfilip joined #ruby-lang
<sirfilip> morning
DEac- joined #ruby-lang
<andrewvos> mornin
rsi joined #ruby-lang
rsi joined #ruby-lang
Mchl joined #ruby-lang
robotmay joined #ruby-lang
Manhose joined #ruby-lang
woollyams joined #ruby-lang
<rue> Meh
<andrewvos> You seem to be in a bad mood lately rue. Are you on the rag?
thrcka joined #ruby-lang
apeiros_ joined #ruby-lang
saLOUt joined #ruby-lang
brushbox joined #ruby-lang
ujihisa joined #ruby-lang
rsi joined #ruby-lang
Manhose_ joined #ruby-lang
woollyams joined #ruby-lang
kleech joined #ruby-lang
rsi joined #ruby-lang
toretore joined #ruby-lang
adambeynon joined #ruby-lang
jgomez joined #ruby-lang
<erikh> ha
Manhose joined #ruby-lang
adambeynon joined #ruby-lang
beiter joined #ruby-lang
<banisterfiend> erikh: hello eric
<erikh> ohai
<erikh> bbiam
whitequark joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
ksinkar joined #ruby-lang
yorickpeterse joined #ruby-lang
<echoprinter> I wonder why this doesn't print out my strings in reverse? Do I need to convert something here? http://www.pastie.org/2882828
<lianj> puts returns nil
<molgrew> test is nil, program exits
<lianj> nil.reverse => undefined method `reverse' for nil:NilClass
<echoprinter> How would I get test to hold the input...place it in a array or something like that?
<echoprinter> I'm trying stuff as well...not just asking and not trying. :)
<banisterfiend> whitequark: btw how did u go on that BOC POC
tomzx joined #ruby-lang
<lianj> echo printer | ruby -e "test = ARGF.read.chomp; puts test; puts test.reverse"
<echoprinter> lianj: wow...ok. I need to analyze what you've done here. thanks.
<lianj> puts returns nil. when you do test = puts(something); test is nil, not something
<sirfilip> yup you should be able to do it like puts test = something
<sirfilip> and then work with the test
<sirfilip> so you should do puts test = ARGF.read
hundfred joined #ruby-lang
Defusal joined #ruby-lang
Defusal joined #ruby-lang
_whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
_whitelogger joined #ruby-lang
Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<echoprinter> sirfilip lianj: it's starting to some sense now....puts returns nil which was being assigned to test and I no longer had anything to work with...I think I get it. This helped out a lot. thanks all.
<sirfilip> np
Banistertab joined #ruby-lang
<Banistertab> Hey homies
<andrewvos> Banistertab: :/
JohnBat26 joined #ruby-lang
<Banistertab> Sup pig
<andrewvos> What is that
<andrewvos> a Samsung?
<molgrew> does that mean the ipad was shunned in the last minute?
<Banistertab> Galaxy tab yeah
<andrewvos> Banistertab: Any good?
<Banistertab> Used never going to get an ipod
<Banistertab> I was
<Banistertab> Andrewvos yeah its pretty cool especially with swype
<andrewvos> What's swype?
<manveru> touchscreen input method
<Banistertab> No swype makes ipads frustrating
<manveru> heh
<manveru> you got the 10" tab?
<Banistertab> These bitches need more ram though
<Banistertab> Ism multi tasking hardcore
<Banistertab> Yeah 10.1
<andrewvos> Banistertab: Why are you talking all gangster?
<andrewvos> Strange character you
<manveru> got a transformer myself :)
<Banistertab> Cis the tablet makes me feel cool
<Banistertab> Cos
<lianj> ^^
<andrewvos> :)
<molgrew> are the typos connected to that swype thing, or just from excitement?
<andrewvos> swype fail
<manveru> lianj: moin
<Banistertab> I haven't taught it slang yet
<Banistertab> I need to teach it my words
<Banistertab> And typos yeah
<manveru> you should teach it ruby
<Banistertab> Ruboto I plan to get into
<Banistertab> Brb
malev joined #ruby-lang
<manveru> also check out mirah when you get tired of how slow ruby is :)
<Banistertab> Manveru have you tried a stylus
<manveru> no
<Banistertab> Could be good for quick notes
<manveru> i guess so
<Tasser> manveru, oh, from nimrod to mirah? ^^
<manveru> Tasser: i did mirah before nimrod, i think
<manveru> nimrod doesn't run on android anyway
<manveru> mirah is just a less sucky version of java
<Tasser> why not jruby?
<Tasser> ah, sloooooow ^^
<manveru> Banistertab: not sure if you can touch the screen with the palm while writing
leopard_me joined #ruby-lang
<Banistertab> Manveru is your tab laggy
<manveru> not at all
<manveru> it's not a tab though
<manveru> my old galaxy tab was laggy
<Banistertab> Are you on honey comb
<manveru> aye
<Banistertab> So what is yours if not a tab
<Banistertab> A phone?
<manveru> they're called eeepad transformer
<manveru> nope
<Banistertab> But thsts just a name right
<tobiasvl> oh i want one
<tobiasvl> transformer prime
<manveru> galaxy tabs were sold out
<Banistertab> Its still a tablet
<manveru> yeah
<manveru> oh, they say i can upgrade to ice cream sandwich! :)
<Banistertab> Looks great
malev joined #ruby-lang
<manveru> ah, only in december :(
<tobiasvl> i want the transformer prime with 3G :(
<manveru> Banistertab: you tried 3d yet?
<Banistertab> Manveru how?
kain joined #ruby-lang
<manveru> oh, it doesn't have one of the tegra chips?
mark_locklear joined #ruby-lang
<manveru> says there's one inside
voobles joined #ruby-lang
SynrG joined #ruby-lang
<SynrG> i don't understand why, when running https://github.com/synrg/asx2mp3/blob/master/asx2mp3 on a linux host, the program exits immediately but all the threads continue to run in the background. did i do something wrong when i started the system() commands? or when i joined the threads?
apeiros_ joined #ruby-lang
<SynrG> the intent was to start a thread per mp3 processing pipeline, then wait until they all finished before exiting
<manveru> SynrG: you cannot run more than one system call at a time
<manveru> i recommend you use xargs -P in combination
<Banistertab> Brb
<Banistertab> Brb
<Banistertab> Huh
<Banistertab> Can you read me
<sirfilip> yes
thomasfedb left #ruby-lang
Banistertab joined #ruby-lang
<SynrG> manveru: curious. it does appear to run in parallel, which is what i wanted. in any case, on my TODO is to handle things more natively in ruby than to rely on system. considering mplayer-ruby. maybe this will help. thanks
<SynrG> xargs -P moves in the wrong direction, with more reliance on the shell to manage processes
shevy joined #ruby-lang
<voobles> hello everyone. i'm looking to split a string into 3 chars parts, came up with "strings".scan(/.{3}/), but the last part doesn't get into the resulting array, unless it's exactly 3 chars long, can anybody help me solve this? what i want is to have an array of strings of X length each and the remainder of the original string as the last part of the new array, even if the part isn't of the same length as all the preceeding ones. "st
vesan__ joined #ruby-lang
<lianj> voobles: {1,3}
tommyvyo_ joined #ruby-lang
zwerg joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
tbuehlmann joined #ruby-lang
kedare joined #ruby-lang
JEG2 joined #ruby-lang
leopard_me joined #ruby-lang
cjs226 joined #ruby-lang
Sapient_ joined #ruby-lang
mnoble joined #ruby-lang
mnoble left #ruby-lang
<manveru> SynrG: ruby will never execute on more than one cpu at once
<manveru> it'll switch between threads every 10ms or so, so it looks like it runs in parallel
kith joined #ruby-lang
<banisterfiend> manveru: which web browser do you use on your tab? dolpin?
<SynrG> manveru: the reason for threading it is not to take advantage of that. the issue is the network latencies introduced by pulling down multiple streams from the same site
<manveru> banisterfiend: opera
<SynrG> since the site throttles the speed per stream but not overall, there's a significant benefit here to threading
<manveru> ok
<manveru> if you're limited by IO anyway
<SynrG> i suppose the transcoding queue might benefit from cpu threads, though
yfeldblum joined #ruby-lang
<manveru> heh
<manveru> just didn't want you to think that ruby has parallel processing, it only does concurrency
<SynrG> yeah. i've used ruby enough to be aware of that
<manveru> if you're IO bound, then a simple select loop is the fastest way
chrstphrhrt joined #ruby-lang
samshull joined #ruby-lang
<manveru> if you have more than a few hundred connections going on, going evented is a better option
<rue> Better than fake-threaded, yes
<manveru> ruby uses native threads after all, that means you get the context-switching penalty for little benefit
<SynrG> hm
<SynrG> and if i used jruby here instead?
<manveru> jruby would be well suited
<manveru> better than anything you can do in MRI
<manveru> especially if it's long-running
<SynrG> i'll consider that. i'm moving more into using jruby lately at work, as it's the only viable port for openvms/itanium
<manveru> same here with AIX :)
<manveru> not really using it much there, but damn, it's handy if you need it
* SynrG nods
<SynrG> i actually have rails working fine on jruby on vms/itanium now
<banisterfiend> manveru: playing with a tablet is like sticking your fingers in the internet
<banisterfiend> redtube.com im coming
<SynrG> and HP recently fixed a java bug in VMS for me that related to concurrency issues in webrick run on jruby
micha-- joined #ruby-lang
rippa joined #ruby-lang
<micha--> hi, i am trying to define stopwords in picky. now it is telling me: `gsub!': can't modify frozen String (RuntimeError)
<micha--> any idea how to do this right?
<rue> Don't freeze it
dv310p3r joined #ruby-lang
il_rugginoso joined #ruby-lang
il_rugginoso left #ruby-lang
<micha--> rue: i don't see where i freeze it
<rue> Then some more detail would probably be apropos
<sirfilip> well if the object is frozen
<sirfilip> just dup and work with the clone
<micha--> rue: picky is a search gem, i am feeding strings to picky for indexing. the tokenizer takes the strings apart and turns them into search tokens. everything works so far, but if i define stop words, i get en error pointing to line 50 of the picky tokenizer.rb
<rue> And your stopwords aren't explicitly frozen, or come from Hash#keys or something?
<micha--> i guess some of the strings i am feeding to picky might be frozen, but AFAIK the tokens are not the strings
<rue> Yeah, well
<micha--> the stopwords are defined like indexing stopwords: /\b(and|or|in|on|is|has)\b/i
slyphon joined #ruby-lang
Spooner joined #ruby-lang
t4nkd joined #ruby-lang
jwill joined #ruby-lang
wyhaines joined #ruby-lang
<micha--> yup, liberally adding .dup to every returned object helped :-)
<micha--> for the strings, i mean
<micha--> thx!
scottschecter joined #ruby-lang
flip_digits joined #ruby-lang
<banisterfiend> manveru: is there a way to force the browser not to ask for the 'mobile' versions of sites?
<andrewvos> banisterfiend: Force a user agent?
RomD` joined #ruby-lang
<banisterfiend> how
outoftime joined #ruby-lang
<Tasser> banisterfiend, depends on your client
steph021 joined #ruby-lang
steph021 joined #ruby-lang
<SynrG> manveru: anyway, thanks for the input. with the last commit, the script does what i want it to, so having done the first 10% and the 'hard part' being making it suitable for release, dunno if i'll ever get inspired to do the rest now :/ it at least works for 'play all tracks' links from concerts at http://www.cbc.ca/radio2/cod if you're interested :)
<manveru> banisterfiend: it works fine for most sites... but some like tumblr are stupid
Pip joined #ruby-lang
<manveru> will take a few more years for people to realize that you shouldn't assume screen sizes based on user agent
savage- joined #ruby-lang
<banisterfiend> manveru: how do you force user agent using android's default browser?
<bougyman> banisterfiend: it really depends on how the site is deciding.
<bougyman> if they're checking for your canvas/screen size, user agent wouldn't matter.
adamjleonard joined #ruby-lang
<bougyman> i don't think many smart developers put any stock in User-Agent anymore.
<bougyman> User-Agent still gets around a lot of them, though.
marcostoledo joined #ruby-lang
<banisterfiend> bougyman: some stupid websites redirect you to a 'spam' site if you're accessing via mobile
<bougyman> banisterfiend: I know.
<bougyman> i put opera and firefox on my droid devices, trying each.
<bougyman> if it's user-agent, one of the three usually gets around it.
<bougyman> if it's done based on screen size all three are forced to 'mobile' sites.
dreinull joined #ruby-lang
Swimming_Bird joined #ruby-lang
<bougyman> my larger tablet even gets forced into some of them, though, and it's 1366x768 or some shit.
<bougyman> so that one is puzzling.
dejongge joined #ruby-lang
MistyM joined #ruby-lang
imajes joined #ruby-lang
SynrG left #ruby-lang
lsegal joined #ruby-lang
jensn joined #ruby-lang
<banisterfiend> bougyman: what tabs do u have?
<bougyman> banisterfiend: galaxy tab 7" and eeepad transformer
RomyEatsDrupal joined #ruby-lang
<rue> Worst. Transformer. Ever.
<bougyman> gonna get the transformer prime as soon as it's avail
<bougyman> this is the first eee product i've had that didn't suck.
<banisterfiend> bougyman: how much ram has the prime got?
<samuelkadolph> rue: I prefer Transmorphers
<bougyman> banisterfiend: no idea.
<banisterfiend> bougyman: i think if the transformer purports to be more than just a tablet its' going to need at least 2 gig IMO. Im already finding the 1 gig on my galaxy tab 10.1 a little hard going
<banisterfiend> but it's my first day with it so im still finding its limitations before i settle into it properly
<bougyman> really?
<bougyman> i've never hit any ram issues with either tab.
<bougyman> the ipad2 only has 512k, no?
<banisterfiend> yeah im doing a whole heap of multitasking, lots of videos going, music playing, irc, and so on
<bougyman> looks like the prime will be 1G
<banisterfiend> im treating it like a regular laptop which is probably a bad thing
rolfb joined #ruby-lang
nofxx joined #ruby-lang
savage- joined #ruby-lang
kedare joined #ruby-lang
Sapient joined #ruby-lang
spectra joined #ruby-lang
dabradley joined #ruby-lang
<rue> You're doing it wrong
<rolfb> I know :/
rayners joined #ruby-lang
RickHull joined #ruby-lang
darkf joined #ruby-lang
Indian joined #ruby-lang
samshull joined #ruby-lang
DEac- joined #ruby-lang
<apeiros_> rue: needs more trollface
<rue> Trollface is doing it wrong, too.
yann3 left #ruby-lang
dreinull joined #ruby-lang
<apeiros_> you're rueing this… :(
<apeiros_> ;-)
* apeiros_ off
RickHull joined #ruby-lang
wyhaines joined #ruby-lang
wyhaines joined #ruby-lang
misham joined #ruby-lang
<sirfilip> night
sirfilip left #ruby-lang
ksinkar joined #ruby-lang
steph021 joined #ruby-lang
RickHull joined #ruby-lang
gregmoreno joined #ruby-lang
DEac- joined #ruby-lang
amerine joined #ruby-lang
rushed joined #ruby-lang
butchanton joined #ruby-lang
kmeehl joined #ruby-lang
saLOUt joined #ruby-lang
S2kx joined #ruby-lang
saLOUt_ joined #ruby-lang
apeiros_ joined #ruby-lang
ksinkar joined #ruby-lang
Jake232 joined #ruby-lang
ecin joined #ruby-lang
DEac-_ joined #ruby-lang
Heimidal joined #ruby-lang
towski joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
phaedrix joined #ruby-lang
jbwiv joined #ruby-lang
gnufied joined #ruby-lang
Pip joined #ruby-lang
havenn joined #ruby-lang
gearaholic joined #ruby-lang
lightcap joined #ruby-lang
Heimidal joined #ruby-lang
nuclearsandwich joined #ruby-lang
mssola joined #ruby-lang
ecin joined #ruby-lang
livinded joined #ruby-lang
rsi joined #ruby-lang
ivanoats joined #ruby-lang
ivanoats joined #ruby-lang
tenderlove joined #ruby-lang
towski joined #ruby-lang
<freedrull> just curious why CSV isn't delcared with encoding : utf-8....
<RickHull> it's up the author, i suppose?
<Mon_Ouie> Why should it be? It needs to be able to handle more than just UTF-8
lsegal joined #ruby-lang
<Mon_Ouie> The encoding depends on that of the file, and is specified by an argument of some method in it
kitallis joined #ruby-lang
<freedrull> its declared with US-ASCII
jensn joined #ruby-lang
rhinux joined #ruby-lang
ryanf joined #ruby-lang
MrPunkin joined #ruby-lang
<MrPunkin> When using popen , do you route STDERR to STDOUT in the command you pass it, or is there a better way?
<Mon_Ouie> there's open3 to get two different IO objects for stdout and stderr
<Mon_Ouie> But if you want to use popen specifically, 2>&1 is what I'd go for
<MrPunkin> just in the command you pass it?
<samuelkadolph> ruby 1.9?
<MrPunkin> 1.8.7
<samuelkadolph> Boo
<samuelkadolph> Upgrade
<MrPunkin> yeah.. may in the future, but not just yet.
<MrPunkin> but, for what advantage?
<samuelkadolph> Then you can do IO.popen("", :err => [:child, :out])
<MrPunkin> ah nice
<freedrull> whats the caveat of force_encoding, seems to convert ASCII-8BIT to UTF-8 fine....
mrsolo joined #ruby-lang
amerine joined #ruby-lang
Heimidal_ joined #ruby-lang
<jensn> freedrull: It doesn't convert, it just changes the encoding tag.
<jensn> That's the caveat.
<freedrull> i see. so it only worked because the string had utf-8 bytes already.
<jensn> Exactly.
fra000 joined #ruby-lang
sepp2k joined #ruby-lang
macmartine joined #ruby-lang
Jake232 joined #ruby-lang
dustacio joined #ruby-lang
jensn joined #ruby-lang
amerine joined #ruby-lang
gregmoreno joined #ruby-lang
tommyvyo_ joined #ruby-lang
heppy joined #ruby-lang
heppy left #ruby-lang
saLOUt_ joined #ruby-lang
tommyvyo_ joined #ruby-lang
erics joined #ruby-lang
dreinull joined #ruby-lang
wyhaines joined #ruby-lang
workmad3 joined #ruby-lang
Heimidal joined #ruby-lang
rolfb joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
Defusal joined #ruby-lang
Defusal joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
alindeman joined #ruby-lang
ttilley joined #ruby-lang
<MrPunkin> can you write stdin to a Process.spawn call or do you need to use popen?
workmad3 joined #ruby-lang
<MrPunkin> or write to stdin before calling Process.spawn, etc?
havenn joined #ruby-lang
Skif joined #ruby-lang
wyhaines joined #ruby-lang
<RickHull> freedrull: CSV is not well specified. the convention is indeed US-ASCII
<RickHull> RFC 4 something
<deryl> wow, getting aggravated at ruby-debug19 and ruby 1.92|1.9.3 - can't seem to get _ruby_threadptr_data_type to be exposed such that the ruby-debug19 gem will work. with either 1.9.2 or 1.9.3.
<deryl> any attempts to use the debugger (even though the ruby-debug19|ruby-debug-base19 gems are installed) give me Symbol not found: _ruby_threadptr_data_type (LoadError)
<samuelkadolph> MrPunkin: You can write to a pipe before you pass it to Process.spawn
dreinull joined #ruby-lang
jeek_ joined #ruby-lang
tjgillies joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
nofxx joined #ruby-lang
brianpWins joined #ruby-lang
robbrit joined #ruby-lang
tjgilllies_ joined #ruby-lang
<tjgilllies_> does throw/catch use callcc behind the scenes?
workmad3 joined #ruby-lang
cyri_ joined #ruby-lang
<musl> gmah
<musl> eep, sorry, #ruby-lang. *hides*
Mch1 joined #ruby-lang
chrstphrhrt joined #ruby-lang
thone joined #ruby-lang
wyhaines joined #ruby-lang
wyhaines joined #ruby-lang
flip_digits joined #ruby-lang
Heimidal_ joined #ruby-lang
<andrewvos> ?
<echoprinter> This is one way to do it, isn't it? names = ARGF.read.chomp; puts names.sort; I get no errors and correct ouput in Gvim but not from the command line so just curious why. Error message I get when run from command line: http://www.pastie.org/2885227
maarten joined #ruby-lang
<echoprinter> gvim, geany...etc..those run the program alright...must be something to do with ARGF?
infid joined #ruby-lang
<MistyM> Is gvim using the same version of ruby as what you have on the commandline?
<echoprinter> hmm...i'll try and figure that out...brb.
<MistyM> echoprinter: In my brief testing in the rubies I've got, 1.8 had a #sort method for String that doesn't appear to have done anything useful at all. 1.9 doesn't have a #sort method for String.
MayorOfDetroit joined #ruby-lang
retro|cz joined #ruby-lang
<echoprinter> i know my default is ruby 1.9.2p290...so the others must be using 1.8.7 then? what do i use in 1.9.2?
<echoprinter> I'll still trying to check versions for Gvim and Geany.
<MistyM> What are you trying to do? ARGF.read returns everything concatenated as a single string, so there isn't anything to actually sort until you make it structured.
<echoprinter> I'm trying to read names in and print them out sorted alphabetically.
<MistyM> You'll want to transform the stream into an array then. What are they separated by, newlines?
_inc joined #ruby-lang
<echoprinter> yes.
Radar joined #ruby-lang
<MistyM> ARGF.read.split should transform it into an array then.
<retro|cz> Any idea how to find if file is in path with ruby ?
<Radar> How can I customize the markup that RDoc uses for RDoc::ClassModule#description?
<MistyM> #split uses newlines as the default split target.
<Radar> retro|cz: $:.inspect ?
<retro|cz> Radar, thank you
<retro|cz> Radar, but I think in system path
rsi joined #ruby-lang
<MistyM> You can get the system path variable via ENV["PATH"]
<echoprinter> MistyM: Hmmm...let me play with that and see...I'm just starting out so it may take me a while. thank you.
<retro|cz> MistyM, that's what am I doing. thank you
Pip joined #ruby-lang
<MistyM> retro|cz: How about ENV["PATH"].split(':').any? {|dir| File.exist? dir + '/yourfile'}
<retro|cz> MistyM, awesome
robbrit left #ruby-lang
dfr|mac joined #ruby-lang
benanne joined #ruby-lang
ecin joined #ruby-lang
<rsi> #<freebsd>
<MistyM> echoprinter: Not a problem!
tenderlove joined #ruby-lang
Indian joined #ruby-lang
havenn joined #ruby-lang
brianpWins joined #ruby-lang
<echoprinter> MistyM: yeah,that was easy to fix...I've noticed that if I put in "print names" it shows me what the array looks like inside, but "puts names" doesn't, I wonder why?
infid joined #ruby-lang
<echoprinter> something to do with puts returns nil?
<echoprinter> regardless, thanks again.
anjen joined #ruby-lang
<MistyM> #puts is designed for pretty printing object contents to stdout. I think #print is meant to represent the object's state instead.
<echoprinter> I see, thanks again. that's all. :)
Oloryn_lt1 joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
s0ber_ joined #ruby-lang
<Netfeed> isn't it p for state?
<shevy> MistyM I think you mean p and pp, puts if I remember correctly is just "put string" calling .to_s method on an object
<MistyM> shevy: Good point, yeah.
workmad3 joined #ruby-lang
<rue> #puts prints a string and a newline, #print just the string
<andrewvos> awesome_print is good too!
<shevy> what is that?
<andrewvos> Dare I say, awesome.
<shevy> nah
<shevy> aren't you playing skyrim :)
<andrewvos> shevy: https://github.com/michaeldv/awesome_print <-- rest your eyes upon
<andrewvos> shevy: Good point.
* andrewvos turns on xbox remote
<shevy> whoa
<shevy> colour explosion with awesome_print
<shevy> I usually love colours, but that is too much :/
headius joined #ruby-lang
retro2 joined #ruby-lang
<andrewvos> Only you would complain about something that's actually useful.
<Mon_Ouie> I have that, and colors in the code I'm typing !
<MistyM> Mon_Ouie: coolline looks extremely neat :D
<andrewvos> That does look cool
<shevy> andrewvos oh, I am using wirble, it is great
<shevy> but that colour explosion here is just killing the eyes
<andrewvos> Oh cool
<shevy> (or colours from pry directly, wirble just in irb)
<Mon_Ouie> (and I would not be using Iconv if String#encode had transliteration built-in)
<shevy> hmm what is all that Mon_Ouie
jeek_ joined #ruby-lang
<shevy> the 2:mutt on the bottom for instance
<Mon_Ouie> mutt is a mail client
<Mon_Ouie> That's tmux
<shevy> guess I have to try that :)
<shevy> Mon_Ouie, how do you manage that pry gets coloured when typing Time.now? for me it stays white ...
<shevy> and non-underlined :(
tenderlo_ joined #ruby-lang
marcostoledo joined #ruby-lang
<Mon_Ouie> I configured Pry to use my Coolline gem
<shevy> cool
apeiros_ joined #ruby-lang
diegoviola joined #ruby-lang
<diegoviola> hi
retro|cz joined #ruby-lang
lsegal joined #ruby-lang
rushed joined #ruby-lang
postmodern joined #ruby-lang
rolfb joined #ruby-lang
queequeg1 joined #ruby-lang
retro|cz joined #ruby-lang
<jorgenpt> Anyone here used json_spec and know of a good library to simulate a JSON request to my rails application?
<andrewvos> jorgenpt: SImulate?
<jorgenpt> Well, err, the first part is optional - but that's what I want to use it for ^_^
<andrewvos> jorgenpt: Looking for something like VCR?
<jorgenpt> As in I can do something like get "/api/foo.json" and get JSON data back
<jorgenpt> But preferrably without actually doing a HTTP request.
<andrewvos> jorgenpt: VCR might be of help
<steveklabnik> OMG USE VCR
<jorgenpt> :Oo
<steveklabnik> andrewvos: <3
<andrewvos> Or you can use a tool a friend of mine wrote called rest-assured
<zenspider> haha
<steveklabnik> (seriously, vcr is good, jorgenpt)
<zenspider> good name
<andrewvos> steveklabnik: haha
<andrewvos> :)
<jeek_> ahaha
<jorgenpt> I don't really want to record and replay HTTP requests, I just want to hit the local routes etc to find the URL and request it
<andrewvos> jorgenpt: What
<andrewvos> ?
<jorgenpt> As in, I have a rails application
<jorgenpt> And I want to test it without using HTTP
<steveklabnik> huh
<steveklabnik> heh
<andrewvos> jorgenpt: Your rails application fires off requests to an api?
<jorgenpt> Nono
<jorgenpt> Sorry, let me restart.
<jorgenpt> This was poorly explained.
<andrewvos> hah
<andrewvos> OMG the VCR docs are lovely https://www.relishapp.com/myronmarston/vcr
wyhaines joined #ruby-lang
<jorgenpt> I'm trying to test my RESTful API (written with Rails). I'm using Cucumber and json_spec, but I need a little something-something to retrieve the JSON data from Rails without hitting HTTP
<steveklabnik> they really are.
<jorgenpt> Does that make sense?
* steveklabnik inserts comments about how you're not really RESTful.
<steveklabnik> jorgenpt: sorta
<steveklabnik> jorgenpt: the biggest question is why you're so concerned about http
<steveklabnik> you're like "i'd like to run a mile, but i dont want to breathe'
<andrewvos> jorgenpt: No. Why don't you just do the request?
<jorgenpt> Well, I don't want to add the overhead of figuring out what port to hit, starting the rails app, etc :-)
<jorgenpt> Maybe there's a solution to that problem?
<steveklabnik> yeah, capybara.
<andrewvos> jorgenpt: It's called a unit test ;)
wyhaines joined #ruby-lang
<steveklabnik> or unit testing. but sounds like you want integration testing
<andrewvos> Hmm, what steveklabnik said too.
<jorgenpt> So what I'm actually doing is trying to combine writing a spec and writing a test :-)
<andrewvos> Though capybara won't help much if you want to validate json.
<jorgenpt> Someone else will write this JSON API :-)
Pip joined #ruby-lang
Pip joined #ruby-lang
<jorgenpt> json_spec is great for validating the JSON
<andrewvos> jorgenpt: So you're writing your contract?
<jorgenpt> Right
<jorgenpt> I just need to retrieve the JSON from the Rails app
<andrewvos> jorgenpt: Hmm. Probably capybara is the best bet.
huug joined #ruby-lang
<jorgenpt> Okay
<andrewvos> jorgenpt: Unless of course you need to set headers. I'm not sure that's so easy with capybara.
<jorgenpt> Nah, I hope I don't
<jorgenpt> Hm, I also need to POST data, which Capybara doesn't seem to do?
<andrewvos> jorgenpt: Not sure.
<steveklabnik> capybara can most certainly post
<jorgenpt> Oh, okay
<jorgenpt> Capybara seems to have a lot of functionality related to interacting with the response
<steveklabnik> mechanize?
<steveklabnik> i mean, pretty much everyone uses capybara for this.
<steveklabnik> a few still use watir
<steveklabnik> or webrat
retro2 joined #ruby-lang
<andrewvos> steveklabnik: LSE = London Stock Exchange I'm thinking.
<RickHull> london school of economics
<RickHull> (as well)
<steveklabnik> ahhh
<rue> The latter :P
<rue> Ahh, the multifaceted Internet.
<andrewvos> hehe
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
<steveklabnik> :D
<jorgenpt> andrewvos: I think maybe rack-test is the kind of thing I'm looking for
<andrewvos> Hmm
<andrewvos> Capybara uses rack-test doesn't it
<andrewvos> Yeah
<andrewvos> Capybara is just nicer
<jorgenpt> Not for this stuff, IMO :-)
<steveklabnik> by default
<andrewvos> jorgenpt: You may be right :)
<jorgenpt> I just need to GET or POST to a path and get the response body
<steveklabnik> it uses rack-test
<jorgenpt> Capybara adds a lot of abstractions that don't really fit this model
Pip joined #ruby-lang
<steveklabnik> hey, ask for advice, dont do what people tell you, fine. :p
<steveklabnik> i keeeed.
<jorgenpt> ^_^
<steveklabnik> :D
<steveklabnik> do whatever works.
<andrewvos> I bet you'll end up using capybara :)
<andrewvos> But for this cause, I agree.
<jorgenpt> Yeah, I agree that Capybara is useful
<jorgenpt> Colleagues of mine use it for more front-end oriented testing
<andrewvos> Yeah. I use it a lot.
<andrewvos> It's practically my job.
<banister`sleep> bur
<andrewvos> Translation: I bought a samsung tablet
<andrewvos> Oh wait, that's Banistertab
<banister`sleep> haha no i was trying to nick complete burgestraud
<banister`sleep> but he's not here to complete
<rue> He went to paint the town black
<rue> It's some kind of a winter energy conservation thing
butchanton joined #ruby-lang
<banister`sleep> or he's taking rollingstone songs too seriously
<rue> AFK, giving someone shelter
Indian joined #ruby-lang
<banister`sleep> ;)
* andrewvos looks up stones song names and tries to find worthy joke. Fails.
<steveklabnik> brown sugar.
<rue> Dylan also accepted
<andrewvos> Nice. I like how the new Google Reader layout uses up my entire cpu.
<andrewvos> 100% of cpu. My god
<andrewvos> Should I watch Hangover 2?
<andrewvos> I mean, would anyone recommend it?
<zenspider> not my kind of movie... I saw the first one and thought it sucked
<andrewvos> Yeah
<banister`sleep> andrewvos: watch the adventures of tin tin
<andrewvos> banister`sleep: Never
<andrewvos> To hell with movies nowadays
<andrewvos> This is going ot happen with the games industry too. Mark my words. There won't be any more good games because people can just release shitty ones for cheap.
<steveklabnik> i watched hangover
<shevy> andrewvos eh doesnt skyrim prove the opposite for YOU
<steveklabnik> 2
<steveklabnik> i thought it was allright
<andrewvos> shevy: One good game?
<shevy> andrewvos perhaps for you but you aren't the only one playing it. how about assassin's creed?
<andrewvos> shevy: = meh
<shevy> I am not playing games anymore though so for me your sentence is actually correct :(
<banister`sleep> andrewvos: www.godtube.com
<andrewvos> banister`sleep: look of disapproval
<banister`sleep> just found it now, pretty lulzy
dRbiG joined #ruby-lang
<andrewvos> Is it a parody site?
<banister`sleep> no
<andrewvos> Don't think I can manage to watch a video... Even if they are funny :)
<banister`sleep> andrewvos: watch melancholia
Heimidal joined #ruby-lang
<banister`sleep> that movie was pretty interesting
<andrewvos> You're in to von Trier stuff?
<banister`sleep> just melancholia
<MrPunkin> when spawning a process from Ruby… what user does it run as?
<MrPunkin> I'm having issues but I think it's trying to access restricted temp file directories or something
Heimidal joined #ruby-lang
<andrewvos> MrPunkin: As the same user
gix joined #ruby-lang
samshull joined #ruby-lang
<zenspider> I need better project scheduling... too many projects to deal with
<andrewvos> zenspider: Try JIRA! (just joking)
<steveklabnik> rally
<andrewvos> Now i'm in a bad mood. Stupid jira.
<zenspider> I'm thinking of setting up my review/triage task periods to be prime
* steveklabnik vomits
<banister`sleep> zenspider: sell some off make some scrill go on holiday
<zenspider> banister`sleep: scrill?
<banister`sleep> zenspider: cool american slang for 'money'
sirfilip joined #ruby-lang
<zenspider> hah. I must be old :P
<andrewvos> banister`sleep: Cool bro. I see you've been reading http://www.amazon.com/Anybody-Cool-Awesome-Practice-Devotionals/dp/1556610408
Austin__ joined #ruby-lang
Sapient_ joined #ruby-lang
<andrewvos> Ok I'm going to watch Melancholia. Your recommendations have never failed me.
<andrewvos> banister`sleep: ^
<jtoy> what do you guys thing of making all hashes become accessible to both "string" and :string ?
<andrewvos> jtoy: What's the point?
<jtoy> andrewvos: I make mistakes accessing them all the time
<andrewvos> jtoy: And, if you're going to be doing it in your code then I hate the idea.
<jtoy> I just ran into an issue where a driver was setting the hash access to use symbols when i thoguht it was a string
<andrewvos> jtoy: Seems like a non-issue to me.
<vikoren> throw a h.class == Symbol check in there?
<jtoy> vikoren: you mean check each key?
<jtoy> andrewvos: just always remember?
<andrewvos> jtoy: Write code like a boss.
<vikoren> jtoy: if its causing trouble, yes, check each key.
<jtoy> andrewvos: what does that mean?
<vikoren> jtoy: always make your code less flexible
<jtoy> really?
<andrewvos> jtoy: Sorry I'm just being full of shit. I don't see it as an issue because if you just change your code to do either hash["string"] or hash[:string] you will fix it.
<andrewvos> jtoy: Yes. Don't code for every possible exception.
<jtoy> i feel like i run into enough where i always need to check
* andrewvos mentions TDD and how it solves all problems.
<vikoren> jtoy: you could build a wrapper on hash that only takes Symbols as keys
QaDeS joined #ruby-lang
<mksm> jtoy, i think people call those "flexible" hashes as "mash"
<mksm> Hashie::Mash or DataMapper::Mash might be examples
<andrewvos> My latest addition to my .vimrc (highly recommended) https://github.com/AndrewVos/vimfiles/blob/master/.vimrc#L126
<banister`sleep> andrewvos: smoke a bit of weed first
<banister`sleep> andrewvos: cos it's kind of a subtle feeling he's trying to evoke
<andrewvos> banister`sleep: I don't do any form of drug.
<banister`sleep> and the sober mind can just overlook it
<zenspider> jtoy: I don't see the point of making hashes less efficient for everyone because some people are sloppy
<jtoy> zenspider: i was waiting for your witty remark!
<steveklabnik> jtoy: HashWithIndifferentAccess
<zenspider> I'm not being witty. I'm dead serious. using symbols for hash keys is a serious win
aef joined #ruby-lang
<steveklabnik> andrewvos: nice
<zenspider> doing stupid shit like HashWithIndifferentAccess universally is just wrong
<andrewvos> steveklabnik: Huh?
<steveklabnik> oh totally
<jtoy> zenspider: i totally agree
<steveklabnik> andrewvos: your vimrc
<jtoy> they get turned into strings all the time whe nyou serialize though
<andrewvos> HashWithIndifferentAccess <-- this is a real thing?
<steveklabnik> andrewvos: activesupport
<andrewvos> steveklabnik: Ahh yes! It's very very nice. I always mapped enter to rspec but the double enter just fits in to my bdd process perfectly.
<steveklabnik> andrewvos: here's my version, from my .vimrc: https://gist.github.com/1378073
<andrewvos> steveklabnik: Press enter a lot, then when you're done double tap it :)
<jtoy> i use symbols all the time, but when I get data over redis or over the wire, i ned to deal with strings, it seems bad to be switching between both
<andrewvos> steveklabnik: That runs the current file?
<steveklabnik> yes, or the specs for the current file
<steveklabnik> depending on if the file name ends in _spec or not
<andrewvos> steveklabnik: Interesting.
<steveklabnik> that took me like 4 hours. fucking vimscript
Weems joined #ruby-lang
<zenspider> jtoy: I agree... which is why I think your proposal is terrible
<andrewvos> steveklabnik: I like having :wa precede everything. Save all open windows. I often have production code on the left and test code on the right.
<zenspider> steveklabnik: elisp!
<steveklabnik> zenspider: quiet you!
<steveklabnik> :D
<zenspider> hee
<jtoy> zenspider: ok, i will just continue to use symbols but just to strings for serialized data or wherever i dont control the hash
<jtoy> /just/switch/
<steveklabnik> hsh[key.to_s]
<steveklabnik> trololol
<andrewvos> zenspider: The guy who wrote emacs eats pieces of his feet in public. Just sayin'
<steveklabnik> ad homenim
<steveklabnik> the guy who wrote rieserfs killed his wife, but.... nobody uses reiserfs
<steveklabnik> lol
<andrewvos> :)
<zenspider> hahaha
scottschecter joined #ruby-lang
<zenspider> jtoy: that sounds like the right thing to do
<andrewvos> In google if you type "youtube richard stallman " it autocompletes to "youtube richard stallman foot"
<shevy> I can see andrewvos is fascinated by that
<andrewvos> I like the first comment
<andrewvos> "It was FREE"
<andrewvos> shevy: :)
<shevy> I think when you watched one stallman video where he talks about the GPL, you kinda know everything else he has to say too :P
<zenspider> andrewvos: you seem a little fixated
<jtoy> oh look, he has cans of closed source soda in front of him.
<zenspider> maybe... nerd-crush?
<shevy> lol "closed source soda"
* andrewvos pukes
<andrewvos> zenspider: Just so we're clear. I'm not insulting emacs :)
Newbs joined #ruby-lang
<zenspider> haha
<rue> Isn't there an Emacs song to the tune of “Love Boat”?
<bougyman> i think zenspider wrote it.
<andrewvos> ahhaha
<rue> If I did any real scripting of the editor, I'd use Emacs
<rue> Hopefully with a working viper mode or summit.
<rue> I mean, I've broken my wrist. My range of motion is no longer sufficient for C-X-M-S-Y-x C-X-M-S-n and whatnot.
<andrewvos> The only scripting I do in vim is "let some sucker write the plugin and then download it"
<rue> Pretty much
<steveklabnik> the ruby bindings arent bad
<andrewvos> banister`sleep: Right, I'm watching this movie drug free. I hope it's worth it :)
<rue> andrewvos: It's not. You should watch “Beyond the Law” insetad
<rue> Damn it.
<andrewvos> insetad? Is that in Russia?
<rue> Statistically, I type “instead” incorrectly the most. There've been at least 5 separate occasions
knu joined #ruby-lang
<andrewvos> rue: You're using one hand?
<rue> STT
<steveklabnik> there's a 3d printing company named 'objet'
<steveklabnik> i have to take like 10 seconds to type it
<steveklabnik> because i just type 'object' like nothing else exists
<rue> I read that as “object”.
<andrewvos> I was trying to find out how to fix something in Coda today and I googled it three times. Each time I typed code. I even did it now.
<andrewvos> Also, I hate Coda.
bcardarella joined #ruby-lang
<bcardarella> How do I turn off multiline mode for regexp? "foo\n".match(/^foo$/) returns 0, I see the option 'm' for turning on multiline mode, but I dont' see how to turn it off
<rue> bcardarella: That's a correct match
<rue> /m only affects .
<andrewvos> bcardarella: It's off by default is it not
<bcardarella> "foo\nd".match(/^foo$/) also returns 0
<zenspider> andrewvos: coda the editor?
[1]maarten joined #ruby-lang
<andrewvos> zenspider: Yes
<zenspider> bcardarella: what are you expecting?
<zenspider> both of those are sane responses
<bcardarella> for it not to match
<steveklabnik> isn't it $\
<steveklabnik> ?
* steveklabnik is a perl guy
<zenspider> you're misunderstanding what multiline means
<bcardarella> that's possible
<rue> bcardarella: Yes, you're not excluding other content
<zenspider> multiline means that '.' in a regexp will match \n, which it normally doesn't
<rue> Your string does contain ^foo$, therefore it matches
<zenspider> bcardarella: why aren't you just saying: str == "foo" ?
<zenspider> there seems to be no reason to use a regexp
<rue> (Or \Afoo\Z, if you must)
<bcardarella> it's a simplified example
<steveklabnik> zenspider: TAKE THAT BACK
<rue> ((Typically your regexp would be a bit more elaborate))
<steveklabnik> YOU ALWAYS GO FULL REGEXP
<andrewvos> steveklabnik: Never go full regexp.
<zenspider> NOW YOU HAVE ALL PROBLEMS
<steveklabnik> andrewvos: sometimes, in the heat of the moment, it's okay to go full regexp
<andrewvos> steveklabnik: ^
<andrewvos> I propose a new internet rule. "Anything you search for in Google Images will return some random fucked up image."
<andrewvos> Case in point: http://www.google.co.uk/search?q=never+go+full+retard+image&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&biw=1309&bih=806&sei=MfDGTt7pA4qf8gPv-tnICw#um=1&hl=en&tbm=isch&sa=1&q=never+go+full+retard&pbx=1&oq=never+go+full+retard&aq=f&aqi=g2g-m1g-S7&aql=&gs_sm=e&gs_upl=2858l2858l0l3135l1l1l0l0l0l0l111l111l0.1l1l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=f9b30c45fabbd523&biw=1309&bih=806
<rue> andrewvos: Doesn't work quite as well with “never go full regexp”
<andrewvos> rue: You didn't see page 2 ;)
<rue> I think your rule has to include that the picture appears on the first page