snsei has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
lsegal has joined #ruby-lang
michaeldeol has quit [Ping timeout: 246 seconds]
snsei_ has joined #ruby-lang
snsei_ has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
snsei has joined #ruby-lang
tt1187 has quit [Ping timeout: 246 seconds]
lewix has joined #ruby-lang
CoreData has quit [Quit: CoreData]
DevDoo has quit [Ping timeout: 240 seconds]
matp has quit [Ping timeout: 260 seconds]
ledestin has joined #ruby-lang
snsei has quit [Remote host closed the connection]
tectonic has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
xxaM has joined #ruby-lang
ulisescab has quit []
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
vlad_starkov has joined #ruby-lang
snsei has joined #ruby-lang
ffio has quit [Quit: WeeChat 0.4.1]
kitak has quit [Ping timeout: 245 seconds]
matp has joined #ruby-lang
drollwit has joined #ruby-lang
drollwit has quit [Remote host closed the connection]
drollwit has joined #ruby-lang
kitak has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Mellett68 has quit [Quit: No Ping reply in 180 seconds.]
drollwit has quit [Ping timeout: 246 seconds]
symm- has joined #ruby-lang
achiu1 has quit [Quit: WeeChat 0.4.2]
ender__ has joined #ruby-lang
achiu has joined #ruby-lang
ender_ has quit [Ping timeout: 240 seconds]
anulman has joined #ruby-lang
<MartynKeigher>
hey all... have a Q regarding the mysql2 gem. instead of writing the mysql connection string (ip, name, pass) in every rb file on a dash, how can i have ONE CENTRAL "odbc connection file" and let my RB jobs (that contain the sql query) see that file, in order to get the sql data to display.
<darix>
MartynKeigher: sure
<MartynKeigher>
hey!
<MartynKeigher>
evening! :)
<darix>
just add some code that reads the stuff from the format of your choice
<MartynKeigher>
so i created a file (in same folder as my rb jobs) called mysql.ini and also tried mysql.php and marked them as the requirement (instead of the mysql2 gem) but no dice.
<darix>
so add some code which reads from a yaml file e.g.
<MartynKeigher>
im kinda new at this... but i do know the yaml that you speak of.
<MartynKeigher>
looking in there now
<darix>
you will still need the mysql2 gem
<MartynKeigher>
right
<MartynKeigher>
OH..i will CREATE a yaml file?
<MartynKeigher>
k.. let me see what the current one looks like. sorry i misread what you put before lol
michaeldeol has joined #ruby-lang
<MartynKeigher>
i have the mysql2 gem bundled and it does work
<MartynKeigher>
just want to centralize the "odbc bit"
Coincidental has joined #ruby-lang
<charliesome>
headius: ping
<MartynKeigher>
so how should my odbc connection file look ?
havenwood has quit [Remote host closed the connection]
<MartynKeigher>
are there examples anywhwere out there?
ffio has joined #ruby-lang
tectonic has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Ping timeout: 264 seconds]
amclain has joined #ruby-lang
lfox has joined #ruby-lang
havenwood has joined #ruby-lang
lfox has quit [Ping timeout: 240 seconds]
<MartynKeigher>
any suggestions please?
achiu has quit [Ping timeout: 240 seconds]
achiu has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
aef has joined #ruby-lang
tectonic has joined #ruby-lang
bzalasky has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.2]
|jemc| has joined #ruby-lang
Coincidental has joined #ruby-lang
michaeldeol has joined #ruby-lang
tectonic has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
tectonic has joined #ruby-lang
stonerfish has joined #ruby-lang
achiu has quit [Ping timeout: 240 seconds]
stonerfish has quit [Client Quit]
daikan has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
CaptainJet has quit []
anekos_ has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
mistym_ has quit [Remote host closed the connection]
anekos_ has joined #ruby-lang
ando has joined #ruby-lang
DevDoo has joined #ruby-lang
kitak has quit [Remote host closed the connection]
ando has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
wuhua has joined #ruby-lang
vpretzel has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
dingus_khan has quit [Remote host closed the connection]
kitak has joined #ruby-lang
ffio has quit [Quit: WeeChat 0.4.2]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
nisstyre has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby-lang
ffio has joined #ruby-lang
xxaM has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 264 seconds]
|jemc| has quit [Ping timeout: 264 seconds]
symm- has joined #ruby-lang
|jemc| has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ando has joined #ruby-lang
mbj has quit [Read error: Operation timed out]
ando_ has joined #ruby-lang
mistym has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
amclain_ has joined #ruby-lang
LanceHaig has quit [Ping timeout: 245 seconds]
yellow5 has quit [Ping timeout: 240 seconds]
amclain has quit [Read error: Connection reset by peer]
michd has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
ando__ has joined #ruby-lang
ando_ has quit [Remote host closed the connection]
ando has quit [Remote host closed the connection]
ando__ has quit [Remote host closed the connection]
ando has joined #ruby-lang
igalic has quit [Ping timeout: 260 seconds]
knu1 has joined #ruby-lang
bzalasky_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
fallenhitokiri has quit [Ping timeout: 245 seconds]
phus1on has quit [Ping timeout: 245 seconds]
knu0 has quit [Ping timeout: 240 seconds]
dhoss_ has quit [Ping timeout: 240 seconds]
fallenhi1okiri has joined #ruby-lang
michd has joined #ruby-lang
dhoss has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
yellow5 has joined #ruby-lang
xsdg has quit [Ping timeout: 245 seconds]
kvs has quit [Ping timeout: 260 seconds]
RobertBirnie has joined #ruby-lang
phus1on has joined #ruby-lang
dvorak has quit [Remote host closed the connection]
wuhua has quit [Read error: Connection reset by peer]
kvs has joined #ruby-lang
dvorak has joined #ruby-lang
anulman has quit [Quit: Leaving.]
soahccc has quit [Ping timeout: 260 seconds]
soahccc has joined #ruby-lang
xsdg has joined #ruby-lang
snk has quit [Ping timeout: 252 seconds]
igalic has joined #ruby-lang
xsdg has quit [Ping timeout: 240 seconds]
mistym_ has joined #ruby-lang
bradcliffe has joined #ruby-lang
kitak has quit [Remote host closed the connection]
drollwit has joined #ruby-lang
xsdg has joined #ruby-lang
tkuchiki has joined #ruby-lang
mistym has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby-lang
kitak has joined #ruby-lang
xsdg has quit [Ping timeout: 240 seconds]
xsdg has joined #ruby-lang
snk has joined #ruby-lang
xsdg has quit [Ping timeout: 246 seconds]
snk has quit [Remote host closed the connection]
xsdg has joined #ruby-lang
drollwit has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xsdg has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Operation timed out]
xsdg has joined #ruby-lang
RobertBirnie has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
vpretzel has quit [Ping timeout: 246 seconds]
daikan has joined #ruby-lang
mucker has joined #ruby-lang
savagecroc has joined #ruby-lang
snk has joined #ruby-lang
xsdg has quit [Ping timeout: 264 seconds]
daikan has quit [Ping timeout: 246 seconds]
xsdg has joined #ruby-lang
kitak has quit [Remote host closed the connection]
WJW has quit [Quit: Page closed]
snk has quit [Ping timeout: 246 seconds]
xsdg has quit [Remote host closed the connection]
xsdg has joined #ruby-lang
savagecroc has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
snk has joined #ruby-lang
vpretzel has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
<apeiros>
also note that &&= and ||= are special cased, they expand to a && a = b
<csaunders>
since I'm working with booleans it really doesn't matter, but I'll stick with &&
<csaunders>
ah
lewix has joined #ruby-lang
tylersmi_ has quit [Read error: Connection reset by peer]
<|jemc|>
yeah, so if b is a method with side effects, it is never executed unless a is truthy
<|jemc|>
with &&=
tylersmith has joined #ruby-lang
<|jemc|>
due to the special case expansion that apeiros noted
<pipecloud>
TIL &&=
<Mon_Ouie>
And even that expansion is not entirely true (if a is not defined yet, a &&= x doesn't cause an error, a && a = x will)
<|jemc|>
that's an interesting part I didn't know
serroft has joined #ruby-lang
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<|jemc|>
wait, that still is true for a && a = b, right?
<|jemc|>
>> x && x = [5]
<eval-in>
|jemc| => undefined local variable or method `x' for main:Object (NameError) ... (https://eval.in/85552)
<|jemc|>
heh, never mind then
<|jemc|>
>> x &&= [5]
<Mon_Ouie>
Don't know why it isn't responding, but it outputs nil: https://eval.in/85553
mbj has quit [Ping timeout: 260 seconds]
arBmind has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
pyk has joined #ruby-lang
havenwood has joined #ruby-lang
Asher has quit [Quit: Leaving.]
breakingthings has quit []
madb055 has quit [Ping timeout: 272 seconds]
lfox has quit [Quit: ZZZzzz…]
mbj has joined #ruby-lang
pyk has left #ruby-lang [#ruby-lang]
Rodrigo_ has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
benlovell has quit [Quit: leaving]
mbj has quit [Ping timeout: 272 seconds]
tt1187 has quit [Ping timeout: 246 seconds]
tedstriker has quit [Quit: Anti-Fraping status set.]
tedstriker has joined #ruby-lang
lewix_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
Rodrigo_ has left #ruby-lang [#ruby-lang]
Rodrigo5244 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<Rodrigo5244>
May I ask questions about the Ruby language here?
symm- has quit [Ping timeout: 265 seconds]
<havenwood>
Rodrigo5244: Yes, of course. :)
daikan has joined #ruby-lang
<Rodrigo5244>
I think that somebody else have asked that before, but I could not find a good answer on Google. Why Ruby does not have the increment operator ++?
<yorickpeterse>
not sure, it does have += though
<yorickpeterse>
I'd say "Because numbers are immutable and that would modify it directly" but this is, from what I know, true for other languages as well
<wmoxam>
Rodrigo5244: Self cannot be a target of assignment
<apeiros>
Rodrigo5244: hell no, this is about gemstomes. wtf…
<apeiros>
oh, wrong channel to pull that one actually, damn :(
daikan has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
lewix has quit [Remote host closed the connection]
<yorickpeterse>
THIS CHANNEL IS NOW ABOUT..CATS!
DevDoo has quit [Remote host closed the connection]
<apeiros>
no, count yorick, it is not.
michael_mbp has joined #ruby-lang
DevDoo has joined #ruby-lang
breakingthings has joined #ruby-lang
lewix_ has left #ruby-lang [#ruby-lang]
DevDoo has quit [Read error: No route to host]
<Rodrigo5244>
I read that page before. It looks like that is a reason why you can't write a method to do that, but maybe even without being able to write a method you could have that in the language.
DevDoo has joined #ruby-lang
lewix has joined #ruby-lang
seanlinsley has quit [Quit: …]
seanlinsley has joined #ruby-lang
<wmoxam>
Rodrigo5244: well the other reason is the author didn't want to support it
<apeiros>
Rodrigo5244: you could have ruby perform a transformation of a++ to a = a.succ or similar. they chose not to. end of story.
DevDoo_ has joined #ruby-lang
<yorickpeterse>
apeiros: count *von* Yorick, get it right
DevDoo has quit [Read error: Connection reset by peer]
<apeiros>
only 'von'? not 'von und zu'?
<apeiros>
tssssk…
DevDoo_ has quit [Remote host closed the connection]
houhoulis has joined #ruby-lang
Asher has joined #ruby-lang
<csaunders>
I'd be down for the channel being about cats
<apeiros>
csaunders: found one
<apeiros>
or actually… there probably already is one
<csaunders>
this channel
<csaunders>
not the channel
symm- has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
simoz9 has joined #ruby-lang
<jalcine>
let's keep it ruby, okthx
jperry2 has quit [Ping timeout: 252 seconds]
daikan has joined #ruby-lang
<csaunders>
the cat
<jalcine>
the gem
senj has joined #ruby-lang
P0bailey has quit [Remote host closed the connection]
<havenwood>
I need to setup a github account for my cat at once.
<apeiros>
yorickpeterse: the stereotype? you're a crazy old cat lady?
<havenwood>
We pair program Ruby enough and I take all the credit...
<yorickpeterse>
apeiros: yes
<apeiros>
:D
toretore has quit [Quit: This computer has gone to sleep]
<|jemc|>
the cat's name?
<apeiros>
through a friend I discovered that that title exists in WoW (crazy cat lady)
<yorickpeterse>
|jemc|: "mouse"
<yorickpeterse>
Animal shelter named him that way
nhmood_ has quit []
nhmood has joined #ruby-lang
mbj has joined #ruby-lang
<Rodrigo5244>
I had to leave the room for some time. Sorry. I know that smalltalk does not have it either. I was wondering if that has something to do with object orientation. Also one reason that comes to mind to not have it is the difference between ++x and x++ that is confusing to some.
<|jemc|>
yorickpeterse: you kept the name from the shelter? and you call yourself a cat lady... pff.
mitchty_ has joined #ruby-lang
<csaunders>
we kept our cat shelter names for our cats too
<|jemc|>
but naming your cat is half the fun!
<csaunders>
I am terrible at naming things, it's probably for the better
marr has joined #ruby-lang
P0bailey has joined #ruby-lang
<yorickpeterse>
|jemc|: yeah, it's his legal name
<yorickpeterse>
I usually just call him "cat" though
iamlacroix has joined #ruby-lang
seanlinsley has quit [Quit: …]
<|jemc|>
ah, cats have legal names in Dutchland?
<|jemc|>
I don't think that's true of here in the US
<|jemc|>
but I could be ill-informed
seanlinsley has joined #ruby-lang
iamlacroix has quit [Remote host closed the connection]
iamlacroix has joined #ruby-lang
mbj has quit [Ping timeout: 260 seconds]
iamlacroix has quit [Client Quit]
Senjai`work has quit [Ping timeout: 272 seconds]
<yorickpeterse>
he has a passport
<yorickpeterse>
and is chipped
<|jemc|>
a passport? interesting indeed
<csaunders>
that's intense
<yorickpeterse>
yeah, we have cat passports
<csaunders>
I think you need an equivalent to import pets across the Canada / US border
<bougyman>
seriously?
<csaunders>
might just be vaccination records though
FiXato has quit [Max SendQ exceeded]
sree has quit [Remote host closed the connection]
<yorickpeterse>
cats and dogs are required to be registered here
FiXato has joined #ruby-lang
toretore has joined #ruby-lang
<csaunders>
Apparently they are in Toronto, nobody cares though. It's one of those laws that aren't really enforced.
tedstriker has quit [Quit: Anti-Fraping status set.]
brianpWins has quit [Quit: brianpWins]
tt1187 has joined #ruby-lang
deception has quit [Quit: Goodbye]
sree_ has joined #ruby-lang
seanlinsley has quit [Quit: …]
sree_ is now known as Guest63174
mbj has joined #ruby-lang
Asher has quit [Quit: Leaving.]
Senjai`work has joined #ruby-lang
vpretzel has quit [Ping timeout: 252 seconds]
lele has quit [Ping timeout: 246 seconds]
mistym has joined #ruby-lang
lele has joined #ruby-lang
mistym has quit [Ping timeout: 245 seconds]
jtzero1 has joined #ruby-lang
jtzero1 has left #ruby-lang [#ruby-lang]
Lewis has joined #ruby-lang
vpretzel has joined #ruby-lang
sio has quit [Quit: WeeChat 0.4.2]
ecnalyr has quit [Ping timeout: 245 seconds]
bzalasky has joined #ruby-lang
madb055 has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
Asher1 has joined #ruby-lang
Lewis has quit [Ping timeout: 272 seconds]
seanlinsley has joined #ruby-lang
madb055 has quit [Ping timeout: 252 seconds]
vpretzel_ has joined #ruby-lang
vpretzel has quit [Disconnected by services]
vpretzel_ is now known as vpretzel
dingus_khan has joined #ruby-lang
seanlinsley has quit [Ping timeout: 272 seconds]
ahmedelgabri has quit []
joast has quit [Quit: Leaving.]
joast has joined #ruby-lang
seanlinsley has joined #ruby-lang
ecnalyr has joined #ruby-lang
soahccc has quit [Read error: Operation timed out]
simoz9 has quit [Ping timeout: 272 seconds]
Senjai`work has quit [Ping timeout: 245 seconds]
dingus_khan has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
Senjai`work has joined #ruby-lang
simoz9 has joined #ruby-lang
dingus_k_ has joined #ruby-lang
dingus_k_ has quit [Remote host closed the connection]
dingus_k_ has joined #ruby-lang
dingus_k_ has quit [Client Quit]
dingus_khan has joined #ruby-lang
jeer has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mbj has quit [Ping timeout: 272 seconds]
jeer has joined #ruby-lang
pyk has joined #ruby-lang
<eam>
what's the ruby way to select multiple values from an array, along the lines of a perl array slice aka @foo[1,4,7]
houhoulis has quit [Remote host closed the connection]
simoz9 has quit [Ping timeout: 260 seconds]
<eam>
that is, take multiple keys/indicies and return an Array of the matching values
<onewheelskyward>
Pretty sure you can foo[1,4,7]
<onewheelskyward>
oh that's a range
<eam>
foo[1,4] appears to define a range, and more args raises ArgumentError