Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<anekant> how can i do a try-rescue on one line
<apeiros_> begin-rescue?
<apeiros_> begin dostuff rescue rescuestuff end
<anekant> do i need semi-colons
<apeiros_> there's also dostuff rescue alternate-returnvalue, but that one I'd discourage
<apeiros_> no, you don't need semicolons, unless it becomes for ambiguous for some reason.
<anekant> irb(main):011:0> begin; Dir.chdir("foo"); rescue; end => nil
<drbrain> you need semicolons if you want to rescue a particular exception
<drbrain> begin; foo; rescue ArgumentError; handle_it; end
<drbrain> foo rescue handle_it can be one line
<apeiros_> drbrain: actually, no: `begin puts "hi" rescue ArgumentError puts "wah?" end` is valid
Marco___ [Marco___!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
twittard [twittard!~twittard@vpn.lax.truecarcorp.com] has joined #ruby-lang
<apeiros_> oh
<apeiros_> gets interpreted differently. you're right :)
<drbrain> apeiros_: begin 1 + nil rescue ArgumentError puts "wah?" end # => NoMethodError
<apeiros_> yeah, I noticed. it's not considered part of the rescue but part of the rescue-body
<drbrain> yeah
<apeiros_> anyway, I'm not a fan of "everything must be on a single line!!!"
<drbrain> me neither
<apeiros_> stupid notion to begin with IMO.
<mksm> apeiros_, we must save on digital paper!
<apeiros_> mksm: beware, for if you use too many lines, the lord of the lines will be summoned!
<drbrain> apeiros_: didn't ruby 1.6 have a line limit of some kind?
davemiles [davemiles!~davemiles@gatej.thls.bbc.co.uk] has joined #ruby-lang
<drbrain> the line counter was only 16 bits per file?
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
<apeiros_> drbrain: 1.6 was before my time, I started ruby with 1.8.0 or 1.8.1
<drbrain> ah
<petercooper> back when symbols were the new cool thang
<anekant> I like having the choice to do things that others are not fans of :)
<sodani> hello, i'm trying to find all changes i made to a particular file over a particular time interval. does someone know how i can do this with git?
<drbrain> petercooper: no, when symbols got names :D
<drbrain> (or was that 1.4?)
<petercooper> You'd need to educate me on the difference because my knowledge ends there ;-)
<apeiros_> drbrain: but I remember quite well when hypertalk complained because I used >255 local variables :D
<drbrain> I think 1.6.5 or 1.6.6 was out when I started, but I've done some archaeology
<apeiros_> (yeees, I was very young and didn't think splitting up code into functions was a good idea…)
<apeiros_> sodani: #git ?
<sodani> okay, just thought people in here might know
<anekant> there are times when you just don't want to deal with the error and a one-line rescue makes sense to me
<drbrain> maybe if you wait long enough
<drbrain> anekant: I try to get rid of the error in the first place, when possible
<anekant> yeah but like a one-off proof-of-concept
<apeiros_> anekant: just that you don't just not deal with "the" error, but with no error at all, which in itself is a new error
<apeiros_> so: welcome to your newly introduced potential (and silent) bug.
<anekant> but i might not care
<apeiros_> *shrug* and I don't care if you write bad code
<anekant> good so just don't take it away from the language :)
<shevy> little kids are playing again!
wmoxam [wmoxam!~wmoxam@69-196-129-140.dsl.teksavvy.com] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
<anekant> all work and no play makes Jack a dull boy!
<shevy> I swear
<shevy> he was crazy before even reaching that hotel place
<anekant> dang i been doing too much python typing exit() to get out or irb
<shevy> I just type "q"
<shevy> and "q" again to start irb
<shevy> I tried to find out how to alias methods in python for a long time
<anekant> haha those parens on exit are a pain
<shevy> hmm
<shevy> yeah
<anekant> and it tells you "to exit type exit()" if they know i want to exit just let me exit darnit
<shevy> yeah
<shevy> perhaps it is more something psychological
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<shevy> like... "When using python you must think in python all the time."
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<anekant> i want a language that's all things to all users
<shevy> hmmm
<shevy> explain again
<shevy> ruby is already quite a melting pot of different features
<shevy> there are certain coding habits in ruby which I can't stand. The use of hundreds of lambdas just confuses me
<anekant> 1 Corinthians 9:22 To the weak I became weak, to win the weak. I have become all things to all men so that by all possible means I might save some.
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
bougyman [bougyman!bougyman@bougyman.com] has joined #ruby-lang
bougyman [bougyman!bougyman@pdpc/supporter/gold/bougyman] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
slackstation [slackstation!~eman@174-127-33-234.static-ip.telepacific.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@64.134.241.97] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<shevy> cool story bro
QaDeS [QaDeS!~mklaus@frbg-5d84f61c.pool.mediaWays.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
r0bby_ [r0bby_!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Pip [Pip!~Pip@host-85-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
Wardrop [Wardrop!~tomwardro@86.46.96.58.static.exetel.com.au] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<andrewvos> shevy: HAHAAH
<andrewvos> I love that I get here and there's a "cool story bro" waiting for me.
<andrewvos> Is klabnik still here??? I want to argue his REST article :(
Spooner [Spooner!~Miranda@host-92-23-158-179.as13285.net] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
<andrewvos> So, I meet the sleep talking man and his wife tonight
ppl2 [ppl2!~ppl@222.236.30.217] has joined #ruby-lang
gregmoreno [gregmoreno!~gregmoren@S0106001e58eab184.vc.shawcable.net] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
QaDeS_ [QaDeS_!~mklaus@frbg-5d84e0e6.pool.mediaWays.net] has joined #ruby-lang
<tylergillies> running into a weird issue where if i puts an instance of a hash it shows it as "{}"
<tylergillies> but when i puts some_hash["key"] it shows a value
<erikh> { } is an empty hash
<tylergillies> anyone know why its showing up "empty" when i just puts the hash object?
<erikh> try it
<erikh> oh
<erikh> is it really a hash?
twittard [twittard!~twittard@vpn.lax.truecarcorp.com] has joined #ruby-lang
<erikh> p some_hash.class
<tylergillies> erikh: Hash
<erikh> so check your code then
<erikh> where was your p statement
<erikh> also Hash.new([]) is superfluous, might as well just use { } ther
<erikh> e
<tylergillies> erikh: no its not because if i do foo["bar"] << "biz" it will error
<erikh> that's not doing what you think it is i'm almost positive.
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
<tylergillies> erikh: changing last line to puts document.bookmark["name"] returns "tyler"
<erikh> yeah
<erikh> it's appending to an array
<tylergillies> so why is document.bookmark returning {}?
<erikh> because that's what an empty hash is
<tylergillies> but its not an empty hash....
<tylergillies> it has a key of name with a value
<tylergillies> that i can access
<erikh> try p hash
<erikh> insetad of puts
<tylergillies> same thing
<erikh> yeah that's a weird one
<erikh> no idea
<erikh> god I hate those overloaded data structure constructors
<tylergillies> ive seen that behavior before in another project i was working on
<tylergillies> which is why i wanted to ask this time. i'll ask on stack overflow
<erikh> it's likely a bug
<erikh> you should get back { "name" => ["tyler"] }
<tylergillies> yes
<tylergillies> i should
<erikh> for p
<tylergillies> :)
<erikh> puts I'm not sure is defined
<tylergillies> i tried puts hash.inspect
<erikh> that's what p does
<tylergillies> which is what raised the first flag
<tylergillies> proverbial flag anyway
<erikh> yeah, i'm pretty sure it's a bug
<erikh> have you tried it on 1.9.3?
<erikh> (I did on 1.9.2-p290)_
<drbrain> you probably want @bookmark = Hash.new { |h,k| h[k] = [] }
<erikh> why does the first one work
<erikh> those constructors need to be like, 10 constructors
<tylergillies> i'll just call hash["key"] ||= [] first before i push data to it
<samuelkadolph> Or use +=
<tylergillies> wonder if that would fix it
<samuelkadolph> h = Hash.new([]) works if you do h[key] += [1]
<erikh> the code drbrain gave you will do the same
<erikh> it's not breaking guys
<samuelkadolph> Otherwise you need to use a block like drbrain showed to not have to use =
<erikh> it's just the puts
<erikh> the inspect value is incorrect
lenilson_dias [lenilson_dias!~lenilson_@186.204.118.127] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
lenilso__ [lenilso__!~lenilson_@186.204.118.127] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
twittard_ [twittard_!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@64.134.241.97] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
gix [gix!~gix@e180003081.adsl.alicedsl.de] has joined #ruby-lang
<rue> andrewvos: You can argue, but you'll still be wrong :)
malev [malev!~malev@186.19.145.135] has joined #ruby-lang
scottschecter [scottschecter!~scott@c-98-252-167-171.hsd1.ga.comcast.net] has joined #ruby-lang
jbwiv_ [jbwiv_!~jb@cpe-098-026-172-101.triad.res.rr.com] has joined #ruby-lang
gix [gix!~gix@e180005123.adsl.alicedsl.de] has joined #ruby-lang
<erikh> the klabnik has no clothes
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
sulo [sulo!~sulo@141.117.162.70] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<rue> Secret twitter reply
<dfr|mac> Ruby doesn't have nested exceptions in stdlib, right?
<rue> dfr|mac: No, what's a nested exception?
<dfr|mac> rue: well, when you have one wrapping other one with some more info.
<rue> Oh. Just wrap it, then?
<dfr|mac> rue: well sure, but I want the stacktraces combined and I don't think Exception class takes another exception to do anything like that
<rue> It's two methods to override
<rue> #initialize and #backtrace?
michael_mbp [michael_mbp!~Marin@112.134.194.187] has joined #ruby-lang
<rue> If, in fact, you need it
<dfr|mac> rue: yea. But nested exceptions are a pretty obvious feature. So I'm wondering maybe there's a reason why it's not there.
<dfr|mac> rue: i mean, I know how to implement what I want.. but maybe there's a good reason why I shouldn't. So fishing for that :)
<dfr|mac> I was expecting someone to start bashing me that it's a bad idea >.<
<erikh> all the bashers are on weekend
<dfr|mac> erikh: i guess that's a point >.<
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
bougyman [bougyman!bougyman@bougyman.com] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
bougyman [bougyman!bougyman@pdpc/supporter/gold/bougyman] has joined #ruby-lang
kain [kain!~kain@151.64.209.184] has joined #ruby-lang
<dfr|mac> rue: i guess I'll just override message and backtrace and see where it gets me. Thanks :)
<rue> dfr|mac: I dunno if they're an obvious feature, if by that you mean a common use case
<rue> I'd primarily seek to avoid them, but…
<dfr|mac> rue: seems like maybe they just don't fit very well in the idea that an exception is one message and one backtrace
<dfr|mac> rue: the way I implemented it was join the backtraces and mention the name of the cause in the original message.
slackstation [slackstation!~eman@174-127-33-234.static-ip.telepacific.net] has joined #ruby-lang
<dfr|mac> rue: but that's possibly not optimal in generic case (although should work fine for me)
<dfr|mac> so maybe that's the reason....
scottschecter [scottschecter!~scott@c-98-252-167-171.hsd1.ga.comcast.net] has joined #ruby-lang
<rue> They're not particularly difficult to implement… just not necessary for the most part
<rue> Maybe even something like…
jbwiv_ [jbwiv_!~jb@cpe-098-026-172-101.triad.res.rr.com] has joined #ruby-lang
<rue> module NestedError; def self.for(exception, message); Class.new(exception.class) { def initialize(msg, ex); @msg, @ex = msg, ex; end; … }.new message, exception; end; end
<rue> That'd be fun
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<rue> Well, probably not
<rue> But it'd have the interesting property of being able to be rescued as its superclass
<dfr|mac> rue: it seems like combining the stack traces is a little bit tough... because you want to separate them, but then it doesn't fit very well with the idea that a backtrace is an array of lines =/
<dfr|mac> rue: here's what I have for now: http://pastie.org/2998647
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<nuclearsandwich> hjjjujh
<rue> You don't say?
<rue> dfr|mac: Just depends on how fancy you want to get
spap [spap!spap@unaffiliated/spap] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.167.88.254] has joined #ruby-lang
<dfr|mac> rue: yea, I think I'm happy with what I have. :) Thanks for discussion!
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
<tylergillies> if i do f.lines.each{|line| ... } is that a stream, or does it load the entire file into memory?
<drbrain> it's a stream
<drbrain> there's also each_line
<tylergillies> drbrain: does it do essentially the same thing?
<drbrain> tylergillies: yes, but I like each_line better because there's one less .
<drbrain> #lines is an Enumerator
<tylergillies> drbrain: i like chaining stuff though, chains are somewhat of a fetish ;)
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby-lang
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
<rue> Whipping the chains in shape
<imperator> back from gaming!
<rue> Wow, you were gone like 20 hours!
jimmy1980 [jimmy1980!~jimmy@112.224.2.9] has joined #ruby-lang
<imperator> 20? well, 8 maybe :)
<srbaker> tylergillies: chaining against stdlib isn't so bad. but it's easy to get into maintenance nightmares. read about the Law of Demeter.
<imperator> f.lines? that's not a method is it?
<imperator> IO.foreach folks
<tylergillies> srbaker: i heard about that for the first time the other day
<srbaker> tylergillies: abide, son.
<tylergillies> if we followed law of demeter what would happen to andand gem?
<srbaker> tylergillies: it's not exactly about counting dots. it's about managing dependencies
<rue> srbaker: Well, enumerator chaining is a different beast altogether
<srbaker> rue: that's true
<rue> Generally though, sure. “Demeter: it's not just a good idea, it's the law”
<imperator> breakin the law, breakin the law
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<srbaker> rue: i was more trying to nip an "i like dots" fetish in the bud :P
<rue> Ha
<rue> Hm, it's 6:43
<rue> Sauna time
JosephRuby [JosephRuby!~joseph@46.33.39.43] has joined #ruby-lang
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
jbwiv_ [jbwiv_!~jb@cpe-098-026-172-101.triad.res.rr.com] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.9] has joined #ruby-lang
samuelk|away [samuelk|away!~samuelkad@unaffiliated/samuelkadolph] has joined #ruby-lang
perryh_ [perryh_!~root@far3567.urh.uiuc.edu] has joined #ruby-lang
perryh_ [perryh_!~root@unaffiliated/perry753] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@174-27-220-21.slkc.qwest.net] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has quit ["Leaving"]
wmoxam_ [wmoxam_!~wmoxam@69-196-129-140.dsl.teksavvy.com] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has quit [#ruby-lang]
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
jmontross [jmontross!~Adium@c-76-102-197-68.hsd1.ca.comcast.net] has joined #ruby-lang
dfr|mac_ [dfr|mac_!dfr|work@nat/google/x-kyjoxkgoebhtfwod] has joined #ruby-lang
<rue> Sauna time over!
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby-lang
<erikh> business time has ended
<dr0id> night
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
kain_ [kain_!~kain@151.64.209.184] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
rippa [rippa!~rippa@109-161-74-125.pppoe.yaroslavl.ru] has joined #ruby-lang
woollyams [woollyams!~woollyams@124-168-81-150.dyn.iinet.net.au] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.2.9] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
gix [gix!~gix@e180018244.adsl.alicedsl.de] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has quit [#ruby-lang]
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
jmontross [jmontross!~Adium@c-76-102-197-68.hsd1.ca.comcast.net] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@ool-ade56346.dyn.optonline.net] has joined #ruby-lang
alim [alim!~alim@109.99.128.78] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
goshakkk [goshakkk!~goshakkk@212.98.177.65] has joined #ruby-lang
leonL [leonL!~leonl@199.119.232.2] has joined #ruby-lang
slaytanic [slaytanic!~slaytanic@200-55-74-190.dsl.prima.net.ar] has joined #ruby-lang
twittard [twittard!~twittard@vpn.lax.truecarcorp.com] has joined #ruby-lang
<shevy> andrewvos, had any luck with your anti-REST blog yet? :>
<rue> There was sabotage
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<erikh> cocaine is a hell of a drug
<rue> I know, right?
<drbrain> erikh: wait until you mix it with a barbiturate!
<rue> No, don't wait!
<drbrain> and don't forget to chase it down with a beer!
<erikh> haha
<devn> openstruct vs struct vs class vs hashmap
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
<devn> the eternal thought experiment
<rue> OpenStruct is like the blob
<drbrain> never use openstruct in production
<devn> i know the benchmarks
<devn> and depending on what you're doing, that benchmark changes
<drbrain> devn: you know the memory costs too?
<devn> so i dont take the "never" advice...ever
<devn> yes
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<devn> well, for some limited benchmark I know those values...yes
<drbrain> openstruct costs 2 methods per entry per instance
<devn> that's an interesting fact, but i come to you with a question
<drbrain> so if you have 100 instances with 5 elements that's 1000 methods you have floating around
<devn> if this is all true, why the fuck are they in core?
<drbrain> because it's convenient
<devn> do tell
<devn> sorry not trying to be snarky
<drbrain> it's an easy way to make an object that responds to read/write access for arbitrary methods
<devn> but ive been investigating struct/openstruct/class/hash perf. and I'm...confused
<devn> drbrain: so it's syntactic sugar?
<drbrain> so you can use it as a stub, or a dumb datastore for simple stuff
<devn> it's a convenience method?
<devn> it's a helper?
<drbrain> yeah
<devn> lol
<erikh> does it have to be fast and efficient to be useful?
<devn> i have to say out of all of the things in the ruby community that has to be the most opaque
<devn> there is a general assumption that a "struct-like thing" will be closer to the mtal
<devn> and therefore faster
<devn> metal*
<devn> people walk in with this assumption knowing a bit about c or c++ and then try to reason about why it was named an openstruct or struct
<devn> when class is == to the perf. of struct
<erikh> what's the openstruct analogue in C
<rue> devn: A struct-like thing is a class…
<devn> erikh: i am generalizing
<erikh> well you're being intentionally obtuse
<devn> rue: not as dynamic
<erikh> not sure you're generalizing.
<rue> Sure it is
<drbrain> Struct.new is a nice way to do Class.new
<drbrain> with less typing
<devn> Maybe I'm showing some ignorance off here
<devn> I guess I never got the memo. No one put that in the books I read.
<devn> or I don't remember it.
shyouhei [shyouhei!~shyouhei@2001:380:17a:1:0:ff:fee1:5afe] has joined #ruby-lang
<devn> IDK, it's not a bad thing to find a hole. I think people need to explain what openstruct and struct are supposed to be used for.
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
<devn> classes are introduced earlier than structs in ruby, so they seem like some sort of convenience
<devn> err "language feature" is what i mean
<devn> which makes one wonder why
<rue> devn: I suppose they could be emphasized. A struct is a class with public data members only by default
<devn> im rambling: classes are everywhere when you're reading code or trying something out in Ruby. Struct and OpenStruct are explained like they're very subtle and slightly, somehow different from the rest of the language, but they really amount to: the lazy man's shortcut alias for class, and the efficent man's lazy alias for class
<drbrain> pretty much
<devn> btw, hi!
<rue> (Kinda like a C++ struct)
<devn> drbrain: rue: I've been coming in here for years and you guys have always been accommodating
<devn> thanks for being wicked bad ass
zmack [zmack!~zmack@78.97.129.175] has joined #ruby-lang
<devn> rue: yeah but there are performance guarantees there that arent present in ruby
<devn> so it's misleading
<rue> I'm not sure there're guarantees…
<devn> im not trying to beat up on ruby, just saying...this is something that is commonly confused. I had several hypothetical discussions with people I believe to completely know their stuff
<devn> and then did some research on struct/openstruct/class/hash
<devn> without knowing for sure there were ideas about dispatch being faster for objects with defined fields, a question about how dynamic they were
<devn> a question about the infinite size of hashes and the guarantee of a fixed size by default for a struct
<drbrain> well, attr_accessor and friends cheat, so they're faster, but the difference is not so great in 1.9
<devn> how do you mean?
<drbrain> I don't think Struct takes advantage of the same trick
<devn> this is why i brought it up!
<devn> am i going to get some YARV wisdom?!
<drbrain> for a regular method dispatch you need to set up an environment for local variables and stuff
<devn> "here's how to cheat YARV to optimize your objects"
<drbrain> for attr_accessor ruby knows it doesn't need any of that stuff so it doesn't bother
<drbrain> ruby1.8 cheats too
<rue> (Also, nowadays you can't generalize performance gains)
<drbrain> it's more effective there
<erikh> hardware is neat
<erikh> I'm adding to this conversation I promise
<devn> lol erikh
<devn> drbrain: ahhh, that make sense
<devn> drbrain: i had to read that like three times to process it
Neil [Neil!~neil@host-92-27-200-117.static.as13285.net] has joined #ruby-lang
<devn> i didn't consider the surrounding context
<devn> ive been thinking in functions a lot lately
<Asher> think in objects not functions :)
<devn> i think functions are a sensible default
<devn> objects are the combination of a series of sensible defaults
<Asher> it seems that way until you learn how to think in objects
<erikh> ruby is different in this regard
<devn> i learned th eopposite way asher
<erikh> for ruby, specifically, asher's point of view makes sense
<devn> i started with objects and now am on objects
<erikh> for just about everything else it doesn't matter
<Asher> it's not just about using objects it's about learning to think about how objects decompose a complex structure into simple interfaces
<devn> i understand that but i find it cumbersome
<erikh> ugh, my ivory tower alarm is going off
<devn> i appreciate the small composable bits that functions give me
<Asher> erikh - from my comment?
<erikh> yes
<Asher> why's that?
<rue> I think they're just high
<Asher> i'm always high
<devn> same
<devn> ...........
<anekant> i'm higher than thou
<erikh> I'm sobert
<drbrain> I'm sorbet
<devn> so anyway, yeah -- we're arguing some sort of vim vs emacs, mac vs windows, ios vs android debate
<erikh> I loudly proclaim in here when I'm drunk and I don't smoke weed.
<erikh> devn: agreed
<Asher> only insofar as there is really substance to the mac vs windows contrast
<devn> but I don't tink it's all for naught
<Asher> and that substance comes down to a difference in programming style
<devn> think*
<Asher> which comes down to objects
<devn> i think functional programming has taken and generated most of OOP's jewels
<devn> and OOP has not reciprocated
<devn> I think we need some peace love and functional objects in the 21st century
<Asher> err i wasn't saying avoid functional programming
<devn> objects are extreme, but not the answer. pure FP is not an answer.
<devn> we need functions that we can use to build ad-hoc object systems
<devn> that's the future.
<anekant> functional programming is unnatural, unintuitive, sick, deviant, and wrong!
<devn> anekant: ever use .map in ruby?
<Asher> if you have something like potion in mind where objects are first order functions then i'm down
<erikh> yeah math is hard
<anekant> math can be subject-predicate like aRb instead of R(a,b)
<devn> math is not a language of permanent or perfect expression
<devn> it contains its own subset of highly specialized bullshit
<erikh> oh agreed
<erikh> but calling functional programming unnatural is merely ignoring what it's modeled after
<anekant> i blame Frege for starting us down this dead-end path
<devn> calling functional programming unnatural is a giveaway that someone doesn't know much about functional programming
<erikh> ^
<erikh> this.
<devn> (. Class method method)
yxhuvud [yxhuvud!mongo@h-17-224.a149.priv.bahnhof.se] has joined #ruby-lang
<devn> Class.method.method
<anekant> functional programming has the syntax wrong.
<devn> lol
<devn> you can't be serious
<anekant> natural language has evolved a syntax that is much more evolutionarily fit
<devn> wow.
<devn> this is it folks.
<devn> we're done writing papers.
<devn> we're done thinking.
<devn> evolution will take care of programming.
<anekant> note how we're communicating in subject-predicate form :)
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
<devn> not how fuzzy the communication is? invert my sentence, i could.
<devn> oops! typo.
<anekant> note how you have to translate between language and function-argument form, causing an impedance mismatch
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<anekant> note the fault tolerant features of language...
<Asher> so i was not at all intending to be speaking against functional programming - i was intending to say that talking about ruby (and similar languages like obj c) it makes sense to focus on designing objects as interfaces rather than on functions as technologies
<anekant> flexibility, adaptability
<devn> anekant: im not sure what you're arguing.
<devn> Asher: damned right. i read that, was just responding to other replies
<devn> Asher: i think you're right on
<anekant> isn't there a recent article on slashdot talking about how we need new languages because existing ones can't adapt, natural language adapts to changing environments without top-down control
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<Asher> meh
<devn> "a recent article on slashdot"
<devn> dude...is it 1998?
<drbrain> anekant: so I guess you have a 100% working natural language parser?
<Asher> existing languages can do everything that needs to be done… the question is how to organize it most appropriately to achieve the desired effect
<drbrain> even IBM's Watson can't pull that off
<Asher> so new languages might assist in doing that, but it's not "necessary"
<devn> Asher: that is a wildly vague statement that has almost no real meaning
<Asher> it really isn't
<anekant> drbrain :)
<shevy> hehe
<erikh> I'm pretty sure asher has never written applescript
<Asher> the stakes involve manipulating the status of memory
<devn> im not trying to be mean, but please recognize that your statement is almost nil
<Asher> erikh - sure i have.. why?
<erikh> nobody has this argument after writing that
<anekant> devn 1989 called, it wants its insult back
<Asher> erikh - because it is a spawn of hell?
<erikh> it's a colossal pain in the ass
<erikh> yes
<devn> anekant: i like you. you should learn lisp.
<anekant> dude i've studied all these functional languages
<shevy> (yeah(invest(into(the(future(today
<Asher> i was arguing that existing languages do what we need and that we need to learn how to deploy them in more sophisticated architectural patterns
<anekant> well not all, but enough :)
<devn> anekant: and you're totally fucking down with objects 300%? Why wouldn't you want a mix?
<anekant> oh sure, choice is good
<Asher> i think most of our lack of success in approaching language processing (and AI in general) is a function of unsophisticated understandings of the logic at stake behind it all
<anekant> i'm just taking an extreme stand for argument's sake
<erikh> frankly I want a rekindling of rpn programming
<devn> anekant: nononono i say otherwise
<Asher> ie we think we know what is involved in "reading" and that "reading" is a simple process
<devn> it's not about choice
<shevy> Asher, there are some things in programming that are probably not yet discovered or sufficiently mainstream. I'd love to have a programming language that could also be used to simulate biological models (cells / objects) as a main feature
<devn> it's about constraints that guide your choices
<devn> in nice directions
<shevy> Java constraints!!!
<anekant> that will not be able to adapt to unforeseen changes in the environment
* devn sighs
<Asher> shevy - right that was my point about efficiency of expression… there will be new languages designed to achieve specific tasks b/c the language organizes the data (stuff in memory) in terms that are congruent with the way it needs to be used
<shevy> just kidding devn :D
jimmy1980 [jimmy1980!~jimmy@112.224.2.9] has joined #ruby-lang
<devn> lol i'm hyper sensitive shevy -- sorry
<devn> i keep having this same debate
<devn> people come out with quips and what-not to defend the vatican city of OOP
<devn> but it's just objective and realistic to talk about the limitations of FP and OOP and try to come to some middle ground
<anekant> that's not me, oop isn't a very good model either
heppy [heppy!~heppy@75-101-31-55.dsl.dynamic.sonic.net] has joined #ruby-lang
<devn> we *need* to do this or we're screwed
<shevy> devn, did you look at http://falconpl.org/ ? The first time I looked at it I thought "What the heck, I am confused" ... Statements like "six integrated programming paradigms: procedural, object oriented, prototype oriented, functional, tabular and message oriented."
<devn> we will have machines with 32 cores soon.
<Asher> it's not a matter of searching for the "best" programming language style … it's a question of how each type of language produces certain advantages/disadvantages for certain problem domains
<devn> what the fuck am i going to do with a green thread?
<devn> etc.
<devn> Asher: absolutely
<devn> Asher: it used to be lisp
<devn> we should all be saying "learn prolog"
<erikh> or forth!
<Asher> people should learn prolog just to see hwo different it is
<devn> im not kidding erikh
<erikh> forth RULES
<devn> what are the practical applications prolog?
<devn> im polling rhetorically
<devn> what say you?
<devn> applications of prolog*
<anekant> CYC
<anekant> haha
roha [roha!~phelot@84-75-49-50.dclient.hispeed.ch] has joined #ruby-lang
<devn> you just killed chat
<devn> imagine this: you can query your program and ask how many times a nested condition happens
<devn> you can query your program for slow method calls
<devn> your program knows about itself because it is composed of its own stuff
<anekant> i guess cyc doesn't use prolog: "Because the Cyc KB contains hundreds of thousands of assertions (aka "rules"), many approaches commonly taken by other inference engines (such as frame-based expert system shells, RETE match, Prolog, etc.) just don't scale up to KBs of this size."
<drbrain> devn: halting problem
<rue> devn: Apparently you can do a sudoku solver in 6 lines of Prolog
<rue> Also, you can base Erlang on it
<rippa> I bet you can do a sudoku solver in one line of APL
AlecTaylor [AlecTaylor!alec.taylo@unaffiliated/alectaylor] has joined #ruby-lang
<AlecTaylor> hi
n8tr0ns [n8tr0ns!~ntrns@c-66-235-22-157.sea.wa.customer.broadstripe.net] has joined #ruby-lang
<rue> HI THERE
<AlecTaylor> sup
<devn> rippa: rue: it's not about succinctness or consision
<devn> concision
<rue> Too
<rue> See?
<devn> it's about holding a whole program in your head
<devn> relational programming lets your do that really easily
<devn> you* blech
<devn> damned keyboard with keys on it!
<erikh> BILLY MAYS HERE WITH NEW COLORFORTH
<devn> erikh: that is totally unhelpful
<devn> but funny
<rue> erikh: :D
<erikh> that's what I do best
* devn kisses you softly on the cheek
<rue> Succinct- or conciseness
<rue> You English-speakers don't use hyphens nearly enough
<devn> says the guy who loves his syntactic sugar
<devn> :D
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<drbrain> rue: you Finnish speakers don't use spaces nearly enough
<drbrain> :D
<devn> o
<devn> \|/
<rue> 'Tistrue
<devn> i have to head to bed unfortunately
dr_bob [dr_bob!~dr_bob@p5DC4F7B7.dip.t-dialin.net] has joined #ruby-lang
<devn> ill be in here to extoll the virtues of things that arent OOP throughout the week ;)
<devn> happy rubying all
<devn> cheers
<anekant> dream of flexible languages that can adapt to changing environments
<erikh> like lisp
<anekant> can it adapt to not use parentheses
<rue> Naw, Future of New Computing is 8 different languages for different things
<erikh> rue: at least they all run on the jvm now
<anekant> sure start with languages adapted to a certain domain, then one will take the best elements from each, kind of like english can absorb foreign language words and syntax...
<devn> anekant: you tripped an alarm
<devn> never seen parens on *that* side of the method before?
<devn> give me a break.
<devn> night all
<anekant> it's a pain to type!
<devn> does the pain pay off or no? short term gains are the only measure of success?
<anekant> is there a better way? harm reduction
<rue> Put parens like (foo, bar)baz ?
kitallis [kitallis!~kitallis@122.167.88.254] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
tallship [tallship!~tallship@pool-71-189-131-153.lsanca.fios.verizon.net] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-216-104.ssp.dialog.net.pl] has joined #ruby-lang
<shevy> ewwww
<shevy> there is a space in there
<shevy> (foo,bar)baz
<shevy> ^^^ much better now
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
queequeg1_ [queequeg1_!~queequeg@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
RomD [RomD!~Roman@nrbg-d932340b.pool.mediaWays.net] has joined #ruby-lang
frode15243 [frode15243!~frode1524@pdpc/supporter/active/frode15243] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
benanne [benanne!~rijdier@133.82-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.3.99] has joined #ruby-lang
ltd- [ltd-!~z@zx.io] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
Pip [Pip!~Pip@host-87-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
solars [solars!~solars@mk089144206167.a1.net] has joined #ruby-lang
woollyams [woollyams!~woollyams@124-168-81-150.dyn.iinet.net.au] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl18-45-1.dsl.telepac.pt] has joined #ruby-lang
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
Luis11 [Luis11!~Luis11@2-224-124-60.ip170.fastwebnet.it] has joined #ruby-lang
<shevy> dumdedum
niklasb [niklasb!~codeslay0@p5B3115CA.dip0.t-ipconnect.de] has joined #ruby-lang
<imperator> shevy, man, when do you sleep?
<imperator> p.s. good morning :)
* apeiros_ would assume around 0.00-07.00 CET
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has quit [#ruby-lang]
<apeiros_> moin imperator
<emporer> ^^
<emporer> damit
<rue> The weak sleep
<emperor> that… is weird…
<apeiros> 12:21 <irc.freenode.net> NickServ: Invalid password for Kuja-FFIX.
<shevy> imperator hey! It's 12:22 here in central europe! happy sunshine ... but it's also very cold. The sun is lying to me, insinuating that it is warm...
<apeiros> got that message - but it's none of my passwords, neither did I attempt to identify…
<rue> Wonder what kuja's up to
<shevy> apeiros is switzerland snow covered already?
* apeiros wonders whether the irc server is buggy - some kind of race condition…
<apeiros> shevy: nope
<shevy> rue no idea but he is still lurking on IRC somewhere
<shevy> not sure if he is still using ruby though
<yxhuvud> for what it's worth neither are the populated parts of sweden.
* imperator releases sys-uptime 0.6.0 into the wild, now usable by jruby
<apeiros> imperator: you do sysops stuff?
<imperator> apeiros, not atm, used to do some related stuff
<shevy> :)
<shevy> good old sys-* apps
<shevy> when the imperator was young and fearsome... and so evil
<shevy> nowadays he is too cuddly
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby-lang
<imperator> it's all those truffles i ate
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
jasox [jasox!~jxx@178.239.26.139] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
AlecTaylor [AlecTaylor!~alec.tayl@unaffiliated/alectaylor] has joined #ruby-lang
Pip [Pip!~Pip@host-87-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0D96A.dip0.t-ipconnect.de] has joined #ruby-lang
beiter [beiter!~beiter@mnhm-590c19f4.pool.mediaWays.net] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@bl18-45-1.dsl.telepac.pt] has joined #ruby-lang
AlecTaylor [AlecTaylor!~alec.tayl@unaffiliated/alectaylor] has joined #ruby-lang
yorickpeterse [yorickpeterse!~yorickpet@pdpc/supporter/professional/yorickpeterse] has joined #ruby-lang
Neil [Neil!~neil@host86-173-56-172.range86-173.btcentralplus.com] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby-lang
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
nazty [nazty!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.3.99] has joined #ruby-lang
steeljav [steeljav!~b@69.197.102.2] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
jensn [jensn!~Jens@206-244-96-87.cust.blixtvik.se] has joined #ruby-lang
jensn_ [jensn_!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.3.99] has joined #ruby-lang
AlecTaylor [AlecTaylor!~alec.tayl@unaffiliated/alectaylor] has joined #ruby-lang
reasonedink [reasonedink!~donnie@adsl-067-034-186-046.sip.mco.bellsouth.net] has joined #ruby-lang
<reasonedink> I'm really loving Sinatra's simplicity, and I've done some neat stuff with it on my own machine, but I'd like to deploy an app to the Web.
<reasonedink> Heroku makes that very easy and convenient.
<reasonedink> I followed those instructions to the T, and yet no go: http://glowing-day-7812.heroku.com/
<reasonedink> During the initial `heroku create`, I get "warning: already initialized constant BaseWithApp".
<reasonedink> I'm almost certain that's the issue, but I don't quite know what to make of it.
<reasonedink> Assuming that's not a fatal warning, I also see this in `heroku logs`: "in `require': no such file to load -- sinatra (LoadError)"
<reasonedink> Which... doesn't make much sense to me.
<reasonedink> I apologize for the wall, but I really want to dig deeper into Ruby for the Web, and I figured clarity never hurts. : )
hebz0rl [hebz0rl!~hebz0rl@95.130.165.85] has joined #ruby-lang
<rippa> I though you have to use bundler
sepp2k [sepp2k!~sexy@g224099114.adsl.alicedsl.de] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<reasonedink> Just tried a completely bare-bones test.
<reasonedink> config.ru contains:
<reasonedink> require './test'
<reasonedink> And test.rb contains:
<reasonedink> print 'It works!'
<reasonedink> And the results are the same.
<reasonedink> "warning: already initialized constant BaseWithApp"
<reasonedink> What could this mean?
<manveru> hm
<reasonedink> The entire error, if it helps:
<reasonedink> /usr/local/heroku/lib/heroku/command/base.rb:209: warning: already initialized constant BaseWithApp
<manveru> yeah, that's not important
<manveru> the loaderror is
<reasonedink> Right, but I also tested without requiring anything.
<reasonedink> Exact same error page.
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<reasonedink> There is literally not a single result for that error on Google. : /
<reasonedink> Doesn't really bode well.
<manveru> in the logs?
<rippa> I wonder what error R10 means
<rippa> process failed to bind to $PORT
<manveru> i don't see where they ever specify the dependencies
Spooner [Spooner!~Miranda@host-92-23-158-179.as13285.net] has joined #ruby-lang
<manveru> dunno if they provide rvm too or just bundler
<reasonedink> I saw that, but I held off and figured I'd just try a bare-bones print test.
<manveru> print?
<manveru> this isn't cgi, you know?
<reasonedink> Ah, that'll about do it. : )
<reasonedink> Thank you.
<manveru> :)
<manveru> no problem
<reasonedink> I imagine this'll work, but I so hate having an unsolved problem on my hands.
<reasonedink> Particularly an error that nobody seems to have had before.
jimmy1980 [jimmy1980!~jimmy@112.224.3.99] has joined #ruby-lang
<reasonedink> Any ideas what the warning could be?
<manveru> well, it warns that the BaseWithApp constant is reassigned
<reasonedink> And, looking at line 209 in that file, it is indeed.
<manveru> you're on ubuntu?
<reasonedink> Well, Lubuntu.
<manveru> what's the lu?
malev [malev!~malev@186.19.145.135] has joined #ruby-lang
<manveru> anw, i figured because of the /usr/local and missing gem directory
<reasonedink> Lightweight.
<manveru> so i recommend you get a normal ruby with rvm and try it with that again
<reasonedink> A "normal" ruby?
<manveru> debuntu messes with ruby in more ways than i can remember
<reasonedink> Mm-hmm.
<reasonedink> I tried to avoid that by using RVM.
<manveru> it's sliced, diced, neutered, spread out, and finally put into lots of little debs
<manveru> so you use the rvm one?
<reasonedink> I didn't even have a system Ruby before I started setting up Heroku; the fact that I now do leads me to believe that Heroku installed it.
<reasonedink> Heroku and RVM don't mix, do they?
<manveru> they do
<reasonedink> I used this, per their suggestion: http://toolbelt.herokuapp.com/linux/readme
<rippa> rvm works with everything
<manveru> rvm use 1.9.3; gem install heroku; heroku stuff...
<manveru> oh my
<manveru> i had no idea they made their own repo
<reasonedink> Bad way to have gone about it?
<manveru> i don't know
<manveru> haven't got ubuntu here to try it either
<manveru> and it's been a while since i put anything on heroku
<Spooner> Think that Lubuntu would perform significantly better than Kubuntu in a VM (on a decent PC)?
<reasonedink> Couldn't say, but the philosophy seems to be go as lightweight as possible; it "feels" about three times faster than Ubuntu, if that's any kind of helpful metric.
<manveru> is there any difference other than the DE?
<reasonedink> In general, it seems to choose the lightest programs as the defaults, but that's about it.
<reasonedink> I imagine they're fairly identical in all but aesthetic respects.
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
<imperator> spacing out, how do I convert "\002" to 2?
<Mon_Ouie> String#ord
fahadsadah [fahadsadah!fahad@unaffiliated/fahadsadah] has joined #ruby-lang
leonL [leonL!~leonl@74-115-197-34.eng.wind.ca] has joined #ruby-lang
<imperator> thanks
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<AlecTaylor> hi
shevy [shevy!~shevy@178-191-240-112.adsl.highway.telekom.at] has joined #ruby-lang
<imperator> greetings
<AlecTaylor> sup
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
reasonedink [reasonedink!~donnie@adsl-067-034-186-046.sip.mco.bellsouth.net] has quit [#ruby-lang]
dejongge [dejongge!~jonke@pD9E0D96A.dip0.t-ipconnect.de] has joined #ruby-lang
joast [joast!~rick@76.178.187.164] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<jasox> I am new in ruby community, so I would like to know what ide or text editor mostly rubysts use ? tnx
<shevy> jasox "most"?
<shevy> vim I guess
<jasox> most * :D
<jasox> shevy, thanks
<shevy> I don't though
malev [malev!~malev@186.19.145.135] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
<Spooner> jasox: Rubymine is the only Ruby IDE I'm aware of. Otherwise any text editor or generic IDE will support Ruby, so people use all sorts.
<jasox> I will use vim, it is light, fast, free and powerful.
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
steeljav [steeljav!~b@69.197.102.2] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-59-207.aei.ca] has joined #ruby-lang
steeljav [steeljav!~b@69.197.102.2] has joined #ruby-lang
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby-lang
<Tasser> jasox, I switched from vim to emacs, but as in the emacs channel: "everything sucks. Try yourself and decide how much"
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<jasox> Tasser, I gave try to emacs, but can not live without vim hjkl.
<shevy> only one thing is sure in the eternal debate between vim and emacs
<shevy> there are two losers
<Spooner> Anyone using anything other than Windows notepad is just lazy (if you aren't on Windows, you need a VM to run it in :D).
<Tasser> jasox, evil ftw
dr0id [dr0id!~andy@unaffiliated/dr0id] has quit [#ruby-lang]
RomD` [RomD`!~Roman@nrbg-d93233a7.pool.mediaWays.net] has joined #ruby-lang
judofyr [judofyr!~judofyr@176.80-202-81.nextgentel.com] has joined #ruby-lang
<judofyr> hey folks
<oddmunds> heyhey
<judofyr> what's up?
Marco_ [Marco_!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.3.72] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@187.147.9.59] has joined #ruby-lang
<andrewvos> meh
Newbs [Newbs!~textual@host-78-147-56-89.as13285.net] has joined #ruby-lang
<judofyr> meh? :(
<andrewvos> judofyr: TRying to fix the build in an environment that I can only describe as "hell"
<andrewvos> judofyr: Took me 20 - 30 minutes to locate a log file
<judofyr> ouch
<andrewvos> Among other pain
<andrewvos> judofyr: Test code in production code. Lots of it.
<andrewvos> judofyr: I think that's the worst.
winniepooh [winniepooh!~Adium@p549D101F.dip0.t-ipconnect.de] has joined #ruby-lang
<andrewvos> Also, vagrant doesn't seem to be sshing into my box anymore :(
<shevy> vagrant
<shevy> is that a perfume?
<andrewvos> shevy: Yes.
<winniepooh> Read the news: === Known platform dependent issues
<winniepooh> ==== OS X Lion
<winniepooh> * You have to configure ruby with '--with-gcc=gcc-4.2' if you're using
<winniepooh> Xcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby
<winniepooh> with '--with-gcc=clang'.
<winniepooh> How do i configure ruby on mac os x lion ? Can somebody help me ?
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<andrewvos> winniepooh: RVM
<winniepooh> What is RVM ?
<andrewvos> Ruby Version Manager
<deryldoucette> rvm.beginrescueend.com
<deryldoucette> see rvm.beginrescueend.com/rvm/install/
<winniepooh> thanks! andrewvos & deryldoucette
<shevy> deryldoucette hmmmm
<shevy> that nick sounds like something to eat
<shevy> something sweet
<deryldoucette> lol
<deryldoucette> I'm a new form of chocolate!
<shevy> hehehe
imperator [imperator!~Daniel@63-225-247-192.hlrn.qwest.net] has joined #ruby-lang
lonny [lonny!~lonny@122.177.160.114] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
roha [roha!~phelot@84-75-49-50.dclient.hispeed.ch] has joined #ruby-lang
<devn> early doucette
<devn> late tomale
<shevy> hmm no I mean...
<shevy> I think there is some kind of name... with sugar... glycosylized something... candied apple thing... that sounds something like dulcette or such
<shevy> see, it's always helpful to think about food while writing ruby code
<devn> shevy: i know what you're talking about -- can't place the word right now
<devn> it's italian i believe
io_syl [io_syl!~io_syl@adsl-69-105-118-125.dsl.pltn13.pacbell.net] has joined #ruby-lang
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby-lang
wmoxam_ [wmoxam_!~wmoxam@69-196-129-140.dsl.teksavvy.com] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5d84e0e6.pool.mediaWays.net] has joined #ruby-lang
DEac- [DEac-!~deac@2a02:2b10:4256:0:201:29ff:fea7:b1bc] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
<shevy> yeah
apeiros [apeiros!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
jimmy1980 [jimmy1980!~jimmy@112.224.3.72] has joined #ruby-lang
thone [thone!~thone@g229077100.adsl.alicedsl.de] has joined #ruby-lang
<arooni-mobile> is there a nice way to iterate over a hash and assign all values of one hash to antoher?
<arooni-mobile> i..e how would i iterate over a hash
<judofyr> arooni-mobile: hash.each { |k, v| … }
<judofyr> arooni-mobile: but there's also: a = {}; b = {1 => 2}; a.update(b); a # => {1 => 2}
Carnage\ [Carnage\!~carnage@84-75-168-154.dclient.hispeed.ch] has joined #ruby-lang
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby-lang
<arooni-mobile> ah ha
<arooni-mobile> thats useful
<andrewvos> arooni-mobile: Maybe you want hash1.merge(hash2)
<corsican> anybody in here used Salesforce's databasedotcom gem?
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby-lang
jbwiv_ [jbwiv_!~jb@cpe-098-026-172-101.triad.res.rr.com] has joined #ruby-lang
scarekrow [scarekrow!~eli@c-68-51-118-108.hsd1.in.comcast.net] has joined #ruby-lang
<scarekrow> hey
scarekrow [scarekrow!~eli@c-68-51-118-108.hsd1.in.comcast.net] has quit [#ruby-lang]
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
winniepooh [winniepooh!~Adium@p549D101F.dip0.t-ipconnect.de] has quit [#ruby-lang]
roha [roha!~phelot@84-75-49-50.dclient.hispeed.ch] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
me345 [me345!~me345@75.15.183.164] has joined #ruby-lang
apeiros [apeiros!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby-lang
MrUnagi [MrUnagi!~mrunagi@74-93-222-38-WashingtonDC.hfc.comcastbusiness.net] has joined #ruby-lang
wmoxam_ [wmoxam_!~wmoxam@69.196.129.140] has joined #ruby-lang
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
jmontross [jmontross!~Adium@c-76-102-197-68.hsd1.ca.comcast.net] has joined #ruby-lang
leonL [leonL!~leonl@199-7-156-34.eng.wind.ca] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
looopy [looopy!~looopy@static-71-166-230-193.washdc.east.verizon.net] has joined #ruby-lang
Duke_ [Duke_!~duke@91.210.238.33] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g224101175.adsl.alicedsl.de] has joined #ruby-lang
Duke_ [Duke_!~duke@91.210.238.33] has joined #ruby-lang
Defusal_ [Defusal_!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
Duke_ [Duke_!~duke@91.210.238.33] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
Defusal [Defusal!DeFi@dsl-240-234-166.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<andrewvos> vagrant can be painful at times
<erikh> yes
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
lightcap [lightcap!~lightcap@72.25.112.178] has joined #ruby-lang
kain [kain!~kain@151.64.209.184] has joined #ruby-lang
pbjorklund [pbjorklund!~pbjorklun@c-b9dbe655.026-155-626f721.cust.bredbandsbolaget.se] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
chessguy [chessguy!~chessguy@pool-74-96-111-119.washdc.fios.verizon.net] has joined #ruby-lang
perryh [perryh!~root@far3567.urh.uiuc.edu] has joined #ruby-lang
perryh [perryh!~root@unaffiliated/perry753] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<shevy> muzone well they have a lot of money
<sodani> hello, does anyone know how I can view the headers of a get request generated by open-uri?
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<shevy> but muzone always remember to find out who precisely builds this. I'd guess outside corporations will profit
<judofyr> sodani: res=open("http://google.com/"); res.meta
<apeiros> I've watched a documentation on working conditions in dubai - modern slavery.
<sodani> judofyr: thanks
<sodani> judofyr: actually, looking for the request that I'm making. not the response
<judofyr> sodani: oh, now I see
<judofyr> hm… not sure actually
<sodani> okay thanks. will keep looking
<S1kx> quick heads up to anyone using tinytds/freetds: dont use passwords longer than 30 chars or you are gonna get a "stack level too deep" error which can cost you >1 hour of debugging
<apeiros> muaha
<apeiros> ouch :)
<WhiteHorse> why is it that the gems are stored in such a redundant directory?
<WhiteHorse> - bundle show rake
<WhiteHorse> F:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2
<shevy> WhiteHorse that's ruby's SITEDIR
<WhiteHorse> seems to me that we need to call David H. to beautify that :D
<apeiros> seems somebody confuses rails & ruby…
<shevy> or rather
<shevy> it's close to the site dir ... lib/ruby/site_ruby/1.8
<WhiteHorse> not at all apeiros
<shevy> WhiteHorse, I am not sure how he would improve it? because, how, specifically?
<WhiteHorse> David just know how to design things and make it look logical and beautiful :D
<shevy> if I'd do a language from scratch, though, I wouldn't make a distinction between add-ons (like gems) and otherwise installed apps. so, no gems/ dir
<apeiros> WhiteHorse: 'F:/Ruby192/lib/ruby' <-- rubys libdir in your OS (in sane OSes that's something like /usr/local/lib/ruby, so the Ruby192 is only redundant on insane OSes)
<shevy> I think it's more an ad-hoc solution
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<apeiros> WhiteHorse: 'gems/1.9.1' <-- the gems directory for a specific ruby version, you may want to take a look at it, it contains more than just another 'gems' directory.
<apeiros> and finally 'gems' <-- contains the actual gems
Pupeno [Pupeno!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
<Mon_Ouie> And then there's ~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby which is just as redundant
<WhiteHorse> oh i see :D
<apeiros> there, hth. and dhh should not touch rubygems with a 10 feet pole. rails' code is ugly enough already.
jondot [jondot!~jondot@bzq-82-81-9-127.red.bezeqint.net] has joined #ruby-lang
<WhiteHorse> so its windows what makes it look redundant :D
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby-lang
<jondot> hi all. i'm considering replacing resque in my stack in favor of qu because of the mongodb backend (saving out on running a redis instance in addition to mongodb). anyone running qu in prod? any issues i should be aware of?
<shevy> well WhiteHorse what I don't understand entirely is the installation path that is picked on windows
<shevy> you have that Programs directory. I think it kinda destroys the scheme there if one does install into a subdir on ROOT_DIR like F: or C:
<jondot> i'm also wondering - in qu's README its claimed that delayed_job loses work on failure, is it still correct per curernt versions?
Pupeno [Pupeno!~pupeno@94-194-48-38.zone8.bethere.co.uk] has joined #ruby-lang
Pupeno [Pupeno!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<WhiteHorse> yes your right shevy, but I dont follow windows way of doing things most of the time, and I hate the 2 words folder name "Program Files" and in my language. "Archivos de Programa" too long!!:S
<shevy> hehe
<WhiteHorse> i cant imagine myself typing Archivos de Programa in the shell... not a single time lol
<apeiros> ln -s
<apeiros> oh wait, windows :-p
<WhiteHorse> lol
<shevy> WhiteHorse you can use tab complete
<shevy> and use MSYS on windows too
<shevy> but it still sucks
<shevy> or even without tab complete
<shevy> cv Ar*
<shevy> oops
<shevy> cd Ar*
<WhiteHorse> yes in know but I have something personal with that folder name XD
<WhiteHorse> i dont put anything in there... at least things that i know im going to access through command line
<mksm> it's much easier to just user virtualbox
<WhiteHorse> I still wonder why they have to separte gems by ruby version? Why not just put all the gems in: /usr/local/lib/ruby/ and let RubyGem and Bundler take care of compatibilty issues?
<mksm> than using ruby on windows
<mksm> s/user/use/
<WhiteHorse> mksm: believe me I'm thinking seriously to make the shift from CYGWIN to a VirtualBox
<WhiteHorse> cygwin is making me crazy
<mksm> vbox is great
<WhiteHorse> I spend 80% of the time fighting with Cygwin that actually learning ruby or rails :S
<judofyr> WhiteHorse: why not http://rubyinstaller.org/ ?
<judofyr> that's the "native" port
<judofyr> to Windows
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
<erikh> the GEM_HOME is the container for the fs structure
<erikh> for rubygems
<erikh> you'll notice there's more than one dir in there
<erikh> only one of them contains the actual gem dirs
<WhiteHorse> yes judofyr, I already installed all of that.. and I use everything from windows CMD but sometimes there are obstacles along the way that force me to switch to cygwin like not having SSH capabilites in CMD
<erikh> msys does a good job there
<judofyr> putty?
<erikh> you can do most things straight from cmd.exe
<WhiteHorse> there are a lot of obstacles you find along the way when try to develop ruby and/or rails apps in windows
<erikh> but yeah; ruby isn't friendly on windows. that said, there are a few people working really hard to make it better
<WhiteHorse> isnt putty just the same as using cygwin.. as far as i know cygwin use the putty terminal by default since the last version
<erikh> not really
<judofyr> windows isn't friendly on me :/
<erikh> that's just because you don't know how to use it
<erikh> I don't prefer it for development though
<erikh> if .net had a proper port to unix-alikes though..
* erikh drools
nuclearsandwich [nuclearsandwich!~nuclearsa@64-79-127-126.static.wiline.com] has joined #ruby-lang
andresgutgon [andresgutgon!~chatzilla@31.pool80-102-150.dynamic.orange.es] has joined #ruby-lang
BitPuffin [BitPuffin!~BitPuffin@109.58.71.85.bredband.tre.se] has joined #ruby-lang
<shevy> putty is cool
<BitPuffin> Hello
<BitPuffin> Does anyone know why my ruby 1.9.3 doesn't support letters like
<Mon_Ouie> I don't know, my IRC client shows me question marks
<Mon_Ouie> Probably an encoding issue, but "not support" is quite a vague description
<apeiros> BitPuffin: define "doesn't support"
<BitPuffin> apeiros gives me errors whenever they are used?
<apeiros> still vague
<apeiros> BitPuffin: rule 1 when you want help: be precise, give as much information as concisely as possible.
igotnolegs [igotnolegs!~igotnoleg@174-27-220-21.slkc.qwest.net] has joined #ruby-lang
<apeiros> "errors" - precise errors. "when used" - used how? where?
<BitPuffin> allright wait a sec
<apeiros> but of course, I can just answer your original question too: you're wrong. ruby 1.9.3 supports letters like åäö just fine.
<BitPuffin> everywhere the ruby stuff is
<BitPuffin> whether it's in irb or in a ruby file
<BitPuffin> hmm
<BitPuffin> could it be because it's 64 bit windows?
<apeiros> make sure you have the `# encoding: ENCODING` comment
<apeiros> in your ruby files that is
<WhiteHorse> in which way will putty make my life easier shevy? i dont know much a about it
<apeiros> ENCODING should match whatever encoding you actually use
<shevy> I didn't say putty will make your life easier :)
<shevy> I said putty is cool. It really is! It is neat, it looks nice, it is a better telnet version!
<shevy> and you can use it to play ancient text MUDs :P
<jondot> speaking of encodings. is there any reason why certain ruby code interacting with UTF input works my dev linux box, but not on a prod server? is there any server definition of encoding?
<apeiros> in irb: make sure your shell's encoding and the encoding ruby expects match.
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<BitPuffin> didn't know you could do that
<apeiros> jondot: the 3 values that are relevant are ENV["LANG"], Encoding.default_external, Encoding.default_internal
<jondot> apeiros: thanks!
<apeiros> jondot: I generally have ENV["LANG"] = 'en_US.UTF-8' and the other two set to Encoding::UTF_8
<jondot> is that on the server?
<apeiros> I have that everywhere (rails config and irbrc mainly)
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<apeiros> I think you can set Encoding.default_external and Encoding.default_internal by some env vars, I don't remember which, though.
<jondot> well i kinda ran a one-off ruby script on the server, not within rails.
<apeiros> jondot: well, I'd check whether those 3 values differ between dev machine and server
<jondot> the script would pull XML from a web service and parse it. on dev machine OK, on prod server dies (cries about UTF8). i ended up just running the script on my dev machine.
MrUnagi [MrUnagi!~mrunagi@184.242.189.30] has joined #ruby-lang
<jondot> yep, great pointers.
<shevy> ewww
<shevy> XML
<jondot> yea, my IRC felt a bit like 2001.
<jondot> which makes me realize, technology is too far ahead that unfortunately there are very little occasions i can say "felt like 199x". 2000's is the new 90's.
<jondot> :(
<erikh> I had a good friend say, "that sounds like 10 year old technology" last night
<erikh> I cried a little inside
Pupeno [Pupeno!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
Pip [Pip!~Pip@host-86-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
nertzy [nertzy!~grant@96.25.228.151] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
<shevy> hmm
Roujo [Roujo!~Roujo@modemcable186.146-70-69.static.videotron.ca] has joined #ruby-lang
jasox [jasox!~jxx@178.239.26.139] has joined #ruby-lang
<andrewvos> vagrant makes me want cry right now
<andrewvos> I've been trying to get a vm up all day
<andrewvos> So I can do dev
<andrewvos> For FREE on the WEEKEND
<andrewvos> And I can't even do that
<andrewvos> fml
Marco [Marco!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<rue> You shoulda billed yourself at least, then.
urbanmonk [urbanmonk!~rom@bas1-toronto08-1279299299.dsl.bell.ca] has joined #ruby-lang
<andrewvos> I'm downloading an older version of virtualbox
Marco [Marco!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<rue> Sounds exciting
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@112.134.198.67] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.40] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-92-23-158-179.as13285.net] has joined #ruby-lang
<dreinull> hey you can dev on amazon
<dreinull> I'm on the other hand have a hardware problem.
<dreinull> I bought a new monitor and I cannot calibrate it.
<rue> Er
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
towski [towski!~towski@173-13-170-161-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@64-79-127-126.static.wiline.com] has joined #ruby-lang
_whitelogger [_whitelogger!~whitelogg@2a00:ab00:1::4464:5550] has joined #ruby-lang
bougyman [bougyman!bougyman@63.133.184.126] has joined #ruby-lang
bougyman [bougyman!bougyman@pdpc/supporter/gold/bougyman] has joined #ruby-lang
sodani [sodani!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
<andrewvos> Fuck vagrant
<andrewvos> I want to punch vagrant
<andrewvos> Vagrant, if you were a man, I'd punch you. Punch you right in the mouth.
<andrewvos> I'm gonna punch you in the ovary, that's what I'm gonna do. A straight shot. Right to the babymaker.
<manveru> you seem overly affectionate
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<confounds> what did vagrant do this time
<andrewvos> confounds: I don't even know any mroe
<andrewvos> confounds: The new version of vagrant doesn't work
<andrewvos> confounds: Also, a whole lot of other shit happening with clients internal repos are killing me
<andrewvos> yum repos I mean
<confounds> andrewvos: that sucks, haven't used it myself
<andrewvos> Indeed
<andrewvos> I have been trying to fix a red build all day, and haven't had a chance to even look at code yet :(
<shevy> hmm
<shevy> today was fairly productive for me
<shevy> :>
<andrewvos> Shut up you
<andrewvos> shevy: What you working on?
<shevy> andrewvos hmm... mostly on my ftp wrapper in ruby... at first, I tried to improve the ruby-gtk version, but soon enough that sucked. so I went to the interactive console-only client, and added a few new things, which worked nicely
<shevy> I come to the conclusion that GUI things really suck horribly
<shevy> especially they suck very much compared to web interfaces
<sodani> does anyone know how I can view GET request headers generated by open-uri?
<andrewvos> sodani: Fire it at this: http://requestinfo.heroku.com/?hello=1
<andrewvos> sodani: The hello=1 is there to explain how it is working
<andrewvos> sodani: Let me rephrase that: I put the hello query there so you could see that it would appear in the page.
<sodani> I see. lemme give it a shot
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<sodani> andrewvos: not quite sure how this works
<sodani> if I view it the page with a browser, wouldn't it just show the request from the browser and not from the ruby script?
<andrewvos> sodani: Output the response body then?
<theoros> %w[of by for].permutation.each { |p| puts (("%s the people, " * 3).gsub(/, $/, ".") % p).capitalize }
<theoros> shorten my code, #ruby-lang
<sodani> andrewvos: okay I'll try. thank you
<confounds> theoros: no you
<andrewvos> %w[of by for].permutation.each {|p| puts (("%s the people, " * 3).gsub(/, $/, ".") % p).capitalize}
<andrewvos> Done
<shevy> lol
<anekant> where's the "Democracy is "
<shevy> you could alias cap to capitalize
<shevy> and then!
<shevy> you could call
<shevy> .cap
* shevy wins.
* shevy demands a prize now.
<anekant> first prize, one week in cleveland. second prize, two weeks in cleveland.
<shevy> eww
<andrewvos> theoros: puts %w[of by for].permutation.map {|p|p.map{|i|"#{i} the people"}.join(", ").capitalize}
<andrewvos> theoros: Fail :(
<andrewvos> anekant: hahahha
<theoros> |x, y, z| puts "#{x.capitalise} the people, #{y} the people, #{z} the people." # really, let's face it
<theoros> but going around the houses is important
<andrewvos> Readable code is important
<shevy> I tend to do alias e puts
<shevy> and then use e rather than puts