fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
chadkeck has quit [Remote host closed the connection]
syamajala has quit [Remote host closed the connection]
sneakyness_wk has quit [Quit: bro]
tommyvyo has joined #ruby
specialGuest has quit [Quit: WeeChat 0.3.8]
jenrzzz has joined #ruby
pastjean has joined #ruby
terrellt has quit [Quit: Quit]
ryanRT has quit [Quit: Ex-Chat]
binaryplease has quit [Quit: WeeChat 0.3.8]
ckrailo has quit [Quit: Computer has gone to sleep.]
jso has quit []
Konboi has joined #ruby
benson has quit [Remote host closed the connection]
resure has joined #ruby
haxrbyte has quit [Remote host closed the connection]
pricees has quit [Ping timeout: 246 seconds]
KensoDev has quit [Remote host closed the connection]
brdude has joined #ruby
ezra has joined #ruby
rubious has quit [Quit: Leaving...]
mklappstuhl has joined #ruby
qko has quit [Ping timeout: 244 seconds]
cakehero has joined #ruby
luxurymode has joined #ruby
andrewhl has quit [Remote host closed the connection]
hakunin_ has joined #ruby
qko has joined #ruby
flip_digits has quit [Ping timeout: 260 seconds]
c0rn_ has quit [Ping timeout: 260 seconds]
bricker88 has quit [Quit: Leaving.]
Tomasso has quit [Ping timeout: 260 seconds]
alanp has quit [Ping timeout: 260 seconds]
hakunin has quit [Ping timeout: 260 seconds]
Bira has joined #ruby
c0rn_ has joined #ruby
Seventoe1 has joined #ruby
balki_ has quit [Ping timeout: 260 seconds]
Seventoes has quit [Ping timeout: 260 seconds]
alanp has joined #ruby
malcolmva has quit [Ping timeout: 260 seconds]
balki has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
suppp has left #ruby [#ruby]
ezra has quit [Ping timeout: 276 seconds]
Juul has quit [Ping timeout: 260 seconds]
tomzx_ has joined #ruby
verto is now known as verto|off
justsee is now known as justsee|away
<cmyers> Just submitted pull request here: https://github.com/jruby/jruby/pull/263
<cmyers> travis says it is broken - but travis...looks broken. can't see the failed build or anything
joekarma has joined #ruby
pastjean has quit [Remote host closed the connection]
tdubz has joined #ruby
pastjean has joined #ruby
banisterfiend has joined #ruby
gentz has quit [Ping timeout: 245 seconds]
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
multi_io has quit [Ping timeout: 245 seconds]
Emmanuel_Chanel_ has joined #ruby
gentz has joined #ruby
qko has quit [Ping timeout: 245 seconds]
jhunter has quit [Ping timeout: 245 seconds]
bricker88 has joined #ruby
jhunter has joined #ruby
qko has joined #ruby
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
ken_barber1 has joined #ruby
resure has quit [Remote host closed the connection]
justsee|away is now known as justsee
Tomasso has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
gfontenot has joined #ruby
froy has quit [Quit: kablam!]
multi_io has joined #ruby
nullok has quit [Quit: Lost terminal]
bradhe has joined #ruby
davidcelis has quit [Quit: K-Lined.]
ken_barber has quit [Ping timeout: 260 seconds]
butters has joined #ruby
mmokrysz1 has joined #ruby
Koshian_ has joined #ruby
multi_io_ has joined #ruby
gentz_ has joined #ruby
ben225 has joined #ruby
thomas has quit [Ping timeout: 615 seconds]
malcolmva has joined #ruby
johnb003_ has quit [Ping timeout: 245 seconds]
Koshian has quit [Ping timeout: 245 seconds]
bnagy has joined #ruby
bnagy has quit [Ping timeout: 245 seconds]
gentz has quit [Ping timeout: 245 seconds]
multi_io has quit [Ping timeout: 245 seconds]
beneggett has quit [Ping timeout: 245 seconds]
flexd has quit [Ping timeout: 245 seconds]
manizzle has quit [Ping timeout: 245 seconds]
ben225 is now known as beneggett
cakehero has quit [Quit: Leaving...]
brdude has quit [Quit: brdude]
ggreer has quit [Ping timeout: 245 seconds]
manizzle has joined #ruby
AngryParsley has joined #ruby
brasten has joined #ruby
aantix_ has joined #ruby
aantix_ has quit [Client Quit]
c0rn_ has quit [Quit: Computer has gone to sleep.]
Poapfel has quit [Ping timeout: 245 seconds]
t90666 has quit [Remote host closed the connection]
t3991 has joined #ruby
butters is now known as johnb003_
randomau_ has joined #ruby
gavit has quit [Read error: Connection timed out]
aantix has quit [Ping timeout: 246 seconds]
gavit has joined #ruby
Juul has joined #ruby
Konboi has quit [Remote host closed the connection]
randoma__ has joined #ruby
andrewhl has joined #ruby
mjb2k has joined #ruby
ezra has joined #ruby
jarred has joined #ruby
mmokrysz1 has left #ruby [#ruby]
randomautomator has quit [Ping timeout: 240 seconds]
AngryParsley is now known as ggreer
ggreer has quit [Changing host]
ggreer has joined #ruby
pu22l3r has joined #ruby
chadkeck has joined #ruby
pu22l3r has quit [Remote host closed the connection]
graft has quit [Ping timeout: 244 seconds]
pu22l3r has joined #ruby
randomau_ has quit [Ping timeout: 246 seconds]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
gry has joined #ruby
apeiros_ has joined #ruby
liluo has quit [Remote host closed the connection]
iori has joined #ruby
twoism has quit [Remote host closed the connection]
multi_io_ has quit [Quit: leaving]
pipegeek has quit [Remote host closed the connection]
havenn has joined #ruby
prtksxna_ has joined #ruby
rubious has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
prtksxna has quit [Read error: Connection reset by peer]
apeiros_ has quit [Ping timeout: 248 seconds]
rubious has quit [Client Quit]
pastjean has quit [Read error: Connection reset by peer]
brasten has quit [Read error: Connection reset by peer]
pastjean has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
rburton- has quit [Quit: rburton-]
axl_ has quit [Quit: axl_]
luxurymode has quit [Quit: Computer has gone to sleep.]
andrewhl has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 246 seconds]
chadkeck has quit [Remote host closed the connection]
ezra has quit [Ping timeout: 276 seconds]
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
mxbtty has quit [Quit: Leaving.]
ryanRT has joined #ruby
ryanRT has quit [Read error: Connection reset by peer]
greasegum has joined #ruby
ryanRT has joined #ruby
ryanRT_ has joined #ruby
uris has joined #ruby
pastjean has quit [Remote host closed the connection]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
tomsthumb_ has quit [Quit: Leaving.]
artOfWar has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
iamjarvo has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
dhruvasa1ar has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
andrewhl_ has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
andrewhl has joined #ruby
macmartine has joined #ruby
liluo has joined #ruby
tds has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
Guedes has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
andrewhl_ has quit [Ping timeout: 244 seconds]
randoma__ has quit [Remote host closed the connection]
vitor-br has joined #ruby
drupin has joined #ruby
havenn has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
dross_ has joined #ruby
pygmael has joined #ruby
<drupin> bundle exec rake db:migrate.... gives me No such file or directory - pg_dump -i -s -x -O -f /home/...../git-b12087c/db/structure.sql database-name
dross has quit [Ping timeout: 245 seconds]
drago757 has joined #ruby
brasten has joined #ruby
sepp2k has quit [Remote host closed the connection]
gavit has quit [Read error: Connection timed out]
shadoi has quit [Quit: Leaving.]
gavit has joined #ruby
erichmenge has joined #ruby
banisterfiend has quit [Remote host closed the connection]
williamcotton has quit [Ping timeout: 240 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
seanstickle has quit [Quit: seanstickle]
chylli has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
savage- has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
slyv has quit [Quit: Erm...]
slyv has joined #ruby
adeponte has quit [Ping timeout: 265 seconds]
UNIXgod_ has quit [Quit: leaving]
tomzx_ is now known as tomzx
ryanRT has quit [Quit: Ex-Chat]
Juul has quit [Quit: Leaving]
maxmmurphy has quit [Quit: maxmmurphy]
banisterfiend has joined #ruby
luxurymode has joined #ruby
brasten has quit [Quit: brasten]
jgrevich_ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
gavit has quit [Read error: Connection timed out]
bricker88 has quit [Quit: Leaving.]
gavit has joined #ruby
ken_barber1 has quit [Remote host closed the connection]
ken_barber has joined #ruby
balki has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
td123 has joined #ruby
rburton- has joined #ruby
ken_barber has quit [Ping timeout: 252 seconds]
chichou has quit [Remote host closed the connection]
seoaqua has joined #ruby
chichou has joined #ruby
chichou_ has joined #ruby
chichou_ has quit [Remote host closed the connection]
fbernier has joined #ruby
chichou_ has joined #ruby
seanstickle has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
chichou has quit [Ping timeout: 246 seconds]
subbyyy has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
dross has joined #ruby
chichou_ has quit [Ping timeout: 272 seconds]
brasten has joined #ruby
Chryson has joined #ruby
`brendan has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
dross_ has quit [Ping timeout: 260 seconds]
cid404 has quit [Ping timeout: 260 seconds]
rmc3 has quit [Ping timeout: 260 seconds]
t3991 has quit [Remote host closed the connection]
t66788 has joined #ruby
rmc3 has joined #ruby
tk_ has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jankly has quit [Quit: oh my goodbye!]
luxurymode has quit [Ping timeout: 260 seconds]
chylli` has joined #ruby
cid404 has joined #ruby
radic has quit [Disconnected by services]
chylli has quit [Ping timeout: 244 seconds]
radic_ has joined #ruby
radic_ is now known as radic
alexy_ has joined #ruby
rburton- has quit [Ping timeout: 260 seconds]
brasten has quit [Quit: brasten]
macer1 has joined #ruby
<macer1> hi
<macer1> I need to make tcp socket buffering, any ready solutions?
tomzx has quit [Disconnected by services]
<macer1> perfectly it will be just socket.buffering = 2048
luxurymode has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
rburton- has joined #ruby
dhruvasa1ar has quit [Ping timeout: 252 seconds]
busybox42 has quit [Ping timeout: 240 seconds]
seoaqua has quit [Quit: 离开]
seoaqua has joined #ruby
dhruvasagar has joined #ruby
seanstickle has quit [Quit: seanstickle]
flip_digits has joined #ruby
techsurvivor is now known as tech|survivor
pskosinski has quit [Ping timeout: 252 seconds]
busybox42 has joined #ruby
busybox42 has quit [Client Quit]
busybox42 has joined #ruby
fbernier has quit [Ping timeout: 246 seconds]
Bira has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
tomsthumb_ has joined #ruby
Spooner has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
gavit has quit [Read error: Connection timed out]
apok_ has joined #ruby
t66788 has quit [Remote host closed the connection]
gavit has joined #ruby
t92726 has joined #ruby
vitor-br has quit [Quit: Saindo]
apok_ has quit [Client Quit]
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
treydt has joined #ruby
apok has quit [Ping timeout: 240 seconds]
seoaqua has quit [Quit: 离开]
<treydt> So I was using a ruby guide this morning, and I can't find it again. It went from information about strings, to arrays, then to hash maps.
<treydt> Any idea which one it was?
havenn has joined #ruby
fantazo has joined #ruby
ringotwo_ has quit [Remote host closed the connection]
azm has quit [Ping timeout: 272 seconds]
khakimov has joined #ruby
khakimov has quit [Client Quit]
havenn has quit [Ping timeout: 245 seconds]
seoaqua has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Remote host closed the connection]
Poapfel has joined #ruby
ken_barber has joined #ruby
flexd has joined #ruby
justsee is now known as justsee|away
n_blownapart has joined #ruby
mmokrysz has joined #ruby
mmokrysz has left #ruby [#ruby]
SCommette has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<n_blownapart> http://pastie.org/4525122 -- Hi. I'm wondering why this prog. explaining protected methods uses n as the method name, since the constructor also uses n which I assume stands for number. is it intentionally confusing or am I reading it wrongly? thanks.
jarred has quit [Quit: jarred]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
ken_barber has quit [Ping timeout: 240 seconds]
beneggett has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
gavit has quit [Read error: Connection timed out]
tommyvyo has joined #ruby
igotnolegs has joined #ruby
justinmcp has quit [Remote host closed the connection]
gavit has joined #ruby
wpaulson has joined #ruby
ryanf has joined #ruby
pricees has joined #ruby
axl_ has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
slyv has quit [Quit: Cya!]
<n_blownapart> anyone willing to explain this prog esp. line 11 and also why book author chose to name the method n when the constructor has n as its parameter. thanks: http://pastie.org/4525122
lledet has joined #ruby
adamkittelson has joined #ruby
justinmcp has joined #ruby
axl_ has quit [Quit: axl_]
Banistergalaxy has joined #ruby
fbernier has joined #ruby
d3vic3 has quit [Ping timeout: 240 seconds]
andrewhl has joined #ruby
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
adamkittelson has quit [Read error: Connection reset by peer]
d3vic3 has joined #ruby
adamkittelson has joined #ruby
jorge has joined #ruby
wpaulson has joined #ruby
macer1 has quit [Remote host closed the connection]
aldodelgado has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
baroquebobcat has joined #ruby
ananthakumaran has joined #ruby
pabloh has joined #ruby
evenix has quit [Remote host closed the connection]
<pabloh> is there a way to edit openoffice sreadsheets from ruby?
t92726 has quit [Remote host closed the connection]
<epitron> n_blownapart: that's a weird example. normally, if you want to be able to compare objects, you implement the <=> method, and include comparable
Guedes has quit [Remote host closed the connection]
t19775 has joined #ruby
SCommette has joined #ruby
baroquebobcat has quit [Client Quit]
<n_blownapart> epitron: thanks for answering. the point is the protected method. but this prog. confuses me.
<n_blownapart> epitron: I'm assuming the n in the constructor stands for number, right?
<epitron> n_blownapart: http://pastie.org/4526542
adeponte has joined #ruby
<epitron> i dunno why he'd make that protected. that's pretty predantic :)
<epitron> it's a weird program that has no purpose
baroquebobcat has joined #ruby
<n_blownapart> epitron: it shows how only two objects of the same class can use the protected method among themselves. but could I ask you some things in the context of the example?
<epitron> okay
<epitron> sure, ask away
<n_blownapart> epitron: first, why doesn't he use num in the constructor ie. def initialize(num)
<n_blownapart> epitron: because he uses n as the method name.
<ryanf> n_blownapart: if n and @n are good enough to be the name of the accessor and the instance variable
<ryanf> there's no reason not to name the corresponding constructor param the same thing
<ryanf> in this case it's kind of hard to see that, since n is a horrible name for an attribute
khakimov has joined #ruby
<ryanf> but in real life, it usually makes sense to use the same name for all three of those things
<epitron> yeah.. it would be confusing if it was like: initialize(a_number); @the_number = a_number; end
<epitron> well, that's not so bad
<drupin> bundle exec rake db:migrate.... gives me No such file or directory - pg_dump -i -s -x -O -f /home/...../git-......./db/structure.sql database-name
<n_blownapart> sorry ryanf I don't understand it in those terms. wouldn't it be def n; @num; end ?
<epitron> but regularity and predictability are very useful coding standards
<epitron> the less thinking you have to do, the better :)
<n_blownapart> because n is just a method that holds a numeric value, right? epitron ryanf
<epitron> hmm
<epitron> well, you wouldn't want to do that
<epitron> you should name the accessor after the variable
<epitron> and the standard way of generating that method is: attr_reader :num
<epitron> :)
<n_blownapart> epitron: sorry I don't get it at all then.
k_89 has joined #ruby
<epitron> def num; @num; end
<epitron> it's that regularity thing again
<epitron> attr_reader :num generates the method def num; @num; end
apok has joined #ruby
<epitron> it lets you make getters/setters with less code
<epitron> attr_reader :var1, :var2, :var3, :var4
<n_blownapart> epitron: that I understand. but the way you're explaining this ....sorry you're losing me.
<epitron> haha
<epitron> i don't know why i'm explaining it
<epitron> it's very basic stuff
nari has joined #ruby
<epitron> it's mostly coding style
<epitron> you can name your methods/variables whatever you want
<epitron> but there is wisdom in the ruby style
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<phanousit> how do i make a percentage round to the nearest whole number?
seoaqua has quit [Ping timeout: 245 seconds]
Bosma has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Remote host closed the connection]
seoaqua has joined #ruby
banisterfiend has joined #ruby
tds has joined #ruby
<epitron> phanousit: if you want to do a lot of work with ratios (adding them together, etc.) and then finally finding the percent, i made this: http://rdoc.info/github/epitron/epitools/Ratio
tds has quit [Client Quit]
<phanousit> epitron: thanks
gavit has quit [Read error: Connection timed out]
banisterfiend has quit [Ping timeout: 240 seconds]
<n_blownapart> epitron: hey could we just go over quickly, starting at line 11: if c.n > n ?
<epitron> ok
gavit has joined #ruby
<epitron> what do you want to know?
opus has quit [Quit:]
walbert has quit []
baroquebobcat has quit [Quit: baroquebobcat]
Banistergalaxy has quit [Ping timeout: 245 seconds]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<n_blownapart> thanks epitron the number 101 gets sent as the argument so it is essentially if 100.n > n ?
<epitron> no
baroquebobcat has joined #ruby
<epitron> c is an instance of C
darren has quit [Remote host closed the connection]
<epitron> C has an n method
<epitron> n returns 101
<n_blownapart> epitron: which is initialized in this case with 101.
crise has joined #ruby
<epitron> yes
crise has left #ruby [#ruby]
Banistergalaxy has joined #ruby
<n_blownapart> epitron: thats why I'm confused. n returns 101 , or is the C obj. initialized with 101?
baroquebobcat has quit [Client Quit]
<epitron> n is a method
justinmcp has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<epitron> when you say c.n it calls n on the object c
<epitron> when you say n inside the class, it calls the n method
<epitron> it could also be written: if c.n > self.n
<epitron> the only time n isn't a method is in initialize
jellosea_ has joined #ruby
<jellosea_> hey, if i have an array and i want to iterate through it, and in the iteration block i want to have a list of the array im iterating over except for the current item, how would i do that?
<n_blownapart> epitron: that sheds light, because n is fulfilling the name of the method and the parameter in the constructor. I've never seen this (I'm a noob to programming.)
verbad has joined #ruby
<epitron> n_blownapart: do you know what scopes are?
t19775 has quit [Remote host closed the connection]
t43360 has joined #ruby
<epitron> jellosea_: array.each{|e| array-[e] }
<n_blownapart> yeah epitron self changes as the program progresses.
baroquebobcat has joined #ruby
<lledet> hi, i want to provide a download link that hides the original link (not not my server) is there a way to send the file without revealing the actual link?
<epitron> n_blownapart: no, scope means "what you can see from this line of code"
<jellosea_> epitron: thanks!
<epitron> n_blownapart: say, i have a method: def scopey; x = 5; end...
<epitron> x is only visible from within scopey
<epitron> that's scope's "scope"
<epitron> *scopey
<n_blownapart> epitron: right, so n is moving around and taking on various capacities, but its really just either 100 or 101.
<epitron> agh
<epitron> no, it's not moving
<epitron> it's like a chain of lookups
<epitron> if you say "n > 1".. it has to find what n is
<epitron> first it checks local variables
<n_blownapart> epitron: right. I see that
<epitron> local variables are variables defined inside the current method
<n_blownapart> right epitron
<epitron> then it assumes you were calling a method, so it checks methods in the class you're in
<epitron> then if it still doesn't find it, it looks for methods in the superclass
<epitron> and keeps doing that until it gets to the mother of all classes, Object
adamkittelson has quit [Remote host closed the connection]
GMFlash has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<epitron> so, it's all clear now? :)
tech|survivor is now known as techsurvivor
<n_blownapart> ok. yeah epitron I was working with super , etc. and method_missing. but this is the thing: if you were to rewrite this exact prog. with different var. names and parameters, would you have better choices?
mrdodo has joined #ruby
<epitron> would i choose different names?
<n_blownapart> its the nomenclature that is confusing me, I think. yeah choose different ones epitron?
<epitron> hahah
<epitron> i still don't get what's confusing you
<epitron> the names don't matter here beacuse this class has no purpose
<epitron> it's just a demo of how to use proteted
<epitron> n is a fine name for a class with no meaning
<epitron> s/for/in/
<n_blownapart> the fact that the method name and the parameter name in the constructor are shared. that's funny
<n_blownapart> epitron: ^
<epitron> imagine it meant something
<epitron> say the variable was "address"
<epitron> write the class both ways
<epitron> with the same name, and with different names
<Banistergalaxy> Epitron is a friendly kind of bloke, youre lucky to have his attention
<epitron> and notice that the different names start to get confusing
<n_blownapart> epitron: well I thought num was more descriptive.
<Banistergalaxy> A man you can trust.
<epitron> num is more descriptive
<epitron> but you should make everything num then!
<n_blownapart> def n; @num; end right, epitron?
verbad has quit []
<epitron> def num; @num
<epitron> why would you call the same thing two different things??
<epitron> def name; @person_name; end
<epitron> def intitialize(name_of_person; @name = name_of_person; end
<n_blownapart> epitron: but one is the method name, the other is the instance var. holding numeric values...
<epitron> so?
<epitron> the method returns the variable
<epitron> it means the same thing as the variable
<epitron> @n and n return the exact same thing
<epitron> it's THE SAME THING
<epitron> call it the SAME THING :)
andrewhl has quit [Remote host closed the connection]
MarioEIU has joined #ruby
gavit has quit [Read error: Connection timed out]
seoaqua has quit [Ping timeout: 265 seconds]
gavit has joined #ruby
<n_blownapart> epitron: ok. I just thought this made more sense: def initialize(num); @num = num; end; def n; @num; end
<epitron> so close
<epitron> def num; @num; end
randomautomator has joined #ruby
<epitron> now it makes the most sense
<epitron> (aside from the fact that the entire class is just a container for a number, which is pointless)
<epitron> :)
<n_blownapart> epitron: so don't use num and n, to discriminate between the param and the method name. Ok, I'm going to try to grok that.
<n_blownapart> epitron: many thanks.
<epitron> here's all you have to grok: they are THE SAME THING :)
justinmcp has joined #ruby
<epitron> if it was a person, you'd call them both person
<epitron> it would be weird to call one p and the other person
hemanth has joined #ruby
<epitron> anyhow, you will grok it as you code more
<n_blownapart> epitron: but method name describes a function. @num holds a value. that's what I thought was protocol, anyway.
insecurlex has joined #ruby
<n_blownapart> epitron: thanks I really appreciate the patience of people in this irc
pricees has quit [Ping timeout: 272 seconds]
<epitron> >_<
uris has quit [Quit: leaving]
cakehero has quit [Quit: Leaving...]
<n_blownapart> epitron: sometimes I think the examples are poor when single letters are used...there's no context to grasp ideas and it seems unnecessarily abstract.
mikepack has quit [Remote host closed the connection]
<epitron> YOU ARE CORRECT SIR
Michael has joined #ruby
Michael is now known as meskyanichi
diegoviola has joined #ruby
emmanuelux has quit [Ping timeout: 268 seconds]
t43360 has quit [Remote host closed the connection]
mmokrysz has joined #ruby
t47835 has joined #ruby
mmokrysz has left #ruby [#ruby]
<n_blownapart> epitron: yeah, when you said that the prog was just a container for a number it was helpful...I thought more was going on.
<phanousit> hey can someone help me with me code? i need it to stop looping all the way to the top.
Dreamer3 has quit [Quit: Leaving...]
diegoviola has quit [Client Quit]
xclite_ has joined #ruby
xclite_ has quit [Client Quit]
ken_barber has joined #ruby
<epitron> phanousit: needs more objects
aldodelgado has quit [Quit: aldodelgado]
<phanousit> epitron: sorry?
<epitron> needs more classes
butblack is now known as change
change is now known as butblackIhaveama
butblackIhaveama is now known as bbihavembpretina
<phanousit> epitron: hey i've read his other one, is this a new version?
<epitron> nothing is new :)
<epitron> _why is long gone
<epitron> there's only old, and really old
pu22l3r_ has joined #ruby
sailias has joined #ruby
gavit has quit [Read error: Connection timed out]
iamlacroix has joined #ruby
bbihavembpretina is now known as butblack
gavit has joined #ruby
Inoperable has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
<epitron> phanousit: if you want to make the game more fun, you can add extra parameters to weapon
<epitron> weapon 2, "soft pillow"
<phanousit> epitron: thanks, thats my goal
<epitron> weapon 7, "extension cord"
pu22l3r has quit [Ping timeout: 246 seconds]
<epitron> weapon 172375, "the gaze of god"
justsee|away is now known as justsee
<phanousit> epitron: how long have you been doing ruby?
<epitron> since 2005
azm has joined #ruby
<phanousit> nice
pu22l3r_ has quit [Ping timeout: 260 seconds]
`brendan has quit [Ping timeout: 240 seconds]
<phanousit> I'm trying to make this game so that i can get an internship
ringotwo has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<epitron> ah
t47835 has quit [Remote host closed the connection]
<epitron> well, good luck on that
t9637 has joined #ruby
trollface is now known as Paradox
<epitron> here's another possibility: instead of only putting an attack command on the main character, you can put it on all enemies
<epitron> so enemies can attack each other
<epitron> every attack is followed by a counter-attack
baroquebobcat has joined #ruby
butblack has left #ruby [#ruby]
dhruvasagar has quit [Ping timeout: 246 seconds]
<epitron> haha.. actually.. you could have every fight carried out completely with one command
khakimov has quit [Quit: Computer has gone to sleep.]
<epitron> def fight(other); self.attack(other); other.fight(self); end
<epitron> that would loop forever, until one of them died
<phanousit> can you explain what self does?
<epitron> ugh
<epitron> read about it
<phanousit> ok
Banistergalaxy has quit [Ping timeout: 268 seconds]
<phanousit> say, i want to attach attributes to the hero character
<phanousit> should i put them a hash?
<phanousit> like :hp, :attack etc....
dhruvasagar has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Rajesh has joined #ruby
Rajesh is now known as Guest1496
aldodelgado has joined #ruby
<pabloh> does anybody know how to modify openoffice sreadsheets from ruby?
MarioEIU has quit [Quit: Leaving]
yasushi has joined #ruby
Guest1496 has quit [Max SendQ exceeded]
<epitron> phanousit: n_blownapart already completely depleted me of patience for noob questions.. you're going to have to answer this on your own. i recommend reading that article, which has a good system.
<phanousit> yeah i see
<phanousit> thanks a lot
yakko has joined #ruby
Guest1496 has joined #ruby
burgestrand has quit [Quit: Leaving.]
<n_blownapart> epitron please forego it next time.
qko has quit [Ping timeout: 240 seconds]
phanousit is now known as siameseguy
pv_ has joined #ruby
kenneth has quit [Quit: kenneth]
seoaqua has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
qko has joined #ruby
nari has quit [Read error: Connection reset by peer]
mxbtty has joined #ruby
randomautomator has quit [Remote host closed the connection]
krz has quit [Quit: krz]
greasegum has quit [Ping timeout: 246 seconds]
Araxia has joined #ruby
mohits has joined #ruby
t9637 has quit [Remote host closed the connection]
t75826 has joined #ruby
kuzushi has joined #ruby
Z_Mass has joined #ruby
pu22l3r has joined #ruby
<treydt> Kay.
<treydt> I just saw class Something < SomethingElse::SomethingElse
<treydt> ...Class X < Y::Z
<treydt> What's the <?
<ryanf> inheritance
<bnagy> inheritance
<ryanf> bnagy: o/
<bnagy> ryanf: fu, get a name with a different length :D
<treydt> I'm going to say something terrible here, but bear with me - inheriting a class within a class?
graspee has quit [Quit: leaving]
<ryanf> Y could also be a module
<bnagy> no Y::Z is just precise
<ryanf> yes, for some definition of "within"
pu22l3r has quit [Remote host closed the connection]
<bnagy> Y plays no part in the proceedings, it's just part of the namespace that gets you to Z
pu22l3r has joined #ruby
<ryanf> yes
<ryanf> Z does happen to be inside Y though
kenneth has joined #ruby
<epitron> treydt: think of it like directories... you have have a directory that contains other directories
kenneth has quit [Client Quit]
<epitron> classes can contain other classes
<treydt> What could the definition of Y look like?
<epitron> class Y
<epitron> end
<epitron> end
<epitron> class Z
<treydt> Got it. Mucho gracias.
<epitron> no problemo
Banistergalaxy has joined #ruby
pv_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
alexy_ has left #ruby ["Leaving"]
yaymukund has quit [Ping timeout: 272 seconds]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
SCommette has quit [Quit: SCommette]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
n_blownapart has quit [Remote host closed the connection]
yakko has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
azm has quit [Ping timeout: 244 seconds]
<ryanf> epitron: that was four lines!!!!!!
<ryanf> four is > 3
<ryanf> you're a monster
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
centipedefarmer has joined #ruby
<epitron> }8]
aldodelgado has quit [Quit: aldodelgado]
fbernier has quit [Ping timeout: 260 seconds]
<bnagy> &....@ DEMOGORGON, RUN!!
<heftig> i hit him with my cockatrice
yakko has joined #ruby
ken_barber has quit [Remote host closed the connection]
Chryson has quit [Quit: Leaving]
lledet has quit [Quit: lledet]
centipedefarmer has quit [Quit: This computer has gone to sleep]
yasushi has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
mrdodo has quit [Remote host closed the connection]
burgestrand has joined #ruby
jarred has joined #ruby
SCommette has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
v0n has joined #ruby
noyb has joined #ruby
indian has quit [Read error: Operation timed out]
gtuckerkellogg has joined #ruby
indian has joined #ruby
Tref has joined #ruby
Progster has joined #ruby
yakko has quit [Quit: No Ping reply in 180 seconds.]
yakko has joined #ruby
mrdodo has joined #ruby
mrdodo has quit [Remote host closed the connection]
invsblduck has quit [Read error: Connection reset by peer]
mrdodo has joined #ruby
Guest1496 has quit [Quit: Leaving to Quit]
Banistergalaxy has quit [Ping timeout: 268 seconds]
mmokrysz has joined #ruby
hemanth has quit [Ping timeout: 240 seconds]
krz has joined #ruby
mrdodo has quit [Ping timeout: 244 seconds]
jorge has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 245 seconds]
QKO_ has joined #ruby
tonini has joined #ruby
Tref has quit [Quit: Tref]
yaymukund has joined #ruby
treydt has quit [Quit: If at first you don't succeed, skydiving is not for you]
yxhuvud has joined #ruby
mmokrysz has left #ruby [#ruby]
qko has quit [Ping timeout: 260 seconds]
joekarma has quit [Quit: joekarma]
gavit has quit [Read error: Connection timed out]
gokul has joined #ruby
gavit has joined #ruby
n_blownapart has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
ryanf has joined #ruby
dhruvasagar has joined #ruby
brdude has joined #ruby
apeiros_ has joined #ruby
vectorshelve has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mxbtty has quit [Ping timeout: 252 seconds]
mxbtty has joined #ruby
subbyyy has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
jenrzzz has joined #ruby
answer_42 has joined #ruby
subbyyy has left #ruby [#ruby]
ph^ has joined #ruby
musl has quit [Quit: WeeChat 0.3.9-dev]
musl has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
pskosinski has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
a_a_g has joined #ruby
yakko has quit [Quit: No Ping reply in 180 seconds.]
yakko has joined #ruby
n_blownapart has quit [Remote host closed the connection]
lepht has quit [Quit: ZNC - http://znc.sourceforge.net]
lepht has joined #ruby
SCommette has quit [Quit: SCommette]
t75826 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
t63033 has joined #ruby
brdude has quit [Quit: brdude]
mike4_ has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 244 seconds]
Progster has quit [Ping timeout: 245 seconds]
djdb has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
strnx has quit [Excess Flood]
d3vic3 has quit [Ping timeout: 244 seconds]
xnm has joined #ruby
arkiver has joined #ruby
d3vic3 has joined #ruby
brdude has joined #ruby
Pupuser has joined #ruby
vitor-br has joined #ruby
strnx has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
<vectorshelve> Hello
knirhs has joined #ruby
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
tommyvyo has joined #ruby
MarGarina has joined #ruby
Shrink has quit [Ping timeout: 272 seconds]
elhu has joined #ruby
sirecote_ has joined #ruby
<bnagy> vectorshelve! Where have you been?? We missed you!
timonv has joined #ruby
lepht has quit [Quit: ZNC - http://znc.sourceforge.net]
davidcelis has joined #ruby
pabloh has quit [Read error: Connection reset by peer]
gavit has quit [Read error: Connection timed out]
Inoperable has quit [Remote host closed the connection]
gavit has joined #ruby
dr_Poggs has quit [Quit: Goodbye]