apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
wroathe has quit [#ruby]
<Spaceghostc2c> !try
<Spaceghostc2c> Oh wait.
iamjarvo1 has joined #ruby
pu22l3r has joined #ruby
prometheus has joined #ruby
<shevybear> strangling bunnies
<shevybear> how cruel
<advorak> howdy y'all. I'm working with https://gist.github.com/cc714df00905aa8480e5 and am having some regex trouble
<advorak> the regex needs to work in both cases ..
alanp has joined #ruby
<advorak> I know an \n is throwing it off in there ..
alanp has joined #ruby
bradyl0ve has joined #ruby
alanp has joined #ruby
cbuxton has joined #ruby
mikepack has joined #ruby
dankest has joined #ruby
Guedes has joined #ruby
headius has joined #ruby
i-ray has joined #ruby
dhodgkin has joined #ruby
wmoxam has joined #ruby
liluo has joined #ruby
two- has joined #ruby
jwmann has joined #ruby
prometheus has joined #ruby
nari has joined #ruby
dv310p3r has joined #ruby
iosctr_ has joined #ruby
carlyle has joined #ruby
Monofu has joined #ruby
zakwilson has joined #ruby
sako has joined #ruby
kil0byte has joined #ruby
rasbonics has joined #ruby
fbernier has joined #ruby
ymasory has joined #ruby
Azure has joined #ruby
baroquebobcat has joined #ruby
mateuspontes has joined #ruby
zakwilson has joined #ruby
havenn has joined #ruby
mateuspontes has quit [#ruby]
baroquebobcat has joined #ruby
adamsilver has joined #ruby
Targen has joined #ruby
kidoz has joined #ruby
wmoxam has joined #ruby
mikepack has joined #ruby
savage- has joined #ruby
kpshek has joined #ruby
kil0byte has joined #ruby
dankest has joined #ruby
kil0byte has joined #ruby
netrealm has joined #ruby
sohocoke has joined #ruby
michaelmartinez has joined #ruby
ben225 has joined #ruby
davidpk has joined #ruby
Monofu has joined #ruby
jobicoppola has joined #ruby
fayimora has joined #ruby
Careott has joined #ruby
Monofu has joined #ruby
nai has joined #ruby
saltnvinegar has joined #ruby
darren has joined #ruby
daniel_hinojosa has joined #ruby
ping-pong has joined #ruby
subbyyy has joined #ruby
subbyyy has joined #ruby
adamsilver has quit [#ruby]
danielvdotcom has joined #ruby
<danielvdotcom> anyone would be kind enough to help me with an error problem?
<danielvdotcom> i am trying to reference an element within a nested hash array dynamically with user in put, i know why it is failing but am having a hard time accomplishing my goal.
<danielvdotcom> help much appreciated.
<yannis> I think you're looking for String#to_sym
Emmanuel_Chanel has joined #ruby
<danielvdotcom> yannis: thanks! i will check it out. much appreciated!!
davidpk has joined #ruby
<yannis> danielvdotcom: you're welcome :-)
Bosma has joined #ruby
darren has joined #ruby
davidpk has joined #ruby
ErsatzRyan has joined #ruby
wilmoore has joined #ruby
saltnvinegar has joined #ruby
<rking> Anyone here have a working vim setup where :make (using makeprg=rake) causes the output of failing tests to correctly quickfix? Here is what I have at the moment, and it's terrible: https://gist.github.com/2564474
i_o has joined #ruby
cpruitt has joined #ruby
bdnelson has joined #ruby
luxurymode has joined #ruby
tingo has joined #ruby
twinturbo has joined #ruby
zakwilson has joined #ruby
wvms has joined #ruby
paxtonbell has joined #ruby
looopy has joined #ruby
<paxtonbell> anyone know how to get watchr running on windows? i'm getting a" 'system' is not recognized as an internal or external command" error.
cbuxton has joined #ruby
<rking> paxtonbell: That sounds unright. Give me the full error and the lines surrounding the error's source.
<paxtonbell> hold on
ymasory has joined #ruby
<paxtonbell> The syntax of the command is incorrect.
<paxtonbell> 'system' is not recognized as an internal or external command,
<paxtonbell> operable program or batch file.
shadoi has joined #ruby
luckyruby has joined #ruby
<paxtonbell> watchr( '.*\.coffee' ) {|md| system("cake build:app") }
<paxtonbell> that's the command i'm using
tomzx_ has joined #ruby
<rking> The examples I'm looking at say to use "watch", not "watchr".
<paxtonbell> ok let me double check that
radic has joined #ruby
airhorns has joined #ruby
<paxtonbell> watch doesnt seem to be registered as a command. i gotta do some digging
<paxtonbell> not finding it in my ruby bin dir either
<rking> Wait, "watch()" is a Ruby method.
<rking> That whole line is Ruby.
nai has joined #ruby
<paxtonbell> ok got it
adamsilver has joined #ruby
<paxtonbell> let me try to get that working
<paxtonbell> thanks
<rking> paxtonbell: Actually, thank /you/ - I've been meaning to try out Autotest/Guard/Watchr... this'll be my excuse to start.
<paxtonbell> np :)
<adamsilver> hi all
<adamsilver> how "Google is down!" is being printed using this code: http://pastebin.com/PAvyCmcr
zakwilson has joined #ruby
flaggy has joined #ruby
<flaggy> is there a method for upcase an accented letter ('á' must become 'Á')?
stefanp_ has joined #ruby
<rking> adamsilver: You gotta debug.
<adamsilver> or use python :@
<rking> adamsilver: Open up irb. Paste in: require 'net/http' then do: h = Net::HTTP.new('www.google.com')
<adamsilver> 1.9.3-p125 :001 > require 'net/http'
<adamsilver> => true
<adamsilver> 1.9.3-p125 :002 > h = Net::HTTP.new('www.google.com')
<adamsilver> => #<Net::HTTP www.google.com:80 open=false>
<rking> Good so far. Now, what does r = h.head('/') say ?
<adamsilver> thanks i figured the error
<adamsilver> google doesn't seem to run on port 80
<rking> adamsilver: Really? What was it?
<rking> Hehe, surely it does.
<rking> That would be the single most pathological event in the entire internet history, AFAIK.
<adamsilver> hmmm
<adamsilver> it worked with my own domain
<rking> adamsilver: Well, what does r = h.head('/') say?
Azure has joined #ruby
luckyruby has joined #ruby
<adamsilver> 1.9.3-p125 :003 > r = h.head('/')
<adamsilver> => #<Net::HTTPFound 302 Found readbody=true>
<rking> Aha, there it is.
<rking> I'm not sure why you're getting that - I actually get a Net::HTTPOK.
iosctr has joined #ruby
sako has joined #ruby
seanstickle has joined #ruby
<rking> adamsilver: But 302 Found is a successful condition - so there must be some better way to check for success than .kind_of? Net::HTTPOK
seanstickle has joined #ruby
<adamsilver> I think HTTPOK is important, the server may be up but showing 500 error for instance
seanstickle has joined #ruby
saltnvinegar has joined #ruby
IrishGringo has joined #ruby
chrxn_ has joined #ruby
Juul has joined #ruby
Watcher7 has joined #ruby
pygmael has joined #ruby
RORgasm has joined #ruby
Natch| has joined #ruby
Natch| has joined #ruby
relix has joined #ruby
darren has joined #ruby
dv310p3r has joined #ruby
Ryan_V-01 has joined #ruby
optionight has joined #ruby
kenperkins has joined #ruby
narkoz has joined #ruby
<optionight> Hi. Anyone with chess programming experience here?
<Ryan_V-01> hey, looking for some refactoring, hope you guys can help. example: i need to get [ {:a => 1} , {:b => 2} ] to be { 0 => {:a => 1}, 1 => {:b => 2} }.
waigani_ has joined #ruby
<otters> Hash[(0..a.count).zip(a)]
jgrevich_ has joined #ruby
<Ryan_V-01> hah beautiful, thanks. except 1 extra "." after the 0
<Ryan_V-01> that was quick
<optionight> What's the best channel to ask about chess programming?
<td123> optionight: just ask it here, if anyone wants/can help you, they will
zakwilson has joined #ruby
<otters> Why would you want a number-indexed hash?
cha1tanya has joined #ruby
savage- has joined #ruby
<krz> Time.now.utc.strftime("%e %b") returns: " 1 May". what is causing the space char before 1?
CheeToS has joined #ruby
<Ryan_V-01> its for a single table inheritance model in rails with serialized data otters
<dominikh> krz: the very fact that you are using %e
<Ryan_V-01> with nested forms :)
<dominikh> krz: that's what %e does. day, padded with space instead of zero
<Ryan_V-01> krz add a dash before e
<Ryan_V-01> %-e
<krz> nice
<krz> thanks
<Ryan_V-01> np
<optionight> Can anyone help with minimax algorithm chess endstate?
optionight has quit [#ruby]
optionight has joined #ruby
zakwilson has joined #ruby
<banisterfiend> d
optionight has quit [#ruby]
shanthoosh has joined #ruby
qos has joined #ruby
vipaca has joined #ruby
vipaca has joined #ruby
<Ryan_V-01> i have another one. tbh i don't really use inject so i don't fully understand what this is trying to do but maybe you can. https://gist.github.com/2564774
snip_it has joined #ruby
MarcMorata has joined #ruby
adamsilver has quit [#ruby]
<dekz> Anyone know the best way to steal the STDOUT of a system command and write that to a logger? Is there a special logger around that can mimic STDOUT at all?
mun24 has joined #ruby
<mun24> hi
<mun24> I am trying to run ruby with pcap, getting error
wroathe has joined #ruby
gregorym has joined #ruby
gregorym has quit [#ruby]
axl_ has joined #ruby
carlyle has joined #ruby
igotnolegs has joined #ruby
AlbireoX has joined #ruby
chrxn_ has joined #ruby
mikepack has joined #ruby
S2kx has joined #ruby
TheIronWolf has joined #ruby
h4mz1d has joined #ruby
vitor-br has joined #ruby
iezaru has joined #ruby
kenperkins has joined #ruby
nai has joined #ruby
andrewhl has joined #ruby
indeterminate has joined #ruby
mun24 has joined #ruby
wmoxam has joined #ruby
h4mz1d has joined #ruby
dhruvasagar has joined #ruby
nai_ has joined #ruby
hamfz_ has joined #ruby
rotor has joined #ruby
nai has joined #ruby
s14 has joined #ruby
zakwilson has joined #ruby
nai has joined #ruby
cbuxton has joined #ruby
twinturbo has joined #ruby
thismax has joined #ruby
baroquebobcat has joined #ruby
luckyruby has joined #ruby
manizzle has joined #ruby
chrxn_ has joined #ruby
noodletraveler has joined #ruby
ckrailo has joined #ruby
tomzx_ has joined #ruby
_whitelogger has joined #ruby
altiouz has joined #ruby
codezombie has joined #ruby
rippa has joined #ruby
manizzle has joined #ruby
noodletraveler has joined #ruby
jgrevich has joined #ruby
td123 has joined #ruby
nai has joined #ruby
davidpk has joined #ruby
nai_ has joined #ruby
<rking> I wonder why this channel has such a high ratio of join/part/quits to messages.
luckyruby has joined #ruby
vitor-br has joined #ruby
palmfrond has joined #ruby
<palmfrond> hi anyone from sweden?
<tchebb> rking: I use the pidgin IRC plugin to hide join/parts
<rking> tchebb: I've been afraid to hide join/parts in general, because I don't want to be the guy that is talking to someone who left.. but maybe it's time to try it out.
tonini has joined #ruby
<Spaceghostc2c> Use tabcompletes.
<tchebb> rking: This one shows join/parts of people who've been active in the last 20 minutes, and in addition parted users names are in italics.
jmfcool has joined #ruby
<tchebb> *user's
<tchebb> **users'
<tchebb> damn apostrophes
<rking> Spaceghostc2c: Yeah, that probably works ... I wasn't thinking of that. (I do tabcomplete anyway)
<rking> tchebb: Pretty spiffy.
<rking> Still I have to wonder what phenomenon causes people to join/part/quit without saying stuff.
<rking> It's higher here than other channel's I'm on.
<rking> Oops, spurious apostrophe. >=(
<tchebb> Probably just the popularity of the channel. I know it also happens in #ubuntu and #archlinux and every other large channel I've been in.
bradyl0ve has joined #ruby
<tchebb> But those channels are generally also more active with support requests and such
<tchebb> than this one
nipra has joined #ruby
c0rn has joined #ruby
pygmael has joined #ruby
sako has joined #ruby
bambanx has joined #ruby
<bambanx> hi
<any-key> HELLOOO
<bambanx> anyone can light me what i do wrong i am trying to get a mouse position of anywhere on the screen and show it in a gui shoes
<bambanx> here is my code http://pastebin.com/1gKFKkWG
noodletraveler has joined #ruby
dexter_ has joined #ruby
<bambanx> pls guys
Akuma has joined #ruby
hamfz_ has joined #ruby
nilg has joined #ruby
dexter_ has joined #ruby
<tchebb> bambanx: What error are you seeing?
<bambanx> i dont see errors ,m but it show me other positions i put the cursor on the 0,0 screen and show me other i think it show me the limit of the gui app
<bambanx> but not of the all screen
mdhopkins has joined #ruby
jgrevich_ has joined #ruby
fukushima has joined #ruby
<bambanx> :/
lkba has joined #ruby
alanp has joined #ruby
bawerd has joined #ruby
<bambanx> can you help me tchebb pls
<tchebb> bambanx: I'm looking at Shoes documentation now.
<bambanx> cool nice
<bambanx> thanks men
<tchebb> First of all, you only need to require win32api once.
<bambanx> i was trying for a lot of time doing this :/
<tchebb> bambanx: You can also remove the call to GetCursorPos outside the shoes loop and move your getCursorPos and lpPoint definitions outside of the loop
<bambanx> ok
ben225 has joined #ruby
<bambanx> i have this http://pastebin.com/HWTpqekT
greenarrow has joined #ruby
nai has joined #ruby
<tchebb> bambanx: You want the position to continuously update, right?
<bambanx> yeah
<tchebb> Okay, right now you are only updating the position once.
<tchebb> That's why you're not seeing it change
ViperMaul has joined #ruby
Mission-Critical has joined #ruby
<bambanx> ok
pdtpatr1ck has joined #ruby
RORgasm has joined #ruby
Morkel has joined #ruby
<tchebb> bambanx: It looks like you're trying to make the position update on keypress. Is this what you want to happen or do you want it to update whenever the mouse is moved?
<bambanx> tchebb if i put outside of shoes it dont sshow me nothing on the labels
<bambanx> i wanna show mouse position in labels
<bambanx> all the time or when i press a key
<bambanx> i mean when i drag the mouse (move) or when i press any key
<tchebb> bambanx: Okay, let's make it update when you press a key.
<bambanx> i dunno how
<bambanx> :(
<tchebb> The issue is that @x and @y aren't actually changing because you only call getcursorpos once
alanp has joined #ruby
<tchebb> I'll show you how.
<bambanx> ok
<bambanx> ty bro
<tchebb> Try this: http://pastebin.com/bneJwdhb
<tchebb> What I've done is moved the getcursorpos call inside the keypress event so it is triggered whenever you press a key
<bambanx> aaaaaaaaaaaaaaaaaaaaaaaaaaa
<bambanx> thankkkkkkkkkkkssssssss men
<bambanx> tchebb men i was watching this for a lot of time in java python and now in ruby
<bambanx> you are my hero tchebb
<bambanx> :P
<tchebb> bambanx: Thanks :P
<bambanx> hehehe
macmartine has joined #ruby
thecreators has joined #ruby
<bambanx> men if i wanna do the same but show me all time when i move the mouse=
<bambanx> ?
<tchebb> You can change the keypress to a different event
<tchebb> let me look up the name
<tchebb> Here's a full reference: http://shoesrb.com/manual/Events.html
<tchebb> It looks like "motion" is the one you want
<bambanx> thanks men
<tchebb> so just change keypress to motion and you should be all set
<bambanx> i changed keypress do |k| for motion do |top, left|
<bambanx> and works only when i drag on the gui but not outside
Guest62989 has joined #ruby
<tchebb> bambanx: I don't think that Shoes can capture mouse movement outside the window.
c0rn has joined #ruby
<bambanx> i think the same
<bambanx> but i dont care
alanp has joined #ruby
<bambanx> tchebb: you know how i can start my shoes app but in other position ? i try left but dont work
nai has joined #ruby
<tchebb> bambanx: What did you set left to?
<bambanx> my gui
<bambanx> when its start
<bambanx> show it on the left corner for example
<bambanx> not in the center
<tchebb> I mean, you need to pass ":left => something" to Shoes.app. What did you set "something" to?
Azure|netbook has joined #ruby
<tchebb> Like you pass ":height => 500"
<bambanx> left dont work
<bambanx> i put :left => 500
<bambanx> and dont work
<tchebb> Does it start 500 pixels from the left?
<tchebb> Try "left => 0"
<bambanx> ok
cantonic_ has joined #ruby
Azure has joined #ruby
<bambanx> tchebb: this Shoes.app :height => 500, :width => 500, :left => 0 do dont work
igotnolegs has joined #ruby
igotnolegs has joined #ruby
mikepack has joined #ruby
<bambanx> weird?
<tchebb> I think it should work. I don't know why it isn't.
<tchebb> Maybe it's only for elements inside the app and not the window itself.
CheeToS has joined #ruby
<bambanx> yeah
chrxn_ has joined #ruby
schovi has joined #ruby
jarred has joined #ruby
jarred has quit [#ruby]
schovi_ has joined #ruby