sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wnd has quit [Ping timeout: 250 seconds]
DynamicMetaFlow has joined #ruby-lang
ghostpl_ has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 256 seconds]
DynamicMetaFlow has quit [Ping timeout: 250 seconds]
piotrj_ has quit [Remote host closed the connection]
mkaesz has joined #ruby-lang
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby-lang
mkaesz has quit [Ping timeout: 244 seconds]
taylorrf has joined #ruby-lang
allomov has joined #ruby-lang
bruno- has quit [Ping timeout: 244 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
bruno- has joined #ruby-lang
Antivan has joined #ruby-lang
taylorrf has quit [Ping timeout: 246 seconds]
allomov has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
<jdecuirm>
Hey guys, good night, i finally got to understand a problem about parsing a sentence
yfeldblum has quit [Remote host closed the connection]
<jdecuirm>
but i need your knowledge about how this works a bit
<jdecuirm>
i have a method that gets an array of arrays, but i thought that every method inside worked with a copy of the array, not the same array
<jdecuirm>
that was the problem why i wasn't understanding
DynamicMetaFlow has joined #ruby-lang
<jdecuirm>
so, every time the array passes to a method the objects are shifted from them
<jdecuirm>
so, every new method works with the new array shifted, not the original array? or what
<jdecuirm>
sorry, that explanation made me dizzy
<|jemc|>
jdecuirm: right, objects are passed "by reference"
<|jemc|>
jdecuirm: so it's up to you to avoid mutating an argument passed to a method unless that's the intended purpose of a method
<jdecuirm>
thank jemc
<jdecuirm>
the problem i was having
<jdecuirm>
was precisely that, i thought why in the heck i'm getting things done, if i am passing the supposed entire array
<jdecuirm>
but every method do a shift,
bruno- has quit [Ping timeout: 264 seconds]
<|jemc|>
jdecuirm: for more info try googling "ruby avoid mutating an array"
<jdecuirm>
over the same object i guess, i printed the stack trace and i figured that out
piotrj has joined #ruby-lang
<jdecuirm>
thank you very much!
<|jemc|>
basically, your two options inside the method are: 1) dup the argument that comes in and throw away the original, 2) use only methods that don't mutate the original, like slice instead of shift
<jdecuirm>
ok, so shift mutates the original array!
<jdecuirm>
i get it!
rbowlby has joined #ruby-lang
<jdecuirm>
that was i wasn't seen the whole picture!
<jdecuirm>
thanks to your help and pry i understood a lot, thanks jemc!
jo__ has quit [Quit: Connection closed for inactivity]
sideshowcoder_ has joined #ruby-lang
unreal_ has joined #ruby-lang
hahuang61 has joined #ruby-lang
sideshowcoder has quit [Ping timeout: 246 seconds]
sideshowcoder_ is now known as sideshowcoder
yfeldblu_ has joined #ruby-lang
unreal has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
<DynamicMetaFlow>
Hello, I just started reading The Well-Grounded Rubyist and was wondering of other books to accompany it.
jibaly has joined #ruby-lang
<pipework>
DynamicMetaFlow: Metaprogramming Ruby is great. the first half is about the object model, the second half is about actual metaprogramming using that model.
<pipework>
The first half is pretty foundational, imo.
roamingdog has quit [Remote host closed the connection]
<DynamicMetaFlow>
Thank you I'll take a look at it.
<DynamicMetaFlow>
For my first project I want to work on something similar to this, either expand upon it or do it from scratch. I had started initially writing a few functions but then decided I need to learn Ruby. I did study Python beforehand but Ruby has a library that works with the Trello API where Python doesn't
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
sideshowcoder has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby-lang
elia has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
kyb3r_ has quit [Read error: Connection reset by peer]
ghostpl_ has joined #ruby-lang
yellowgh0st has joined #ruby-lang
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
concernedcitizen has quit [Remote host closed the connection]
amystephen has joined #ruby-lang
<yorickpeterse>
morning
stamina has joined #ruby-lang
yellowgh0st has quit [Quit: yellowgh0st]
macscam1 has joined #ruby-lang
oleo__ has quit [Ping timeout: 264 seconds]
<macscam1>
(byebug) @url && @local_store
<macscam1>
nil ... why would i get this message? doesnt && return true/false?
mkaesz has quit [Read error: No route to host]
sideshowcoder has joined #ruby-lang
<tobiasvl>
macscam1: not necessarily, no
lapide_viridi has joined #ruby-lang
<tobiasvl>
macscam1: in this case one of the operands is nil, which is falsey
oleo__ has joined #ruby-lang
<tobiasvl>
nil "evaluates" to false in boolean expressions
lytol has quit [Remote host closed the connection]
macscam1 has quit [Client Quit]
mkaesz has joined #ruby-lang
Musashi007 has joined #ruby-lang
fujimura has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
marr has joined #ruby-lang
rbowlby__ has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
the1freeman has joined #ruby-lang
sideshowcoder has quit [Ping timeout: 246 seconds]
taylorrf has joined #ruby-lang
rbowlby has joined #ruby-lang
tdy has quit [Quit: WeeChat 1.1.1]
ruskie has quit [Quit: ...]
taylorrf has quit [Ping timeout: 264 seconds]
djellemah_ has joined #ruby-lang
arBmind has quit [Ping timeout: 246 seconds]
prabeshshrestha has joined #ruby-lang
Ainieco has joined #ruby-lang
<Ainieco>
hello
caseydriscoll has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
j4cknewt has joined #ruby-lang
caseydriscoll has quit [Ping timeout: 255 seconds]
ruskie has joined #ruby-lang
caseydriscoll has joined #ruby-lang
aghalarp has joined #ruby-lang
<Ainieco>
is it possible to define method with same interface as some other method dynamically?
<Ainieco>
i know target method's name and i'd like to use define_method or somethind similar to define another method but with same interface(arguments)
<apeiros_>
Ainieco: what do you want to do with that method?
<apeiros_>
the answer is probably: use def yourmethod(*args, &block)
roamingdog has joined #ruby-lang
concernedcitizen has joined #ruby-lang
rbowlby_ has joined #ruby-lang
<Ainieco>
apeiros_: just a generic convenience wrapper around other methods
<apeiros_>
then as I said
<Ainieco>
apeiros_: *args doesn't work with keywords
<yorickpeterse>
To catch keyword arguments you have to use **args I believe
eval-in__ has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
piotrj has joined #ruby-lang
<apeiros_>
Ainieco: yes it does
rbowlby_ has quit [Client Quit]
<Ainieco>
yorickpeterse: *args catches keywords but when i try to splat args as arguments to wrapped method it doesn't work since keyword args treated as hash
ruskie has joined #ruby-lang
CM-Punk has quit [Ping timeout: 245 seconds]
<Ainieco>
apeiros_: gimme a moment i'll show it you
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
roamingdog has joined #ruby-lang
oleo__ has quit [Quit: Verlassend]
symm- has joined #ruby-lang
oleo has joined #ruby-lang
roamingdog has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Remote host closed the connection]
intinig has quit [Ping timeout: 265 seconds]
ruby-lang687 has joined #ruby-lang
ruby-lang687 has quit [Client Quit]
intinig has joined #ruby-lang
charliesome has joined #ruby-lang
bruno- has joined #ruby-lang
lytol has joined #ruby-lang
Ainieco has quit [Quit: leaving]
lytol has quit [Ping timeout: 265 seconds]
yellowgh0st_ has quit [Quit: yellowgh0st_]
shazaum has joined #ruby-lang
shazaum has quit [Changing host]
shazaum has joined #ruby-lang
strixd has quit [Quit: 500]
taylorrf has joined #ruby-lang
taylorrf has quit [Read error: Connection reset by peer]
fujimura has joined #ruby-lang
taylorrf has joined #ruby-lang
djellemah has quit [Quit: Leaving]
djellemah has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
yellowgh0st has joined #ruby-lang
JohnBat26 has joined #ruby-lang
fujimura has quit [Ping timeout: 240 seconds]
strixd has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
ocko has joined #ruby-lang
mnilsson has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
intinig has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
mnilsson has joined #ruby-lang
intinig has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 255 seconds]
cryo28 has quit [Quit: leaving]
cryo28 has joined #ruby-lang
cryo28 has quit [Client Quit]
cryo28 has joined #ruby-lang
dzejrou has joined #ruby-lang
mnilsson has quit [Ping timeout: 252 seconds]
intinig has quit [Ping timeout: 252 seconds]
|jemc| has joined #ruby-lang
mnilsson has joined #ruby-lang
sideshowcoder has joined #ruby-lang
mkaesz has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby-lang
intinig has joined #ruby-lang
intinig has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
intinig has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
dangerousdave has quit [Client Quit]
mattwildig has joined #ruby-lang
mattwildig has quit [Client Quit]
djellemah_ has quit [Quit: Leaving]
taylorrf has quit [Remote host closed the connection]
Bwild has quit [Quit: leaving]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
Antivan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Integralist has quit [Ping timeout: 256 seconds]
yellowgh0st has quit [Quit: yellowgh0st]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
caseydriscoll has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
maso has joined #ruby-lang
caseydriscoll has joined #ruby-lang
yellowgh0st has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
roamingdog has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
<yorickpeterse>
oh hey this is nice
<yorickpeterse>
ruby 2.2 removed digest/hmac
<yorickpeterse>
semantic versio..oh wait
<tbuehlmann>
yea, beside it's not semver
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
sideshowcoder has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
arooni-mobile has joined #ruby-lang
shinnya has joined #ruby-lang
jo__ has joined #ruby-lang
nathanstitt has joined #ruby-lang
CM-Punk has quit [Ping timeout: 245 seconds]
<DynamicMetaFlow>
Hello everyone. I'm learning Ruby right now and was thinking if anyone can recommend any code they believe is 'good' to read so I can learn and improve
yellowgh0st has quit [Quit: yellowgh0st]
<ledestin>
DynamicMetaFlow: I think Rails code is good
yellowgh0st has joined #ruby-lang
CM-Punk has joined #ruby-lang
<yorickpeterse>
Rails is extremely difficult for newbies (the codebase that is)
<yorickpeterse>
it's a massive project
<DynamicMetaFlow>
I remember reading somewhere where someone also agreed Rails is 'good' code. I can also understand that it's difficult for newcomers.
yfeldblum has joined #ruby-lang
<DynamicMetaFlow>
Well if anyone has any resources or a url to recommend that would be great. I'm going to focus on the book 'The Well-Grounded Rubyist' so I can work on creating a CLI for this application called Trello
<ledestin>
DynamicMetaFlow: I use http://www.docsdoctor.org/. On the method level, it still gives some insights. I don’t understand Rails on higher level.
yfeldblum has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: zzz]
<DynamicMetaFlow>
Thank you ledestin
<ledestin>
DynamicMetaFlow: yw
mkaesz has quit [Read error: Connection reset by peer]
kfpratt has quit [Remote host closed the connection]
taylorrf has joined #ruby-lang
kfpratt has joined #ruby-lang
arBmind1 has joined #ruby-lang
kfpratt has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
arBmind has quit [Ping timeout: 252 seconds]
yellowgh0st has quit [Quit: yellowgh0st]
yellowgh0st has joined #ruby-lang
iamninja has joined #ruby-lang
yellowgh0st has quit [Client Quit]
centrx has joined #ruby-lang
enkristoffer has joined #ruby-lang
fusillicode has quit [Ping timeout: 252 seconds]
setanta_ has quit [Ping timeout: 264 seconds]
intinig has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
Miphix has quit [Quit: Leaving]
yellowgh0st has joined #ruby-lang
setanta_ has joined #ruby-lang
yellowgh0st has quit [Client Quit]
concernedcitizen has quit [Remote host closed the connection]
yellowgh0st has joined #ruby-lang
lytol has joined #ruby-lang
rippa has joined #ruby-lang
strixd has quit [Quit: 500]
lytol has quit [Ping timeout: 244 seconds]
yellowgh0st has quit [Quit: yellowgh0st]
yellowgh0st has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
yellowgh0st has quit [Quit: yellowgh0st]
kfpratt has quit [Read error: No route to host]
enkristoffer has quit [Ping timeout: 250 seconds]
kr3ssh has quit [Ping timeout: 252 seconds]
solars has joined #ruby-lang
enkristoffer has joined #ruby-lang
wallerdev has joined #ruby-lang
ddd has joined #ruby-lang
scampbell has joined #ruby-lang
lytol has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
riotjones has joined #ruby-lang
kfpratt has joined #ruby-lang
hahuang61 has quit [Ping timeout: 250 seconds]
jsaak has quit [Ping timeout: 245 seconds]
amsi has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 246 seconds]
ldnunes has quit [Ping timeout: 252 seconds]
jsaak has joined #ruby-lang
riotjones has quit [Ping timeout: 245 seconds]
iamninja has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
jacecore has joined #ruby-lang
jacecore has quit [Client Quit]
iamninja has joined #ruby-lang
deol has joined #ruby-lang
fusillicode has joined #ruby-lang
ledestin has joined #ruby-lang
enebo has quit [Quit: enebo]
houhoulis has quit [Remote host closed the connection]
<DynamicMetaFlow>
I must say rubymonk.com is great!
arBmind1 has quit [Ping timeout: 252 seconds]
arBmind has joined #ruby-lang
Sirupsen has quit [Ping timeout: 265 seconds]
<Senjai>
DynamicMetaFlow: Probably exactly how it says you shoudl
<Senjai>
Trello::Board.all
oleo has quit [Quit: Verlassend]
roamingdog has quit [Remote host closed the connection]
<DynamicMetaFlow>
Thanks Senjai had figured it out. I still think I need to become more accustomed to Ruby before I work on my first project. Thank you for your help.
setanta_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby-lang
Sirupsen has joined #ruby-lang
lytol has quit [Remote host closed the connection]
centrx has quit [Quit: Shutting down, Please wait...]
wallerdev has joined #ruby-lang
roamingdog has joined #ruby-lang
cryo28 has quit [Quit: leaving]
hahuang61 has joined #ruby-lang
djbkd has joined #ruby-lang
dik_dak has joined #ruby-lang
dik_dak has quit [Max SendQ exceeded]
dik_dak has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
oleo has joined #ruby-lang
skade has joined #ruby-lang
lytol has joined #ruby-lang
setanta_ has joined #ruby-lang
kr3ssh has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Read error: Connection reset by peer]
tunaCanBruh has quit [Ping timeout: 245 seconds]
yellowgh0st has joined #ruby-lang
Sirupsen has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
j5s7 has joined #ruby-lang
arBmind has joined #ruby-lang
sgambino has joined #ruby-lang
j5s7 has quit [Client Quit]
priodev has quit [Ping timeout: 244 seconds]
hahuang61 has quit [Quit: WeeChat 1.1.1]
waxjar has quit [Ping timeout: 246 seconds]
mnilsson has joined #ruby-lang
priodev has joined #ruby-lang
waxjar has joined #ruby-lang
kr3ssh has quit [Ping timeout: 265 seconds]
roamingdog has joined #ruby-lang
hahuang61 has joined #ruby-lang
mnilsson has quit [Ping timeout: 245 seconds]
hahuang61 is now known as hahuang62
arBmind has quit [Ping timeout: 252 seconds]
hahuang62 has quit [Client Quit]
arBmind has joined #ruby-lang
hahuang61 has joined #ruby-lang
yalue has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
iamninja has quit [Ping timeout: 246 seconds]
tdy has quit [Read error: Connection reset by peer]
tdy has joined #ruby-lang
dorei has joined #ruby-lang
tdy has quit [Client Quit]
tdy has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 255 seconds]
skade has joined #ruby-lang
arBmind has joined #ruby-lang
yfeldblum has joined #ruby-lang
arBmind1 has quit [Ping timeout: 245 seconds]
futilegames has joined #ruby-lang
symm- has joined #ruby-lang
djbkd has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
enkristoffer has quit [Ping timeout: 255 seconds]
riotjones has joined #ruby-lang
enkristoffer has joined #ruby-lang
shinnya has joined #ruby-lang
riotjones has quit [Ping timeout: 246 seconds]
ghostpl_ has quit [Remote host closed the connection]
enebo has joined #ruby-lang
iamninja has joined #ruby-lang
chinmay_dd has joined #ruby-lang
enkristoffer has quit [Ping timeout: 252 seconds]
djellemah has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enkristoffer has joined #ruby-lang
yellowgh0st has quit [Quit: yellowgh0st]
banister has joined #ruby-lang
ur5us has joined #ruby-lang
<banister>
yorickpeterse ping
skade has quit [Quit: Computer has gone to sleep.]
roamingdog has quit [Remote host closed the connection]
enebo has quit [Ping timeout: 252 seconds]
enebo has joined #ruby-lang
kr3ssh has joined #ruby-lang
sideshowcoder has joined #ruby-lang
rbowlby has joined #ruby-lang
enkristoffer has quit [Ping timeout: 264 seconds]
lytol has quit [Remote host closed the connection]
meschi has joined #ruby-lang
oleo has quit [Quit: Verlassend]
ghostpl_ has joined #ruby-lang
kr3ssh has quit [Ping timeout: 245 seconds]
ascarter has joined #ruby-lang
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ruby-lang
pwnz0r has joined #ruby-lang
windies17 has joined #ruby-lang
blowmage` is now known as blowmage
<windies17>
Hi folks, I am new to ruby so learning the basics, excuse the naivety. I am going to as a question. I have set up my models and want to include a mobile phone number in my table I type in t.integer :number, is this ok or there another thing I should do?
yellowgh0st has joined #ruby-lang
<djellemah>
windies17: use integers only when you need to do arithmetic. A phone number is a string of digits.
kr3ssh has joined #ruby-lang
oleo has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
<wallerdev>
+1 use a string
j0n3 has joined #ruby-lang
<windies17>
Thankyou djellemah, How do you change that in migration from intgers to string of digits