fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
neoesque has quit [Quit: Bye!]
havenn has quit [Remote host closed the connection]
<arooni-mobile>
hi folks; i have a line of code to rescue mail exceptions: rescue Net::SMTPAuthenticationError => e ' in my code that is erroring with an exception: uninitialized constant Net::SMTPAuthenticationError ... this is a valid exception name so i'm a little curious whats going on
<arooni-mobile>
should i kill the Net:: part?
<cirwin>
arooni-mobile: make sure you're requiring the file that defines that constant
<arooni-mobile>
i thought Net was part of the default ruby env
<cirwin>
require 'net/smtp' to get it
<arooni-mobile>
got it
<arooni-mobile>
thanks
<cirwin>
that exception is probably hiding one underneath that says Net::SMTP is not defined :)
tRAS has joined #ruby-lang
neoesque has joined #ruby-lang
<arooni-mobile>
that was it; thanks cirwin
<arooni-mobile>
i made the assumption that those methods were included; hmmm i wonder how i can knocw if a method is included in standard library or not
<cirwin>
arooni-mobile: almost nothing is available without 'require'
cantonic has joined #ruby-lang
jmontross has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
Cykey has quit [Quit: Computer has gone to sleep.]
mortice has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 265 seconds]
stepnem has joined #ruby-lang
mistym has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<cirwin>
is there a way I can use .encode() such that I don't immediately have to check for valid_encoding? It'd be nice if .encode('UTF-8', 'UTF-8') raised InvalidByteSequenceErrors...
bryancp has quit [Remote host closed the connection]
peppyheppy has joined #ruby-lang
<boringusername>
I'm working with a multidimensional array, and i'm trying to loop through it and will need to test if certain array keys exist through the process. if it doesn't, then the data may be displayed differently. here's where i've started at, trying to display just the name. http://pastebin.com/m1Rinmc0
<boringusername>
this is my first time working with ruby, so i may be going about this the wrong way
<boringusername>
and this is the error that i'm getting NoMethodError at /
<seanstickle>
boringusername: you want a hash, not an array
joast has quit [Ping timeout: 244 seconds]
bfreeman has joined #ruby-lang
mistym has joined #ruby-lang
rmascarenhas has quit [Quit: leaving]
<boringusername>
seanstickle, would i loop through the hash the same way?
<seanstickle>
Yup
bryancp has joined #ruby-lang
cirwin has quit [Ping timeout: 245 seconds]
jperry2 has quit [Quit: Leaving.]
l0st1 has joined #ruby-lang
cored has quit [Ping timeout: 265 seconds]
fgomez has joined #ruby-lang
M4g1c5t0rM has joined #ruby-lang
yannis has quit [Quit: yannis]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
savage- has joined #ruby-lang
<boringusername>
i can get the loop so that it displays ["name", "bill"], but how do i go about calling it by the key 'name', so it would just display bill?
<seanstickle>
Read about Ruby hashes
tRAS has quit [Quit: Mother, did it need to be so high?]
tjadc has quit [Read error: Connection reset by peer]
replore has quit [Remote host closed the connection]
dasibre has joined #ruby-lang
<zenspider>
better... use a Struct or a full blown class
<seanstickle>
Small steps.
<zenspider>
ugh. haml.
vesan has quit [Read error: Connection reset by peer]
cyndis has quit [Read error: Operation timed out]
cyndis has joined #ruby-lang
vesan has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
bummytime has joined #ruby-lang
Z33K|Lux has quit [Client Quit]
Z33K|Lux has joined #ruby-lang
<postmodern>
zenspider, im not a fan of these html/js wrapper syntaxii myself, but i dont understand why people don't use slim instead of haml
gix has quit [Ping timeout: 244 seconds]
<postmodern>
slim has much less linenoise in their examples at least
gix has joined #ruby-lang
msaffitz has joined #ruby-lang
bummytime has quit [Quit: bummytime]
LarryLv has joined #ruby-lang
peppyheppy has quit [Quit: peppyheppy]
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
mistym has quit [Remote host closed the connection]
LarryLv has quit [Read error: Connection reset by peer]
LarryLv has joined #ruby-lang
banisterfiend has joined #ruby-lang
igotnolegs has joined #ruby-lang
superboringusern has joined #ruby-lang
boringusername has quit [Ping timeout: 260 seconds]
arooni-mobile___ has joined #ruby-lang
imajes has quit [Excess Flood]
brianpWins has joined #ruby-lang
imajes has joined #ruby-lang
dv310p3r has quit [Ping timeout: 246 seconds]
dv310p3r has joined #ruby-lang
banisterfiend has quit [Ping timeout: 260 seconds]
srbartle_ has joined #ruby-lang
srbartlett has quit [Read error: Connection reset by peer]
tomb__ has quit [Ping timeout: 244 seconds]
tomb_ has joined #ruby-lang
rippa has joined #ruby-lang
banisterfiend` has joined #ruby-lang
banisterfiend` has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend>
hi
zmack has joined #ruby-lang
cirwin has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
l0st1 has quit [Quit: leaving]
s0ra_h is now known as sora_h
tenderlove has joined #ruby-lang
macmartine has joined #ruby-lang
banisterfiend has quit [Ping timeout: 245 seconds]
<WillMarshall>
If I have a point to a class inside a module, e.g. MyModule::MyClass - how would I get MyModule back out so I could access MyModule::AnotherClass?
<cirwin>
WillMarshall: what do you mean by a "point"?
<WillMarshall>
Sorry, I have some methods in a module that get passed a single argument, which is a class that's always inside one of three modules
<WillMarshall>
I want to access another class in the same module, always in the same module as my argument
<WillMarshall>
So if I'm passed Foo::MyClass I want Foo::AnotherClass
<WillMarshall>
but if I'm passed Bar::MyClass I want Bar::AnotherClass
<cirwin>
WillMarshall: I guess you could do class.eval 'Module.nesting'
<cirwin>
or just use the class name
<cirwin>
but you should probably consider making a method on each class
<cirwin>
that gives you the related class
<WillMarshall>
Do you think it would be safer to pass the related class than to do some kind of introspection to evaluate it?
<cirwin>
it'd be easier to understand
<WillMarshall>
I have an optional argument of that class, but I can make it mandatory
<WillMarshall>
Sold :)
<cirwin>
:)
peppyheppy has joined #ruby-lang
banisterfiend has joined #ruby-lang
<banisterfiend>
hi
bojicas has joined #ruby-lang
cmaxw has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
Swimming_Bird has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ryanf has joined #ruby-lang
yxhuvud has joined #ruby-lang
zl_ has joined #ruby-lang
zl_ has quit [Client Quit]
macmartine has quit [Quit: macmartine]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
arooni-mobile__ has quit [Ping timeout: 248 seconds]
arooni-mobile has quit [Ping timeout: 240 seconds]
arooni-mobile___ has quit [Ping timeout: 265 seconds]
tenderlove has quit [Remote host closed the connection]
drollwit has quit [Remote host closed the connection]
msaffitz has quit [Quit: Computer has gone to sleep.]
pabloh has quit [Quit: Ex-Chat]
tomzx has quit [Ping timeout: 246 seconds]
mytrile has joined #ruby-lang
banisterfiend has quit [Ping timeout: 250 seconds]
dc5ala has joined #ruby-lang
cid404 has quit [Ping timeout: 246 seconds]
erpuds has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
cid404 has joined #ruby-lang
peppyheppy has quit [Quit: peppyheppy]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
yannis has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
sush24 has joined #ruby-lang
erpuds has quit [Quit: erpuds]
kitallis has joined #ruby-lang
gouthamvel has joined #ruby-lang
solars has joined #ruby-lang
sush24 has quit [Ping timeout: 252 seconds]
Swimming_Bird has quit [Read error: Operation timed out]
drollwit has joined #ruby-lang
sush24 has joined #ruby-lang
workmad3 has joined #ruby-lang
drollwit has quit [Read error: Operation timed out]
yannis has quit [Quit: yannis]
toretore has joined #ruby-lang
kitallisii has joined #ruby-lang
kitallis has quit [Ping timeout: 245 seconds]
Swimming_Bird has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby-lang
tomb_ has quit [Ping timeout: 265 seconds]
TvL2386 has joined #ruby-lang
tomb_ has joined #ruby-lang
gouthamvel has quit [Ping timeout: 246 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
dalekurt has quit [Quit: Zzz...]
hexreel has joined #ruby-lang
sec_ has joined #ruby-lang
tomb_ has quit [Ping timeout: 244 seconds]
symm- has joined #ruby-lang
sec_ has left #ruby-lang [#ruby-lang]
srbartle_ has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
woollyams has quit [Client Quit]
ridders24 has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
youngin_ has joined #ruby-lang
Xzyx987X_ has joined #ruby-lang
Weems2 has joined #ruby-lang
flak has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
symm-_ has joined #ruby-lang
flak is now known as Guest51511
symm- has quit [Ping timeout: 252 seconds]
mssola has joined #ruby-lang
Weems has quit [Ping timeout: 252 seconds]
youngin has quit [Ping timeout: 252 seconds]
ridders24 has quit [Ping timeout: 252 seconds]
Xzyx987X has quit [Ping timeout: 252 seconds]
ridders24 has joined #ruby-lang
riffraff has joined #ruby-lang
tRAS has joined #ruby-lang
ridders24 has quit [Ping timeout: 244 seconds]
woollyams has joined #ruby-lang
mssola has quit [Ping timeout: 246 seconds]
vmoravec has joined #ruby-lang
kain has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
cirwin has quit [Quit: sleeep...ping!]
KU0N has joined #ruby-lang
banisterfiend has joined #ruby-lang
ngw has joined #ruby-lang
CodeBlock has joined #ruby-lang
perryh is now known as perryh_away
judofyr has joined #ruby-lang
CodeBlock has quit [Excess Flood]
ngw has quit [Client Quit]
ramonmaruko has quit [Ping timeout: 260 seconds]
ramonmaruko has joined #ruby-lang
CodeBlock has joined #ruby-lang
tekin has joined #ruby-lang
Criztian has joined #ruby-lang
Z33K|Lux has quit [Ping timeout: 260 seconds]
gouthamvel has joined #ruby-lang
gnufied has joined #ruby-lang
zmack has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
lopin has joined #ruby-lang
ryanf has quit [Quit: leaving]
mortice has joined #ruby-lang
<banisterfiend>
hey guys!
<banisterfiend>
judofyr: hey guy! good blog post the other day
<judofyr>
banisterfiend: thanks!
<banisterfiend>
judofyr: did u get any feedback from the objectify authors?
<banisterfiend>
judofyr: was that it? it would have been interesting to see how that dialogue developed
workmad3 has joined #ruby-lang
<judofyr>
banisterfiend: that was basically it. he didn't want to continue on Twitter, neither on Hacker News (it's in his /etc/hosts). he might email me later.
<judofyr>
"hacker news is hosts filed on my computer because I value my brain cells. at some point maybe email or skype."
dr_bob has joined #ruby-lang
<banisterfiend>
judofyr: hehe, he says that while being a moderator on r/ruby :P
<banisterfiend>
which is infinitely more retarded than HN
francisfish has quit [Ping timeout: 260 seconds]
<judofyr>
banisterfiend: ;)
francisfish has joined #ruby-lang
kyrylo has quit [Ping timeout: 252 seconds]
<Muz>
banisterfiend: at least reddit makes no illusion about being retarded. ;)
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
apeiros_ has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
charliesome has joined #ruby-lang
tbuehlmann has joined #ruby-lang
tbuehlmann has quit [Changing host]
tbuehlmann has joined #ruby-lang
fgomez has quit [Ping timeout: 256 seconds]
zmack has joined #ruby-lang
Fullmoon has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
yannis has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
zmack has quit [Read error: Connection reset by peer]
sush24 has joined #ruby-lang
zmack has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
<andrewvos>
Not even the slightest illusion, no.
TheHunter_1039 has quit [Quit: TheHunter_1039]
<banisterfiend>
andrewvos: how's d3? worth the scrill?
<andrewvos>
banisterfiend: Yeahhh
<andrewvos>
banisterfiend: I suppose
<andrewvos>
banisterfiend: It's not like "game-changing" or anything.
<andrewvos>
banisterfiend: A few things are cool about it. Like, when enemies drop weapons and shit all players see different weapons
<andrewvos>
So you can't steal each others weapons
<banisterfiend>
andrewvos: i remember they tried to justify that somehow
<andrewvos>
heh
<andrewvos>
Yeah it's alright. I like playing with others online etc.
<andrewvos>
But it's not amazing
<andrewvos>
Certainly not work £45
<andrewvos>
worth*
zmack_ has joined #ruby-lang
<banisterfiend>
andrewvos: you're in london?
zmack has quit [Ping timeout: 246 seconds]
<andrewvos>
yep
<banisterfiend>
andrewvos: i find UK so bleak and depressing i could never live there
<banisterfiend>
andrewvos: i feel people living there are just waiting for someone to put them out of their misery, and from what i read people are leaving there in droves mainly for australia and NZ
<judofyr>
banisterfiend: I'm actually thinking of starting a discussion site. a moderated discussion site though.
<judofyr>
so I invite people to talk about a topic
<banisterfiend>
judofyr: cool, like convore?
<judofyr>
more like a podcast really
<judofyr>
just in written form
<judofyr>
kinda like convore, but more like blog posts and less like chat
<banisterfiend>
judofyr: nice
<matled>
wouldn't it be nice if ruby had another operator to call methods which has lower precedence than "."? like "foo" + "bar" →length which would be equivalent to ("foo" + "bar").length
<andrewvos>
What's the easiest way to script installing a gem, then running that gem as a service on a shitty centos box?
<banisterfiend>
matled: what's wrong with ()
<matled>
banisterfiend: it disturbs the flow :)
<matled>
banisterfiend: I just want to append to further modify the last object
<matled>
and not go back and insert () all the time
<banisterfiend>
matled: never had a need for it personally
<matled>
banisterfiend: I love to use irb/pry as a calculator and text transformation and so on and find myself quite often adding braces after writing a line of code so I can continue working with the line
<judofyr>
matled: just press enter and use _?
<matled>
especially with infix operators, i.e. I write @xml / "div.something" and then want to continue working with it, so I have to put braces around or use a variable
<matled>
variables have the disadvantage that I may want to change some initial value and have to run all the lines again
<banisterfiend>
matled: Yeah, use _
<matled>
oh, you mean like "foo" + "bar"; _.length on the same line? this may work in most cases
<banisterfiend>
that wont work
<banisterfiend>
_ needs to be on the next line
<banisterfiend>
matled: in pry you can easily run lines again after changing the value of a variable, use play -i
<apeiros_>
banisterfiend: does pry now provide nesting type like irb? for prompts like >", >', >* etc. to indicate what's still open…
<micha-->
okay, attaching "+02:00" to the string i am parsing helps
<micha-->
as long as there is no daylight savings time, i guess
<banisterfiend>
apeiros_: not yet, we'll probably put that in the 1.0 release, we have all the info for that we just dont have a nice api for it yet.
<banisterfiend>
apeiros_: we're thinking of providing a !end command
<banisterfiend>
that'll close all open ends
<banisterfiend>
that's cute
<apeiros_>
banisterfiend: :(
* apeiros_
waits :)
<apeiros_>
the suggestion I made doesn't work out? (using a struct)
<banisterfiend>
apeiros_: wont be too long, we're pushing out 0.9.9.7 next week, so we're pretty much at 1.0
<apeiros_>
or what part do you mean wrt API?
<apeiros_>
great! :D
<banisterfiend>
apeiros_: well cirwin had the idea of rather than using a struct to pass in the pry instance itself, that way you could potentially configure prompts/other stuff as much as u want, even in ways we didnt foresee
<banisterfiend>
rather than using a struct, (comma) to pass in the pry instance itself*
Cykey has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
apeiros_: something like that will def. be in 1.0 though
<banisterfiend>
whether we go for structs or the pry instance
<banisterfiend>
it's too fiddly as it is
<apeiros_>
I'd use the struct and let the pry instance be a member in it
<apeiros_>
s/struct/custom object/
<apeiros_>
simply for the reason that it allows to provide case-specific information in a convenient way
<banisterfiend>
hmm, it depends on whether we can get away with including that case specific stuff on the pry instance without it feeling too unnatural
<banisterfiend>
if we cant then we'll probably do what u said (struct + pry instance as member)
<apeiros_>
anyway, I'm looking forward!
<banisterfiend>
cool, it would be nice to bundle a few more color themes too
<banisterfiend>
maybe that would be better as a plugin
JohnBat26 has quit [Remote host closed the connection]
<apeiros_>
that part actually surprised me
<apeiros_>
I hated auto-indent & coloring (wirble) in irb
<apeiros_>
in pry I didn't hate it
* apeiros_
wonders whether it works differently in pry than in irb or whether he himself changed in the meantime
<banisterfiend>
the coloring is pretty mild
<banisterfiend>
coderay isnt over zealous with it
<apeiros_>
do you use 256 colors?
<banisterfiend>
no
<apeiros_>
hmmm
<banisterfiend>
but the next coderay version will use that
<banisterfiend>
we may/may not take advantage of it
<apeiros_>
noice
<apeiros_>
well, if you don't, I will ;-)
<apeiros_>
coderay source still such a mess?
<banisterfiend>
cool, you could be the pry-colorthemes guy :)
<banisterfiend>
it's still enormous ugly regexes if that's what u mean :)
<apeiros_>
oh no I won't. I need one colortheme. which will be very very mild.
<apeiros_>
banisterfiend: I can deal with regexen, but the whole architecture was a mess last time I looked (~3y ago or so)
<banisterfiend>
oh ok, k never really looked at it, but i know he rewrote it almost from scratch for 1.0
<banisterfiend>
which was only released about 4-5 months ago
* apeiros_
wonders what he should put on the summary page for his travel…
<apeiros_>
oy, almost omitted the e-ticket number :D
<banisterfiend>
apeiros_: charlie nutter is at euroko
<apeiros_>
I know :)
<banisterfiend>
apeiros_: tell him he looks like tom green
<banisterfiend>
:)
<apeiros_>
I hate that I didn't realize that there's a hack-day going on today >:-(
<apeiros_>
I'd be in amsterdam today already if I'd known that
<apeiros_>
I mean, now. I will be in A today :) (but later)
tRAS has quit [Quit: Mother, did it need to be so high?]
Zyclops has joined #ruby-lang
<Zyclops>
how to i avoid "warning: multiple values for a block parameter (0 for 1)" with blocks where i want the parameter to be optional?
oddmunds has quit [Read error: Connection reset by peer]
<judofyr>
Zyclops: just use foo { |_| }
<judofyr>
Zyclops: _ is a regular variable; it's just a convention in Ruby
<charliesome>
foo { |*| … } is also handy if you don't care about any block parameters
carloslopes has joined #ruby-lang
<Zyclops>
sorry back
<Zyclops>
oh
<Zyclops>
and use args to access them?
<judofyr>
Zyclops: no, if you use |*| you can't access them
<Zyclops>
okies
<Zyclops>
*args it is then
<judofyr>
yeah
dv310p3r has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby-lang
headius has joined #ruby-lang
fgomez has joined #ruby-lang
d3vic3 has quit [Ping timeout: 240 seconds]
oddmunds has joined #ruby-lang
d3vic3 has joined #ruby-lang
adambeynon has quit [Read error: Operation timed out]
yannis has quit [Quit: yannis]
srbartlett has joined #ruby-lang
Zyclops has quit [Quit: Leaving.]
mssola has joined #ruby-lang
Fullmoon has joined #ruby-lang
dejongge has joined #ruby-lang
igaiga has joined #ruby-lang
mark_locklear has joined #ruby-lang
woollyams has joined #ruby-lang
tRAS has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
gnufied1 has joined #ruby-lang
gnufied has quit [Ping timeout: 244 seconds]
mytrile has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
fgomez has quit [Quit: leaving]
fgomez has joined #ruby-lang
jperry2 has joined #ruby-lang
woollyams has joined #ruby-lang
Gabriel_Moreira has joined #ruby-lang
Zyclops1 has joined #ruby-lang
Zyclops1 has left #ruby-lang [#ruby-lang]
jxie has quit [Ping timeout: 244 seconds]
soahccc` is now known as soahccc
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
headius has quit [Ping timeout: 245 seconds]
Hakon|mbp has joined #ruby-lang
zmack has quit [Ping timeout: 246 seconds]
igaiga has joined #ruby-lang
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
mistym has quit [Remote host closed the connection]
seoaqua has joined #ruby-lang
M4g1c5t0rM has quit [Ping timeout: 260 seconds]
<Defusal>
ok so, what is the correct way to kill a forked process?
<banisterfiend>
man this channel has died since the last time i hung out here
<banisterfiend>
even #ruby is more active
<Defusal>
i'd think #ruby is more active because most clueless people don't know this channel exists
<Defusal>
anyway, if i pid = fork { exec "..." }; Process.kill('KILL', pid) the forked process becomes defunct
<banisterfiend>
yeah it's almost twice as big
<Defusal>
does anyone know what the correct way to kill the forked process is?
hynkle has joined #ruby-lang
shaman42 has quit [Ping timeout: 260 seconds]
cyndis has quit [Ping timeout: 250 seconds]
<judofyr>
Defusal: what's wrong with Process.kill ?
<Defusal>
judofyr, like i said, the child goes defunct when it is killed
<judofyr>
defunct?
<Defusal>
it is what linux calls a zombie process
<judofyr>
ah
<Defusal>
it is only removed from the process table when the parent process dies (which is never, as it is a spawning daemon)
<oddmunds>
what if you change the signal?
<oddmunds>
i'm not sure which one is the default
<oddmunds>
15?
<judofyr>
TERM is 15
<oddmunds>
ok, so 9 is the default?
<Defusal>
same thing oddmunds
yannis has joined #ruby-lang
<judofyr>
15 is the default (TERM)
<judofyr>
9 is KILL
<oddmunds>
i think my confusion stems from htop having SIGTERM as the default signal when you choose kill.
<judofyr>
or, kill(1) defaults to 15
brunocoelho has joined #ruby-lang
<matled>
banisterfiend: there seem to be some very nice tips in the blog post, thanks
<oddmunds>
judofyr: so i was right?
<judofyr>
oddmunds: yes :)
<oddmunds>
haha
<oddmunds>
i almost left this conversation knowing less than when i came in
dv310p3r has joined #ruby-lang
<judofyr>
I never said that you were wrong; just that 15 == TERM :)
<judofyr>
banisterfiend: I've never been in #ruby. how is it?
<workmad3>
judofyr: friendly :)
<banisterfiend>
judofyr: more active, but it's mainly lost rails noobs asking retarded questions
<Defusal>
judofyr, from the few times i've been in there over the years, its more like #ror
<oddmunds>
last time i was there it was high traffic and lots of rails
<Defusal>
full of clueless users asking simple questions
<workmad3>
you mean like shevy asking for IRC help? :)
<Defusal>
i'll stay away from it, like i do #ror
cyndis has joined #ruby-lang
<matled>
banisterfiend: whoa, edit / edit-method is really cool!
<banisterfiend>
matled: Yeah, it's the shiznite
<Defusal>
anyone know about using posix signals with epoll?
<matled>
is there any command (or could I define one) that will create a method stub automatically if I enter edit-method foo if foo does not exist yet?
<banisterfiend>
glad u like it
mistym has joined #ruby-lang
<banisterfiend>
matled: no, but it's very easy to make that
<matled>
I think I'll take a look at customizing pry later
srbartlett has quit [Remote host closed the connection]
headius has joined #ruby-lang
<Defusal>
ok
<Defusal>
looks like the best solution i can find is polling the pid, and running waitpid when it has ended, which will return immediately, not blocking my event loop and stop the child process from being defunct
<Defusal>
EventMachine needs a realtime POSIX signal implementation
headius has quit [Read error: Connection reset by peer]
dfr|mac has quit [Remote host closed the connection]
jnimety has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
elux has quit [Quit: Bye!]
dfr|mac has joined #ruby-lang
DRCALKIN has joined #ruby-lang
lsegal has joined #ruby-lang
peppyheppy has quit [Quit: peppyheppy]
andrew__ has joined #ruby-lang
kvirani has joined #ruby-lang
peppyheppy has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
dankest has joined #ruby-lang
cdt has joined #ruby-lang
andrew__ has quit []
andrewhl has joined #ruby-lang
DRCALKIN has quit [Quit: Leaving]
msaffitz has quit [Quit: Computer has gone to sleep.]
cmaxw has quit [Quit: cmaxw]
dfr|mac has quit [Remote host closed the connection]
joast has joined #ruby-lang
cdt has quit [Ping timeout: 256 seconds]
tomb_ has quit [Ping timeout: 246 seconds]
dv310p3r has quit [Ping timeout: 246 seconds]
Taranis has quit [Read error: Connection reset by peer]
Taranis has joined #ruby-lang
Cykey has joined #ruby-lang
tomb_ has joined #ruby-lang
Lee_A has joined #ruby-lang
setmeaway has joined #ruby-lang
setmeaway has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
setmeaway has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
setmeaway has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
dfr|mac has joined #ruby-lang
setmeaway has quit [Ping timeout: 246 seconds]
arooni-mobile___ has quit [Quit: Leaving]
arooni-mobile has quit [Quit: Leaving]
Skif has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
erics has quit [Ping timeout: 240 seconds]
rhodee has left #ruby-lang [#ruby-lang]
dv310p3r has joined #ruby-lang
solars has joined #ruby-lang
lopin has quit [Ping timeout: 244 seconds]
francisfish has quit [Remote host closed the connection]
peppyheppy has quit [Read error: Connection reset by peer]
peppyheppy_ has joined #ruby-lang
peppyheppy_ has quit [Client Quit]
Lee_A has quit [Remote host closed the connection]
Lee_A has joined #ruby-lang
benanne has joined #ruby-lang
drollwit has joined #ruby-lang
Rubinista has quit [Ping timeout: 245 seconds]
lopac1029 has joined #ruby-lang
setmeaway has joined #ruby-lang
setmeaway has quit [Read error: Connection reset by peer]
gregf has quit [Quit: WeeChat 0.3.7]
setmeaway has joined #ruby-lang
<lopac1029>
What is a good method to capture all numbers in an array that are less than zero? I've combed over the ruby-doc.org page of Array, but can't seem to find anything that fits.
setmeaway has quit [Read error: Connection reset by peer]
<singpolyma>
lopac1029: ary.select {|v| v < 0 } ?
setmeaway has joined #ruby-lang
soahccc` is now known as soahccc
benanne has quit [Ping timeout: 245 seconds]
<lopac1029>
singpolyma: Thanks!
<sockmonk>
lopac1029: in general, when you're working with arrays, look at the Enumeration docs as well for something that might help
Skif has quit [Read error: Connection reset by peer]
erics has joined #ruby-lang
erics has quit [Read error: Connection reset by peer]
Skif has joined #ruby-lang
JohnBat26 has quit [Ping timeout: 246 seconds]
erics has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
rhodee_ has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
Boohbah has joined #ruby-lang
DRCALKIN has joined #ruby-lang
rhodee_ has quit [Client Quit]
Skif has joined #ruby-lang
erics has quit [Ping timeout: 240 seconds]
tbuehlmann has quit []
cantonic has quit [Quit: cantonic]
Criztian has joined #ruby-lang
yannis has quit [Quit: Bye!]
dfr|mac has joined #ruby-lang
cdt has joined #ruby-lang
Swimming_Bird has quit [Ping timeout: 246 seconds]
cdt has quit [Read error: Operation timed out]
ttilley has quit [Remote host closed the connection]
yxhuvud has quit [Ping timeout: 256 seconds]
gregf has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
drollwit has quit [Remote host closed the connection]
peppyheppy has joined #ruby-lang
mikkelb has quit [Read error: Connection reset by peer]
<yorickpeterse>
Ruby C people: I have two functions, function A and B (which is a callback), both are defined in C. A takes a block and I'd like to pass this block to B, is this possible?
<yorickpeterse>
In this case B will be used whenever an event is triggered
Axsuul has joined #ruby-lang
jperry2 has quit [Ping timeout: 246 seconds]
<carloslopes>
yorickpeterse: def method_a(&block)
<pip>
yorickpeterse, What does Ruby C people mean?
<carloslopes>
yorickpeterse: and inside the method_a.. call: method_b &block
<yorickpeterse>
This is in C, not in Ruby
<yorickpeterse>
(The Ruby C API)
<carloslopes>
yorickpeterse: ?
<yorickpeterse>
I found there's "rb_block_proc()" which converts a block to a proc so you can pass it around, it's however not entirely clear how then to call this (if this is even the way to go)
<yorickpeterse>
carloslopes: I'm talking about writing a Ruby extension in C
<carloslopes>
yorickpeterse: hmm.. ok :)
benanne has quit [Quit: kbai]
carloslopes has quit [Quit: Leaving]
krz has joined #ruby-lang
gouthamvel has joined #ruby-lang
<lopac1029>
Am I correct that there is no way to limit 'to_f' to a number of digits after the decimal place?
<yorickpeterse>
You can use #round()
<drbrain>
lopac1029: correct, you want to use sprintf
<nowthatsamatt>
what gem do you recommend to use for a master/slave mysql environment
woollyams has quit [Client Quit]
KU0N has joined #ruby-lang
igaiga has joined #ruby-lang
krzkrzkrz has joined #ruby-lang
b1rkh0ff has quit [Ping timeout: 252 seconds]
sockmonk has quit [Ping timeout: 248 seconds]
rushed has quit [Quit: rushed]
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz is now known as krz
solars has quit [Read error: Operation timed out]
mssola has quit [Quit: Konversation terminated!]
francisfish has joined #ruby-lang
erics has joined #ruby-lang
fserb has joined #ruby-lang
vpamulap has joined #ruby-lang
igaiga_ has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
Skif has quit [Ping timeout: 240 seconds]
francisfish has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
igaiga has quit [Ping timeout: 244 seconds]
gsav has quit [Read error: Connection reset by peer]
wasnotrice is now known as zz_wasnotrice
slyphon has quit [Quit: WeeChat 0.3.6]
b1rkh0ff has joined #ruby-lang
wallerdev has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
<akahn>
How do I set my local time zone with stdlib? I'm looking for something like activesupport's Time.zone = '...'
<drbrain>
akahn: ENV['TZ'] = ...
<drbrain>
akahn: ruby uses libc's time stuff, and that's the only way I know of
<akahn>
drbrain: thanks. running my tests on travis made me realize they were time zone dependent D:
lopac1029 has quit [Remote host closed the connection]
peppyheppy has quit [Quit: peppyheppy]
gsav has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
DRCALKIN has quit [Quit: Leaving]
igaiga_ has quit [Remote host closed the connection]
igaiga has joined #ruby-lang
IPGlider has joined #ruby-lang
dv310p3r has quit [Ping timeout: 246 seconds]
vaelen has quit [Remote host closed the connection]
Rubinista has joined #ruby-lang
vaelen has joined #ruby-lang
Raduwen has joined #ruby-lang
nowthatsamatt has quit [Quit: nowthatsamatt]
peppyheppy has joined #ruby-lang
peppyheppy has quit [Client Quit]
peppyheppy has joined #ruby-lang
erpuds_ has quit [Quit: erpuds_]
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby-lang
KU0N has quit [Quit: Leaving...]
bglusman has quit [Ping timeout: 256 seconds]
arooni-mobile__ has quit [Ping timeout: 260 seconds]
<rhizmoe>
do case statements try to satisfy all conditions, or does a success short circuit? relatedly, do if...elsif...elsif...end similarly break out on success?
sepp2k has quit [Remote host closed the connection]
<workmad3>
rhizmoe, once a condition is satisfied, it evaluates that block and then stops, it doesn't try to continue on
<rhizmoe>
i guess that means my implementatino sucks!