Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<akahn> If I want to spawn a new process and get an IO object that I can write to and my subprocess will receive as its stdin, how do I do that? I'm having trouble understanding the IO documentation
ryanf [ryanf!~revfitz@adsl-69-111-192-194.dsl.snfc21.sbcglobal.net] has joined #ruby-lang
<wallerdev> akahn: i think you want to use IO#popen
<wallerdev> then you can read and write to that stream
<wallerdev> if I'm remembering right
<rue> That'd work. Also the open{3,4} variants.
<akahn> when I do io = IO.popen('ruby myscript.rb', 'w'); io.puts 'hi', I get a broken pipe error
<akahn> maybe i need to use options like these: :err=>[:child, :out]
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
<andrewvos> akahn: I think you need to pass in a block or something
<andrewvos> akahn: Oh wait it's because the process has ended.
<andrewvos> akahn: Ok either of those things I said may be valid.
_inc [_inc!~inc@host81-152-6-45.range81-152.btcentralplus.com] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<shevy> hmmm
<shevy> aren't unix pipes like ...
<shevy> ... methods applied to objects?
<shevy> ls | sort ... ls.sort
<raggi> no
<raggi> they're block based io
<rue> akahn: ruby -e 'IO.popen("grep n", "w") {|i| i.write "n" }'
<raggi> popen has magic args for piping to ruby processes anyway
<rue> shevy: No, but we've done this whole thing in 2004 :)
<shevy> hmm hmm hmm
<rue> raggi: Forked or child, but not a completely different one
<shevy> I need bigger brains
<zzak> shevy: ill trade you brains for time
<shevy> hehe
<rue> akahn: open3 may be easier to reason about; there's also .spawn in 1.9, which I think is magic
<raggi> MAGIC
wholeeo [wholeeo!6c23abde@gateway/web/freenode/ip.108.35.171.222] has joined #ruby-lang
<erikh> it's posix_spawn() right?
<erikh> at least I remember reading this code with someone
<erikh> can't remember who :P
<raggi> lies!
<erikh> haha
<raggi> were we reading 1.9?
<raggi> i think we were reading 1.8
<erikh> both actually
<erikh> we were arguing about system(*args)
<erikh> remember?
<raggi> oh yeah
rpowell [rpowell!~rpowell@CPE-138-130-100-237.lns2.cht.bigpond.net.au] has joined #ruby-lang
<akahn> thanks everyone
<raggi> how it's always a string :)
<zzak> i have a leather-bound copy of 1.4, ahh the classics
<erikh> yeah, egg on my face :P
<raggi> i was disappointed too
<erikh> raggi: lourens's 0mq lib is *hot*
<raggi> yes, i know
<raggi> that's why i asked him to write it
<raggi> ;-P
<wholeeo> what do you guys think is the best resource for learning ruby?
<raggi> dudes a legend
<erikh> yes
Gekz [Gekz!~gekz@159.253.5.25] has joined #ruby-lang
Gekz [Gekz!~gekz@unaffiliated/gekz] has joined #ruby-lang
<raggi> i gotta run, legs about to lock up and kill me if i sit in this breeze any longer
<erikh> have fun.
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<akahn> If one process is writing to the stdin of another process, and the other process just blocks, does this stream 'back up' somewhere and consume memory?
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
<zzak> wget ftp://ftp.ruby-lang.org/pub/ruby/1.4/ruby-1.4.6.tar.gz
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
<akahn> this question has been consuming me
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
<shevy> hmm. .instance_variable_get() does not want the argument to include '@' right? so rather than passing in "@foo" one should pass in "foo" right? My brain ain't work too well right now :(
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<ryanf> it does want @
<wallerdev> i think you're supposed to pass :@foo
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
<wholeeo> how does one specify multiple conditions for while =\
<wallerdev> with an or
<wallerdev> or an and
<wallerdev> while 1 < 3 and 3 < 5
<wholeeo> and isn't working for for some reason, the loop finds one condition and ends itself
<wallerdev> right
<wallerdev> it while loop while condition 1 and condition 2 are both true
<wholeeo> im certainly doing something wrong though since im new to all of this
<wallerdev> if one of them becomes false it will stop the loop
<shevy> ryanf hmm ok... then I have another error somewhere else. thanks!
<wallerdev> if you want them both to be false you should use "or"
<wholeeo> its unfinished work at the moment, doing some examples from the pine.fm site
<wallerdev> haha i remember that
<wholeeo> this thing has me stressing
<wholeeo> lol
<wholeeo> since im not moving on with the guide unless i can understand how to work this problem out
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
<wallerdev> what is the issue? that you type bye and it exits?
<wholeeo> and he doesn't really show you how to set multiple while conditions, unless im understanding it wrong
<wholeeo> yes
<wallerdev> your condition is saying loop while none of those variables are equal to bye, so when one of them is equal to bye it will exit the loop
<wholeeo> without even waiting for y or z results
<wholeeo> hmm i see
<wallerdev> basically the while loop will loop while the condition is true
<wallerdev> so you have false && true && true which simplifies to false
<wallerdev> if you want them all to be false before it leaves the loop you want to use OR instead of AND
<wallerdev> but yeah it can get tricky to read when you use nots since it reverses the logic
<shevy> not not not change_directory
wholeeo [wholeeo!~Julio@pool-108-35-171-222.nwrknj.fios.verizon.net] has joined #ruby-lang
<wholeeo> think i got disconnected
flowerpot [flowerpot!~flower@ec2-50-112-22-115.us-west-2.compute.amazonaws.com] has joined #ruby-lang
<wholeeo> wallerdev: i was under the impression that it had meant that while x y z are different to 'BYE' the loop would continue, so if im understanding correctly, once one of the conditions are false it will exit the loop
<wallerdev> right
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
<wholeeo> wallerdev: can i pm you?
<wallerdev> yes
<erikh> do fibers get garbage collected?
<andrewvos> If you have enough of them in your diet.
<erikh> haha
<erikh> just trying this idea where I send 0mq messages to a dispatch table which is used to create fibers which are then run as time permits
<erikh> seems like something's leaking, would prefer to blame my failcode
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<flowerpot> If I install gems with RubyGem, am I correct in understanding that my other package managers like dpkg and rpm won't know about it?
<rue> Yup
<wallerdev> i saw some thing that would install gems through deb files
<flowerpot> Is there a reason why Ruby uses RubyGems instead of a normal package manager?
<erikh> wow, i think it's all the fixnum allocations
<wallerdev> it was scary
<erikh> haha
<wallerdev> flowerpot: i think because gems change a lot, and package managers don't update much
<flowerpot> I see
<flowerpot> that makes sense.
<shevy> flowerpot package managers, or rather the guys who do that, often change things
<flowerpot> so it's OK to think of rubygems as "a package manager specialized for ruby apps/librarires"?
<shevy> I remember when debian split up ruby into about 3985 different components
<andrewvos> flowerpot: Most languages have their own package manager.
<flowerpot> I see
<shevy> flowerpot I like to think of gems as a nice way to update ruby apps especially on windows
<shevy> gem install something
<shevy> here for me, all gems are stored in /usr/lib/ruby/gems/1.8/cache/
<andrewvos> ERROR: Could not find a valid gem 'something' (>= 0) in any repository
<andrewvos> ERROR: Possible alternatives: nothing
<shevy> I copy them to my regular backup site so that I can carry the .gem files with me i.e. on an USB stick
<andrewvos> nothing?
<flowerpot> If I build a Ruby app that uses some gem, is it possible to export it so that an end-user can run the app without going through the trouble of first installing the required gem?
<shevy> andrewvos, hmmm now I am tempted to create that gem :P
<flowerpot> If this is all covered in a tutorial (and it probably is), then I should probably just read that instead
<wallerdev> that reminds me of a long time ago i decided to go to http://something.com
<wallerdev> looks like it's still the same today
<shevy> flowerpot gem should take care of the dependencies. if your app is called "flowerpot_smokes_it_all", and someone does "gem install flowerpot_smokes_it_all", then gems will download any non-matched dependencies first, and resolve that for the user
<wallerdev> it's been that way for at least 10 years then haha
<shevy> that was one big reason why gem was created in the first place
<flowerpot> I see
<shevy> wallerdev unlike angelfire, which is gone! :(
<shevy> haha
<shevy> Foo.do.nothing
<shevy> [1, 2, 3, 4, 5].nothing
<shevy> omg
<shevy> WHAT IS THIS DOING
<flowerpot> Where are gems maintained? Is there canonical gem repository somewhere?
<shevy> flowerpot yeah
<wallerdev> you can get gems from github as well
<flowerpot> cool
<shevy> go register today, then you can publish your gems at a later time ;)
knicholl [knicholl!~knicholl@CPE000c41aa92fa-CM0011aea0f5b2.cpe.net.cable.rogers.com] has joined #ruby-lang
<wallerdev> or did they stop that
<shevy> dunno
<shevy> never knew you could get gems
<shevy> I always (can?) choose between .zip and a tar file from github
<wallerdev> looks like they stopped doing it
<shevy> havent seen a gem yet
<shevy> oh I see
<erikh> aha, rbczmq is leaking
<erikh> at least I'm fairly sure it is without consulting a debugger
<wallerdev> 0mq looks interesting
<wallerdev> never had an idea for a project that could utilize it though
ioga_wrk [ioga_wrk!~ioga@92.255.125.251] has joined #ruby-lang
<shevy> what is 0mq
<wallerdev> zeromq
<wallerdev> isn't that what you were talking about?
<shevy> what is the mq
<wallerdev> message que?
leanother [leanother!~leanother@190.80.179.159] has joined #ruby-lang
<wallerdev> queue
<wallerdev> oh
<wallerdev> erikh was using it
<wallerdev> rbczmq
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
flowerpot [flowerpot!~flower@ec2-50-112-39-12.us-west-2.compute.amazonaws.com] has joined #ruby-lang
<flowerpot> I'd like to usee pony to send email from a ruby script, but I don't understand the syntax of the command. I'm a Ruby newbie, and it's hard to search for things like ":" in Google...can you tell me what to search for so I can understand the syntax of : and => in the line calling the Pony.mail method?
jaisoares [jaisoares!~jsoares@92.250.2.116] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<wallerdev> its passing a hash full of parameters
<wallerdev> flowerpot: like https://gist.github.com/1654906
<shevy> flowerpot, remember you can omit things like ()
<shevy> so:
<shevy> Pony.mail :from=>"me@example.com", :to=>"you@example.com", :subject=>"hello", :body=>"world"
<shevy> is like:
<shevy> Pony.mail(:from=>"me@example.com", :to=>"you@example.com", :subject=>"hello", :body=>"world")
<shevy> or:
<shevy> Pony.mail({:from=>"me@example.com", :to=>"you@example.com", :subject=>"hello", :body=>"world"})
<shevy> you see?
<shevy> {} is just a hash in ruby
<flowerpot> Okay, so it's passing 1 argument
<flowerpot> a hash
<flowerpot> from maps to me@example.com, to to you@example.com, and subject to hello, etc
<flowerpot> right?
<shevy> { 'jimmy' => 'is sick','tommy' => 'is not sick' }
<wallerdev> yes
<flowerpot> cool, that makes sense.
<flowerpot> thanks
<shevy> yeah
<wallerdev> it's ruby's excuse for named parameters
<shevy> it just looks confusing when you dont know that you can omit those things
<shevy> (or rather, vice versa)
<wallerdev> and for reference "=>" is called a lot of different things like "hash rocket" haha
<shevy> yeah, you can use those keys... like :from, :to, :subject, :body
<erikh> fat comma
<flowerpot> cool. I'll read about ruby hashes to learn more. saved me many minutes of googling :)
<flowerpot> thank you
<shevy> flowerpot, that way you can call a method with a short hash, that only defines a different :to
<shevy> rails uses that a lot
<shevy> /shop/checkout?order=desc&page=1
<shevy> current_page?(:controller => 'library', :action => 'checkout')
<shevy> current_page?(:controller => 'shop', :action => 'checkout', :order => 'desc')
<flowerpot> what's with the colon before the name?
<erikh> it's a symbol
<erikh> an optimization more or less.
<shevy> link_to "Profile", :controller => "profiles", :action => "show", :id => @profile
QaDeS_ [QaDeS_!~mklaus@frbg-5d84e2ac.pool.mediaWays.net] has joined #ruby-lang
<shevy> hmmm
<shevy> man, that can become messy ...
<shevy> link_to "Test", {:controller => "controller", :action => "action", :params => { :id => @picture.id}}, :class => "css-class"
<shevy> I better stop :\
<flowerpot> lol
<flowerpot> thank you though, i understand now
<erikh> rue: around?
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
bludimnd [bludimnd!~amichai@178-83-34-252.dynamic.hispeed.ch] has joined #ruby-lang
bludimnd [bludimnd!~amichai@178-83-34-252.dynamic.hispeed.ch] has quit [#ruby-lang]
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
<erikh> spot the leak?
<erikh> :)
arooni-mobile [arooni-mobile!~arooni-mo@190.149.154.114] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
<zzak> drbrain: ping
<flowerpot> FYI: great explanation of symbols for newbies like me: http://www.troubleshooters.com/codecorn/ruby/symbols.htm
<flowerpot> Now I see why Pony uses symbols for calls to its mail method
fayimora [fayimora!~fayimora@95.175.159.58] has joined #ruby-lang
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
<zzak> flowerpot: you should checkout the 'mail' gem too: https://github.com/mikel/mail
<flowerpot> Another question: in this example, he sends an email using Pony by calling Pony.mail, but he hasn't created any Pony object...is this done behind the scenes?
<flowerpot> thanks zz_chrismcg
<flowerpot> errr
<flowerpot> zzak
* zzak c/,,\
arooni-mobile [arooni-mobile!~arooni-mo@190.56.107.196] has joined #ruby-lang
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
<flowerpot> zzak, may I ask you a question about Mail? I notice that in a lot of the examples, various aspects of the message are set by doing something like mail = Mail.new do blah blah blah end -- I get that we're setting stuff up between the do and the end, but I don't understand the syntax of the do. Is there a simple reason why everything between the do and end isn't just included in parentheses and passed as arguments?
<zzak> give me an example
<flowerpot> This is where it seems to be built: https://github.com/mikel/mail/blob/master/lib/mail/mail.rb
<flowerpot> I'm trying to understand the syntax of the stuff on lines 19-24
<flowerpot> I mean 20-25
<flowerpot> I get 2-32
<flowerpot> I mean 29-32
<zzak> because it lets you pass a block to the initializer
<zzak> you dont have to
<flowerpot> I see
<zzak> mail = Mail.new; mail.to = 'flowerpot'; mail.from = 'zzak'; mail.subject = 'im a little teapot'; mail.body = 'short and stout'; mail.deliver;
<flowerpot> that would also do the trick?
<zzak> give it a try
<zzak> i think so
drdr [drdr!d059b08f@gateway/web/freenode/ip.208.89.176.143] has joined #ruby-lang
<zzak> it might be deliver!
<zzak> i'm not sure
<flowerpot> blegh, simple problem: I have require 'mail' at the top of my code but I get error "send-email.rby:1:in `require': no such file to load -- mail (LoadError)" -- however, gem list --local shows that mail (2.4.1) is installed. what gives? :(
<drdr> is your ruby set up to autoinculde rubygems?
<flowerpot> I don't know, so maybe not?
<drdr> try adding before that require 'rubygems'
<flowerpot> no error that time
<flowerpot> what does require 'rubygems' do?
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
<flowerpot> hey, the email worked. looks like your syntax is correct :)
<drdr> ok
<drdr> most rubies are set up to include gems at runtime
<drdr> some arent though
<drdr> require rubygems forcefully scopes in all the gems you have installed
huhu_ [huhu_!~huhu@unaffiliated/huhu-/x-6122598] has joined #ruby-lang
<huhu_> Does ruby provide s-expr?
<huhu_> Given that it's "lisp-like", does it have symbolic expressions?
<flowerpot> I see
<drdr> huhu example please
<flowerpot> Thanks drdr
<ryanf> huhu_: no, ruby doesn't have sexprs, although some people have written gems to do stuff like rewriting syntax trees
<drdr> 1.9 has lambeda support if thats what your looking for
<huhu_> ryanf: Ah.
<huhu_> ryanf: Okay.
<ryanf> people compare ruby to lisp because of its metaprogramming abilities
<ryanf> but it doesn't have real macros
* huhu_ nods.
<huhu_> What's the preferred book for learning Ruby?
<whitequark> Ruby is a language for building DSLs
<whitequark> that's not macros, but that's pretty close
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
dreinull [dreinull!dreieins@217.18.70.225] has joined #ruby-lang
<zzak> flowerpot: are you on 1.8.7?
<zzak> if so you can just do 'ruby -rubygems wtf.rb'
<zzak> or use 1.9.3 which doesn't have that problem
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby-lang
Jarred [Jarred!~Administr@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby-lang
<rue> erikh: Nothing obvious
<huhu_> k
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
<rue> erikh: What's the manifestation?
jxie [jxie!~jxie@218.64.35.106] has joined #ruby-lang
ryanf_ [ryanf_!~ryanf@56.sub-174-253-233.myvzw.com] has joined #ruby-lang
ryanf_ [ryanf_!~ryanf@56.sub-174-253-233.myvzw.com] has quit [#ruby-lang]
nfxgosu [nfxgosu!~nekid@117.202.82.224] has joined #ruby-lang
<nfxgosu> what is the max number of characters I should use in a line?
<nfxgosu> there should be a rubyquizbot
<nfxgosu> that you can turn on & off in this channel
<rue> nfxgosu: <80
nfxgosu [nfxgosu!~nekid@117.202.82.224] has joined #ruby-lang
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
Ttech [Ttech!ttech@botters/staff/ttech] has quit [#ruby-lang]
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-138-130-100-237.lns2.cht.bigpond.net.au] has joined #ruby-lang
<ryanf> I think 80 is pretty debatable
<ryanf> 80 is nice but it's often kind of impractical. at work I shoot for 110
flowerpot [flowerpot!~flower@ec2-50-112-39-12.us-west-2.compute.amazonaws.com] has joined #ruby-lang
<shevy> hmm
<shevy> I stick to less than 80, except for comments on one line
<erikh> rue: about 1-2M growth every second
<erikh> never seems to taper
<erikh> oh well, I need to go do something else for a while
<raggi> erikh: dunno if you're near your skype
<raggi> but i fixed that leak for ya
<erikh> oh sec
<erikh> let me fire it up
<erikh> the work one is one hwen I'm not on it @ home
<raggi> sure
<raggi> be sure to bundle update or w/e
<erikh> oh ok; I'll yep
<erikh> thanks dude!
<raggi> np
<raggi> i think lourens might have missed more in recv too, but i'm kinda tired, i might look later/tomorrow
<erikh> it's ok, I appreciate anyone taking the time to look at it that deeply
<raggi> your use case isn't leaking at all now
<raggi> :)
<erikh> basically I'm going to try to react over 0mq messages to control the monitoring system
<raggi> well
<raggi> i'd use the built in loop
<erikh> rsize is 16M and stable
<erikh> thank you!
<raggi> and just write a normal reactor :)
<raggi> but yeah
<raggi> looks fun
<raggi> zmq <3
<erikh> should be
qpingu [qpingu!~Adium@99-45-170-65.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<raggi> btw
<raggi> when you're using delegateclass
<erikh> built in loop? I'm not that fluent in zmq yet
<raggi> just do super([]) and then dispatch methods on self
<raggi> you don't need an extra reference to the same thing
<erikh> ah ok, I always have done it this way
<erikh> not sure where I cargo culted that from.
* raggi nods
<erikh> right right
<raggi> probably forwardable usage
<raggi> which ofc, you'd need to do that
<erikh> possible.
<erikh> ah I see you locked down the block casting
<erikh> was playing with fibers, which is why it was that way
<erikh> (not sure if it was necessary, but it is what it is)
<raggi> i normally use respond_to?(:call) as an interface for these thigns
<raggi> so i can later make classes for complex actions that are easier to test
<raggi> but doesn't make much difference
<raggi> i was moving things around ot be sure there weren't leaks elsewhere, before dropping into gdb
<raggi> going through the process reminded me of ObjectSpace.count_objects which I <3 in 1.9
<erikh> yep, I didn't want to blame lourens for my bad code
<erikh> does Fiber respond to call?
<erikh> no matter - I've no use case for it now that I understand it better
<raggi> yeah, i don't know why you'd want fibers here
<raggi> maybe threads, but fibers, meh
<erikh> yeah I was just experimenting
<erikh> right, the idea was that I wanted async execution
<erikh> but I am new to fibers, so I wanted to try that out
<erikh> it doesn't do what I want -- procs are fine here
<raggi> use a thread pool bro
<erikh> I might exhaust the dispatch queue in a second thread though
<raggi> yeah
<raggi> tbh
<raggi> a plain reactor will be fast enough fro what you want
<erikh> I'm more worried about, forking and execing and having the fork execute queue actions
<erikh> so I'm going to guard that or exhaust on fork
<erikh> (well, delete)
<erikh> dunno. I need to think about it some more.
<erikh> raggi: oh, fwiw sys-proctable seems to solve most of my needs in the process management department.
<raggi> re loops, checkout loop.c
<erikh> will do.
<raggi> is that a codeforpeople gem?
<erikh> nah, it's an imperator one
<erikh> i've read the source a bit, he has implementations for bsd, solaris, linux, and os x
<raggi> ah yeah
<raggi> i figured it was either cfp, imperator or like puppet/chef
<erikh> which should be more than enough for what I'm doing
* raggi nods
<erikh> just taking this slow and trying to do it right
<erikh> did I show you the proposed interface?
<raggi> yeah
<rue> Hm
<rue> Mayhaps a pass through the codebase wouldn't be a bad idea
<raggi> yep, found the same leak in #recv, now fixed too
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<erikh> awesome
<rue> There's more code than I was expecting
<raggi> rue: that happens
<rue> It is the way of things, yes
<shevy> the finnish way of life
wmoxam [wmoxam!~wmoxam@184.175.15.252] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
<rue> Looks pretty good at a glance, though.
<raggi> rue: what are you talking about?
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<rue> Wandering around code at morning o'clock
fayimora [fayimora!~fayimora@95.175.159.58] has joined #ruby-lang
flowerpot [flowerpot!~flower@ec2-50-112-39-12.us-west-2.compute.amazonaws.com] has joined #ruby-lang
<erikh> I think it's time for another beer
<raggi> v!-'ur- ""q-s"%-&'%nvtu'-n!&*r%&-v-&rr
ahs3- [ahs3-!~ahs3-@adsl-065-005-193-158.sip.rdu.bellsouth.net] has joined #ruby-lang
<shevy> ascii cancer
<raggi> example of a straight answer
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<rue> raggi: Just pulled rbczmq. The abstraction's pretty good
<raggi> he's learned a lot about integrating that stuff w/ ruby over the last few years
<raggi> i havent' had a chance to go through it in a lot of depth yet
<raggi> been meaning to, though
brmouzone [brmouzone!~brmouzone@108-90-18-133.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
<ryanf> so chronic is for parsing fuzzy dates, but is there a library for parsing spans?
<ryanf> I guess it's not that complicated
<ryanf> nvm I'll just do it
<rue> Date ranges?
<ryanf> I mean like lengths of time instead of absolute points in time
<ryanf> like "3 hours" or whatever
<rue> Durations
<ryanf> yes
<ryanf> precisely
<muzone> brmouzone: what the hell
<rue> muzone: Not seen the Wire?
<ryanf> I was influenced by having just been looking at the docs for Chronic::Span, which is a class that represents durations
<rue> raggi: Yep. The czmq API seems quite reasonable to work against/with
<brmouzone> muzone: it seems we have a problem here
<raggi> it's like scripting for sockets
<muzone> brmouzone: why u copycat
<raggi> i really wish the +1 culture would die.
<raggi> that shit makes me angry
<raggi> it's like people are going "hey, the maintainers an asshole who doesn't listen to people, so we better rally up guys!!!!"
<flowerpot> What is the difference between a "framework" like Ruby on Rails and a library?
<ryanf> wow that seems a bit over the top. you don't think it's useful for maintainers to know how many people care about something?
<ryanf> I mean, assuming it isn't obviously super important
<rue> flowerpot: Little. A framework implies, perhaps, something you build your code around. A library is just a component
<raggi> ryanf: if a maintainer can't figure that out, they have no job being a maintainer
<ryanf> how are they supposed to figure it out other than people telling them?
<ryanf> mind-reading?
<raggi> ryanf: i hope you dont' maintain any gems
<raggi> ryanf: no, usage stats are pretty clear most of the time
<rue> raggi: Somehow, people still end up that way :)
<rue> ryanf: So using Chronic's spans, then?
<ryanf> rue: no, they don't actually do that as far as I can tell
<ryanf> but I realized that it's maybe 30 lines of code to just do it myself
<flowerpot> rue, I see... sounds like "framework" is mainly a buzz word
<ryanf> I don't need anything very complicated
<raggi> https://rubygems.org/gems/omniauth/stats <- clearly i'm going to assume no one uses this, because these stats don't exist, and no one *ever* talks about this library
<rue> Chronic duration?
<ryanf> what raggi? what do overall usage stats have to do with how many people care about a specific issue related to a library?
<ryanf> maybe I'm just totally misinterpreting you
<rue> Technically ^
<ryanf> are you not talking about people commenting "+1" on github issues?
<raggi> yes
<raggi> it's a complete waste of everyones time and makes reading real comments in issues difficult
<raggi> people who do it are idiots
<ryanf> can you explain how the usage stats you linked to have any connection to this conversation at all
<raggi> i got an issue in rack, where someone said somethign stupid, there were a ton of +1s on teh ticket, and other real comments were lost in the fray
<raggi> and all because a bunch of railstards think i can't figure out that people use omniauth
<raggi> at least i have a script now to delete +1 comments
<rue> .js
<raggi> so they're really very genuinely wasting their own time
<raggi> rue: :D
<rue> Well, maybe a different vote mechanism'd work
<raggi> sure, then i'd ignore that too
<rue> It'd be easier to
<raggi> i fix every (real) and useful issue that is reported
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
<raggi> so it's all BS anyway
<rue> There's (some) value to votes. Broadly, of course, for feature requests and such
<raggi> yes, when they're asked for
<ryanf> ah. I didn't know there was secret context that you didn't actually mention
<ryanf> I usually think of +1s in relation to stuff like feature requests
<raggi> really they're only useful when the maintainer goes "i'm not sure which way this should go, votes?"
<ryanf> where it's not necessarily obvious whether a use case is something that matters to many people or not
<rue> Also, you can't ignore that poor maintainership may be an endemic issue
<ryanf> not that I've ever done it. but I've seen threads like that where it made sense for someone else to have done it
<ryanf> agree that after a certain point piling on with it is dumb though
<raggi> well, i don't claim to be an "excellent" maintainer, but apparently there are a lot of people doing a lot worse :(
<raggi> on pull requests is worse
perryh_ [perryh_!~perryh@unaffiliated/perry753] has joined #ruby-lang
<raggi> on another topic: the multipart RFC blows
<rue> Something in particular?
<raggi> yeah
<raggi> filename fields
<raggi> all it says about their encoding is "the file name might be approximated or encoded using the method of RFC 1522"
<raggi> "might" should be banned from rfc texts
<raggi> i think when browsers see rails unicode enforcement hack
<raggi> they encode in utf8 explicitly, and don't use % encodings
<raggi> i really need to rewrite racks multipart parser, been needing to for a long time
<rue> I think we did our own multipart parsing for some API, it was great
<raggi> yeah
<raggi> depends on your use case, the basic stuff for a few use cases is really easy
<raggi> expanding to all the real world madness is horrible
<rue> Yes
<raggi> it's actually one of the things i've like to outboard
<rue> See, I've cunningly only worked with stuff that nobody cares about. Makes maintainership very easy!
<rue> s/with/on/
<raggi> rue: you did quite a bit of stuff on rbx though right?
<rue> Well, yeah. Didn't really have time for much else then
<rue> s/time/& left/
<raggi> makes me jealous
<raggi> i like that code base
<rue> It is quite nice. I haven't had the energy but to barely keep up with the changes anytime recently, though
<raggi> i only pop in occasionally to fix bugs w/ other things
<raggi> which most of the time evan/brixen fix for me
<raggi> although wiht the last one i did actually earn commit rights
<rue> Heh
<raggi> <3 evan, he fixes so much stuff for me
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<rue> I've been looking about something worthwhile to do for a bit, but of course the Ruby ecosystem is pretty well-established so there're few niches that need libraries and none of them particularly interest me
<rue> ZMQ does look like it'd be fun to play around with, though.
<rue> Figured I might play with some of the Web Architecture 2.0 ideas
<raggi> web arch 2?
<raggi> rue: re zmq, it'd be valuable to have well written examples &/ libs for each of the patterns in the guide
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
<raggi> mmm
<raggi> i have mixed feelings about that stuff
<raggi> the biggest issues around http are it being compries of many poorly written and incoherent specs
<raggi> and that's not getting really any better in all this
<rue> No, it isn't.
<raggi> maybe i should start writing rfcs
<raggi> :-/ :(
<rue> Essentially the entire web's a collection of workarounds that became standard
<TTilus> what doya think about spdy and co?
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<TTilus> rue: thats more like a rule for software, legislation, societies and pretty much everything else ;)
<rue> I haven't formed an opinion yet. First instinct was to dislike it, but at the user level it's still the same concept as HTTP so that's not too bad
<TTilus> rue: excluding haskell, of course :)
<rue> On the other hand, that could just be symptomatic of the same problem
<TTilus> rue: my first impression was that its kinda like svn was for cvs
<TTilus> kinda like better but still kinda like not quite improving things much
<TTilus> id be happy to be wrong though
<rue> No, it's incremental definitely
<rue> The larger problem is the fundamental architecture. REST works pretty well even at a large scale, and it's easy to reason about. There're (mostly lower-level) problems with it, the pipelining, SSL and so on, but it's plausible that it could live on
<TTilus> true
<rue> I guess fundamental is exactly the opposite of what I mean… the overarching concept.
<rue> But, perhaps there's a better way
<rue> That'd have implications on the underlying architecture, of course.
<rue> Clearly what's needed is a bunch of academia
<rue> For now I'd just be happy if Nobody Understands REST wasn't as close to true as it is.
ksinkar [ksinkar!~ksinkar@117.195.100.16] has joined #ruby-lang
<erikh> this is why I hate the web
<erikh> that is all
<rue> But the web luuurves you!
<erikh> it most certainly does not
<erikh> if it loved me it wouldn't make sites like reddit
<erikh> anyhow post-being-paged smoke time
dav [dav!~dav@host180-31-dynamic.42-79-r.retail.telecomitalia.it] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@128-70-95-104.broadband.corbina.ru] has joined #ruby-lang
<erikh> I just found out they're not doing a fallout mmo
<erikh> I'm very sad :(
<rue> You can't make an MMO out of it anyway, it'd have to be a SparselyPopulatedMO
<erikh> bah
<erikh> you're ruining my worldview here
thone [thone!~thone@g226049204.adsl.alicedsl.de] has joined #ruby-lang
<rue> You can't have a post-apocalyptic survival society with millions of people
<erikh> well that's what the vaults were about
<rue> That's what THEY want you to think
<erikh> hahah.
<erikh> chuck fact: Chuck Norris can slam a revolving door.
csherin [csherin!~csherin@61.17.32.61] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
acts_as [acts_as!~acts_as@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
<whitequark> erikh: anyone can
<whitequark> but he will be still alive afterwards
<epitron_> chuck norris facts were great
<epitron_> Chuck Norris doesn't read books. He stares them down until he gets the information he wants.
<whitequark> any recursive ones?
<epitron_> There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.
<epitron_> When Chuck Norris plays pac-man the ghosts stay in their box.
<rue> Chuck's roundhouse kick is TCO?
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<erikh> Chuck is beyond stack frames
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<shevy> matz knocked down chuck norris with his bare fists
<shevy> twice
dr0id [dr0id!~andy@unaffiliated/dr0id] has quit [#ruby-lang]
dejongge [dejongge!~jonke@pD9E0C1CA.dip0.t-ipconnect.de] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
gregmoreno [gregmoreno!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
<rue> That doesn't seem nice
<epitron_> Bill Brasky wears a live rattlesnake as a condom.
epitron [epitron!~epitron@bito.ponzo.net] has joined #ruby-lang
epitron [epitron!~epitron@unaffiliated/epitron] has joined #ruby-lang
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
shevy [shevy!~shevy@178-191-185-60.adsl.highway.telekom.at] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<rue> Chuck Norris can make Matz not be nice
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
jrob [jrob!~jrob@c-98-207-229-151.hsd1.ca.comcast.net] has joined #ruby-lang
naz [naz!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-238-54.dsl.mweb.co.za] has joined #ruby-lang
<shevy> hmm what was that syntax again
<shevy> array(&:map) something
<ddfreyne> array.map &:stuff → array.map { |a| a.stuff }
<shevy> ahhh
<shevy> weird how my brain tried to remember it hehe
<shevy> thanks ddfreyne
<ddfreyne> it’s implemented as Symbol#to_proc
<ddfreyne> because #& is an alias for #to_proc
<shevy> ohhhhh
<shevy> that's the first time I hear that!
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
<rue> Well, & calls #to_proc
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<Mon_Ouie> There is also an #& method, which does something different (and needs an argument)
<ddfreyne> I was referring to what Mon_Ouie said
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
<andrewvos> WTF ACTA now?
<andrewvos> The world has gone mad.
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<Mon_Ouie> ddfreyne: You were referring to #& as in 3 & 4 or [1, 2] & [2, 3]?
<ddfreyne> ah
<ddfreyne> Mon_Ouie: no I’m wrong
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
<andrewvos> shevy: ERROR: Could not find a valid gem 'something' (>= 0) in any repository
benanne [benanne!~rijdier@137.7-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
beit [beit!~beiter@mnhm-590c37d1.pool.mediaWays.net] has joined #ruby-lang
gix [gix!~gix@e180036021.adsl.alicedsl.de] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<rue> andrewvos: Have you tried rebooting?
fragmachine [fragmachine!~fragmachi@1.124.59.117] has joined #ruby-lang
<andrewvos> rue: Yes I even asked the neighbours to reboot. Can never be too sure.
<fragmachine> has anyone managed to get green_shoes working with Lion?
<fragmachine> I tried installing it using the instructions for homebrew on the github site but when I try and run the gem I get this error - http://pastie.org/3230151
<fragmachine> or does anyone know any noob freindly ways to make simple GUI's for ruby on a mac?
<rue> Is it confirmed to work on 1.9.2 now?
<rue> Depending on exactly how noob, macruby or just Tk might work
<fragmachine> ok
<fragmachine> the github site just says 1.9
<fragmachine> I'll try and install it for 1.9
<rue> Try 1.9.3
<fragmachine> ok no problem. Is 1.9.3 more stable or something?
<manveru> fragmachine: very
niklasb [niklasb!~codeslay0@p5B311333.dip0.t-ipconnect.de] has joined #ruby-lang
<fragmachine> ok cool, I'll see if it works.
vesan_ [vesan_!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.58] has joined #ruby-lang
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
futurechimp [futurechimp!~futurechi@87-194-37-29.bethere.co.uk] has joined #ruby-lang
fayimora [fayimora!~fayimora@host86-151-111-74.range86-151.btcentralplus.com] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
gianlucadv [gianlucadv!~user@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC15298.dip.t-dialin.net] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.240.41.241] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
nofxx [nofxx!~nofxx@187.23.26.139] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-212-237.ssp.dialog.net.pl] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
<pbjorklund> Im curious if there is any way to remove the use of a local variable in simple rspec .should. Like user = User.first;user.should not_be nil;user.name.should == 'pb'. Any ideas on what concept I should google?
<manveru> pbjorklund: why do you check whether it's nil first?
<manveru> User.first.should == 'pb'
<manveru> err
<manveru> well .name :)
<pbjorklund> That's true, perhaps that was a bad example :)
<manveru> otherwise what's wrong with a variable?
<pbjorklund> The reasoning I have (correct me if im off) is that any failure in the .should part will make the 'it' fail and that specifying user. before everything is redundant and could be removed to increase readability
<manveru> user.instance_eval{ name.should == 'bar'; age.should == 12 }
<pbjorklund> and I find myself misspelling the local var alot.. .:P
<manveru> i suggest you try tab completion :)
<pbjorklund> manveru: Thanks for the help! It's pretty fun starting to learn these interesting ways of doing things in ruby
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
dominikh [dominikh!~dominikh@cinch/developer/dominikh] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
cyndis [cyndis!cyndis@lakka.kapsi.fi] has joined #ruby-lang
shaman42 [shaman42!shaman42@kapsi.fi] has joined #ruby-lang
chessguy [chessguy!~chessguy@pool-74-96-83-16.washdc.fios.verizon.net] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
<chessguy> anybody care to give me some advice on how to add different types of events to the observable pattern in https://github.com/arwagner/terry/blob/master/lib/terry/knowledge_base.rb
<rue> chessguy: Pretty much just do it?
<chessguy> rue: well, for example, when i add a listener, i want to specify what event(s) it listens for
<chessguy> but i'm not sure how to do that with forwardable, or if i can
queequeg1_ [queequeg1_!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
<chessguy> i might be over-thinking it
<rue> You're using your own observable implementation?
<chessguy> rue: at the moment, yes
<rue> Then you could probably associate updates with some keyword, for example
<rue> Or, more simply, prefix notifications with one
<chessguy> i'm not sure what you mean
<rue> YayEvent.new "text"
<rue> Or [:yay, "text"]
<rue> Or obj.register_for :yay
<erikh> ohai
<chessguy> rue: what is obj in that case, an instance of Observable?
<rue> Probably
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
<Spooner> Can I work out a class's namespace (module) without parsing its .name?
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
<erikh> not afaik
<Spooner> OK, thanks.
imperator [imperator!~djberg96@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@117.201.138.161] has joined #ruby-lang
michael_mbp_ [michael_mbp_!~Marin@46.186.175.5] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has quit [#ruby-lang]
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
slyphon_ [slyphon_!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<rue> You can store the nesting, but it's pretty useless
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
jxie [jxie!~jxie@218.64.27.97] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<erikh> zenspider: filing bug reports LIKE A BOSS
rippa [rippa!~rippa@109-161-127-12.pppoe.yaroslavl.ru] has joined #ruby-lang
enikar [enikar!~gil@2a01:240:fe00:8b::2] has joined #ruby-lang
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.57.216] has joined #ruby-lang
jamw [jamw!~j@cpc11-orpi3-2-0-cust53.2-3.cable.virginmedia.com] has joined #ruby-lang
jxie [jxie!~jxie@218.64.25.78] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<rue> Like a boss hogg maybe
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
<imperator> making eric Roscoe P Drbrain
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has joined #ruby-lang
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
<Spooner> No such file or directory - C:/Users/Spooner/RubymineProjects/relapse/test_project/thor/core_ext/hash_with_indifferent_access.rb (Errno::ENOENT) when I run in 1.8.7, but fine in 1.9 -
<Spooner> I'm using bundler - is that using thor for a random reason (it isn't even installed).
<andrewvos> Spooner: Install thror?
<andrewvos> thor*
<andrewvos> Spooner: Let's see your Gemfile
<Spooner> Hmm, yeah, I just tried adding thor to my Gemfile (although it isn't neededin 1.9.2) and it worked. Very odd!
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
<nfxgosu> can someone give me a small idea for a program to write
<nfxgosu> relative noob here
<nfxgosu> i feel unmotivated
<andrewvos> Spooner: Weird.
<andrewvos> Spooner: It must be used somewhere.
<Spooner> andrewvos: Any idea why it would not care about it in 1.9?
<andrewvos> Spooner: Maybe because has_with_indifferent_access is in 1.9 by default. Just a guess.
<Spooner> andrewvos: Ah, I didn't know that. That makes a bit more sense. Thanks!
<andrewvos> Spooner: Not sure about that though.
<andrewvos> nfxgosu: Yep
<andrewvos> nfxgosu: Write a program that stores new things you lern every day.
<andrewvos> nfxgosu: Allow multiple users
<andrewvos> nfxgosu: Perhaps write user registration
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
<nfxgosu> store new things I learn..without typing?
<nfxgosu> highlight->->file
<nfxgosu> hmmm
<andrewvos> nfxgosu: No with text
<andrewvos> nfxgosu: The main page will have a timeline view
<andrewvos> nfxgosu: Kind of like twitter
<andrewvos> nfxgosu: Write it in either Ramaze or Sinatra
<andrewvos> nfxgosu: Use mongo cause it's fun.
<andrewvos> nfxgosu: This site will force you to learn new things every day.
<andrewvos> nfxgosu: Don't do any email sending because that's fucking boring. Maybe go with this type of login process http://www.whattorent.com/
bglusman_ [bglusman_!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<andrewvos> nfxgosu: Then when everything is kind of working, use Twitter Bootstrap to instantly make it look pretty.
<nfxgosu> i see
<nfxgosu> forcing me to learn..
<nfxgosu> based on my input..log web history?
<andrewvos> nope don't log web history
<andrewvos> Write bits of things you learn... Things that make life better or more efficient every day.
_inc_ [_inc_!~inc@host81-153-141-172.range81-153.btcentralplus.com] has joined #ruby-lang
<andrewvos> nfxgosu: For example this is what I learned on the 19th December 2011:
<andrewvos> Heroku uses a product called [lxc](http://lxc.sourceforge.net/) for virtualising their dynos. Dynos are not VMs, but are run inside VMs.
ksinkar [ksinkar!~ksinkar@115.242.40.10] has joined #ruby-lang
<andrewvos> The act of writing it down both forces you to remember it, and learn a new thing every day.
<nfxgosu> you mean typing though, right?
<andrewvos> nfxgosu: Yes. Just like Twitter
<nfxgosu> i see
<andrewvos> Also, allow everything to be written in markdown.
<andrewvos> If you do this project you'll probably learn quite a bit.
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
demeth [demeth!~leto@c83-249-208-141.bredband.comhem.se] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
<andrewvos> Right I'm going to go drink wine and watch The Artist. Peace
<nfxgosu> peace
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
Guest26450 [Guest26450!petrica@82.79.161.45] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
Weems [Weems!~the@nat.resnet.mc.edu] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
pxjorge [pxjorge!~pxjorge@a89-152-235-119.cpe.netcabo.pt] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
Harzilein [Harzilein!~harzi@harzilein.eu.org] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
KDiddy [KDiddy!~kdiddy@p4FEE8423.dip0.t-ipconnect.de] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0CDD1.dip0.t-ipconnect.de] has joined #ruby-lang
<erikh> rue: feh
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
Jake232 [Jake232!~textual@5e0e4df5.bb.sky.com] has joined #ruby-lang
jxie [jxie!~jxie@218.64.26.56] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@190.148.132.134] has joined #ruby-lang
andresgutgon [andresgutgon!~chatzilla@2.pool80-102-132.dynamic.orange.es] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
andresgutgon [andresgutgon!~chatzilla@2.pool80-102-132.dynamic.orange.es] has quit [#ruby-lang]
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
andresgutgon [andresgutgon!~chatzilla@2.pool80-102-132.dynamic.orange.es] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
<akahn> I'm using popen to write to a subprocess. The suprocess consists of `while true; end`, so it just blocks. After writing a certain amount of data to the suprocess, the main process just hangs. Why is this?
cyndis [cyndis!cyndis@lakka.kapsi.fi] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
<raggi> akahn: because the kernel has limited size buffers, and so it blocks the write(2) call
<shevy> ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
<shevy> hmm hmm hmm
<shevy> I am scaring myself
<akahn> raggi: thank you!
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
<shevy> ansicolour.rb:24: warning: duplicated when clause is ignored
<shevy> is there a way to find out which when clause is duplicated precisely?
<manveru> the one on line 24?
<manveru> well, guess not
<shevy> hmm nah, that is the case colour.to_s.downcase.delete(' ') thingy
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
<shevy> some when 'bla' is duplicated but I dunno which one :(
<akahn> raggi: I've been wondering about this because our MTA software streams the results of sending mail to programs or files that we configure. we send that stream to a ruby program that processes the data and puts it into a database. I've been trying to make that program able to handle the database being down, one idea being to have the ruby program not read further until the database comes up again.
<akahn> but if the parent process (the MTA software) blocks until my program reads its input, then that's not okay.
<shevy> ah well, will build the whole case menu anew and stop when I add an error
<akahn> sorry for the essay
<manveru> lol
jbsan [jbsan!~jbsan@host86-147-222-73.range86-147.btcentralplus.com] has joined #ruby-lang
shaman42 [shaman42!shaman42@kapsi.fi] has joined #ruby-lang
<akahn> raggi: is there some way for the parent to know that it's going to block, or for it to say "feh, I don't care, discard this buffer, and start streaming again"?
<rob___> raggi: <3
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.193.228.210] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.230.61] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
szarubin [szarubin!~szarubin@188.163.31.32] has joined #ruby-lang
szarubin [szarubin!~szarubin@188.163.31.32] has quit [#ruby-lang]
szarubin [szarubin!~szarubin@188.163.31.32] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
chessguy [chessguy!~chessguy@pool-74-96-83-16.washdc.fios.verizon.net] has joined #ruby-lang
csherin [csherin!~csherin@61.17.32.61] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
<shevy> In IRB when I type something like `gjklagalkjg`
setmeaway [setmeaway!~setmeaway@118.45.149.247] has joined #ruby-lang
<shevy> I get an error like:
<shevy> NameError: undefined local variable or method `gjklagalkjg` for main:Object
<shevy> Is there a way to somehow intercept that? I would like to pass that input to a special class
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
<rippa> def method_missing breaks it
tangleofwire [tangleofwire!~tangleofw@client-86-16-213-54.glw-bng-11.adsl.virginmedia.com] has joined #ruby-lang
<shevy> hmm
<shevy> in my case/when menus, I usually load that class via the else class. and only if that command was found in that class.
<shevy> no idea how to do that via irb
<shevy> :\
<shevy> "load that class via the else clause"
<rue> What?
<shevy> class foo; when "bla" ...; else; foo = Foo.new(command); if foo.command_was_found? # do something, else pass through.
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
jxie [jxie!~jxie@218.64.26.53] has joined #ruby-lang
diegoviola [diegoviola!~diego@host-1-211.b15.cvc.com.py] has joined #ruby-lang
<shevy> ah well
<shevy> I will do something else and just hate IRB for now.
<lianj> irb loves you back
<shevy> one day I'll replace it
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@46.186.175.5] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<rue> shevy: A) it's case and B) use an if/unless?
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
cirwin [cirwin!~conrad@wiktionary/ConradIrwin] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@190.56.108.38] has joined #ruby-lang
yakko [yakko!~quassel@177.17.219.167] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
whatasunnyday [whatasunnyday!~sunny@c-24-130-81-47.hsd1.ca.comcast.net] has joined #ruby-lang
jorgenpt [jorgenpt!~jorgenpt@arachnophobia.daxnet.org] has joined #ruby-lang
dross [dross!~dross@unaffiliated/dross] has joined #ruby-lang
<dross> anyone use pty ? ^_^ the documentation page says there is a raw! method, yet there is not. http://www.ruby-doc.org/stdlib-1.9.3/libdoc/pty/rdoc/PTY.html#method-c-open
<shevy> rue yeah
<burgestrand> dross: you tried this? require 'io/console' # for IO#raw!
<shevy> but I have no idea where to do that in irb
<shevy> hmm... perhaps one could extend Object at runtime when in irb context?
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.74.150] has joined #ruby-lang
<dross> burgestrand: yes, there is a raw method which wants a block, but there is no raw!
<dross> I'm confused why this is still in the documentation if that's not the case. I'm going to look at commits to see what was changed.
<burgestrand> dross: and you’re using ruby 1.9.3?
<dross> yes
<burgestrand> *shrugs*
<dross> unless, nobu's IO/console ruby module messed with it
<dross> *checks*
<dross> nope
<dross> :<
vmatiyko [vmatiyko!~vmatiyko@178.120.74.150] has quit [#ruby-lang]
<dross> *grr* I wanted to do this in Ruby because it's usually so much faster since I know all the APIs already
<dross> except pty :)
<dross> doesn't look like it's doing newline conversion anyhow
samer [samer!~samer@99-46-136-203.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<dross> oh wait, yes it is :) and nobu already filed a ticket
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
<dross> :| somehow it was removed
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
<dross> gah, I should always search the ML/tracker before asking questions
dross [dross!~dross@unaffiliated/dross] has quit [#ruby-lang]
ZenoArrow [ZenoArrow!~chatzilla@host109-148-173-56.range109-148.btcentralplus.com] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
<ZenoArrow> Hi all, I'm trying to get my head around how I can see the structure of Ruby classes (using irb or pry perhaps?). I'm working my way through the notes at rubylearning.com and read the section about encoding. The Ruby docs indicate to me the only item above the string class in the Ruby hierarchy is object. What I'd like to know is how string instances inherit the .encoding method (from the...
<ZenoArrow> ...encoding object) to make commands like this possible: puts "λ".encoding # => UTF-8
<rue> How do you know the method is inherited?
<ZenoArrow> Is it built in?
<ZenoArrow> Built in to string I mean?
<ZenoArrow> Perhaps my confusion is best explained through this. Encoding is attributed to each Ruby source file. How is the string object linked to the source file, so that it knows where to look for the data about encoding?
<uniqanomaly> class String; def xxx;42 ;end;end
<uniqanomaly> "blah".xxx => 42
<ZenoArrow> ???
benanne [benanne!~rijdier@ip-213-49-84-133.dsl.scarlet.be] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
<ZenoArrow> I think I understand it a little more, it looks like it is a built in method for string:
<ZenoArrow> "encoding → encoding click to toggle source
<ZenoArrow> Returns the Encoding object that represents the encoding of obj."
<ZenoArrow> However, what I'd still like to know is how the information traversal works. Is the source file an instance of the root object?
<rue> No, source file is just code
<rue> (Technically you could think of it as executing a method body)
<rue> If you look at the String and IO docs, you see some encoding-related methods
<ZenoArrow> Okay, so when I instantiate an encoding object, which is associated with a source file, which object is it that points string to the encoding object to be referenced?
mahlon [mahlon!mahlon@martini.nu] has joined #ruby-lang
<ZenoArrow> In other words, I ask a string object to return me the encoding of that string. Where does it go to look for this information?
<rue> Where are you instantianting this encoding object?
<rue> You're inventing things ;)
<ZenoArrow> You alter the default encoding through use of a comment at the top of a source file, e.g. # coding: utf-8
<rue> Yep, that's a magic comment
<ZenoArrow> What I'm saying is, where does the string object look up the information it needs to successfully complete the string.encoding method.
<rue> Encoding.default_{internal,external} docs have some explanation for the sources
<rue> You can also explicitly set the encoding e.g. for an individual IO.new
<ZenoArrow> I couldn't find that document, but I did find another helpful page: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings
<ZenoArrow> "All Ruby source code now has some Encoding. When you create a String literal in your code, it is assigned the Encoding of your source. "
<ZenoArrow> In other words, it looks like the string object is assigned the encoding value when it is instantiated.
<ZenoArrow> Or at least that's how I'm reading it.
<ZenoArrow> rue, do you have a link to the documentation you were referring to?
<rue> corundum: docs?
jasiek [jasiek!~jps@sanepid.org] has joined #ruby-lang
<rue> Or, better yet, ri(1) in your shell
<rue> Or the ri command is pry if you're using that
<ZenoArrow> I am using pry.
<ZenoArrow> Sadly 'ri Encoding' isn't bringing up anything. In any case, I've got the answer I need now, so thanks for the help!
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
<rue> If you're also using rvm, it's possible you need to do docs generate
<ZenoArrow> It's a while since I installed it, probably could do with reinstalling, will get around to it after I've finished the work I'm doing.
<ZenoArrow> Thanks though. :-)
ZenoArrow [ZenoArrow!~chatzilla@host109-148-173-56.range109-148.btcentralplus.com] has quit [#ruby-lang]
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
<akahn> is there a way to use IO#read_nonblock but for each line like gets or readline behave?
<akahn> I'm assuming not
niklasb [niklasb!~codeslay0@p5B311333.dip0.t-ipconnect.de] has joined #ruby-lang
<rue> You can set the socket nonblocking?
<akahn> ah, I see, you read in x amount at a time until you hit a newline
nofxx [nofxx!~nofxx@177.106.91.211] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<apeiros_> akahn: that wouldn't make sense
<apeiros_> you can't read a specific amount non-blocking. you can only read up-to a specific amount nonblocking. meaning you can specify the max. but you might get less because not more is ready yet.
<apeiros_> so if you want lines, but you want it non-blocking, you'll have to buffer.
jammi [jammi!o@o.bombsquad.org] has joined #ruby-lang
<akahn> got it, thanks
slyphon__ [slyphon__!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<rue> Wow did I ever misunderstand that question
spyvsspy2 [spyvsspy2!~whistler@66.165.126.130] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<akahn> I'm really new to this stuff, so it's quite possible my question didn't make much sense
<akahn> How come line 8 of pipe.rb raises EAGAIN (write would block) after writing a bunch of data to the subprocess?
nofxx_ [nofxx_!~nofxx@187.23.26.139] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@pool-74-101-89-123.nycmny.east.verizon.net] has joined #ruby-lang
<rue> In short, the two are ignorable errors that can result from a few different things (such as a poll being interrupted) when you're working nonblocking
<rue> Google will provide a longer explanation
<rue> Or perhaps even the method doc might
<akahn> rue: I think I see how it works now. tell me if this is right, I need to rescue EAGAIN in the section of my code writing to the subprocess, because it's possible that the subprocess isn't ready to receive more input momentarily, but that's something that is not a problem to recover from
<rue> Yes, it'd block, so you get the error and can just try again later (or immediately, if you wish)
<akahn> i'm still wondering from earlier: if the buffer is full and no more can be written to that subprocess until it consumes some of its input, is there a way to discern that an discard the current contents of the buffer and begin streaming again?
elux [elux!~peter@bas17-toronto63-1128670639.dsl.bell.ca] has joined #ruby-lang
<rue> It's… nontrivial. You're wandering into networking library territory.
<akahn> hehe, ok
mytrile [mytrile!~mytrile@77.70.29.148] has joined #ruby-lang
tomzx_ [tomzx_!~tomzx@dsl-136-35.aei.ca] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@187.23.26.139] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0CDD1.dip0.t-ipconnect.de] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-141-190.lnse2.ken.bigpond.net.au] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.76.213.131] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
ryanf [ryanf!~revfitz@adsl-67-122-210-195.dsl.snfc21.pacbell.net] has joined #ruby-lang
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby-lang
kain [kain!~kain@151.64.210.200] has joined #ruby-lang
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
jmcphers [jmcphers!~jmcphers@61.14.141.35] has joined #ruby-lang
setmeaway2 [setmeaway2!~setmeaway@118.45.149.247] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
setmeaway [setmeaway!~setmeaway@118.45.149.247] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@89.214.251.87] has joined #ruby-lang