<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
<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
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 :)
<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]
<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!
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
<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]
<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
<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