<marchelzo>
nungng: the upcase method calls the upcase method
<marchelzo>
so it's recursive
<nungng>
marchelzo: if i get rid of the 4th line i get an error
hahuang61 has quit [Ping timeout: 255 seconds]
<baweaver>
It's kind of a silly method
<baweaver>
considering upcase already does what it's doing
<nungng>
i don't get the code inside of this method
<nungng>
it's supposed to teach me recursion, but all i'm learning is confusion
montanonic has quit [Ping timeout: 240 seconds]
<baweaver>
Well in order to understand recursion
<baweaver>
you must first understand recursion
sepp2k has quit [Quit: Leaving.]
tau has quit [Remote host closed the connection]
mlkkk has joined #ruby
<baweaver>
Anyways, what part is confusing nungng ?
<marchelzo>
i think this is a poor example to learn recursion
<marchelzo>
terrible even
dawidof has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo>
factorial and fibonacci are clichés for good reason
<marchelzo>
there are two different things called upcase here, which is confusing. and like baweaver said it's silly since it's not doing anything useful.
<marchelzo>
and at the very least, the base case should be: return '' if str.length == 0
mlkkk has quit [Remote host closed the connection]
mlkkk has joined #ruby
felltir has quit [Remote host closed the connection]
shinnya has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
User458764 has joined #ruby
esObe has quit [Remote host closed the connection]
kylo_ has quit [Remote host closed the connection]
VladGh has quit [Remote host closed the connection]
esObe has joined #ruby
mdc_ has quit [Remote host closed the connection]
mdc_ has joined #ruby
mlkkk has quit [Ping timeout: 240 seconds]
VladGh has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
esObe has quit [Ping timeout: 255 seconds]
dawidof has joined #ruby
FFrankie has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
FFrankie has quit [Quit: Bye]
cdg has joined #ruby
gloscombe_ has quit [Quit: gloscombe_]
benlieb has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
JeanCarloMachado has joined #ruby
hutch34 has joined #ruby
braincrash has joined #ruby
Derperperd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 268 seconds]
rakm has joined #ruby
kylo_ has joined #ruby
[ohjn] has joined #ruby
JoshS has joined #ruby
axsuul has joined #ruby
User458764 has joined #ruby
rakm has quit [Client Quit]
jcao219 has joined #ruby
gnufied has joined #ruby
dawidof has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elifoster has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<marchelzo>
but why can't batch_aggregator just be a method?
<marchelzo>
and take a block
<jaegerca>
It needs to change often and I'm not sure I would even have a place for it - Really it's just an algorithm that determines how a batch is constructed, which is different in different scenarios
<jaegerca>
It's not really a part of the representation of any instance
jenrzzz has quit [Ping timeout: 240 seconds]
zeroDi has quit [Quit: WeeChat 1.7]
<nungng>
sorry guys i fell asleep
<nungng>
i always shut down for whatever reason at 7 or 8 pm and sleep for a bit
<nungng>
i can't control it :/
<nungng>
the part i think is confusing is return str.upcase if str.length <= 1
<nungng>
str[0].upcase + upcase(str[1..-1])
t-recx has quit [Quit: t-recx]
<nungng>
i particularly don't understand upcasee(str[1..-1])
<nungng>
i get that it's an inclusive range, but i thought that wasn't recursion
<nungng>
i thought it dumped that whole thing in there
EV3RYDAYPR0GRESS has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
EV3RYDAYPR0GRESS has joined #ruby
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
jenrzzz has joined #ruby
tau has joined #ruby
<marchelzo>
nungng: dumped what whole thing in where?
<nungng>
well let's say string = "hello"
<nungng>
string[1..-1] = "ello"
<nungng>
i don't see where recursion is happening
dhollinger has quit [Ping timeout: 255 seconds]
<nungng>
i mean i see the call to the function but isn't that pointless
<elomatreb>
Implementing a recursive upcase function is rather pointless, yes
<nungng>
why not just do str[0].upcase str[1..-1].upcase
<nungng>
why not just do str[0].upcase + str[1..-1].upcase
<nungng>
i forgot the +
dhollinger has joined #ruby
<elomatreb>
Because you wouldn't do anything recursive then, you might as well just call upcase on your original string
LoneHerm_ has quit [Remote host closed the connection]
<nungng>
so recursion means just using the method inside of the method?
Vile` has quit [Ping timeout: 240 seconds]
<elomatreb>
The abstract definition of recursion is solving a problem by transforming it into smaller problems of the same form
<elomatreb>
In programming, this usually means that you have a method that calls itself and changes a variable until a certain fixed simple case is reached
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<nungng>
my other question is how is the variable not reset within each function call?
ur5us has joined #ruby
<elomatreb>
Which one? `str`?
<nungng>
yes the str
<elomatreb>
Since it's a variable local the method, each invocation of the method gets its own set of variables, sometimes called a "Stack Frame
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
arescorpio has joined #ruby
jcao219 has quit [Ping timeout: 268 seconds]
montanonic has joined #ruby
pwnd_nsfw has joined #ruby
versigtig has quit [Quit: This computer has gone to sleep]
<nungng>
when does the stack frame disappear?
VladGh has quit [Ping timeout: 268 seconds]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 255 seconds]
versigtig has joined #ruby
bmurt has joined #ruby
mikecmpbll has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
mikecmpbll has joined #ruby
ElFerna has joined #ruby
User458764 has joined #ruby
[ohjn] has quit [Remote host closed the connection]
VladGh has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
modlin has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
charliesome has joined #ruby
modlin has joined #ruby
axsuul has quit [Quit: Peace]
hahuang61 has quit [Ping timeout: 240 seconds]
gnufied has quit [Ping timeout: 240 seconds]
hinbody has joined #ruby
kylo_ has quit [Remote host closed the connection]
_whitelogger has joined #ruby
mattcampbell has joined #ruby
[D]rammer has joined #ruby
melissacampbell has joined #ruby
User458764 has joined #ruby
[D]rammer has left #ruby [#ruby]
Derperperd has quit [Ping timeout: 240 seconds]
mattcampbell has quit [Quit: mattcampbell]
Derperperd has joined #ruby
melissacampbell has quit [Quit: melissacampbell]
jaegerca has quit [Ping timeout: 240 seconds]
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
saneax is now known as saneax-_-|AFK
tlahtoani has left #ruby [#ruby]
Derperperd has quit [Ping timeout: 260 seconds]
harai has joined #ruby
cagmz_ has joined #ruby
cagmez__ has joined #ruby
cagmez__ has quit [Remote host closed the connection]
cagmz has quit [Ping timeout: 260 seconds]
nungng is now known as incompetentop
enterprisey has quit [Ping timeout: 240 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benno_>
What does this quote mean "ruby is simple from appearnce but very complex from inside, just like our human bodies."?
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
markholmes has quit [Quit: Leaving]
acalycine has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
harai has quit [Read error: Connection reset by peer]
<arup_r>
ha
<arup_r>
where you saw it?
benno_ has left #ruby [#ruby]
harai has joined #ruby
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
rakm has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
Anonymoose2 has joined #ruby
harai has quit [Read error: Connection reset by peer]
nanoz has quit [Ping timeout: 240 seconds]
reverberations has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
User458764 has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
Definity has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
antgel has quit [Ping timeout: 255 seconds]
harai has quit [Ping timeout: 260 seconds]
luckyruby has quit [Quit: Leaving...]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
harai has joined #ruby
stomar has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
Channel6 has quit [Remote host closed the connection]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
arup_r has quit []
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
harai has joined #ruby
braincrash has joined #ruby
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
TheWhip has quit [Ping timeout: 260 seconds]
enterprisey has quit [Quit: Leaving]
harai has joined #ruby
brendan- has joined #ruby
renchan has joined #ruby
MrBusiness has quit [Ping timeout: 245 seconds]
harai has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
harai has joined #ruby
marchelzo has quit [Quit: marchelzo]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
Vile` has quit [Read error: Connection reset by peer]
harai has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
harai has joined #ruby
TheWhip has joined #ruby
benlieb has quit [Client Quit]
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
blackwind_123 has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
harai has quit [Read error: Connection reset by peer]
benlieb has quit [Client Quit]
benlieb has joined #ruby
benlieb has quit [Client Quit]
User458764 has joined #ruby
LoneHerm_ has quit [Ping timeout: 255 seconds]
benlieb has joined #ruby
hutch34 has joined #ruby
benlieb has quit [Client Quit]
Coldblackice has joined #ruby
backer has joined #ruby
Qchmqs has joined #ruby
<acalycine>
I'm looking to search this page, find a certain word and then get the link that the text is pointed towards. Ruby. http://dtlive.com.au/afl/viewgames.php
mlkkk has quit [Remote host closed the connection]
mlkkk has joined #ruby
ledestin has joined #ruby
tildes has joined #ruby
vuoto has quit [Remote host closed the connection]
anisha has joined #ruby
eblip has quit [Quit: WeeChat 1.4]
dasher00 has quit [Remote host closed the connection]
mlkkk has quit []
Gasher^ has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
Gasher has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 260 seconds]
dasher00 has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
agit0 has joined #ruby
TheWhip has joined #ruby
psychicist__ has joined #ruby
psychicist__ has quit [Client Quit]
gnufied has joined #ruby
jose_leeto has joined #ruby
JeanCarloMachado has joined #ruby
sniffer has quit [Remote host closed the connection]
szulak has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
sniffer has joined #ruby
esObe has quit [Remote host closed the connection]
esObe has joined #ruby
esObe has quit [Remote host closed the connection]
modlin has joined #ruby
esObe has joined #ruby
inersha has joined #ruby
dionysus69 has quit [Quit: dionysus69]
jose_leeto has quit [Quit: Leaving.]
gnufied has quit [Ping timeout: 240 seconds]
conta has joined #ruby
<inersha>
Hey everyone, I'm new to Ruby. I've got a function that basically just reverses every two characters of a string, and I want to use it throughout my program. I've re-opened the String class and added this method, so now I can use the method on any string. However, I've heard that this is called "mokey patching" and is a bad idea. What should I do instead?
<inersha>
I really like the ease of doing "string".myreverse
esObe has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
hahuang61 has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
millerti has joined #ruby
Mon_Ouie has joined #ruby
<Papierkorb>
inersha: You're correct in that's a bad idea™, although it's at least not as bad as when random gems do that. You have two options. 1) Have a module, maybe StringUtils, and add it to that. So a call could look like: `StringUtils.myreverse(the_string)`. 2) You could use Refinements, which do monkey patching, but limited to a (so called) lexical scope, like a file. Drawback is that you have to "enable" the refinement in every file you want to use
<Papierkorb>
it.
nicolai86 has quit [Remote host closed the connection]
<Papierkorb>
inersha: Of course, the third option would be just keeping that monkey patch :)
nicolai86 has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
<Papierkorb>
inersha: However, as your program grows, you'll need your reverse method less and less (compared to the whole size), so I'd still go with 1) or 2)
sameerynho has quit [Ping timeout: 268 seconds]
tau has joined #ruby
pwnd_nsfw` has joined #ruby
<inersha>
Papierkorb: Thank you for the thorough reply. I have to admit that I have been most attracted to the idea of typing the function after the string (e.g string.myreverse) as opposed to before (e.g. myreverse(string)). I think that was influencing my reason for monkey patching, as opposed to thinking about the best design for the program, ha.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Robtop__ has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
tomasz_ has joined #ruby
<tomasz_>
hi
pandaant has joined #ruby
sebachowa has quit [Ping timeout: 260 seconds]
pandaant has quit [Remote host closed the connection]
modlin has quit [Quit: Konversation terminated!]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
agit0 has quit [Quit: zzzZZZ….]
minimalism has quit [Quit: minimalism]
agit0 has joined #ruby
sebachowa has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<sebachowa>
Hello
minimalism has joined #ruby
tomasz_ has quit [Quit: Leaving]
jose_leeto has joined #ruby
sniffer has quit [Quit: No Ping reply in 180 seconds.]
User458764 has joined #ruby
stokachu has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
JeanCarloMachado has joined #ruby
inersha has quit [Quit: leaving]
stokachu has joined #ruby
_sfiguser has quit [Remote host closed the connection]
jose_leeto has quit [Quit: Leaving.]
lupine has quit [Ping timeout: 240 seconds]
sniffer has joined #ruby
gloscombe_ has joined #ruby
bkxd has joined #ruby
mrmortondk has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sniffer has quit [Quit: No Ping reply in 180 seconds.]
cibs has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
mitt3ns has joined #ruby
bmurt has joined #ruby
cibs has joined #ruby
pwnd_nsfw has joined #ruby
minimalism has quit [Quit: minimalism]
renchan has quit [Remote host closed the connection]
renchan has joined #ruby
lupine has joined #ruby
agent_white has quit [Ping timeout: 240 seconds]
sniffer has joined #ruby
pilne has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
stokachu has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
griffindy has joined #ruby
stokachu has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
pawnbox has quit [Remote host closed the connection]
DLSteve has joined #ruby
pawnbox has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agit0 has quit [Quit: zzzZZZ….]
User458764 has joined #ruby
sebachowa has quit []
duderonomy has joined #ruby
unshadow has quit [Quit: leaving]
bkxd has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
agit0 has joined #ruby
sepp2k has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
bmurt has joined #ruby
minimalism has quit [Ping timeout: 240 seconds]
najam has joined #ruby
najam has quit [Client Quit]
najam has joined #ruby
najam has left #ruby [#ruby]
najam has joined #ruby
t-recx has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
<Nilium>
<Nilium> Look at it from the POV of the parser, you've got a symbol followed by a block. It doesn't make sense.
<szulak>
hmm, it's starting make sense
<szulak>
so why this code works? 'set :foo, 'bar''
<Papierkorb>
szulak: To add to Nilium, the parser tried to parse it as: set(:probability1{ ... }) This makes sense, that's what you wanted if you did this: `set some_func{ ... }`, which is parsed as `set(some_func{ ... })`
milardovich has joined #ruby
armyriad has quit [Quit: Leaving]
<Papierkorb>
szulak: Why shouldn't it?
<szulak>
I've got a symbol followed by an object 'bar'
<szulak>
and set is method clal
<szulak>
call*
enterprisey has quit [Remote host closed the connection]
<Papierkorb>
No actually you have a symbol, followed by a COMMA, followed by "bar"
<Nilium>
The parser sees that as set(x, y), not set(x { block })
<szulak>
oh
<szulak>
so different 'overload' of set is called
<Nilium>
No, it's just one is valid syntax and the other isn't
<Nilium>
Again, your code isn't even making it to the point of being runnable because it's invalid.
<szulak>
sorry guys for these noobish questions, but I am into ruby since 2-3 days
<Nilium>
You get used to the syntax quirks eventually.
<szulak>
yeah
<szulak>
so basically, 'set :foo, 'bar'' is equal to set(:foo, 'bar'). right?
<Nilium>
Yes.
<szulak>
makes sense
tomasz has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
armyriad has joined #ruby
sameerynho has joined #ruby
<szulak>
so why this does not work? set :probability2, { ... block ... } <- there is comma
<Papierkorb>
Because that's invalid syntax
<szulak>
isn't it the same like set(:probability, { ... }) ?
JeanCarloMachado has joined #ruby
<Nilium>
That's not how blocks work.
<szulak>
alright. I thought that blocks can be passed the same way like variables
<Nilium>
No.
marchelzo has joined #ruby
<Nilium>
This would work: set(:x, &proc { |y| … })
<Papierkorb>
szulak: Surprisingly not in this case. The issue is that ruby has Hashes, which look like this: `{ }` And blocks, which look like this: `{ }` - Both are empty, but in for themself, perfectly valid. So, `foo(){ }` passes a block to foo, while `foo({ })` passes an empty Hash to foo
<Nilium>
That said, you should just do set(:x) { … }
<Nilium>
If you're opposed to parentheses, it's kind of a tough luck situation
<szulak>
alright, understand :)
cschneid_ has quit [Read error: Connection reset by peer]
<Papierkorb>
Note that`foo(){ }` is equivalent to `foo { }`
cschneid_ has joined #ruby
<Nilium>
I think parser does understand if you use do-end blocks but that feels kind of gross to do just to avoid parentheses
DLSteve has quit [Ping timeout: 260 seconds]
spooq has joined #ruby
<Papierkorb>
Yes it does Nilium, because the keywords `do` and `{` are easily distinguishable for the parser
<Nilium>
Yeah.
<Nilium>
*think the parser
<Nilium>
Clearly haven't had enough coffee yet.
DLSteve has joined #ruby
<Papierkorb>
szulak: Another gotcha might be however, that `do .. end` and `{ .. }` blocks behave slightly differently. Consider these: 1) `foo bar { .. }` 2) `foo bar do .. end` Now for 1), the {} block (we say) 'binds stronger' than other there, so it's parsed as `foo(bar{ })`, the block is passed to bar. For 2), the do end block binds less strong than {}, it's parsed as `foo(bar) do end` instead, the block is passed to foo, not bar!
<Papierkorb>
szulak: So, for more complex lines of codes, you can't just change from one to the other, they're slightly different
skweek has joined #ruby
<szulak>
yeah, I see that I will have to get used to these new "things" :)
Channel6 has joined #ruby
<Papierkorb>
Yes, especially at the start ruby requires some mind-bending. But you'll quickly get used to it and wonder how you ever could do without :)
<szulak>
sure :) I've got 7 years of C++ experience, so I am able to understand most of the concepts
<szulak>
but well, it's 3rd day with Ruby :)
<Nilium>
In my case, ruby's just my go-to for things that bash won't do as well, so more string processing than case foo in f*) :;; esac and so on
xen0fon has quit [Quit: xen0fon]
nadir has joined #ruby
versigtig has joined #ruby
tusharmalik has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.6]
hahuang61 has joined #ruby
bkxd has joined #ruby
oryman has joined #ruby
oryman has quit [Remote host closed the connection]
ych has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
ifctj has joined #ruby
raul782 has joined #ruby
conta has joined #ruby
conta has quit [Client Quit]
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
raul782 has quit [Read error: Connection reset by peer]
al2o3-cr_ has quit [Ping timeout: 240 seconds]
psychicist__ has quit [Ping timeout: 268 seconds]
tildes has quit [Ping timeout: 260 seconds]
Chagel has quit [Ping timeout: 260 seconds]
LegenTeri has joined #ruby
wilbert has joined #ruby
User458764 has joined #ruby
negatifze has joined #ruby
ResidentBiscuit has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
nOwz has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
newrubycoder has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
enterprisey has quit [Remote host closed the connection]
agent_white has joined #ruby
versigtig has quit [Quit: This computer has gone to sleep]
mitt3ns has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
test has joined #ruby
test is now known as Guest79154
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
joevandyk has quit [Ping timeout: 240 seconds]
JoshS has quit [Quit: Leaving]
browndawg has joined #ruby
raul782 has joined #ruby
seggy has quit [Ping timeout: 240 seconds]
joevandyk has joined #ruby
seggy has joined #ruby
User458764 has joined #ruby
cibs has quit [Ping timeout: 255 seconds]
cibs has joined #ruby
tau is now known as mumm-ha
Guest79154 has quit [Quit: Page closed]
reverberations has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve_ has joined #ruby
DLSteve has quit [Ping timeout: 240 seconds]
Anonymoose2 has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
TheWhip has quit [Remote host closed the connection]
sepp2k has joined #ruby
samdvr has joined #ruby
samdvr has quit [Client Quit]
br0d1n has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
blackmesa has quit [Ping timeout: 255 seconds]
milardovich has quit [Read error: Connection reset by peer]
br0d1n has left #ruby ["Leaving"]
br0d1n has joined #ruby
vuoto has quit [Remote host closed the connection]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
mumm-ha has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
elifoster has joined #ruby
p1k has quit [Remote host closed the connection]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
Chagel has joined #ruby
xen0fon has joined #ruby
markholmes has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
markholmes has quit [Quit: Leaving]
bkxd has joined #ruby
JeanCarloMachado has joined #ruby
blackmesa has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chagel has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
t-recx has quit [Quit: t-recx]
mhib has joined #ruby
versigtig has joined #ruby
Derperpe1 has quit [Ping timeout: 240 seconds]
szulak has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
ifctj has quit [Read error: Connection reset by peer]
ifctj has joined #ruby
montanonic has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mhib has quit [Quit: Leaving]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
hahuang61 has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
najam_ has joined #ruby
banisterfiend has joined #ruby
najam_ has left #ruby [#ruby]
banisterfiend has quit [Client Quit]
railswebdev has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
versigtig_ has joined #ruby
versigtig has quit [Ping timeout: 260 seconds]
nullfxn has quit [Quit: leaving]
banisterfiend has joined #ruby
eblip has joined #ruby
djellemah_ has joined #ruby
eb0t has quit [Ping timeout: 260 seconds]
agent_white has quit [Read error: Connection reset by peer]
mech_V has quit [Quit: Leaving]
jgnagy has joined #ruby
TheWhip has joined #ruby
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
TheWhip has quit [Ping timeout: 240 seconds]
ins64 has quit [Ping timeout: 268 seconds]
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
agent_white has joined #ruby
ins64 has joined #ruby
raul782 has quit [Remote host closed the connection]
tomasz has quit [Ping timeout: 260 seconds]
harai has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
Chagel has joined #ruby
shwouchk has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ins64 has quit [Read error: Connection reset by peer]
ins64 has joined #ruby
Bob8989 has joined #ruby
tomasz has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
<OMGtechy>
I get NoMethodError: undefined method `user_variables' for #<ABC_build::Context:0x0055c4e255cd30 @user_variables={}>
<OMGtechy>
inside of get_user_variable
<OMGtechy>
Am used to programming, am a noobish as one can get when it comes to Ruby
Channel6 has quit [Quit: Leaving]
<ResidentBiscuit>
Do you need to set attr_reader for that field?
<ResidentBiscuit>
(am also newbish with ruby)
<canton7>
all instance variables are private, always. you can write a method which returns @user_variables (`def user_variables; @user_variables; end`), or you can get ruby to generate one for you (`attr_reader :user_variables`)
djellemah_ has quit [Ping timeout: 268 seconds]
<OMGtechy>
that makes sense, thanks both ! :)
hackninja has joined #ruby
<hackninja>
hello
stomar has quit [Quit: Konversation terminated!]
<OMGtechy>
hackninja, hey :)
<hackninja>
how are you
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
<OMGtechy>
I'm alright thanks. Venturing into the world of Ruby. How're you?
tau has joined #ruby
sameerynho has quit [Quit: WeeChat 1.6]
<hackninja>
I'm fine i just wanted to see what these chats are about. Im also thinking about joining the ruby comunity
<OMGtechy>
Well, I came along minutes ago, and people have been friendly so far. Plus, I know ResidentBiscuit from another channel and he/she's cool for sure ;)
<ResidentBiscuit>
I lurk in many places
Chagel has joined #ruby
<OMGtechy>
StealthBiscuit
<hackninja>
Thanks for the hearty welcome guys. Im going to sleep hope we meet again tomorrow!!
* OMGtechy
waves
<ResidentBiscuit>
I casually ruby for fun. And starting last week, get to ruby for work
hackninja has left #ruby [#ruby]
renchan has quit [Remote host closed the connection]
<OMGtechy>
nice, what sort of stuff are you using it for?
<ResidentBiscuit>
Rails both for fun and work
singalaut has joined #ruby
ifctj has quit [Ping timeout: 240 seconds]
<ResidentBiscuit>
Nice shift from the 30 year old c# apps at work
<OMGtechy>
I feel your pain there :P How're you finding it?
Macrobiotic has joined #ruby
hahuang61 has joined #ruby
<ResidentBiscuit>
Cool so far. Havent done much at work. Just getting a dev environment figured out for my team. Looking through the custom engine we have
<ResidentBiscuit>
Because everything we do needs to be wrapped in a proprietary layer
harai_ has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
harai has quit [Ping timeout: 255 seconds]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
* baweaver
wanders in
<baweaver>
lively today eh?
* OMGtechy
waves at baweaver
<OMGtechy>
ResidentBiscuit, thoughts on the language?
<ResidentBiscuit>
I like it. You can do some cool stuff with it
<baweaver>
We use it mostly for operational tools. Chef, Sensu, and custom ones
hahuang61 has quit [Ping timeout: 240 seconds]
Puffball has quit [Remote host closed the connection]
<baweaver>
Though Rails for bolting APIs onto things.
<OMGtechy>
ResidentBiscuit, indeed, reminds me a lot of Perl (philosophy wise)
<baweaver>
I work on the Playstation team, so pretty much everything they do. I'm on the operational team that sets up most of the infrastructure for it.
blackwind_123 has quit [Ping timeout: 260 seconds]
<OMGtechy>
ah cool, done it for long?
<baweaver>
~2.5 years.
tildes has joined #ruby
<OMGtechy>
well congrats on that. Hope you're enjoying it
versigtig_ has quit [Quit: This computer has gone to sleep]
blackwind_123 has joined #ruby
ins64 has quit [Read error: Connection reset by peer]
tildes has quit [Read error: No route to host]
montanonic has joined #ruby
versigtig_ has joined #ruby
benlieb has quit [Quit: benlieb]
rakm has joined #ruby
<OMGtechy>
am offski, later folks, thanks again
OMGtechy has quit [Quit: Leaving]
tau is now known as \tau
lenwood has quit [Ping timeout: 255 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 240 seconds]
BabyMario has joined #ruby
ResidentBiscuit has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
ryan_notabot has quit [Read error: Connection reset by peer]
sepp2k has quit [Quit: Leaving.]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
\tau has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
versigtig_ has quit [Quit: This computer has gone to sleep]
padi_ has joined #ruby
JoshS has quit [Quit: Leaving]
anisha has quit [Quit: This computer has gone to sleep]
milardovich has joined #ruby
aasmith_ has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
justicefries has joined #ruby
CloCkWeRX has joined #ruby
benlieb has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
<newrubycoder>
can anyone help me with a scoping issue
<Papierkorb>
newrubycoder: So, you're trying to redraw the game visuals after you changed `arr`?
<newrubycoder>
yeah
<Papierkorb>
newrubycoder: In the simplest case, you could put the whole thing (from line 6 till 21) in a `while` loop, which will then redraw the game and ask the user for input, and mutate the game state.
milardovich has quit [Ping timeout: 240 seconds]
<newrubycoder>
thanks i will research it
enterprisey has joined #ruby
<Papierkorb>
newrubycoder: Later you could/should start moving e.g. the drawing logic into its own method (Like `def draw_game(arr) ... end`), and after that, tinker with classes