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
Natch has joined #ruby-lang
ftravers has joined #ruby-lang
brushbox has joined #ruby-lang
looopy has joined #ruby-lang
Aaaarg has joined #ruby-lang
seanstickle has joined #ruby-lang
shevy has joined #ruby-lang
SuperTaz_work has joined #ruby-lang
H2H has joined #ruby-lang
looopy has joined #ruby-lang
looopy has joined #ruby-lang
havenn has joined #ruby-lang
<denysonique> Mon_Ouie: hey, I just saw a pull request to qtbindings, what are you writing in QtRuby?
gregf has joined #ruby-lang
Natch has joined #ruby-lang
m3nd3s has joined #ruby-lang
CoverSli1e has joined #ruby-lang
Luxx_ has joined #ruby-lang
sora_h has joined #ruby-lang
savage- has joined #ruby-lang
Aaaarg has joined #ruby-lang
neoesque has joined #ruby-lang
fgomez has joined #ruby-lang
dv310p3r has joined #ruby-lang
justinmcp has joined #ruby-lang
matti has joined #ruby-lang
hahuang65 has joined #ruby-lang
RORgasm has joined #ruby-lang
Natch has joined #ruby-lang
justinmcp has joined #ruby-lang
lsegal has joined #ruby-lang
shtirlic has joined #ruby-lang
mkutub has joined #ruby-lang
<mkutub> hi
mkutub has quit [#ruby-lang]
ronankde has joined #ruby-lang
<rue> HI THERE
Natch has joined #ruby-lang
nguerin has joined #ruby-lang
<erikh> OHAI
rdavila has joined #ruby-lang
Radium has joined #ruby-lang
<erikh> soylent green is made out of ruby programmers
<Asher> yum
<Oloryn_lt2> Shouldn't that actually be soylent red?
<Asher> red doesn't taste as good
<Asher> everyone knows that!
<RickHull> it hits a little too close to home
<RickHull> green is much more pleasant
kitallis has joined #ruby-lang
RickHull has quit [#ruby-lang]
rdavila has joined #ruby-lang
dasibre has joined #ruby-lang
AndChat| has joined #ruby-lang
dasibre has quit [#ruby-lang]
jkyle_ has joined #ruby-lang
Giddeon has joined #ruby-lang
Radium has joined #ruby-lang
mbriggs has joined #ruby-lang
imperator has joined #ruby-lang
Natch has joined #ruby-lang
<imperator> howdy
dasibre has joined #ruby-lang
Sulfur has joined #ruby-lang
tonesfrommars has joined #ruby-lang
chimkan has joined #ruby-lang
mkutub has joined #ruby-lang
mkutub has quit [#ruby-lang]
Clordio_ has joined #ruby-lang
woollyams has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
_santana has joined #ruby-lang
RORgasm has joined #ruby-lang
Radium has joined #ruby-lang
Natch has joined #ruby-lang
io_syl has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
ramonmaruko has joined #ruby-lang
jmfcool has joined #ruby-lang
<Asher> is there an equivalent to Array#join except return an array with the passed parameter inserted between each original array element?
looopy has joined #ruby-lang
<seanstickle> example please
<Asher> [ 1, 2, 3 ].join( '-' ) => '1-2-3'
<Asher> [ 1, 2, 3 ].equivalent_to_join( '-' ) => [ 1, '-', 2, '-', 3 ]
<seanstickle> a = [1,2,3]; a.zip(Array.new(a.size){"-"}).flatten
shtirlic has joined #ruby-lang
<rking> seanstickle: That leaves a '-' at the end.
<whitequark> a.size - 1
<whitequark> seanstickle: this is perversive and I like it
<rking> whitequark: That leaves a nil at the end.
<seanstickle> a = [1,2,3]; a.zip(Array.new(a.size-1){"-"}).flatten.compact
<seanstickle> Fixed
<rking> Cool. =)
<seanstickle> Why in the world someone needs to do this, I dunno
<rking> seanstickle: Could be anything. Maybe he's making a node structure where there are pipes between each node. Could be anything.
dr0id has joined #ruby-lang
Natch has joined #ruby-lang
<Asher> i don't need to do that i needed an equivalent… i just did each_with_index and tested if index == count to avoid the last append
<Asher> decided that was better than all the extra arrays and flattening and compating
<seanstickle> Loops, yuck
<whitequark> seanstickle: each* aren't loops
<seanstickle> It is when you start using index to do stuff
<Asher> better than creating an extra object and then chopping it off, no?
<whitequark> I agree
<imperator> Asher, do the numbers have to stay numbers? or can they be stringified?
<Asher> they're actually objects in teh use case
<Asher> instances of my own classes, that is
<imperator> ok
<duckinator> well then, it would seem my issue before where $DEBUG=true/--debug caused threads to behave noticeably different was system-specific o.O
<seanstickle> Well, or you could just do [1,2,3].flat_map { |x| [x, "-"] }[0...-1]
<seanstickle> Which is the more obvious route
rippa has joined #ruby-lang
takaokouji has joined #ruby-lang
<duckinator> hmm, apparently it was fixed between 1.9.3p0 and 1.9.3p125. fun.
<Boohbah> anyone know when method_missing was removed from Kernel?
<Boohbah> or where i can read more about this
<deryl> Boohbah: I'm showing it in ri BasicObject.method_missing
<Boohbah> ahh, thank you
<deryl> np
* duckinator fails...it actually isn't fixed as of p125.
hagebake has joined #ruby-lang
hagebake has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
fgomez has joined #ruby-lang
H2H has joined #ruby-lang
ramonmaruko has joined #ruby-lang
rohit has joined #ruby-lang
ascarter has joined #ruby-lang
gnufied has joined #ruby-lang
gix has joined #ruby-lang
sora_h has joined #ruby-lang
Jarred has joined #ruby-lang
jarred_ has joined #ruby-lang
mikeric has joined #ruby-lang
gokul has joined #ruby-lang
dc5ala has joined #ruby-lang
robbyoconnor has joined #ruby-lang
Natch has joined #ruby-lang
frangiz has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
io_syl has joined #ruby-lang
wubino has joined #ruby-lang
krz has joined #ruby-lang
brianpWins has joined #ruby-lang
robbyoconnor has joined #ruby-lang
_Cherrum has joined #ruby-lang
burgestrand has joined #ruby-lang
yxhuvud has joined #ruby-lang
bglusman has joined #ruby-lang
gianlucadv has joined #ruby-lang
RORgasm has joined #ruby-lang
darkf has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
savage- has joined #ruby-lang
nguerin has joined #ruby-lang
|Vargas| has joined #ruby-lang
pygmael has joined #ruby-lang
Natch has joined #ruby-lang
JohnBat26 has joined #ruby-lang
JohnBat26 has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has joined #ruby-lang
wallerdev has joined #ruby-lang
wubino has joined #ruby-lang
darkf_ has joined #ruby-lang
gnufied1 has joined #ruby-lang
darkf__ has joined #ruby-lang
rushed has joined #ruby-lang
x0F__ has joined #ruby-lang
kitallisii has joined #ruby-lang
Natch has joined #ruby-lang
wubino has joined #ruby-lang
nignaztic has joined #ruby-lang
s0ra_h has joined #ruby-lang
timbleck has joined #ruby-lang
Natch has joined #ruby-lang
dkannan has joined #ruby-lang
zmack has joined #ruby-lang
towski has joined #ruby-lang
Radium has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
sdeobald_ has joined #ruby-lang
solars has joined #ruby-lang
cyril_ has joined #ruby-lang
cyri_ has joined #ruby-lang
RORgasm has joined #ruby-lang
thrcka has joined #ruby-lang
sora_h has joined #ruby-lang
towski has joined #ruby-lang
nofxx has joined #ruby-lang
morozovm has joined #ruby-lang
Xzyx987X_ has joined #ruby-lang
<nofxx> Ive made a side project, 2 or 3 months ago. Let it totally unmaintened, to my surprise, when I was dumping the db to move it to another server today I've found out 8k registerd users, 2k notes! 10gb of sessions. No bots, looks legit emails. The app is X-rated, that explains a lot but wow.. I'm in shock.
<ruskie> lol
<nofxx> Anyway, why I came here: was thinking about hiring someone to help, but after a second tough, this can me rentable in any city, If I could find a partner, with good ruby skills
<nofxx> thinking about investing in it
<nofxx> but got to finish another project in the upcoming 2,3 months*
<drbrain> nofxx: I was shocked to see someone using net-http-persistent to near 1 million HTTP requests on a single connection
<nofxx> drbrain: build something, dont ad anywhere, make the layout totally f* up after you switched from pg to mongoid couple of months ago
<nofxx> sum up a register form.... you can't get 8k users if it's not porn
<drbrain> haha
Xzyx987X has joined #ruby-lang
toretore has joined #ruby-lang
<drbrain> I wish I could figure out how I'm messing up symmetric encryption
<erikh> are you not carrying over the IV?
<drbrain> I'm carrying over the IV
<erikh> I've made that mistake
<drbrain> the cipher, key and IV are all identical
<drbrain> I'm getting "wrong final block length"
segy has joined #ruby-lang
<erikh> hrm.
<erikh> yeah, I'm pretty green with this shit. probably shouldn't have said anything.
<erikh> and the last time I touched it 3DES was the algorithm everyone wanted to use
<drbrain> I'm using DES-CBC and encrypt to 184 bytes, which is a multiple of the 8 byte block size of DES
<drbrain> it's for growl
<erikh> growl uses DES?
takaokouji has joined #ruby-lang
<drbrain> it supports DES (why?), 3DES and AES
<erikh> heh
<erikh> yeah, that's where my head was going.
<drbrain> … and the documentation comes from the windows growl people reading the growl source code
<erikh> lovely
<drbrain> … and I've found a handful of bugs in growl 1.3.1
<erikh> isn't growl going the way of hte dodo with mountain lion anyhow?
<drbrain> no idea
<erikh> yeah, they're implementing a notification center like from ios
<erikh> ... anyhow, best of luck
<drbrain> GNTP is for remote notifications, which is something Notification Center may not support (network-wise)
<drbrain> so, growl may still stick around
<drbrain> I imagine growl will still be used for people who want notifications to "look cool"
<erikh> fair
<erikh> I need to grab a project and stick with it
<erikh> too much shuffling around lately.
<drbrain> well, other than it costs $
<drbrain> I should go to sleep, I'm not going to figure this out tonight
<erikh> good idea.
<erikh> night :)
apeiros_ has joined #ruby-lang
Spooner has joined #ruby-lang
sora_h has joined #ruby-lang
robotmay has joined #ruby-lang
Cherrum has joined #ruby-lang
workmad3 has joined #ruby-lang
kitallis has joined #ruby-lang
looopy has joined #ruby-lang
futurechimp has joined #ruby-lang
gianlucadv has joined #ruby-lang
scientes has joined #ruby-lang
francisfish has joined #ruby-lang
gianlucadv has joined #ruby-lang
daglees has joined #ruby-lang
manojhans has joined #ruby-lang
rohit has joined #ruby-lang
wubino has joined #ruby-lang
<matled> I'd like to define classes as class SomeModule::ClassName to prevent unnecessary indentation depth. I found that that can cause problems referring to classes within the same module: https://gist.github.com/c240fd797e8c6a1072c3
<matled> what are the options here? include the module or refer to the class by B::Bar?
solars has joined #ruby-lang
nazty has joined #ruby-lang
d3vic3 has joined #ruby-lang
manojhans has joined #ruby-lang
pp01bit has joined #ruby-lang
kashyapkmbc has joined #ruby-lang
srbartlett has joined #ruby-lang
kitallis has joined #ruby-lang
yumike has joined #ruby-lang
<TTilus> matled: i'd go with B::Bar
Radium has joined #ruby-lang
<TTilus> matled: its explicite and you dont have to give up indentation thing
francisfish has joined #ruby-lang
Arnvald has joined #ruby-lang
IPGlider has joined #ruby-lang
replore has joined #ruby-lang
RORgasm has joined #ruby-lang
kashyapkmbc has quit [#ruby-lang]
judofyr has joined #ruby-lang
kyrylo has joined #ruby-lang
chimkan_ has joined #ruby-lang
gnufied1 has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
takaokouji has joined #ruby-lang
ggherdov has joined #ruby-lang
gnufied1 has joined #ruby-lang
<matled> TTilus: yeah, I think I'll go with this
dcorbin has joined #ruby-lang
<lzhz_> Builder::XmlMarkup seems to turn all non-ascii chars into numerical entities in Ruby 1.9.2. How do I prevent this?
<lzhz_> Using Builder 2.1.2 btw.
<lzhz_> Ah, just read "Version 3 adds Ruby 1.9.2 compatibility", maybe time to upgrade.
lordzero has joined #ruby-lang
kitallis has joined #ruby-lang
<lordzero> morning everyone
<shevy> die!
<shevy> whops
<shevy> I mean, hi!
<lordzero> haha
<lordzero> i love that warm feeling i get
<lordzero> when i hear die
<lordzero> i mean um
<lordzero> damn
<shevy> yeah
<shevy> it shows that others really care
<shevy> :)))
<matti> shevy: :)
<shevy> because you see
<shevy> there is a reaction
<shevy> the worst are the idlers who say neither hi or die
<lordzero> that is true
<injekt> ok who started shevy off
<lordzero> its my fault
* lordzero raises hand
<shevy> hey IRC is more fun than writing code right now
<lordzero> haha
<matti> shevy: Always is.
<lordzero> how about a mix of both? ;)
<injekt> that is unfortunately often the case
<lordzero> irc and code, best of both worlds?
<injekt> andrewvos: ping
<andrewvos> injekt: o hai
<injekt> andrewvos: o hai, does you know anyone who might be interested in purchasing a 27" iMac?
<andrewvos> injekt: If I did I would sell mine to them and replace it with a projector :/
<injekt> haha
<injekt> fuck
<andrewvos> yeah
<shevy> dunno, code frustrates me... when I look at the bugs
gjaldon has joined #ruby-lang
<injekt> shevy: stop looking at them and fix them silly
<shevy> :(
<lordzero> hehe
<lordzero> poor shevy
<lordzero> since everyone is up and keeping busy, can anyone look as to why this loop doesnt seem to work to keep getting new values? http://pastie.org/3690854
bish0p has joined #ruby-lang
bish0p has joined #ruby-lang
gokul has joined #ruby-lang
stiang has joined #ruby-lang
<shevy> query = queryFormat tResults
<shevy> I would put this into the next line
<shevy> also when an error happens, it wont get any new values right?
<shevy> @client.track query do |status|
<shevy> and what is this, is this
<shevy> @client.track(query) do |status|
<rking> shevy: Yes, those last 2 lines are the same.
<rking> But I don't understand your question before that.
<shevy> you wrote that the loop wont get any new values
<rking> Oh, you're referring to lordzero's code.
toertore has joined #ruby-lang
<shevy> ah
<shevy> you are both pink here
<shevy> :\
<rking> Hehe
<shevy> lordzero!!! wake up!
<rking> shevy: What if queryFormat is set up so it returns single values repeatedly until the end?
<shevy> yeah that is all a problem, that code shows only a snippet, not even the precise error either
kitallis has joined #ruby-lang
tekin has joined #ruby-lang
d3vic3 has joined #ruby-lang
A124 has joined #ruby-lang
telemachus has joined #ruby-lang
vish_ has joined #ruby-lang
manoj has joined #ruby-lang
shtirlic_ has joined #ruby-lang
shtirlic_ has joined #ruby-lang
RORgasm has joined #ruby-lang
lsegal has joined #ruby-lang
fragrant has joined #ruby-lang
<fragrant> Hello
<fragrant> Anyone is doing research with ruby programmers?
<shevy> yeah
<shevy> I got some impaled on polearms and study their facial response to it
m3nd3s has joined #ruby-lang
fragrant has quit [#ruby-lang]
d3vic3 has joined #ruby-lang
toretore has joined #ruby-lang
m3nd3s has joined #ruby-lang
nofxx has joined #ruby-lang
m3nd3s has joined #ruby-lang
havenn has joined #ruby-lang
mark_locklear has joined #ruby-lang
<Defusal> bleh
<judofyr> bleh?
<judofyr> Defusal: still stuck with PHP?
<Defusal> most certainly not :P
<darix> or perl?
<Defusal> eww
<Defusal> rb-inotify has a close_write and close_nowrite flag, but only a single open flag
<shevy> easy
<shevy> you can only open, never close!!!
<Defusal> so i have no idea how to tell whether the log file is being opened by my applications tail, instead of the logging application
<Defusal> which breaks state
<Defusal> im not sure how to solve this
<Defusal> i tried assuming the next open even after starting to tail is the tail, but it usually not
Clordio_ has joined #ruby-lang
<Defusal> unless i can find a way to tell which open event is my own tail, i have no way to know when the logger actually closes the file
<Defusal> any ideas?
<Defusal> heh :/
sora_h has joined #ruby-lang
<shevy> if it helps you
<shevy> I can feel your pain
<shevy> :)
<Defusal> :(
<Defusal> my only other option is to tail every single file as soon as it exists forever
<Defusal> and well, that is not ideal
Joeysomo has joined #ruby-lang
<shevy> hehe
<Defusal> i just love spending hours implementing a system, just to find out right at the end theres some small limitation which forces me to redo most of it :|
Nss has joined #ruby-lang
<lsegal> yay for design up front
mssola has joined #ruby-lang
<shevy> yay for sex with hippies
<andrewvos> What's going on here then :/
RickHull has joined #ruby-lang
dv310p3r has joined #ruby-lang
workmad3 has joined #ruby-lang
rohit has joined #ruby-lang
ascarter_ has joined #ruby-lang
RickHull has joined #ruby-lang
<Defusal> does anyone know what happened to tmm1 and raggi? i havn't seen them speak on irc in a very long time, and EventMachine is kinda being neglected as a result of their inactivity :(
<Defusal> raggi isn't even in here anymore :/
<injekt> Defusal: raggi is usually more active on twitter than here
<injekt> he rarely irc's anymore
<Defusal> he idles in #eventmachine
<Defusal> but hes never around
<khaase> Defusal: saw raggi talk a few days ago in #rack
<injekt> email him and tell him you feel it's being neglected? maybe you can push for a commit bit
<Defusal> heh :/
<Defusal> i've already worked around most of the issues i have run into
<Defusal> but its still rather annoying
<injekt> chances are if you're having them other people are, and if you've worked around them, why not patch it and send a PR?
<judofyr> I haven't seen tmm1 here at all pretty much…
<Defusal> having to do things like wrap blocking popen3 code in a deferred thread and callback to the EM thread because EMs spawning methods have flaws
<injekt> uh
moogs has joined #ruby-lang
<Defusal> that virtually the only thing i have to actually use threads for in my application
<Defusal> everything else using the EM reactor
<Defusal> injekt, i don't have time to learn and fix native code
<injekt> then you're having the same issues as they are?
<injekt> time
<Defusal> i have enough of my own native code to maintain, without having to work on other peoples libraries
<Defusal> well i often hit edge cases, i guess most people only use the common parts of the framework
<Defusal> and only in common ways
<Defusal> i mean, i saw a thread on a mailing list from i think 2001, which said the next version of EM would be patched with inotify and a similar one speaking about the netlink code from the God gem
<Defusal> yet nothing has been done, over 10 years later...
<Defusal> so i end up having to implement my own stuff and have the reactor watch the IO descriptors
gianlucadv has joined #ruby-lang
<Defusal> its just very inconvenient :(
enebo has joined #ruby-lang
<injekt> you're putting a lot of energy into complaining about this where neither of the authors are present, why not email them?
<Defusal> well i assume if they are negecting it, they don't have time for it
<judofyr> I think he just likes to complain…
<injekt> well they dont
<injekt> so build your own?
<Defusal> so i guess telling them this will not help
<Defusal> oh well :/
<Defusal> build my own what?
<judofyr> Defusal: at least open an issue on GitHub…
<injekt> it has a higher percentage of helping than complaining on irc :P
<Defusal> lol
<Defusal> judofyr, i'll add that to my very long to do list
<injekt> you must be busy
<injekt> you must be on a break now or something though? :P
<Defusal> and next time i run into issues i'll try add them to github
fayimora has joined #ruby-lang
<Defusal> yes, i am extremely busy :/
<Defusal> and yes, i am eating breakfast
<Defusal> at 3:30pm :/
justinxreese has joined #ruby-lang
<judofyr> woah. they have 156 open issues on GitHub…
<injekt> baha
codewrangler has joined #ruby-lang
<injekt> bundler still smashes that
<judofyr> rails has 792. jesus, how do they manage all that?
<Defusal> as i said, its been over 10 years since they said "x and y would be implemented"
<Defusal> so their issues will grow exponentially
<injekt> judofyr: they're quite productive with it and I don't know how they work their system
JEG2 has joined #ruby-lang
<injekt> because the github issue tracker isn't good enough for great management with issues, imo
<judofyr> injekt: Rails has ~225 issues with no comments at all
dejongge has joined #ruby-lang
<judofyr> doesn't sound like a good situation…
<rippa> rails has 99 problems but a bitch ain't one
<injekt> heh, true, but with the scale of rails I'm not surprised
<injekt> the oldest issue with no comments is 9 months old
<judofyr> injekt: 10 months: https://github.com/rails/rails/issues/1347
<injekt> the thing is, people can't just close rails issues anymore because if they do people are all over hacker news calling them assholes
<injekt> judofyr: ah missed that one, saw the sqlite one
<injekt> they dont really use labels..
<injekt> judofyr: what's your thoughts on rails.app?
<judofyr> injekt: the idea: why not use bash scripts?
<injekt> boom
<injekt> +1
<injekt> Rails.app will be more noob friendly apparently, with buttons like MAMP
<judofyr> I hate the concept of dumbing down stuff for beginners. we shouldn't need to make separate tools for beginners; we should make the real tools be easier.
<injekt> the beginners need to also take time to learn how the shit works
<injekt> seen to much of that not happening lately
<injekt> too*
<judofyr> e.g. I think that the whole CodeCademy "let's teach through REPL *only*" is silly.
<judofyr> writing stuff in files is a part of programming
<injekt> someone should teach people to use the terminal THROUGH an online terminal
<injekt> anything related to programming should be done in files
<judofyr> …
<injekt> who builds programs in a repl
<judofyr> exactly
dv310p3r has joined #ruby-lang
Natch has joined #ruby-lang
virunga has joined #ruby-lang
RORgasm has joined #ruby-lang
<judofyr> injekt: besides, I don't like that we now add *another* thing. installing Ruby is too hard? let's write RVM! RVM too hard? let's write Rails.app! what's next?
<tobiasvl> SHOES
fgomez has joined #ruby-lang
fgomez has joined #ruby-lang
<judofyr> NOBODY KNOWS SHOES
<yorickpeterse> lol shoes
<Defusal> i added a repl to my platform recently, it makes development and debugging a lot easier, but thats because its EM-based, it really depends on the kind of application
<tobiasvl> well lol shoes but the LITTLE CODER'S MANIFESTO or what it was called is pretty relevant and good
<judofyr> Defusal: as in, you can hook into the running process?
<andrewvos> roflshoes
<Defusal> judofyr, yeah i used readline and DRb for the client, and ripl-readline-em for the connector
<yorickpeterse> *cough* Pry *cough*
<Defusal> it colours output and does simple constant and method completion too, which is quite useful
<Defusal> yeah i was told about pry remote after i did that
<Defusal> i'll probably replace it with that eventually
<Defusal> since pry will be more feature complete
<Defusal> also will have to see if theres a EM pry interface
<injekt> man you love em
<Defusal> indeed i do injekt :)
<Defusal> every single one of my platforms is EM-based
<injekt> not a single one of mine is
<judofyr> injekt: what do you think about EM?
<yorickpeterse> Defusal: there's...shit, it's already mentioned
<Defusal> threading causes unnecessary overhead for IO-heavy software
<Defusal> judofyr and yorickpeterse, cool :)
<injekt> judofyr: I dont really think about it, I've not used anything where I feel I've needed it, I guess
<Defusal> syncing threads can also be a pain
<judofyr> yorickpeterse: too fast for ya
<Defusal> single threaded event based code is far better for IO-heavy stuff, which pretty much all my software is
tekin has joined #ruby-lang
jxie has joined #ruby-lang
<yorickpeterse> Threading is somewhat useless in YARV anyway
<judofyr> EM is a mess though. so much different stuff (EM::Synchrony and whatever)
<yorickpeterse> Scumbag GIL
<judofyr> aren't all GILs scumbags?
<Defusal> judofyr, EM:Synchrony is not EM
<judofyr> Defusal: but it's a part of the EM community
<Defusal> its for wrapping EM callbacks in fibers
<Defusal> i've used fibers one two of my platforms so far
<injekt> I used fibers once
<injekt> because I was fuckin with fibers
<Defusal> i havn't used them in quite a while... i kinda want to use them for the platform i'm currently working on, but at the same time dont want to
<Defusal> the callback spaghetti is just getting a bit much
<rking> Wow. I've been out of the game for about 5 years, and so much has changed in the Ruby world (for the better, though it means I have a lot of catching up to do).
<Defusal> rking, hehe
<injekt> rking: we're now 4 space indent and use camelCase
<injekt> and factories are everywhere
<rking> Glad they finally got some sense about them.
nguerin has joined #ruby-lang
<Defusal> haha
slyphon has joined #ruby-lang
<rking> injekt: Did they also realize that Python had it right when they did away with silly things like [1,2,3].length and changed it to len([1,2,3])?
<injekt> haha
<injekt> thank god not
<rking> =D
RickHull has joined #ruby-lang
bryancp has joined #ruby-lang
d3vic3 has joined #ruby-lang
<yorickpeterse> OMG FIBERS
<yorickpeterse> How do they work?
io_syl has joined #ruby-lang
<injekt> by fibering the fiber fibers factory
<rking> There's those factories, again.
<injekt> told you!
<apeiros_> I feel it in my fibers… *sing*
dfr|mac has joined #ruby-lang
outoftime has joined #ruby-lang
Natch| has joined #ruby-lang
<andrewvos> Are you guys all on drugs?
<injekt> just you
<rking> andrewvos: Quick question before I answer. Does coffee count?
<tobiasvl> and what about nicotine
<andrewvos> rking: No. Coffee is not a drug. Unless you're a tiny little girl.
<rking> andrewvos: Also, does PCP count?
<Spooner> rking: Depends if you are injecting it or smoking it.
<andrewvos> rking: I'll allow it.
<injekt> andrewvos: maybe rking is a tiny girl.. dont hate
<apeiros_> andrewvos: no, I'm just fucking annoyed after checking like 10 hotels to book one for railsberry…
<apeiros_> and all sold out
<apeiros_> naturally
<rking> Interesting. I'm doing the EdgeCase koans, and it asks which is better: o.nil? or o == nil. My intuition says o.nil? because it's more expressive, but I don't know if I can support that further.
<andrewvos> Sorry I'm not being a programmer bro. s/tiny little girl/tiny little child/
<apeiros_> and naturally, they got sold out in the time I waited for the approval…
casaram has joined #ruby-lang
RORgasm has joined #ruby-lang
mistym has joined #ruby-lang
<rking> Ugh. I know I'm preaching to the choir, but I love Ruby so much. I am going to have to put my nose all the way to the grindstone this next few months in hopes that I can get employable as a Ruby guy.
Indian has joined #ruby-lang
<Defusal> andrewvos, thanks for reminding me to take my medication :)
<rking> Defusal: Oh? Got a blood test coming up you're trying to pass? Good strategy.
<Defusal> nah, actual medication :P
<rking> Nah I was saying it as in psych meds that they make you take. Too obscure.
<Defusal> oh, haha
<Defusal> this stuff is equal to a very strong cup of coffee
<any-key> just drink coffee then, it's cheaper
<Defusal> since i don't have time to sleep much a the moment, countering fatigue and increasing cognition is important
kenips has joined #ruby-lang
<Defusal> coffee has a long half life and decreases your quality of sleep even 20 hours after having a cup
<any-key> sign me up!
<Defusal> i've had to stop all coffee, with the amount of sleep i have time for, i cant afford for the quality of it to be any less than is possible
<any-key> but taking a stimulant is different?
<Defusal> no, a decent stimulant would be a lot worse, which is why i can't take any of those either :/
<any-key> stimulants beyond a cup of coffee really suck to take, I'll leave it at that
<Defusal> indeed
<Defusal> a cup of coffee alone sucks a lot more than most people are aware of
<any-key> dunno about that
<Defusal> most people in todays society are sleep deprived, but mask it with coffee
kashyapkmbc has joined #ruby-lang
<rking> Wait. 0 == false.object_id and 2 == true.object_id. What is 1?
<rking> maybe.object_id ?
<any-key> I won't argue with that, but in all honesty the act of drinking a nice warm beverage in the morning is very nice
<outoftime> rking: 0
<Defusal> any-key, you don't have to convince me of that :P
<Defusal> its been very hard to stop myself wanting a cup in the morning
<Defusal> the best i can do is a cup of green tea
<telemachus> judofyr: re: bash scripts have you looked at thoughtbot's laptop project?
<outoftime> rking: a fixnum's object_id is (num * 2 + 1)
<tobiasvl> <Defusal> most people in todays society are sleep deprived, but mask it with coffee
<rking> outoftime: Aha, yep. How would I reverse this? Like look up an object by Id?
<tobiasvl> Defusal: or perhaps s,sleep deprived,caffeine addicted,
<any-key> Defusal: tea is supposedly better; it works longer and the dropoff is less extreme
<Defusal> yup
<telemachus> I just saw it today after reading about rails.app. So far it's Apple only and assumes a lot (zsh, rvm), but I like the idea of it a lot.
<outoftime> rking: there's a way to do that, but I require you justify your need to : )
<tobiasvl> that is, caffeine withdrawal makes you more tired
<Defusal> i've used green tea for about a year now
<Defusal> whenever i go back to coffee, even just one cup, i get screwed over a little later
<any-key> rking: yeah, you really shouldn't ever need to do that
<rking> outoftime: Only exploring. I find this num*2+1 thing interesting.
<any-key> Defusal: maybe you shouldn't drink mean coffee and drink nice coffee instead
<mistym> Tea reminds me, I need to go make some silver needle :9 Guess low-caffeine's not that good for first thing in the morning but it's so tasty.
<Defusal> any-key, i've tried weak instant stuff, as well as imported filter coffee
<outoftime> rking: just don't do it in real code : )
<Defusal> but with my sleep schedule, i can't afford the loss in quality of sleep
<any-key> I was mostly just joking :P
<Defusal> coffees half life is way too long :P
<rking> outoftime: Coolness. The leading underscore means it's for Enterprise Application use, right?
<any-key> outoftime: should've waited for a reason
<outoftime> any-key: look up : )
<any-key> ah whoops
<outoftime> rking: the leading underscore means "Don't use this, ever."
<Defusal> but hey, i would definitely be using coffee if i had time to get a decent amount of sleep per day
<Defusal> i sure miss it
<rking> outoftime: I was kidding. I shouldn't kid.
<judofyr> telemachus: yeah; looks opinionated and nice :)
<outoftime> rking: just making sure : )
<rking> outoftime: Thanks for lookin' out. =)
<judofyr> rking: also, notice how all symbols have even object ids :)
<any-key> everything is an object
<any-key> ruby has a reputation for objectifying things
<any-key> it can be quite rude
<rking> judofyr: I'm noticing that strings have -INT ones, but they only exist as id's once you call .object_id on them.
jxie has joined #ruby-lang
<telemachus> judofyr: Yup. I would like to see it support bash at least though. They're already thinking of that (and of maybe switching rvm for rbenv). Either way, it would be easy to fork and tweak to slightly other preferences.
<judofyr> rking: hm? only exist?
<rking> Interesting. Symbols are not that way. If you start a new irb and do ObjectSpace._id2ref(118578), sure enough it gives you :b.
<outoftime> rking: symbols are interned, which means any given symbol value is always the same object
<outoftime> rking: each time you type a string literal, it creates a new object
<outoftime> rking: :rking.object_id == :rking.object_id #=> true
<outoftime> rking: "rking".object_id == "rking.object_id" #=> false
<outoftime> syntax error
<injekt> too quick!
<rking> judofyr: Ok, what I did was: "a".object_id, and it gave me like -12341234. Then ObjectSpace._id2ref(-12341234) returned "a". But when I restarted and tried the _id2ref() again, it didn't work.
<injekt> and no syntax error
<judofyr> well, "rking".object_id == "rking.object_id" is false though
<injekt> it would still be false
<injekt> too slow injekt, dammit judofyr
<outoftime> injekt: right, actually, my code is entirely correct : )
<outoftime> just not especially useful.
<judofyr> rking: ah, right. that's because the object doesn't exist in a new Ruby instance
<RickHull> perfectly cromulent
olesu has joined #ruby-lang
<judofyr> rking: if I kill you and throw you away, I can revive you from the name alone
<judofyr> it's the same with objects
<judofyr> err
pygmael has joined #ruby-lang
<judofyr> I can't* revive you
<rking> judofyr: OK.. so I'm seeing something kind of weird. :b.object_id works across invocations, but not :asdasdfdsafd.
<rking> Looks like perhaps all the single-letter symbols are already instantiated.
<judofyr> rking: really? is consistent here: ruby -e'p :asdasdfdsafd.object_id'
<rking> judofyr: Now try changing that to :jklkjkl and see what it prints.
<judofyr> rking: but that ID will change if anything else is allocated earlier
<judofyr> rking: sure. it's just a counter. first object allocated gets that id.
<judofyr> well, at least for symbols
<judofyr> they are simple
<judofyr> other objects might cause other stuff to allocate too, and then it's not consistent anymore
casaram has joined #ruby-lang
<judofyr> rking: know anything about pointers (in C)?
telemachus_ has joined #ruby-lang
<rking> judofyr: Definitely.
<judofyr> rking: the object_id is just a pointer :)
<judofyr> rking: which points to the heap.
<judofyr> well, except for fixnums
<judofyr> they are embedded in the object_id
<judofyr> and nil, true, false
<rking> judofyr: It's like a pointer or it's literally a machine-code address?
<judofyr> rking: literally a machine-code address
<rking> BTW, for a good time: pick some n then: 0.upto(n) do |e| begin x = ObjectSpace._id2ref(e); p x unless Fixnum == x.class; rescue; end; end
<judofyr> rking: you can just skip all odd numbers; they are guaranteed to be fixnums anyway
Natch has joined #ruby-lang
<rking> Good point.
<rking> Oh, and I'll have to crawl downwards to get really interesting.
casaram has joined #ruby-lang
urbanmonk has joined #ruby-lang
heftig has joined #ruby-lang
<rking> judofyr: injekt: outoftime: Thanks btw.
<rking> any-key: Also you.
<outoftime> rking: shore thing. always good to see folks getting their hands dirty with the language : )
<any-key> I didn't do anything :O
<rking> I'd have to go downwards for about a trillion ints to see anything. =D
<any-key> yeah gettin dirty with new languages is the way to go
<kalleth> i'm after a simple app to run a series of user-defined scripts on a remote machine and report the output (perhaps via a nice web interface), anything exist like that in the ruby world, or do i need to code one myself and o/s it :)
<any-key> just use protection
<rking> any-key: Well, you said everything is an object, which if I didn't know that it would have been good to hear. =)
<rking> kalleth: ssh ?
<kalleth> rking: i was waiting for 'comedy ssh + bash' answer :P
<rking> kalleth: =( My answer is comedy. =(
<kalleth> its the reporting of the output that's the main thing
<any-key> there's a net/ssh thingy, it works well
<rking> kalleth: I figured since it's all stdio it shouldn't be so bad.
<kalleth> mm
* rking wonders now if ssh sorts out STDOUT/STDERR.
<kalleth> so net/ssh to execute the commands/scripts, and write my own sinatra wrapper around that to use net/ssh and report the results
<any-key> just grab the results with net/ssh
telemach- has joined #ruby-lang
Oloryn_lt21 has joined #ruby-lang
<judofyr> rking: I'm pretty sure that SSH just redirects STDOUT/STDERR to the same pipe (which is then printed to the client's STDOUT)
Paoc_ has joined #ruby-lang
Paoc_ has quit [#ruby-lang]
<rking> judofyr: Actually, nope. I tested it now with ssh foo "ruby -e 'print %q[asdf]'" > /dev/null # then s/print/warn/. The print gets redirected to /dev/null, but the warn doesn't.
<rking> Which is a pretty yummy moment of Unixness to go with my cup of coffee this morning.
<judofyr> nais
<any-key> I love the smell of unix in the morning
rippa has joined #ruby-lang
kitallis has joined #ruby-lang
<judofyr> rking: with FFI you can poke inside the pointers: http://cl.ly/252n2C0S3p0A3N3v2L0U
<judofyr> rking: the memory location is object_id*2
<judofyr> and the second long in RBasic is the class pointer
<judofyr> rking: observe: http://cl.ly/3L3Q2F111p1R442Z0S2L
imajes has joined #ruby-lang
<judofyr> changing the class :)
<rking> judofyr: Awesomeness. I didn't even know about pry until now.
<rking> I wonder if any other language is anywhere close to the vibrancy of the Ruby community.
<outoftime> probably : )
<rue> They're all just posers
<rking> My deal is: I've been in the Army for the last 5+ years, so I haven't done much coding during that time... so it's like I time-traveled into the future. There are so many amazing projects going on.
<mistym> rking: Still no flying cars though. :(
<outoftime> no jet packs either : \
<rking> mistym: I never was a hardware guy.
jkyle_ has joined #ruby-lang
<outoftime> rking: +1 on that. 5 years ago it was like... LAMP or Java/Oracle
rdavila has joined #ruby-lang
<rking> outoftime: And then you spent a good chunk of your time dealing with really disappointing browser incompatibilities to get Javascript to do anything. =\
slyphon has joined #ruby-lang
<outoftime> rking: yup
<Defusal> bleh i'm getting this very undescriptive C error from EventMachine which crashes ruby completely again
<Defusal> can see that taking plenty time to pinpoint the cause this time
<Defusal> but anyway...
<Defusal> i just wrote this wrapper method for waiting for multiple callbacks... if anyone have any ideas on how it could be improved, please let me know
<rking> Defusal: No gdb bt lovin?
<rue> Got some shut-eye, Defusal?
<Defusal> "some" :P
<injekt> Defusal: how do we see it?
<judofyr> rking: unfreezing: http://cl.ly/2a1d1E030x0p2C3I3n1P :D
<Defusal> here it is: http://pastie.org/3692286
<Defusal> injekt ^
<rking> judofyr: Teeheee... that's some serious data-tickling.
nguerin has joined #ruby-lang
<injekt> judofyr: you know if you highlight text in the terminal and do cntr+opt+c it'll paste the text so it's pasteable? :)
<Defusal> i don't think their is any way to get hold of the block without passing &cb to each method
<Defusal> so i can't really think of any way to improve it
<injekt> judofyr: er copyable*
<judofyr> injekt: pasteable code? who needs that?
<injekt> heh
<judofyr> Defusal: uhm? why not use a class?
<rking> injekt: I think he's trying to put up a barrier to other people running similar code.
<Defusal> judofyr, i just prototyped it now
Natch has joined #ruby-lang
<judofyr> Defusal: but yeah, I've written the exact same code in Perl: https://metacpan.org/module/Mojolicious::Plugin::Parallol
imperator has joined #ruby-lang
<Defusal> it could be moved to a class, but i tested it in my repl
<judofyr> injekt: no syntax highlighting though :(
<injekt> judofyr: yeah :(
<Defusal> ah ok, perl is reasonably more ugly judofyr ;)
<injekt> perl <3
<Defusal> i guess thats the best i can do anyway
<Defusal> rather this than use fibers i guess
<judofyr> Defusal: err. that's two completely different usecases.
<judofyr> this is for parallelism
<judofyr> fibers is for sync stuff
<Defusal> judofyr, to some extent
<Defusal> all i can tell you is, fibers are usually the furthest think from my mind
<jasiek> why are there two classes for representing essentially the same thing in Ruby, eg. Time & DateTime
<rking> judofyr: BTW, how did you know to shift 11 times to get to that freeze bit?
<Defusal> but in the last two days, i have had to implement a few things that would be far easier if it were fibered
<any-key> high fiber diet
<any-key> nomnomnom
<Defusal> but anyway, i don't have time to make any major changes to anything at this point
<injekt> jasiek: DateTime doesn't care about you as much
<Defusal> so i just gotta make do
<judofyr> Defusal: your code doesn't work so well if the callback returns right away
<judofyr> (and is not queued by the event-loop)
dv310p3r has joined #ruby-lang
<injekt> jasiek: Time is simply a wrapper around time_t, and is bounded
<injekt> although time changed a little between 1.8 and 1.9 iirc
<Defusal> hmm
wmoxam has joined #ruby-lang
<Defusal> well i don't really have any such code
<Defusal> but thanks for pointing that out
<judofyr> Defusal: just FYI. sometimes you want to have quick error handling: return yield error if arguments == :iswrong
lsegal has joined #ruby-lang
wyhaines has joined #ruby-lang
<Defusal> well the wrapper method has no idea whats wrong
<injekt> jasiek: oh and Time is usually better at parsing dates
<Defusal> its up to the async methods, which if error handling is needed, will return something relevant in their callback, which will be queued by the wrapper
looopy has joined #ruby-lang
<jasiek> injekt: what do you mean by 'doesn't care about you so much?'
<injekt> jasiek: DateTime is open ended, Time is bounded. DateTime doesn't care about your timezone, Time does
<injekt> all of this shit I have to deal with in chronic
<jasiek> injekt: gotcha.
<judofyr> rking: ta-da: https://gist.github.com/2238438
<judofyr> rking: feel free to fork and improve
<injekt> jasiek: the question is, what are you trying to do? :)
<judofyr> rking: there's probably something here we can steal: https://github.com/yugui/evil-ruby/blob/master/lib/evil.rb
<jasiek> injekt: i trying to decide which one to use. DateTime doesn't seem to play nice with mongoid & timezones, which led me to ask why there are two ways to do the same thing.
kvirani has joined #ruby-lang
<injekt> jasiek: ah
<injekt> jasiek: yeah datetime doesn't care about timezones
<rking> judofyr: Coolness. I'll learn this.
<judofyr> rking: please fork and have fun :)
<injekt> jasiek: are you using rails?
<judofyr> rking: sharing instance variable table sounds fun…
<jasiek> injekt: yep
<injekt> jasiek: rails has a 'DateTime#change method, you can alter the timezone offset yourself (unless that doesn't help)
<jasiek> i think i'll just stick with Time, that seems to work consistently
<rking> judofyr: I'm going to go out on a limb and guess that you've tried cat /dev/urandom > /dev/mem at least once in your life.
<injekt> Yeah, just beware it's bounded to epoch
brianpWins has joined #ruby-lang
<judofyr> rking: I hate that OS X doesn't expose the speakers as /dev/something. I want to play muuuuusic
<rking> judofyr: Weak. =\
<jasiek> injekt: thanks.
Sailias has joined #ruby-lang
andkerosine has joined #ruby-lang
<andkerosine> Possible to filter on multiple values from a Mongo array?
ben_s has joined #ruby-lang
<mistym> judofyr: pry less fun than just catting to /dev/smth but there is a coreaudio gem ;)
tbuehlmann has joined #ruby-lang
chimkan has joined #ruby-lang
Natch has joined #ruby-lang
havenn has joined #ruby-lang
casaram has joined #ruby-lang
<Defusal> sigh
<Defusal> i thought i would be smart and replace my file based child process pid tracking with ping/timeout protocol over DRb after reading Doobies discussion the other night
<Defusal> at first glace it worked fine
<Defusal> but now i'm noticing EM is crashing ruby when i reload my modules
<Defusal> just pinpointing the source of the problem could take a while :(
<Defusal> terminate called after throwing an instance of 'std::runtime_error'
<Defusal> what(): unable to add new descriptor: Bad file descriptor
<Defusal> Aborted
futurechimp has joined #ruby-lang
<bougyman> which ruby version?
<Defusal> 1.9.3
ben_s has quit [#ruby-lang]
<bougyman> that was an issue before 1.9.3, we ran into it in drb on windows often.
<bougyman> but haven't seen it in 1.9.3.
<bougyman> have you tried BRB?
<bougyman> EM doesn't really like sharing with drb.
wwalker has joined #ruby-lang
shyouhei_ has joined #ruby-lang
<Defusal> bougyman, this is 1.9.3 on linux
<wwalker> https://gist.github.com/2238877 - uh, I don't even have a clue what to google for. "gem on mescaline" "gem and peyote" ?
<Defusal> and as much as i'd like to use BRB, it is immature and not maintained
m3nd3s has joined #ruby-lang
<Defusal> i don't have time to fix its issues
<Defusal> when i have used it in the past, i have experienced connection loss over wired LAN which is invisible to the library, events never fire
<Defusal> sigh
kitallis_ has joined #ruby-lang
wwalker has quit [#ruby-lang]
<Defusal> DRb is a fundamental part of my application core
<Defusal> but i need to find a solution to this crash :(
<Defusal> i don't even know where to start
<Defusal> it appears to happen after DRb has been used successfully
<Defusal> the next time i try to do anything
IPGlider has joined #ruby-lang
Paoc_ has joined #ruby-lang
<rking> Hrm.. I don't think I understand how this works: a=[1,2,3,4]; a[2..-1] == [3,4].. but [2..-1].to_a gives []. Is it basically that Array#[] handles Range specially with a negative end number?
erics has joined #ruby-lang
nguerin_ has joined #ruby-lang
<rue> Essentially
rohit_ has joined #ruby-lang
imperator has joined #ruby-lang
<rking> Kk, thanks rue.
voker57 has joined #ruby-lang
<Defusal> oh dear
H2H has joined #ruby-lang
<Defusal> i am so utterly screwed, this is not even funny anymore
<Defusal> i can't even find the cause of one issue, but keep finding more
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
<Defusal> now i can't even test anymore, rb-inotifier does not automatically close inotify handles, so if you dont manually do it, such as when the app doesn't exit cleanly, the handles are left open on the kernel forever...
<Defusal> so now its maxed out my user limit for inotify
<Defusal> Exception: Too many open files - Failed to initialize inotify: the user limit on the total number of inotify instances has been reached.
darkf has joined #ruby-lang
SuperTaz_work has joined #ruby-lang
<injekt> Defusal: how do you get any work done? :D
<Defusal> so between EventMachine crashing ruby and rb-inotifier, it's really screwed me over
<Defusal> injekt, when thing kind of thing happens, i don't :/
<Defusal> who knows how i'm going to be able to complete this by the end of the month
<Defusal> sigh :|
<injekt> not if you're complaining on irc all the time you'll get nothing done
<injekt> :D
<Defusal> injekt, well what can i do?
<Defusal> i don't have a next step
<Defusal> i guess i have to find out how to tell the kernel to manually clean inotify
<Defusal> clear*
<Defusal> but then im stuck with EM crashing ruby
Natch has joined #ruby-lang
<Defusal> so.. no comment
<andkerosine> #ruby-lang == Google #=> false
<andkerosine> : P
<Defusal> andkerosine, did i ask you anything?
<andkerosine> Afraid that's not how open dialogue works, my friend.
<Defusal> not in the mood.
butchanton has joined #ruby-lang
<injekt> Defusal: dude you cant come on here complaining about your problems, offering no questions, and expect people not to openly comment
<injekt> if you want your complaints to be productive, it's your job to ask the right questions
<Defusal> injekt, i don't have questions to ask, hence i have not asked any
<Defusal> im just stating my issues for the benefit of anyone in here who may consider using these libraries in the future
<injekt> write, you're complaining openly and expecting people not to comment about it because 'you werent speaking to them'
<injekt> right*
<Defusal> so that they can stay as far away from them as possible, or at least know what issues they will need to overcome
<Defusal> injekt, ok, i will keep my issues to myself in future.
<Defusal> injekt, and its not about people commenting
<Defusal> andkerosine made a statement which is related to a question being asked
<injekt> Excellent, if you have a productive discussion to share with people who are interested please do, but just relaying all issues is little benefit to anyone else, and more importantly yourself
<injekt> understood
<Defusal> since i did not ask any question, it is invalid
<Defusal> -.-
<rohit_> Defusal, Maybe there is a #emo channel that you can join and rant in?
uniqanomaly has joined #ruby-lang
<injekt> or we could not make things worse, rohit_? ;)
<rohit_> Sorry :)
<Defusal> rohit_, Maybe theres a #whothehellareyou channel you can join and part this one
<rue> Behave.
<rohit_> Defusal, Sorry I overreacted. My bad. :)
dfr|mac has joined #ruby-lang
<Defusal> rue: im going to take a nap, any remaining self control i have will be gone very soon
<Defusal> yet im not sure i'll be able to actually sleep
bryancp has joined #ruby-lang
ddfreyne has joined #ruby-lang
H2H_ has joined #ruby-lang
listrophy has joined #ruby-lang
_santana has joined #ruby-lang
autodidakto has joined #ruby-lang
<listrophy> how do i simulate the wait_thr value of Open3.popen3 in 1.8.7?
telemachus has quit [#ruby-lang]
_santana has quit [#ruby-lang]
dv310p3r has joined #ruby-lang
savage- has joined #ruby-lang
io_syl has joined #ruby-lang
io_syl has joined #ruby-lang
jkyle__ has joined #ruby-lang
Natch| has joined #ruby-lang
olesu has joined #ruby-lang
ascarter_ has joined #ruby-lang
telemachus has joined #ruby-lang
apeiros_ has joined #ruby-lang
bryancp has joined #ruby-lang
eyda|mon has quit ["WeeChat 0.3.7"]
lsegal has joined #ruby-lang
malev has joined #ruby-lang
havenn has joined #ruby-lang
scampbell has joined #ruby-lang
fgomez has joined #ruby-lang
towski has joined #ruby-lang
towski has joined #ruby-lang
nguerin has joined #ruby-lang
Natch| has joined #ruby-lang
looopy has joined #ruby-lang
gnufied has joined #ruby-lang
nguerin has joined #ruby-lang
Kuukunen has joined #ruby-lang
publicvoid has joined #ruby-lang
H2H has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
ascarter_ has joined #ruby-lang
Skif has joined #ruby-lang
gregf has joined #ruby-lang
hagabaka has joined #ruby-lang
kvirani has joined #ruby-lang
casaram has joined #ruby-lang
Zolrath has joined #ruby-lang
havenn has joined #ruby-lang
casaram has joined #ruby-lang
ascarter_ has joined #ruby-lang
savage- has joined #ruby-lang
Jade has joined #ruby-lang
Sailias has joined #ruby-lang
Jade has joined #ruby-lang
nguerin_ has joined #ruby-lang
achiu has joined #ruby-lang
nguerin has joined #ruby-lang
Austin__ has joined #ruby-lang
olesu has joined #ruby-lang
nofxx has joined #ruby-lang
Jade has joined #ruby-lang
ascarter_ has joined #ruby-lang
havenn has joined #ruby-lang
<Defusal> manveru: are you around?
takaokouji has joined #ruby-lang
imperator has joined #ruby-lang
workmad3 has joined #ruby-lang
<Defusal> does anyone here by any chance know how i can clear all inotify file descriptors for a user, or even just get a list of all of them so i can try get some code to do it?
<bougyman> lsof
<Defusal> bougyman, that only works for an application that is running
<Defusal> this application has been down for hours
<bougyman> Defusal: it works for any filehandle the user has open
<Defusal> hmm
<bougyman> wait, sorry, you asked how to clear them
<bougyman> lsof only lists them, sorry skipped to the second half of your sentence somehow.
<Defusal> bougyman, every line of lsof stats with the process name
<Defusal> bougyman, these are not listed here
<Defusal> since theres no process running anymore
<Defusal> i have no idea how this stupid gem leaked them
rdeshpande has joined #ruby-lang
<Defusal> but as soon as i find a way to clear them, i'm going to replace it with another random gem in a deferred thread and hope for the best
rdavila has joined #ruby-lang
jmontross has joined #ruby-lang
RORgasm has joined #ruby-lang
bglusman has joined #ruby-lang
kitallis_ has joined #ruby-lang
dejongge has joined #ruby-lang
enebo has joined #ruby-lang
<Defusal> this is ridiculous :(
leopard_me has joined #ruby-lang
leopard_me has joined #ruby-lang
<jmontross> ?
Jade has joined #ruby-lang
Jade has joined #ruby-lang
curtism has joined #ruby-lang
Radium has joined #ruby-lang
erics has joined #ruby-lang
Skif has joined #ruby-lang
JEG2 has joined #ruby-lang
<necromancer> any guard users here? i keep getting "Exception encountered: #<LoadError: cannot load such file -- test_helper>" when i run tests on guard+spork
<drbrain> necromancer: add -Itest to your ruby command?
<necromancer> drbrain: using ruby -Itest it works fine, i'm trying to run the test with Guard
<drbrain> ah
<drbrain> ruby -Itest -S Guard is the next thing that comes to mind :/
<drbrain> maybe Guard has a load-path option?
headius has joined #ruby-lang
chimkan has joined #ruby-lang
justinmcp has joined #ruby-lang
scientes has joined #ruby-lang
heftig has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
autodidakto has quit [#ruby-lang]
telemachus has joined #ruby-lang
nguerin has joined #ruby-lang
jmontross has quit [#ruby-lang]
heftig has joined #ruby-lang
postmodern has joined #ruby-lang
erics has joined #ruby-lang
ftravers has joined #ruby-lang
jxie_ has joined #ruby-lang
jmontross has joined #ruby-lang
dejongge has joined #ruby-lang
retro|cz has joined #ruby-lang
havenn has joined #ruby-lang
mikeric has joined #ruby-lang
nofxxx has joined #ruby-lang
chimkan has joined #ruby-lang
nofxx has joined #ruby-lang
vpamulap has joined #ruby-lang
ascarter_ has joined #ruby-lang
Indian has joined #ruby-lang
cczona has joined #ruby-lang
havenn has joined #ruby-lang
nofxxx has joined #ruby-lang
<Defusal> ok
<Defusal> so more than 4 hours later
<Defusal> i can be almost 100% certain this is a kernel bug
<Defusal> and i can't downgrade my kernel without physical access to the server
<Defusal> so im yet again screwed
<Defusal> at least i know other people are unlikely to experience this issue
slimfit has joined #ruby-lang
bglusman has joined #ruby-lang
m3nd3s has joined #ruby-lang
kitallis_ has joined #ruby-lang
tonesfrommars has joined #ruby-lang
m3nd3s has joined #ruby-lang
<erikh> rue: any interesting commenting on the UX? http://home.hollensbe.org
<erikh> it's a little aggregate reporter dashboard thingy I'm working on for chef
cube526 has joined #ruby-lang
m3nd3s has joined #ruby-lang
paul0 has joined #ruby-lang
kitallis_ has joined #ruby-lang
<Boohbah> Defusal: how did you determine that this is a kernel bug?
<Boohbah> did you try closing your open file descriptors?
<Defusal> a linux expert ran out of ideas
<Defusal> but i just found the real issue now
<Defusal> finally
<Boohbah> oh, what was it?
Hakon|mbp has joined #ruby-lang
<Defusal> a spawned child process never ended due to DRb or EventMachine causes a hard ruby crash
<Defusal> and that spawned process inherited the fds that were watched
<Defusal> *causing
m3nd3s has joined #ruby-lang
ironcamel has joined #ruby-lang
<ironcamel> is there a proper way to debug unit tests?
<ironcamel> are puts commands supposed to show up?
<ironcamel> i just want to print some info that is going on during a test
<burgestrand> ironcamel: puts is a very common way of debugging, yes, and it ought to work during tests, would be annoying otherwise
<burgestrand> ironcamel: also use pry sometimes to see what’s going on, http://pry.github.com/
<drbrain> ironcamel: unless you're capturing $stdout/$stderr, p and puts will work
<ironcamel> hmmm puts stuff is not showing up for some reason
<ironcamel> this app is using thor, and calling Tasks.start
<ironcamel> ah, nevermind
<ironcamel> puts finally showed up
<ironcamel> tests were justing hanging
fgomez has joined #ruby-lang
<ironcamel> is there a flush command or something?
<ironcamel> or autoflush setting
<ironcamel> is there a $| var?
<TTilus> seven woders of sw industry
<TTilus> 1) hanging tests
<ironcamel> TTilus: these are system level tests
<ironcamel> that spin up cloud servers
<TTilus> 2) chunky beacon
<ironcamel> and make sure they are pingable
<ironcamel> but thanks for your input
<TTilus> damn, cant come up with full seven of them
<drbrain> ironcamel: $stdout.sync = true
<ironcamel> drbrain: thanks, just found that
deryl has joined #ruby-lang
ascarte__ has joined #ruby-lang
Kyril has joined #ruby-lang
Kyril has joined #ruby-lang
headius has joined #ruby-lang
curtism has joined #ruby-lang
curtism has joined #ruby-lang
gregf has joined #ruby-lang
H2H has joined #ruby-lang
l0st1 has joined #ruby-lang
dv310p3r has joined #ruby-lang
GarethAdams has joined #ruby-lang
thone_ has joined #ruby-lang
<GarethAdams> Is there any way to determine the current visibility of a method?
fgomez has joined #ruby-lang
<GarethAdams> #public_method will raise a NameError with the visibility buried in the exception message, but there must be a better name, right?
fgomez has joined #ruby-lang
<GarethAdams> *better way
<drbrain> GarethAdams: check protected_methods and private_methods
<GarethAdams> seems a shame to need an O(n) operation to check that, but it works for me
tla has joined #ruby-lang
<drbrain> GarethAdams: agreed, but I think this is under the umbrella of "things you shouldn't be doing should be difficult and/or annoying"
<drbrain> which is one of the design tenants of ruby
<shevy> a sexy pole?
<GarethAdams> I'm making methods public long enough to unit test them, and then return them to their original state
casaram has joined #ruby-lang
<drbrain> GarethAdams: why not use send?
<amerine> 0_o
<GarethAdams> that's another option
<drbrain> it's certainly less error-prone
<GarethAdams> and with those hoops to jump through it's probably the better option
Zolrath has joined #ruby-lang
<drbrain> yeah, that's why the hoops are there, to make you step back and think "why is this so dang hard?"
RickHull has quit [#ruby-lang]
deryl has joined #ruby-lang
casaram has joined #ruby-lang
ascarter_ has joined #ruby-lang
virunga has joined #ruby-lang
Skif has joined #ruby-lang
robotmay has joined #ruby-lang
imperator has joined #ruby-lang
<imperator> Defusal, please file a bug report
<imperator> erikh, not sure, i don't have context, guess because i don't know chef
<erikh> imperator: np
<Defusal> imperator, for what?
<imperator> kernel bug
<Defusal> [22:31:31] <Defusal> but i just found the real issue now finally
<Defusal> [22:32:09] <Defusal> a spawned child process never ended due to DRb or EventMachine causing a hard ruby crash
<Defusal> [22:32:22] <Defusal> and that spawned process inherited the fds that were watched
<Defusal> imperator ^
<Defusal> i didn't notice that specific zombie "top" process
casaram has joined #ruby-lang
* imperator remembers mentioning something about zombies
<Defusal> imperator, indeed, it was however hiding :P
casaram has joined #ruby-lang
<Defusal> and it also caused all fds to be hidden from lsof
<Defusal> which is pretty strange
outoftime has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
wyhaines_ has joined #ruby-lang
woollyams has joined #ruby-lang
wyhaine__ has joined #ruby-lang
casaram has joined #ruby-lang
Sailias has joined #ruby-lang
slyphon has joined #ruby-lang
ftravers has quit [#ruby-lang]
Indian_ has joined #ruby-lang
Indian_ has joined #ruby-lang
dfr|mac has joined #ruby-lang
H2H has joined #ruby-lang
casaram has joined #ruby-lang
indeterminate has joined #ruby-lang
ascarter_ has joined #ruby-lang
H2H_ has joined #ruby-lang
erics has joined #ruby-lang
gsav has joined #ruby-lang
fgomez has joined #ruby-lang
havenn has joined #ruby-lang
looopy has joined #ruby-lang
uniqanomaly_ has joined #ruby-lang
looopy has joined #ruby-lang
nguerin has joined #ruby-lang
Torrieri has joined #ruby-lang
dous has joined #ruby-lang
Skif has joined #ruby-lang
Joeysomo has joined #ruby-lang
looopy has joined #ruby-lang
havenn has joined #ruby-lang
Joeysomo has joined #ruby-lang
imperator has joined #ruby-lang
kvirani has joined #ruby-lang
rdavila has joined #ruby-lang