Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
Jake232 [Jake232!~textual@5e04d619.bb.sky.com] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.217.159] has joined #ruby-lang
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
tobiasvl [tobiasvl!~tvl@arrakis.uio.no] has joined #ruby-lang
flo200 [flo200!flo200@host-92-25-114-185.as13285.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has joined #ruby-lang
tobiasvl [tobiasvl!~tvl@arrakis.uio.no] has joined #ruby-lang
drdr [drdr!d059b08f@gateway/web/freenode/ip.208.89.176.143] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
naxx|mbp [naxx|mbp!~naxxatoe@chello080108013055.34.11.vie.surfer.at] has joined #ruby-lang
zcdny [zcdny!~zcdny@183.0.100.21] has joined #ruby-lang
<zcdny> How do i know the variable whether it is empty when the type is Fixnum
<zcdny> I can use the empty? empty to get the result when the variable type is Hash, Array, or String
<drdr> ?
<drdr> what are you trying to do
<zcdny> judge a var whether is empty value
<drdr> so
<drdr> if var == nil
<drdr> #some code
<drdr> end
<zcdny> but when the var = [],
<zcdny> that is not nil
<drdr> then do a or test
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<drdr> var == ( nill || [])
<drdr> that or var.nil?
<zcdny> if the var = 0
<drdr> but if your having to test for that it may be a issue of underlying flow issues
janissary [janissary!~user@adsl-98-70-95-30.mco.bellsouth.net] has joined #ruby-lang
t-mart [t-mart!~t-mart@c-76-108-173-224.hsd1.fl.comcast.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
mnaim [mnaim!~mnaim@c-71-62-62-48.hsd1.va.comcast.net] has quit [#ruby-lang]
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@189.221.138.151.cable.dyn.cableonline.com.mx] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
<mitchty> that or just [] == Array(var) should do about the same, nil will be a blank array and a blank array will be the same
<injekt> zcdny: nil isn't empty
<injekt> zcdny: what are you trying to check for?
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<mitchty> injekt: Array(nil) returns []
<injekt> mitchty: ... i never said it didn't
<mitchty> injekt: sorry, thought you were referring to what i typed, my bad
<injekt> mitchty: s'all good :)
<mitchty> injekt: I might just be a bit of an Array() freak, its nice
<injekt> mitchty: I like it too, just not sure it's for zcdny. He mentioned String and Fixnum, where Array returns an Array no matter which object you throw at it, which may not be what he wants if he's checking for emptyness
<mitchty> injekt: true enough, though i'd argue it sounds like a refactoring myself, sounds too busy
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
<injekt> mitchty: I think it sounds like the #blank? method active_support adds
<injekt> ie nil, "", [] are all "blank"
<mitchty> injekt: heh, wouldn't know, i don't do rails, just reg ruby
ascarter [ascarter!~ascarter@71-37-51-204.tukw.qwest.net] has joined #ruby-lang
<mitchty> so would [''] be "blank" as well?
<injekt> no
<injekt> the outer object isn't empty
<mitchty> could just do a lame (var == '') & (Array(var) == []) to mimic it, sorta, but dunno what the reqs are
<injekt> i would do something like; !obj || (obj.respond_to?(:empty) && obj.empty?)
<injekt> would work for nil, "", [], {}
<robgleeson> meh
<injekt> dont you start
<robgleeson> lol
<injekt> shouldn't you be asleep like me?
<robgleeson> yep
<robgleeson> on my way :p
<injekt> hah
<injekt> how was your christmas?
<robgleeson> boring tbh
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby-lang
looopy [looopy!~looopy@pool-151-200-235-184.washdc.btas.verizon.net] has joined #ruby-lang
<injekt> eat lots of junk i hope
<robgleeson> turkey ya ;)
<injekt> :)
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@home.benshome.net] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
timbleck [timbleck!u3835@gateway/web/irccloud.com/x-oybyssbzzfscjtrc] has joined #ruby-lang
denysonique__ [denysonique__!u484@gateway/web/irccloud.com/x-utnvqmvqkkasdakr] has joined #ruby-lang
locks [locks!u130@gateway/web/irccloud.com/x-twycghtwllwgaeam] has joined #ruby-lang
naxx|mbp [naxx|mbp!~naxxatoe@chello080108013055.34.11.vie.surfer.at] has quit [#ruby-lang]
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-zslxhxfkkvmwqrzw] has joined #ruby-lang
kitallis-cloud [kitallis-cloud!u358@gateway/web/irccloud.com/x-hdhjeigbvopmdsge] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-ubidlsgnofdrihvs] has joined #ruby-lang
slaytani1 [slaytani1!~slaytanic@host4.190-230-68.telecom.net.ar] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-eicppqdcmslizpwg] has joined #ruby-lang
bcardarella [bcardarella!u1539@gateway/web/irccloud.com/x-nosglxvshmnwsalt] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.91.153] has joined #ruby-lang
<bcardarella> Can anybody tell me why URI.extract is leaving a trailing single quote with the following code?
<bcardarella> It seems to be matching at the start of http and ending at the close of the element, capturing the containing single quote
ascarter [ascarter!~ascarter@71-37-51-204.tukw.qwest.net] has joined #ruby-lang
<bcardarella> But of the src is contained in double quotes it works just fine
<bcardarella> The problem is that haml will output element attribute values in single quotes
<robgleeson> bcardarella: URI.extract isn't a HTML parser.
<robgleeson> you should use nokogiri or something for that.
<bcardarella> I agree, stupid email_spec is using it https://github.com/bmabey/email-spec/blob/master/lib/email_spec/helpers.rb#L72
<bcardarella> I was just trying to better understand URI.extract but what you say makes sense. I guess the author didn't want to add nokogiri as a dep?
<robgleeson> not sure, probably yeah
<bcardarella> robgleeson: ok, thank-you
<robgleeson> probably something that'd be very easy to look over, and sure np
tylergillies [tylergillies!u3033@gateway/web/irccloud.com/x-wloppbecjdpbaujj] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-flwbkdxfwqbetdhp] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-xgswdxtoweovypse] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-tmwbzogfhcpxmnsb] has joined #ruby-lang
br1an [br1an!u440@gateway/web/irccloud.com/x-zfghrtliccyeuaqn] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
Ly531291c [Ly531291c!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
<Ly531291c> hi, is there a variable for displaying A method
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
pvh [pvh!u717@gateway/web/irccloud.com/x-dnsafbpxhxgcjiat] has joined #ruby-lang
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
<arooni-mobile> anyone ever see this error? SocketError: getaddrinfo: Temporary failure in name resolution ... when i'm trying to parse a rss feed using SimpleRSS
slaytanic [slaytanic!~slaytanic@host4.190-230-68.telecom.net.ar] has joined #ruby-lang
<robgleeson> arooni-mobile: It means the hostname you've given couldn't be resolved to an IP.
<arooni-mobile> why would that happen?
<arooni-mobile> i have just set up the server.. ubuntu 11.10 server
<arooni-mobile> it happens with any url i try to resolve
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
<robgleeson> you probably aren't connected to the internet then
<arooni-mobile> a ha
phlipper [phlipper!~phlipper@24.32.25.30] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
MDMA [MDMA!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
bryanl [bryanl!u1690@gateway/web/irccloud.com/x-draxxhagrnexqdhh] has joined #ruby-lang
mitchty_ [mitchty_!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.21] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
akahn [akahn!u2243@gateway/web/irccloud.com/x-ogambnwxoubbvjie] has joined #ruby-lang
WillMars_ [WillMars_!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
tallship [tallship!~tallship@pool-71-189-131-153.lsanca.fios.verizon.net] has joined #ruby-lang
Randroid [Randroid!~gregory@c-68-56-73-94.hsd1.fl.comcast.net] has joined #ruby-lang
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
Swimming_Bird [Swimming_Bird!~textual@pool-71-125-228-243.nycmny.east.verizon.net] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
ascarter [ascarter!~ascarter@67-42-88-2.tukw.qwest.net] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
<andrewhl> I've got a User table. Each user has a certain number of points. I've got: @alpha = User.where(:division => "Alpha). i'm trying to do a sort on that to get the top four users by points. So I tried this: position = @alpha.sort { |x, y| x.points <=> y.points }, but it gives me an error "ArgumentError: comparison of User with User failed"
<andrewhl> what am I doing wrong?
phaedrix [phaedrix!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
<andrewhl> err, should be @alpha = User.where(:division => "Alpha")
<andrewhl> I was then intending to do something like position[0..3]
<andrewhl> sorry, maybe this should be asked in rails. Let me repost it
<erikh> yeah #ror is probably a better place for this
uniqanomaly_ [uniqanomaly_!~ua@dynamic-87-105-21-246.ssp.dialog.net.pl] has joined #ruby-lang
nofxx1 [nofxx1!~nofxx@186-210-022-046.xd-dynamic.ctbcnetsuper.com.br] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
zenspider [zenspider!~user@envy.zenspider.com] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.39.21] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@189.221.138.151.cable.dyn.cableonline.com.mx] has joined #ruby-lang
<zenspider> rawr
ryanf [ryanf!~revfitz@adsl-67-117-145-203.dsl.snfc21.pacbell.net] has joined #ruby-lang
csherin_ [csherin_!~csherin@115.111.177.122] has joined #ruby-lang
<erikh> ohai
ksinkar [ksinkar!~ksinkar@117.195.108.198] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
<ksinkar> this is what I am trying to achieve http://pastebin.com/H1ucpemT
<ksinkar> how do i append to file object in ruby?
CoverSlide [CoverSlide!~richard@pool-108-38-148-191.lsanca.fios.verizon.net] has joined #ruby-lang
<operant108> ksinkar: read more closely through the documentation for File.open, the mode you are using is "r", other modes include "w" , "w+", "a", "a+" ... learn about these modes and you will have what you need to do what you are trying to do
<ksinkar> operant108: thanx
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby-lang
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has quit [#ruby-lang]
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby-lang
<senthil> anyone using pry: say i start pry with pry -r ./file.rb, how do I reload that file? 'load ./file.rb' doesn't seem to work
<ryanf> load with quotes will work
<ryanf> load is part of ruby, not pry, so you need the path to be a string
<senthil> ryanf: load "./file.rb" doesn't seem to work
<ryanf> what does it do?
<senthil> LoadError: cannot load such file -- ./file.rb
<senthil> pretty sure the file does exist in that location
<senthil> grr
<senthil> nvm, typed the file name wrongly
<senthil> ignore me, i'm an idiot
<ryanf> no problem
<dr0id> hi idiot
<senthil> haha, hi there dr0id
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
shevy [shevy!~shevy@178-190-71-101.adsl.highway.telekom.at] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.41] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
beawesomeinstead [beawesomeinstead!u1643@gateway/web/irccloud.com/x-uwpmlxqkkwjgqnay] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@189.221.138.151.cable.dyn.cableonline.com.mx] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
mytrile [mytrile!~mytrile@94.26.28.135] has joined #ruby-lang
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
<erikh> off topic but does anyone use vim tags here?
<erikh> nvm
<operant108> So problematic! Having trouble with mysql gem on osx , mysql is installed via official dmg .. installed to /usr/local/mysql.... get all sorts of errors from "bundle" saying "checking for mysql_query() in -lmysqlclient... cannot figure out how to explicitly tell bundler to use custom options to gem install, all solutions i've found involve explicit calls to gem install... need a way to tell bundler where to find mysql libs in the
<erikh> mysql --version
<erikh> or mysql5 --version if you're on ports
<erikh> is it 5.5 or better?
<erikh> if so, you need to use the mysql2 gem
<operant108> /usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.5.17, for osx10.6 (i386) using readline 5.1
JohnBat26 [JohnBat26!~Eugene@89.175.77.90] has joined #ruby-lang
<erikh> yep; you need to downgrade mysql to 5.1 or use the mysql2 gem
<erikh> the mysql gem is incompatible with 5.5+
<operant108> nice... thanks
<erikh> if you're interested in the details, the underlying C library and API changed
s33k [s33k!~s33k@223.236.203.132] has joined #ruby-lang
<operant108> the way i understand it ..mysql2 has a few other advantages over the older gem
<erikh> yes; it has asynchronous support and a much cleaner codebase
<operant108> was it .. better threading support and connection pooling?
<operant108> ahh..
<erikh> it might have its own pooling support, unsure about threading improvements
<erikh> generally people use a higher level implementation like Sequel or AR to provide those features
dhruvasagar [dhruvasagar!~dhruvasag@65.98.79.137] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-17-181.a149.priv.bahnhof.se] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.231.180] has joined #ruby-lang
denysonique__ [denysonique__!u484@gateway/web/irccloud.com/x-bhfqnjmlewimthfk] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-pyhzzspgbaxakeuw] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-gwhscehzsythinab] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-akordypboaqdxekk] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-yvnplkhewritsjug] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
bryanl [bryanl!u1690@gateway/web/irccloud.com/x-uiylgppqujwzslan] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.167.91.153] has joined #ruby-lang
<operant108> Given i create a new thread with Thread.new, how can i force the thread to join if there is an exception within the thread? Code is currently like t=Thread.new { Timeout::timeout(5) { sleep 10 } } ; when i call t.join i get the exception ... but i can't just arbitrarily call t.join after 5 seconds .. i need to only execute the post thread handling code if the command passed to timeout succeeds or fails
<rippa> join the thread right away
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-ruwbnbogrspwunzr] has joined #ruby-lang
<operant108> but if whatever is in the new thread blocks , then it essentially causes the thread to be useless.. the intention of using a thread in my case was to make any blocking process in the new thread not block the parent process.. calling thread.join will wait for the thread to complete.. effectively making it synchronous
br1an [br1an!u440@gateway/web/irccloud.com/x-avwlpxohvdinuchk] has joined #ruby-lang
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
<operant108> When i set Thread.abort_on_exception=true; e = Thread.new { raise "foo" } rescue $! .. ..what happens is a system exit
Aengus [Aengus!~Aengus@cloudysunday.com] has joined #ruby-lang
Randroid [Randroid!~gregory@c-68-56-73-94.hsd1.fl.comcast.net] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
sandelius [sandelius!~textual@90-231-202-62-no214.tbcn.telia.com] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
jkprg [jkprg!~jarda@166.241.broadband11.iol.cz] has joined #ruby-lang
tbuehlmann [tbuehlmann!Tobias@unaffiliated/tovias] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.90] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has joined #ruby-lang
operant108 [operant108!~tdevol@c-69-181-26-39.hsd1.ca.comcast.net] has quit [#ruby-lang]
The_prospector [The_prospector!howdoyoubu@unaffiliated/cornman] has joined #ruby-lang
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
ltd [ltd!~z@zx.io] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-zalyojtyvbufxylf] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
NinoScript [NinoScript!~anonymous@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0C5B3.dip0.t-ipconnect.de] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
TheMoonMaster [TheMoonMaster!~TMM@reddit/operator/themoonmaster] has joined #ruby-lang
benanne [benanne!~rijdier@218.188-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
fatnic388 [fatnic388!~dave@027c5fd6.bb.sky.com] has joined #ruby-lang
fatnic388 [fatnic388!~dave@027c5fd6.bb.sky.com] has quit [#ruby-lang]
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has joined #ruby-lang
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
esad [esad!~esad@chello080108108211.10.11.vie.surfer.at] has joined #ruby-lang
Kwanasolis [Kwanasolis!~ebrodeur@199.27.168.41] has joined #ruby-lang
nekkid [nekkid!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
Marco_ [Marco_!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
Marco_ [Marco_!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
<Guest20627> is there a generic way to display a method
Kwanasolis [Kwanasolis!~ebrodeur@ujami.net] has joined #ruby-lang
<Mon_Ouie> "display a method"? What exactly do you want to see?
<Guest20627> i have 3 methods, each are just puts statements, i have a if elsif and else loop. with a break if != one of them, for that one, loops until != it, but I want it to display the SELECTED METHOD after the break
<Guest20627> by typing a string as input to the prompt, it will run the method. is there any way to display that method after inputting the prompt a 2nd time
JosephRuby [JosephRuby!~joseph@46.33.40.203] has joined #ruby-lang
ezkl [ezkl!~ezkl@dynamic-acs-24-144-206-131.zoominternet.net] has joined #ruby-lang
kain [kain!~kain@151.64.211.61] has joined #ruby-lang
Guest20627 [Guest20627!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has quit [#ruby-lang]
hhatch [hhatch!~hhatch@h137-129.pool212-16.dyn.tolna.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<manveru> uhm
<manveru> well, i'm late again :(
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
beiter [beiter!~beiter@manz-5f74850c.pool.mediaWays.net] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
SubSpawn [SubSpawn!~spawn@sin.khk.be] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
fatnic388 [fatnic388!~fatnic388@027c5fd6.bb.sky.com] has joined #ruby-lang
beiter [beiter!~beiter@manz-5f74850c.pool.mediaWays.net] has joined #ruby-lang
fatnic388 [fatnic388!~fatnic388@027c5fd6.bb.sky.com] has quit [#ruby-lang]
fatnic388 [fatnic388!~fatnic388@027c5fd6.bb.sky.com] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
<dreinull> it's scary how my past catches up with me. Places I live in '96 get published with my name on it. I think I don't like public records.
fatnic388 [fatnic388!~fatnic388@027c5fd6.bb.sky.com] has quit [#ruby-lang]
luislavena [luislavena!b5013a76@gateway/web/freenode/ip.181.1.58.118] has joined #ruby-lang
luislavena [luislavena!b5013a76@gateway/web/freenode/ip.181.1.58.118] has quit [#ruby-lang]
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
limbiciusz [limbiciusz!4d4fc63d@gateway/web/freenode/ip.77.79.198.61] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has joined #ruby-lang
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby-lang
t-mart [t-mart!~t-mart@c-76-108-173-224.hsd1.fl.comcast.net] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has quit [#ruby-lang]
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
enebo [enebo!~enebo@75-168-44-241.mpls.qwest.net] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
rayners [rayners!~rayners@c-68-50-153-53.hsd1.md.comcast.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
rippa [rippa!~rippa@109-161-123-128.pppoe.yaroslavl.ru] has joined #ruby-lang
bradland [bradland!~bradland@c-69-247-235-233.hsd1.fl.comcast.net] has joined #ruby-lang
RubyHead [RubyHead!~rubyhead@pool-98-109-5-109.nwrknj.fios.verizon.net] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
inetman [inetman!~inetman@DevBook-Pro.visitor.congress.ccc.de] has joined #ruby-lang
inetman [inetman!~inetman@DevBook-Pro.visitor.congress.ccc.de] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
inetman [inetman!~inetman@DevBook-Pro.visitor.congress.ccc.de] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.240.91.98] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
Manhose [Manhose!~Manhose@2001:690:2200:9a77:ccb3:4206:62f8:f3a8] has joined #ruby-lang
Swimming_Bird [Swimming_Bird!~textual@pool-71-125-228-243.nycmny.east.verizon.net] has joined #ruby-lang
bglusman_ [bglusman_!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<shevy> yeah dreinull
<shevy> especially when you did beat that poor puppy dreinull :(
Defusal_ [Defusal_!DeFi@dsl-240-221-79.telkomadsl.co.za] has joined #ruby-lang
Defusal_ [Defusal_!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<Asher> but that was at the old address!
kain [kain!~kain@151.64.211.61] has joined #ruby-lang
sinclair [sinclair!~sinclair@c-46-162-96-14.cust.bredband2.com] has joined #ruby-lang
<sinclair> hi everyone
ascarter [ascarter!~ascarter@216.243.14.200] has joined #ruby-lang
<any-key> hello
<sinclair> anyone know a quick way to convert an integer 0..6 to the corresponding weekday?
<any-key> hold on a sec, I think I can make that happen
<jensn> sinclair: Use a hash.
<jensn> { 0 => 'monday'… }
<sinclair> jensn: that would be a solution but i think it's probably unnecessary, ruby probably has a smarter way of doing that
<any-key> for something that has 7 items that's the smartest way
<any-key> you can use Date but it's going to make it a tad bit more complicated
<jensn> Working with calendars is much more complicated than what you probably want.
<sinclair> ok
<any-key> they look simple but they're really really hard to do correctly
<any-key> Date::wday can get you the day of the week (as an int) from the current date
<any-key> but that's not really what you want
<rippa> sinclair: Date::DAYNAMES
<rippa> it's an array Sunday - Saturday
<sinclair> great
<sinclair> thanks alot
<sinclair> i knew it
<sinclair> haha
<jensn> rippa: What is required for that? I don't have it on 1.9.3...
<rippa> maybe require 'Date'
<jensn> Doh, I just looked in the docs.
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
lonny [lonny!~lonny@122.177.241.45] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
tychobrailleur [tychobrailleur!~sebastien@2a01:e35:8b65:cf0:224:d6ff:fe55:3680] has joined #ruby-lang
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby-lang
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby-lang
looopy [looopy!~looopy@static-71-166-232-251.washdc.east.verizon.net] has joined #ruby-lang
sora_h [sora_h!~sora_h@mayfield.privs.net] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@193.136.33.133] has joined #ruby-lang
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
Guest1929 [Guest1929!~yopp@me.withmac.ru] has joined #ruby-lang
looopy_ [looopy_!~looopy@static-71-166-232-251.washdc.east.verizon.net] has joined #ruby-lang
bradland_ [bradland_!~bradland@c-69-247-235-233.hsd1.fl.comcast.net] has joined #ruby-lang
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby-lang
ascarter [ascarter!~ascarter@216.243.14.200] has joined #ruby-lang
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has quit [#ruby-lang]
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
CCD [CCD!~ccd@pool-74-103-35-18.bltmmd.fios.verizon.net] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.242.67.153] has joined #ruby-lang
Jake232 [Jake232!~textual@5e0eb492.bb.sky.com] has joined #ruby-lang
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby-lang
dr_bob [dr_bob!~dr_bob@p5DC4F3B8.dip.t-dialin.net] has joined #ruby-lang
darknesslord_ [darknesslord_!~darknessl@189.182.185.159] has joined #ruby-lang
alexkane [alexkane!~alexkane@38.117.157.141] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
thone [thone!~thone@e179081178.adsl.alicedsl.de] has joined #ruby-lang
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
kain [kain!~kain@151.64.211.61] has joined #ruby-lang
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
butchanton [butchanton!~butchanto@vpn-sanfran.exacttarget.com] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@85.248.11.120] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
dfr|mac [dfr|mac!dfr|work@nat/google/x-btyxjivuiodndufp] has joined #ruby-lang
matthewC [matthewC!~mattcampb@c-24-63-27-64.hsd1.ma.comcast.net] has joined #ruby-lang
rubi [rubi!~hari@117.192.246.43] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
me345 [me345!~me345@adsl-75-15-176-192.dsl.bkfd14.sbcglobal.net] has joined #ruby-lang
skinnymuch [skinnymuch!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby-lang
rindolf [rindolf!~shlomif@bzq-79-180-28-143.red.bezeqint.net] has joined #ruby-lang
<rindolf> Hi all.
Swimming_Bird [Swimming_Bird!~textual@64.70.114.89] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
<rue> Hi one.
skinnymuch_ [skinnymuch_!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby-lang
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has quit [#ruby-lang]
bcardarella [bcardarella!u1539@gateway/web/irccloud.com/x-nosglxvshmnwsalt] has quit [#ruby-lang]
saLOUt [saLOUt!~rriemann@dslb-094-222-213-198.pools.arcor-ip.net] has joined #ruby-lang
saLOUt_ [saLOUt_!~rriemann@dslb-094-222-213-198.pools.arcor-ip.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
nofxx1 [nofxx1!~nofxx@177.106.106.116] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby-lang
scampbell [scampbell!~scampbell@c-98-224-240-62.hsd1.mi.comcast.net] has joined #ruby-lang
fat [fat!~nobody@027c5fd6.bb.sky.com] has joined #ruby-lang
fat [fat!~nobody@027c5fd6.bb.sky.com] has quit [#ruby-lang]
fatnic388 [fatnic388!~fatnic388@027c5fd6.bb.sky.com] has joined #ruby-lang
banaan [banaan!~rijdier@132.29-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
flashuni [flashuni!~flashuni@adsl-70-136-253-158.dsl.scrm01.sbcglobal.net] has joined #ruby-lang
rolfb [rolfb!~rolfb@ti0168a340-0546.bb.online.no] has joined #ruby-lang
vesan_ [vesan_!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
batasrki [batasrki!~batasrki@CPE687f7416fe39-CM0011ae9288b4.cpe.net.cable.rogers.com] has joined #ruby-lang
<shevy> Hi minus one.
<rue> It's +2, I've kept count.
phlipper [phlipper!~phlipper@208.180.213.144] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has quit [#ruby-lang]
rippa [rippa!~rippa@109-161-123-128.pppoe.yaroslavl.ru] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
jkprg_ [jkprg_!~jarda@166.241.broadband11.iol.cz] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
Jake232 [Jake232!~textual@5e049fbe.bb.sky.com] has joined #ruby-lang
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<any-key> I've got a little time on my hands...what's everyone's favorite ruby trick?
<oddmunds> #method_missing?
<any-key> I'm a fan of using map with the little &: proc trick
<any-key> ooh I need to play with that some
<any-key> I have an ebook of that metaprogramming with ruby book...I should go through that
<rindolf> any-key: I like the iterable interface.
<rindolf> any-key: don't remember how it's called.
<rindolf> any-key: that allows to turn any class into iterable.
<batasrki> enumerable module
<rindolf> batasrki: ah, yes.
<any-key> enumerable is very useful...it's easy to forget that it has a method for almost everything
<batasrki> my favourite exercise currently is implementing enumerable methods as if they didn't exist
<any-key> that's a good idea...I did something similar when learning haskell
sepp2k [sepp2k!~sexy@p4FD165D7.dip.t-dialin.net] has joined #ruby-lang
<rue> any-key: Proc#===
<any-key> interesting
<any-key> rue: what's a good example for Proc#===
<any-key> ?
<rue> case expressions
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<any-key> rue: I'm not sure exactly what you're referring to
<any-key> the case statement?
<any-key> aka using a proc in a case?
<shevy> I LOVE YOU GUYS!!!
* shevy hugs everyone.
<rippa> any-key: yes
<rue> Expressions!
<any-key> from what I'm reading right now, using a "when" has an implied ===?
<shevy> I think so
<any-key> how exactly does that differ from ==?
<any-key> kind of a dumb question but I'm having a bit of trouble understanding the difference between the two
<shevy> not sure, some subtle difference which I have not yet grasped yet
<shevy> perhaps in <=> comparisons?
aarkerio [aarkerio!~aarkerio@201.141.1.212] has joined #ruby-lang
<shevy> rue answer man! please!
<rippa> === is pattern comparison
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
<rue> I like to think of it as the kinda-operator
<rippa> it's specifically exists for case statement
<rippa> *-'s
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<rue> any-key: Primarily, you'd implement #=== for case, but you can also use it as a loose match in other contexts
<rue> Like String === "foo"
<rippa> but that's a bit confusing
<rue> And #== is your typical equality op.
<rippa> because people are not used to that
<any-key> wouldn't .is_a be a better choice for that context?
<rippa> better explicitly use needed methods
<aarkerio> hi! I am a PHP developer trying to learn Ruby, in PHP I can access a var in a class using $this->MyVar
<rue> It's relatively common
<aarkerio> how can I acces in a Ruby class?
<rippa> @myvar
<any-key> aarkerio: YourClass.foo
<rippa> he means inside the class
<any-key> oops
<rue> Well, first, let's define classes, instances, instance variables
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby-lang
<rippa> aarkerio: this is called self in ruby
<any-key> @var refers to instance variables, and @@var refers to variables shared amongst all instances
<rippa> aarkerio: and it's usually implicit
<rippa> i mean
<rippa> 'this'
<aarkerio> mmm, cool !! thanks!
<any-key> the interpreter will look for local variables within the current scope and *then* check instance variables
<any-key> I've messed that up before
<rippa> you mean methods
<rippa> instance variables are distinguiseh by sigil
<shevy> hmm any-key do you understand === now?
<rippa> @
<any-key> shevy: I believe so
<shevy> ewww ... I just realized ... I really hate $this nowadays
<any-key> avoid $ whenever possible...
<any-key> unless it's some kind of one-off script and you're feeling lazy
<any-key> ;)
<shevy> that PHP way... that's about the same as python's way to force explicit self or?
Codif [Codif!~codif@84.120.204.160.dyn.user.ono.com] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@85.237.224.39] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
tavon [tavon!~tavon@c-98-209-27-241.hsd1.mi.comcast.net] has joined #ruby-lang
elux_ [elux_!~peter@96.45.198.150] has joined #ruby-lang
Kichael [Kichael!~Kichael@70-36-49-167.dyn.novuscom.net] has joined #ruby-lang
<elux> hey guys
<elux> does anyone here use mongoid? .. i am trying to find someone who's experimented with using mongoid with em-mongo + fibers
<apeiros_> does EM play nice with fibers at all?
<elux> yes
<elux> of course
<elux> have you seen goliath?
<elux> ive used it in production with various apis .. and its very solid
<elux> its all about EM+fibers
setmeaway [setmeaway!~setmeaway@119.201.52.190] has joined #ruby-lang
<rue> Mongoid (pronounced mann-goyd)
<rue> õ_o
<batasrki> huh, I pronounce it mon-goy-eid
<rippa> I pronounce it монгоид
<robgleeson> pwned
<apeiros_> elux: thanks, you provoked me to read a good bit
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
<elux> apeiros_: awesome!
<apeiros_> elux: do you happen to know how thin vs. goliath's performance is?
<elux> its a really great codebase
psr [psr!~psr@D97AAF67.cm-3-3c.dynamic.ziggo.nl] has joined #ruby-lang
k2r [k2r!~k2r@dslb-188-100-163-226.pools.arcor-ip.net] has joined #ruby-lang
<rue> /mɑːŋoɪd/
<elux> well.. thin and goliath aren't really the same thing. thin is just a app server and goliath is an app server with a very lightweight framework for building async apps with fibers
<elux> you cant use goliath to run just any rack app for example (like rails)
<apeiros_> I see, because any IO would/should have to use async
<elux> but goliath's http server code is largely based on thin... so the performance should be similar
<elux> yea exactly
<rue> Hm, no, /mʌːŋoɪd/
<elux> and then there are issues with compatability with rack middleware. but those guys have come up with some elegant solutions to support the majority of middleware
<apeiros_> mhm
<rue> I'm not sure about elegant, but workable certainly
<elux> well as elegant as it can get for what they're working with
<elux> many have tried and failed to make it even usable
<apeiros_> well, I'm having a toy project again, where it might be interesting in pitting a thin-backend against a goliath-backend, so I can compare both, programming style and end performance (though it'd not be totally fair since I'm rather inexperienced with async)
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
<elux> have a look at this
<elux> its a hello world server written with a bunch of different backends
<elux> when i was experimenting similar to what you're describing
psr [psr!~psr@D97AAF67.cm-3-3c.dynamic.ziggo.nl] has joined #ruby-lang
<rue> Hm, that's pretty cool
<elux> btw the "zync" in there is my own async framework i wrote a while back... its based on a minimalistic example from thin .. it will show you the raw power of thin
<elux> it is the fastest ruby async server in those experiments
<elux> but .. goliath has a lot more power.. etc. etc. and fibers add some overhead.. but worth it
<apeiros_> the unfibered one?
<elux> yea the unfibered one is the fastest
<elux> its not far from the node.js example
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
<elux> here are some results .. http://imgur.com/WuJZR
<elux> its from a slide in a talk i did a few months back
<elux> a lot of people will tell you tho that these benchmarks dont mean anything for real-world applications.. which is true
<elux> but. i liked to know for the most minimalist example, what am i looking at
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<apeiros_> hm, sad you didn't have a thin-pure in there
<elux> this one of thin-pure
<elux> its crazy minimalistic tho .. and not even a good example
<rue> elux: Is there a Fibur version?
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<elux> rue: of what?
<rue> Oh, those're from June, Fibur is a newer development
<elux> ohh i never heard of fibur
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby-lang
<elux> interesting
<rue> :P
<tbuehlmann> :>
<elux> ive been thinking up something exactly like this
<elux> a better way of handling concurrency with fibers in ruby
<apeiros_> elux: I meant in the benchmark
<robgleeson> elux: look at the source
<elux> some convience classes
<elux> lol
<elux> okay
<elux> so its a joke
<apeiros_> I've written a couple of thin backends, so writing one isn't the problem ;_)
<elux> or...
<batasrki> wtf is a fibur, btw?
<elux> hrmm
<elux> its a joke..
srbartlett [srbartlett!~srbartlet@202.161.19.210] has joined #ruby-lang
<burgestrand> batasrki: a thread
<raggi_> elux: aren't most of these starting in development mode, and have stuff like lint in the stack?
<elux> raggi_: naw.. all ran in production
<elux> you're saying those req/sec #'s?
<raggi_> i don't see any numbers in that repo
<elux> i didnt post any numbers
<elux> in the repo
<elux> the experiment doesnt prove much.. it was more for my curiosity
<raggi_> eugh
<raggi_> i recently moved away from macports
<elux> good choice.. are you using homebrew now?
<raggi_> the ab(1) that comes wiht osx is more fucked than ab is normally
<raggi_> yes
<raggi_> tbh, i miss quite a few things in macports
<elux> yes.. ab is fucked on lion ...
<raggi_> brew is better than it was
<elux> from brew that is
<raggi_> nc -l 9292 & ab -c 1 -n 1 http://127.0.0.1:9292/
<raggi_> # => tons of requests
<raggi_> fuck ab
<raggi_> it's total lies
<elux> actually the "ab" hat comes with lion is fucked... and i think i had issues compiling it with homebrew or something
<raggi_> i've documented other issues it has before
<raggi_> i'm about done wiht ab
<raggi_> tbh
<raggi_> what this indicates, if this is normal behavior
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
<raggi_> is that ab performance for servers is *drastically* affected by their buffering methodology, and whether or not they freeze the receive buffer at the kernel (thus TCP) level
<elux> yes for sure.. tcp level has a lot to do with it
<elux> tcp level from both the client and server even ...
<elux> but .. running it in a semi-controlled environment.. you can get some ideas..
<elux> as in benchmarking some new code, you can see flucutations in the responsiveness
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<rue> What was that common ab alternate?
<elux> httperf or something?
queequeg1_ [queequeg1_!~queequeg@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<rue> Mm, maby less common
batasrki_ [batasrki_!~batasrki@CPE687f7416fe39-CM0011ae9288b4.cpe.net.cable.rogers.com] has joined #ruby-lang
<batasrki_> rue: common db?
Manhose [Manhose!~Manhose@bl17-45-13.dsl.telepac.pt] has joined #ruby-lang
<rue> Something from Google? Anyway, dun matter
Manhose_ [Manhose_!~Manhose@bl17-45-13.dsl.telepac.pt] has joined #ruby-lang
<raggi_> they're all shit, IME
<batasrki_> raggi_: which ones?
<rue> raggi_: Prime for disruption, as it were?
dfr|mac [dfr|mac!dfr|work@nat/google/x-cjrimrbsiabpmuhs] has joined #ruby-lang
<raggi_> yeah
<raggi_> you could write a better http perforamnce testing tool in pure ruby on 1.9
<raggi_> you don't even need EM or anythign like that
<raggi_> just slam some crappy http data over the wire at a server, waiting for a response, and collect result timings
<raggi_> i don't really understand how everyone screws it up tbh
skinnymuch_ [skinnymuch_!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby-lang
<raggi_> this version of ab is fundamentally not talking http 1.0
<raggi_> httperf is totally crazy tbh, and it's hard to do rate benching
<raggi_> and tsung not only carries one hell of a dep tree, but it's also another major pain the ass to configure
saLOUt_ [saLOUt_!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
benanne [benanne!~rijdier@ip-83-134-143-105.dsl.scarlet.be] has joined #ruby-lang
<raggi_> manveru: if you're around, and you haven't been following lately, would you mind running your suite against rack master?
<raggi_> manveru: i want to put out 1.4 early tomorrow
uniqanomaly_ [uniqanomaly_!~ua@dynamic-78-8-81-161.ssp.dialog.net.pl] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<raggi_> bbiab, break time
s0ber_ [s0ber_!~s0ber@114-36-228-191.dynamic.hinet.net] has joined #ruby-lang
y3llow_ [y3llow_!~y3llow@114-36-228-191.dynamic.hinet.net] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<elux> you guys wanna see something pretty slick?
<elux> this is a web_proxy i wrote with em-http + goliath
<elux> think of it like an anontimizer
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby-lang
<elux> i should post the entire project somewhere actually its cool. .. there is another piece thats necessary which tries to route 404's
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
spuk [spuk!~spuk@186.222.1.205] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@216.200.217.234] has joined #ruby-lang
butchanton [butchanton!~butchanto@vpn-sanfran.exacttarget.com] has joined #ruby-lang
<rue> Hm, if only there was some way of sharing your code on the internet…
<rue> Also, zZzZz
<batasrki> hmmmm, and maybe have it versioned
<rue> That could be really useful
<batasrki> yeah, and if you could make your own versioned, let's call it a, repository of someone else's code that you could modify and run
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<lianj> huge file, "# We good?" dunno
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<batasrki> lianj: that's a start
<zenspider> rawr
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
JosephRuby [JosephRuby!~joseph@46.33.40.203] has joined #ruby-lang
matthewC [matthewC!~mattcampb@c-24-63-27-64.hsd1.ma.comcast.net] has quit [#ruby-lang]
jkprg [jkprg!~jarda@166.241.broadband11.iol.cz] has joined #ruby-lang
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@pool-96-242-254-132.nwrknj.east.verizon.net] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has quit [#ruby-lang]
thrcka [thrcka!~thrcka@adsl-dyn175.91-127-200.t-com.sk] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310A71.dip0.t-ipconnect.de] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-207-15.dsl.telepac.pt] has joined #ruby-lang
Ki4n [Ki4n!~Ki4n@91-115-77-100.adsl.highway.telekom.at] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
Pip [Pip!~Pip@host-192-146-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby-lang
batasrki [batasrki!~batasrki@CPE687f7416fe39-CM0011ae9288b4.cpe.net.cable.rogers.com] has joined #ruby-lang
aarkerio [aarkerio!~aarkerio@201.141.1.212] has quit ["Leaving"]
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
butchanton [butchanton!~butchanto@vpn-sanfran.exacttarget.com] has joined #ruby-lang
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@adsl-65-3-161-18.mia.bellsouth.net] has joined #ruby-lang
RomD`` [RomD``!~Roman@nrbg-4dbe082a.pool.mediaWays.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-107-54-247.lsanca.dsl-w.verizon.net] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.242.67.153] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
The_prospector [The_prospector!howdoyoubu@unaffiliated/cornman] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
Jake232 [Jake232!~textual@5e049fbe.bb.sky.com] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
perryh_ [perryh_!~perryh@76-230-52-253.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
perryh_ [perryh_!~perryh@unaffiliated/perry753] has joined #ruby-lang
thrcka [thrcka!~thrcka@adsl-dyn175.91-127-200.t-com.sk] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@216.200.217.234] has joined #ruby-lang
janissary [janissary!~user@adsl-98-70-95-30.mco.bellsouth.net] has joined #ruby-lang