<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]
<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
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
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>
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'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
<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
<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
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