Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
<banisterfiend>
gorgapor: is this in pure ruby or railsy type context?
<gorgapor>
actually, i'd like to know the answer in both places
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
quest88_ [quest88_!~quest88@12.181.53.115] has joined #ruby
Tick-Tock [Tick-Tock!~Tick-Tock@lunari.us] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
c0rn [c0rn!~c0rn@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
<wallerdev>
gorgapor: i think what banisterfiend was referring to was that in rails theres the blank? method
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
<wallerdev>
which returns true on nil and empty strings
<freelanceful>
any recommendations for setting up a ratings system using 5 stars?
<wallerdev>
it also returns true on false and empty arrays
<banisterfiend>
wallerdev: waller waller woohoo
<wallerdev>
which could be an issue
<wallerdev>
depending on what you want
<banisterfiend>
walla walla
<wallerdev>
walla walla bing bang
`brendan [`brendan!~b@64-121-18-195.c3-0.upd-ubr1.trpr-upd.pa.cable.rcn.com] has joined #ruby
<gorgapor>
wallerdev, thank you. so if i wanted to do this elegantly in pure ruby, what's my best option?
<banisterfiend>
wallerdev: were you teased mercilessly as a child
<wallerdev>
no haha
<wallerdev>
gorgapor: depends on the length of your variable name haha, (x == nil || x.empty?) is pretty short
<gorgapor>
okay great, thanks
<wallerdev>
x == '' might be a character or two shorter
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
<wallerdev>
and you could do [nil, ''].any? { |v| x == v }
<wallerdev>
thats probably not easy to read though
d2dchat [d2dchat!~d2dchat@c-68-42-68-174.hsd1.mi.comcast.net] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby
jsonperl [jsonperl!43af0489@gateway/web/freenode/ip.67.175.4.137] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
<jsonperl>
im writing an internal gem for a project so that I can wrap up some code we're writing in C
<jsonperl>
so I'm using bundler with the gem specified with a :path, but bundler doesnt compile native extensions for paths
silky [silky!~silky@pool-74-108-142-22.nycmny.fios.verizon.net] has joined #ruby
<jsonperl>
as far as I can tell, i'd need to build and then install the gem to the system then to use it?
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
tomku [tomku!~tom_irc@24-196-153-152.dhcp.fdul.wi.charter.com] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
carlyle [carlyle!~carlyle@99-127-240-24.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
silky [silky!~silky@pool-74-108-142-22.nycmny.fios.verizon.net] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@c-24-23-252-19.hsd1.ca.comcast.net] has joined #ruby
<brownies>
anyone here can help with an activeRecord question?
<brownies>
it is apparently too complicated for other channels...
<brownies>
how can i run this query against my User model? SELECT name, COUNT(name) as repeated_names FROM users WHERE repeated_names > 1;
linduxed [linduxed!~linduxed@194-14-0-85.serioustubes.org] has joined #ruby
nonotza_ [nonotza_!~nonotza@50-57-234-249.static.cloud-ips.com] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
srid [srid!u3297@gateway/web/irccloud.com/x-pterhpgkaplushnx] has joined #ruby
banisterfiend [banisterfiend!~baniseter@122.63.244.189] has joined #ruby
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby
<jsonperl>
wouldn't you want to group by name
<banisterfiend>
jsonperl: wnat to group what by name?
jbpros [jbpros!~jbpros@217-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
<jsonperl>
yes
<jsonperl>
you're looking for users that have the same name?
<wallerdev>
srid: you don't need to escape : or - in your regexes
badabim_ [badabim_!~badabim@17.212.166.215] has joined #ruby
<jsonperl>
(rails question btw, prolly the wrong channel)
<jsonperl>
Users.select('users.*, count(1) as quantity').group(:name).having('quantity > 1')
<jsonperl>
somethin like that?
<FiestaSmash>
ok, so I'm using ruby's socket on rails, and honestly, is there any way to try the connection 3 times and timeout if a connection could not be established?
<jsonperl>
checkout the Timeout library maybe
<jsonperl>
ruby core lib
<wallerdev>
srid: you could also combine your gsubs
j3r0m3 [j3r0m3!~j3r0m3@adsl-99-32-114-209.dsl.pltn13.sbcglobal.net] has joined #ruby
csavola [csavola!~csavola@CPE0021e9f7ea74-CM001404933e00.cpe.net.cable.rogers.com] has joined #ruby
<srid>
wallerdev: oh, how?
<banisterfiend>
jsonperl: what the fuck is prolly
<wallerdev>
k.gsub(/\s|-/, '_')
<jsonperl>
Timeout::timeout(0.5) { do some crap }
<wallerdev>
srid: also split defaults to "\n" so you can do d.split.map
<srid>
i see. thanks
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has joined #ruby
theRoUS [theRoUS!~KenCoar@apache/committer/coar] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
nd___ [nd___!~nd@mnhm-5f752261.pool.mediaWays.net] has joined #ruby
badabim [badabim!~badabim@17.212.166.215] has joined #ruby
juarlex [juarlex!~juarlex@201.124.160.19] has joined #ruby
ereslibre_laptop [ereslibre_laptop!~rafael@li346-8.members.linode.com] has joined #ruby
ereslibre_laptop [ereslibre_laptop!~rafael@kde/ereslibre] has joined #ruby
leex_ [leex_!~leex@tvag.tvk.RWTH-Aachen.DE] has joined #ruby
uxp_ [uxp_!~uxp@hplogsdon.net] has joined #ruby
bastlfreenode [bastlfreenode!bastl@ve621924175.ihrserver.de] has joined #ruby
gentz_ [gentz_!ilab@72.20.41.70] has joined #ruby
mtkd_ [mtkd_!znc@209-20-90-74.slicehost.net] has joined #ruby
jbc [jbc!~jbc22@li299-64.members.linode.com] has joined #ruby
masterhumper [masterhumper!~SeJo@exherbo/developer/sejo] has joined #ruby
d-best [d-best!~d-snp@smurfer.student.utwente.nl] has joined #ruby
clipartc1t [clipartc1t!~redbullra@mhth.tyrell.fi] has joined #ruby
Narcissu1 [Narcissu1!~Narcissus@central.aber.ac.uk] has joined #ruby
CK_afk_ [CK_afk_!~ckruse@painkiller.defunced.de] has joined #ruby
brugidou_ [brugidou_!~marcellus@denver.dinauz.org] has joined #ruby
Jb___ [Jb___!~jb@ks364797.kimsufi.com] has joined #ruby
end3r- [end3r-!~ender@ec2-107-22-14-168.compute-1.amazonaws.com] has joined #ruby
jhunter_ [jhunter_!jfigga@c-67-169-75-5.hsd1.ca.comcast.net] has joined #ruby
tommylom1ykins [tommylom1ykins!~tg551@milan.cs.york.ac.uk] has joined #ruby
ddima_ [ddima_!dima@gateway/shell/c-base/x-bnwthfkyoohpscik] has joined #ruby
chiel_ [chiel_!~chiel@kunkels.me] has joined #ruby
zumbi_ [zumbi_!~zumbi@77.230.237.25] has joined #ruby
panterax [panterax!~panterax@31.176.134.196] has joined #ruby
samuelkadolph_ [samuelkadolph_!~samuelkad@unaffiliated/samuelkadolph] has joined #ruby
Espen-_o [Espen-_o!Espen@sjarken.org] has joined #ruby
al3xnull [al3xnull!~al3xnull@cpe-76-188-178-7.neo.res.rr.com] has joined #ruby
zigidias_ [zigidias_!~zigidias@75.126.182.129-static.reverse.softlayer.com] has joined #ruby
tomzx [tomzx!~tomzx@dsl-156-68.aei.ca] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
zigidias [zigidias!~zigidias@unaffiliated/zigidias] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
peterhil [peterhil!~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #ruby
Seppman [Seppman!~sepp@cpe90-146-41-35.liwest.at] has joined #ruby
<FiestaSmash>
ok heres the issue
<FiestaSmash>
im trying to connect to a host, but rather than returning false
<FiestaSmash>
rails is returning a fatal error
<FiestaSmash>
I simply want to return false if the host refuses the connection
<FiestaSmash>
rather than a global error
<jsonperl>
using what?
<jsonperl>
for the connection
<jsonperl>
begin
user__ [user__!~akem@222.144.120.78.rev.sfr.net] has joined #ruby
nate_h [nate_h!~husimon@c73-208.rim.net] has joined #ruby
radic [radic!~radic@dslb-178-002-212-018.pools.arcor-ip.net] has joined #ruby
rly [rly!~rly@unaffiliated/rly] has joined #ruby
JStoker [JStoker!jstoker@unaffiliated/jstoker] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
cdabba [cdabba!~cdabba_@n128-227-83-86.xlate.ufl.edu] has joined #ruby
kmmndr [kmmndr!~tomtom@bro67-2-82-227-110-8.fbx.proxad.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
misc-- [misc--!~misc@202.171.160.4] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
Caius [Caius!~Caius@about/apple/macbookpro/Caius] has joined #ruby
<jsonperl>
FiestaSmash: did you get it?
<FiestaSmash>
Yeah, I understand rescue now ^^
<FiestaSmash>
It's even printing my error out! neat.
<jsonperl>
ha
<jsonperl>
sweet
<jsonperl>
is it doing what you need? want me to take a look?
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<FiestaSmash>
Oh yeah, I want it to test if a certain host is alive- which it does, and I'm going to have to write a hosting application later, perhaps in rub- oh wait
<FiestaSmash>
one more question
<FiestaSmash>
What do you reccomend for ruby on rails desktop application deployment?
<FiestaSmash>
I'll have to distribute servers to people, and on top of that, I don't want them to have to go through the complex installation process, OR even see and modify the code to the application
<FiestaSmash>
well, rails server based applications
<jsonperl>
hmm... donno
<jsonperl>
bundler and gems makes things preeety easy
<jsonperl>
you can hand em a prebuilt vm to run
<jsonperl>
if you need something completely hands off
<FiestaSmash>
I mean, I want to avoid having users having to have a ruby installation, especially of a certain version
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
dasfugufish [dasfugufish!~Adium@208-38-192-20.mammothnetworks.com] has joined #ruby
Jarred [Jarred!~Administr@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby
<jsonperl>
no experience
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<FiestaSmash>
ack, ill figure it out
<FiestaSmash>
I don't want to have to transition between C# or some other language, I'm not sure for laziness, but I want to keep everything in the backend in rails for consistency
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
a|i [a|i!~ali@68.68.34.161] has joined #ruby
a|i [a|i!~ali@unaffiliated/ai/x-9091534] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
a|i_ [a|i_!~ali@client-86-23-69-21.brhm.adsl.virginmedia.com] has joined #ruby
a|i_ [a|i_!~ali@unaffiliated/ai/x-9091534] has joined #ruby
<FiestaSmash>
still new to rails, when I use boolean returns, is it just true/false or return true/false?
<jsonperl>
either
<jsonperl>
ruby always returns the last value
<jsonperl>
you can be more explicit by saying "return false" if you'd like
<jsonperl>
but "false" is the same
<FiestaSmash>
ok, it wasnt working right with the true false, so I converted it to 0 and 1, and let the function decide the meaning of 0 and 1
<FiestaSmash>
but apparently, it's backwards
<FiestaSmash>
1 is false and 0 true...
<FiestaSmash>
wait
<FiestaSmash>
Ack, confusion, the one awkward moment when the program doesn't do what you need it to..
ipsifendus [ipsifendus!~ipsifendu@c-67-169-223-202.hsd1.or.comcast.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
looopy [looopy!~looopy@pool-141-156-50-23.washdc.btas.verizon.net] has joined #ruby
<FiestaSmash>
ah, ok, seems to be kosher now
dAnjou [dAnjou!~max@141.45.81.216] has quit [#ruby]
cjs [cjs!~cjs@41.98.156.220.st.bbexcite.jp] has joined #ruby
<FiestaSmash>
hey, do you think it would be extremely demanding bandwidth wise
<FiestaSmash>
If my rails application is constantly checking if servers are alive for every user that loads a page?
<FiestaSmash>
agh, hold on
<FiestaSmash>
agh, how would I broadcast my rails app to my public IP address?
<FiestaSmash>
wait, is there any other free hosting which offers rails support?
<FiestaSmash>
*ruby on rails
quest88 [quest88!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<wallerdev>
heroku has a free plan i think
<wallerdev>
i forget
p0y_ [p0y_!~p0y@112.210.78.193] has joined #ruby
carlyle [carlyle!~carlyle@99-127-240-24.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
<FiestaSmash>
whoa, the whole "forget servers" totally blew my mind into small chunks haha
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
ujihisa [ujihisa!~ujihisa@96.49.96.171] has joined #ruby
<FiestaSmash>
Oh I see, almost had me with the $0. turned out to be $0.05 dollars per hour
<wallerdev>
ah
<wallerdev>
i haven't checked on it in a long time
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
<FiestaSmash>
hey, thanks for the help, gnight all
FiestaSmash [FiestaSmash!~thisisfak@c-24-30-117-33.hsd1.ga.comcast.net] has quit [#ruby]
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby
lantins [lantins!~lantins@mx0.lividpenguin.com] has joined #ruby
quest88_ [quest88_!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
quest88_ [quest88_!~quest88@70.42.255.242] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
nd___ [nd___!~nd@mnhm-5f752261.pool.mediaWays.net] has joined #ruby
hkhalid [hkhalid!hkhalid@pool-173-79-49-114.washdc.fios.verizon.net] has joined #ruby
aantix [aantix!~jjones@70-36-141-115.dsl.dynamic.sonic.net] has joined #ruby
<wallerdev>
hm yeah heroku has 750 free hours a month
* hkhalid
slaps wallerdev around a bit with a large trout
<wallerdev>
which takes the cost down to $0
<wallerdev>
so it is free :|
<wallerdev>
haha
<wallerdev>
hello hkhalid
Hanmac1 [Hanmac1!~hanmac@p50845416.dip0.t-ipconnect.de] has joined #ruby
abstrusenick_ [abstrusenick_!~abstrusen@bb119-74-136-249.singnet.com.sg] has joined #ruby
<hkhalid>
hi wallerdev do you use ruby for game dev of opencv
<wallerdev>
no i haven't used ruby for anything game related besides resizing some resources
<wallerdev>
banisterfiend has
<wallerdev>
I've used opencv with the c api
<hkhalid>
why doesnt ruby people make it easy to dev 2d games
<wallerdev>
for some image recognition stuff
<wallerdev>
hkhalid: it might have something to do with it using a good amount of memory and not being the fastest language and not having a lot of good UI libraries
<Okasu>
hkhalid: ruby bad idea for gamedev
<wallerdev>
I've seen people try to create games in ruby and switch back to c++ due to things like GC running at random times
<Okasu>
too slow
<wallerdev>
causing frames to skip
<wallerdev>
read an article about it recently on HN
alx- [alx-!~Alex@108.162.180.72] has joined #ruby
<shevy>
wallerdev, really?
<shevy>
on ruby 1.9.x also?
<shevy>
hkhalid sadly the problem is
<shevy>
making games is way too complicated and time consuming
<wallerdev>
i started a game in c++ but had to put it down
<jlogsdon>
A rather large problem with game dev in ruby is the fact that *all* floats are objects, on top of the GC. Expensive stuff
<shevy>
wallerdev why did you put it down in c++?
<shevy>
I mean
<shevy>
wallerdev why did you put it down your game?
<shevy>
:)
<shevy>
argh
<wallerdev>
oh
<shevy>
man, my brain is not working..
<shevy>
I am trying to ask why you stopped. :)
p0y [p0y!~p0y@121.97.55.217] has joined #ruby
<wallerdev>
it was taking too much time away from my gf and i started losing motivation to finish it
cousine_ [cousine_!~cousine@196.221.61.52] has joined #ruby
c0rn [c0rn!~c0rn@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
epochwolf [epochwolf!~epochwolf@unaffiliated/epochwolf] has joined #ruby
nari [nari!~nari@raichu.netlab.jp] has joined #ruby
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
nonotza_ [nonotza_!~nonotza@50-57-234-249.static.cloud-ips.com] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
c0rn [c0rn!~c0rn@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
shadoi [shadoi!~Adium@gw.sfo.cloudscaling.com] has joined #ruby
tesmar [tesmar!~tesmar@cpe-024-163-059-067.nc.res.rr.com] has joined #ruby
tdubellz [tdubellz!~tdubellz@freenode/staff/tdubellz] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby
celestius [celestius!~celestius@173-228-44-97.dsl.static.sonic.net] has joined #ruby
esparkman [esparkman!~esparkman@unaffiliated/esparkman] has joined #ruby
[_] [[_]!~snyff@eth3314.nsw.adsl.internode.on.net] has joined #ruby
DeeJayTwo [DeeJayTwo!~deejay2@office.abi.ca] has joined #ruby
<celestius>
how can i get irb to recognize '.' as a word break character? $COMP_WORDBREAKS doesn't do it, nor does Readline.basic_word_break_characters
<banisterfiend>
celestius: what do u mean a word break character
Doppp [Doppp!~Doppp@unaffiliated/doppp] has joined #ruby
<celestius>
when i ctrl+backarrow (or whatever i have bound to backwards-word) it'll stop at '.'
<celestius>
for that matter, why is it that readline inside irb is just a little funny? does it try and attach its own set of keybindings?
<banisterfiend>
celestius: are you on macosx?
<celestius>
i am banisterfiend
aeu [aeu!~aeu@117.193.106.94] has joined #ruby
<banisterfiend>
celestius: then it's probably funny because you're not using Readline
<celestius>
oh
<banisterfiend>
celestius: osx doenst use readline by default
<banisterfiend>
it uses something called EditLine
<celestius>
i see
<celestius>
just inside IRb, or everywhere?
<celestius>
cause .inputrc and $COMP_WORDBREAKS work inside bash
<celestius>
usually, heh
<celestius>
is EditLine a BSD thing?
snyff [snyff!~snyff@eth3314.nsw.adsl.internode.on.net] has quit [#ruby]
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.234.215.47] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
norm [norm!~norm@ip-128-239-142-7.v4.wm.edu] has joined #ruby
tightwork [tightwork!~tightwork@50-57-89-237.static.cloud-ips.com] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has joined #ruby
redgetan [redgetan!~reg@CPE0023bee17c0e-CM0023bee17c0b.cpe.net.cable.rogers.com] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has joined #ruby
djr [djr!~djr@dsl-208-196.madisontelco.com] has quit [#ruby]
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
blueadept [blueadept!~blueadept@72.21.137.199] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.47] has joined #ruby
achiu [achiu!~Adium@rrcs-74-62-252-146.west.biz.rr.com] has joined #ruby
badabim [badabim!~badabim@17.212.166.202] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
badabim_ [badabim_!~badabim@17.245.88.204] has joined #ruby
jay_zawr1tny [jay_zawr1tny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@115.189.232.111] has joined #ruby
TomJ [TomJ!~TomJ@host-78-147-101-223.as13285.net] has joined #ruby
TomJ [TomJ!~TomJ@unaffiliated/tomj] has joined #ruby
noname [noname!~textual@173.240.241.212] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
shakesoda [shakesoda!~shakesoda@reenigne.net] has quit [#ruby]
jesseangell [jesseangell!~jesseange@h35.132.28.71.dynamic.ip.windstream.net] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
gorgapor [gorgapor!~christian@206.169.213.106] has quit [#ruby]
radic_ [radic_!~radic@dslb-094-216-249-149.pools.arcor-ip.net] has joined #ruby
pivotal [pivotal!~pivotal@27.96.106.134] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
<devians>
hey guys, im a ruby newb. how do i get {:blah => value} and {:stuff => foo} and turn it into {:blah => value, :stuff => foo}
<wallerdev>
Hash#merge
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
centipedefarmer [centipedefarmer!~centipede@75-162-51-42.desm.qwest.net] has joined #ruby
josefig [josefig!~josefig@unaffiliated/josefig] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
tesmar [tesmar!~tesmar@cpe-024-163-059-067.nc.res.rr.com] has joined #ruby
d2dchat [d2dchat!~d2dchat@c-98-209-18-197.hsd1.mi.comcast.net] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@205.233.80.139] has joined #ruby
fenix45 [fenix45!~fenix45@CPE0023bee17c0e-CM0023bee17c0b.cpe.net.cable.rogers.com] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
toy_battery [toy_battery!~choldbroo@c-67-181-185-107.hsd1.ca.comcast.net] has joined #ruby
Profit_ [Profit_!~p@c83-254-248-138.bredband.comhem.se] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
jesseangell [jesseangell!~jesseange@h35.132.28.71.dynamic.ip.windstream.net] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
juarlex [juarlex!~juarlex@201.124.160.19] has joined #ruby
Pip [Pip!~Pip@176.214.13.82] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-28-67.dsl.pltn13.pacbell.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
mikeycgto_ [mikeycgto_!~mikeycgto@ool-4571cba8.dyn.optonline.net] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host61-81-dynamic.245-95-r.retail.telecomitalia.it] has joined #ruby
jrodicus [jrodicus!~jrodicus@cpe-66-69-223-9.austin.res.rr.com] has joined #ruby
crazed [crazed!~crazed@unaffiliated/cr4z3d] has joined #ruby
hemanth1 [hemanth1!~^_^@122.178.248.12] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
ovnimancer [ovnimancer!~anton@212.59.96.38] has quit [#ruby]
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@109.53.190.170] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby
dhruvasagar [dhruvasagar!~dhruvasag@65.98.79.137] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
alek_b [alek_b!~alek_b@99-10-120-63.lightspeed.sndgca.sbcglobal.net] has joined #ruby
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
stdcall [stdcall!~scriper@181.208.73.94.ip.orionnet.ru] has joined #ruby
michael_mbp [michael_mbp!~Marin@31.203.206.19] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
tuppy [tuppy!~quassel@ip68-231-151-143.tc.ph.cox.net] has joined #ruby
Locke23rus [Locke23rus!~quassel@188.162.162.83] has joined #ruby
Deesl [Deesl!~bsdboy@unaffiliated/deesl] has joined #ruby
ianvaughan [ianvaughan!~chatzilla@host109-145-182-81.range109-145.btcentralplus.com] has joined #ruby
toy_battery [toy_battery!~choldbroo@c-67-181-185-107.hsd1.ca.comcast.net] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
alx- [alx-!~Alex@108.162.180.72] has joined #ruby
samuel02 [samuel02!~samuel02@c-46-162-87-154.cust.bredband2.com] has joined #ruby
thone [thone!~thone@g225087180.adsl.alicedsl.de] has joined #ruby
nonotza_ [nonotza_!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
zalesz [zalesz!~zalesz@119-057-129.adsl.szeptel.net.pl] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
pradeepto [pradeepto!~quassel@juno.xinh.org] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
lorenzou [lorenzou!~androirc@host-92-29-48-223.as13285.net] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
friskd [friskd!~friskd@cpe-76-172-2-7.socal.res.rr.com] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-205.start.uni-saarland.de] has joined #ruby
ksinkar [ksinkar!~ksinkar@115.242.78.105] has joined #ruby
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@c-67-169-79-114.hsd1.ca.comcast.net] has joined #ruby
batlock666 [batlock666!~quassel@bvderbau.ugent.be] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-wkepuutujckztmls] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-205.start.uni-saarland.de] has joined #ruby
Sliker [Sliker!~ponies@216.66.125.91.rb4.adsl.brightview.com] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
jbpros [jbpros!~jbpros@217-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
hcchien [hcchien!~hcchien@74.117.61.202] has joined #ruby
redgetan [redgetan!~reg@CPE0023bee17c0e-CM0023bee17c0b.cpe.net.cable.rogers.com] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
mvj2111 [mvj2111!~matt@pool-108-54-157-229.nycmny.fios.verizon.net] has joined #ruby
statbot [statbot!~nodebot@ec2-184-72-206-247.compute-1.amazonaws.com] has joined #ruby
Liothen_ [Liothen_!~liothen@24-119-65-28.cpe.cableone.net] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
<Boohbah>
hi, i have a range "aaa".."zzz"
<Boohbah>
how can i return a random object from the range?
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby
samuel02 [samuel02!~samuel02@c-46-162-87-154.cust.bredband2.com] has joined #ruby
tvw [tvw!~tv@e176007197.adsl.alicedsl.de] has joined #ruby
<rippa>
Boohbah: either convert it to array
gianlucadv [gianlucadv!~gianlucad@2.197.146.112] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
<rippa>
or iterate through it and stop on random element
<Boohbah>
thanks rippa, array is probably better for this
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ph^ [ph^!~ph^@79.135.7.162] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<Hanmac1>
Boohbah: range.sample
yxhuvud [yxhuvud!mongo@h-176-10-225-154.na.cust.bahnhof.se] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<rippa>
Hanmac: have you tried it?
<rippa>
sample is Array method
<Hanmac>
hm okay ... i thought it was also in enumerable
michael_mbp [michael_mbp!~Marin@149.147.102.32] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
nd_______ [nd_______!~nd@mnhm-5f74fb3f.pool.mediaWays.net] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@w0109-49-133-8-239.uqwimax.jp] has joined #ruby
Barakas [Barakas!~v@77.242.201.52] has joined #ruby
geaif [geaif!~geaif@xdsl-188-155-129-176.adslplus.ch] has joined #ruby
<Boohbah>
a = ('aaa'..'zzz').to_a
<Boohbah>
puts a[rand(a.length)]
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
Nss [Nss!~nss@host205-220-dynamic.52-79-r.retail.telecomitalia.it] has joined #ruby
kawa_xxx_ [kawa_xxx_!~kawa_xxx@e0109-49-132-249-3.uqwimax.jp] has joined #ruby
<atmosx>
hello
<Boohbah>
hi
<Hanmac>
Boohbah: you can change "a[rand(a.length)]" to "a.sample"
<Boohbah>
yup, looks prettier with sample
<Boohbah>
Hanmac: thanks
<banisterfiend>
Hanmac: i wish you would only speak in german, it doesnt matter if people can understand (they'd be satisfied with the interesting looking symbols)
<Hanmac>
xD
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
snearch [snearch!~snearch@e178056237.adsl.alicedsl.de] has joined #ruby
bastilian [bastilian!~bastilian@chello213047077012.23.11.vie.surfer.at] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
shevy [shevy!~shevy@194-166-29-132.adsl.highway.telekom.at] has joined #ruby
kisp11 [kisp11!~kisp@g231208214.adsl.alicedsl.de] has joined #ruby
robert_ [robert_!~hellspawn@static-96-254-212-18.tampfl.fios.verizon.net] has joined #ruby
robert_ [robert_!~hellspawn@objectx/robert] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
statbot [statbot!~nodebot@ec2-72-44-41-2.compute-1.amazonaws.com] has joined #ruby
kakaskin [kakaskin!~CLDG@87.252.227.117] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
pen [pen!~pen@140.112.30.81] has joined #ruby
pietro__ [pietro__!~pietro@93-32-169-193.ip34.fastwebnet.it] has joined #ruby
josesaldana [josesaldana!~josesalda@186.73.99.124] has joined #ruby
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
cespare [cespare!~cespare@eng.nat.mtv.ooyala.com] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@rna.bio.disco.unimib.it] has joined #ruby
EddieS [EddieS!~ed@212.59.167.161] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
<chilversc_>
what happens to constants that are not defined in a module?
<rippa>
top-level constants
<chilversc_>
ah, that's what they're called
<chilversc_>
thanks
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
<IanV>
hiya, can i ask about stubbing/mocking http requests, i currently use WEBrick::HTTPServer
<IanV>
how can it be done??
_JSilva [_JSilva!~JSilva@109.80.161.20] has joined #ruby
zxiest [zxiest!~zxiest@213.204.77.180] has joined #ruby
fetimo [fetimo!~fetimo@027ba53b.bb.sky.com] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-205.start.uni-saarland.de] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
zxiest [zxiest!~zxiest@213.204.77.180] has joined #ruby
Paladin [Paladin!~paladin@p3m/member/Paladin] has joined #ruby
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
<chilversc_>
so methods arn't considered constants by Module.constants ?
<Hanmac>
nope, because methods are not constants
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
RomD [RomD!~Roman@nrbg-d9322fd4.pool.mediaWays.net] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
aantix [aantix!~jjones@70-36-141-115.dsl.dynamic.sonic.net] has joined #ruby
<chilversc_>
I can't help but think `.find_all {|c| c}` looks a little wrong
banisterfiend [banisterfiend!~baniseter@115.189.117.91] has joined #ruby
bob_f [bob_f!~bob@unaffiliated/bob-f/x-6028553] has joined #ruby
freelanceful [freelanceful!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
<Hanmac>
what are you looking for?
<chilversc_>
items that have a value, the previous line was .map {|c| /^(.+)Handler$/.match(c)} sort of thing
<kapowaz>
are there any known issues with Date and DateTime in ruby 1.9.2 ?
<chilversc_>
so it works, it just looks a little odd to me
<kapowaz>
I'm just mucking around with some stuff in irb and I'm getting very odd dates
KucukMubasir [KucukMubasir!~KucukMuba@unaffiliated/kucukmubasir] has joined #ruby
<kapowaz>
is that just something where it's uninitialised? I had always assumed DateTime.new initialised with the current date and time... maybe that was a wrong assumption...
fixl [fixl!~fixl@124-148-174-130.dyn.iinet.net.au] has joined #ruby
<benj__>
chilversc_, you could use reject { |c| c.nil? } to be a bit more specific
<rippa>
or .compact
<kapowaz>
harumph.
<benj__>
yeah, or that
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
<chilversc_>
these filter chains seem to create quite a few arrays?
UdontKnow [UdontKnow!~evaldo@freenode/staff-emeritus/udontknow] has joined #ruby
kreantos [kreantos!~kreantos@178.115.89.30.wireless.dyn.drei.com] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
pen [pen!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
chiel_ [chiel_!~chiel@kunkels.me] has quit [#ruby]
KucukMubasir [KucukMubasir!~KucukMuba@78.183.237.152] has joined #ruby
KucukMubasir [KucukMubasir!~KucukMuba@unaffiliated/kucukmubasir] has joined #ruby
panterax [panterax!~panterax@31.176.136.17] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatej.mh.bbc.co.uk] has joined #ruby
fermion [fermion!~textual@venkman.brightcove.com] has joined #ruby
raincole_ [raincole_!~raincole@220-134-147-126.HINET-IP.hinet.net] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310883.dip0.t-ipconnect.de] has joined #ruby
razorbak [razorbak!~razorbak@212-198-136-195.rev.numericable.fr] has joined #ruby
cousine [cousine!~cousine@196.221.61.52] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
FND [FND!~FND@p57B398C9.dip.t-dialin.net] has joined #ruby
banister_ [banister_!~baniseter@118.82.185.158] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
banisterfiend [banisterfiend!~baniseter@115.189.117.91] has joined #ruby
banisterfiend [banisterfiend!~baniseter@115.189.117.91] has joined #ruby
Anderslm [Anderslm!~anders@206.84-234-184.customer.lyse.net] has joined #ruby
<Anderslm>
I have a irritating problem when trying to use the PyPi XMLRPC API from Ruby. It works fine from Python, http://wiki.python.org/moin/PyPiXmlRpc . The code i use is: http://pastie.org/3177684 but i get server response 502 Bad Gateway. Do i do something obviuosly wrong?
faber [faber!~faber@ppp-34-25.26-151.libero.it] has joined #ruby
hemanth1 [hemanth1!~^_^@122.178.248.12] has joined #ruby
hemanth2 [hemanth2!~^_^@122.178.248.12] has joined #ruby
KucukMubasir [KucukMubasir!~KucukMuba@78.183.237.152] has joined #ruby
KucukMubasir [KucukMubasir!~KucukMuba@unaffiliated/kucukmubasir] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby
chrismcg [chrismcg!~chrismcg@devilfish.octopod.info] has joined #ruby
amacgregor [amacgregor!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
fcoury [fcoury!u2238@gateway/web/irccloud.com/x-qfmonaxqgrmumwdv] has joined #ruby
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-vjjdquvwomjirblj] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
voodoofish [voodoofish!~voodoowin@adsl-99-146-22-180.dsl.lsan03.sbcglobal.net] has joined #ruby
KucukMubasir [KucukMubasir!~KucukMuba@78.183.237.152] has joined #ruby
KucukMubasir [KucukMubasir!~KucukMuba@unaffiliated/kucukmubasir] has joined #ruby
chrismcg [chrismcg!~chrismcg@devilfish.octopod.info] has joined #ruby
relix [relix!u2146@gateway/web/irccloud.com/x-oyusxamwhwdwioou] has joined #ruby
MetaCosm [MetaCosm!u514@gateway/web/irccloud.com/x-pnhoptmxrsvbgmvt] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@187.106.195.233] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
gregorg [gregorg!~Greg@unaffiliated/gregorg] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
Sliker [Sliker!~ponies@216.66.125.91.rb4.adsl.brightview.com] has joined #ruby
zz_chrismcg [zz_chrismcg!~chrismcg@devilfish.octopod.info] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
Nss_ [Nss_!~nss@host106-244-dynamic.52-79-r.retail.telecomitalia.it] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
ChampS666 [ChampS666!~ChampS@141.32.23.193] has joined #ruby
kakaskin [kakaskin!~CLDG@87.252.227.117] has joined #ruby
Paladin [Paladin!~paladin@p3m/member/Paladin] has joined #ruby
telling [telling!grotta@176.9.244.139] has joined #ruby
telling [telling!grotta@unaffiliated/telling] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
tesmar [tesmar!~tesmar@cpe-024-163-059-067.nc.res.rr.com] has joined #ruby
zxiest [zxiest!~zxiest@213.204.75.211] has joined #ruby
nari [nari!~nari@p86be1c.totrnt01.ap.so-net.ne.jp] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
davidpk [davidpk!~r00t@5e0a2c17.bb.sky.com] has joined #ruby
jrgifford [jrgifford!u3281@ubuntu/member/jrgifford] has joined #ruby
tuxaddicted [tuxaddicted!~tuxaddict@202.60.13.34] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<jrgifford>
Is setup.rb depreciated/gone? I'm asking because the Ubuntu Ruby Packaging guide says I should use setup.rb, and the github repo is a 404 - https://wiki.ubuntu.com/PackagingGuide/Ruby
visof [visof!~visof@unaffiliated/visof] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
<canton7>
ah, the wiki page is. I guess they must have just re-arranged their wiki
<jrgifford>
canton7: the github pages is fine. i'm talking about the actual git repo - its linked as https://github.com/proutils/setup, and i can't find another copy...
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
<canton7>
yeah, odd
<canton7>
no idea I'm afraid
<`brendan>
morning.. happy friday!
mikejw [mikejw!~mike@falcor.vm.bytemark.co.uk] has quit [#ruby]
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@187.106.203.65] has joined #ruby
<visof>
ruby treat parallel assignment using lists , isn't this method cost from the performance ?
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
Spockz [Spockz!~Spockz@131.211.235.66] has joined #ruby
telling [telling!ident42@176.9.244.139] has joined #ruby
cjs226 [cjs226!~cjs226@rrcs-71-40-79-154.sw.biz.rr.com] has joined #ruby
telling [telling!ident42@176.9.244.139] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
tk_ [tk_!~tk@p083005.doubleroute.jp] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
johanhsfy [johanhsfy!~johan@c-887471d5.012-52-6c756e10.cust.bredbandsbolaget.se] has joined #ruby
josesaldana [josesaldana!~josesalda@206.132.224.107] has joined #ruby
iocor_ [iocor_!~textual@79-74-92-170.dynamic.dsl.as9105.com] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
telling [telling!ident42@unaffiliated/telling] has joined #ruby
oponder [oponder!~oponder@i130041.upc-i.chello.nl] has joined #ruby
jankly_ [jankly_!~jankly@c-71-57-99-219.hsd1.in.comcast.net] has joined #ruby
aero- [aero-!~david@pool-173-48-127-244.bstnma.fios.verizon.net] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
luckman212_ [luckman212_!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
Sliker [Sliker!~ponies@87.115.192.81] has joined #ruby
ElitestFX [ElitestFX!~ElitestFX@static-173-48-96-99.bstnma.fios.verizon.net] has joined #ruby
ElitestFX [ElitestFX!~ElitestFX@unaffiliated/elitestfx] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
rippa [rippa!~rippa@93-181-222-22.adsl.yaroslavl.ru] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
Tinuk [Tinuk!~fox@178-26-92-180-dynip.superkabel.de] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
fermion [fermion!~textual@venkman.brightcove.com] has joined #ruby
rushed [rushed!~rushed@99-73-225-9.lightspeed.austtx.sbcglobal.net] has joined #ruby
<Tinuk>
hello all! Anyone having experiences writing a bot for irc in ruby?
<canton7>
Tinuk, most beginners, I suspect
<Tinuk>
I'm afraid so ...
<Tinuk>
I am looking for a proper framework I can use to do some work. Do you have any recommendations?
p0y [p0y!~p0y@121.97.55.217] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
Okasu [Okasu!~okasu@s094127069016.m.truevds.ru] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
<apeiros_>
becom33: I'm here and I help people, but I don't feel like pulling out all relevant information. your question lacks almost all relevant information.
Clooth [Clooth!~Clooth@GZYYYMMCDXCIX.gprs.sl-laajakaista.fi] has joined #ruby
Guaguasi [Guaguasi!~Guest225@173.221.30.30.nw.nuvox.net] has joined #ruby
<Guaguasi>
I have a quick question. Why does (39.66 * 100).to_i = 3965 ?
mark_azevedo [mark_azevedo!~mark_azev@adsl-76-228-82-246.dsl.pltn13.sbcglobal.net] has joined #ruby
<becom33>
alright wai t cant explain this with live example
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
<shevy>
because you use .to_i Guaguasi
<becom33>
I'm getting a <b>Notice</b>: Undefined index: ID in <b>/opt/lampp/htdocs/in/index.php</b> on line <b>2</b><br />
<apeiros_>
Guaguasi: what did you expect and why?
<shevy>
(39.66 * 100).to_f # => 3966.0
<becom33>
so that mean has not been passed as a paramater to the requets
<becom33>
request *
<Guaguasi>
I expect 3966, not 3965
<apeiros_>
Guaguasi: and why?
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<Guaguasi>
I expect 3966 because the int value of 3966.0 is 3966 lol
<apeiros_>
but your result is not 3966.0
<apeiros_>
39.66 * 100 = 3965.9999999999995
<becom33>
umm ??
<apeiros_>
and to_i truncates, 3965.9999999999995 truncated is 3965
<apeiros_>
you probably want round instead of to_i
<Guaguasi>
That was the solution I found, but I find it ridiculous.
<Guaguasi>
I hate floats :c
<rippa>
Guaguasi: use rationals
<shevy>
yeah
<rippa>
or decimals
<shevy>
I am confused as well. but now I learned .to_i truncates
<Guaguasi>
39.66 * 100 returns 3966.0 which is why I thought I was good.. .initially
<becom33>
drizz: that shoudnt be for me . my question was about a get request not passing paramter . which nobody awnserd
<apeiros_>
Guaguasi: use a newer ruby version
<apeiros_>
they're better in that regard
<drizz>
becom33: oh, sorry
<apeiros_>
(displaying floats)
<Guaguasi>
what version should I be using? I tried using 1.9.2-p180
<apeiros_>
if you can't use a newer ruby, use "%.40f" % yourfloat
<apeiros_>
1.9.3
<shevy>
hmm
Araxia_ [Araxia_!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
<Mon_Ouie>
Ruby 1.8 sometimes "truncates" floats when displaying them when 1.9 doesn't
<Mon_Ouie>
e.g. 0.1 + 0.2 is displayed as 0.3 in 1.8.7, and as 0.30000000000000004 in 1.9.3
<apeiros_>
Mon_Ouie: seems it's only in as of 1.9.3
<apeiros_>
I thought it was in 1.9.2 already, but since he uses it and gets 3966.0 displayed…
<shevy>
the 0,00000000000000004 makes me happy
<apeiros_>
basically 1.9.3 compares whether the truncated value would correspond with the same looking float literal. if not, it'll use the long form.
<Guaguasi>
Yeah, I'm install 1.9.3 now to see what's up. I just hate floats.
<apeiros_>
Guaguasi: instead of blindly hating them you'd do better to start understanding them.
<apeiros_>
it's not just a float problem. it's a generic problem with limited precision.
nicoulaj [nicoulaj!~nicoulaj@pas38-5-82-244-59-208.fbx.proxad.net] has joined #ruby
apucacao [apucacao!~apucacao@thelevel.com] has joined #ruby
<Guaguasi>
I guess. When I ran into the issue, I pretty much guess it had to do with the whole floating point math. I had seen it before when a previous developer was storing money values as floats with php/mysql
<csmrfx>
aka what every developer should know about floating point math
<epochwolf|vps>
money with floats is fine, as long as the language you are using doesn't lose precision.
<Guaguasi>
Sometimes it would store $50.00 as 49.9999999999999999999987 or whatever
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
linduxed [linduxed!~linduxed@194-14-0-85.serioustubes.org] has joined #ruby
<Guaguasi>
It's something I need to learn more about regarding its serious uses, but at the moment I'm not doing any heavy math so it's just irritating.
<apeiros_>
money with IEEE 754 floats isn't fine. no matter what language.
justfielding [justfielding!~justfield@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
<apeiros_>
Guaguasi: it's a very basic problem, it's not limited to "heavy math", as can be seen by: 0.1+0.2 == 0.3 # => false
<epochwolf|vps>
apeiros_: doubles :P
Aristata [Aristata!~Adium@adsl-69-209-65-126.dsl.chcgil.ameritech.net] has joined #ruby
<Guaguasi>
I meant that there's not a lot of calculations as well as nothing major
<apeiros_>
epochwolf|vps: they don't change a thing.
<Guaguasi>
but yeah, that is terrible :(
<Guaguasi>
slash annoying
<Aristata>
What do I need to remove %blah and other weird charater formats in a url to get the human readable one
<apeiros_>
it's not terrible. it's expected.
<Aristata>
I forget the library
<apeiros_>
and you're not surprised when it happens in base 10
<Aristata>
CGI or something?
<Aristata>
URI.parse?
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
<apeiros_>
you're just not used to it happening in base 2 (when you look at the number in base 10)
stkowski [stkowski!~stkowski@12.207.16.130] has joined #ruby
<apeiros_>
Aristata: CGI.unescape
<apeiros_>
URI may provide tools too.
<Aristata>
Ahh that's it, thanks!
<apeiros_>
Aristata: ri CGI
<Aristata>
That worked :)
Avi` [Avi`!~mine@unaffiliated/avi/x-8629955] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
eldariof [eldariof!~CLD@81.200.24.56] has joined #ruby
jtrudeau [jtrudeau!~jeff@c-76-127-237-194.hsd1.ma.comcast.net] has joined #ruby
nadirvardar [nadirvardar!~nadirvard@204.235.122.5] has joined #ruby
becom33 [becom33!~becom33@112.135.200.236] has quit [#ruby]
stephenjudkins [stephenjudkins!~stephen@mail.schoolhouseelectric.com] has joined #ruby
aantix [aantix!~jjones@50.0.102.2] has joined #ruby
crankycoder [crankycoder!~crankycod@out-on-149.wireless.telus.com] has joined #ruby
<Guaguasi>
Thanks a lot gentlemen.
<apeiros_>
Guaguasi: wrong, 1.9.3 still truncates.
<apeiros_>
it's just better about handling your expectations.
<apeiros_>
try: "%.40f" % (39.66*100)
SamWhited [SamWhited!~SamWhited@c-71-56-64-198.hsd1.ga.comcast.net] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<Guaguasi>
Yeah, I had done that when you suggested it earlier. I should have added "as much." Regardless, expected or not, it's still pretty annoying at times.
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
raythecat [raythecat!~raythecat@cpe-76-88-24-94.san.res.rr.com] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@122.63.195.24] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@50.0.84.226] has joined #ruby
<Guaguasi>
Back to work, take care!
Tuxist [Tuxist!~quassel@dyndsl-085-016-199-123.ewe-ip-backbone.de] has joined #ruby
nd_____ [nd_____!~nd@mnhm-5f74fb68.pool.mediaWays.net] has joined #ruby
<ReinH>
Guedes: first, NEVER store money using flaots. Second, it is impossible for floating point math to be exact on any language on any computer, ever, period.
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<apeiros_>
ReinH: he's gone. also, all already been said :-)
<ReinH>
wah wah
<rippa>
ReinH: it's possible
<rippa>
if you only use binary fractions
josefig [josefig!~josefig@unaffiliated/josefig] has joined #ruby
<ReinH>
people that don't understand floating points are a particular pet pieve of mine.
<ReinH>
rippa: then it isn't possible
<ReinH>
that's like saying "you can spell any word you want to as long as you only use "f", "u", "c", and "k"
<rippa>
yep
<rippa>
what if you model binary money
josh___ [josh___!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
iamjarvo [iamjarvo!~Adium@pool-71-162-141-130.phlapa.fios.verizon.net] has joined #ruby
<iamjarvo>
is it customary to only have your code 72-80 columns long
<rippa>
(ruby.users + ruby-lang.users).uniq.size
<apeiros_>
iamjarvo: there's a couple of people who do that. I don't.
<iamjarvo>
apeiros_: what do you do?
<apeiros_>
I try to keep it below 120 cols, but even that I surpass in maybe 5 out of 1000 lines
sixpoint8 [sixpoint8!~jaykub@ip68-12-204-131.ok.ok.cox.net] has joined #ruby
sixpoint8 [sixpoint8!~jaykub@ip68-12-204-131.ok.ok.cox.net] has joined #ruby
<iamjarvo>
apeiros_: do you hit enter when you get to that point or does your editor automatically break it at that point and if another dev opens up his editor and doesnt have that wrap option it goes on for however long it is
<apeiros_>
what do I care about the settings of other peoples editors?
<apeiros_>
>80 cols means no newline in the line
zakwilson_ [zakwilson_!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
<apeiros_>
how an editor displays that is an entirely different question. mine has scrollbars.
KucukMubasir [KucukMubasir!~KucukMuba@unaffiliated/kucukmubasir] has joined #ruby
<apeiros_>
though I'd only need those if I go over ~150 cols
<iamjarvo>
apeiros_: im wondering how it works for working with other ppl
<apeiros_>
again, why should I care?
<iamjarvo>
lol
<apeiros_>
any sane editor is perfectly capable of >80 cols
<apeiros_>
and any sane computer can display >80 cols without scrolling
<any-key>
it's still good form, you can have multiple splits
<apeiros_>
so if somebody chooses to use an insane setup, that's *entirely* his problem.
<any-key>
and it's easier to read
<any-key>
it's about readability not technical constraints
<apeiros_>
any-key: yes, readability is the only concern.
<apeiros_>
and I don't think that "keep your col-count below 80" is the golden readability rule.
<any-key>
I've been working through a codebase with giant hashes that take up several hundred columns on a single line
<any-key>
spent most of the day breaking that shit up :(
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<iamjarvo>
soi should just tell my editor when text reaches [my desired length] do a wrap and there shoudl not be a physical break there [me hitting enter]
<any-key>
I just have mine set up to wrap based on my screen size so I make a judgement call regarding when to break things up
<any-key>
it's all personal preference, I'm not super strict about the 80 columns rule
<apeiros_>
iamjarvo: physical break is code. you don't want your editor to change your code…
<apeiros_>
so no, don't let your editor add physical breaks into *any* document that is code. that'll just break stuff.
<any-key>
yepyepyep
<rippa>
I like my code line short and concise
<rippa>
*s
<rippa>
it's easier to scan vertically
bbttxu [bbttxu!~adam@24-178-212-229.static.ftwo.tx.charter.com] has joined #ruby
<iamjarvo>
thanks
<any-key>
I hold down the period key while running unit tests to make it look like they're running faster and not breaking
<any-key>
:(
<apeiros_>
any-key: just replace your test_helper.rb with: "puts "."*1000; exit"
<any-key>
oooh good idea
<apeiros_>
or rather, exit! instead of exit.
eldariof [eldariof!~CLD@81.200.24.56] has joined #ruby
<Mon_Ouie>
Auto-wrapping can still be useful for comments
centipedefarmer [centipedefarmer!~centipede@74-84-107-90.client.mchsi.com] has joined #ruby
jerikl [jerikl!~justin@cpe-76-183-135-152.tx.res.rr.com] has joined #ruby
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
shevy [shevy!~shevy@194-166-29-132.adsl.highway.telekom.at] has joined #ruby
araujo [araujo!~araujo@gentoo/developer/araujo] has joined #ruby
jerikl [jerikl!~justin@cpe-76-183-135-152.tx.res.rr.com] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
cylence [cylence!~cylence@64-71-24-18.static.wiline.com] has joined #ruby
badabim [badabim!~badabim@17.245.90.237] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
tesmar [tesmar!~tesmar@rrcs-70-62-109-131.midsouth.biz.rr.com] has joined #ruby
kamalreddy [kamalreddy!~coder@202.3.77.231] has joined #ruby
<kamalreddy>
hi
<kamalreddy>
i am a noob
<kamalreddy>
just started learning ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
azbarcea__ [azbarcea__!~quassel@79.114.121.33] has joined #ruby
<shevy>
kamalreddy good
theRoUS [theRoUS!KenCoar@nat/redhat/x-cdtpbnupgmgkknyc] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
<kamalreddy>
please recommend me a way to solve installation forums
<kamalreddy>
installation errors i mean
<ReinH>
you will need to be more specific
<kamalreddy>
i was trying to install ruby 1.9.2
<kamalreddy>
however i get this error
<kamalreddy>
1 min
eldariof [eldariof!~CLD@81.200.24.56] has joined #ruby
<shevy>
I always hated why's guide. can't judge about ruby koans, but people recommend it
<otherj>
why did you hate why's guide?
<otherj>
i'm not sure that it was great for teaching, but it was at least entertaining
<davidcelis>
_why's poingant guide is well written and a lot of fun to read
<davidcelis>
but i feel like its too nonsensical to be a useful guide for teaching
<otherj>
agreed
<shevy>
otherj I found it as time-wasting pseudo poetry with colourful pictures
<otherj>
i've been sort of puttering along by modifying other scripts and whatnot
<otherj>
want to actually learn it properly this time
<shevy>
the only time to really learn ruby is to write ruby code/scripts, the sooner the better
jmuniz [jmuniz!~jmuniz@pool-173-77-17-186.nycmny.east.verizon.net] has joined #ruby
<shevy>
oops
<shevy>
the only *way
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-1242322723.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
XniX23 [XniX23!~phyro@we.will.never-be.afraid.org] has joined #ruby
<otherj>
yeah
<otherj>
well i do that
<otherj>
but it's in a hacky way, you know?
<shevy>
yup but you progress and learn more with making mistakes
<XniX23>
if i have a hash table in ruby (h["smth"]) and i add some elements to it... will then everytime i use each get them from first added to last?
<shevy>
*by
<shevy>
otherj for me, my first project was an IRC bot in ruby. second was a text-based game... the latter required getting user input, the former required checking what is said in a channel room against a list of actions
jmuniz [jmuniz!~jmuniz@pool-173-77-17-186.nycmny.east.verizon.net] has joined #ruby
<davidcelis>
XniX23: what
jmuniz [jmuniz!~jmuniz@pool-173-77-17-186.nycmny.east.verizon.net] has joined #ruby
<davidcelis>
XniX23: if you need to maintain order in some way, a hash is not what you want
<otherj>
yeah, i've mostly used it to annoy people on irc
cableray [cableray!~cableray@wl-dhcp181-103.Mines.EDU] has joined #ruby
<rippa>
ruby 1.9 maintains order in a hash
<rippa>
1.8 does not
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
<davidcelis>
I'm trying to think of how that's useful, though
<davidcelis>
It's not like you can call .first or .last or whatever
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<rippa>
you can iterate
<apeiros_>
davidcelis: read a yaml with ruby and write it out again
<apeiros_>
davidcelis: do it in 1.8 and in 1.9
<apeiros_>
since you're a railser, try e.g. with a locales yaml
<davidcelis>
oh shit, you can
<davidcelis>
lolol
<rippa>
davidcelis: also, you can
<rippa>
yeah
<rippa>
it's Enumerable
<apeiros_>
Enumerable#last is O(n), though
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
<rippa>
>ruby
<rippa>
>speed
<apeiros_>
rippa: don't confuse speed with scaling.
<apeiros_>
O notation ain't about speed.
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
SamWhited [SamWhited!~SamWhited@c-71-56-64-198.hsd1.ga.comcast.net] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
<senny>
is there a method on Array which checks if multiple elements are in the array? similar to include? but with x arguments
elementz_webchat [elementz_webchat!5ce17473@gateway/web/freenode/ip.92.225.116.115] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
<senny>
apeiros_: ok, it was more about writing an idiomatic class, which defined include? but for multiple elements. In that case I'm going to change the method name to something different.
<apeiros_>
O(n*m). array intersection scales better. though Array#- is probably easier
<apeiros_>
(ary1-ary2).empty? # -> if true, it means all of ary1's elements are in ary2
<elementz_webchat>
hi all. i am having problems running 'middleman' http://middlemanapp.com on a windows machine. when running 'middleman init myproject' i get the following error: http://pastebin.com/R7sbt1h3
rboyd [rboyd!~rboyd@d3-6.rb3.clm.centurytel.net] has joined #ruby
seb_ [seb_!~seb@lns-bzn-36-82-251-47-4.adsl.proxad.net] has joined #ruby
<apeiros_>
elementz_webchat: sounds like you have to install another gem, which is probably named win32-proce or similar
<apeiros_>
odd that it doesn't list it in its dependencies…
tvw [tvw!~tv@e176007197.adsl.alicedsl.de] has joined #ruby
<Clooth>
bbl drunk.
<elementz_webchat>
apeiros_: really strange this whole gem concept. i always thought its a package management like e.g. apt or rpm, which always check for missing dependencies. this is especially confusing to a newb like me
zastaph [zastaph!zastaph@unaffiliated/zastaph] has joined #ruby
<elementz_webchat>
apeiros_: installing the missing package helped. thx!
<apeiros_>
elementz_webchat: it is.
<davidcelis>
gems usually do install their dependencies.
<apeiros_>
but a gem needs to properly list its dependencies for that to work.
<davidcelis>
if a gem has a dependency that it doesn't install, it means the author needs to l2write a gem
<apeiros_>
rubygems can't magically figure it out on its own (neither can apt or rpm)
<elementz_webchat>
maybe somebody could tell me what the difference is between doing a 'bundle install foo' and a 'gem install foo'
<elementz_webchat>
is bundler just a different tool for packaging applications?
<apeiros_>
bundler builds up on rubygems
<apeiros_>
it is used to create self-contained projects
<apeiros_>
mostly to ease deployment of apps (mostly web-apps)
<elementz_webchat>
ok
fermion [fermion!~textual@pool-108-7-224-176.bstnma.fios.verizon.net] has joined #ruby
manizzle [manizzle!~manizzle@pcp046786pcs.pcv.reshall.calpoly.edu] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.40] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
youdonotexist [youdonotexist!~youdonote@192.206.158.10] has joined #ruby
<Avi`>
uhm, why can't i Date.parse("9/13/2011")
<Avi`>
argumentError: invalid date
eignerchris_ [eignerchris_!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has quit [#ruby]
<Avi`>
but 9/12/2011 works fine
<Avi`>
oh. because it thinks 12 is the month
robyurko_ [robyurko_!~robyurkow@64.254.250.82] has joined #ruby
kpshek [kpshek!~kpshek@159.140.254.100] has joined #ruby
jl_2 [jl_2!~jl_2@184-96-250-167.hlrn.qwest.net] has quit ["Leaving"]
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
Squarepy [Squarepy!~Squarepy@ip82-139-118-42.lijbrandt.net] has joined #ruby
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby
Squarepy [Squarepy!~Squarepy@unaffiliated/squarepy] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<davidcelis>
dd/mm/yyyy
<davidcelis>
oh wait you're in the other channel too
<Avi`>
=)
BrianE [BrianE!~brian@87.112.206.142] has joined #ruby
<Avi`>
I get around.
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
alek_b [alek_b!~alek_b@99-10-120-63.lightspeed.sndgca.sbcglobal.net] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
Nss [Nss!~nss@host197-61-dynamic.41-79-r.retail.telecomitalia.it] has joined #ruby
arex\ [arex\!arex@158.36.150.14] has joined #ruby
jmuniz [jmuniz!~jmuniz@pool-173-77-17-186.nycmny.east.verizon.net] has joined #ruby
<arex\>
I got a NoMemoryError for this: total = @words.values.sum
<arex\>
What can be done?
<apeiros_>
try .each_value.inject(:+)
<arex\>
apeiros_: thanks - will let you know whether it works or not :D (20 min execution time)
<apeiros_>
arex\: depending on what you do - try not to load @words into RAM in the first place