tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<apeiros>
wallerdev: you should use Benchmark and measure CPU time. that should have less variation. you may also want to stop gc during bench.
<wallerdev>
yeah i should, maybe i can do that tonight or something
<wallerdev>
kinda annoying to run it since i have to keep restarting the rails console haha
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
<apeiros>
:)
<apeiros>
well, gotta get some sleep
<apeiros>
gn8
<wallerdev>
night
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby-lang
gregf [gregf!~gregf@207.5.168.94] has joined #ruby-lang
<wallerdev>
woot
<wallerdev>
way faster now
<wallerdev>
although still could be faster but the slowest part is now the db
<wallerdev>
awesome
jonathangreenber [jonathangreenber!~jonathang@dsl-066-037-089-005.citizip.com] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has quit [#ruby-lang]
<h4y4shi>
Hey guys I am having an error. Every time I run this line of code the random number doesnt refresh. How can I get the random number to refresh? http://pastebin.com/xvsKXuJF
<qpingu>
You're always getting 1, right?
<qpingu>
It's because you're doing "monster = 1"
<qpingu>
You meant to do "monster == 1"
<qpingu>
Which you don't need to do anyway, you can juse do
<qpingu>
case monster
<drbrain>
h4y4shi: case monster; when 1 then …; when 2 then …; … end
<qpingu>
when 1
<qpingu>
...
<wallerdev>
yeah your case is all out of wack
<wallerdev>
i didn't even know you could leave the case part blank haha
<drbrain>
then it works like an if elsif elsif elsif
<wallerdev>
makes sense
<h4y4shi>
whenver I run this I always get froh
<wallerdev>
although i don't see the point there's probably a use for it
<h4y4shi>
Whenever I run this I always get "Frog"
<qpingu>
Yeah h4y4shi, check out my pastebin
<qpingu>
It's because you did "=" and used case wrong
<wallerdev>
h4y4shi: you may have to have frogs be the only monsters in your game
<h4y4shi>
Okay thank you I will look it over and correct my mistake thank you for helping me
<wallerdev>
you can rename it to frog town 2: a ribbiting adventure
<h4y4shi>
wallerdev: lol... that would be one way to fix my error
<wallerdev>
alright well my ajax call loads in 1.5s now instead of 5.5 when the day started so I'm happy
rpowell [rpowell!~rpowell@101.161.11.105] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
bousquet [bousquet!~bousquet@208.180.213.144] has joined #ruby-lang
<h4y4shi>
qpingu: Thanks for the help man it works now =D
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
<slyphon>
ugh
<slyphon>
how big is a 'long long'?
<slyphon>
64b?
fserb [fserb!~fserb@178-83-225-18.dynamic.hispeed.ch] has joined #ruby-lang
<heftig>
yes
<slyphon>
mm'kay
<slyphon>
thanks
<heftig>
mostly. could be 128 on some platforms, i think
<fserb>
I'm looking for a particular Ruby learning site that I saw a couple months ago, with a sequence of online exercises, it had a ninja/kata interface. Does anyone here remember it? I cannot find it again!
<slyphon>
heftig: see, that's why i hate C
<erikh>
slyphon: long long is loooooooooong
<slyphon>
erikh: :D
<slyphon>
unsigned long long cannot be trusted!
<erikh>
"just talkin' 'bout long!" ya damn right
<slyphon>
hrm
<slyphon>
can you do rb_funcall(KlassConst, rb_intern(:new), 0) to call Foo.new ?
<shevy>
who would have thought that ruby can be so complicated
<shevy>
:/
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-130-5.lnse2.ken.bigpond.net.au] has joined #ruby-lang
<wallerdev>
lol
<wallerdev>
blame computers and their powers of 2
<Phrogz>
Blame an infinite universe and finite computing storage.
<shevy>
oh
<shevy>
is the universe really infinite?
<Banistergalaxy>
Phrogz: sup froggy
<shevy>
I feel we are much closer to the question of how the information system in biological systems evolved than have found the answer to the origin of the universe and its future x billion years to come
<Phrogz>
Hey hey! 'sup is I got myself some shoulder surgery 1.5 weeks ago and have been sitting in a recliner coding one-handed (now two-handed) for a long time.
<Banistergalaxy>
Wow,i guess we all have experience typing one handed
<shevy>
wheeee
<Banistergalaxy>
Esp shevy
<shevy>
my sister had shoulder surgery some years ago
<Banistergalaxy>
;)
<Phrogz>
I'm purposefully putting up information that I know to be sub-optimal to force myself to really investigate and understand cache control issues. :)
<shevy>
I tried to type with one hand but I really could not :(
<Phrogz>
lol @ Banistergalaxy
<Banistergalaxy>
:)
<erikh>
cache-control: the IMAP of http/1.1
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<shevy>
hehe
<Banistergalaxy>
Does osx have a kill ring
<erikh>
no
<erikh>
but you can install software that gives you one
<Banistergalaxy>
Iirci brought it up by accident once
<Banistergalaxy>
Hmm ok
<erikh>
I use flycut
<erikh>
it's free on the app store
<erikh>
also on github
<Banistergalaxy>
Thanks
<Phrogz>
…what's a kill ring?
<Phrogz>
An OS-wide clipboard?
<Phrogz>
(clipboard history)?
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
<Banistergalaxy>
Clipboard history yeah
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has quit [#ruby-lang]
urbanmonk [urbanmonk!~rom@bas1-toronto08-1279298902.dsl.bell.ca] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
<shevy>
hmm
<shevy>
the word "crackdown" is a fairly new word, right? It was not used i.e. in medieval times to describe a king order the attack of his guards against some villagers who protested
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<bougyman>
1935 Washington Post 18 May, A threat of a ‘crack-down’ by the middle class group against those who put forward the legislation for abolishing public utility holding companies. (c) Oxford English Dictionary, shown for educational conversation purposes only.
<bougyman>
it only hit the OED in 1972, though
<bougyman>
so yeah, definitely fairly new.
Ampd [Ampd!~Ampd@pool-108-36-74-137.phlapa.fios.verizon.net] has joined #ruby-lang
<shevy>
bougyman hmm
<shevy>
well, interesting at least that it can be traced to 1935
coder_jd [coder_jd!~yaaic@pool-108-36-74-137.phlapa.fios.verizon.net] has joined #ruby-lang
<bnagy>
well the OED was (is) a little slow with americanisms
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
<bnagy>
although usually faster now than 35 years :D
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-216-130-5.lnse2.ken.bigpond.net.au] has joined #ruby-lang
kolet [kolet!~collettiq@173-16-246-235.client.mchsi.com] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
<shevy>
I imagine we now have a lot more words than humanity had ... 500 years ago!
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
<bnagy>
fo shizzle
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:3:226:8ff:fedd:31a3] has joined #ruby-lang
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
Weems [Weems!~the@nat.resnet.mc.edu] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
AndChat- [AndChat-!~AndChat@222.153.223.45] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
acts_as [acts_as!~acts_as@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
w00t0 [w00t0!~w00t@c-76-106-216-81.hsd1.fl.comcast.net] has joined #ruby-lang
ryanf [ryanf!~rfitz@ec2-50-18-158-149.us-west-1.compute.amazonaws.com] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby-lang
vladalive [vladalive!~vladalive@176.52.68.243] has joined #ruby-lang
mahlon [mahlon!mahlon@martini.nu] has joined #ruby-lang
h4y4shi [h4y4shi!~chatzilla@rrcs-67-79-54-130.sw.biz.rr.com] has joined #ruby-lang
thone [thone!~thone@g226051181.adsl.alicedsl.de] has joined #ruby-lang
alexeyKolosov [alexeyKolosov!~quassel@ns1.zbku.ru] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
gregmore_ [gregmore_!~gregmoren@S01067444012f4469.vc.shawcable.net] has joined #ruby-lang
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
_eagspoo [_eagspoo!~esalazar@cpe-071-076-222-103.triad.res.rr.com] has joined #ruby-lang
<_eagspoo>
Pry does that with a module name and it breaks tab completion
<_eagspoo>
Seems like /home/esalazar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb line 177 could be name = m.name.to_s since if it isn't a string it crashes later
<AndChat->
_eagspoo: pry does what? You mean pry works correctly or it crashes too?
<_eagspoo>
AndChat-: Pry overrides Module#name somewhere which causes irb to crash since irb assumes in completion.rb:177 that name is a string
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.45] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.231.81] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
<Banistergalaxy>
_eagspoo: wtf? Why ar you using irb inside pry?
<Banistergalaxy>
You use one or the other, they are alternatives for one another
<_eagspoo>
Well I can think of reason but that isn't even the point. Even doing require 'pry' then [1].first.<tab> causes a crash
<_eagspoo>
pry is also used for debugging
<_eagspoo>
so I might put binding.pry in my code somewhere to inspect at that point.
<Banistergalaxy>
_eagspoo: I can't reproduce it
<Banistergalaxy>
_eagspoo: can you tell ne exactly how to reproduce it
<_eagspoo>
Banistergalaxy: did you see the gist above? Just define a module that has a method def self.name /foo/ end
<_eagspoo>
then tab complete [1].first.<tab>
<_eagspoo>
that's all I did to repro
<Banistergalaxy>
_eagspoo: I did exactly that and can't repro
<_eagspoo>
huh, should crash :)
<Banistergalaxy>
What pry version?
<_eagspoo>
I uninstalled pry and can still cause the crash
<Banistergalaxy>
So it's not related to pry i take it?
<_eagspoo>
Not really. Might be strange thing for pry to do but probably shouldn't be crashing irb either
<_eagspoo>
Try pasting that exact gist into irb then hit tab
<_eagspoo>
This is my ruby version btw: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
<_eagspoo>
I mean I can see the bug. in completion is does name = m.name, then later /stuff/ =~ name
<_eagspoo>
Which if name is not a string will cause an exception
<Banistergalaxy>
_eagspoo: so the bug is in irb, not pry it seems
<Banistergalaxy>
Works fine in pure pry
<_eagspoo>
Even just doing /foo/ =~ /bar/ will throw an exception
<_eagspoo>
Banistergalaxy: seems like it
<Banistergalaxy>
Then forget irb, and use pry exclusively
<Banistergalaxy>
;)
<_eagspoo>
rails console users irb so I have no choice
<_eagspoo>
unfortunately
<_eagspoo>
ok, I found how to switch
<_eagspoo>
easy
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby-lang
Algo [Algo!~Algo@unaffiliated/algorithmiccontr] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.231.81] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@58.69.201.60] has joined #ruby-lang
krzkrzkrz [krzkrzkrz!~foobar@unaffiliated/krz] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
csherin [csherin!~csherin@202.164.151.110] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
Pupeno- [Pupeno-!~pupeno@client-82-8-216-103.sqy-bng-011.adsl.virginmedia.net] has joined #ruby-lang
Pupeno- [Pupeno-!~pupeno@pdpc/supporter/active/pupeno] has joined #ruby-lang
<_eagspoo>
Banistergalaxy: actually not so easy. reload! and app aren't defined. I just hacked my local copy of irb and submitted a bug. It is just irb after all
<Banistergalaxy>
_eagspoo: use pry-rails plugin
<Banistergalaxy>
There are many ways to get pry working in rails with rails helpers, just read the pry wiki
kain_ [kain_!~kain@151.64.210.200] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
shevy [shevy!~shevy@178-190-47-222.adsl.highway.telekom.at] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
workmad3 [workmad3!~workmad3@vpn111.its.manchester.ac.uk] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host101-153-dynamic.40-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
cyri_ [cyri_!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby-lang
[zaf]-Coral [[zaf]-Coral!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
tjadc [tjadc!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby-lang
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
_eagspoo [_eagspoo!~esalazar@cpe-071-076-222-103.triad.res.rr.com] has quit [#ruby-lang]
gokulnath [gokulnath!~gokulnath@115.111.177.122] has quit [#ruby-lang]
ovnimancer [ovnimancer!~anton@212.59.96.38] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby-lang]
empity [empity!~user@149.255.121.162] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-60-229-92-99.lns3.ken.bigpond.net.au] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<mrchrisadams>
You guys know if there's a way to see which exception is being raised in a method definition like this gist ? https://t.co/iQct8znb
<mrchrisadams>
Feels like it should be easy, but pry comes up with nothing obvious when I drop into it with binding.pry
<judofyr>
mrchrisadams: $!
<judofyr>
or: rescue => err
<judofyr>
and then you can inspect err
<Banistergalaxy>
judofyr: btw released stack explorer, would be cool if you had a play at some point
<mrchrisadams>
judofyr: wow, thanks!
antinitro___ [antinitro___!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
<manveru>
und die is verantwortliche für ACTA in österreich...
<tbuehlmann>
bist du gerade im richtigen channel?
<manveru>
sorry, einer zu weit links :)
<tbuehlmann>
:)
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<ddfreyne>
wir sprechen nur Ruby hier, kein Deutsch!
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC151F6.dip.t-dialin.net] has joined #ruby-lang
<DefV>
users[:ddfreyne].has_point? # => true
<Defusal>
Does anyone know of a easy way that I can override all attribute setter methods (attr_name=) for all models that subclass ActiveRecord::Base?
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<manveru>
switch to sequel? :P
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
* manveru
hides
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
<nfxgosu>
can I manually assign a symbols key?
<judofyr>
nfxgosu: hm?
<nfxgosu>
i want red to have a key value of 1021
<manveru>
?
<ddfreyne>
nfxgosu: symbols don't have values. hashes map keys (which often are symbols) onto values though, is that what you want?
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
Manhose [Manhose!~Manhose@188.251.85.233] has joined #ruby-lang
<nfxgosu>
TY!
g0kul [g0kul!~gokulnath@115.111.177.122] has joined #ruby-lang
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
<Defusal>
manveru, i'd rather be using MongoDB, but this project already uses a MySQL db
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
tomb- [tomb-!~tomb@hubot.tomb.io] has joined #ruby-lang
<Defusal>
i just thought of a cool, clean way to do update writes, since the model instances are cached with their own states too.. but it requires overriding the setter methods, which are dynamically created :/
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
fayimora [fayimora!~fayimora@2a01:388:201:3721:2555:396e:cb6:ace9] has joined #ruby-lang
<Defusal>
interesting, method(arr ? *arr : str) is invalid syntax... you have to use method(*(arr ? arr : [str])) instead
Jerdent [Jerdent!~jerdent@pha75-10-82-230-185-117.fbx.proxad.net] has joined #ruby-lang
<Spooner>
What is people's opinions on optional dependencies for a gem (for example, a gem that only requires another gem if the user needs to use a subset of functionality, but it isn't in the gemspec)? I find that behaviour horrid, but some people might not like having to install a lot of dependencies they are unlikely to use to run a gem. Hmm, maybe plugin gems would make more sense (so I have releasy and releasy_extra_stuff gems)?
<erikh>
fwiw I think s/_/-/ is a great idea
<injekt>
erikh: so, when hitting --no-u you'd be able to use the method_missing helpers like opts.no_u? and fetching a value with opts[:no_u]
<erikh>
wel
<erikh>
yeah
<injekt>
thanks
<erikh>
maybe a global flag for the latter case
<erikh>
e.g., if you call no_u, it sets that flag
<erikh>
a bit magical but at least it doesn't cause an impedance mismatch
<injekt>
interesting
<injekt>
yeah
<erikh>
dunno. if it's too magical, might just be better to leave it out
<Phrogz>
Spooner: Horrid.
<Spooner>
Phrogz: What is? :D
jredville [jredville!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
<erikh>
use Gem.find_files
<erikh>
I think that's the call at least -- let's you search the activated gems
<erikh>
lets too
<Phrogz>
Spooner: "I find that behaviour horrid"; I agree. If possible, the main gem should require the minimum amount of code from the subset (like ActiveSupport or Facets, a minimal require), but it must be int he gemspec.
<erikh>
so you could look for **/mygemplugin.rb and back up from that
<erikh>
that's how rdoc and rubygems do it
<Spooner>
Phrogz: Ah yes, makes sense to not actually require it unless it is used; hadn't considered that. OK, I'll put everything in the gemspec, but avoid pluginifying it for the time being.
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-115-43.hlrn.qwest.net] has joined #ruby-lang
<imperator>
i don't suppose anyone has an aix box with gcc on it that i could have temporary access to?
<nfxgosu>
rippa: Hash[[1,2,3,4].product ["string"]] how do I name this hash?
<rippa>
what?
<nfxgosu>
p name_of_hash['1'] => "string"
<Spooner>
And another question please: c2_output = `c1 | c2` # this still prints out the "text output" from c1, even if c1's "data output" gets passed to c2. Any way I can capture c1's output?
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<nfxgosu>
nvm i figured it out
tjadc [tjadc!~quassel@dsl-241-9-76.telkomadsl.co.za] has joined #ruby-lang
<imperator>
oh great, had a power outage yesterday and now one of my vm's is all effed up
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
* imperator
discovers "force shutdown" option
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Weems [Weems!~the@nat.resnet.mc.edu] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
<jbwiv>
Can anyone explain the behavior/functionality of (a,b) in this snippet? http://pastie.org/3259792
<dominikh>
jbwiv: list decomposition. name gets assigned the keys, (a,b) gets assigned the array, so a gets assigned the first element, b the second
<jbwiv>
dominikh, ah, k. interesting...didn't know you could do that in block arguments. thanks
znz_jp [znz_jp!~znz@ns5.n-z.jp] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
nofxx [nofxx!~nofxx@177.106.91.211] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
DEac- [DEac-!~deac@cl-610.dus-01.de.sixxs.net] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@38.104.99.146] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@117.216.80.45] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
g0kul [g0kul!~gokulnath@117.216.80.45] has joined #ruby-lang
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby-lang
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@38.104.99.146] has quit [#ruby-lang]
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-28-58-161-190.cm.vtr.net] has joined #ruby-lang
g0kul [g0kul!~gokulnath@117.216.80.45] has quit ["Leaving"]
dfr|mac [dfr|mac!dfr|work@nat/google/x-psdfvncbmqicksxx] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
thegeekinside [thegeekinside!~thegeekin@189.135.220.214] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
spinagon [spinagon!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
tjadc [tjadc!~quassel@2002:29f1:94c:e:76f0:6dff:fe7a:d1d7] has joined #ruby-lang
bglusman_ [bglusman_!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
partydrone [partydrone!~partydron@vpn.wavetronix.com] has joined #ruby-lang
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby-lang
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-105-20.dsl.scarlet.be] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.240.61.64] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
lianj [lianj!~lianj@17.145.34.193.static.giga-dns.com] has joined #ruby-lang
lianj [lianj!~lianj@subtle/user/lianj] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DD77.dip0.t-ipconnect.de] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
comboy [comboy!~quassel@tesuji.pl] has joined #ruby-lang
yellow5_ [yellow5_!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
ozzloy [ozzloy!~ozzloy@ozzloy.lifeafterking.org] has joined #ruby-lang
Foxmaster [Foxmaster!~root@c-83-219-199-232.cust.bredband2.com] has joined #ruby-lang
jaska [jaska!jaska@f948.ip11.netikka.fi] has joined #ruby-lang
tdmackey [tdmackey!~tdmackey@booleanhaiku.com] has joined #ruby-lang
chris2 [chris2!~chris@vuxu.org] has joined #ruby-lang
shaman42 [shaman42!shaman42@kapsi.fi] has joined #ruby-lang
ozzloy [ozzloy!~ozzloy@unaffiliated/ozzloy] has joined #ruby-lang
perryh_ [perryh_!~root@fremont.perryhuang.com] has joined #ruby-lang
Arsen7 [Arsen7!~case@gmx218.internetdsl.tpnet.pl] has joined #ruby-lang
matti [matti!matti@acrux.romke.net] has joined #ruby-lang
jhchabran [jhchabran!~jh@bne75-11-88-189-148-57.fbx.proxad.net] has joined #ruby-lang
t0h [t0h!thelineva@nikita.tnnet.fi] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
zvrba [zvrba!96456@diamant.ifi.uio.no] has joined #ruby-lang
zumbi [zumbi!~zumbi@77.224.206.23] has joined #ruby-lang
zerokarmaleft [zerokarmaleft!zkl@morpheus.net] has joined #ruby-lang
segy [segy!~segfault@pdpc/supporter/active/segy] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.238.214] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
schroedinbug [schroedinbug!~schroedin@71-212-191-172.hlrn.qwest.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
erikh [erikh!~erikh@hollensbe.org] has joined #ruby-lang
mdmdm [mdmdm!~maestro@50-0-12-246.dsl.dynamic.sonic.net] has joined #ruby-lang
<erikh>
christ, gg freenode
Algo [Algo!~Algo@adsl-69-108-82-13.dsl.irvnca.pacbell.net] has joined #ruby-lang
Algo [Algo!~Algo@unaffiliated/algorithmiccontr] has joined #ruby-lang
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby-lang
wasnotrice [wasnotrice!~wasnotric@174-143-152-175.static.cloud-ips.com] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
flexd [flexd!~flexd@dev.flexd.net] has joined #ruby-lang
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby-lang
josh9 [josh9!~oren@cpe-76-172-9-207.socal.res.rr.com] has joined #ruby-lang
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby-lang
jaimef [jaimef!jaimef@dns.mauthesis.com] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby-lang
bryanl [bryanl!~bryanl@li362-49.members.linode.com] has joined #ruby-lang
foca [foca!~foca@li25-211.members.linode.com] has joined #ruby-lang
soahccc [soahccc!chaos@d2-1.debian-02.ppps.hosts.project-production.de] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
matti [matti!matti@acrux.romke.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-81-152.ssp.dialog.net.pl] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-fvvxdjyztdmdurls] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
corsican [corsican!corsican@50-79-33-41-static.hfc.comcastbusiness.net] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has quit ["8-X"]
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
<rue>
erikh: O no, are you breaking up?
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
<erikh>
eh?
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
kookwekker [kookwekker!kookwekker@2a02:2308::216:3eff:feb8:af22] has quit [#ruby-lang]
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby-lang
rvb_ [rvb_!~raghavbag@122.172.59.125] has joined #ruby-lang
<rue>
erikh: I'm not entirely sure how, but I read gg as goodbye
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<erikh>
ah
<erikh>
no
joast [joast!~rick@76.178.187.164] has joined #ruby-lang
<erikh>
i'm fatally addicted to irc
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<rvb_>
hey, im just starting with ruby. Was wondering if anyone here wanted people to work on some open source project. Willing to do anything as long as its in ruby
<rvb_>
or if you could reffer me to some project that a beginner could get started with, i would be really grateful
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
Jade [Jade!~jade@unaffiliated/jade] has joined #ruby-lang
yadav [yadav!~quassel@dsl-173-248-230-235.acanac.net] has joined #ruby-lang
<rue>
rvb_: Github's a treasure trove. Are you currently using any particular, or particular kind of, software?
<rvb_>
im not sure i got your question.
<rvb_>
i tried looking at github but dint really know where to start since there was so much choice
<rue>
Typically the best stuff to work on is stuff you use, or want to use
<rvb_>
no i am not using any program written in ruby
<rvb_>
Phrogz: tried that already, just got lost in the sea
<Phrogz>
rvb_: For example, if you are good at 3D graphics you probably wouldn't want to be working on a Ruby program that is designed for tracking financial models.
<rue>
^
<rvb_>
i was hoping that some contributors to some of the projects that require volunteers
<Phrogz>
Find something that looks like something that a) you would use, and b) you'd like to use.
<rue>
Or, maybe you would, but it may be easier to start by looking at various 3D libraries
<Phrogz>
and maybe c) you already know something about that domain of knowledge.
<rue>
rvb_: Open source isn't quite like the job market in that way :)
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby-lang
<qpingu>
Kind of hard to find a random project
<qpingu>
Just try making something and use a ton of gems
<rvb_>
well i'm not really looking for money, just something to work on so that i get better at ruby
<qpingu>
You might find a gem you like or a gap
<qpingu>
Or, make something for a particular hobby/interest
<qpingu>
Like I made a forum for TF2
<rue>
Nearly all projects would be happy to have contributors, but they're not going to go recruiting actively… it takes resources
<rvb_>
rue: thats why i was hoping some maintainers would catch my message and ask...but that does not seem to be happening
<rvb_>
how about you guys tell me some of the projects that you contribute to.
<Phrogz>
rvb_: Only my own :) And patching the libraries I use super frequently if there's a problem/feature, such as Sequel or Sinatra.
<rvb_>
ok
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
<rue>
I've worked mostly on Rubinius and rush/rs. Recently a bit on Pry. Plus sent patches to various libraries
dfr|mac [dfr|mac!dfr|work@nat/google/x-xbkmzfarowshumvt] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
<Phrogz>
Go make LimeChat better. :)
<rue>
There's a good one
<rue>
A nice twist on the traditional IRC bot, too :)
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
<Phrogz>
Yes, or go make us a completely safe, sandboxed bot that can evaluate arbitrary Ruby and spit the output to the channel here.
<Phrogz>
Oh, I forgot, LimeChat is no longer Ruby. :(
scampbell [scampbell!~scampbell@mail.scampbell.net] has joined #ruby-lang
<burgestrand>
navin_unreg: I interpret it as during an assignment the names of the left-hand side are defined to be locals in the right-hand side; have a look at "a = defined?(a)" and "b = defined?(c)"
<burgestrand>
navin_unreg: I never reflected over it though, merely accepted it ;)
<navin_unreg>
hmm, needs pondering for sure :)
jamescotterill [jamescotterill!~james@94-192-130-249.zone6.bethere.co.uk] has joined #ruby-lang
malev_ [malev_!~malev@190.210.138.237] has joined #ruby-lang
headius [headius!~headius@173-165-226-141-minnesota.hfc.comcastbusiness.net] has joined #ruby-lang
<csherin>
burgestrand: so any assignment sets the variable on left hand-side to a default value of nil and evaluating the assignment follows after. When evaluation happens `a` is nil and so it's same as writing a = true if false ?
<burgestrand>
cschneid: don’t take my word for it… but yeah
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
<navin_unreg>
defined?(blah) evaluates to nil by itself
<navin_unreg>
so blah = defined?(blah) isn't surprising
<navin_unreg>
true if false also evaluates to nil by itself
<navin_unreg>
so blah = true if false evaluating to nil isn't surprising either
<navin_unreg>
but blah = blah evaluating to nil is truely surprising
<navin_unreg>
instead of nameerror
<Phrogz>
csherin: It's not normally quite that large a difference in the real tests that I make, but that's probably because I'm testing more the overall algorithm and not just tap/ewo
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-124-183-113-126.lns14.ken.bigpond.net.au] has joined #ruby-lang
levity_island [levity_island!~lawrence@216.156.82.154.ptr.us.xo.net] has joined #ruby-lang
<levity_island>
can anyone recommend a book with examples of good encapsulation and separation of concerns, in Ruby?
<csherin>
levity_island: Design Patterns in Ruby - Russ Olsen
<levity_island>
csherin: thanks!
ilyam [ilyam!~ilyam@2620:65:0:281:7c2d:d861:ac9d:1bb7] has joined #ruby-lang
<shevy>
whoa
<shevy>
a method "test" exists in default ruby?
<yxhuvud>
you didn't know? Never done something like def test .. and it ended up doing something really strange becaue you were in the wrong scope or whatever?
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<shevy>
yxhuvud I wrote a small test code just now with code like
<shevy>
foo { test 3 }
<shevy>
and it surprised me :/
benanne [benanne!~rijdier@ip-213-49-105-20.dsl.scarlet.be] has joined #ruby-lang
dous [dous!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<rue>
a = a # => nil, because the parser sees the variable.
<rue>
In case someone asks in the future.
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
tenderlo_ [tenderlo_!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
<shevy>
wat
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
* andrewvos
has started typing
* rue
has activated channel trigger to notify when typing occurs
<andrewvos>
hi
* andrewvos
has started typing
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<manveru>
lol
<manveru>
andrewvos: according to my calculations, you're typing on a keyboard that's about 2km wide
<manveru>
I'd suggest you don't try to capitalize words
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
* andrewvos
has gone offline
rpowell [rpowell!~rpowell@CPE-124-183-113-126.lns14.ken.bigpond.net.au] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
<andrewvos>
Sorry just bored and don't feel I have the mental capacity to do a real conversation now.
<shevy>
wat
<shevy>
this channel has a high wat factor
<andrewvos>
shevy: Everything you do is "wat".
<shevy>
wat
<shevy>
lies!
ilyam_ [ilyam_!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby-lang
<andrewvos>
Right I know everyone has watched that Bernhardt video, but we need to not type "wat" or even pronounce it in that way.
<andrewvos>
Just hold it together guys.
<andrewvos>
We'll get through this.
<drbrain>
andrewvos: WAT‽
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby-lang
savage-_ [savage-_!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
<andrewvos>
If someone says 'wat' in real life, you're allowed to punch them.
<lianj>
like lol?
<shevy>
wat
<shevy>
hmm no... I don't think they are the same
<qpingu>
andrewvos: You must be popular with electrical engineers
<andrewvos>
lianj: Precisely
<andrewvos>
qpingu: I have no clue what you mean to be honest.
<rue>
qpingu: They pronounce it what, too.
<rue>
Well, a slightly longer a, but still.
<qpingu>
'watt'
<rue>
If you pronounced Watt wat, they'd punch you.
<qpingu>
They sound the same in my head
<qpingu>
I've never heard somebody try and say "wat"
<manveru>
you must've never met anybody from northern germany :)
* Phrogz
agrees with qpingu; it is supposed to rhyme with "watt", roughly.
<andrewvos>
manveru: That's more like vut though?
<manveru>
that's how i'd pronounce w007
<shevy>
wat
<manveru>
of course, where i come from, nobody speaks 1337, so i never get to say it :(
<andrewvos>
What a shame
<shevy>
tirolerisch > 1337 anyway. Every day I learn it through listening to Bluatschink!
<drbrain>
I usually pronounce it WĀT
<manveru>
bluatschink is swiss
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
<manveru>
oh, they aren't?
<manveru>
well, almost :)
<shevy>
hehe
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
<manveru>
every valley in tirol has its own dialect
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
<frem>
how do i use gems I installed via bundler in irb?
<rue>
Via bundler
<manveru>
via ruby
<bjensen>
Bah..any idea as to how I can make this prettier? params[:uucaseworker_name] = params[:uucaseworker_name].sub(/^.* - /,'') if params[:uucaseworker_name].present?
<bjensen>
manveru: the params[:uucaseworker_name] might be nil though
<shevy>
bjensen, not sure you can easily get rid of the if part. you could perhaps move it to another place... or a method ... which would return whatever you need (or does the if checking for you)
<manveru>
that's why i to_s it
RickHull [RickHull!~rhull@pool-96-246-22-58.nycmny.fios.verizon.net] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has quit [#ruby-lang]
dous [dous!~dous@cm171.sigma67.maxonline.com.sg] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
<andrewvos>
setHeader($name, $value, $replace = false) is used to set an individual header. By default, it does not replace existing headers of the same name in the object; however, setting $replace to TRUE will force it to do so.
<andrewvos>
Is it normal to have more than one of the same header?
<RickHull>
sometimes you want to generate a negative test?
<drbrain>
andrewvos: sometimes you can have more than one of the same header
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby-lang
<drbrain>
but it is not typical
<drbrain>
there are only a couple headers where it makes sense
<andrewvos>
Exactly. Shouldn't be a default
<drbrain>
does it give an error if you've already sent the header?
<drbrain>
if it doesn't that would be a real WAT‽
<andrewvos>
And come to think of it ruby web frameworks generally treat headers as a hash.
<andrewvos>
drbrain: Not sure if it does error
<drbrain>
andrewvos: Net::HTTP doesn't
<drbrain>
nor does CGI
<erikh>
*set* not *send*
<erikh>
also Cookie:
<andrewvos>
drbrain: Weird. TIL.
<erikh>
and Set-Cookie: !
* erikh
shuffles
<drbrain>
andrewvos: in the early 1.8 days there was much rabble-rousing around CGI always returning arrays of single items
<drbrain>
in Net::HTTP it's a little more transparent
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
<andrewvos>
drbrain: So it returns an array if there is more than one key?
<drbrain>
I forget what CGI does these days since nobody writes CGIs anymore
<drbrain>
I'm not sure, but from writing tests I know the internal data store is a Hash of Arrays
<drbrain>
and IIRC the parsing code can handle multiple headers
<andrewvos>
but headers["meh"].class == String generally
<andrewvos>
Good to know I suppose
<drbrain>
I think it returns a String unless there's multiple items
<erikh>
that's not very deterministic
<erikh>
so I can bomb out a lot of Net::HTTP scripts by replying with multiple headers?
<drbrain>
erikh: I don't recall the details, I'd have to check
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
<erikh>
np, i'm just in a crabby mood
<andrewvos>
erikh: Well all of my scripts at least
<RickHull>
i guess the "right" way to do it is to make every header an array, and every consumer should have to explicitly consume the first and toss the rest, as the default case
<RickHull>
s/array/Enumerable/
<apeiros_>
RickHull: an alternative would be to be aware which headers can actually have multiple values
<apeiros_>
because most can't
<apeiros_>
so you simply drop previous values if a header occurs multiple times
<apeiros_>
since that's the behaviour mandated by the RFCs, afair.
<andrewvos>
I love how I come in here and bitch about some php method and now you guys are arguing how to do headers correctly :)
<RickHull>
it makes the: `def access(header_name)` return value ambiguous
<apeiros_>
that's a baseless assumption.
RickHull1 [RickHull1!~rhull@pool-96-246-22-58.nycmny.fios.verizon.net] has joined #ruby-lang
RickHull [RickHull!~rhull@pdpc/supporter/active/rickhull] has joined #ruby-lang