baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
bkxd has quit [Ping timeout: 260 seconds]
axsuul has quit [Ping timeout: 240 seconds]
nertzy has quit [Ping timeout: 240 seconds]
jdm has joined #ruby
LoneHerm_ has joined #ruby
ifctj has quit [Ping timeout: 260 seconds]
Lord_of_Life has quit [Excess Flood]
braincrash has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #ruby
enterprisey has joined #ruby
bkxd has joined #ruby
User458764 has joined #ruby
mdc_ has quit [Ping timeout: 260 seconds]
wilbert has quit [Ping timeout: 260 seconds]
mdc_ has joined #ruby
hahuang61 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nungng has joined #ruby
<nungng> how is this recursion? https://repl.it/FoxO/0
<nungng> i thought it was iteration
marr has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<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…]
bkxd has joined #ruby
saneax-_-|AFK is now known as saneax
elifoster has joined #ruby
jaegerca has joined #ruby
<jaegerca> Can anyone recommend to me a better approach to something like this?: https://gist.github.com/caJaeger/7083a464d78b85e8569b9ad4bcbefc17 I am not able to yield from a lambda and don't really know the best way to proceed here.
JeanCarloMachado has joined #ruby
djbkd_ has joined #ruby
<marchelzo> jaegerca: hi
<jaegerca> marchelzo: Hello!
djbkd has quit [Ping timeout: 240 seconds]
<marchelzo> jaegerca: i don't know ruby
<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
<nungng> i'm reading this right now and it's sort of making sense but i wish i knew a resource where i can solve exercises recursively: http://stackoverflow.com/questions/3021/what-is-recursion-and-when-should-i-use-it
<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…]
cagmz_ has quit [Ping timeout: 268 seconds]
JoshS has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
bkxd has joined #ruby
nadir is now known as YHWH
YHWH is now known as nadir
pawnbox has quit [Ping timeout: 255 seconds]
incompetentop has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Vile` has joined #ruby
Sammichmaker has joined #ruby
Sammichmaker has joined #ruby
Sammichmaker has quit [Changing host]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
rakm has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
ur5us has quit [Remote host closed the connection]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
al2o3-cr has joined #ruby
_whitelogger has joined #ruby
modlin has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 268 seconds]
elifoster has quit [Ping timeout: 268 seconds]
braincrash has joined #ruby
ElFerna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
versigtig has quit [Quit: This computer has gone to sleep]
harai has quit [Ping timeout: 240 seconds]
gdonald has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
versigtig has joined #ruby
CloCkWeRX has joined #ruby
Derperperd has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hutch34 has quit [Ping timeout: 240 seconds]
Derperperd has quit [Ping timeout: 268 seconds]
braincrash has quit [Ping timeout: 240 seconds]
montanonic has quit [Ping timeout: 255 seconds]
pandbearit has joined #ruby
pandbearit has quit [Max SendQ exceeded]
pandabearit_ has joined #ruby
braincrash has joined #ruby
pandabearit_ has quit [Remote host closed the connection]
harai has joined #ruby
pawnbox has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
versigtig has quit [Quit: This computer has gone to sleep]
braincrash has quit [Ping timeout: 240 seconds]
harai has quit [Read error: Connection reset by peer]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
rakm has joined #ruby
harai has joined #ruby
rakm has quit [Client Quit]
yaewa has joined #ruby
nowhereman has joined #ruby
rakm has joined #ruby
hahuang61 has joined #ruby
rakm has quit [Client Quit]
rakm has joined #ruby
moei has quit [Ping timeout: 240 seconds]
rakm has quit [Client Quit]
rakm has joined #ruby
rakm has quit [Client Quit]
rakm has joined #ruby
rakm has quit [Client Quit]
rakm has joined #ruby
arescorpio has quit [Quit: Leaving.]
rakm has quit [Client Quit]
harai has quit [Read error: Connection reset by peer]
hahuang61 has quit [Ping timeout: 255 seconds]
harai has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
harai has quit [Read error: Connection reset by peer]
Channel6 has joined #ruby
__Yiota has joined #ruby
JoshS has joined #ruby
IRCFrEAK has joined #ruby
harai has joined #ruby
__Yiota has quit [Client Quit]
harai has quit [Read error: Connection reset by peer]
IRCFrEAK has left #ruby [#ruby]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
harai has joined #ruby
jdelreal has joined #ruby
modlin has joined #ruby
User458764 has joined #ruby
hillmonster has joined #ruby
<hillmonster> hello
<Radar> hi
NightMonkey has quit [Ping timeout: 260 seconds]
harai has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
NightMonkey has joined #ruby
<marchelzo> hi radar and hillmonster
<marchelzo> how are you folks doing tonight
harai has joined #ruby
<hillmonster> i'm doing great
braincrash has joined #ruby
charliesome has joined #ruby
harai has quit [Read error: Connection reset by peer]
dviola has quit [Quit: WeeChat 1.7]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
<Radar> hillmonster: first time here?
<Radar> done much ruby?
<hillmonster> sort of
<hillmonster> ruby is hard and easy at the same time
tau has quit [Remote host closed the connection]
harai has joined #ruby
gix has quit [Ping timeout: 260 seconds]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
harai has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 260 seconds]
harai has joined #ruby
gix has joined #ruby
bkxd has joined #ruby
jgnagy has quit [Ping timeout: 255 seconds]
braincrash has quit [Quit: bye bye]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
<marchelzo> hillmonster: that is very true
nanoz has joined #ruby
harai has quit [Read error: Connection reset by peer]
<hillmonster> the simplicity of ruby is what throws me off
<marchelzo> ruby is one of those languages that makes less and less sense the more you look at it
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]
User458764 has joined #ruby
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
braincrash has joined #ruby
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
al2o3-cr_ has joined #ruby
mlkkk has joined #ruby
al2o3-cr has quit [Ping timeout: 255 seconds]
saneax-_-|AFK is now known as saneax
pawnbox has joined #ruby
mlkkk has quit [Remote host closed the connection]
mlkkk has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
saneax is now known as saneax-_-|AFK
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
howdoi has quit [Quit: Connection closed for inactivity]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
harai has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
modlin has quit [Ping timeout: 260 seconds]
harai has quit [Read error: Connection reset by peer]
d^sh has joined #ruby
harai has joined #ruby
pwnd_nsfw` has joined #ruby
LoneHerm_ has joined #ruby
Derperperd has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
hillmonster has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
harai has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
mikeiniowa has quit [Ping timeout: 240 seconds]
mlkkk has quit [Remote host closed the connection]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hahuang61 has joined #ruby
harai has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 240 seconds]
harai has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
harai has quit [Read error: Connection reset by peer]
hahuang61 has quit [Ping timeout: 240 seconds]
harai has joined #ruby
ifctj has joined #ruby
User458764 has joined #ruby
harai has quit [Read error: Connection reset by peer]
bmurt has quit [Ping timeout: 260 seconds]
brendan- has quit [Ping timeout: 240 seconds]
mlkkk has joined #ruby
mlkkk has quit [Remote host closed the connection]
harai has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
stevenhong has quit [Remote host closed the connection]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
felltir has joined #ruby
harai has joined #ruby
nofxxx has joined #ruby
harai has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
markholmes has joined #ruby
aspiers has quit [Ping timeout: 245 seconds]
brendan- has joined #ruby
harai has joined #ruby
jenrzzz 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
ifctj has quit [Ping timeout: 240 seconds]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
arup_r has joined #ruby
<arup_r> First time using refine, but failed. Can you tell me where the mistake is https://gist.github.com/aruprakshit/c20e31b81a63a690a72324f6c77dde6c ?
<arup_r> getting error "RuntimeError: main.using is permitted only at toplevel "
harai has quit [Read error: Connection reset by peer]
Derperperd has joined #ruby
brendan- has quit [Ping timeout: 260 seconds]
harai has joined #ruby
ifctj has joined #ruby
harai has quit [Read error: Connection reset by peer]
<arup_r> it just doesn't work in IRB, but inside a Ruby file it works. I don't know why though.
nowhereman has quit [Quit: Konversation terminated!]
nowhereman has joined #ruby
harai has joined #ruby
benno_ has joined #ruby
nowhereman has quit [Client Quit]
nowhereman has joined #ruby
<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
<acalycine> So I would have user input of "Lions" and I would have the output "http://dtlive.com.au/afl/livescores.php?GameID=1113"
hahuang61 has joined #ruby
blackwind_123 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
backer has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
dawidof has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rakm has joined #ruby
TheWhip_ has joined #ruby
TheWhip has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
antgel has joined #ruby
Robtop__ has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
blackwind_123 has joined #ruby
__Yiota has quit [Client Quit]
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
xen0fon has joined #ruby
tildes has joined #ruby
aryaching_ has joined #ruby
raul782 has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
__Yiota has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
raul782 has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
DaveTaboola has quit [Quit: Textual IRC Client: www.textualapp.com]
rakm has quit [Remote host closed the connection]
charliesome has joined #ruby
toretore has joined #ruby
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
_main_ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
MrSamuel has joined #ruby
TheWhip_ has quit [Remote host closed the connection]
TheWhip has joined #ruby
cyphase has quit [Ping timeout: 264 seconds]
TheWhip has quit [Ping timeout: 240 seconds]
szulak has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unshadow has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
stevenhong has joined #ruby
stevenhong has quit [Client Quit]
djbkd has joined #ruby
ledestin has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
Sammichmaker has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
esObe has joined #ruby
Macaveli has joined #ruby
mlehrer has joined #ruby
ddffg has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
ifctj has quit [Ping timeout: 260 seconds]
pilne has quit [Quit: Quitting!]
ddffg has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
harfangk has joined #ruby
User458764 has joined #ruby
hutch34 has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
cyphase has joined #ruby
hahuang61 has joined #ruby
User458764 has quit [Client Quit]
hutch34 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
pwnd_nsfw has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
acalycine has quit [Quit: bye]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Robtop__ has quit [Ping timeout: 268 seconds]
ChatSharp has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
ChatSharp has left #ruby [#ruby]
bkxd has quit [Ping timeout: 260 seconds]
ponga has joined #ruby
zeroDi has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
anisha has joined #ruby
CheckYourSix254 has joined #ruby
Jackneill_ has joined #ruby
CheckYourSix254 has quit [Ping timeout: 240 seconds]
tomasz has joined #ruby
rippa has joined #ruby
tildes has quit [Ping timeout: 268 seconds]
kaffepanna has quit [Ping timeout: 245 seconds]
ChatSharp has joined #ruby
JeanCarloMachado has joined #ruby
felltir has quit [Remote host closed the connection]
ChatSharp has quit [Ping timeout: 260 seconds]
dawidof has quit [Quit: Textual IRC Client: www.textualapp.com]
deepak_ is now known as dkannan
andywww has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
felltir has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
dkannan has left #ruby [#ruby]
Derperpe1 has joined #ruby
Derperperd has quit [Read error: Connection reset by peer]
armyriad has quit [Read error: Connection reset by peer]
aryaching_ has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
armyriad has joined #ruby
andywww has quit [Quit: andywww]
sameerynho has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
mitt3ns has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
agent_white has quit [Ping timeout: 240 seconds]
cibs has quit [Ping timeout: 240 seconds]
lupine has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cibs has joined #ruby
lupine has joined #ruby
ledestin has joined #ruby
stomar has quit [Ping timeout: 260 seconds]
blackwind_123 has joined #ruby
szulak has joined #ruby
ledestin has quit [Ping timeout: 260 seconds]
felltir has quit [Remote host closed the connection]
felltir has joined #ruby
ifctj has joined #ruby
felltir has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
def_jam has joined #ruby
Definity has quit [Ping timeout: 240 seconds]
eb0t has quit [Ping timeout: 240 seconds]
eblip has quit [Ping timeout: 255 seconds]
eb0t_ has joined #ruby
aryaching has joined #ruby
nettoweb has joined #ruby
Lyubo1 has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has joined #ruby
aryaching_ has joined #ruby
def_jam has quit [Read error: Connection reset by peer]
eb0t_ has quit [Read error: Connection reset by peer]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
spooq has quit [Ping timeout: 240 seconds]
muyiwaolu has joined #ruby
pwnd_nsfw has quit [Ping timeout: 255 seconds]
kiltzman has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
kiltzman has quit [Max SendQ exceeded]
aryaching has quit [Ping timeout: 255 seconds]
gdonald has joined #ruby
<lupine> not that simple from the outside :D
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eb0t_ has joined #ruby
wigner has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
aryaching has joined #ruby
def_jam has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
anisha has quit [Quit: This computer has gone to sleep]
tildes has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
aryaching__ has joined #ruby
aryaching_ has quit [Ping timeout: 268 seconds]
<apeiros> lupine: hm?
aryaching has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 255 seconds]
andywww has joined #ruby
muyiwaolu has quit [Quit: Textual IRC Client: www.textualapp.com]
andywww has quit [Client Quit]
wigner has quit [Quit: wigner]
nettoweb1 has joined #ruby
al2o3-cr_ has quit [Ping timeout: 260 seconds]
andywww has joined #ruby
JeanCarloMachado has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
nettoweb has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
hahuang61 has joined #ruby
stomar has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 268 seconds]
andywww has quit [Quit: andywww]
browndawg has quit [Quit: Leaving]
wigner has joined #ruby
browndawg has joined #ruby
agent_white has joined #ruby
eb0t has joined #ruby
Robtop__ has joined #ruby
eblip has joined #ruby
eb0t_ has quit [Ping timeout: 268 seconds]
def_jam has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
mitt3ns has quit [Ping timeout: 240 seconds]
pwnd_nsfw` has quit [Ping timeout: 260 seconds]
sebachowa has joined #ruby
<sebachowa> hello
aryaching__ has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
sepp2k has joined #ruby
andywww has joined #ruby
Mon_Ouie has joined #ruby
al2o3-cr_ has joined #ruby
ElFerna has joined #ruby
nettoweb1 has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
andywww has quit [Quit: andywww]
eblip has quit [Ping timeout: 240 seconds]
eb0t has quit [Ping timeout: 255 seconds]
aryaching has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
jameser has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
andywww has joined #ruby
andywww has quit [Client Quit]
tildes has quit [Ping timeout: 240 seconds]
szulak has joined #ruby
eblip has joined #ruby
milardovich has joined #ruby
eb0t has joined #ruby
mlkkk has joined #ruby
agit0 has joined #ruby
milardovich has quit [Remote host closed the connection]
Lyubo1 has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
nicolai86 has quit [Remote host closed the connection]
vuoto has joined #ruby
agit0 has quit [Ping timeout: 260 seconds]
nadir has quit [Quit: Connection closed for inactivity]
nicolai86 has joined #ruby
ElFerna has quit [Quit: Textual IRC Client: www.textualapp.com]
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
Chagel has joined #ruby
browndawg has quit [Quit: Leaving]
CloCkWeRX has quit [Quit: Leaving.]
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]
najam has left #ruby [#ruby]
gdonald has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
najam has joined #ruby
najam has left #ruby [#ruby]
felltir has joined #ruby
sniffer has quit [Quit: No Ping reply in 180 seconds.]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
hutch34 has quit [Ping timeout: 240 seconds]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
vuoto has joined #ruby
sepp2k has joined #ruby
vuoto has quit [Remote host closed the connection]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
duper has quit [Ping timeout: 240 seconds]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
duper has joined #ruby
sniffer has joined #ruby
felltir has quit [Remote host closed the connection]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
felltir has joined #ruby
kiltzman has joined #ruby
vuoto has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
Qchmqs has quit [Ping timeout: 240 seconds]
felltir_ has joined #ruby
chee is now known as google
felltir_ has quit [Remote host closed the connection]
google is now known as chee
DaveTaboola has joined #ruby
Snickers has joined #ruby
Snickers has quit [Client Quit]
sniffer has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
felltir has quit [Ping timeout: 255 seconds]
ResidentBiscuit has joined #ruby
hahuang61 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
vuoto has quit [Remote host closed the connection]
sniffer has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
enterprisey has joined #ruby
wigner has quit [Quit: wigner]
n0wz has quit [Remote host closed the connection]
sniffer has quit [Client Quit]
nOwz has joined #ruby
heftig has quit [Ping timeout: 264 seconds]
ych has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SirOliver has joined #ruby
nOwz has quit [Quit: WeeChat 1.7]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
SirOliver has quit [Quit: ZZZzzz…]
sniffer has joined #ruby
Derperpe1 has quit [Ping timeout: 240 seconds]
psychicist__ has joined #ruby
benlieb has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
szulak has joined #ruby
ifctj has quit [Quit: Konversation terminated!]
ifctj has joined #ruby
bkxd has joined #ruby
bmurt has joined #ruby
heftig has joined #ruby
Azure has quit [Quit: Oops.]
EV3RYDAYPR0GRESS has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
EV3RYDAYPR0GRESS has joined #ruby
ryan_notabot has joined #ruby
mdc_ has quit [Ping timeout: 260 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
ifctj has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
vuoto has quit [Remote host closed the connection]
forgot_ is now known as forgot
Gasher^ has quit [Quit: Leaving]
Derperpe1 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chagel has joined #ruby
esObe has joined #ruby
conta has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has joined #ruby
jamesaxl has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has quit [Read error: Connection reset by peer]
tomasz has quit [Ping timeout: 259 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<szulak> Hi guys, I am having a small problem with understanding these two method calls from Sinatra: https://gist.github.com/szulak/bf9bc1de8305167de3bf45143049593c
cschneid_ has joined #ruby
milardovich has joined #ruby
<szulak> 1st line works fine, 2nd line causes an error. I have an explaination, but I am not sure if it's the correct one
<szulak> Does 'set' method accepts only one argument (as in the 1st line) and checks if block_given?
<Nilium> And what's the error?
<szulak> bin/app.rb:14: syntax error, unexpected '{', expecting end-of-input
<szulak> set :probability2 { |value| condition { rand <= value } }
User458764 has joined #ruby
<Nilium> You have to use parentheses for that call.
<szulak> alright, but why?
<Nilium> Because otherwise you're trying to call a symbol.
<Nilium> [1, 2, 3].reduce(5) { |m, e| m + e } ← This is valid, this is not → [1, 2, 3].reduce 5 { |m, e| m + e }
ins64 has joined #ruby
<szulak> hm
braincrash has joined #ruby
<szulak> so why 'set :foo, 'bar'' is valid?
<Nilium> block_given? is a runtime check, you have a syntax error, your code isn't valid enough to even get to the runtime bit.
<Nilium> Because there's no block.
<szulak> isn't code between { } a block in the:
<szulak> set(:probability1) { |value| condition { rand <= value } }
<szulak> ?
<Nilium> Yes. You can't pass blocks to symbols.
szulak has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 260 seconds]
<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 has joined #ruby
<szulak> how comes, that it works?
<Nilium> What works?
<szulak> set(:probability1) { |value| condition { rand <= value } }
tusharmalik has joined #ruby
<szulak> sorry, my irc client crashed
vuoto has joined #ruby
<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]
Derperpe1 has joined #ruby
p1k has joined #ruby
User458764 has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
ins64 has quit [Ping timeout: 240 seconds]
sameerynho has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
xen0fon has quit [Ping timeout: 240 seconds]
ins64 has joined #ruby
sameerynho has joined #ruby
JoshS has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
Atrus__ has joined #ruby
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
dviola has joined #ruby
raul782 has joined #ruby
Cohedrin has joined #ruby
milardovich has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
djellemah_ has quit [Quit: Leaving]
milardov_ has joined #ruby
djellemah_ has joined #ruby
milardovich has quit [Read error: No route to host]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Xentil has joined #ruby
milardovich has joined #ruby
milardov_ has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: brb]
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
agent_white has joined #ruby
Atrus__ is now known as Albiore
lenwood has joined #ruby
xen0fon has joined #ruby
montanonic has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
blackmesa has joined #ruby
marchelzo has left #ruby ["Leaving"]
stomar has quit [Ping timeout: 260 seconds]
goepsilongo has joined #ruby
Azure has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
xen0fon has quit [Quit: xen0fon]
ins64 has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blackmes1 has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
ins64 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
OMGtechy has joined #ruby
<OMGtechy> Hey folks, anyone around to give me a hand with something? :)
Derperperd has joined #ruby
Derperpe1 has quit [Read error: Connection reset by peer]
ins64 has quit [Ping timeout: 240 seconds]
<nopacien13> OMGtechy: no
<OMGtechy> :'(
ResidentBiscuit has joined #ruby
stomar has joined #ruby
tomasz has quit [Remote host closed the connection]
<matthewd> ?anyone OMGtechy
<ruby[bot]> OMGtechy: Just ask your question, if anyone has, is or can, they will respond.
<OMGtechy> thank you, not used to this place yet :)
<OMGtechy> ResidentBiscuit, fancy seeing you here
<ResidentBiscuit> It is me
<OMGtechy> If you said otherwise, I'd be surprised
<OMGtechy> So, here's what I think is the relevant part of my code: https://cpy.pt/1cm8qPnt
ins64 has joined #ruby
<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)
<OMGtechy> baweaver, so many niche languages :O
<baweaver> Chef and Sensu are tools.
TomyLobo has quit [Ping timeout: 255 seconds]
<baweaver> written in Ruby
<OMGtechy> I thought you meant https://esolangs.org/wiki/Chef
Puffball has joined #ruby
<OMGtechy> I was scratching my head a little
<baweaver> https://www.chef.io/chef/ - Provisioning tool
<OMGtechy> Have seen it used in production once sadly
<OMGtechy> ta
<baweaver> https://sensuapp.org/ - Monitoring tool
<OMGtechy> You're in the web world I take it?
<baweaver> I'm in many worlds
<OMGtechy> Such as?
dviola has quit [Quit: WeeChat 1.7]
<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
bmurt has joined #ruby
Derperperd has joined #ruby
<Radar> newrubycoder: just ask :)
milardovich has quit [Ping timeout: 260 seconds]
<newrubycoder> ok this is my code https://gist.github.com/anonymous/a440354c89cd5632ed6d7236f93e6ec1 i wonder how can i call upon the game variable and make it connect to the mutated array?
bmurt has quit [Client Quit]
aasmith_ has quit [Quit: Page closed]
Chagel has joined #ruby
pawnbox has quit [Remote host closed the connection]
milardovich has joined #ruby
msg has joined #ruby
msg is now known as Guest67704
<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
<Papierkorb> newrubycoder: Maybe you're interested in the 20 minute guide: https://www.ruby-lang.org/en/documentation/quickstart/
<newrubycoder> yeah one bad thing about codewars is that you write your code inside of one method so you dont really know how to use methods lol
milardovich has joined #ruby
shwouchk has quit [Quit: Connection closed for inactivity]
Guest67704 has quit [Ping timeout: 240 seconds]
<newrubycoder> yeah probably, even tho i feel im beyond a lot of stuff i dont really know fundamentals
Lord_of_Life has quit [Excess Flood]
Chagel has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
ionte has quit [Ping timeout: 258 seconds]
wilbert has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #ruby
enterprisey has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BTRE has quit [Quit: Leaving]
BTRE has joined #ruby
versigtig has joined #ruby
bmurt has joined #ruby
zeroDi has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
skweek has joined #ruby
versigtig has quit [Quit: This computer has gone to sleep]
Jackneill_ has quit [Remote host closed the connection]
nettoweb has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnewkerk has joined #ruby
ionte has joined #ruby
BTRE has quit [Quit: Leaving]
browndawg has quit [Remote host closed the connection]
browndawg has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
nicoulaj has quit [Quit: Ping timeout (120 seconds)]
dnewkerk has joined #ruby
nibbo has quit [Ping timeout: 245 seconds]
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
nibbo has joined #ruby
m4rCsi has joined #ruby
artmann_ has quit [Read error: Connection reset by peer]
artmann_ has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
nettoweb1 has joined #ruby