Soda has quit [Read error: Connection reset by peer]
caveat- has quit [Ping timeout: 240 seconds]
culturelabs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikee_ has joined #ruby
xcv_ has quit [Remote host closed the connection]
caveat- has joined #ruby
jmccune has joined #ruby
xcv has joined #ruby
parduse has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Leaving...]
rjhunter has joined #ruby
matchaw has quit [Read error: Operation timed out]
parduse has joined #ruby
parduse has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
parduse has joined #ruby
matchaw has joined #ruby
xcv has quit [Ping timeout: 246 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
bradhe has joined #ruby
tkuchiki has joined #ruby
rjhunter has quit [Ping timeout: 260 seconds]
kevinykchan has quit [Ping timeout: 252 seconds]
parduse has quit []
matchaw_ has joined #ruby
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
matchaw has quit [Ping timeout: 272 seconds]
Patchou has joined #ruby
reset has quit [Quit: Leaving...]
fomatin has joined #ruby
peshalto has quit [Quit: peshalto]
p4d4w4n has quit [Quit: This computer has gone to sleep]
parduse has joined #ruby
pwh has quit []
Tamae has quit [Ping timeout: 264 seconds]
sepp2k has quit [Quit: Leaving.]
bradhe_ has quit [Ping timeout: 264 seconds]
zigomir has quit [Ping timeout: 272 seconds]
jmccune has quit [Ping timeout: 246 seconds]
morenoh159 has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
rjhunter has joined #ruby
parduse has quit []
sparrovv has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
parduse has joined #ruby
rjhunter has joined #ruby
sambao21 has quit [Ping timeout: 260 seconds]
jmccune has joined #ruby
sleepee has joined #ruby
parduse has quit []
rjhunter has quit [Ping timeout: 245 seconds]
sayan has quit [Ping timeout: 245 seconds]
<wildharvest>
Question about tdd, If I'm using an ORM like AR/Sequel, should I test that it saves to the db in the model spec or save that for the integration test?
moneydouble has joined #ruby
peshalto has joined #ruby
hiall has joined #ruby
<MrZYX>
wildharvest: don't test libs that you're using, just test your own logic
parduse has joined #ruby
<wildharvest>
MrZYX: Cool. Thats what I was taught but was a little confused. Thanks.
<wildharvest>
thats genuine, not snarky btw
epscy has quit [Ping timeout: 252 seconds]
rjhunter has joined #ruby
timonv has quit [Remote host closed the connection]
predator217 has joined #ruby
epscy has joined #ruby
petey has quit [Remote host closed the connection]
culturelabs has joined #ruby
zombiebit has joined #ruby
petey has joined #ruby
moneydouble has quit [Quit: Leaving.]
rjhunter has quit [Ping timeout: 260 seconds]
predator117 has quit [Ping timeout: 264 seconds]
zz_taion809 is now known as taion809
Lewix has joined #ruby
zombiebit has quit [Ping timeout: 240 seconds]
petey has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
rhunter has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fomatin has joined #ruby
fomatin has quit [Client Quit]
MrZYX is now known as MrZYX|off
estebistec has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
GoodTimes has quit [Ping timeout: 260 seconds]
maroloccio has quit [Quit: WeeChat 0.4.1]
kobain has joined #ruby
maroloccio has joined #ruby
timonv has joined #ruby
agjacome has quit [Ping timeout: 272 seconds]
rhunter has quit [Ping timeout: 240 seconds]
<depesz>
canton7, apeiros, MrZYX|off : updated the gist. I most likely missed something, as there was quite a lot of comments/suggestions. But it should be better (a bit?) now.
<depesz>
I'm going offline, but would want to thank you - you helped me a lot with it.
Lewix has quit [Remote host closed the connection]
zz_tsykoduk is now known as tsykoduk
meddle has joined #ruby
meddle has quit [Client Quit]
timonv has quit [Ping timeout: 264 seconds]
peshalto has quit [Quit: peshalto]
noyb has quit [Ping timeout: 265 seconds]
akhet has joined #ruby
timonv has joined #ruby
akhet has quit [Changing host]
akhet has joined #ruby
Spami has quit [Read error: Connection reset by peer]
akhet has quit [Client Quit]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
Es0teric has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
robustus has joined #ruby
drumusician has joined #ruby
k0m has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Read error: Connection reset by peer]
kofno has joined #ruby
drumusician has quit [Ping timeout: 246 seconds]
kevinykchan has joined #ruby
bradhe has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
moneydouble has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
estebistec has quit [Remote host closed the connection]
cbetta_afk is now known as cbetta
bigmac has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
bigmac is now known as i8igmac
xcv has joined #ruby
kevinykchan has quit [Ping timeout: 246 seconds]
Hanmac has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
moneydouble has quit [Ping timeout: 240 seconds]
mklappstuhl has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has joined #ruby
GoodTimes has joined #ruby
djbender has joined #ruby
djbender has quit [Client Quit]
nfk has quit [Quit: yawn]
jamesaanderson has joined #ruby
nisstyre has quit [Read error: Connection reset by peer]
nisstyre has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
bradhe has joined #ruby
volty has quit [Quit: Konversation terminated!]
hogeo has quit [Remote host closed the connection]
timonv has joined #ruby
Lewis has joined #ruby
popl has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 252 seconds]
dseitz has joined #ruby
<unstable>
Does anyone know a good/simple DFS implementation in ruby that I can look at to learn/play with it?
<unstable>
A project euler problem for example would be pretty good.
timonv has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
Lewis has quit [Ping timeout: 246 seconds]
zombiebit has joined #ruby
psyl0n has quit [Remote host closed the connection]
brupeb_ has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
brupeb has joined #ruby
zombiebit has quit [Ping timeout: 245 seconds]
justsee has quit [Ping timeout: 245 seconds]
rjhunter has joined #ruby
justsee has joined #ruby
pwh has joined #ruby
timonv has joined #ruby
sparrovv has quit [Quit: sparrovv]
danshultz has joined #ruby
rjhunter has quit [Ping timeout: 264 seconds]
timonv has quit [Ping timeout: 252 seconds]
cbetta is now known as cbetta_afk
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
withnale has quit [Read error: Connection reset by peer]
w4pm has joined #ruby
volty has joined #ruby
jrhe has quit [Ping timeout: 272 seconds]
morenoh159 has joined #ruby
estebistec has joined #ruby
xp_prg has quit [Quit: This computer has gone to sleep]
volty has quit [Client Quit]
lukec has quit [Quit: lukec]
morenoh159 has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
xp_prg has joined #ruby
mjs2600 has joined #ruby
sparrovv has joined #ruby
lucazi has joined #ruby
moneydouble has joined #ruby
Sourcele1s_ has quit [Ping timeout: 252 seconds]
DanBoy has joined #ruby
Briareos1 has quit [Remote host closed the connection]
ckinni has joined #ruby
tnk1 has quit [Ping timeout: 265 seconds]
heidi has joined #ruby
lucazi has quit [Ping timeout: 264 seconds]
volty has joined #ruby
moneydouble has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
lucazi has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamesaanderson has joined #ruby
roadt has joined #ruby
kcombs has joined #ruby
Arzaga has joined #ruby
havenwood has joined #ruby
colonolGron has quit [Quit: Lost terminal]
hadder has quit [Remote host closed the connection]
Mohan has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
vanwassen has joined #ruby
rickruby_ has quit [Remote host closed the connection]
forced_request has quit [Read error: Connection reset by peer]
jibi has quit [Quit: .]
heidi has quit [Quit: Leaving.]
<sam113101>
is it alright to use thin for production?
kitak has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
AndChat| has joined #ruby
danshultz has joined #ruby
peshalto has joined #ruby
<DanBoy>
rails?
<sam113101>
sinatra
Banistergalaxy has quit [Ping timeout: 272 seconds]
<DanBoy>
try #sinatra
bubonicpestilen has joined #ruby
bubonicpestilen has left #ruby [#ruby]
<havenwood>
sam113101: Yes, totally fine for production.
moneydouble has joined #ruby
dhruvasagar has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
<havenwood>
sam113101: I prefer Unicorn, but Thin is solid.
Arzaga has quit [Quit: Computer has gone to sleep.]
Lewix has joined #ruby
<sam113101>
OK
<sam113101>
thanks
zombiebit has joined #ruby
tsykoduk is now known as zz_tsykoduk
threesome has quit [Ping timeout: 260 seconds]
Hanmac has joined #ruby
zombiebit has quit [Ping timeout: 245 seconds]
kofno has joined #ruby
vlad_starkov has joined #ruby
peshalto has quit [Quit: peshalto]
volty has quit [Quit: Konversation terminated!]
k0m has joined #ruby
hogeo has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
peshalto has joined #ruby
Guazi has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 246 seconds]
heidi has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
xcv has quit [Remote host closed the connection]
eka has quit [Quit: Computer has gone to sleep.]
xcv has joined #ruby
echevemaster has joined #ruby
dhruvasagar has joined #ruby
Mohan__ has joined #ruby
xcv has quit [Read error: No route to host]
iliketurtles has quit [Quit: zzzzz…..]
rjhunter has joined #ruby
nonamehero has quit [Ping timeout: 240 seconds]
julweber_ has joined #ruby
petey has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
julweber has quit [Ping timeout: 245 seconds]
k0m has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rjhunter has quit [Ping timeout: 246 seconds]
nonamehero has joined #ruby
petey has quit [Ping timeout: 246 seconds]
amacgregor has joined #ruby
nonamehero has quit [Ping timeout: 240 seconds]
mjs2600 has quit [Remote host closed the connection]
<havenwood>
DanBoy: You're a MacPorts user, right? Just added Ruby dependency auto-installation for MacPorts to ruby-install. :)
amacgregor has quit [Ping timeout: 245 seconds]
root_empire has joined #ruby
sungai_keruh has joined #ruby
<dseitz>
neat, surprised that was never in there
subbyyy_ has joined #ruby
bradhe has joined #ruby
nonamehero has joined #ruby
Mohan__ has quit [Ping timeout: 264 seconds]
ambushsabre has joined #ruby
andro6778 has joined #ruby
Barrin6 has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
amoli has quit [Ping timeout: 264 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
Guest34564 has joined #ruby
brian___ has joined #ruby
hogeo has quit [Remote host closed the connection]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
Mohan__ has joined #ruby
Guest34564 has quit [Read error: Connection reset by peer]
andro6778 has quit [Client Quit]
mklappstuhl has quit [Remote host closed the connection]
AzizLight has quit [Ping timeout: 265 seconds]
robert_ has joined #ruby
mklappstuhl has joined #ruby
subbyyy_ has quit [Ping timeout: 265 seconds]
mklappstuhl has quit [Remote host closed the connection]
Megtastique has quit []
brunops has joined #ruby
three18ti has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
aryaching has joined #ruby
roadt has quit [Ping timeout: 272 seconds]
jonathanwallace has joined #ruby
timonv_ has joined #ruby
Monie has joined #ruby
radic has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 246 seconds]
w4pm has joined #ruby
<unstable>
Are there logs for this channel?
<unstable>
oops, nevermind. I see the url in the topic
<unstable>
havenwood: I want to output all the possible sequences of boxes. So all possible sequences that start with box01 are : ["box01", "box11", "box21"] ["box01", "box12"] ["box01", "box13"]
<havenwood>
unstable: The data structure appears to be a Hash. Is there some magic going on that hijacks the Hash literal?
<unstable>
So there are 3 sequences.
<unstable>
All sequences that start with box22 are: ["box22", "box11"] ["box22", "box12"] ["box22", "box13", "box03"] ["box22", "box03", "box11"] ["box22", "box03", "box12"] ["box22", "box03", "box13"], so there are 6 options that start with box22
<havenwood>
unstable: huh? so box01 is box21 match why?
<havenwood>
unstable: it has a 1?
Yayo has quit [Ping timeout: 272 seconds]
<unstable>
There are 8 different boxes, and each of them has a unique set of sequences. So far I covered 2/8 with my copy/paste into here.
jamesaanderson has quit [Client Quit]
MrLinuxSwigger has joined #ruby
<MrLinuxSwigger>
d
<MrLinuxSwigger>
hello
<havenwood>
unstable: well, if i understood the rules, getting arrays after group_by is trivial
<unstable>
havenwood: Well there will be more, so for each key, it will find all the possible ways the boxes can be stacked for each key.
AzizLight has quit [Ping timeout: 245 seconds]
<havenwood>
unstable: okay, starting to understand - actually looked at the vlues
<havenwood>
unstable: so you want the key to map to its stackables?
laphlaw has joined #ruby
<unstable>
havenwood: yes
<unstable>
havenwood: I want a list of all the possible sequences.
priyam_ has quit [Quit: Connection closed for inactivity]
<unstable>
It would be a large array, if it's empty.. it wouldn't be shown. That large array is all the boxes that start with box22 or box01, but I would also want to include the boxes that start with box02, box03, box21, box23, box11, box12, box14
culturelabs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
in php it just has to work
tsykoduk is now known as zz_tsykoduk
<shevy>
it does not want to become a perfect language
timonv has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
roolo has joined #ruby
<jrobeson>
shevy, that would imply that php was designed at all :)
<jrobeson>
although .. it is getting a lot better now..
<shevy>
it's like a melting pot
<jrobeson>
even if the old crap is still around
<shevy>
you throw in ideas and rarely remove old ideas
iliketurtles has joined #ruby
<jrobeson>
give me objects for String and Intger and i'd be happy enough
<PPH>
I read somewhere that ruby peope liked changement, python people was scared of it and php people was both... keeping old stuff and piling it with new stuff... lol
<jrobeson>
changement?
iliketurtles has quit [Client Quit]
bradhe has quit [Ping timeout: 252 seconds]
<jrobeson>
if that's a real word.. i'm not sure how i haven't heard it before
<sam113101>
it's French
<PPH>
Ah
<sam113101>
it means "change"
<PPH>
my bad
<jrobeson>
hah .. thanks :)
<jrobeson>
the python people change well enough imo..
<jrobeson>
based on 3.x .. the adoption seems to be proceeding at a steady pace
<jrobeson>
at least python had the option to import future stuff ..
<shevy>
PPH dunno... change can be good and bad everywhere
<jrobeson>
i wish ruby was changing faster myself
<shevy>
some of the new things in ruby 2.x I dont like or need
timonv has quit [Ping timeout: 246 seconds]
<jrobeson>
there's not a lot to 2.1..
monkegjinni has joined #ruby
<shevy>
well, I include 1.9 to that too as it paved the way to it, away from good old 1.8
<jrobeson>
oh.. i am so glad for 1.9 and 2 tho
<PPH>
why would you chage a perfect language?:P
<shevy>
yeah PPH
<jrobeson>
uhmm.. no such thing
<shevy>
PPH though ruby is not perfect... it is about 85% perfect
<jrobeson>
ruby can be ridiculously ambiguous sometimes
<shevy>
:)
<jrobeson>
and sometimes you have to close your hash with {}, sometimes you dn't
<jrobeson>
add a another argument at the end of what was previous parsed as a hash but without being wrapped in a {}.. and now you have to go back and wrap it
<PPH>
Hash[]!
Hanmac has joined #ruby
xcess_denied has quit [Quit: Leaving...]
emocakes has quit [Quit: Leaving...]
hogeo has quit [Remote host closed the connection]
<shevy>
yeah
<PPH>
i wish we could do {} << :key, value :P
<shevy>
what can be confusing is how things like {} are used for different things
<shevy>
like hash, and blocks
<shevy>
right
<shevy>
why does hash not have << ?
noyb has quit [Ping timeout: 245 seconds]
<jrobeson>
because it's missing whawt PPH just said
<jrobeson>
need a way to assign a key .. and you can't do it with <<
Hanmac1 has quit [Ping timeout: 245 seconds]
<jrobeson>
i'm not sure if that really looks better tho PPH
agjacome has joined #ruby
<PPH>
I still prefer ruby over every other languages I used so far... I never tried python tho..
<jrobeson>
python is nice enough
<jrobeson>
PPH, have you ever looked at smalltalk ?
<PPH>
yeah but I heard python was more system oriented and ruby more web oriented
<jrobeson>
not suggesting that you acdtually write a program in it, but you should at least take a look at some examples for it
<PPH>
jrobeson, nope
<jrobeson>
PPH, ah.. i wouldn't say that's true of the language itself at all
<jrobeson>
not at all
<jrobeson>
not even al ittle
<jrobeson>
python just happened to be in the right place to replace perl as the glue that held unix together
eka has joined #ruby
aryaching has quit []
Shidash has quit [Read error: No route to host]
<jrobeson>
so people started writing system utilities in python
emocakes has joined #ruby
<jrobeson>
and that stuff you mentioned about change.. that helps too. python has had a reasonable evolution.. so it makes it an easier choice to do such things
<jrobeson>
it's not really inherent to the language though
Tuxist has joined #ruby
<jrobeson>
and python would do just as well for web stuff.. rails just came out at the right time also
<emocakes>
ruby is nearly perfect
<emocakes>
bar the fact it is slow as a dog
<jrobeson>
ruby being good at web stuff is mostly a circumstance of hype imo..
<emocakes>
yeah
<PPH>
that's the point
<emocakes>
anyone used golang here?
<emocakes>
i really like it
<emocakes>
and its fast
<jrobeson>
i only sorta like the way golang looks
A124 has quit [Remote host closed the connection]
A124 has joined #ruby
<jrobeson>
i do like the convention over configuration aspect of go stuff out of the box tho
<jrobeson>
it's even more strict in some ways than python is
<PPH>
if i'm a sysadmin and I want to code, I'll find it easyer to get support with python, if i'm a web dev, it's gonna be easyier with ruby
<PPH>
imho
Kricir has joined #ruby
<jrobeson>
support? i'm not so sure .. i think you'd get decent support within python web stuff
<emocakes>
golang is faassst
<jrobeson>
emocakes, so is C.. and?
<jrobeson>
hell. lua is really fast too
<emocakes>
its not as painful as C joast
eka has quit [Ping timeout: 245 seconds]
<emocakes>
*jro
<emocakes>
fuck
<jrobeson>
lua with jit is close enough to native C
<emocakes>
jrobeson
<jrobeson>
and it's interpreted..
<jrobeson>
i mean duh .. sorry
<jrobeson>
lol
Hanmac has quit [Ping timeout: 240 seconds]
<emocakes>
lol
<jrobeson>
so.. how much is of hte slowness in ruby is inherent in the language design vs the intepreter ?
Hanmac has joined #ruby
<jrobeson>
the code of the interpeter*
culturelabs has joined #ruby
<jrobeson>
i haven't really tried reasonable programs with rubinus 2.x yet..
krainboltgreene has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
jeffdb has quit [Quit: jeffdb]
bradhe has quit [Ping timeout: 260 seconds]
<Ademan>
I also asked in #travis, but I want to run travis-lint... but I don't want to install it globally. I'm admittedly ignorant of most parts of ruby, but it's my understanding RVM can help me install to a quarantined environment... roughly analagous to a Python virtualenv, into which I could install the travis-lint gem, and run it from there. Is RVM my lowest path of resistance to that?
jalcine has quit [Excess Flood]
Es0teric has quit [Quit: Computer has gone to sleep.]
mengu has joined #ruby
timonv has joined #ruby
emocakes has joined #ruby
<emocakes>
me and zyzzz used to bench press togehter
<emocakes>
he was a fag
MrZYX|off is now known as MrZYX
<waxjar>
.. nice
Hanmac1 has joined #ruby
Elhu has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
coderhs has joined #ruby
marr has joined #ruby
moneydouble has joined #ruby
lyanchih has joined #ruby
hiall has quit [Quit: hiall]
timonv has quit [Remote host closed the connection]
sparrovv has joined #ruby
moneydouble has left #ruby [#ruby]
kevinykchan has joined #ruby
nisstyre has quit [Ping timeout: 260 seconds]
banghouse has quit [Quit: What if the hokey pokey really is what it's all about?]
skaflem has quit [Read error: Connection reset by peer]
skaflem has joined #ruby
zombiebit has quit [Remote host closed the connection]
zombiebit has joined #ruby
nomenkun has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
zombiebit has quit [Ping timeout: 246 seconds]
braincrash has quit [Ping timeout: 245 seconds]
krainboltgreene has joined #ruby
sparrovv has quit [Quit: sparrovv]
petey has joined #ruby
braincrash has joined #ruby
m8 has joined #ruby
jbpros has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv has joined #ruby
eka has joined #ruby
petey has quit [Ping timeout: 246 seconds]
emocakes has quit [Quit: Leaving...]
cbetta_afk is now known as cbetta
vlad_starkov has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
amacgregor has joined #ruby
vlad_sta_ has joined #ruby
liamkeily has joined #ruby
mengu has quit [Remote host closed the connection]
<shevy>
how to check if an @ivar exists?
nebula has quit [Quit: Konversation terminated!]
<MrZYX>
just checking for nil doesn't work for you?
<shevy>
or rather if it was defined
nebula has joined #ruby
<shevy>
hmm
<shevy>
let's see
<Mon_Ouie>
There's defined? @foo
<shevy>
it's those warnings
<shevy>
warning: instance variable @cut_audio not initialized
swingha has joined #ruby
<Mon_Ouie>
But why not initialize them (even to nil) in #initialize?
monkegjinni has quit [Remote host closed the connection]
<shevy>
yes I can do that
emocakes has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
swingha has quit [Client Quit]
carraroj has quit [Quit: Konversation terminated!]
jragon has joined #ruby
carraroj has joined #ruby
zipper has joined #ruby
bradhe has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
bradhe has quit [Ping timeout: 252 seconds]
Leighton has joined #ruby
marr has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
lucazi has quit [Ping timeout: 245 seconds]
roadt has quit [Ping timeout: 245 seconds]
carraroj has quit [Quit: Konversation terminated!]
dhruvasagar has joined #ruby
lucazi has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
nebula has quit [Read error: Connection reset by peer]
zombiebit has joined #ruby
shredding has joined #ruby
sayan has quit [Read error: Operation timed out]
cbetta is now known as cbetta_afk
phus1on has joined #ruby
phus1on has quit [Client Quit]
cbetta_afk is now known as cbetta
zombiebit has quit [Ping timeout: 264 seconds]
popl has quit [Ping timeout: 272 seconds]
vlad_sta_ has quit [Remote host closed the connection]
psyl0n has joined #ruby
Elhu has joined #ruby
io_syl has quit []
julweber has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
liamkeily has quit [Ping timeout: 264 seconds]
julweber has joined #ruby
banghouse2 has joined #ruby
dangerousdave has joined #ruby
devians has joined #ruby
sparrovv has joined #ruby
banghouse2 is now known as banghouse
Leighton has quit [Quit: leaving]
sepp2k has joined #ruby
krainboltgreene has quit []
timonv has joined #ruby
hiall has joined #ruby
mengu has quit [Ping timeout: 245 seconds]
kofno has joined #ruby
xue has joined #ruby
vlad_starkov has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Jdubs_ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
flops has joined #ruby
cbetta is now known as cbetta_afk
kofno has quit [Ping timeout: 245 seconds]
tylersmith has quit [Remote host closed the connection]
nomenkun has joined #ruby
mklappstuhl has joined #ruby
Jdubs has quit [Ping timeout: 260 seconds]
roadt has joined #ruby
mercwithamouth has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
manoj has joined #ruby
xcess_denied has quit [Read error: Connection reset by peer]
Briareos1 has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
sparrovv has quit [Quit: sparrovv]
vlad_sta_ has joined #ruby
coderhs has joined #ruby
<shevy>
emocakes just shows you that you must get a billionaire as well!
<shevy>
with ruby
<shevy>
no, wait
<shevy>
with ruby *ON RAILS*!
vlad_starkov has quit [Ping timeout: 245 seconds]
sparrovv has joined #ruby
vlad_starkov has joined #ruby
mojjojo has joined #ruby
simplon has quit [Ping timeout: 265 seconds]
simplon has joined #ruby
liamkeily has joined #ruby
Xeago has joined #ruby
vlad_sta_ has quit [Ping timeout: 246 seconds]
speed2 has joined #ruby
vlad_sta_ has joined #ruby
cbetta_afk is now known as cbetta
manoj has quit [Read error: Connection reset by peer]
xcess_denied has joined #ruby
timonv has joined #ruby
bradhe has joined #ruby
<emocakes>
i should make my own framework
jmeeuwen has joined #ruby
<emocakes>
ruby on rohypnol
jragon has quit [Changing host]
jragon has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
cbetta is now known as cbetta_afk
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
liamkeily has quit [Ping timeout: 260 seconds]
fixl has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 260 seconds]
jbpros has quit [Quit: jbpros]
vlad_sta_ has quit [Ping timeout: 246 seconds]
gigetoo has quit [Remote host closed the connection]
ua has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 240 seconds]
kleinerdrache has joined #ruby
Hanmac has joined #ruby
Megtastique has joined #ruby
<pac1>
in the expression h=Hash[*array], what would you call the asterisk?
preller has quit [Ping timeout: 272 seconds]
<Hanmac>
pac1: "splat"
dblack_ has joined #ruby
<pac1>
no kidding!
mikepack has quit [Ping timeout: 240 seconds]
<pac1>
got it.
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
pleal has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
ae-r has joined #ruby
hamakn has joined #ruby
pleal has joined #ruby
psyl0n has quit [Remote host closed the connection]
ua has joined #ruby
timonv has joined #ruby
flops has quit [Read error: Connection reset by peer]
flops has joined #ruby
preller has joined #ruby
shredding has quit [Quit: shredding]
zipper has quit [Quit: leaving]
estebanrules has quit []
peshalto has joined #ruby
<pac1>
If I splat an array into an array, i get just the array. If I splat an array into a hash, it behaves as if I gave it an array of two element arrays.
mmcdaris has quit [Quit: mmcdaris]
pleal has quit [Ping timeout: 245 seconds]
nism has quit [Ping timeout: 250 seconds]
<pac1>
it seems to be repeatedly supplying as many objects as needed for whatever you are constructing. Is that right?
ae-r has quit [Remote host closed the connection]
<waxjar>
if you splat an Array into Hash.[] it behaves as Hash[1,2,3,4]. Hash.[] takes an even amount of arguments as well as Arrays of form [key, value] :)
mjs2600 has quit [Remote host closed the connection]
preller has quit [Ping timeout: 264 seconds]
<Mosselman>
ayaz: thanks, I have, but I am not sure how to implement it in a method so that I get access right there and then to the file and line number.
mjs2600 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<Mosselman>
ayaz: I have a method called 'note' that I pass a message to. Along side with this 'note' I want to know where the note was created (file and line#)
khismetix has joined #ruby
<khismetix>
Quick question --- does Ruby 1.9.x support named method parameters ?
<khismetix>
or only 2.x ?
<Hanmac>
khismetix: 1.9 only supports semi-named ... so you can do func(a: 4,b: 5) but you need def func(options={}) in the method
Lightstalker has quit [Quit: leaving]
<khismetix>
thanks Hanmac
yfeldblum has quit [Remote host closed the connection]
<khismetix>
I was doing a course on pluralsight and forgot that he required 2.0 or later
Lightstalker has joined #ruby
yfeldblum has joined #ruby
peshalto has joined #ruby
preller has joined #ruby
chuk has joined #ruby
VTLob has joined #ruby
<waxjar>
Mosselman, there is #caller, which gives you a backtrace? I'm not sure that's what you mean, though.
<apeiros>
Radar: surprised that you don't know, iirc rails used yaml parser for json for abit :)
<Radar>
apeiros: TIL
<yeboot>
yeah I learned that the other day when I was looking for json parsers in C
<yeboot>
someone was like 'use the yaml lib'
<yeboot>
needless to say, i didn't follow through, so I was still unsure; haha
spike|spiegel has joined #ruby
<apeiros>
I still wouldn't use the yaml parser for json. it has some insane (= insecure) settings. or at least used to have.
ahawkins has joined #ruby
Yan__ has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
sergicles has quit [Quit: sergicles]
tonni has joined #ruby
julweber has quit [Remote host closed the connection]
<apeiros>
oh, and +1 using yaml for config
iliketurtles has joined #ruby
<apeiros>
code for config sucks IMO. hard to integrate into systems which should generate config for you.
<waxjar>
i like dotenv, but that can't be used for every kind of application unfortunately
sheap has quit [Quit: Lost terminal]
cdolan has joined #ruby
timonv has joined #ruby
<yeboot>
apeiros what do you mean on that second part? I can't make code that generates a default yaml file using the libs?
Mattias has quit [Ping timeout: 252 seconds]
<sam113101>
I find json easier to read than yaml, is that weird?
<apeiros>
other way round. it's easy to generate yaml configs from code. it's harder to generate code (e.g. .rb) config files
<apeiros>
sam113101: yes :-p
<yeboot>
ah, thanks
aspires has joined #ruby
ringaroses has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
Mattias has joined #ruby
steveeJ has joined #ruby
kofno has quit [Ping timeout: 240 seconds]
<shevy>
yeboot I usually use yaml files for config, but I also have one class called Configuration that works on that. every .yml file that is found will become a method on that object
myitcv has joined #ruby
<steveeJ>
hey, i want to try a fast hack on gitlab and don't know ruby. would appreciate quick help. how do i concatenate two %w() arrays?
<shevy>
what I dislike about yaml is that one is forced to use UTF so I am looking for a general purpose format without specific encoding attached
jkhwan has quit [Remote host closed the connection]
g3orge has quit [Quit: WeeChat 0.4.2]
dangerousdave has joined #ruby
jkhwan has joined #ruby
sharms has joined #ruby
<noob101>
What is a convention in ruby? I know some are ! (the bang method) and ? but what is the definition of the/a convention in ruby?
<RubyPanther>
Morrolan: you're right that the code example in the docs has a bug, but the text does describe the correct behavior: "Returns a new array built by concatenating the two arrays together to produce a third array."
<Morrolan>
RubyPanther: Indeed. The discrepancy between text and example was what made me suspicious in the first place. :)
<shevy>
noob101 well, the ruby parser does not care about any convention, except for capital letters
<shevy>
>> class foo; end
<eval-in>
shevy => /tmp/execpad-765c386b7e49/source-765c386b7e49:2: class/module name must be CONSTANT ... (https://eval.in/74904)
paudam has joined #ruby
<shevy>
noob101, other than that, a guideline is to have methods ending with ? return a boolen value
<MrZYX>
>> instance_variable_set :foo
<eval-in>
MrZYX => wrong number of arguments (1 for 2) (ArgumentError) ... (https://eval.in/74905)
<MrZYX>
shevy: so? :P
<shevy>
noob101, and ! methods to return the reciever object
<shevy>
hmm?
pskosinski has joined #ruby
<shevy>
noob101, and ! methods to modify the reciever object
<MrZYX>
you can't have instance variables that don't start with @ either
<noob101>
shevy ! = permanant change?
<shevy>
yeah because @ivars are not local vars
<MrZYX>
and core ! methods only return the receiver when there was a modification to it
havenwood has quit [Remote host closed the connection]
pskosinski has quit [Client Quit]
<shevy>
noob101 you could think of it like that, yeah. just look:
<snkcld>
ah.. its just weird that it uses... like, it just looks like your accessing an element of the Hash array
javierbuilder1 has joined #ruby
<DouweM>
right, looks that way, but ::[] is a method like any other in Ruby
AlSquirikou has quit [Quit: This computer has gone to sleep]
<snkcld>
other than the fact that ruby knows to pass whats inside to the [] function yea?
<DouweM>
right
<snkcld>
like, if knows that you dont want blah.[](1,2)
sepp2k1 has quit [Quit: Leaving.]
<DouweM>
well, that's actually what's happening for blah[1,2]
robbyoconnor has quit [Ping timeout: 260 seconds]
<snkcld>
yea yea
<snkcld>
OH
<snkcld>
like even if blah was really an array
<DouweM>
that's how operator overloading works in ruby
<DouweM>
yes!
<snkcld>
haha
<DouweM>
it's just the #[key] method
<ddd>
i understand what you did, but i'll be a monkey's uncle if i can walk the steps. the mapping of k,v made an anonymouse array, with k as arr[0] and v as arr[0]'s value or arr[0][1] ?
<snkcld>
but yea, its just strange that whoever wrote Hash would want the functionality accessed like "Hash[]", because still, it looks like youre getting make a value of an array, but really its just converting an array for you
<DouweM>
ddd: that's how #to_a and #map work on hash
<DouweM>
snkcld: right. in this case you shouldn't think about getting/indexing
<DouweM>
snkcld: There's Array[] as well
<ddd>
ohhhh
<DouweM>
which doesn't index either
<snkcld>
DouweM: hmm. strange. maybe its just my naivete
<ddd>
don't know why that last one was so much easier to read than your first
javierbuilder1 has joined #ruby
<DouweM>
ddd: ;) and Hash[that_array] will turn it into a hash again:
<DouweM>
>> Hash[{:k1 => :v1, :k2 => :v2}.to_a]
<snkcld>
i mean i can see why you would want to make it look like youre indexing an array, when rly theres more stuff happening behind the scenes, but im notseeing the logic behind Hash
<eval-in>
snkcld => /tmp/execpad-1faef7a4e072/source-1faef7a4e072:2: warning: wrong element type Fixnum at 0 (expected array) ... (https://eval.in/74938)
<snkcld>
>> Hash[[1,2]]
<eval-in>
snkcld => /tmp/execpad-895dbcfe6662/source-895dbcfe6662:2: warning: wrong element type Fixnum at 0 (expected array) ... (https://eval.in/74939)
colonolGron has quit [Quit: Lost terminal]
<snkcld>
ill just read up more baout i
<snkcld>
but yea, what yall gave me is working perfectly. so thanks
colonolGron has joined #ruby
<DouweM>
snkcld: what you're ding now is passing [1,2] to Hash[]. but Hash[] expects an array *of arrays*. so [[1,2]], so Hash[[[1,2]]]
<DouweM>
ddd: it's not access to a multidimensional array, array[i, n] reads n objects starting from index i
<snkcld>
ok, im kinda seeing whats going on in the snippet youre giving me. the Hash[] stuff is being conformed to via [changed_field, change_set.map(&:to_s)]
mjs2600 has quit [Remote host closed the connection]
<snkcld>
so yea the idea is you conform to this [k,v] order, then use Hash to hash it
timonv has joined #ruby
<DouweM>
snkcld: yup
xcv has quit [Remote host closed the connection]
sambao21 has joined #ruby
<snkcld>
well, i must say, im def into it. i mean, the reason this is being done is to leverage .map
xcv has joined #ruby
<snkcld>
that is, using .each, if wouldnt be needed, i could just use a temp var some where, return that
<ddd>
i'm getting a lesson. works for me :)
<snkcld>
but to leverage map in this way, we need to Hash[ [k,v]]
<DouweM>
snkcld: right
<snkcld>
good god
pleal has quit [Ping timeout: 246 seconds]
<snkcld>
so different.
<snkcld>
is this Hash[] <-> .map <-> [k,v] usage common?
<DouweM>
snkcld: also note that Hash#each and Hash#map actually pass [key, value] to the block. so hash.each { |pair| key = pair[0]; value = pair[1]; }
<DouweM>
snkcld: this can be written as hash.each { |(key, value)| ... }
<snkcld>
uh huh
<ddd>
DouweM: now THAT i'm used to seein
mojjojo has quit [Quit: mojjojo]
<ddd>
g
<DouweM>
and Ruby is also smart enough to have hash.each { |key, value| ... } work
<DouweM>
snkcld: #map <> Hash[] is somewhat common, yeah
<ddd>
so #map is equal to the |pair| key =... example?
<ddd>
map throws me quite often
timonv has quit [Ping timeout: 240 seconds]
<DouweM>
ddd: hash.map basically does hash.to_a.map. so from that point you're dealing with the [[k,v]] array
<ddd>
i don't really understand its workings for sure. so i avoid it