Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has joined #ruby-lang
slaytanic [slaytanic!~slaytanic@host226.190-31-167.telecom.net.ar] has joined #ruby-lang
<vereteran> i have 3 bytes as string (exactly 3, thats not a mistake) and i know there's a big endian number, how do i get it in ruby?
<heftig> vereteran: String#unpack
<vereteran> heftig, yeah, but 1. it has no 3 byte param, 2. it returns some bullshit
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<heftig> so pad it
<vereteran> i've tried. now i have 9035 instead of 224 0o
<heftig> how'd you pad?
<vereteran> string[14..16].prepend("\x00").unpack('N')
<heftig> the string is "\x00\x00\xE0"?
<vereteran> yes
<heftig> "\x00\x00\xE0".prepend("\x00").unpack("N").first # => 224
<heftig> works fine here
<vereteran> than i've misunderstood the standard :(
<vereteran> trying to parse flv header to find out video duration and resolution
<vereteran> thanks for help
<vereteran> went reading it again
leafac [leafac!~leandro@187.64.232.134] has joined #ruby-lang
<rpowell> hey what's the best way to work with vectors in Ruby?
<rpowell> wait, there's a class
<rpowell> silly me
dubellz [dubellz!~tdubellz@freenode/staff/tdubellz] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
<rpowell> hey is there any way to create a vector by giving its magnitude and direction?
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
<rpowell> is this right? Vector[(Math.cos(@direction)*@speed), Math.sin(@direction)*@speed)]
leafac [leafac!~leandro@187.64.232.134] has joined #ruby-lang
<rpowell> hmm that works
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
leafac [leafac!~leafac@187.64.232.134] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
QaDeS_ [QaDeS_!~mklaus@frbg-5d84e604.pool.mediaWays.net] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
<Spooner> rpowell: What game engine are you using?
<rpowell> Gosu
<Spooner> (just curious)
<rpowell> works well
<Spooner> rpowell: There is a #gosu on this server. I use Gosu a lot.
<rpowell> there you go
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
MistyM [MistyM!~MistyM@50.72.70.192] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby-lang
Paoc_ [Paoc_!~paoc@pc-162-161-164-190.cm.vtr.net] has joined #ruby-lang
<hagabaka> is Vector from gosu or ruby?
alexeyKolosov [alexeyKolosov!~quassel@ns1.zbku.ru] has joined #ruby-lang
wwalker [wwalker!~wwalker@208.92.232.27] has quit [#ruby-lang]
slimfit [slimfit!~slimfit@c-98-245-122-231.hsd1.co.comcast.net] has joined #ruby-lang
wimplash [wimplash!~Adium@wireless.sit-co.net] has joined #ruby-lang
wimplash [wimplash!~Adium@wireless.sit-co.net] has quit [#ruby-lang]
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby-lang
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has quit [#ruby-lang]
Fretta [Fretta!~Fretta@ip184-187-186-58.sb.sd.cox.net] has joined #ruby-lang
take_cheeze [take_cheeze!~Adium@pc06224.anc-tv.ne.jp] has joined #ruby-lang
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has joined #ruby-lang
woollyams [woollyams!~woollyams@203-206-165-21.perm.iinet.net.au] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@205-178-60-158.c3-0.snb-ubr1.chi-snb.il.cable.rcn.com] has joined #ruby-lang
<gogo_it> is there a simple command to remove a value from an array? for example, ["one","two", "three"], remove only the value "two" and return ["one,"three"]
<yfeldblum> my_array.delete("one")
fritzek_ [fritzek_!~fritzek@p5DDB6469.dip.t-dialin.net] has joined #ruby-lang
<gogo_it> thanks, I didn't realize it was that easy.
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
gogo_it [gogo_it!~joshuaman@205-178-60-158.c3-0.snb-ubr1.chi-snb.il.cable.rcn.com] has quit [#ruby-lang]
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<shevy> anyone knows when at a new ruby release is planned? a 1.9.4 perhaps?
<shevy> reason I ask is I want to prepare my switch away from 1.8.7 ahead
<rpowell> hey guys, how would I rotate a vector in ruby?
<yfeldblum> switch now to 1.9.3
<rpowell> using the built in Vector class
fowl [fowl!~f0wl@99-117-5-219.lightspeed.stlsmo.sbcglobal.net] has joined #ruby-lang
<flowerpot> rpowell, looks like it doesn't come with a built in rotate method
<rpowell> nevermind, I figured it out
<flowerpot> what is your solution?
<Spooner> flowerpot: I suggested using Gosu helper methods to convert vector into angle/magnitude, rotating and then making it into a point again. Probably easier ways, but apparently you can't multiply a Vector by a rotation Matrix.
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<lianj> flowerpot: depends on the vector size too
<Spooner> It is just 2D positions in a game.
<lianj> just one axis then
alexeyKolosov [alexeyKolosov!~quassel@mail.zbku.ru] has joined #ruby-lang
alexeyKolosov [alexeyKolosov!~quassel@ns1.zbku.ru] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
<curtism> ah
<curtism> wrong window
<shevy> lol
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<flowerpot> Spooner, thanks for the response
<Spooner> flowerpot: And you can multiply Vector by Matrix. Was doing M * V, not V * M, so it wasnt' working :)
<Spooner> Oops.
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
<lianj> you can also put the position vector into a matrix and then multiply it with another. a=Array.new(16, 0); a[-4..-2] = [x=1,y=1,z=1]; p a;
hipe [hipe!~hipe@botnoise.org] has quit [#ruby-lang]
rpowell [rpowell!~rpowell@CPE-60-229-73-52.lns16.ken.bigpond.net.au] has joined #ruby-lang
Sailias_ [Sailias_!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
Sailias__ [Sailias__!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
ovnimancer [ovnimancer!~anton@212.59.96.38] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby-lang
znz_jp [znz_jp!~znz@ns5.n-z.jp] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
Perry81 [Perry81!~Perry@186.87.120.219] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
g0kul [g0kul!~gokulnath@115.111.177.122] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
tallship_ [tallship_!~tallship@pool-71-189-131-153.lsanca.fios.verizon.net] has joined #ruby-lang
slimfit [slimfit!~slimfit@c-98-245-122-231.hsd1.co.comcast.net] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-66-108-59-110.nyc.res.rr.com] has joined #ruby-lang
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
gouthamvel [gouthamvel!~gouthamve@115.111.177.122] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
westernanalog [westernanalog!~westernan@46.156.175.231.tmi.telenormobil.no] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
mikeric_ [mikeric_!~mike@96.49.104.11] has joined #ruby-lang
Luxx_ [Luxx_!~highoh@c-67-171-35-186.hsd1.wa.comcast.net] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-127-105.lsanca.fios.verizon.net] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
butchanton [butchanton!~butchanto@c-71-202-131-177.hsd1.ca.comcast.net] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-58-168-81-129.lns5.ken.bigpond.net.au] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@117.195.101.99] has joined #ruby-lang
g0kul [g0kul!~gokulnath@115.111.177.122] has joined #ruby-lang
gouthamvel [gouthamvel!~gouthamve@115.111.177.122] has joined #ruby-lang
tjadc [tjadc!~quassel@196-215-126-68.dynamic.isadsl.co.za] has joined #ruby-lang
g0kul [g0kul!~gokulnath@115.111.177.122] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
vesan [vesan!vesan@maailmanlopun.modeemi.net] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has quit [#ruby-lang]
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
thone_ [thone_!~thone@g226050063.adsl.alicedsl.de] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@128-70-13-209.broadband.corbina.ru] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-58-168-81-129.lns5.ken.bigpond.net.au] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
Z2FyZA [Z2FyZA!~gard@77.88.123.236] has joined #ruby-lang
tjadc [tjadc!~quassel@41-133-59-28.dsl.mweb.co.za] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host165-130-dynamic.244-95-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
<bnagy> anyone know the internals of Zlib::GzipFile?
<bnagy> I'm trying to use it to read a gz file at a remote location
<bnagy> by faking an object for what should be an IO class, but the reads are only 2048
<bnagy> which is going to be inefficient for the underlying REST reads :/
dc5ala [dc5ala!~dc5ala@stgt-4d0381d4.pool.mediaWays.net] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-58-168-81-129.lns5.ken.bigpond.net.au] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
<vereteran> is there any way to truncate string in-place? string = string[0..N] won't do because my string is at least 50k so i need something operating on the same string
<bnagy> s.slice!(n..-1)
<rippa> n+1
<bnagy> yeah :)
<bnagy> but is it honestly neccessary? I would be surprised
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
zmack [zmack!~zmack@109.99.235.103] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
cyri_ [cyri_!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby-lang
<bnagy> if I change line 64 to use the fake reader it is like 6 times slower on a local file? :S
Tasser [Tasser!~freak@subtle/contributor/Tass] has joined #ruby-lang
<kke> any ideas how to unmock something in rr?
<bnagy> say sorry?
<kke> didn't help
<bnagy> I guess some things are just too cruel to take back
jmcphers [jmcphers!~jmcphers@61.14.141.35] has joined #ruby-lang
<kke> RR.mock.proxy(Maventa2).deliver(:user, :user_confirmation, RR.instance_of(User)).at_least(1) have this and it works for what i added it for, but after that all other tests fail because User is now some test double thing
<kke> so i'd like to unmock it after that scenario somehow
<kke> but i find nothing about removing mockings
hibariya [hibariya!~quassel@www9204u.sakura.ne.jp] has joined #ruby-lang
muzone [muzone!~holla@84-16-208.227.3p.ntebredband.no] has joined #ruby-lang
rpowell [rpowell!~rpowell@58.165.133.33] has joined #ruby-lang
<kke> ah. "proxy and instance_of must be chained with mock or stub", added .mock there and now it seems to be ok
<kke> i have no idea what i'm doing
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
dRbiG [dRbiG!~p@unhallowed.pl] has joined #ruby-lang
scottj [scottj!~scott@206.212.250.58] has joined #ruby-lang
jbwiv [jbwiv!~wellsj@world.timcogso.com] has joined #ruby-lang
jbsan_ [jbsan_!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
kvs [kvs!~kvs@2a02:108:107:2001::1] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has quit ["Leaving"]
NinoScript [NinoScript!~anonymous@pc-48-92-83-200.cm.vtr.net] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
gilbo [gilbo!18128587@gateway/web/freenode/ip.24.18.133.135] has joined #ruby-lang
<gilbo> anyone alive in here? #ruby seems dead
<tobiasvl> sure
<gilbo> do you have any suggestions where I should go with questions about how to install the gtk2 gem?
<gilbo> (dealing with errors while installing, really)
<tobiasvl> no idea, sorry
<tobiasvl> you could paste the error message here
<gilbo> ah, oh well
<tobiasvl> and someone might pick up on it
<gilbo> yeah, might as well
<gilbo> Building native extensions. This could take a while... ERROR: Error installing gtk2: ERROR: Failed to build gem native extension. ... checking for gdk-pixbuf-2.0... yes checking for gdk_pixbuf_set_option() in gdk-pixbuf/gdk-pixbuf.h... no checking for gdk-pixbuf/gdk-pixbuf-io.h... yes creating ruby-gdk-pixbuf2.pc creating Makefile ... rbgdk-pixbuf.c: In function ‘Init_gdk_pixbuf2’: rbgdk-pixbuf.c:731: error: ‘rg_set_option
<gilbo> yuck
<gilbo> that barfed up the formatting
<gilbo> anyway, the errors are from trying to "gem install gtk2" on a mac. gtk+ was already installed using homebrew.
S3kx [S3kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
flak [flak!~splitta@85.158.54.234] has joined #ruby-lang
<gilbo> hrm, maybe it's just that I seem to have ruby 1.8 installed; guess I can try that
shevy [shevy!~shevy@93-82-81-132.adsl.highway.telekom.at] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310D74.dip0.t-ipconnect.de] has joined #ruby-lang
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
<gilbo> g'night
<looopy> http://pastie.org/3281257 how is @html in scope in the html method when it's created in prepare? newb o_O;
<bnagy> @ivars are visible to all instance methods
<shevy> looopy @foo are like global variables but limited to the current class
<bnagy> ...
<looopy> ahh good to know. for some reason i thought those instance variables would be limited to scope...though that makes perfect sense now that i think about rails controllers
<looopy> thanks
<bnagy> instances of the current class :)
jbsan_ [jbsan_!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
rpowell [rpowell!~rpowell@58.165.133.33] has joined #ruby-lang
dreinull [dreinull!~dreieins@217.18.70.225] has joined #ruby-lang
dave_miles [dave_miles!~davemiles@gatek.thls.bbc.co.uk] has joined #ruby-lang
jbsan_ [jbsan_!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
<masterkorp> weird question, is there any ruby intrepeter with an C api ?
freedrull [freedrull!~freedrull@freedrull.xen.prgmr.com] has quit [#ruby-lang]
<bnagy> yes
<bnagy> that definitely IS a weird question
<bnagy> srsly though, what are you trying to do?
mytrile [mytrile!~mytrile@94.26.28.135] has joined #ruby-lang
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
<rue> I'm going to guess embedding.
ksinkar [ksinkar!~ksinkar@117.195.101.99] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@136.216-244-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
antinitro [antinitro!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
jbsan [jbsan!~jbsan@c80-216-213-130.bredband.comhem.se] has joined #ruby-lang
<andrewvos> Finally!
scottj [scottj!~scott@206.212.250.58] has quit [#ruby-lang]
take_cheeze [take_cheeze!~Adium@pc06224.anc-tv.ne.jp] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
gouthamvel [gouthamvel!~gouthamve@115.111.177.122] has joined #ruby-lang
gix [gix!~gix@e180002170.adsl.alicedsl.de] has joined #ruby-lang
<Spooner> If a gem is "universal-darwin" does that mean it is a totally self-contained binary (like an i386-mingw version) could it have any external dependencies?
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
<bnagy> http://pastie.org/3281626, if anyone's awake now
Perry81 [Perry81!~Perry@186.87.120.219] has joined #ruby-lang
<bnagy> running that fake reader against a local file is like 6-10 times slower than using the filehandle directly
<bnagy> any guesses as to why?
<bnagy> is is just String#slice! being mega slow?
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
heftig_ [heftig_!jan@shine.heftig.linuxsecured.net] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<Spooner> bnagy: Why not use a StringIO object to achieve that?
jensn [jensn!~Jens@io.fysik.lu.se] has joined #ruby-lang
<masterkorp> bnagy: well i made this with lua https://github.com/masterkorp/LuaBash :)
dreinull [dreinull!dreieins@217.18.70.225] has joined #ruby-lang
jensn [jensn!~Jens@ip231-160.wireless.lu.se] has joined #ruby-lang
<bnagy> Spooner: yeah that's what I tried first, but it didn't seem to like appending to its underlying buffer
<bnagy> anyway, the real app will be backfilling the buffer via read calls against the AWS API, it's not like I can just make a stringio out of the fh (or there would be no point)
<Spooner> I suspect a bigger issue is that if you read from the file it does an amount of buffering for you, but your buffering in ruby is less efficient.
<bnagy> hm could be that. I'm not sure the speed diff is actually a cause for concern, I'm mainly curious
<bnagy> trouble is the underlying files are like 100MB, and I don't like trying a read which will be an underlying REST call of 100MB binary string
<bnagy> feels fragile and lumpy
<bnagy> masterkorp: and you want to do the same with ruby?
<bnagy> I guess that looks like a challenging and interesting way to waste time :P
<roadkith> manveru: is there a common practice in parser coding for "catch all rules" when i try to parse config files and am only interested in certain parts of it?
KU0N [KU0N!~KU0N@213-193-112-54.static.cablecom.ch] has joined #ruby-lang
<KU0N> hello
<manveru> roadkith: you just need to know exactly when to stop catching
<roadkith> manveru: if you dont know - bad luck?
<manveru> kinda
<KU0N> I have a library that return an enumerator, I'd like to wrap then items in some code.
<KU0N> the*
h4y4shi [h4y4shi!~chatzilla@cpe-173-175-29-12.hot.res.rr.com] has joined #ruby-lang
<manveru> roadkith: stuff like escape sequences in strings are a real pain
<KU0N> Right now, this enumerator items are hashes. And I'd like to create objects.
<roadkith> hrmz
<KU0N> But I want to do this lazily.
<masterkorp> bnagy: heh, i use it extend old bash scripts :D
<manveru> KU0N: hashes are objects
<roadkith> i have a config which seems to change with each release of the firmware
<roadkith> but i'm interested only in certain parts of it
<roadkith> i thought maybe have a catchall rule and just parse the parts i know i'm intersted in
SkramX [SkramX!~SkramX@128.164.95.19] has joined #ruby-lang
<KU0N> manveru: I know that, I mean I want to create another object from the hash and return that
<manveru> KU0N: anyway, can you show your code?
<h4y4shi> Hello I am writing a rpg. Whenever I kill a monster the monster stays dead. I want to be able to randomly encounter each monster more than once. How do I restore my monsters hp after I kill it? Here is my source code http://pastie.org/3281917
<KU0N> manveru: I have none, but I can write an example, 2 sec
<bnagy> hahaha hahaha
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<manveru> h4y4shi: make an array of monsters
<bnagy> best question EVAR
<bnagy> MY MONSTERS STAY DEAD WHEN THEY DIE!
<manveru> when you kill one, remove it and add a new one :)
<manveru> that way you can also avoid the crazy rand code
<h4y4shi> manveru: Okay I will try that thanks
<h4y4shi> bnagy: lol thats funny
<rippa> they won't die even if they are killed
<bnagy> h4y4shi: in general, keep the classes in array, and then instantiate a new one when you encounter them
<bnagy> right now you "create" your whole monster population before the game loop starts
<bnagy> but you can say like case monster when 1 monster=Frog.new
<h4y4shi> bnagy: okay so I shouldnt do the hero = Creature.new etc thing
<bnagy> modulo the code being fugly
<manveru> the hero is alright
<h4y4shi> bnagy: oh wow thank you
<bnagy> check dwemty's array (never thought that would be the most relevant link)
<manveru> :)
<h4y4shi> Thank you both this answers my question =D
<bnagy> h4y4shi: some of that might be too advanced, but it has a lot of good ruby concepts
<bnagy> like the DSL stuff you could probably skip, but the basics are what you want
<h4y4shi> Yeah concepts are needed this is my first program but I keep rewriting it because I keep messing up.
<KU0N> I hope this is a little bit clearer
<bnagy> _why does a lot of work so he can define monsters in shortcut form (called a DSL, Domain Specific Language)
<h4y4shi> Okay so I remember whenever I programmed in c++ I needed a deconstructor.
<h4y4shi> do I need a decontructor in ruby?
<manveru> no
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
<bnagy> also... good to be the hero, monsters never hit back :D
<h4y4shi> Okay just to clarify. Whenever I "Kill" one of my monsters. I dont need to kick it out of my program like I would if I was using a different language?
<h4y4shi> bnagy: lol yeah this hero is brave when these are the odds.
<manveru> h4y4shi: yeah, if you stop referencing it, it will be garbage-collected
<bnagy> the GC is the ultimate hero, it kills everything XD
<h4y4shi> manveru: Thank you =D
<h4y4shi> I will be working on my program thank you guys so much for the help
<bnagy> now I want to write a set of ruby tutorials using only a monster killing rpg as the framework for the examples
<bnagy> :P
<h4y4shi> bnagy: That would have helped me haha
SkramX [SkramX!~SkramX@128.164.95.19] has joined #ruby-lang
roolo [roolo!~roolo@cst-prg-148-17.cust.vodafone.cz] has joined #ruby-lang
<h4y4shi> If you look at the source code in the link. Scroll down to the "case monster" I changed "monster = frog" to "monster = frog = Creature.new("Frog", 1, 10, 2)" and I deleted the part where I created the whole population in the beginning under the hero creation. (I left hero though)
<h4y4shi> Exactly what you said and it works. Thank you so much.
<bnagy> you don't need monster = frog = although it will still work
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
<h4y4shi> so I can delete the = frog part. Interesting
<bnagy> I wish codepad didn't die :(
<bnagy> module the fact that that syntax is broken in 2-3 places I just saw ;)
<bnagy> *modulo
<bnagy> ok I need to cook
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<bnagy> actually it's just crap
<manveru> it's quite rough, but hey :)
<bnagy> I'm so playing with this tomorrow. Pointless code to distract from actual work ftw! :)
<h4y4shi> manveru: thank you I love when people tune up my code. I learn so much from that. I will look this over man! =)
<h4y4shi> bnagy: yeah rpg's are fun to make lol
<bnagy> I like how manveru couldn't help but correct 'you are walking man'
<bnagy> manveru: have you no respect for japanese rpg speek??
<manveru> no
dontbecold_ [dontbecold_!~luke@holly.ghostworksinc.com] has joined #ruby-lang
<bnagy> MAIN POWER TURN ON
<rippa> take off every zig
<manveru> my wife is japanese, i get this all day :P
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<bnagy> dammit, fun as this is I really need to finish dinner :/
tomzx [tomzx!~tomzx@66-77.162.dsl.aei.ca] has joined #ruby-lang
<h4y4shi> Lol I have less than 2 hours to finish my homework for old testament so I will download the code and look over it later. See you guys around the IRC if you are around when I am
<manveru> we're always around :)
<manveru> that's why it's called IRC
<h4y4shi> Sweet well thanks for the help and see you guys later when I log back on
<rippa> I are see
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
jondot [jondot!~jondot@217.65.39.4] has joined #ruby-lang
<jondot> hey guys. anyone want to share what kind of preso tools they use that offer very good aesthetics (i.e. stuff on http://speakerdeck.com) ? (no impress.js)
<jondot> i was thinking about using showoff, but then not sure when i use custom fonts how that'd render to PDF
Locke23rus_ [Locke23rus_!~quassel@128-70-13-168.broadband.corbina.ru] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-115-43.hlrn.qwest.net] has joined #ruby-lang
<shevy> no idea what is preso
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<injekt> presontation?
<shevy> it sounds like italian coffee
<shevy> pronto, preso, prego!
<dontbecold_> presenttion tools, like PowerPoint
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
<injekt> si
<manveru> jondot: you can include fonts in a pdf
<manveru> i use vim for presentations, though :P
<jondot> well, not sure if showoff would include the custom fonts (https://github.com/schacon/showoff)
<manveru> haven't found anything that does syntax highlighting and looks pretty on linux
<manveru> showoff looks neat
<shevy> woff woff?
wallerdev [wallerdev!~wallerdev@c-68-43-58-191.hsd1.mi.comcast.net] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
<jondot> manveru, try showoff, its pretty awesome
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
codewrangler [codewrangler!~codewrang@pool-72-66-12-100.washdc.fios.verizon.net] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
woody2shoes [woody2shoes!~woody2sho@c-71-199-20-47.hsd1.ut.comcast.net] has joined #ruby-lang
Defusal_ [Defusal_!Defusal@unaffiliated/ecnerifed] has joined #ruby-lang
mrneighborly [mrneighborly!~mrneighbo@154.25.119.70.cfl.res.rr.com] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
frem [frem!10R2Ckfu2n@ip108.208-100-5.static.steadfastdns.net] has joined #ruby-lang
<dontbecold_> I have a # symbol in my regexp, so vim thinks the rest of the line is commented out, is there a plugin for vim which fixes this?
<lianj> :syntax off
<erikh> ha
<Tasser> what's the best way for "give me all but the first line"?
<erikh> tail -n _2
<erikh> +2 even
<Tasser> in ruby? ^^
Pip [Pip!~Pip@188.134.46.174] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
<erikh> ri IO.readlines
<Tasser> I did File.open(), file.readline(), file.read()
<Muz> dontbecold_: what version of vim are you using? The default ruby syntax highlighing in whatever ships with OS X 10.6 handles that fine for me
tekin [tekin!~tekin@host109-155-190-117.range109-155.btcentralplus.com] has joined #ruby-lang
<lianj> Muz: true, same here
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
<injekt> Tasser: File.readlines[1..-1]
* injekt runs away
Mon_Ouie [Mon_Ouie!~Mon_Ouie@136.216-244-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
<lianj> injekt: thats too easy
<Tasser> injekt, you forgot the join :-)
<injekt> no i didn't, you didn't say you wanted them joined
<slyphon> son of a bitch
<slyphon> fucking chef
rayners [rayners!~rayners@38.102.22.194] has joined #ruby-lang
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
<slyphon> "your bash script failed, good luck finding it!"
<slyphon> it's like one of Eddie Izzard's evil ducks
<dontbecold_> Muz: 7.3 on Ubuntu
Pip__ [Pip__!~Pip@188.134.46.174] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<imperator> Tasser, keep in mind that's slurpy
<imperator> slyphon, good morning!
<slyphon> imperator: hai!
<imperator> well, if it quacks like an evil duck....
<slyphon> :D
<slyphon> after i had one of my mongodb nodes OOM-killed last night
<slyphon> i'm in a GREAT mood!
<slyphon> (it recovered easily, but still)
<imperator> mongodb is web scale
<slyphon> i'm thinking about using /dev/null
<slyphon> it's web scaler
<Tasser> imperator, slurpy?
<imperator> Tasser, IO.readlines reads everything into memory (unless you specify some optional params)
<imperator> if it scales like a duck...
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
<lianj> each_line.with_index{|line,idx| next if idx == 0; p line } then?
<imperator> slyphon, whatcha using mongodb for, if i may ask?
take_cheeze [take_cheeze!~Adium@pc06224.anc-tv.ne.jp] has joined #ruby-lang
<imperator> lianj, could do that, or just use IO.foreach with an external counter
<slyphon> imperator: y'know, "data"
<slyphon> we went with it instead of mysql/postgres for our store
cjs226 [cjs226!~cjs226@rrcs-71-40-79-154.sw.biz.rr.com] has joined #ruby-lang
<imperator> data? oh, i was thinking squirrels
<slyphon> :)
<Spooner> I'm trying to mock a method, #m, that is provided by an included module, M. If I mock #m on the object, the module's version of #m takes precedence. If I mock on M, it mocks M.m, not M#m. Any thoughts what object I should be mocking?
<imperator> slyphon, last night's incident aside, how are you liking it?
<slyphon> imperator: excellent
<slyphon> we've been running it in one form or another since 1.2
<imperator> nice
<slyphon> with the sharding/replica-set config you can lose a node and the sharding proxy just figures out what it shoudl talk to automatically
tekin [tekin!~tekin@88-96-65-166.dsl.zen.co.uk] has joined #ruby-lang
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
Dotan_ [Dotan_!~jondot@217.65.39.4] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-218-246.dsl.telepac.pt] has joined #ruby-lang
MistyM [MistyM!~MistyM@50.72.70.192] has joined #ruby-lang
* muzone is now playing: http://home.no/mritz/mix3.mp3
<Muz> I'm not sure how that's relevent or of interest.
PythonGirl [PythonGirl!~PythonGir@cpe-66-108-59-110.nyc.res.rr.com] has joined #ruby-lang
rippa [rippa!~rippa@109-161-75-9.pppoe.yaroslavl.ru] has joined #ruby-lang
<muzone> Muz: well clearly u find me interesting enough to steal the first part of my nick
<imperator> muzt we have this fight?
<Muz> My nick was registered almost 5 years before yours was. ;)
dejongge [dejongge!~jonke@pD9E0DFD4.dip0.t-ipconnect.de] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
<muzone> Muz: damn you
<muzone> *evileye with a hint of if-we-was-at-a-party-id-back-you-up-in-a-fight*
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby-lang
csherin [csherin!~csherin@61.17.18.22] has joined #ruby-lang
<Tasser> interessting - didn't know self.class::Foo
voker57__ [voker57__!~voker57@128-70-63-249.broadband.corbina.ru] has joined #ruby-lang
tbuehlmann [tbuehlmann!~tobias@unaffiliated/tovias] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@216.75.117.38] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
znz_jp [znz_jp!~znz@ns5.n-z.jp] has joined #ruby-lang
Pip [Pip!~Pip@188.134.46.174] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310D74.dip0.t-ipconnect.de] has joined #ruby-lang
pkh [pkh!7aacc0e7@gateway/web/freenode/ip.122.172.192.231] has joined #ruby-lang
butchanton [butchanton!~butchanto@64.134.232.12] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@216.75.117.38] has joined #ruby-lang
csherin [csherin!~csherin@61.17.32.43] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby-lang
matti [matti!matti@madwifi/support/matti] has joined #ruby-lang
slimfit [slimfit!~slimfit@50-76-131-66-static.hfc.comcastbusiness.net] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
malev_ [malev_!~malev@190.210.138.237] has joined #ruby-lang
PythonGirl [PythonGirl!~PythonGir@cpe-66-108-59-110.nyc.res.rr.com] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-66-108-59-110.nyc.res.rr.com] has joined #ruby-lang
PythonGirl [PythonGirl!~PythonGir@cpe-66-108-59-110.nyc.res.rr.com] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310D74.dip0.t-ipconnect.de] has joined #ruby-lang
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-218-246.dsl.telepac.pt] has quit [#ruby-lang]
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
nebbie [nebbie!Neb@c-65-96-71-27.hsd1.ma.comcast.net] has joined #ruby-lang
malev [malev!~malev@74.10.95.2] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310D74.dip0.t-ipconnect.de] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
solars [solars!~solars@mk089144206085.a1.net] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
slimfit [slimfit!~slimfit@50-76-131-66-static.hfc.comcastbusiness.net] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
csherin [csherin!~csherin@61.17.32.43] has joined #ruby-lang
empity [empity!~user@149.255.121.162] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-200-50.lsanca.fios.verizon.net] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
bevans [bevans!cd8bc00a@gateway/web/freenode/ip.205.139.192.10] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
fragmachine [fragmachine!~fragmachi@101.169.172.64] has joined #ruby-lang
skipper [skipper!~skipper@pool-108-0-200-142.lsanca.fios.verizon.net] has joined #ruby-lang
vr_mex [vr_mex!~vr_mex@201.103.120.237] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
tekin [tekin!~tekin@host1.manc-digital.ifl.telecomplete.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-200-145.lsanca.fios.verizon.net] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
sairamk [sairamk!~ram@124.123.199.50] has joined #ruby-lang
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
gregmoreno [gregmoreno!~gregmoren@173-13-141-62-sfba.hfc.comcastbusiness.net] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
artOfWar_ [artOfWar_!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
mikeric [mikeric!~mike@96.53.33.22] has joined #ruby-lang
Austin__ [Austin__!~austin@96.45.197.22] has joined #ruby-lang
SteveG [SteveG!~steve@adsl-71-145-139-110.dsl.austtx.sbcglobal.net] has joined #ruby-lang
SteveG [SteveG!~steve@pdpc/supporter/21for7/steveg] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@64.134.64.179] has joined #ruby-lang
jamescotterill [jamescotterill!~james@94-192-130-249.zone6.bethere.co.uk] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
roolo [roolo!~roolo@customer-79-127-150-214.net.angelnet.cz] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
g0bl1n [g0bl1n!~g0bl1n@unaffiliated/g0bl1n] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@S01060014bf8930ea.vc.shawcable.net] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
fullsailor [fullsailor!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
dgs [dgs!~dgs@203-97-51-73.dsl.clear.net.nz] has joined #ruby-lang
csherin [csherin!~csherin@61.17.32.43] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
<zzak> drbrain: ping
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
anjen [anjen!~anjen@99-29-152-246.lightspeed.bcvloh.sbcglobal.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
roolo [roolo!~roolo@113-99-243-80.cust.centrio.cz] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@31.203.74.59] has joined #ruby-lang
a3li [a3li!~alex@gentoo/developer/a3li] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
theoros [theoros!~user@unaffiliated/theoros] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@64.134.64.179] has joined #ruby-lang
bousquet [bousquet!~bousquet@208.180.213.144] has joined #ruby-lang
MistyM [MistyM!~MistyM@50.72.70.192] has joined #ruby-lang
Perry81 [Perry81!~Perry@186.87.120.219] 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
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
hagebake [hagebake!~quassel@unaffiliated/hagabaka] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-200-145.lsanca.fios.verizon.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has quit [#ruby-lang]
Austin__ [Austin__!~austin@96.45.197.22] has quit [#ruby-lang]
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby-lang
fujitaro [fujitaro!~fujitaro@94.162.123.94] has joined #ruby-lang
<fujitaro> hello!
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
enebo [enebo!~enebo@75-168-50-253.mpls.qwest.net] has joined #ruby-lang
<Phrogz> [OT] If you use Nginx as a reverse proxy for your web server, you might be interested in these results for tweaking the gzip compression levels: http://phrogz.net/effects-of-gzip_comp_level-on-html
benanne [benanne!~rijdier@ip-213-49-87-162.dsl.scarlet.be] has joined #ruby-lang
Stalkr_ [Stalkr_!~Stalkr@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
fujitaro [fujitaro!~fujitaro@94.162.123.94] has quit [#ruby-lang]
RomyRomy [RomyRomy!~stickycak@64.134.64.179] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
fragmachine [fragmachine!~fragmachi@101.170.141.157] has joined #ruby-lang
daglees [daglees!~belvedere@91.186.226.125] has joined #ruby-lang
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby-lang
publicvoid [publicvoid!~publicvoi@p4FCAEDC3.dip.t-dialin.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-107-39-118.lsanca.dsl-w.verizon.net] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-107-39-118.lsanca.dsl-w.verizon.net] has joined #ruby-lang
slimfit [slimfit!~slimfit@50-76-131-66-static.hfc.comcastbusiness.net] has joined #ruby-lang
rahult_ [rahult_!~rahult_@ppp240-115.static.internode.on.net] has joined #ruby-lang
outoftime [outoftime!~mat@50.57.10.189] has joined #ruby-lang
g0bl1n [g0bl1n!~g0bl1n@unaffiliated/g0bl1n] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
deryl [deryl!deryl@persephone.darkness-reigns.net] has joined #ruby-lang
<drbrain> ReinH: I wish my Curses::Pad patch had made it into 1.9.3 :/
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-38-27-86.lsanca.dsl-w.verizon.net] has joined #ruby-lang
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
andrewsmith [andrewsmith!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby-lang
<rue> Is it ncursesw-favoured now in .3?
fullsailor [fullsailor!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@203.48.101.90] has joined #ruby-lang
rdavila [rdavila!~rdavila@190.43.31.50] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
<drbrain> in 1.9.3? I don't think there have been any changes to the in-core curses since 1.9 beyond my newpad() patch that didn't make 1.9.3
<drbrain> … changes beyond making it encoding-aware
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby-lang
<zenspider> last 100
<zenspider> stupid pinky
funtime [funtime!~funtime@cpc14-bexl7-2-0-cust135.2-3.cable.virginmedia.com] has joined #ruby-lang
<funtime> hi all,
<zenspider> graph 2.4.1 released
jredville [jredville!~james.dev@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
<rue> Hi one
dRbiG [dRbiG!drbig@unhallowed.pl] has joined #ruby-lang
<funtime> new to ruby but taking my first little steps and am trying to use the xenapi gem but am getting a weird result
<funtime> :in `<main>': uninitialized constant XenAPI (NameError)
<whitequark> require 'xenapi'
<funtime> if anyone could spare the time to help a ruby virgin I would be most greatful
<funtime> first line is require 'xenapi'
<whitequark> can you post your script to pastie.org?
<zenspider> also make sure your script isn't called xenapi.rb...
<wallerdev> did you install the xenapi gem?
<zenspider> that'd be a LoadError then
<funtime> can do better than that as it;s from the web page http://dev.holgerjust.de/projects/xenapi-rb/wiki
<zenspider> what's the name of the file you're working in?
<toretore> is . gone from $: in 1.9?
<zenspider> toretore: yeah... it is
<wallerdev> funtime: you can try adding require "rubygems" to the top of your script
<rue> That'd still be a LoadError
<wallerdev> :(
<zenspider> heh
<funtime> wallerdev, just tried to no avail
<wallerdev> haha
<rue> It's likely the wrong file is getting loaded
<rue> Most commonly it is, like zenspider says, that you're trying to use n.rb, and have named your own file n.rb
omegapunkt [omegapunkt!~textual@60.234.20.206] has joined #ruby-lang
<toretore> zenspider: wouldn't that mean require(File.basename(__FILE__)) == true ?
<drbrain> I always name my experimental scripts 't.rb'
<wallerdev> funtime: so is your script file named xenapi.rb?
<funtime> my script is called listvms.rb
<funtime> listvms.rb:5:in `<main>': uninitialized constant XenAPI (NameError)
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<zenspider> I use blah.rb... anything starting with blah can be deleted without looking inside :)
<zenspider> funtime: it's XenApi
<zenspider> module XenApi #:nodoc:
<funtime> sorry zenspider I must be being thick, could you explain what you mean ?
<zenspider> funtime: ruby is case sensitive. you're uising XenAPI. It's XenApi
<funtime> listvms.rb:5:in `<main>': uninitialized constant XenApi::Session (NameError)
flowerpot [flowerpot!~flower@ec2-50-112-114-252.us-west-2.compute.amazonaws.com] has joined #ruby-lang
<zenspider> funtime: you're going to have to realize that not everything on the internet is true
<funtime> zenspider, trust me I've know that for a good while
<toretore> funtime: how did you install the xenapi lib?
<funtime> gem install xenapi
<zenspider> luckily, you have several options: gem unpack xenapi and look at the impl and/or tests directly (this is a good idea anyways), `gem server` to read the local doco in a webpage, `ri XenApi`... but for that you kinda need to know what to look for
<zenspider> um... actually the tests for xenapi are basicaly nonexistant
<zenspider> amateurs
<zenspider> yeah. they're using jeweler... amateurs :P
<zenspider> funtime: ri XenApi::Client -- most likely
<erikh> you need to publish a "gem wall of shame"
<toretore> funtime: the code you've used seems to be for a newer version which hasn't been released yet
<funtime> luck me :)
<rue> The Cool Wall!
<funtime> brilliant got it :)
<toretore> all direct ports are "seriously uncool"
<funtime> was a mixture of XenApi::Client and not liking the self rolled ssl key on the xen server
fullsailor [fullsailor!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby-lang
funtime [funtime!~funtime@cpc14-bexl7-2-0-cust135.2-3.cable.virginmedia.com] has quit [#ruby-lang]
<rue> Hooray
andremaha [andremaha!~andremaha@dslb-088-078-131-116.pools.arcor-ip.net] has joined #ruby-lang
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby-lang
<RORgasm> hey guys
<RORgasm> anyone around
<rue> Sshhh
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
<RORgasm> i was wondering if there's a way to wrtie this block of code without inject
<wallerdev> RORgasm: you could use Enumerable#reduce
<erikh> reduce is inject
<wallerdev> yeah but i assume he had a problem with the word inject
<erikh> that code makes me cry crocodile tears
fullsailor [fullsailor!~fullsailo@ip24-250-174-76.ga.at.cox.net] has joined #ruby-lang
<wallerdev> for example someone i know has a problem with variables named e
<wallerdev> id imagine you could just use an each loop
<erikh> you'd have to use an accumulator
<wallerdev> yeah you need to keep track of chain yourself
<wallerdev> but you wouldn't need the else statement
<andrewvos> Everyone always comes in here asking how they can do some ruby code in one line.
<rue> That's not an unreasonable way to use #inject
pabs [pabs!~pabs@ip68-98-175-235.dc.dc.cox.net] has joined #ruby-lang
<rue> It could be better to partition the callbacks to begin with, but I dunno the entire context.
<andrewvos> rue: I have decided that you are in fact @shitrubyistssay
<rue> Hm, no
<rue> Although I probably wouldn't admit it if I were.
<chris2> i did someting like that once
<andrewvos> EAXACTLY
<andrewvos> EXACTLY*
<chris2> but i called the lambda immediately
<chris2> that was kinda nice
<erikh> rue: it's just unwieldy
<erikh> doesn't read very well because it's rather complicated.
<erikh> (for inject)
<chris2> i dont get it honestly
<chris2> but i had a few beers
<rue> Mm, I dunno. I actually thought it was more complex initially
<chris2> it cant be that hard
<erikh> it's just chaining callbacks
<chris2> i guess its just stupid
<erikh> and checking for the callbacks before chaining
<chris2> to nest them?
<erikh> yes, to walk them like a list of applications
<erikh> it's just... convoluted code is all I guess
<erikh> dunno.
<chris2> how can you even have them defined as methods
<chris2> and then chain htem in what order"
<chris2> isnt an eachnough really?