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
bfreeman has joined #ruby-lang
WillMarshall has joined #ruby-lang
tomzx has joined #ruby-lang
Swimming_Bird has quit [Ping timeout: 248 seconds]
llakey has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
cored has quit [Quit: leaving]
fgomez has quit [Ping timeout: 244 seconds]
milram has quit [Quit: milram]
milram has joined #ruby-lang
milram has quit [Client Quit]
workmad3 has quit [Ping timeout: 245 seconds]
dasibre has joined #ruby-lang
yugui_zzz is now known as yugui
ryanf has quit [Quit: leaving]
b1rkh0ff has quit [Ping timeout: 245 seconds]
savage- has joined #ruby-lang
perryh_away is now known as perryh
fgomez has joined #ruby-lang
cmaxw has quit [Quit: cmaxw]
postmodern has joined #ruby-lang
replore has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
milram has joined #ruby-lang
cmaxw has joined #ruby-lang
milram has quit [Client Quit]
SimSala has quit [Ping timeout: 248 seconds]
S2kx has joined #ruby-lang
mistergibson has joined #ruby-lang
mistym has quit [Remote host closed the connection]
S1kx has quit [Ping timeout: 244 seconds]
cored has joined #ruby-lang
diegoviola has quit [Read error: Operation timed out]
fserb has joined #ruby-lang
bruno_coelho has joined #ruby-lang
Hakon|mbp has quit [Quit: Leaving...]
cored has quit [Read error: Connection reset by peer]
cored has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
savage- has quit [Remote host closed the connection]
<mistergibson> odd thing: in MRI 1.9.2+ ... a string no longer returns the ascii value "a"[0] >> "a" and such. Has anyone found a replacement for this functionality? currently, I'm forced to process through "a".each_byte to do things.
savage- has joined #ruby-lang
<heftig> mistergibson: .ord
<heftig> ?a.ord will return 97 in both 1.8 and 1.9
<mistergibson> heftig: that returns codepoints, not byte value
<mistergibson> I looked into that
<heftig> are you working with binary data?
<mistergibson> yup, packed in strings for extra goodness
<heftig> where from? a file?
<erikh> string.bytes[0] ?
<mistergibson> nope
<mistergibson> hrm, lemme see
<heftig> bytes == each_byte
<erikh> each_byte is an iterator
<erikh> slightly different
<mistergibson> erikh: no, returns an enumerator
<erikh> oh phooey
<erikh> well .bytes.to_a then :P
<heftig> erikh: no, those are aliases
Cykey has joined #ruby-lang
<mistergibson> I have made my own working methods, but it is weird that they'd impose this state of affairs
<heftig> if you're working with binary data, your string should have BINARY encoding
<erikh> yeah, bytes working that way is pretty silly.
<mistergibson> I just don't like the overhead of *having* to create an enumerator to do simple byte-wise indexing
<heftig> when reading from a file, you'd normally do that by passing mode "rb"
<heftig> on binary strings, there is no distinction between chars, codepoints or bytes
<erikh> yeah, heftig is probably right -- the "right" way of doing this is by changing the encoding
<mistergibson> I see
<heftig> er, well, other than chars still being one-char strings
<erikh> I'm guessing #ord will do what he wants then, though.
<heftig> yes
<heftig> "ä".force_encoding("BINARY")
<mistergibson> I see
<mistergibson> funky new-fangled way
<mistergibson> hrm
<mistergibson> no, still behaves the same way
<heftig> mistergibson: where's the data from then? a database? a socket?
<mistergibson> no, just a string in mem
<heftig> and where's that string from?
<mistergibson> mem
<heftig> that makes no sense
<mistergibson> heftig: I know about StringIO, IO, files, etc
<heftig> you'd have to read it from somewhere
<mistergibson> this is different
<mistergibson> heftig: no, I could generate data via methods
<mistergibson> heftig: which is what I'll need to do for formatting
<heftig> so make sure those methods work with binary strings
<mistergibson> anyhow
<mistergibson> yup
<mistergibson> looks like
<mistergibson> oh, got it ... my mistake
<mistergibson> NOW .ord works fine
<mistergibson> the scales fall from his eyes ... need more beer
<mistergibson> odd thing blah.encoding returns Encoding::UTF-8
<mistergibson> perhaps I should encode with ASCII
mistym has joined #ruby-lang
<mistergibson> ok, you have to .force_encoding(Encoding::ASCII_8BIT) and it all falls into place
<mistergibson> heftig, erikh : thanks for your help
dasibre has quit [Remote host closed the connection]
knu has quit [Ping timeout: 255 seconds]
dasibre has joined #ruby-lang
yannis has quit [Ping timeout: 256 seconds]
bruno_coelho has quit [Remote host closed the connection]
Cykey has quit [Quit: Computer has gone to sleep.]
neoesque has joined #ruby-lang
Swimming_Bird has quit [Ping timeout: 240 seconds]
andrew__ has quit [Remote host closed the connection]
Swimming_Bird has joined #ruby-lang
cored has quit [Read error: Connection reset by peer]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
bruno_coelho has joined #ruby-lang
x0F has quit [Disconnected by services]
bruno_coelho has quit [Remote host closed the connection]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
felipe__ has quit [Quit: Leaving]
ryanf has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
rmascarenhas has quit [Quit: leaving]
s0ber has quit [Read error: Operation timed out]
s0ber_ has joined #ruby-lang
s0ber_ is now known as s0ber
gregmore_ has joined #ruby-lang
Dreamer3 has quit [Quit: Computer has gone to sleep.]
gregmoreno has quit [Read error: Connection reset by peer]
replore has quit [Remote host closed the connection]
bglusman_ has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
bglusman has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
bglusman has quit [Ping timeout: 245 seconds]
zz_wasnotrice is now known as wasnotrice
bglusman has joined #ruby-lang
rubytux has joined #ruby-lang
<rubytux> newb question, what's the most basic way to update or change a hash key name?
<bnagy> rubytux: make a new hash
<rubytux> ok thx
<bnagy> rubytux: in 1.9 new=old_hsh.each.with_object({}) {|(oldk,oldv),new_hsh| newhsh[k.upcase]=v} or whatever
<bnagy> except without the bug
<rubytux> so if i had something like x = {'max' => 'up'} , to change max to something else i'd have to run through that statement you gave?
<bnagy> yeah, although there are a million ways you could do it
<bnagy> new={};old.each {|k,v| ... etc
halibut has quit [Read error: Operation timed out]
<lianj> or something like: class Hash; def change_key(old, new); return nil unless self[old]; self[new] = self[old]; delete(old); self[new]; end; end; h={ :a => 1 }; h.change_key(:a, :b); h
<rubytux> interesting, i guess i was hoping it would be as simple as updating a value
fserb has quit [Quit: ttyl]
<lianj> maybe better name it rename_key or so
<bnagy> rubytux: in 1.9 they freeze string keys. You used to be able to do it inplace before but it was always a horrible thing to do
<rubytux> ahh
TheHunter_1039 has quit [Quit: TheHunter_1039]
<rubytux> thats probably what i need to know, that helps. thanks!
<rubytux> so what was it considered a horrible thing to do?
<bnagy> because it used to be dangerous to change stuff while iterating over it
<bnagy> in some cases anyway
<rubytux> ah
<rubytux> question, how are hashes used in rails?
<bnagy> and just from a coding practice point of view - it's just simpler to make a new hash
<bnagy> it's not like pointers cost money
<bnagy> rubytux: #rails or #rubyonrails, maybe, I have NFI :)
<rubytux> lol cool
<rubytux> yall listen to the ruby rouges podcast?
<lianj> bnagy: why create a new one and not use my change_key method when you only what to rename one key while leaving others the same?
<rubytux> good question
<bnagy> lianj: because monkeypatching Hash for one method that will hardly ever get used is silly?
<bnagy> you could do that on the instance in less code
halibut has joined #ruby-lang
<lianj> sure, this method can also be put somewhere else. but i wouldnt mind the monkeypatch if its used alot
<rubytux> but metaprogramming is so awesome....(plz dont throw stuff at the newb using buzzwords)
<bnagy> hsh[new]=hsh.delete old
<lianj> bnagy: ah, right
<lianj> rubytux: ^ use that
<rubytux> hmm
<rubytux> im out thanks again
<bnagy> imvho any time you're thinking of monkeypatching a core class, take a cold shower first
rubytux has quit [Quit: Leaving.]
<lianj> there is good and bad monkeypatching ;) (not as this was a good one though)
andrew__ has joined #ruby-lang
stardiviner has joined #ruby-lang
fukushima has quit [Quit: Leaving...]
stardiviner has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 256 seconds]
gix has joined #ruby-lang
llakey has quit [Quit: leaving]
dreieins has quit [Quit: and away]
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby-lang
stardiviner has joined #ruby-lang
fukushima has joined #ruby-lang
bglusman has quit [Ping timeout: 246 seconds]
knu has joined #ruby-lang
tRAS has joined #ruby-lang
llakey has joined #ruby-lang
tRAS has quit [Ping timeout: 244 seconds]
gsav has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: Nihil sub sole novum]
Fezzler has joined #ruby-lang
Fezzler has quit [Quit: Ex-Chat]
postmodern has quit [Quit: Leaving]
felipe__ has joined #ruby-lang
cored has quit [Ping timeout: 252 seconds]
Fezzler has joined #ruby-lang
postmodern has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
llakey has quit [Quit: leaving]
llakey has joined #ruby-lang
llakey has quit [Client Quit]
andrew__ has quit [Remote host closed the connection]
hakunin_ has quit [Read error: Connection reset by peer]
hakunin has joined #ruby-lang
Fezzler has quit [Remote host closed the connection]
llakey has joined #ruby-lang
llakey has quit [Client Quit]
rippa has joined #ruby-lang
llakey has joined #ruby-lang
llakey has quit [Client Quit]
llakey has joined #ruby-lang
fromhet has joined #ruby-lang
mistym has quit [Remote host closed the connection]
bojicas has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 246 seconds]
deobald__ has joined #ruby-lang
tRAS has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
felipe__ has quit [Quit: Leaving]
AndChat| has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 252 seconds]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ramonmaruko has quit [Remote host closed the connection]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
dc5ala has joined #ruby-lang
ramonmaruko has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
bojicas_ has joined #ruby-lang
bojicas has quit [Read error: Connection reset by peer]
bojicas has joined #ruby-lang
fukushima has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby-lang
bojicas_ has quit [Read error: Connection reset by peer]
bojicas_ has joined #ruby-lang
bojicas has quit [Read error: Connection reset by peer]
fromhet has quit [Quit: fromhet]
bojicas has joined #ruby-lang
bojicas_ has quit [Ping timeout: 245 seconds]
cantonic_ has joined #ruby-lang
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
Banistergalaxy has joined #ruby-lang
AndChat| has quit [Ping timeout: 252 seconds]
bojicas_ has joined #ruby-lang
tomzx has quit [Ping timeout: 246 seconds]
Faris has quit [Quit: Nettalk6 - www.ntalk.de]
macmartine has quit [Quit: macmartine]
tRAS has quit [Quit: Mother, did it need to be so high?]
bojicas has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Read error: Connection reset by peer]
macmartine has joined #ruby-lang
fgomez has quit [Remote host closed the connection]
yxhuvud has joined #ruby-lang
Viliny has quit [Ping timeout: 250 seconds]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
wallerdev has quit [Read error: Connection reset by peer]
bojicas has joined #ruby-lang
wallerdev has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
bojicas_ has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
jxie_ has joined #ruby-lang
jxie has quit [Ping timeout: 245 seconds]
aldto has joined #ruby-lang
brianpWins has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby-lang
macmartine has quit [Quit: macmartine]
vesan has joined #ruby-lang
aldto has quit [Quit: Leaving]
t4nk635 has joined #ruby-lang
t4nk635 has left #ruby-lang [#ruby-lang]
savage- has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 252 seconds]
areil has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
LarryLv has joined #ruby-lang
cirwim has joined #ruby-lang
dhruvasagar has joined #ruby-lang
tRAS has joined #ruby-lang
fukushima has joined #ruby-lang
burgestrand has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
workmad3 has joined #ruby-lang
S2kx has quit [Read error: Connection reset by peer]
S2kx has joined #ruby-lang
kitallis has joined #ruby-lang
<TTilus> how do i set executable name, $0 that is, on jruby command line?
<TTilus> id love to preserve $0 from wrapper shell script to jruby process
bojicas_ has joined #ruby-lang
Cherrum has quit [Read error: Connection reset by peer]
Cherrum has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
ramonmaruko has quit [Remote host closed the connection]
yugui has quit [Ping timeout: 245 seconds]
lsegal has joined #ruby-lang
ramonmaruko has joined #ruby-lang
yugui has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
bojicas has quit [Ping timeout: 260 seconds]
TheHunter_1039 has joined #ruby-lang
<heftig> TTilus: jruby doesn't seem to support that
<heftig> normally, assigning to $0 should change the process name, but that doesn't happen in jruby
kinesis has joined #ruby-lang
bglusman has joined #ruby-lang
zmack has joined #ruby-lang
jarred has joined #ruby-lang
<jarred> This may not sound like a Ruby question, but how do I convert a Bignum into a 32 bit unsigned integer?
<jarred> (It is, I promise)
mytrile has joined #ruby-lang
<jarred> (This is why I'm asking --> https://gist.github.com/2be4cdcbe55f94b84668)
<bnagy> why are you converting a random string into an int?
<TTilus> heftig: hem, thanks for the tipsy, it actually _does_ work =D
<heftig> TTilus: hrm, not for me.
<cirwim> jarred: X-GM-MSGIDs are in the range 1.4e18; they're not derived from the Message-Id at all
<cirwim> (despite the similar name)
<jarred> oh
<cirwim> you'll need to monkey-patch Net::IMAP to support them in responses
<cirwim> but you can search for them by string
<jarred> cirwim: Will this suffice? https://gist.github.com/f0dc37fb9489a69b32f3
<jarred> (I found it, didn't make it)
<jarred> I didn't even leave at the bottom of this file
<jarred> *look at
<cirwim> jarred: yeah, that looks like what I have
<jarred> This isn't a X-GM-MSGID though
<jarred> This is the standard Message ID header
<cirwim> right
<jarred> Does gmail not generate the standard Message ID headers?
<jarred> Or are those not standard?
<cirwim> it also generates standard Message-ID headers
<cirwim> and you can just search for them like normal
gouthamvel has joined #ruby-lang
<cirwim> X-GM-MSGID is not as useful as X-GM-THRID
<jarred> Yeah
<jarred> That is what I'm looking for, very soon
<jarred> Not quite yet though
<cirwim> though the X-GM-MSGID of the first message in a thread is the X-GM-THRID
<cirwim> you can get X-GM-MSGID's in base 16 out of gmail urls
<jarred> Ah I see
<jarred> cirwim: Would searching by Message-ID look like: "gmail.conn.search("HEADER Message-ID " + "4fc4433f891e9_3ab48b79b09393@vbox-pc.mail".to_i(16).to_s, false)"? I guess, my main question is how do I convert "4fc4433f891e9_3ab48b79b09393@vbox-pc.mail" into the right format?
<jarred> (When I tried that, I got "Net::IMAP::BadResponseError: SEARCH not allowed now.")
igotnolegs has quit [Quit: Computer has gone to sleep.]
<cirwim> jarred: take out the .to_i.to_s nonsense
<cirwim> the id is the full string
<jarred> oh nice
<cirwim> you also need to select the mailbox before you use it
<cirwim> see https://github.com/ConradIrwin/em-imap for a description of which commands you can run when
kaspernj has joined #ruby-lang
<cirwim> (though you can just use Net::IMAP, em-imap is pretty much just a wrapper)
<jarred> cirwim: You have no idea how many hours you just saved me./
<jarred> *me.
<cirwim> jarred: no problems; all I need in return is eternal fame and glory :)
<erikh> ha
<jarred> lol
* cirwim wonders if this is the jarred who lived around the corner from his old house...
harukomoto has quit [Ping timeout: 245 seconds]
<erikh> probability says no
ryez has quit [Ping timeout: 245 seconds]
<jarred> Probably not, I don't live next to many Rubyists
<cirwim> that guy was also working on email-related software, so it's more possible than it might otherwise be
<cirwim> ah well
<jarred> and, I haven't told many people of what I'm working on
<jarred> and started working on this on Friday
<cirwim> cool
<cirwim> is it a super-secret project, or something sharable and exciting?
<jarred> Welcome emails as a service
<jarred> Sounds pretty stupid, right?
<cirwim> hmm, not necessarily
<cirwim> those are pretty tough to get right
<cirwim> and (particularly for early-stage companies) it's a bit of a faf to set up email sending architecture
<cirwim> I know a few people who just started out by sending them manually; and then just stopped
WillMarshall has quit [Ping timeout: 244 seconds]
<jarred> It's based around the assumption that people enjoy receiving a personal thank you for signing up to service X
<jarred> And by "personal", I mean that it'll seem as though it came from one of the people who made it
<cirwim> yeah
<cirwim> that was obvious to me :)
<jarred> (Where it is the service you're signing up for)
<jarred> Yeah
<jarred> but
<cirwim> it seems like a lot of big companies get that wrong
<jarred> Most welcome emails are boring messages for saying "Yeah, you signed up to this service"
<cirwim> right
<jarred> but
<cirwim> I've seen a few good ones though
<jarred> To early-stage startups, it's an opportuntiy for feedback and making a good first impression
kitallis has quit [Ping timeout: 246 seconds]
<cirwim> right
<jarred> and one that shouldn't be squandered
<cirwim> definitely
<cirwim> it'd be interesting to start sending people welcome tweets
<jarred> Yeah, but what I like about email is that it's much more personal. People enjoy interacting with other people. While the welcome emails are automated, the person who the email originated from is expected to reply to them
<cirwim> sure
<jarred> (Twitter is less personal because it's more public)
<cirwim> mabe..
<cirwim> not sure about that though
<ruskie> heh
<jarred> I'm not sure either, but I'll find out sometime soon
<jarred> Vaguely related, why are there Gmail Message IDs, Message IDs, and uids?
Defusal has quit [Ping timeout: 245 seconds]
soahccc` has quit [Ping timeout: 245 seconds]
Kero has quit [Ping timeout: 245 seconds]
erikh has quit [Ping timeout: 245 seconds]
jmeeuwen has quit [Ping timeout: 245 seconds]
_whitelogger has quit [Ping timeout: 245 seconds]
_whitelogger has joined #ruby-lang
kain has quit [Ping timeout: 245 seconds]
xsdg has quit [Ping timeout: 245 seconds]
beawesomeinstead has quit [Ping timeout: 245 seconds]
<jarred> Backwards compatibility?
<jarred> (For Gmail)
<cirwim> well; UIDs are a thing that IMAP requires
dtang_ has joined #ruby-lang
<cirwim> and Message IDs are required by SMTP
Slackwise_ has joined #ruby-lang
<jarred> oh I see
<cirwim> (or by Mbox or something old-hat)
<cirwim> and X-GM-MSGIDs are (I presume) the real primary key in the BIG table of emails
RubyRedGirl_ has joined #ruby-lang
dasibre_ has joined #ruby-lang
jmeeuwen_ has joined #ruby-lang
Defusal_ has joined #ruby-lang
Defusal_ has joined #ruby-lang
bglusman_ has joined #ruby-lang
bfreeman_ has joined #ruby-lang
<jarred> ah I see
krzkrzkrz has joined #ruby-lang
UNIXgod_ has joined #ruby-lang
krzkrzkrz has quit [Client Quit]
<cirwim> fwiw, don't bother trying to use the normal IMAP "ID"; I never worked out what the point of it was :)
Kero_ has joined #ruby-lang
telemachus_ has joined #ruby-lang
erikh_ has joined #ruby-lang
soahccc`_ has joined #ruby-lang
deobald__ has quit [Ping timeout: 260 seconds]
kain__ has joined #ruby-lang
Viliny has joined #ruby-lang
ryanf has quit [Quit: leaving]
<Viliny> Hello!
srbartle_ has joined #ruby-lang
<Viliny> I picked up ruby again yesterday after a long pause. I noticed i've gotten so rusty that i pretty much have to start from basics again.
jenrzzz_ has joined #ruby-lang
conceal_rs_ has joined #ruby-lang
RubyRedGirl_ is now known as RubyRedGirl
jenrzzz_ has quit [Client Quit]
jmeeuwen_ is now known as jmeeuwen
JoL1hAHN has joined #ruby-lang
jenrzzz has joined #ruby-lang
tubbo has joined #ruby-lang
<Viliny> I'm now using Dir.foreach to do a loop where i want to check if the entry contains a certain string. If that string is matched then put that entry into another array.
matthewd has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 244 seconds]
kalleth has joined #ruby-lang
corsican has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
xsdg has joined #ruby-lang
cmaxw has joined #ruby-lang
quatauta has joined #ruby-lang
jbwiv has joined #ruby-lang
cid404 has joined #ruby-lang
Guedes has joined #ruby-lang
<Viliny> my first question is: how do i complete "if entry.match " to check for start of string?
Mikoangelo has joined #ruby-lang
unsymbol has joined #ruby-lang
<cirwim> if entry.start_with?("foo")
<jarred> cirwim: When it returns a fixnum (e.g. 992), what is that? The imap ID? I thought it was maybe the index of the email in the mailbox, but it's off by one or two
dvorak has joined #ruby-lang
benteaa has quit [Remote host closed the connection]
<cirwim> jarred: yeah, that's the IMAP ID
ahf has quit [Remote host closed the connection]
benteaa has joined #ruby-lang
ahf_ has joined #ruby-lang
<cirwim> or the IMAP UID
<cirwim> depending on what you asked for
<cirwim> (if you did search, it's the ID; uid_search; it's the UID)
ahf_ is now known as ahf
Facefox has quit [Ping timeout: 250 seconds]
<jarred> Yeah, I need to just read the Net::IMAP documentation
UNIXgod_ has quit [Quit: leaving]
_whitelogger_ has joined #ruby-lang
<cirwim> Viliny: looks good, though there's actually a function for this already
_whitelogger has quit [Remote host closed the connection]
<Viliny> oh :)
beawesomeinstead has joined #ruby-lang
matthewd has joined #ruby-lang
<jarred> oh this makes much more sense now
KU0N has joined #ruby-lang
corsican has joined #ruby-lang
<jarred> there's stuff for uid and stuff for id, everything defaults to id
<jarred> (and stuff == methods)
TTilus has joined #ruby-lang
<cirwim> yeah :)
cmaxw has quit [Quit: cmaxw]
<Viliny> cirwim: i assume you ment this "Dir.entries("testdir")" part here, but can i make it conditional on what it puts into the array?
<jarred> Now the question is, why does it just return me a FetchData struct and not the IMAP message object (I'm not sure the actual name of the object, but the one that the mail gem usually deals with)
lele|w has quit [Ping timeout: 264 seconds]
<cirwim> Viliny: Dir["testdir/ident*"] <-- all files in testdir starting with ident
<jarred> oh I see
<cirwim> jarred: Net::IMAP is really low level
<cirwim> you need to do lots of tinkering to get the body out
<jarred> ah I see
<cirwim> and then you can pass the body to the mail gem
<Viliny> cirwim: very neat, i've seen like... 5 different ways of doing this already. It's just not immediately apparent to me when seeing manuals like the one you linked earlier.
<jarred> so I guess, in this case, it's eaiser to just use the gmail gem?
<cirwim> Viliny: yeah; that's the problem with learning new stuff
<cirwim> jarred: hmm, I'm not sure what you're trying to do
<cirwim> I can say that Net::IMAP + mail gem works
<cirwim> never tried the gmail gem though
<jarred> It's a mostly-nice wrapper for Gmail
<jarred> I'm primarily using it for XOAuth
<jarred> Which is OAuth for SMTP & IMAP
<cirwim> yeah
<cirwim> you can get the gmail_xoauth plugin for Net::IMAP
<jarred> Yeah, it uses that
<cirwim> ko
<Viliny> Dir["#{sourcedirectory}/#{ident}*"].entries("newlist"); ?
mrb_bk has joined #ruby-lang
<cirwim> Dir["#{sourcedirectory}/#{ident}*"].to_a
<cirwim> open up a REPL
<cirwim> then you can try these things yourself :)
<Viliny> ah ofc, whats a REPL? :p
<cirwim> irb or pry
<cirwim> they let you type in random code
<cirwim> and will tell you whether it works or whether it's broken
anildigital_work has joined #ruby-lang
<cirwim> and if it works, they'll tell you what the answer is
<Viliny> ah, irb i would have understood
<cirwim> it's pretty useful
<cirwim> ko
<cirwim> use pry instead though; it's better because I helped write it :p
<Viliny> gotcha :D
<Viliny> where do i specify the newly created arrays name
<Viliny> mm... is _a the array name?
<cirwim> arrayname = Dir["#{sourcedirectory}/#{ident}*"].to_a
<cirwim> no, to_a is a method on the return value of Dir[]
<Viliny> sorry, now im just being stupid
<cirwim> you should read a tutorial :)
<Viliny> i knew to_a was "to array"
<Viliny> yes, i actually have chris pines "learn to program" here next to me, should probably try to use it more instead of googling around for answers
<Viliny> or embarass myself in irc channels :)
<cirwim> hehe
cesario has joined #ruby-lang
<jarred> This worked excellently. Thank you cirwim. By the way, with the gmail gem, (If you ever want to exclusively use gmail), you can just instantiate Gmail::Message, and you give it the Gmail::Mailbox object and it's UID, and it'll get you access to the Mail Message object, as well as adding/removing labels, and some other fun things
Banistergalaxy has quit [Remote host closed the connection]
firestalker has joined #ruby-lang
<cirwim> jarred: cool
mdstunthamster has joined #ruby-lang
nashby__ has joined #ruby-lang
firestalker has left #ruby-lang [#ruby-lang]
<cirwim> jarred: wtf is that SQL?
<cirwim> is it using datamapper's imap backend or something?
<cirwim> oh
<Viliny> yeah, i noticed that too
<cirwim> no that's just loading Employee.first.mail
<cirwim> heh
<cirwim> confused
* cirwim goes quiet in a fit of extreme embarrassment
<Viliny> :p
<jarred> lol it's late at night, don't worry about it
<Viliny> well regardless, thank you for the help. im now going to do some independent failing.
postmodern has quit [Ping timeout: 260 seconds]
gouthamvel has quit [Ping timeout: 246 seconds]
solars has joined #ruby-lang
postmodern has joined #ruby-lang
<Viliny> cirwim: im getting no results with this: http://pastebin.com/tm9UWBFy
sora_h is now known as s0ra_h
<Viliny> datafiles directory contains "hondafile.txt, otherfile.txt"
<Viliny> ignore the fileutils require and so forth, been trying out different things there
<bnagy> Viliny: your globs will be wrong
<cirwim> what does: "#{sourcedirectory}/#{ident}*" look like when you eval it?
<bnagy> you need to use / even on windows
cirwim has quit [Quit: sleep…ping!]
<Viliny> cirwim, how would you eval it?
<Viliny> bnagy: that actually worked earlier when i tried to simply copy files
<bnagy> Viliny: yeah but it shouldn't :)
<bnagy> Viliny: just use File.join ideally
<Viliny> sooo, c:/datafiles/ etc?
<bnagy> but IRL path sep is / on windows
<bnagy> yeah
<bnagy> I know it's freaky :<
<Viliny> naww, i actually use linux a lot, just that this work computer has xp on it. keep getting an error that "ls" isn't a working command in shell :p
<Viliny> ok well that actually made it work right off the bat
<Viliny> i noticed the array has the full path to the file instead of the filename itself
heftig has quit [Quit: leaving]
<bnagy> from Dir[] yeah it will
srbartle_ has quit [Remote host closed the connection]
<Viliny> thats actually not a bad thing for file operations i guess
vesan has quit [Read error: Connection reset by peer]
s0ra_h is now known as sora_h
vesan has joined #ruby-lang
seoaqua has left #ruby-lang ["Leaving"]
seoaqua has joined #ruby-lang
graspee has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
quatauta has quit [Quit: Verlassend]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
jarred has quit [Read error: Connection reset by peer]
fgomez has joined #ruby-lang
gnufied has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
francisfish has joined #ruby-lang
futurechimp has joined #ruby-lang
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
postmodern has quit [Client Quit]
postmodern has joined #ruby-lang
kain__ has quit [Quit: Sto andando via]
Dreamer3 has joined #ruby-lang
Dreamer3 has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
diegoviola has joined #ruby-lang
postmodern has quit [Read error: Connection reset by peer]
sora_h is now known as s0ra_h
postmodern has joined #ruby-lang
postmodern has quit [Changing host]
postmodern has joined #ruby-lang
zz_chrismcg is now known as chrismcg
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
workmad3_ has joined #ruby-lang
postmodern has quit [Client Quit]
postmodern has joined #ruby-lang
gouthamvel has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
Viliny has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby-lang
adambeynon has joined #ruby-lang
stamina has joined #ruby-lang
krainboltgreene has joined #ruby-lang
toretore has joined #ruby-lang
cdt has joined #ruby-lang
tonniaagesen has joined #ruby-lang
rushed has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
kitallis has joined #ruby-lang
perryh is now known as perryh_away
krainboltgreene has quit [Quit: krainboltgreene]
kaspernj has quit [Quit: Leaving]
tRAS has quit [Ping timeout: 265 seconds]
tRAS has joined #ruby-lang
Jade has quit [Ping timeout: 246 seconds]
vmoravec has joined #ruby-lang
neoesque has quit [Quit: Bye!]
b1rkh0ff has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
fragmachine has joined #ruby-lang
fragmachine has left #ruby-lang [#ruby-lang]
vesan has joined #ruby-lang
Where_Is_Void has joined #ruby-lang
<Where_Is_Void> how can I get continually updated output from another process like ping?
<Where_Is_Void> without waiting for it to finish
sush24 has joined #ruby-lang
<bnagy> popen3 maybe, with a readline loop
francisfish has quit [Read error: Connection reset by peer]
fjfish has joined #ruby-lang
kaiwren has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
seoaqua has quit [Quit: Leaving]
vesan has joined #ruby-lang
<Where_Is_Void> I figured that bit out, not I need to send the process commands
<Where_Is_Void> *now
<Where_Is_Void> like I start the process and it asks "enter stuff"
<Where_Is_Void> how can I enter stuff?
Asher has quit [Remote host closed the connection]
<bnagy> when you use open3 you get in,out,err fron the process
<bnagy> write to its input and read from its output
<Where_Is_Void> I found this snippet on stack overflow that I'm using for the first bit - http://stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby
<Where_Is_Void> so should I just try to write to sdout?
kashyapkmbc has joined #ruby-lang
s0ra_h is now known as sora_h
<bnagy> if you want to send input to the program you need to write to its stdin
<bnagy> that answer has a good example with PTY as well
<Where_Is_Void> oh yea haha
<bnagy> open3 can be buffery
Asher has joined #ruby-lang
kashyapkmbc has quit [Quit: kashyapkmbc]
tonniaagesen is now known as tonni
vesan has quit [Read error: Connection reset by peer]
sora_h is now known as s0ra_h
vesan has joined #ruby-lang
heftig has joined #ruby-lang
ryez has joined #ruby-lang
burgestrand has joined #ruby-lang
heftig has quit [Quit: leaving]
heftig has joined #ruby-lang
sush24 has quit [Ping timeout: 244 seconds]
chrismcg is now known as zz_chrismcg
zz_chrismcg is now known as chrismcg
Dreamer3 has joined #ruby-lang
chrismcg is now known as zz_chrismcg
zz_chrismcg is now known as chrismcg
tbuehlmann has joined #ruby-lang
gouthamvel has quit [Ping timeout: 248 seconds]
sush24 has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
Hakon|mbp has quit [Quit: Leaving...]
bojicas_ has quit [Remote host closed the connection]
kitallis has quit [Ping timeout: 265 seconds]
tRAS has quit [Ping timeout: 244 seconds]
burgestrand has quit [Quit: Leaving.]
cyndis has quit [Ping timeout: 250 seconds]
Hakon|mbp has joined #ruby-lang
Hakon|mbp has quit [Client Quit]
Hakon|mbp has joined #ruby-lang
cyndis has joined #ruby-lang
Hakon|mbp has quit [Ping timeout: 250 seconds]
workmad3_ has quit [Quit: leaving]
dhruvasagar has quit [Ping timeout: 248 seconds]
s0ra_h is now known as sora_h
Axsuul has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
workmad3 has joined #ruby-lang
Axsuul has joined #ruby-lang
corecode_ has quit [Ping timeout: 240 seconds]
corecode has joined #ruby-lang
Facefox has quit [Ping timeout: 240 seconds]
Facefox has joined #ruby-lang
neoesque has joined #ruby-lang
bmaland_ has quit [Ping timeout: 244 seconds]
bmaland has joined #ruby-lang
twelvechairs has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
meise_ has quit [Ping timeout: 244 seconds]
zenspider has quit [Ping timeout: 240 seconds]
zenspider has joined #ruby-lang
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby-lang
tRAS has joined #ruby-lang
meise has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
pcboy___ has quit [Quit: leaving]
spuk has quit [Ping timeout: 256 seconds]
spuk has joined #ruby-lang
krainboltgreene has joined #ruby-lang
kitallis has joined #ruby-lang
vesan has quit [Ping timeout: 272 seconds]
twelvechairs has quit [Quit: Leaving]
bojicas has joined #ruby-lang
jxie_ has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
pcboy_ has joined #ruby-lang
bglusman_ has quit [Ping timeout: 246 seconds]
SimSala has joined #ruby-lang
krainboltgreene has quit [Quit: krainboltgreene]
zz_wasnotrice is now known as wasnotrice
mark_locklear has joined #ruby-lang
vesan has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
bojicas_ has joined #ruby-lang
bojicas__ has joined #ruby-lang
bojicas_ has quit [Read error: Connection reset by peer]
bojicas_ has joined #ruby-lang
bojicas has quit [Ping timeout: 252 seconds]
TTilus has quit [Ping timeout: 244 seconds]
TTilus has joined #ruby-lang
bojicas__ has quit [Ping timeout: 244 seconds]
zz_wasnotrice is now known as wasnotrice
vesan has quit [Ping timeout: 248 seconds]
BenMatthew has joined #ruby-lang
bascht has quit [Quit: WeeChat 0.3.0]
BenMatthew has quit [Read error: Connection reset by peer]
BenMatthew has joined #ruby-lang
kaiwren has quit [Quit: kaiwren]
igaiga has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
vesan has joined #ruby-lang
kaiwren has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
dv310p3r has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
pcboy_ has quit [Quit: leaving]
kaiwren has quit [Quit: kaiwren]
judofyr has joined #ruby-lang
postmodern has quit [Quit: Leaving]
kaiwren has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
vesan has quit [Read error: Connection reset by peer]
vmoravec has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
vesan has joined #ruby-lang
kaiwren has quit [Quit: kaiwren]
mistym has joined #ruby-lang
bglusman has joined #ruby-lang
tomzx has joined #ruby-lang
Hakon|mbp has quit [*.net *.split]
epitron has quit [*.net *.split]
corsican has quit [*.net *.split]
Swimming_Bird has quit [*.net *.split]
alindeman has quit [*.net *.split]
cronin101 has quit [*.net *.split]
kith has quit [*.net *.split]
Skif has quit [*.net *.split]
thorncp has quit [*.net *.split]
DEac- has quit [*.net *.split]
dabradley has quit [*.net *.split]
youngin has quit [*.net *.split]
ltd- has quit [*.net *.split]
mahlon has quit [*.net *.split]
krohrbaugh has quit [Ping timeout: 244 seconds]
epitron has joined #ruby-lang
epitron has quit [Changing host]
epitron has joined #ruby-lang
jperry2 has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
tubbo has quit [Quit: leaving]
tubbo has joined #ruby-lang
LarryLv has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
alindeman has joined #ruby-lang
corsican has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
cronin101 has joined #ruby-lang
DEac- has joined #ruby-lang
Skif has joined #ruby-lang
kith has joined #ruby-lang
thorncp has joined #ruby-lang
dabradley has joined #ruby-lang
youngin has joined #ruby-lang
ltd- has joined #ruby-lang
mahlon has joined #ruby-lang
alindeman is now known as Guest92523
BenMatthew has quit [Quit: BenMatthew]
vesan has joined #ruby-lang
BenMatthew has joined #ruby-lang
rippa has quit [Quit: derp herp]
vmoravec has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tomzx has quit [Ping timeout: 256 seconds]
gsav has joined #ruby-lang
cmaxw has joined #ruby-lang
pcboy_ has joined #ruby-lang
bruno_coelho has joined #ruby-lang
wallerdev has joined #ruby-lang
Austin__ has joined #ruby-lang
kaiwren has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
vesan has joined #ruby-lang
Tref has joined #ruby-lang
BenMatthew has quit [Quit: BenMatthew]
slyphon has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
bojicas_ has quit [Remote host closed the connection]
JohnBat26 has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
mistym has joined #ruby-lang
bojicas has joined #ruby-lang
nofxxx has joined #ruby-lang
nofxxxx has quit [Ping timeout: 248 seconds]
felipe__ has joined #ruby-lang
nofxxxx has joined #ruby-lang
mssola has joined #ruby-lang
mdstunthamster has quit [Quit: Linkinus - http://linkinus.com]
slyphon has quit [Quit: WeeChat 0.3.6]
nofxxx has quit [Ping timeout: 256 seconds]
bruno_coelho has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
mdstunthamster has joined #ruby-lang
farmer_ has joined #ruby-lang
jbwiv has quit [Read error: Connection reset by peer]
farmer has quit [Ping timeout: 260 seconds]
vmoravec has quit [Quit: Leaving]
tjadc has joined #ruby-lang
workmad3_ has joined #ruby-lang
huug has joined #ruby-lang
jxie has joined #ruby-lang
tcopp has joined #ruby-lang
Where_Is_Void has quit [Ping timeout: 256 seconds]
outoftime has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
huug has quit [Ping timeout: 244 seconds]
felipe__ has quit [Quit: Leaving]
fgomez has quit [Ping timeout: 260 seconds]
rippa has joined #ruby-lang
Jake232 has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
Skif_away has joined #ruby-lang
andrew__ has joined #ruby-lang
gouthamvel has joined #ruby-lang
slyphon has joined #ruby-lang
bfreeman_ has quit [Quit: bfreeman_]
Skif has quit [Ping timeout: 240 seconds]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
|Vargas| has quit [Quit: ...]
workmad3_ has quit [Ping timeout: 246 seconds]
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
neoesque has quit [Quit: Bye!]
fromhet has joined #ruby-lang
cmaxw has quit [Quit: cmaxw]
sush24 has quit [Quit: This computer has gone to sleep]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
adambeynon has joined #ruby-lang
tcopp has left #ruby-lang [#ruby-lang]
tcopp has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
twelvechairs has joined #ruby-lang
Skif_away has quit [Remote host closed the connection]
kyrylo has quit [Read error: Connection reset by peer]
Skif has joined #ruby-lang
virunga has quit [Read error: Connection reset by peer]
vesan has quit [Read error: Connection reset by peer]
judofyr has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
twelvechairs has quit [Quit: Leaving]
crudson has joined #ruby-lang
vesan has joined #ruby-lang
bojicas_ has joined #ruby-lang
bryancp has joined #ruby-lang
tbuehlmann has quit []
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
<Swimming_Bird> I want to create and use a class variable in a mixin but I only want that class variable to be shared amongtst the class taht includes it and it's children, not any other class that includes the mixin. Can anuyone think of how todo that?
bojicas has quit [Ping timeout: 252 seconds]
outoftime has quit [Ping timeout: 244 seconds]
sonicpond_afk is now known as sonicpond
kaiwren has quit [Quit: kaiwren]
<cout> Swimming_Bird: sounds brittle
<Swimming_Bird> I'm working up a gist right now for my intened behavior
dejongge has joined #ruby-lang
<Swimming_Bird> here's the closest i've gotten sofar: https://gist.github.com/2829150
gouthamvel has left #ruby-lang [#ruby-lang]
<Swimming_Bird> I tried class_variable_set in the included hook but it didn't work.
vesan has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
outoftime has joined #ruby-lang
fserb has joined #ruby-lang
frem has joined #ruby-lang
sora_h is now known as s0ra_h
<tcopp> How about dynamically defining the method when it's included, to return the appropriate value?
kitallis has quit [Ping timeout: 252 seconds]
<tcopp> That way you'd have different definitions of the same signature on each Class that has the mixin.
vesan has joined #ruby-lang
erikh_ has left #ruby-lang [#ruby-lang]
erikh has joined #ruby-lang
kitallis has joined #ruby-lang
<Swimming_Bird> yah, it's seeming like that's what i've gotta do. Any of the methods in the mixin look for class variables in the mixin itself which would then be shared amongts all including classes
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
dhruvasagar has quit [Ping timeout: 244 seconds]
Jake232 has quit [Read error: Connection reset by peer]
areil has quit [Remote host closed the connection]
cmaxw has joined #ruby-lang
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mdstunthamster has quit [Quit: Linkinus - http://linkinus.com]
carloslopes has quit [Ping timeout: 240 seconds]
thone_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
chrismcg is now known as zz_chrismcg
d3vic3 has joined #ruby-lang
symm- has quit [Ping timeout: 252 seconds]
thone has quit [Ping timeout: 248 seconds]
fgomez has quit [Quit: leaving]
solars has quit [Ping timeout: 248 seconds]
Nowaker has quit [Ping timeout: 248 seconds]
SimSala has quit [Ping timeout: 250 seconds]
savage- has joined #ruby-lang
yannis has joined #ruby-lang
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
tRAS has joined #ruby-lang
Mchl has joined #ruby-lang
burgestrand has joined #ruby-lang
lsegal has joined #ruby-lang
Mchl has quit [Ping timeout: 265 seconds]
fromhet has quit [Quit: fromhet]
Mchl has joined #ruby-lang
fgomez has joined #ruby-lang
bfreeman has joined #ruby-lang
yannis has quit [Quit: yannis]
bfreeman has quit [Client Quit]
bfreeman has joined #ruby-lang
workmad3 has quit [Quit: leaving]
workmad3 has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
fjfish has quit [Remote host closed the connection]
Nowaker has joined #ruby-lang
butchanton has joined #ruby-lang
carloslopes has joined #ruby-lang
bojicas_ has quit [Ping timeout: 245 seconds]
bojicas has joined #ruby-lang
yannis has joined #ruby-lang
Hakon|mbp has quit [Quit: Leaving...]
gamafranco has joined #ruby-lang
tbuehlmann has joined #ruby-lang
brianpWins has joined #ruby-lang
fserb has quit [Quit: ttyl]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
vesan has quit [Read error: Connection reset by peer]
Mchl has joined #ruby-lang
vesan has joined #ruby-lang
achamian has joined #ruby-lang
slimfit has joined #ruby-lang
krainboltgreene has joined #ruby-lang
bojicas has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
Swimming_Bird has quit [Ping timeout: 240 seconds]
Swimming_Bird has joined #ruby-lang
vesan has quit [Ping timeout: 272 seconds]
bojicas has joined #ruby-lang
vesan has joined #ruby-lang
rmascarenhas has joined #ruby-lang
codesturgeon has joined #ruby-lang
codesturgeon has quit [Remote host closed the connection]
solars has joined #ruby-lang
sush24 has joined #ruby-lang
fserb has joined #ruby-lang
headius has joined #ruby-lang
fserb has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
imajes has quit [Excess Flood]
shaman42 has quit [Ping timeout: 248 seconds]
cyndis has quit [Ping timeout: 250 seconds]
imajes has joined #ruby-lang
Doobie_ has quit [Quit: No Ping reply in 180 seconds.]
tjadc has quit [Remote host closed the connection]
krainboltgreene has quit [Quit: krainboltgreene]
Doobie has joined #ruby-lang
Doobie has quit [Quit: No Ping reply in 180 seconds.]
s0ber_ has joined #ruby-lang
nashby__ has quit [Read error: Operation timed out]
nashby___ has joined #ruby-lang
cyndis has joined #ruby-lang
s0ber has quit [Ping timeout: 256 seconds]
s0ber_ is now known as s0ber
cmaxw has left #ruby-lang [#ruby-lang]
shaman42 has joined #ruby-lang
dejongge has quit [Ping timeout: 260 seconds]
TheRealmccoy has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
wasnotrice is now known as zz_wasnotrice
diegoviola has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
kaiwren has joined #ruby-lang
kaiwren has quit [Client Quit]
mrsolo has joined #ruby-lang
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
tallship has quit [Read error: Operation timed out]
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
gamafranco has quit [Read error: Operation timed out]
tomb_ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
qpingu has joined #ruby-lang
Altbair5 has joined #ruby-lang
TheRealmccoy has quit [Quit: Leaving.]
zz_wasnotrice is now known as wasnotrice
tallship has joined #ruby-lang
Altbair5 has left #ruby-lang [#ruby-lang]
futurechimp has quit [Quit: Leaving]
headius has quit [Quit: headius]
<cout> sleep keeps running in a subshell when my ruby script exits; how can I ensure that the subshell gets killed when the script finishes?
<carloslopes> cout: maybe Process.kill(:SIGTERM, t)
harukomoto has joined #ruby-lang
<carloslopes> cout: at the end of the file
<cout> carloslopes: what is 't'?
<cout> you can't send signals to user-level threads?
<cout> erg I can't type
<carloslopes> cout: your thread
<cout> that was supposed to be a statement not a question :(
farmer_ has quit [Remote host closed the connection]
<mistergibson> cout: have you looked at ChildProcess gem ?
<mistergibson> cout: it is spiffy
<cout> mistergibson: I haven't
S2kx has quit [Quit: Leaving]
S1kx has joined #ruby-lang
<mistergibson> cout: please do, he's done a yeoman's job
<carloslopes> cout: i don't test it, but Process.kill works with fork.. so, i only thought that maybe it could work with Threads too :)
<carloslopes> s/don't/didn't
<cout> I just don't understand why the child process appears to be acting as if it's not in the same process group
apeiros_ has joined #ruby-lang
harukomoto has quit [Ping timeout: 252 seconds]
tallship has quit [Ping timeout: 252 seconds]
<carloslopes> cout: hmmm yes, this is weird.. but, if you check with pmap both methods, are they still runing?
jtoy has joined #ruby-lang
<carloslopes> cout: execute the script and check with pmap
<carloslopes> maybe the child process is maintaining the parent while it finalize his execution
<cout> the parent is dead and the child becomes an orphan with ppid 1
harukomoto has joined #ruby-lang
<carloslopes> cout: hmm yeah, make sense
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zmack has quit [Remote host closed the connection]
krainboltgreene has joined #ruby-lang
tallship has joined #ruby-lang
zmack has joined #ruby-lang
Cykey has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
krainboltgreene has quit [Quit: krainboltgreene]
jcoby has joined #ruby-lang
jcoby has left #ruby-lang [#ruby-lang]
<carloslopes> cout: did you try use t.kill?
<cout> carloslopes: the thread is dying, because the whole parent process dies
<cout> it's the child process that isn't dying
<cout> (actually I think it maybe a grandchild process that isn't dying, which is why it can become an orphan)
rushed has quit [Quit: rushed]
<cout> if the child tries to do I/O, it does die, because the pipe is closed, but sleep doesn't do any I/O
tomb_ has joined #ruby-lang
<cout> what's bothering me is that I know I've run into this years ago, and I can't remember how I addressed it :(
<carloslopes> cout: hmm it's very weird, because if you send kill to it, it should die and stop the execution
achamian has quit [Remote host closed the connection]
<carloslopes> cout: maybe, it is not dying because the type of the sleep method (i don't know, only an idea)
<cout> I can't kill the child process, because I don't know its pid
<carloslopes> cout: i think it doesn't have the same pid, it's the same
sockmonk has joined #ruby-lang
<carloslopes> doesn't have different pids*
<cout> what's the same?
<carloslopes> the pids, of the thread and the parent
<cout> all process have a unique pid (process id)
<carloslopes> i know
<carloslopes> but, if you use fork, you can see the process id using Process.pid
<cout> fwiw, I get the same problem if I use system("sleep 100000 &") instead of using a thread
<carloslopes> and, if you use Process.pid inside a Thread, it return the same pid that the main thread has
<carloslopes> cout: yes, i don't see anything wrong with system('sleep 100000'), because it will wait the system finish the execution of the command and after this it will finish the execution of your script and exit it
francisfish has joined #ruby-lang
gregf has quit [Quit: WeeChat 0.3.7]
<cout> IO.popen apparently gives me a pid that I can kill
tomb_ has quit [Quit: Computer has gone to sleep.]
<cout> not ideal but it works
<carloslopes> cout: hmm yeah.. can't you use fork?
<cout> (not ideal b/c if the parent segfaults or uses exit!, then the child still doesn't die)
<carloslopes> fork gives tou the pid too
<cout> fork is more work and it still doesn't solve the problem
<cout> (I tried it)
<carloslopes> cout: hmm understood :)
<cout> for what I'm doing IO.popen is a 98% solution
ridders24 has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
workmad3 has joined #ruby-lang
Criztian has joined #ruby-lang
cdt has joined #ruby-lang
<carloslopes> cout: nice... isn't 100% but 98% is not too bad ;)
<Tasser> carloslopes, welcome to the real world
<carloslopes> Tasser: ;)
Cykey has quit [Quit: Computer has gone to sleep.]
<cout> I think this is how I solved it before: https://github.com/cout/ruby-treasures/blob/master/lib/open3y.rb
<cout> but in that case I had two-way communication
zmack has quit [Remote host closed the connection]
<cout> but I still wish I understood why the child doesn't act as if it were in the same pgrp as the parent :(
Hakon|mbp has quit [Quit: Leaving...]
<carloslopes> cout: yes.. i'm curious too :/
Hakon|mbp has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
cdt has quit [Ping timeout: 246 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby-lang
gamafranco has joined #ruby-lang
rippa has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
soahccc`_ has left #ruby-lang [#ruby-lang]
soahccc has joined #ruby-lang
wallerdev has joined #ruby-lang
sepp2k has joined #ruby-lang
crudson has left #ruby-lang [#ruby-lang]
A124 has joined #ruby-lang
yxhuvud has quit [Ping timeout: 244 seconds]
bryancp has quit [Remote host closed the connection]
Criztian has quit [Read error: Connection reset by peer]
Criztian has joined #ruby-lang
dv310p3r has quit [Ping timeout: 246 seconds]
stamina has quit [Quit: Lost terminal]
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
Criztian has quit [Ping timeout: 246 seconds]
jperry2 has quit [Quit: Leaving.]
mark_locklear has quit [Remote host closed the connection]
krz has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Austin__ has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
sush24 has quit [Quit: This computer has gone to sleep]
hynkle has quit [Quit: hynkle]
krainboltgreene has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
graspee has quit [Quit: leaving]
vesan has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
rmascarenhas has quit [Quit: leaving]
flip_digits has joined #ruby-lang
kyrylo has quit [Quit: WeeChat 0.3.7]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
hakunin has joined #ruby-lang
achiu has quit [Quit: WeeChat 0.3.7]
vaelen has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
gamafranco_ has joined #ruby-lang
Slackwise__ has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
fserb has joined #ruby-lang
Slackwise_ has quit [Ping timeout: 246 seconds]
gamafranco has quit [Ping timeout: 252 seconds]
gamafranco_ is now known as gamafranco
krainboltgreene has quit [Quit: krainboltgreene]
flip_digits has quit [Ping timeout: 244 seconds]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
b1rkh0ff has quit [Ping timeout: 265 seconds]
unsymbol has quit [Ping timeout: 246 seconds]
conceal_rs_ has quit [Ping timeout: 246 seconds]
unsymbol has joined #ruby-lang
tcopp has quit [Ping timeout: 244 seconds]
Cykey has joined #ruby-lang
conceal_rs_ has joined #ruby-lang
flip_digits has joined #ruby-lang
slyphon has quit [Quit: WeeChat 0.3.6]
macmartine has joined #ruby-lang
desireco has joined #ruby-lang
b1rkh0ff has joined #ruby-lang
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby-lang
ridders24 has quit [Quit: Leaving]
apeiros_ has quit [Remote host closed the connection]
Tref has quit [Quit: Tref]
mistym has quit [Remote host closed the connection]
Swimming_Bird has quit [Ping timeout: 244 seconds]
carloslopes has quit [Quit: Leaving]
arooni-mobile has quit [Ping timeout: 245 seconds]
igaiga has joined #ruby-lang
desireco has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
francisfish has quit [Remote host closed the connection]
Cykey has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Quit: Leaving.]
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby-lang
arooni-mobile has joined #ruby-lang
solars has quit [Quit: WeeChat 0.3.5]
bglusman has quit [Ping timeout: 245 seconds]
sockmonk has quit [Ping timeout: 245 seconds]
flebel has quit [Read error: Operation timed out]
krohrbaugh has joined #ruby-lang
cantonic_ has joined #ruby-lang
KU0N has quit [Quit: Leaving...]
perryh_away has quit [Read error: Operation timed out]
perryh has joined #ruby-lang
cantonic has quit [Ping timeout: 246 seconds]
cantonic_ is now known as cantonic
kinesis has quit [Read error: Operation timed out]
kinesis has joined #ruby-lang
kinesis has quit [Excess Flood]
kinesis has joined #ruby-lang
diegoviola has quit [Ping timeout: 252 seconds]
headius has joined #ruby-lang
flip_digits has quit [Ping timeout: 244 seconds]
flip_digits has joined #ruby-lang
headius has quit [Client Quit]
fserb has quit [Quit: ttyl]
tbuehlmann has quit []
gamafranco has quit [Quit: gamafranco]
arooni-mobile has quit [Ping timeout: 265 seconds]
BigFatFatty has joined #ruby-lang
mistym has joined #ruby-lang
flip_digits has quit [Quit: Computer has gone to sleep.]
gamafranco has joined #ruby-lang
acyed has joined #ruby-lang
gamafranco has quit [Client Quit]
igaiga has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
gregf has joined #ruby-lang
mistym has quit [Remote host closed the connection]
outoftime has quit [Quit: Leaving]
Asher has quit [Ping timeout: 252 seconds]
gamafranco has joined #ruby-lang
tenderlove has joined #ruby-lang
gamafranco has quit [Client Quit]
Asher has joined #ruby-lang
flip_digits has quit [Quit: Computer has gone to sleep.]
gamafranco has joined #ruby-lang
tomb_ has joined #ruby-lang
peppyheppy has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
Cykey has joined #ruby-lang
Asher has quit [Ping timeout: 256 seconds]
Asher has joined #ruby-lang
headius has joined #ruby-lang
kyrylo has quit [Ping timeout: 246 seconds]
bryancp has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
tomb_ has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby-lang
stayarrr has joined #ruby-lang
srbartlett has joined #ruby-lang
slyphon has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
hakunin has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
gamafranco has quit [Quit: gamafranco]
s0ra_h is now known as sora_h
mistym has joined #ruby-lang
gsav has joined #ruby-lang
BigFatFatty has left #ruby-lang [#ruby-lang]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
seanstickle has joined #ruby-lang
ilyam has joined #ruby-lang
hakunin has joined #ruby-lang
toretore has quit [Quit: Leaving]
macmartine has quit [Quit: macmartine]
mrsolo has quit [Quit: Leaving]
butchanton has quit [Quit: Leaving.]