ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
ilyam has joined #ruby-lang
<imperator2> the rib command line, for your pleasure
<imperator2> jtoy, can you be more specific?
drbrain has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
<jtoy> when i do long commands in irb, often when i go back in history the lines is all mangled and i can't edit it
Cykey has joined #ruby-lang
<imperator2> what platform? got readline installed?
nibbo has quit [Ping timeout: 272 seconds]
nibbo has joined #ruby-lang
fayimora_ has joined #ruby-lang
<imperator2> well, this is interesting, my strings are being encoding in ibm427 by default, but that's not by default console code page
<jtoy> imperator2: i ssh into ubuntu from mac,yes readline is installed
<jtoy> it makes uses rib useless often
<imperator2> so, you're running irb remotely
<erikh> the mcrib!
<imperator2> is readline installed on the remote box?
<imperator2> what version of ruby, btw?
rmascarenhas has joined #ruby-lang
Tasser has quit [Ping timeout: 265 seconds]
<erikh> readline typically isn't used on macs IIRC, I think it's libedit that's used there
<erikh> drbrain would know for sure
<jtoy> 1.9.3
<jtoy> how can I know the deadline version I have?
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
<jtoy> stupid mac auto correct keeps autocorrecting my text
alexkane_ is now known as alexkane
<cout> haha
Tasser has joined #ruby-lang
andrewhl has joined #ruby-lang
fayimora has quit [Ping timeout: 246 seconds]
cjs226 has joined #ruby-lang
DRCALKIN has quit [Quit: Leaving]
cjs226 has quit [Client Quit]
ezkl has joined #ruby-lang
<imperator2> jtoy, in your remote irb first try "requrie 'readline'"
perryh_away is now known as perryh
<imperator2> if that doesn't blow up, try Readline::RL_LIBRARY_VERSION
* imperator2 thinks he's found a code page bug in mri on winders
<imperator2> or at least a disagreement between mri and jruby as to what the default encoding for strings should be
<jtoy> hmm, my rib doesn't show readline
<jtoy> I'm sure i use it though
<slyphon> rib?
<jtoy> irb
<slyphon> oh
<slyphon> ha
<jtoy> i can press up/down to see commands
<erikh> system preferences -> text -> second tab
<erikh> upper right
<erikh> unclick "correct spelling automatically"
<erikh> fixxxxed
<slyphon> :)
codesturgeon has joined #ruby-lang
freefallertam has joined #ruby-lang
deryldoucette has quit [Quit: deryldoucette]
neoesque has joined #ruby-lang
gasbakid has quit [Read error: Operation timed out]
pbjorklund has quit [Ping timeout: 244 seconds]
woollyams has joined #ruby-lang
Asher has quit [Ping timeout: 248 seconds]
Tasser has quit [Ping timeout: 248 seconds]
nofxxx has quit [Ping timeout: 244 seconds]
bryancp has quit [Remote host closed the connection]
Tasser has joined #ruby-lang
havenn has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
Asher has joined #ruby-lang
nofxxx has joined #ruby-lang
KillerFox has quit [Ping timeout: 265 seconds]
Criztian_ has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
t has joined #ruby-lang
<imperator2> man, this is driving me crazy, jruby is giving me an invalidbytesequenceerror when i run the test suite, but works fine if i run theh code standalone
t is now known as Guest63768
tenderlove has joined #ruby-lang
robbyoconnor has joined #ruby-lang
cschneid has quit [Quit: ZNC - http://znc.sourceforge.net]
Criztian has quit [Ping timeout: 246 seconds]
jtoy has quit [Quit: jtoy]
freefallertam has quit [Ping timeout: 245 seconds]
<cout> :(
<rking> imperator2: Haha. I wonder what's different.
bruno_coelho has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
<imperator2> cout, win32-service work out for you?
robbyoconnor has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
hahuang65_ has quit [Quit: Computer has gone to sleep.]
<cout> imperator2: haven't gotten windows to install yet
<cout> imperator2: had a question earlier today but I think I figured it out (how to set configuration options for the service)
<imperator2> roger roger
Z33K|Lux has joined #ruby-lang
bfreeman has joined #ruby-lang
harukomoto has quit [Ping timeout: 250 seconds]
robbyoconnor has quit [Ping timeout: 276 seconds]
rahult_ has joined #ruby-lang
savage- has quit [Ping timeout: 252 seconds]
Cykey has quit [Quit: Computer has gone to sleep.]
KillerFox has joined #ruby-lang
ezkl has quit [Quit: QUIT!]
peppyheppy has quit [Ping timeout: 244 seconds]
imperator2 has quit [Quit: Leaving]
Criztian_ has quit [Remote host closed the connection]
codesturgeon has quit [Quit: Leaving...]
jonyamo has joined #ruby-lang
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ttilley has joined #ruby-lang
jtoy has joined #ruby-lang
chimkan_ has joined #ruby-lang
jtoy has quit [Client Quit]
rmascarenhas has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby-lang
jd is now known as Jaded
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rmascarenhas has joined #ruby-lang
bryancp has joined #ruby-lang
mistym has joined #ruby-lang
stardiviner has joined #ruby-lang
jonyamo has quit [Quit: leaving]
mistym has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
tomb_ has quit [Ping timeout: 245 seconds]
tomb_ has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
Giddeon has joined #ruby-lang
x0F_ is now known as x0F
DEac- has quit [Read error: No route to host]
DEac-_ has joined #ruby-lang
dalekurt has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
cored has quit [Ping timeout: 244 seconds]
Guest63768 has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
robbrit has joined #ruby-lang
<robbrit> is there a non-web library in Ruby for producing graphs?
<erikh> you might be able to find an interface to rrd
<erikh> probably the best thing
<erikh> pretty good article about community, perl or not: http://rjbs.manxome.org/rubric/entry/1959
<robbrit> erikh: ruby bindings are available with apt-get, thanks!
<erikh> robbrit: excellent!
krz has quit [Quit: krz]
savage- has joined #ruby-lang
jonyamo has joined #ruby-lang
mattonrails has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
jonyamo has quit [Client Quit]
robbrit has left #ruby-lang [#ruby-lang]
bryancp has quit [Remote host closed the connection]
harukomoto has joined #ruby-lang
flowerpot has quit [Quit: Ex-Chat]
<ryez> oops, I was reading this
<ryez> then discovered in ruby 1.9.3, (-5) / 2 => -3
mattonrails has joined #ruby-lang
<ryez> - (5/2) => -2
mattonrails has quit [Remote host closed the connection]
<ryez> isn't it a bug?
<nofxxx> ryanf, not really, for precision one *must* use BigDecimal
<nofxxx> or something like it*
<nofxxx> =/
<nofxxx> ryez... sorry ^
<nofxxx> decimal precision* , if possible you can do math only in integer. Money gem does so.
<ryez> nofxxx: no, that's not for precision, just for integer math
slaytanic has quit [Quit: Reconnecting]
<ryez> therefore I think (-5)/2 should equals -(5/2), with result -2
slaytanic has joined #ruby-lang
mistym has joined #ruby-lang
<bnagy> lol
bruno_coelho has quit [Remote host closed the connection]
igotnolegs has joined #ruby-lang
savage- has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
countdigi has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
ryanf has quit [Ping timeout: 248 seconds]
heftig has quit [Ping timeout: 272 seconds]
JohnBat26 has joined #ruby-lang
peppyheppy has joined #ruby-lang
ramonmaruko has joined #ruby-lang
banisterfiend has quit [Ping timeout: 245 seconds]
jtoy has joined #ruby-lang
<bnagy> comedy quote, as well.
<bnagy> Japanese elementary schools tend to teach their children that "x / y is z remainder w" means x == y * z + w, where 0 <= w < y. So we follow it. ~ shyouhei
<countdigi> party rock
ryanf has joined #ruby-lang
tRAS has joined #ruby-lang
<ryez> bnagy: thank you for the reference!
<ryez> this must be a popular comedy, right
<ryez> also interesting to know that python behaves the same
<bnagy> ryez: the point is that integer division and negative numbers is counterintuitive
<bnagy> so when you say 'I don't think it should work like that because it's weird' it's funny :)
<ryez> oh yeah, I wanted to say that :D
gix has quit [Ping timeout: 240 seconds]
<countdigi> sorry for the obscure comment but validating ur statement while watching lmfao :-)
savage- has joined #ruby-lang
rmascarenhas has quit [Quit: leaving]
gix has joined #ruby-lang
hahuang65 has joined #ruby-lang
ilyam_ has joined #ruby-lang
ilyam_ has quit [Client Quit]
ryanf_ has joined #ruby-lang
ilyam has quit [Ping timeout: 260 seconds]
Giddeon has quit []
mistym has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
slyphon is now known as slyphon_away
dfr|mac has joined #ruby-lang
ryanf__ has joined #ruby-lang
DRCALKIN has joined #ruby-lang
<rahult_> good gem to study some meta-programming techniques?
<bnagy> not a gem, but dwemthy's array on the poignant guide
ryanf__ has quit [Client Quit]
rahult_ has left #ruby-lang ["Textual IRC Client: http://www.textualapp.com/"]
rahult_ has joined #ruby-lang
<rahult_> checking it out now, thanks bnagy
<bnagy> some of the stuff in it is (or was) 1.8, so there are more streamlined ways to do some stuff now, like instance_exec etc
<rahult_> ok
rippa has joined #ruby-lang
mistym has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
Jaded is now known as Jade
tRAS has quit [Quit: Mother, did it need to be so high?]
dfr|mac has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
lake has quit [Ping timeout: 265 seconds]
jtoy has quit [Quit: jtoy]
<rahult_> thanks bnagy , this is pretty interesting exercise
lake has joined #ruby-lang
crudson has quit [Quit: Leaving.]
arooni-mobile has quit [Ping timeout: 246 seconds]
tRAS has joined #ruby-lang
Axsuul has quit [Ping timeout: 256 seconds]
tris has quit [Ping timeout: 256 seconds]
tpope_ has quit [Ping timeout: 256 seconds]
tpope has joined #ruby-lang
Axsuul has joined #ruby-lang
concernedcitizen has joined #ruby-lang
slyphon_away has quit [Ping timeout: 244 seconds]
chimkan has joined #ruby-lang
diegoviola has quit [Ping timeout: 240 seconds]
petercooper has quit [Remote host closed the connection]
hahuang65 has quit [Quit: Computer has gone to sleep.]
tris has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
brianpWins has joined #ruby-lang
flebel has quit [Ping timeout: 255 seconds]
flebel has joined #ruby-lang
musl has quit [Read error: Connection reset by peer]
musl has joined #ruby-lang
fredguest has joined #ruby-lang
mssola has joined #ruby-lang
yxhuvud has joined #ruby-lang
harukomoto has quit [Ping timeout: 246 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
xjiujiu has joined #ruby-lang
mytrile has joined #ruby-lang
ridders24 has joined #ruby-lang
yugui_zzz is now known as yugui
DRCALKIN has quit [Quit: Leaving]
TvL2386 has joined #ruby-lang
nofxxx has quit [Ping timeout: 256 seconds]
nofxxx has joined #ruby-lang
gouthamvel has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
ttilley has quit [Remote host closed the connection]
gouthamvel has left #ruby-lang [#ruby-lang]
ridders24 has quit [Ping timeout: 265 seconds]
tonesfrommars has quit [Quit: KVIrc 4.0.1 Insomnia http://www.kvirc.net/]
imperator has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
ilyam has joined #ruby-lang
shevy has quit [Ping timeout: 245 seconds]
replore has joined #ruby-lang
tomzx has quit [Ping timeout: 246 seconds]
wangzaidali has joined #ruby-lang
hemanth has joined #ruby-lang
|Vargas| has joined #ruby-lang
wangzaidali has left #ruby-lang [#ruby-lang]
wangzaidali has joined #ruby-lang
wangzaidali has left #ruby-lang [#ruby-lang]
shevy has joined #ruby-lang
ryanf has quit [Disconnected by services]
ryanf_ has left #ruby-lang [#ruby-lang]
ryanf has joined #ruby-lang
heftig has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
francisfish has joined #ruby-lang
sepp2k has joined #ruby-lang
kain has quit [Quit: Sto andando via]
In-fectur has joined #ruby-lang
In-fectur has quit [Quit: Leaving]
<imperator> is it safe?
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Hakon|mbp has quit [Quit: Leaving...]
francisfish has quit [Remote host closed the connection]
andrewhl has quit [Quit: andrewhl]
<bnagy> is it secret?
vmoravec has joined #ruby-lang
Radium_ has joined #ruby-lang
gokul has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
fredguest has quit [Remote host closed the connection]
LarryLv has joined #ruby-lang
Radium_ has quit [Ping timeout: 248 seconds]
ryanf has quit [Quit: leaving]
avdi has quit [Remote host closed the connection]
fredguest has joined #ruby-lang
peppyheppy has quit [Quit: peppyheppy]
imperator has left #ruby-lang ["Leaving"]
woollyams has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: leaving]
<postmodern> Setec Astronomy
ryez has joined #ruby-lang
replore has quit [Remote host closed the connection]
concernedcitizen has quit [Remote host closed the connection]
nevynxxx has joined #ruby-lang
Jade has quit [Ping timeout: 248 seconds]
gouthamvel has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
rahult_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
fredguest has quit [Remote host closed the connection]
soahccc is now known as soahccc`
francisfish has joined #ruby-lang
cdt has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
yugui is now known as yugui_zzz
zmack has joined #ruby-lang
tr-808 has quit [Ping timeout: 276 seconds]
Asher1 has joined #ruby-lang
Choobie has quit [Ping timeout: 245 seconds]
Asher has quit [Ping timeout: 240 seconds]
asaaki has joined #ruby-lang
solars has joined #ruby-lang
tr-808 has joined #ruby-lang
brianpWins has quit [Read error: Connection reset by peer]
indeterminate has joined #ruby-lang
brianpWins has joined #ruby-lang
brianpWins has quit [Remote host closed the connection]
futurechimp has joined #ruby-lang
brianpWins has joined #ruby-lang
Asher has joined #ruby-lang
Asher1 has quit [Ping timeout: 244 seconds]
toretore has joined #ruby-lang
adambeynon has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
rushed has joined #ruby-lang
tRAS has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby-lang
tRAS has joined #ruby-lang
sora_h is now known as s0ra_h
adambeynon has quit [Quit: adambeynon]
solars has quit [Quit: WeeChat 0.3.5]
heftig has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
neoesque has quit [Quit: Bye!]
comboy has quit [Ping timeout: 256 seconds]
comboy has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
gnufied1 has joined #ruby-lang
soahccc` is now known as soahccc
gnufied has quit [Ping timeout: 252 seconds]
Z33K|Lux has quit []
<postmodern> andrewvos, yes?
qjb has joined #ruby-lang
sandbags has joined #ruby-lang
<rue> It is
tekin_ has joined #ruby-lang
<shevy> hmm
<shevy> the channel topic here mentions 1.9.3 but ChanServ shows "Ruby 1.9.2 is out". confusing
ryez has quit [Ping timeout: 245 seconds]
brushbox has quit [Quit: Leaving.]
heftig has quit [Quit: leaving]
freefallertam has joined #ruby-lang
<Tasser> shevy, why so?
<shevy> Tasser because the versions mentioned dont match
<Tasser> shevy, 1.9.2 is out, 1.9.3 is in? ;-)
s0ra_h is now known as sora_h
<erikh> eh, cut them some slack
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
asaaki has quit [Quit: Bye!]
<corecode> oh my.
<corecode> ! binds stronger than ===?
<corecode> what's the correct way for this conditional:
<corecode> if !Numeric === my_var
<corecode> or if not Numeric === my_var
<corecode> or some parenthesis?
<erikh> unary operators bind tighter than almost anything
<erikh> well, the symbol versions at least
<postmodern> corecode, i believe this is what "unless" is for
cantonic has joined #ruby-lang
<bnagy> corecode: var.kind_of? Numeric although normally people ducktype
<corecode> yea, the conditional evolved
<erikh> 'not' should work there just fine
<corecode> i've been yelled at for using 'not' and 'and' in conditionals
srbartlett has joined #ruby-lang
<bnagy> wait this is reverse ducktyping :/ witchtyping
Hakon|mbp has joined #ruby-lang
<bnagy> unless is usually more expressive imho
<corecode> yes
<corecode> i agree unless works better here
<corecode> but then the question doesn't work anymore
<postmodern> also little-bits-of-wood-typing
* postmodern will stop with the movie references
<shevy> well
Hakon|mbp has quit [Client Quit]
<shevy> unless is so much longer to type than if !
<shevy> :(
<corecode> yea i also barely get out of the bed in the morning
<bnagy> I'll owe you the two bytes
<bnagy> well...actually no we're square, case you're gonna need () XD
A124 has joined #ruby-lang
<bnagy> corecode: why do you want to test if something is not Numeric, anyway?
<corecode> so that i can quote it
<bnagy> I smell Wrongness
<corecode> you smell wrongly
Carnage\ has joined #ruby-lang
tjadc has joined #ruby-lang
<corecode> you assume; incorrectness ensues
<shevy> if ruby would use as many () as lisp it would be very ugly
<corecode> ugly is subjective
narkoz has joined #ruby-lang
<narkoz> how can I refactor this code: message = users > 0 ? 'ok' : nil
liklok has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
<bnagy> well it's ok as is, although the fact that you want to explicitly set the message to nil smells like dodgy design
<bnagy> I guess you could have @message='ok' if users > 0, since ivars are automatically nil if undefined
Hakon|mbp has joined #ruby-lang
youngin has quit [Read error: Connection reset by peer]
youngin has joined #ruby-lang
zz_chrismcg is now known as chrismcg
liklok has quit [Quit: Leaving]
<Tasser> bnagy, local variables are assigned also
liklok has joined #ruby-lang
<Tasser> foo = 'bar' if false; foo # => nil
<shevy> not sure if assignment is the proper word here
<erikh> foo = users > 0; foo &&= 'ok'
<shevy> or perhaps ... automagic nil assignment :)
<erikh> anyhow your code is fine
<erikh> care about refactoring the big stuff.
adambeynon has joined #ruby-lang
postmodern has quit [Quit: Leaving]
<erikh> foo = users > 0 && 'ok
<erikh> ' would work too
<Tasser> shevy, initialized to nil, that is
narkoz has left #ruby-lang [#ruby-lang]
stamina has joined #ruby-lang
<bnagy> Tasser: huh, I never knew that
chimkan has quit [Quit: chimkan]
<bnagy> I guess it makes sense if I had thought about it.. like 3 if false has to return _something_
Guedes_out is now known as Guedes
<bnagy> ok, now I'm surprised though
<bnagy> users > 0 && foo='ok' # also defines foo
<bnagy> y u no shortcut?
stamina has quit [Read error: Connection reset by peer]
<shevy> the parser tries to be clever!
jarib has quit [Excess Flood]
stamina has joined #ruby-lang
<bnagy> trippy
<bnagy> ok time to cook french food instead of programming
jarib has joined #ruby-lang
fjfish has joined #ruby-lang
<shevy> y u not french programming?
francisfish has quit [Ping timeout: 244 seconds]
Carnage\ has quit [Disconnected by services]
Carnage` has joined #ruby-lang
jondot has quit [Quit: Leaving]
gokul has quit [Quit: Leaving]
concernedcitizen has joined #ruby-lang
<bnagy> french code is usually horrible, french food is great :)
fjfish has quit [Read error: Connection reset by peer]
francisfish has joined #ruby-lang
<youngin> bnagy: so are french door knobs but they require a lot of practice
<youngin> nay
concernedcitizen has quit [Read error: Connection reset by peer]
<youngin> better stick to french kisses
<Tasser> bnagy, it's in freakking french
hemangpatel has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
hemangpatel has quit [Client Quit]
[Tritium] has quit [Ping timeout: 245 seconds]
[Tritium] has joined #ruby-lang
<shevy> hmm french door knobs are to be avoided?
<manveru> you always learn something new in this channel :)
francisfish has joined #ruby-lang
<bnagy> french taps, too, they're sneaky
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
A124 has quit [Read error: Connection reset by peer]
tomzx has joined #ruby-lang
xjiujiu has quit [Read error: Connection reset by peer]
codesturgeon has joined #ruby-lang
<shevy> trench faps?
chrismcg is now known as zz_chrismcg
Arsen7 has quit [Quit: leaving]
heftig has joined #ruby-lang
seanstickle has joined #ruby-lang
<shevy> no wait
<shevy> french traps!!!
<corecode> i always find Hash.map to create a new hash quite awkward
<corecode> is there something else than Hash[*h.map{|k,v| .... [k, v]}]?
<corecode> ah, even .flatten
<seanstickle> Or flat_map
<corecode> so no better way? that's sad.
<seanstickle> Maybe another way, I think I missed your original question -- could you restate?
<shevy> he wonders if there is an alternative to Hash[*h.map{|k,v| .... [k, v]}]
<seanstickle> What is "h" in this case
dejongge has joined #ruby-lang
<shevy> I think it is an already existing hash
<shevy> <corecode> i always find Hash.map to create a new hash quite awkward
<seanstickle> Mapping a hash to produce a hash?
<seanstickle> Madness.
<corecode> yes, who would want that?!
<seanstickle> I don't know. Seriously. I think I must be missing something from your use case.
<rue> Hash[*hash]
<rue> No wait
<rue> No *
workmad3 has joined #ruby-lang
<rue> Hash[hash]
fukushima has quit [Quit: Leaving...]
<corecode> class Hash; def map!; self.each do |k, v| v = yield k, v; self[k] = v; end; self; end; end
<corecode> aha!
<corecode> a={1=>2, 3=>4}; a.dup.map!{|k, v| v * 2}
<corecode> i guess that will do
<corecode> can't change the keys in this case, but oh well
<seanstickle> That's easy though, just Hash#invert
nofxxx has quit [Read error: Connection reset by peer]
<corecode> heh!
tomzx has quit [Ping timeout: 276 seconds]
<corecode> h.merge(h){|k, ov| ov * 2}
tekin_ has quit [Quit: Computer has gone to sleep.]
nofxxx has joined #ruby-lang
mistym has joined #ruby-lang
s0ra_h is now known as sora_h
nevynxxx has quit [Quit: Lost terminal]
mistym has quit [Remote host closed the connection]
asaaki has joined #ruby-lang
mark_locklear has joined #ruby-lang
chimkan has joined #ruby-lang
dalekurt has joined #ruby-lang
codesturgeon has quit [Quit: Bye!]
kaspernj has joined #ruby-lang
tubbo`gone has quit [Ping timeout: 245 seconds]
srbartlett has quit [Remote host closed the connection]
ahs3- has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
zz_chrismcg is now known as chrismcg
ahs3- has joined #ruby-lang
liklok has quit [Ping timeout: 246 seconds]
nevynxxx has joined #ruby-lang
hynkle has joined #ruby-lang
tomb_ has quit [Quit: Computer has gone to sleep.]
JoL1hAHN is now known as nrk
bglusman has joined #ruby-lang
kyrylo has quit [Ping timeout: 276 seconds]
dalekurt has quit [Read error: Connection reset by peer]
dalekurt has joined #ruby-lang
kyrylo has joined #ruby-lang
vesan_ has joined #ruby-lang
vesan has quit [Ping timeout: 248 seconds]
dv310p3r has joined #ruby-lang
dv310p3r has quit [Read error: Connection reset by peer]
bojicas has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 246 seconds]
mistym has quit [Remote host closed the connection]
rippa has quit [Quit: derp herp]
chrismcg is now known as zz_chrismcg
rmascarenhas has joined #ruby-lang
TvL2386 has quit [Remote host closed the connection]
tekin has joined #ruby-lang
bojicas has quit [Remote host closed the connection]
dabradley has joined #ruby-lang
dv310p3r has joined #ruby-lang
frem has joined #ruby-lang
frem has quit [Client Quit]
frem has joined #ruby-lang
diegoviola has joined #ruby-lang
dv310p3r has quit [Client Quit]
carloslopes has joined #ruby-lang
dv310p3r has joined #ruby-lang
slyphon_away has joined #ruby-lang
slyphon_away is now known as slyphon
kyrylo has quit [Ping timeout: 246 seconds]
cschneid has joined #ruby-lang
chendo_ has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
nofxxxx has joined #ruby-lang
nofxxx has quit [Ping timeout: 244 seconds]
tRAS has quit [Quit: Mother, did it need to be so high?]
gsav has joined #ruby-lang
mistym has joined #ruby-lang
dfr|mac has joined #ruby-lang
kyrylo has joined #ruby-lang
kings has joined #ruby-lang
kings is now known as Guest53397
sspiff has joined #ruby-lang
sspiff has joined #ruby-lang
outoftime has joined #ruby-lang
Guest53397 has quit [Client Quit]
kaspernj has quit [Quit: Leaving]
imperator has joined #ruby-lang
outoftime has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
freefallertam has quit [Quit: Leaving]
freefallertam has joined #ruby-lang
freefallertam is now known as matalangilbert
kaspernj has joined #ruby-lang
akahn has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
sora_h is now known as s0ra_h
outoftime has joined #ruby-lang
slyphon has joined #ruby-lang
thone_ has joined #ruby-lang
perryh is now known as perryh_away
s0ra_h is now known as sora_h
slyphon has quit [Quit: WeeChat 0.3.6]
thone has quit [Read error: Operation timed out]
ruskie has quit [Excess Flood]
chimkan has quit [Ping timeout: 252 seconds]
vmoravec has quit [Remote host closed the connection]
nofxxx has joined #ruby-lang
krohrbaugh has joined #ruby-lang
nofxxxx has quit [Ping timeout: 252 seconds]
joast has quit [Quit: Leaving.]
carloslopes has quit [Ping timeout: 265 seconds]
asaaki has quit [Quit: Bye!]
zz_chrismcg is now known as chrismcg
andrewhl has quit [Quit: andrewhl]
dalekurt has quit [Quit: Zzz...]
sora_h is now known as s0ra_h
dfr|mac has quit [Remote host closed the connection]
dalekurt has joined #ruby-lang
kiddorails has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
bojicas has joined #ruby-lang
s0ra_h is now known as sora_h
ruskie has joined #ruby-lang
soahccc is now known as soahccc`
tubbo has joined #ruby-lang
sora_h is now known as s0ra_h
tubbo is now known as Guest2564
deryl has joined #ruby-lang
s0ra_h is now known as sora_h
chrismcg is now known as zz_chrismcg
tmi_ has quit [Quit: .]
dalekurt has quit [Read error: Connection reset by peer]
savage- has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
gnufied1 has quit [Read error: Connection reset by peer]
cowok has joined #ruby-lang
cowok has left #ruby-lang [#ruby-lang]
joast has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
slyphon has joined #ruby-lang
krohrbaugh has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
rippa has joined #ruby-lang
|Vargas| has quit [Quit: ...]
Guest2564 has quit [Quit: leaving]
tubbo`work has joined #ruby-lang
tubbo`work has quit [Client Quit]
tubbo has joined #ruby-lang
qjb has quit [Quit: qjb]
jtoy has joined #ruby-lang
cesario has quit [Read error: Connection reset by peer]
mrb_bk has quit [Read error: Connection reset by peer]
mccraig has quit [Read error: Connection reset by peer]
beawesomeinstead has quit [Remote host closed the connection]
cldwalker has quit [Read error: Connection reset by peer]
anildigital_work has quit [Read error: Connection reset by peer]
denysonique has quit [Write error: Connection reset by peer]
pkondzior has quit [Remote host closed the connection]
tubbo`cloud has quit [Remote host closed the connection]
pvh has quit [Read error: Connection reset by peer]
akahn has quit [Read error: Connection reset by peer]
wycats has quit [Write error: Connection reset by peer]
agib has quit [Read error: Connection reset by peer]
nashby_ has quit [Read error: Connection reset by peer]
abuiles has quit [Write error: Connection reset by peer]
timbleck has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
asahi has joined #ruby-lang
gearaholic has joined #ruby-lang
mccraig has joined #ruby-lang
pkondzior has joined #ruby-lang
agib has joined #ruby-lang
<asahi> I have a hash that looks like { 'a1' => integer, 'a2' => integer… } I'd like to find the 30 elements with the largest integers. can someone tell me how to do this?
<seanstickle> asahi: look into #select
Austin__ has joined #ruby-lang
<asahi> seanstickle: that's in enumerable?
<seanstickle> Yah
<mortice> #select? Really? Wouldn't #sort_by followed by #[] with a range be more appropriate here?
<mortice> I don't see how you can use select without accessing the hash again inside the block
<mortice> unless I'm being a bear of little brain
<singpolyma> mortice: using sort is a bit inefficient for this task
<singpolyma> though on a small dataset it won't metter
<singpolyma> s/metter/matter
<seanstickle> mortice: no, it wouldn't be
<mortice> can you hint at how select would work? I can't work it out
<singpolyma> I don't think you can do it with select directly. I would use inject
<asahi> I can't figure it out with select either
anildigital_work has joined #ruby-lang
<seanstickle> Ha, I read the question wron
<seanstickle> wrong
<seanstickle> My fault, sorry!
<mortice> I don't really see how inject would be any more efficient than a sort, assuming Enumerable#sort has an efficient implementation
<mortice> actually I do, sorry
pvh has joined #ruby-lang
tomb_ has joined #ruby-lang
mrb_bk has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
<singpolyma> sort is O(n log n). inject you can do it in O(n*m) where m is 30, so sort is fine if log n < 30
<mortice> yes exactly
beawesomeinstead has joined #ruby-lang
<seanstickle> Hash[foo.sort_by{|k,v| v}[0...30]]
<singpolyma> which is why I said it's probably fine for a small dataset
<mortice> and actually I think you can do it in O(n) if you hold a max variable which is initialized to 0 outside the block to avoid calling max on the memo?
<seanstickle> Ah, good ol' Big O masturbation
<mortice> :D
<seanstickle> It's Ruby for god's sake
<asahi> seanstickle: thanks. I'll try that
<imperator> Hash[h.sort.reverse[0,30]]
<mortice> yes, I'd go for sort_by followed by the subset every time until I knew the inefficiency was causing a problem
<mortice> but it's fun to think about the most efficient way sometimes
<seanstickle> Big O is upper bound, it doesn't necessarily tell you which implementation is more efficient
francisfish has joined #ruby-lang
<seanstickle> Tilde notation forever!
<singpolyma> well, really I was using O as a hack to mean theta
<singpolyma> but sure
cldwalker has joined #ruby-lang
abuiles has joined #ruby-lang
chimkan_ has joined #ruby-lang
wycats has joined #ruby-lang
malesca has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
timbleck has joined #ruby-lang
fgomez has quit [Remote host closed the connection]
gouthamvel has joined #ruby-lang
Austin__1 has joined #ruby-lang
Austin__1 has quit [Remote host closed the connection]
Austin__1 has joined #ruby-lang
Austin__ has quit [Ping timeout: 252 seconds]
Austin__1 has quit [Client Quit]
Austin__ has joined #ruby-lang
<malesca> Can I override a class method with a module somehow, calling the original method with "super"? Without alias/alias_method. I know you can do it for instances with just an "extend", but that does not work the same way with a class. Short example: https://gist.github.com/18aef598135f0fdbd2e9
tubbo`cloud has joined #ruby-lang
peppyheppy has joined #ruby-lang
macmartine has joined #ruby-lang
<Mon_Ouie> malesca: No, included modules are like superclasses
gearaholic has quit [Remote host closed the connection]
<Mon_Ouie> i.e. they are looked up for method after the class itself
<Mon_Ouie> (same with extended modules and singleton classes)
Carnage` has quit [Read error: Connection reset by peer]
akamike has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
<malesca> Mon_Ouie: Right, but with an instance, you can get the module in before the original method defined in the class, using extend. So there's no corresponding way to do it for a class (not instance) method?
kain has joined #ruby-lang
<Mon_Ouie> It behaves the same way with an instance
<Mon_Ouie> It's just that in that case you defined your method on the object's class as opposed to its singleton class
nofxxx has quit [Ping timeout: 240 seconds]
<Mon_Ouie> The latter being what you are doing now, and the singleton class is the very first place Ruby looks method up into.
fgomez has joined #ruby-lang
nashby_ has joined #ruby-lang
<cout> imperator: I got my service installed!
<cout> (but not running yet)
<cout> imperator: is it possible to write to the event log?
kish has quit [Ping timeout: 252 seconds]
sora_h is now known as s0ra_h
<malesca> Mon_Ouie: Thank you. Not sure I follow, but I'll read what you said a few more times :)
avdi has joined #ruby-lang
s0ra_h is now known as sora_h
tekin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<cout> imperator: also how to I change the parameters for a service once it's installed? I tried uninstall/reinstall, but I get "The specified service has been marked for deletion"
<cout> now I can't do anything with it
<erikh> herp
<deryl> myobj = MyObj.new def myobj.newmethd end <- singleton (defined on myobj directly)
<erikh> class << myobj too
<deryl> malesca, thats what he means about singleton class. (eigen class)
<deryl> erikh, yeah i just wanted the more expressive so he *knew* what was being referenced if he didn't know the << syntax (i just learned itg myself)
<erikh> ah
kish has joined #ruby-lang
<cout> oh, I have to close the 'services' window
kish has quit [Read error: Connection reset by peer]
<cout> now I get "the service did not respond to the start or control request in a timely fashion" :(
rdeshpande has joined #ruby-lang
<malesca> deryl: Thanks. I know about the singleton class, but I apparently don't know enough about the lookup chain for a class method vs an instance method :)
akahn has joined #ruby-lang
<erikh> cout: what are you using to configure the service?
<erikh> I used a tool raggi wrote the last time I did this called srvany_helper I think
cesario has joined #ruby-lang
<erikh> it's been a few years though.
<malesca> Mon_Ouie: So I read it a few more times and I'm afraid I don't follow you. But do I have it right that you looked at the linked code example and are saying that no, it's not possible in Ruby to override a class method and be able to call the original method with super?
nofxxx has joined #ruby-lang
gouthamvel has quit [Ping timeout: 276 seconds]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
denysonique has joined #ruby-lang
<outoftime> I don't suppose anyone is aware of a library that can solve quadratic programming optimization problems in ruby?
Z33K|Lux has joined #ruby-lang
kish has joined #ruby-lang
arooni-mobile has joined #ruby-lang
carloslopes has joined #ruby-lang
Tref has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
Axsuul has quit [Read error: Connection reset by peer]
kish has joined #ruby-lang
malesca has quit [Remote host closed the connection]
jarib has quit [Excess Flood]
kish has quit [Read error: Connection reset by peer]
gouthamvel has joined #ruby-lang
gix has quit [Quit: Client exiting]
gix has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
jarib has joined #ruby-lang
nevynxxx has quit [Quit: leaving]
gregf has quit [Quit: WeeChat 0.3.7]
dalekurt_ has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
jtoy has quit [Quit: jtoy]
nofxxxx has joined #ruby-lang
FC34 has joined #ruby-lang
<FC34> hi there
nofxxx has quit [Ping timeout: 252 seconds]
<FC34> i'm beginer
<FC34> i installed rvm
kish has joined #ruby-lang
<FC34> i have the following info : http://pastebin.fr/23116
<FC34> as you can see the gem binary is not defined
<FC34> only the rake binary is defined
kiddorails has quit [Read error: Operation timed out]
<oddmunds> no ruby either
kish has quit [Read error: Connection reset by peer]
<deryl> because he has system selected
rushed has quit [Quit: rushed]
<deryl> rvm install x.x.x-pxx where x.x.x-pxx is a specific ruby and patchlevel, then rvm use x.x.x-pxxx && rvm info
<deryl> rvm.io for more instructions
tjadc has quit [Ping timeout: 252 seconds]
<oddmunds> or #rvm if you have more problems
<deryl> be SURE you read and follow rvm requirements and rvm notes
savage- has joined #ruby-lang
<deryl> exactly. I'll deal with you in there, but if you follow what I just told you you should not have more issues (other than self-education)
apeiros_ has joined #ruby-lang
kish has joined #ruby-lang
cek has joined #ruby-lang
cek has left #ruby-lang [#ruby-lang]
kish has quit [Read error: Connection reset by peer]
butchanton has joined #ruby-lang
Tref has quit [Quit: Tref]
jtoy has joined #ruby-lang
kish has joined #ruby-lang
sora_h is now known as s0ra_h
kish has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
matalangilbert has quit [Ping timeout: 245 seconds]
kiddorails has joined #ruby-lang
kish has joined #ruby-lang
ViperMaul has quit [Ping timeout: 245 seconds]
kish has quit [Read error: Connection reset by peer]
ViperMaul has joined #ruby-lang
Rizzle has quit [Ping timeout: 265 seconds]
kish has joined #ruby-lang
nofxxx has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
nofxxxx has quit [Ping timeout: 245 seconds]
nofxxxx has joined #ruby-lang
LarryLv has quit [Remote host closed the connection]
nofxxx has quit [Ping timeout: 245 seconds]
kish has joined #ruby-lang
mark_locklear has quit [Quit: Leaving]
diegoviola has quit [Ping timeout: 246 seconds]
kish has quit [Read error: Connection reset by peer]
butchanton has quit [Quit: Leaving.]
<slyphon> hey, anyone use Guard with growl 1.2?
<shevy> no, but I growl w hen I guard
* slyphon chuckles
<carloslopes> shevy: lol
<erikh> shevy: you're such a dork
<slyphon> it's more effective that way
fayimora has joined #ruby-lang
<shevy> well ok... there are so many odd projects... "god" ... "unicorn"... growl just seems to fit that trend :)
<slyphon> don't growl at god
<slyphon> he'll turn you into a newt
cdt has quit [Quit: Ex-Chat]
kish has joined #ruby-lang
butchanton has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
butchanton has quit [Client Quit]
slyphon is now known as slyphon_away
bglusman_ has joined #ruby-lang
bglusman has quit [Read error: Connection reset by peer]
<deryl> he has to exist first :)
<slyphon_away> she
<deryl> the entity in question has to exist first :-)
bfreeman has joined #ruby-lang
kish has joined #ruby-lang
<shevy> deryl to burn you at the stake now for this!!!
<shevy> I should have been cardinal in medieval times, it fits my nature
<shevy> :>
<deryl> Science is proven real. God has not been :)
kish has quit [Read error: Connection reset by peer]
<deryl> I fall in line with Newton and Galileo
<shevy> BURN THEM!!!
<asahi> not sure if this is the right place to be asking this, but when I do ps aux | grep unicorn, I can see 1 master and 2 worker unicorn processes. Then when I do htop, it seems like these processes are duplicated 2-3 times. can someone tell me why this is?
<apeiros_> the mighty meatball will gobble you all for your insolence!
<erikh> asahi: 1.9?
<apeiros_> asahi: spare processes?
<erikh> nah, probably posix threads
<erikh> freebsd does that by default in ps and friends
<asahi> ruby 1.9.3
<erikh> asahi: I'd guess that's it, but I'm not certain.
<apeiros_> ah
kish has joined #ruby-lang
<asahi> erikh: thanks. will look that up ;-)
kish has quit [Read error: Connection reset by peer]
<deryl> ahh the joys of forgetting to reinstall libyaml and headers then trying to use an existing rvm installed ruby doh!
<deryl> rvm reinstall 1.9.3-p194 --patch falcon && rvm use default && pry
<deryl> crap, wrong terminal
<shevy> yeah, show us all your secrets!
<deryl> cat shevy > /dev/null # :-)
kyrylo has quit [Ping timeout: 276 seconds]
butchanton has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
andrewhl has quit [Quit: andrewhl]
matalangilbert has joined #ruby-lang
mrsolo has joined #ruby-lang
zz_chrismcg is now known as chrismcg
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
chrismcg is now known as zz_chrismcg
jtoy has quit [Quit: jtoy]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
<bnagy> deryl: not that I'm not an atheist, but if you think 'science is proven real' then you don't understand science :P
<imperator> rvm, you so silly
<bnagy> imperator: rbenv! made my whole month
<bnagy> it's almost like someone who knows how unix works had a try at the problem
<imperator> lol
<apeiros_> but… imperator is a windows user…
<imperator> shockingly, i'm happy just setting %PATH% when i really need to test a different version
<imperator> which really means....2 versions
<imperator> and more and more just....1 version
kish has joined #ruby-lang
ridders24 has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
<imperator> and jruby, but it has its own path and executables so....no need for path mangling there
sockmonk has joined #ruby-lang
toretore has quit [Read error: Connection reset by peer]
toretore has joined #ruby-lang
<apeiros_> deryl: falcon has been ported to p194?
<erikh> imperator does it all
kish has joined #ruby-lang
<erikh> he's the chuck norris of ruby
<erikh> or kevin bacon, you pick.
<apeiros_> by the facial hair I thought headius was…
<erikh> heh.
<bnagy> :< I want more choices!
kish has quit [Read error: Connection reset by peer]
<apeiros_> o0
<deryl> apeiros_, yes
futurechimp has quit [Quit: This computer has gone to sleep]
tommyvyo has quit [Read error: Connection reset by peer]
bglusman_ has quit [Read error: Connection reset by peer]
bglusman has joined #ruby-lang
Rizzle has joined #ruby-lang
kish has joined #ruby-lang
L0rdShrek has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby-lang
zinjacoder_ has joined #ruby-lang
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
Jay_Levitt has joined #ruby-lang
tommyvyo has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
kiddorails has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby-lang
mark_locklear has joined #ruby-lang
kish has joined #ruby-lang
jtoy has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
_Setsuna_ has left #ruby-lang ["Quitte"]
slyphon_away is now known as slyphon
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
arooni-mobile has quit [Ping timeout: 245 seconds]
kish has joined #ruby-lang
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
kish has quit [Read error: Connection reset by peer]
Defusal has joined #ruby-lang
Defusal has quit [Changing host]
Defusal has joined #ruby-lang
ilyam has quit [Ping timeout: 250 seconds]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
stamina has quit [Quit: Lost terminal]
znz_jp has quit [Quit: kill -QUIT $$]
znz_jp has joined #ruby-lang
crudson has joined #ruby-lang
solars has joined #ruby-lang
kish has joined #ruby-lang
ilyam has joined #ruby-lang
crudson has quit [Remote host closed the connection]
dejongge has quit [Ping timeout: 244 seconds]
kish has quit [Read error: Connection reset by peer]
stepnem has quit [Ping timeout: 246 seconds]
stepnem has joined #ruby-lang
crudson has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
MrPunkin has joined #ruby-lang
kish has joined #ruby-lang
fayimora has quit [Ping timeout: 276 seconds]
kish has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
seanstickle has joined #ruby-lang
kish has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
seanstickle has quit [Client Quit]
seanstickle has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
workmad3 has joined #ruby-lang
zinjacoder_ has quit [Quit: Peace!]
wmoxam has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
gnufied has quit [Quit: Leaving.]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 252 seconds]
<cout> erikh: I'm using win32-service
<cout> or win32-services, whichever it is
<cout> how do I detect programmatically whether I am on windows?
workmad3 has joined #ruby-lang
kish has joined #ruby-lang
<seanstickle> RUBY_PLATFORM =~ /mswin32/
kish has quit [Read error: Connection reset by peer]
<seanstickle> Or Kernel.os.sucks?
<cout> true
<cout> (but for all os)
rdeshpande has quit [Quit: leaving]
adambeynon has quit [Quit: adambeynon]
zmack has quit [Remote host closed the connection]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
bglusman has quit [Read error: Connection reset by peer]
bglusman_ has joined #ruby-lang
kish has joined #ruby-lang
<cout> I'm so close to getting this working
kish has quit [Read error: Connection reset by peer]
achiu has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
<imperator> File::ALT_SEPARATOR
<cout> yeah, still getting the error of "the service did not respond to the start or control request in a timely fashion"
<cout> but I get it right away
<imperator> make sure all of your require statements are inside your begin/rescue block
<cout> I can run the daemon from the commandline, but I never see it in the taskmgr
<cout> I get a different error when it raises an exception, I think
<cout> but I can't reproduce that
<cout> seems like I was getting a different error message at one point
Jake232 has joined #ruby-lang
<imperator> cout, the demo daemon worked alright though, right?
kish has joined #ruby-lang
<cout> demo works fine
<cout> I put everything inside a begin/rescue and it writes out a 0 byte log file :(
kish has quit [Read error: Connection reset by peer]
<imperator> the demo daemon does?
<imperator> or yours?
<cout> oh wait
<cout> sorry, wrong file
<cout> it's not getting an exception
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
<cout> ah, found a typo
<imperator> that'll do it
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
<erikh> seanstickle, cout: /mswin|mingw/
<imperator> erikh, File::ALT_SEPARATOR
<erikh> you can also use Gem.platform IIRC
<seanstickle> erikh: fair point
<cout> fixed the typo, same problem
<cout> erikh: undefined method
bglusman_ has quit [Read error: Connection reset by peer]
naz has quit [Read error: Connection reset by peer]
bglusman has joined #ruby-lang
naz has joined #ruby-lang
<erikh> phooey.
<erikh> I can't remember, but Gem certainly holds platform info.
<erikh> (and it's already sussed out for you)
ilyam has quit [Remote host closed the connection]
kish has joined #ruby-lang
ilyam has joined #ruby-lang
<cout> imperator: I'm doing this: daemon = MyDaemon.new(ARGV); daemon.mainloop
<cout> any reason why that shouldn't work?
kish has quit [Read error: Connection reset by peer]
ilyam has quit [Client Quit]
<erikh> cout: I believe you need to fully daemonize for srvany.exe
<erikh> e.g., null out stdio
<cout> erikh: the demo doesn't do that
<cout> it looks like my daemon is never actually getting run at all
<erikh> maybe I cargo culted that.
<cout> I append a line to a file at the beginning of the script before I even require anything and it doesn't show up in the file
kish has joined #ruby-lang
Cykey has joined #ruby-lang
diegoviola has quit [Ping timeout: 248 seconds]
kish has quit [Read error: Connection reset by peer]
<cout> if I just run the dameon from the cmdline it does append to the file and it calls service_init but never gets to service_main
tenderlove has quit [Remote host closed the connection]
<imperator> cout, got something you can pastie?
kish has joined #ruby-lang
<imperator> one thing you can do is at the top of your daemon code, do something like; fh = File.open("c:/temp_log.txt", "w"); $stderr.reopen(fh)
kish has quit [Read error: Connection reset by peer]
thrcka has joined #ruby-lang
kyrylo has quit [Ping timeout: 276 seconds]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
zmack has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
asaaki has joined #ruby-lang
dr_bob has joined #ruby-lang
elux has joined #ruby-lang
ridders24 has quit [Ping timeout: 245 seconds]
bryancp has joined #ruby-lang
havenn has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
diegoviola has joined #ruby-lang
benanne has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
ridders24 has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
countdigi has quit [Remote host closed the connection]
countdigi has joined #ruby-lang
anonymous has joined #ruby-lang
anonymous is now known as Guest29937
ridders24 has quit [Ping timeout: 245 seconds]
Guest29937 has quit [Client Quit]
kish has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
crudson has left #ruby-lang [#ruby-lang]
crudson has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
asahi has left #ruby-lang [#ruby-lang]
duper has joined #ruby-lang
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
bryanl has quit [Ping timeout: 260 seconds]
kish has joined #ruby-lang
kish has quit [Read error: Connection reset by peer]
Hakon|mbp has quit [Quit: Leaving...]
kaspernj has quit [Ping timeout: 246 seconds]
harukomoto has joined #ruby-lang
ridders24 has joined #ruby-lang
deryl has quit [Quit: doing system maintenance. back in 20m or so]
workmad3 has quit [Ping timeout: 260 seconds]
tubbo has quit [Ping timeout: 240 seconds]
tubbo has joined #ruby-lang
bryanl has joined #ruby-lang
brianpWins has joined #ruby-lang
tubbo has quit [Ping timeout: 240 seconds]
rippa has quit [Ping timeout: 250 seconds]
bryanl has quit [Ping timeout: 252 seconds]
dalekurt_ has quit [Read error: Connection reset by peer]
dalekurt has joined #ruby-lang
<rue> Um, what’s the 3D equivalent of an angle?
<rue> Just a cone, or?
<rue> Like in teh language of englishland
<erikh> vertex?
<erikh> maybe I am misunderstanding the wikipedo
<yxhuvud> uh, isn't an angle just a relationship between two entities?
butchanton has quit [Read error: Connection reset by peer]
butchanton1 has joined #ruby-lang
bryanl has joined #ruby-lang
<rue> Hm, what I mean is if I look around me and say that someone search between 340° and 355°, what’s the 3D equivalent, if I let’s say want to make that a cone like you’d imagine that you’d turn the angle of that sector around its axis
<rue> Possibly to an infinite distance if it matters
<MrPunkin> rue: it would be a face in 3D terms… but there is no designation of wether it has a curve or not to it really I don't believe
<MrPunkin> I went to school for 3D animation and can't remember any specific terminology for what you are referring to.
<rue> Maybe a more specific scenario helps…I’m thinking a situation for space combat, where an object exits a certain point into a general direction, but at any number of possible angles, so the actual end position is basically somewhere in an area described by a cone whose point is at the origin
asahi has joined #ruby-lang
* imperator thinks of Triplanetary
<asahi> can someone tell me what retry unless count++ > 10 means in a rescue block? specifically the count++ part
tubbo has joined #ruby-lang
tubbo has quit [Client Quit]
<imperator> rue, well, in board games we might call that a firing arc
tubbo has joined #ruby-lang
jacobwg has joined #ruby-lang
<rue> asahi: There’s no ++, so it’d probably be retry unless (count += 1) > 10 ?\
kain has quit [Quit: Sto andando via]
<rue> imperator: Yeah, but isn’t that still 2D, sort of?
sspiff has quit [Ping timeout: 246 seconds]
<rue> Maybe I’ll just call it a cone…
<asahi> rue: ah okay. thanks
krz has joined #ruby-lang
<rue> asahi: Does it make more sense that way?
dr_bob has quit [Read error: Connection reset by peer]
RickHull has joined #ruby-lang
<heftig> rue: to define a cone with the tip at the origin, you'd need a vector and an angle
<asahi> rue: yes it does. just that this answer on SO looked very convincing. http://stackoverflow.com/a/9204938/1060714
<imperator> rue, i think the term is still used in 3d combat; so an enemy ship is "in arc" of a weapon, if the weapon can fire within that cone you describe
<imperator> but a name for the cone itself? dunno
<rue> Right, the arc would be where the object *actually* went
<rue> Or the individual possibilities, I guess
<imperator> i'll bet the birds of prey folks would know
bryanl has quit [Ping timeout: 248 seconds]
<imperator> (hyper realistic modern jet combat game)
<shevy> rue knows too, he served in the finnish snow army
tenderlove has joined #ruby-lang
<heftig> imperator: so it's "too" realistic?
mark_locklear has quit [Remote host closed the connection]
<rue> More fighter than fighter?
<imperator> heftig, in my opinion, yes
<imperator> rue, more work than fun
<rue> Hm, no, that sounds like reality
<imperator> hey, by all means, go get yourself a copy of Birds of Prey and have a ball :)
<imperator> small group of dedicated players
<heftig> rue: hmm, i think it's just called "cone of fire"
<imperator> only thing i'm finding online is cone, arc, cone/arc or just the understanding that the cone is the arc, in 3d context
<rue> Yeah, I think cone is sufficiently descriptive in the context
<rue> Or maybe exit_cone or something
<rue> Thanks!
<imperator> why, you making a 3d space combat game?
jacobwg has quit [Ping timeout: 245 seconds]
<imperator> met the designers last year, btw; tony works on simulators for the military i think
<imperator> rue, just so you know, it's been done!
<rue> Heh
<rue> I’m just twiddling with something for fun
nofxxxx has quit [Ping timeout: 244 seconds]
<imperator> Attack Vector: Tactical, Saganami Island Tactical Simulator, etc
bryanl has joined #ruby-lang
krohrbaugh has joined #ruby-lang
hachiya has quit [Ping timeout: 252 seconds]
hachiya has joined #ruby-lang
tubbo has quit [Remote host closed the connection]
tubbo has joined #ruby-lang
<imperator> this reminds me, i should go see battleship, because....i'm bored
<rking> NO.
<rking> There is no greater depth of boredom than that.
<rking> Although I do want to find out if they do any row:column references.
<imperator> i've heard it's actually not bad
<imperator> if you're in the mood for, you know, 'splosions
* rking would scrutinize the source of that.
<rking> Right, it might have that.
<rue> imperator: Did you see Avengers?
<imperator> no
bryanl has quit [Ping timeout: 276 seconds]
<rue> SEE THAT INSTEAD
<rue> TWICE
<imperator> can't get motivated to see it
<imperator> looks like fanboy material to me
<rue> Consider yourself motivated. It’s 8000% better than Battleship.
<imperator> but wait, you haven't seen battleship!
<rue> How do you know?
tubbo has quit [Client Quit]
<rue> By the by, you know what the radius of a cone with a 2° interior angle and 4,9 billion kilometers length is according to Wolfram?
<rue> r
<imperator> i actually saw the first 15 minutes of avengers on some bootleg copy that made it onto youtube and it looked goofy as hell
bryanl has joined #ruby-lang
tubbo has joined #ruby-lang
<rue> Seriously, it’s good though
<imperator> oh, right, the god loki comes through a tesseract in space or some shit....and then....'splosions!
jacobwg has joined #ruby-lang
<rue> Yes, s good
<rue> But seriously, the answer is ‘r’
<imperator> dunno, just seemed like transformers, but with comic book heroes
ridders24 has quit [Quit: Leaving]
<rue> That’s really fucking helpful
<erikh> we like explosions, that make you feel good
<imperator> r
cored has joined #ruby-lang
<imperator> rue, maybe it's more fun if you say it in a piratey way, like "ARRRRR!!!!"
<flopper> too bad hollywood can't come up with anything other than remakes
RickHull has quit [Changing host]
RickHull has joined #ruby-lang
<erikh> no devo fans in here
<rue> I mean, I could calculate it myself but why the fuck am I using Wolfram then
<erikh> what's wrong with all of you
petercooper has joined #ruby-lang
<RickHull> the radius is half the diameter
<flopper> erikh: we're all too old or too yound ;)
<flopper> *young
<erikh> no we're not
<erikh> I know better
wmoxam has quit [Quit: leaving]
publicvoid_ has quit [Remote host closed the connection]
nofxxxx has joined #ruby-lang
<imperator> erikh, i'm through being cool
<erikh> damn straight
liklok has joined #ruby-lang
<rue> RickHull: Oh! Awesome
bryanl has quit [Ping timeout: 276 seconds]
yxhuvud has quit [Ping timeout: 248 seconds]
hynkle has quit [Quit: hynkle]
Facefox has quit [Ping timeout: 260 seconds]
<imperator> erikh, i actually don't know -that- much of their work; a handful of songs
<imperator> good song though
<RickHull> should be able to take a 2D slice of your cone to get a triangle, or 2 right angled triangles back to back
<erikh> ah I have two friends that are.... very big fans
<erikh> so I've been exposed to a lot of it
<RickHull> 2deg cone means 1/89/90 on the triangle
<erikh> explosions is pretty fun, especially loudly
publicvoid has joined #ruby-lang
<imperator> i have their greatest hits, plus the stuff on the heavy metal soundtrack
<imperator> which i'm just realizing didn't seem to survive the transfer to snow leopard
<erikh> ouch.
bryanl has joined #ruby-lang
<zzak> i suck at regex: assert_equal /<div class=\"highlight\"><pre>*orwhatever<\/pre><\/div>", body
steez has quit [Ping timeout: 265 seconds]
<rue> zzak: You suck at not using Nokogiri
arooni-mobile has joined #ruby-lang
<zzak> show me the light
steez has joined #ruby-lang
flip_digits has joined #ruby-lang
steez is now known as Guest63362
kyrylo_ has joined #ruby-lang
kyrylo_ has quit [Changing host]
kyrylo_ has joined #ruby-lang
<zzak> doc.search("//div[@class = 'highlight']/pre") ?
zmack has quit [Remote host closed the connection]
flip_digits has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
DEac-_ has left #ruby-lang [#ruby-lang]
DEac- has joined #ruby-lang
<zzak> hah
jacobwg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ConstantineXVI has joined #ruby-lang
<imperator> erikh, found it, ripping it now :)
srbartlett has joined #ruby-lang
zmack has joined #ruby-lang
rmascarenhas has quit [Quit: leaving]
<zzak> refute_empty Nokogiri::HTML(body).search("//div[@class = 'highlight']/pre")
<zzak> rue: what do i win?
postmodern has joined #ruby-lang
zmack has quit [Read error: No route to host]
<rue> You have won 2 levels of Nokogiri-fu
zmack_ has joined #ruby-lang
<rue> Wear them with pride!
<rue> Sorry, I was trying to figure out how to get Wolfram to actually compute the fucking r
<zzak> np
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
<imperator> oh, lord, i am so tired. how long can this go on?
<apeiros_> it can stop immediately. just go to bed and get some sleep…
ConstantineXVI has quit [Remote host closed the connection]
zmack_ has quit [Remote host closed the connection]
<shevy> no, stay up!
<shevy> put some tiny sharp needles into your eyelids to keep you awake
deryldoucette has joined #ruby-lang
<imperator> erikh, explosions isn't on the greatest hits album :(
<erikh> no
<erikh> sec
<erikh> it's not exactly a greatest hit, heh
elux has quit [Quit: Bye!]
<imperator> i think it's better than some of the other songs on here
bryanl has quit [Ping timeout: 276 seconds]
hackeron has quit [Ping timeout: 260 seconds]
<rue> imperator: THE FINAL COUNTDOWN
<imperator> rue, good movie
hackeron has joined #ruby-lang
jbsan has joined #ruby-lang
<imperator> oh, THAT final countdown
<rue> The original version by Spongebob Squarepants, yeah.
<imperator> oh, i was thinking of the movie where the USS Nimitz goes back in time to December, 1941
<rue> I just saw that, actually
Austin__ has quit [Quit: Leaving.]
TheDracle has joined #ruby-lang
liklok has quit [Read error: Connection reset by peer]
hackeron has quit [Read error: Operation timed out]
bubonicpestilenc has joined #ruby-lang
<bubonicpestilenc> hey all
<bubonicpestilenc> guys
<bubonicpestilenc> i really need help )
<bubonicpestilenc> and the problem
<bubonicpestilenc> 2GB ram usage of ruby, while parsing & spawning objects @ 100MB file -.-
<bubonicpestilenc> 7kk lines in text file
<bubonicpestilenc> and i can't find where i "leaking" memory -.-
<zzak> yay release
<shevy> bubonicpestilenc sounds like a lot of work for ruby
<shevy> the file is 100MB in size?
<lianj> .each_line?
kaspernj has joined #ruby-lang
<bubonicpestilenc> i'm doing: data = File.read(FILE); data.each_line do |line| ... end
<bubonicpestilenc> this code mostly do "135mb => 2gb"
bryanl has joined #ruby-lang
<bubonicpestilenc> current_item is a hash, that rebuilt on each line with "[WORLDITEM ...]"
gregf has joined #ruby-lang
<bubonicpestilenc> no regexp ;)
<bubonicpestilenc> and when [WORLDITEM] found, current `current_item` saved to array `items`
<lianj> the whole script?
<bubonicpestilenc> 5s
cored_ has joined #ruby-lang
Criztian has joined #ruby-lang
RickHull has left #ruby-lang [#ruby-lang]
Boohbah has joined #ruby-lang
<bubonicpestilenc> interested thing
<bubonicpestilenc> after loop, i'm doing `data = nil; GC.start`
<bubonicpestilenc> and memory gone to 1.33GB
mssola has quit [Quit: Konversation terminated!]
<bubonicpestilenc> e.g. -700mb
kish has joined #ruby-lang
carloslopes has quit [Quit: Leaving]
<bubonicpestilenc> but, isn't too much for have 1x example of data?
kish has quit [Read error: Connection reset by peer]
harukomoto has quit [Ping timeout: 256 seconds]
kish has joined #ruby-lang
mistym has quit [Remote host closed the connection]
kish has quit [Read error: Connection reset by peer]
<lianj> bubonicpestilenc: data = File.read(FILE) read the whole file
<bubonicpestilenc> yes
slyphon has quit [Quit: WeeChat 0.3.6]
<bubonicpestilenc> used this, because found article where said "IO.eachline" is very slow
<bubonicpestilenc> Don’t read files line by line (and definitely not byte by byte), gobble it all up in memory with File.read and use split to split into lines using String#split.
<bubonicpestilenc> and i'm agree to have +135mb, but problem, after this +135, i'm getting +1.865GB :D
Facefox has joined #ruby-lang
peppyheppy_ has joined #ruby-lang
<Boohbah> how can i do this better? http://pastie.org/3952388
<lianj> yes, but you must do f=File.open; f.each_line. and not File.read and then each_line on that string object
diegoviola has quit [Ping timeout: 244 seconds]
<bubonicpestilenc> this is ridiculous, but u're right
<bubonicpestilenc> went to just 600mb
peppyheppy has quit [Ping timeout: 240 seconds]
peppyheppy_ is now known as peppyheppy
<bubonicpestilenc> wow
<bubonicpestilenc> thanks )
<lianj> oh, better do .+ instead of \w+ on line 8
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
skinny_m has joined #ruby-lang
<zenspider> Boohbah: I wouldn't bother with the chdir if I didn't need it. Use File.join instead of String#+, break after you get a hit... or at least uniq the array after wards
<zenspider> use unless instead of if !
<bubonicpestilenc> and change map to each
<zenspider> don't use scan().each for that matter
<zenspider> what_list << path unless f.lines.any? { |l| l =~ /what/ }
kain has joined #ruby-lang
<zenspider> even better/faster... call out to grep
imperator has quit [Quit: Leaving]
srbartlett has quit [Remote host closed the connection]
kyrylo_ has quit [Ping timeout: 276 seconds]
<Boohbah> zenspider: thanks
sockmonk has quit [Read error: Operation timed out]
apeiros_ has quit [Remote host closed the connection]
tla has quit [Read error: Connection reset by peer]
kaspernj has quit [Remote host closed the connection]
<zenspider> n/p
<zenspider> Boohbah: why make two passes?
Gekz_ has quit [Quit: No Ping reply in 180 seconds.]
Gekz has joined #ruby-lang
drbrain has joined #ruby-lang
mistym has joined #ruby-lang
Cykey has quit [Quit: Computer has gone to sleep.]
tla has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
hackeron has joined #ruby-lang
Cykey has joined #ruby-lang
dv310p3r has quit [Ping timeout: 246 seconds]
publicvoid_ has joined #ruby-lang
thrcka has quit [Ping timeout: 245 seconds]
publicvoid has quit [Ping timeout: 245 seconds]
cored has quit [Quit: leaving]
asaaki has quit [Ping timeout: 252 seconds]
asaaki has joined #ruby-lang
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rue> If at first you don’t succeed…
mistym has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
bglusman has quit [Read error: No route to host]
bglusman has joined #ruby-lang
Jake232 has quit [Quit: Computer has gone to sleep.]
gregf has quit [Quit: WeeChat 0.3.7]
diegoviola has joined #ruby-lang
M4g1c5t0rM has joined #ruby-lang
fgomez has quit [Ping timeout: 252 seconds]
toretore has quit [Quit: This computer has gone to sleep]
fgomez has joined #ruby-lang
ahs3- has quit [Remote host closed the connection]
srbartlett has joined #ruby-lang
ahs3- has joined #ruby-lang
ahs3- has quit [Client Quit]
Austin__ has joined #ruby-lang
Austin__ has quit [Client Quit]
dalekurt has quit [Ping timeout: 248 seconds]
bryancp has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
mistym has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 240 seconds]
singpolyma has quit [Quit: Lost terminal]
slyphon has quit [Ping timeout: 245 seconds]
ahs3- has joined #ruby-lang
ahs3- has quit [Client Quit]
Choobie has joined #ruby-lang
MrPunkin has quit [Quit: MrPunkin]
matalangilbert has quit [Ping timeout: 244 seconds]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
outoftime has quit [Quit: Leaving]
slyphon has joined #ruby-lang
benanne has quit [Quit: kbai]
mistym has quit [Remote host closed the connection]
gregf has joined #ruby-lang
mattonrails has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
cored_ has quit [Ping timeout: 240 seconds]
arooni-mobile__ has joined #ruby-lang
dcorbin has quit [Quit: Leaving]
achiu has quit [Quit: WeeChat 0.3.7]
tomzx has joined #ruby-lang
dreinull has joined #ruby-lang
<zenspider> holy crap... I'm actually gonna do it
ConstantineXVI has joined #ruby-lang
butchanton1 has quit [Quit: Leaving.]
macmartine has quit [Quit: macmartine]