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
tpendragon_ has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
nebiros has joined #ruby
drol has left #ruby [#ruby]
govg has quit [Ping timeout: 260 seconds]
griffindy has joined #ruby
case__ has joined #ruby
saneax-_-|AFK has joined #ruby
Seich has joined #ruby
solocshaw has joined #ruby
bruce_lee has quit [Remote host closed the connection]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beilabs has joined #ruby
solocshaw has quit [Ping timeout: 256 seconds]
cschneid_ has joined #ruby
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
brent__ has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
cagomez has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
RickHull has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
mim1k has joined #ruby
nettoweb has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
nettoweb has quit [Client Quit]
hahuang61 has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 240 seconds]
sparky has joined #ruby
bkxd has joined #ruby
rrichardsr3 has joined #ruby
Iacobus__ has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
agent_white has quit [Quit: leaving]
bkxd has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
ResidentBiscuit has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
ResidentBiscuit has quit [Remote host closed the connection]
hobodave has joined #ruby
EckT has quit [Ping timeout: 240 seconds]
marxarelli is now known as marxarelli|afk
skweek has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
kht has joined #ruby
hobodave has quit [Ping timeout: 264 seconds]
cpruitt has quit [Ping timeout: 255 seconds]
enterprisey has quit [Remote host closed the connection]
Slinky_Pete has quit [Remote host closed the connection]
cpruitt has joined #ruby
nertzy has joined #ruby
parsnip has joined #ruby
DTZUZU2 has quit [Quit: WeeChat 1.5]
whathappens has quit [Quit: Leaving...]
KCmetro has quit [Remote host closed the connection]
choke has quit [Ping timeout: 255 seconds]
EckT has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
knutmithut has quit [Remote host closed the connection]
Puffball has joined #ruby
Guest46409 has quit [Ping timeout: 260 seconds]
Puffball_ has quit [Ping timeout: 245 seconds]
gloscombe_ has quit [Quit: gloscombe_]
marxarelli|afk is now known as marxarelli
marxarelli is now known as marxarelli|afk
mim1k has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
astrobunny has joined #ruby
brent__ has quit [Ping timeout: 258 seconds]
mim1k has quit [Ping timeout: 260 seconds]
marchelzo has joined #ruby
<marchelzo> hello ruby family
montanonic has quit [Ping timeout: 240 seconds]
Guest15205 has quit [Read error: Connection reset by peer]
EckT has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
EckT has joined #ruby
marr has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
johnzorn has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
agent_white has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
nertzy has joined #ruby
A_Drone has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
whathappens has joined #ruby
roamingdog has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
<newrubycoder> hey marchelzo
whathappens has quit [Remote host closed the connection]
<marchelzo> newrubycoder: hey!
<marchelzo> happy valentine's day
<newrubycoder> i spent it with a special girl
<newrubycoder> her name is Ruby xD
Channel6 has joined #ruby
<marchelzo> hahaha
cagomez has quit []
<marchelzo> she really is a special girl
bigtawm has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
<marchelzo> that's a great way to spend valentine's day
markholmes has quit [Remote host closed the connection]
<bigtawm> Im currently building a chess app, and I am having trouble checking for check,checkmate, and stalemate. Any advice on how I should approach the problem? I am representing my chessboard as an 8x8 matrix made by a two dimensional array.
kht has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
<marchelzo> bigtawm: cool
<marchelzo> chess is fun
<marchelzo> check is easy to check (haha) for
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jcao219 has joined #ruby
<marchelzo> i guess checkmate is pretty easy too
<bigtawm> Would that just be checking all directions from my king to see if there is a piece that can take it right?
bkxd has joined #ruby
Slinky_Pete has joined #ruby
<bigtawm> I was thinking of doing that, and would checkmate be moving my king in all directions and seeing if it would be in check there?
<marchelzo> right
<marchelzo> for check i'd just iterate over all pieces on the board and see whether they could take the king
<marchelzo> and then checkmate is just, for the kings current position and any position he could move into, is he in check in all of them?
<marchelzo> stalemate is similar except he's not in check in his current position
<bigtawm> Oh okay I have a function that returns if a move is possible so if it ever returns true on the board going from a space to the king this it would be check
<marchelzo> exactly
maneco has joined #ruby
KCmetro has joined #ruby
<bigtawm> Cool so I could have a function that checks for check in his current position then one that checks for all the possible moves
nettoweb has quit [Ping timeout: 260 seconds]
Klumben has joined #ruby
PrepperJack has joined #ruby
Slinky_Pete has quit [Ping timeout: 240 seconds]
<marchelzo> yeah. i would make a method called safe? or something, that takes a position and returns true if none of the opposing pieces can move to that position
bkxd has quit [Ping timeout: 258 seconds]
<marchelzo> hmm actually checkmate is harder
<marchelzo> never mind
<marchelzo> because you could move a different piece other than the king to get him out of check
<bigtawm> Yeah or I could take a piece with the king I just thought of that. Or that might be covered when checking the surrounding spots
<marchelzo> the naive way isn't very efficient but maybe it would be fine since the board is small
<marchelzo> i'm sure there are optimized algorithms for this somewhere though
<marchelzo> probably papers on it
_djbkd has quit [Quit: My people need me...]
KCmetro has quit [Ping timeout: 258 seconds]
nettoweb has joined #ruby
<bigtawm> Yeah maybe I should instance another array that maps all the spots and see which pieces protect them or something like that
tyang_ has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
millerti has joined #ruby
<bigtawm> Either way I think I know what direction I should go toward thanks again you've helped me with some things in the past haha
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<marchelzo> no problem
<marchelzo> have fun
gusrub has quit [Remote host closed the connection]
alem0lars has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
t-recx has quit [Quit: t-recx]
__Yiota has joined #ruby
solocshaw has joined #ruby
SeepingN_ has quit [Ping timeout: 240 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs has quit [Remote host closed the connection]
PrepperJack has left #ruby ["Leaving"]
enterprisey has quit [Remote host closed the connection]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has joined #ruby
Derperperd has joined #ruby
mim1k has joined #ruby
duderonomy has joined #ruby
brent__ has joined #ruby
duderono_ has quit [Ping timeout: 240 seconds]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
Derperperd has quit [Ping timeout: 264 seconds]
UnknownSoldier has quit [Remote host closed the connection]
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
JoshS has joined #ruby
LoneHermit has joined #ruby
brent__ has quit [Ping timeout: 268 seconds]
LoneHermit has quit [Remote host closed the connection]
lanc has joined #ruby
LoneHermit has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
jzigmund has quit [Ping timeout: 240 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
safetypin has joined #ruby
Chagel has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
nankyokusei has joined #ruby
Definity has joined #ruby
jameser has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
roamingdog has quit [Remote host closed the connection]
TPug has joined #ruby
Lyfe_ is now known as Lyfe
nankyokusei has quit [Ping timeout: 258 seconds]
lanc has joined #ruby
hahuang61 has joined #ruby
bkxd has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
beilabs has joined #ruby
hutch34 has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
beilabs has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
jenrzzz has joined #ruby
sparky has quit [Quit: leaving]
mim1k has quit [Ping timeout: 276 seconds]
hutch34 has quit [Ping timeout: 258 seconds]
UnknownSoldier has joined #ruby
hutch34 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
malconis has quit [Read error: Connection reset by peer]
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jaffejoe has joined #ruby
malconis has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
mlindahl_ has quit [Remote host closed the connection]
joneshf-laptop has quit [Read error: No route to host]
mlindahl has joined #ruby
mlindahl has quit [Remote host closed the connection]
mlindahl has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
n0wz has joined #ruby
acosonic2 has joined #ruby
TomyLobo has quit [Disconnected by services]
Silthias has joined #ruby
mistermocha has joined #ruby
iujeorqecvbxanan has joined #ruby
iujeorqecvbxanan is now known as vtvfiddfivizgmwj
vtvfiddfivizgmwj is now known as TomyLobo
Brak___________ has joined #ruby
nopacien13 has joined #ruby
vondruch__ has joined #ruby
cardoni_ has joined #ruby
staticfox` has joined #ruby
staticfox has quit [Disconnected by services]
Some-body_ has joined #ruby
moogumbo_ has joined #ruby
daxroc_ has joined #ruby
darthvorik_ has joined #ruby
marens_ has joined #ruby
marens_ has joined #ruby
marens_ has quit [Changing host]
boxrick1_ has joined #ruby
weez17_ has joined #ruby
staticfox` is now known as staticfox
knowtheory_ has joined #ruby
JoshS has quit [Quit: Leaving]
Asher has joined #ruby
bastilian_ has joined #ruby
artmann_ has joined #ruby
d^sh_ has joined #ruby
_2easy_ has joined #ruby
chihhsin has joined #ruby
maxmanders has joined #ruby
\13k_ has joined #ruby
DefV_ has joined #ruby
Mr_Pancake- has joined #ruby
ByronJohnson has joined #ruby
atmosx_aws has joined #ruby
ineb has joined #ruby
^raz^ has joined #ruby
pookie has joined #ruby
Paradox has joined #ruby
angseus_ has joined #ruby
veloutin_ has joined #ruby
bazz_ has joined #ruby
rideh- has joined #ruby
LambdaSi1 has joined #ruby
rprimus_ has joined #ruby
qguv_ has joined #ruby
bmn_ has joined #ruby
Liothen- has joined #ruby
M107262[m]1 has joined #ruby
Prira_ has joined #ruby
Alina-malina_ has joined #ruby
russt_ has joined #ruby
squarebracket1 has joined #ruby
djellemah_ has joined #ruby
Cyrus has joined #ruby
VladGh_ has joined #ruby
infernix has quit [Ping timeout: 255 seconds]
Mr_Pancake has quit [Ping timeout: 255 seconds]
trollface has quit [Ping timeout: 255 seconds]
maxmanders_ has quit [Ping timeout: 255 seconds]
raz has quit [Ping timeout: 255 seconds]
rideh has quit [Ping timeout: 255 seconds]
bazzy has quit [Ping timeout: 255 seconds]
Liothen has quit [Ping timeout: 255 seconds]
dellavg has quit [Ping timeout: 255 seconds]
d^sh has quit [Ping timeout: 255 seconds]
bigtawm has quit [Ping timeout: 255 seconds]
qguv has quit [Ping timeout: 255 seconds]
gnarf has quit [Ping timeout: 255 seconds]
knowtheory has quit [Ping timeout: 255 seconds]
sspreitz has quit [Ping timeout: 255 seconds]
ruby[bot] has quit [Ping timeout: 255 seconds]
Silthias1 has quit [Ping timeout: 255 seconds]
Yonk_ has quit [Ping timeout: 255 seconds]
acosonic has quit [Ping timeout: 255 seconds]
ineb_ has quit [Ping timeout: 255 seconds]
nOwz has quit [Ping timeout: 255 seconds]
cardoni has quit [Ping timeout: 255 seconds]
darthvorik has quit [Ping timeout: 255 seconds]
Brak__________ has quit [Ping timeout: 255 seconds]
johnkpaul has quit [Ping timeout: 255 seconds]
coredump has quit [Ping timeout: 255 seconds]
DefV has quit [Ping timeout: 255 seconds]
angseus has quit [Ping timeout: 255 seconds]
bmn has quit [Ping timeout: 255 seconds]
Guest46501 has quit [Ping timeout: 255 seconds]
chihhsin_ has quit [Ping timeout: 255 seconds]
ByronJoh1son has quit [Ping timeout: 255 seconds]
Alina-malina has quit [Ping timeout: 255 seconds]
cjk101010 has quit [Ping timeout: 255 seconds]
eblip has quit [Ping timeout: 255 seconds]
djellemah has quit [Ping timeout: 255 seconds]
julian has quit [Ping timeout: 255 seconds]
marens has quit [Ping timeout: 255 seconds]
Caius has quit [Ping timeout: 255 seconds]
weez17 has quit [Ping timeout: 255 seconds]
boxrick1 has quit [Ping timeout: 255 seconds]
bastilian has quit [Ping timeout: 255 seconds]
daxroc has quit [Ping timeout: 255 seconds]
moogumbo has quit [Ping timeout: 255 seconds]
rprimus has quit [Ping timeout: 255 seconds]
atmosx has quit [Ping timeout: 255 seconds]
\13k has quit [Ping timeout: 255 seconds]
_2easy has quit [Ping timeout: 255 seconds]
M107262[m] has quit [Ping timeout: 255 seconds]
squarebracket has quit [Ping timeout: 255 seconds]
veloutin has quit [Ping timeout: 255 seconds]
xsdg has quit [Ping timeout: 255 seconds]
olspookishmagus has quit [Ping timeout: 255 seconds]
nopacienc3 has quit [Ping timeout: 255 seconds]
russt has quit [Ping timeout: 255 seconds]
gremax has quit [Ping timeout: 255 seconds]
crayfishx_ has quit [Ping timeout: 255 seconds]
DarthGandalf has quit [Ping timeout: 255 seconds]
VladGh has quit [Ping timeout: 255 seconds]
vondruch_ has quit [Ping timeout: 255 seconds]
roger_rabbit has quit [Ping timeout: 255 seconds]
sspreitz has joined #ruby
artmann has quit [Ping timeout: 255 seconds]
Prira has quit [Ping timeout: 255 seconds]
camilasan has quit [Ping timeout: 255 seconds]
LambdaSix has quit [Ping timeout: 255 seconds]
alamar has joined #ruby
cjk101010 has joined #ruby
bigtawm has joined #ruby
camilasan has joined #ruby
Caius has joined #ruby
^raz^ is now known as raz
Mr_Pancake- is now known as Mr_Pancake
Some-body_ is now known as DarthGandalf
\13k_ is now known as \13k
acosonic2 is now known as acosonic
Caius has joined #ruby
Caius has quit [Changing host]
raz has joined #ruby
raz has quit [Changing host]
Liothen- is now known as Liothen
Cyrus is now known as Guest91357
admin1 has joined #ruby
alamar is now known as Guest66195
mistermocha has quit [Ping timeout: 256 seconds]
darthvorik_ is now known as darthvorik
knowtheory_ is now known as knowtheory
cgfbee has quit [Excess Flood]
cardoni_ is now known as cardoni
chouhoulis has joined #ruby
eblip has joined #ruby
Yonk_ has joined #ruby
moogumbo_ is now known as moogumbo
yo61 has quit [Ping timeout: 245 seconds]
hutch34 has quit [Ping timeout: 258 seconds]
__Yiota has joined #ruby
raspado has quit [Remote host closed the connection]
bastilian_ is now known as bastilian
daxroc_ is now known as daxroc
johnkpaul has joined #ruby
cgfbee has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
gnarf_ has joined #ruby
nofxxx has joined #ruby
astrobunny has quit [Remote host closed the connection]
boxrick1_ is now known as boxrick1
xsdg has joined #ruby
mim1k has joined #ruby
yo61 has joined #ruby
dellavg has joined #ruby
maneco has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 240 seconds]
gremax has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
johnny56_ has joined #ruby
crayfishx has joined #ruby
solocshaw has quit [Ping timeout: 256 seconds]
nertzy has quit [Ping timeout: 264 seconds]
Slinky_Pete has joined #ruby
saneax-_-|AFK is now known as saneax
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saneax is now known as saneax-_-|AFK
amclain has quit [Quit: Leaving]
Franklin has joined #ruby
<Franklin> Hello?
shinnya has joined #ruby
Slinky_Pete has quit [Ping timeout: 240 seconds]
<Franklin> Good for questions?
infernix has joined #ruby
<Franklin> Ruby 2.4.0 begins to support OpenSSL 1.1. Is it good to switch to that version of OpenSSL?
<Franklin> Any benefits in performance, or security?
bocaneri has joined #ruby
roamingdog has joined #ruby
<elomatreb> Generally, you should always prefer the most recent version
aviraldg has quit [Changing host]
aviraldg has joined #ruby
aviraldg has joined #ruby
<Franklin> My tool chain requires some extra configuration if I want to compile Ruby 2.4.0 with OpenSSL 1.1.
shinnya has quit [Ping timeout: 260 seconds]
<Franklin> Most of my Rubies are compiled with OpenSSL 1.0.2, which will be supported until end of 2019, as indicated at https://www.openssl.org/policies/releasestrat.html
roamingdog has quit [Ping timeout: 255 seconds]
<Franklin> The change log of OpenSSL mentioned "thread" so I think the performance might be improved on multi-core platform.
bkxd has joined #ruby
cibs_ is now known as cibs
bocaneri has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
AustinMatherne has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Chagel has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
Franklin is now known as franklinyu
dcunit3d has joined #ruby
A_Drone has quit [Remote host closed the connection]
<franklinyu> All right I decide not to think about it right now. Thanks everyone.
franklinyu has left #ruby [#ruby]
A_Drone has joined #ruby
mim1k has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
govg has joined #ruby
Chagel has joined #ruby
Cohedrin has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
Guest69 has joined #ruby
railswebdev has joined #ruby
hahuang61 has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
PaulCape_ has quit [Quit: .]
Channel6 has quit [Quit: Leaving]
dcunit3d has quit [Ping timeout: 260 seconds]
arashb has quit [Remote host closed the connection]
csk has joined #ruby
Derperperd has joined #ruby
astrobunny has joined #ruby
nankyokusei has joined #ruby
jaffejoe has quit [Quit: Leaving]
govg has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
fatal225 has joined #ruby
fatal225 has left #ruby [#ruby]
astrobunny has quit [Ping timeout: 240 seconds]
versigtig has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
mim1k has quit [Ping timeout: 260 seconds]
govg has joined #ruby
astrobunny has joined #ruby
bkxd has joined #ruby
dcunit3d has joined #ruby
kendocode has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 256 seconds]
roamingdog has joined #ruby
hobodave has joined #ruby
pilne has quit [Quit: Quitting!]
dcunit3d has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
hobodave has quit [Ping timeout: 240 seconds]
JoshS has joined #ruby
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
cschneid_ has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 264 seconds]
djellemah_ is now known as djellemah
coredump has joined #ruby
gix has joined #ruby
braincrash has joined #ruby
TPug has quit [Read error: Connection reset by peer]
hinbody has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
Slinky_Pete has joined #ruby
gnufied has quit [Ping timeout: 256 seconds]
BabyMario has left #ruby ["bbl"]
raspado has joined #ruby
mim1k has joined #ruby
Slinky_Pete has quit [Ping timeout: 240 seconds]
dcluna has quit [Ping timeout: 240 seconds]
raspado has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
dcluna has joined #ruby
marchelzo has quit [Quit: marchelzo]
jeyraof^mbpr has joined #ruby
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
A_Drone has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
squ has joined #ruby
A_Drone has joined #ruby
jameser has joined #ruby
bkxd has joined #ruby
enterprisey has joined #ruby
ecuanaso has quit [Quit: Textual IRC Client: www.textualapp.com]
jameser has quit [Max SendQ exceeded]
bkxd has quit [Ping timeout: 276 seconds]
Alina-malina_ has quit [Changing host]
Alina-malina_ has joined #ruby
Alina-malina_ is now known as Alina-malina
roamingdog has quit []
jameser has joined #ruby
binaryplease has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
renchan has joined #ruby
jcao219 has joined #ruby
eggshke has joined #ruby
jameser has quit [Max SendQ exceeded]
jameser has joined #ruby
grh has joined #ruby
anisha has joined #ruby
xall has joined #ruby
eggshke has quit [Remote host closed the connection]
eggshke has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
gusrub has joined #ruby
mim1k has joined #ruby
mistermocha has joined #ruby
reverberations has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeyraof^mbpr has joined #ruby
Aria has quit [Ping timeout: 256 seconds]
eggshke has quit []
mim1k has quit [Ping timeout: 268 seconds]
rippa has joined #ruby
ifctj has joined #ruby
brent__ has joined #ruby
patarr has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
naprimer_2 has joined #ruby
catbusters has joined #ruby
guardianJ has joined #ruby
guardianJ has left #ruby [#ruby]
patarr has quit [Ping timeout: 240 seconds]
naprimer has quit [Ping timeout: 264 seconds]
aredridel has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 240 seconds]
QoQOoO has joined #ruby
nankyokusei has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
nankyokusei has quit [Ping timeout: 245 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Quit: WeeChat 1.7]
mim1k has joined #ruby
zacts has joined #ruby
bkxd has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 240 seconds]
saneax-_-|AFK is now known as saneax
grh has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
Definity has quit [Ping timeout: 260 seconds]
EckT has quit [Ping timeout: 276 seconds]
reverberations has quit [Quit: Leaving]
ruby-lang223 has joined #ruby
<ruby-lang223> hello
<ruby-lang223> how are you
ruby-lang223 has quit [Client Quit]
jud has quit [Ping timeout: 245 seconds]
CloCkWeRX1 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
enterprisey has quit [Remote host closed the connection]
agent_white has quit [Quit: agent_white]
Slinky_Pete has joined #ruby
ur5us has joined #ruby
jud has joined #ruby
reverberations has joined #ruby
agent_white has joined #ruby
A_Drone has left #ruby [#ruby]
Slinky_Pete has quit [Ping timeout: 260 seconds]
Anonymoose2 has quit [Ping timeout: 240 seconds]
joneshf-laptop has joined #ruby
charliesome has joined #ruby
parsnip has left #ruby [#ruby]
jgnagy has quit [Remote host closed the connection]
jgnagy has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
jcao219 has quit [Ping timeout: 260 seconds]
bigkevmcd has joined #ruby
Guest43 has joined #ruby
Guest43 has quit [Changing host]
Guest43 has joined #ruby
djbkd_ has joined #ruby
hutch34 has joined #ruby
ur5us_ has joined #ruby
LoneHerm_ has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solocshaw1 has joined #ruby
gizmore|2 has joined #ruby
bpmedley has joined #ruby
xall has quit [Remote host closed the connection]
xall has joined #ruby
solocshaw has quit [Ping timeout: 256 seconds]
binaryplease has quit [Ping timeout: 258 seconds]
gizmore has quit [Ping timeout: 252 seconds]
solocshaw1 has quit [Ping timeout: 240 seconds]
blaxter has quit [Quit: foo]
jokester has quit [Quit: nonregular reboot]
jokester has joined #ruby
djbkd_ has quit []
TomyLobo has quit [Ping timeout: 264 seconds]
govg has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
grh has joined #ruby
ifctj has quit [Ping timeout: 240 seconds]
despai has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
djbkd_ has joined #ruby
dasher00 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
l4v2 has quit [Quit: l4v2]
ur5us_ has quit [Ping timeout: 240 seconds]
dasher00 has joined #ruby
versigtig has quit [Quit: This computer has gone to sleep]
conta has joined #ruby
mistermocha has quit [Remote host closed the connection]
djbkd_ has quit [Remote host closed the connection]
djbkd_ has joined #ruby
Pumukel has joined #ruby
djbkd_ has quit [Ping timeout: 240 seconds]
Chagel has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
atmosx_aws is now known as atmosx
Qchmqs has joined #ruby
saneax is now known as saneax-_-|AFK
TheWhip has quit [Remote host closed the connection]
Chagel has joined #ruby
pookie is now known as olspookishmagus
LoneHerm_ has joined #ruby
TheWhip has joined #ruby
cyphase has quit [Ping timeout: 240 seconds]
fusta has joined #ruby
patarr has joined #ruby
cyphase_eviltwin has joined #ruby
despai has quit [Ping timeout: 276 seconds]
teclator has quit [Remote host closed the connection]
biberu has joined #ruby
lenwood has joined #ruby
eugenmayer has quit [Quit: Leaving.]
patarr has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
govg has joined #ruby
danguita has joined #ruby
dionysus69 has joined #ruby
aufi has joined #ruby
brent__ has joined #ruby
nankyokusei has joined #ruby
despai has joined #ruby
jcao219 has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
mark_66 has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
csk157 has joined #ruby
consti has joined #ruby
aganov has joined #ruby
lenwood has quit [Ping timeout: 255 seconds]
Chagel has quit [Ping timeout: 240 seconds]
erlend has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
erlend has joined #ruby
versigtig has joined #ruby
aupadhye has joined #ruby
libastral has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 264 seconds]
saneax-_-|AFK is now known as saneax
Guest43 has quit [Read error: Connection reset by peer]
rkoller has joined #ruby
Slinky_Pete has joined #ruby
teclator has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
ofkors has quit [Ping timeout: 260 seconds]
Slinky_Pete has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
cschneid_ has joined #ruby
consti has quit [Quit: consti]
nofxxx has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
Mortomes|Work has joined #ruby
tdy1 has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
tdy has joined #ruby
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
jolamb has quit [Quit: ZNC - http://znc.in]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has quit [Ping timeout: 258 seconds]
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
tomphp has joined #ruby
davezd has joined #ruby
tomphp has quit [Client Quit]
Snickers has joined #ruby
lenwood has joined #ruby
jeyraof^mbpr has joined #ruby
astrobunny has quit [Remote host closed the connection]
versigtig has quit [Quit: This computer has gone to sleep]
fusta has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
Ryzokuken has joined #ruby
def_jam has joined #ruby
eb0t_ has joined #ruby
vondruch__ is now known as vondruch
szulak has joined #ruby
eblip has quit [Ping timeout: 245 seconds]
eb0t has quit [Ping timeout: 260 seconds]
jsrn has joined #ruby
<szulak> Hi, I am having a trouble understanding a keyword (I suppose) in ruby. I am fairly new into ruby language, and any help would be appreciated. Considering this snippet of code: https://gist.github.com/anonymous/9f493bf4f684390a3ad6b267e66e330a, wha is the 'validates' ?
hutch34 has joined #ruby
rscnyv has joined #ruby
danguita has quit [Quit: danguita]
jcao219 has quit [Ping timeout: 276 seconds]
danguita has joined #ruby
mim1k has joined #ruby
danguita has quit [Client Quit]
<matthewd> szulak: It's a method defined by Ruby on Rails (specifically, Active Record)
armando has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
<szulak> matthewd: thanks. so, it's the invocation of method - but how is it possible in class definition?
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
danguita has joined #ruby
hutch34 has quit [Ping timeout: 245 seconds]
<szulak> matthewd: I have a few years of c++ development experience, and this construction (calling a method in class definition destroys my brain).
<matthewd> There is only runtime
djbkd has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
<matthewd> >> class A; def foo; end; p instance_methods(false); def bar; end; p instance_methods(false); end
<apeiros> szulak: classes are objects too in ruby
<apeiros> szulak: and code in the class body is executed in the context of that class object, i.e. self is the class itself
<apeiros> >> class X; p current_self: self; end
<apeiros> oh, where's ruby[bot]? o0
<apeiros> netsplit again?
<apeiros> well… `class X; p current_self: self; end` -> X
<szulak> hm
<apeiros> and: X.is_a?(Class) # -> true
Burgestrand has joined #ruby
ruby[bot] has joined #ruby
<apeiros> hello again ruby[bot]
Burgestrand has quit [Client Quit]
<apeiros> ?botsnack
<ruby[bot]> nomnomnomnom
Burgestrand has joined #ruby
<apeiros> szulak: also note (and that's part of this) - every object in ruby can have its own methods too, which belong only to it:
<apeiros> >> x = "hi"; def x.foo; "woot!"; end; x.foo
<ruby[bot]> apeiros: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<apeiros> wtf?
<apeiros> eval.in down again?
jaruga______ has joined #ruby
<apeiros> >> x = "hi"; def x.foo; "woot!"; end; x.foo
<ruby[bot]> apeiros: # => "woot!" (https://eval.in/737342)
<szulak> I run it in irb, works fine.
armando has joined #ruby
<apeiros> yeah, iirc that error above was a problem in ruby[bot] handling an error from eval.in (the service it uses to evaluate the code safely)
blackmesa has joined #ruby
<apeiros> that foo method there exists only on that string, no other string has it
<apeiros> note that `def x.foo; …; end` is alternative syntax for `class << x; def foo; …; end; end` - which you'll see somewhat often to define "class methods".
Beams has joined #ruby
<apeiros> usually it is `class X; class << self; def class_method; …; end; end; end`
<szulak> ok, I think I finally get it
<szulak> class X
<szulak> end
<szulak> p current_self: self
<apeiros> and since `self` == `X` in the class body scope, it follows that it is alternative syntax for `def X.class_method; …; end`
<szulak> why p current_self: self, instead of p self ?
pandaant has joined #ruby
<apeiros> eh, I usually label my output
<szulak> oh, ok :)
pskosinski_ has joined #ruby
<apeiros> i.e. habit. like: p user_id: user.id, attribute: attr_name, old_value: model.old_attr
marr has joined #ruby
bkxd has joined #ruby
<apeiros> back to topic: i.e. a class method is a method defined on the class object itself (technically it's stored somewhere else, but that might be a bit too much right now)
<apeiros> and any method invoked without an explicit receiver uses self, i.e. `foo("bar")` is `self.foo("bar")`
TheHodge has joined #ruby
pskosinski has quit [Ping timeout: 245 seconds]
<apeiros> so in class scope, `class X; foo("bar"); end` is `class X; X.foo("bar"); end`
<apeiros> (again, there are some technicalities regarding private methods, but probably too much right now)
<szulak> I think, it's self.foo("bar"); ?
mim1k has quit [Ping timeout: 258 seconds]
<apeiros> yes
<apeiros> and self is X
<szulak> yeah
<Burgestrand> (and another technicality due to syntax regarding property setters, but not getters, regarding implicit self)
<apeiros> Burgestrand: going full ruby technicalities inception? :D
djbkd has joined #ruby
<Burgestrand> apeiros I still have memories of it biting me a few times over the first few months of learning ruby, slightly bitter ;P
<apeiros> Burgestrand: hehe
<apeiros> yeah, some of the noise reducing features of ruby make it less explicit and the implicit things aren't always self evident :-/
mark_66 has quit [Remote host closed the connection]
mim1k has joined #ruby
<Burgestrand> indeed, and having just one or two exceptions to an otherwise nice rule can be annoying :d
<apeiros> I think shadowing methods via local vars has bitten me more and longer. most famous: `if false; foo = "hi"; end; bar = foo` - expecting foo to be the method, not the lvar and being wrong :)
solocshaw has joined #ruby
TheWhip has quit [Remote host closed the connection]
<Burgestrand> ah yeah, hehe
bkxd has quit [Ping timeout: 240 seconds]
<apeiros> it makes perfect sense. but it's not obvious.
<Burgestrand> indeed :)
mark_66 has joined #ruby
<apeiros> I'd actually like it if they'd expose Qundefined there
<apeiros> and raise upon access
<apeiros> "You're accessing a local variable which has not been set" or somesuch
<Burgestrand> apeiros didn't we use to have warnings for shadowing outer variables through block variables? maybe we still do?
<apeiros> I think they're opt-in, no?
<Burgestrand> apeiros ah yes, there are many opt-in warnings :)
<apeiros> and given that we can't exclude sources of warnings, combined with the quality of some 3rd party libs, I don't dare to use -v anymore.
<Burgestrand> this is true, so much noise from third-parties makes keeping a tidy source hard
tofusonruby has joined #ruby
nettoweb has joined #ruby
hobodave has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
<Burgestrand> HI!
<apeiros> ho
<Burgestrand> hi ho
<GeorgesLeYeti> I have an interger a = 11. I want to split it in 3 integer same "size" [4, 4, 3]
<Burgestrand> GeorgesLeYeti what is size?
ur5us has quit [Remote host closed the connection]
hobodave has quit [Ping timeout: 260 seconds]
<jokke> hey
<jokke> i've got a project where i'm not able to use pry for some reason. I get the error 'cannot load such file pry'. pry (and pry-byebug) are in the Gemfile and it's bundled.
<jokke> i don't have this problem for any other gems
<matthewd> GeorgesLeYeti: The word you're looking for is "divide"
<apeiros> GeorgesLeYeti: int=11; buckets=3; res = [int.div(buckets)]*buckets; res[0,int % buckets] = res[0,int % buckets].map { |val| val + 1 }
<apeiros> can probably do it more elegantly as map isn't really necessary
<GeorgesLeYeti> If i make 11/3 it will returns 3.66666... so 3.66.to_i = 3 and 3+3+3 != 11
<apeiros> but that contains the basic logic to divide the modulus
<apeiros> s/divide/"spread"/
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
jeyraof^mbpr has joined #ruby
<apeiros> GeorgesLeYeti: int=11; buckets=3; low = int.div(buckets); highcount = int % buckets; res = Array.new(highcount, low+1) + Array.new(buckets-highcount, low)
jeyraof^mbpr has quit [Remote host closed the connection]
<apeiros> maybe more elegant
<GeorgesLeYeti> Ty a lot for you answer
ferr1 has joined #ruby
<apeiros> no guarantees :-p
<matthewd> >> a, b = 11.divmod(3); [a + 1] * b + [a] * (a - b)
<ruby[bot]> matthewd: # => [4, 4, 3] (https://eval.in/737366)
<apeiros> plerp… `low = int.div(buckets); highcount = int % buckets` --> `low, highcount = int.divmod(buckets)`
<apeiros> I see, matthewd had the same idea
<Burgestrand> ha, cool, never considered that ary * 0 returns [], it makes sense but I've never used it :D
<apeiros> have you tried `ary * neg`? I love the ImaginaryArray class :)
<Burgestrand> clever, I like it matthewd
<Burgestrand> >> [] * -1
<ruby[bot]> Burgestrand: # => negative argument (ArgumentError) ...check link for more (https://eval.in/737374)
<Burgestrand> :(
<apeiros> :-p
<matthewd> Burgestrand: tbh, I didn't even give it much thought... just trusted that ruby would dtrt
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
<Burgestrand> hm
<Burgestrand> >> a, b = 21.divmod(3); [a + 1] * b + [a] * (a - b)
<ruby[bot]> Burgestrand: # => [7, 7, 7, 7, 7, 7, 7] (https://eval.in/737376)
<Burgestrand> the curtain falls!
KCmetro has joined #ruby
bigtawm has quit [Ping timeout: 255 seconds]
<matthewd> Oops :P
<apeiros> should be 3-b
EckT has joined #ruby
* apeiros did it correctly :-p
jcao219 has joined #ruby
<apeiros> that's why you use descriptive variable names :-D
blackmesa has quit [Ping timeout: 268 seconds]
fusta has joined #ruby
<matthewd> apeiros: That just proves I invented mine independently :)
QoQOoO has quit [Ping timeout: 240 seconds]
Qchmqs has quit [Ping timeout: 268 seconds]
<matthewd> Better an NIHed solution that doesn't work than something someone else wrote, that's what I always say
<apeiros> heh
<apeiros> I wonder why I have done this very thing already a couple of times…
<apeiros> oh, I remember… portfolio management ^^
KCmetro has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
<Burgestrand> I like how it makes a rather nice pattern
TheWhip has joined #ruby
<apeiros> you made me think for a second I was missing knowledge on a core method :D
mikecmpbll has quit [Quit: inabit. zz.]
<Burgestrand> slightly different than #each_slice, interesting
patarr has joined #ruby
mikecmpbll has joined #ruby
Qchmqs has joined #ruby
<matthewd> Burgestrand: Yeah, though it should probably now be implemented using each_slice
<apeiros> that'd be difficult. it depends on .size
LoneHermit has quit [Ping timeout: 260 seconds]
<Burgestrand> matthewd I did a version with each_slice and flat_map because oneliners are fun xP
<apeiros> could buffer, though
<matthewd> apeiros: It's still on array, so you can still just grab the size. Just seems like it could be simplified with each_slice(size / n) { |slice| slice << fill if .. }
<apeiros> with buffering, you can do it on Enumerable
<matthewd> You have to buffer the whole thing, so you might as well just call to_a :P
patarr has quit [Ping timeout: 256 seconds]
<apeiros> no
kiddorai_ has joined #ruby
<apeiros> at least I think you don't have to buffer the whole thing
workmad3 has joined #ruby
<apeiros> hm
<matthewd> You don't know how many elements go in the first column until you know how many there are in total
<apeiros> yeah, you have to only buffer N, sadly N is size-1 :D
<apeiros> so… pointless. size required.
<matthewd> On an Enumerator, though...
braincrash has quit [Ping timeout: 260 seconds]
catbusters has quit [Quit: Connection closed for inactivity]
despai has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
solocshaw has quit [Quit: solocshaw]
tvw has joined #ruby
govg has joined #ruby
despai has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
toretore has joined #ruby
wingwalker has joined #ruby
esObe has joined #ruby
bkxd has joined #ruby
JeanCarloMachado has joined #ruby
maneco has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
ldnunes has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
cyphase_eviltwin has quit [Ping timeout: 258 seconds]
jameser has quit [Ping timeout: 240 seconds]
brent__ has quit [Ping timeout: 276 seconds]
minimalism has quit [Quit: minimalism]
jenrzzz has joined #ruby
shadeslayer_ is now known as shadeslayer
tvw has quit []
Clarity has joined #ruby
cyphase has joined #ruby
<Clarity> does Ruby support hash destructuring?
<matthewd> Clarity: No
<manveru> Clarity: in what way?
<Clarity> smth like {name, age} = {name: 'John', age: 42}
Pumukel has quit [Remote host closed the connection]
<manveru> not directly
<Clarity> basically smth similar as there's for arrays
<Clarity> ah ok
<Clarity> thanks for the info
<manveru> >> ->(name:, age:){ [name, age] }.({name: 'John', age: 42})
<ruby[bot]> manveru: # => ["John", 42] (https://eval.in/737455)
<manveru> that's probably the closest thing
<manveru> so if you take the hash as method argument, you can do it
jcao219 has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
jdm has quit [Quit: Leaving]
lupine has quit [Ping timeout: 276 seconds]
xall has quit [Ping timeout: 276 seconds]
govg has quit [Ping timeout: 264 seconds]
patarr has quit [Ping timeout: 255 seconds]
govg has joined #ruby
lupine has joined #ruby
braincrash has joined #ruby
tofusonruby has quit [Ping timeout: 260 seconds]
stamina has joined #ruby
BackEndCoder has quit [Excess Flood]
rscnyv has quit [Remote host closed the connection]
beilabs has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
BackEndCoder has joined #ruby
sylario has joined #ruby
raspado has joined #ruby
jshjsh has joined #ruby
raspado has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
newrubycoder has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
csk157_ has joined #ruby
csk157 has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 264 seconds]
danguita has quit [Remote host closed the connection]
despai has quit [Ping timeout: 260 seconds]
Ryzokuken has quit [Quit: Connection closed for inactivity]
zotherstupidguy has quit [Remote host closed the connection]
blackmesa has joined #ruby
despai has joined #ruby
djbkd_ has joined #ruby
Sebastia1Thorn has quit [Ping timeout: 252 seconds]
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
bkxd has joined #ruby
lenwood has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 252 seconds]
braincrash has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
cschneid_ has quit [Ping timeout: 245 seconds]
davezd has quit [Quit: Leaving]
charliesome has joined #ruby
Guest43 has joined #ruby
jameser has joined #ruby
csk has quit [Quit: ZZZzzz…]
cyphase has quit [Ping timeout: 260 seconds]
djbkd_ has quit [Ping timeout: 240 seconds]
Guest43 has quit [Ping timeout: 245 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
ldnunes has quit [Ping timeout: 256 seconds]
cyphase has joined #ruby
marsjaninzmarsa has quit [Ping timeout: 240 seconds]
emilkarl has joined #ruby
cyphase has quit [Excess Flood]
marsjaninzmarsa has joined #ruby
cyphase has joined #ruby
jgnagy has joined #ruby
cyphase has quit [Max SendQ exceeded]
cyphase has joined #ruby
ocbtec has joined #ruby
Pumukel has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
loechel has joined #ruby
jameser has joined #ruby
despai has quit [Ping timeout: 240 seconds]
Pumukel has quit [Read error: Connection reset by peer]
despai has joined #ruby
ldnunes has joined #ruby
Slinky_Pete has joined #ruby
ifctj has joined #ruby
millerti has joined #ruby
nankyokusei has joined #ruby
psychicist__ has joined #ruby
Slinky_Pete has quit [Ping timeout: 256 seconds]
ifctj has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
larcara has joined #ruby
TheWhip has quit [Remote host closed the connection]
pskosinski_ is now known as pskosinski
pskosinski has quit [Changing host]
pskosinski has joined #ruby
pskosinski has joined #ruby
kiddorai_ has quit [Remote host closed the connection]
blackeel has joined #ruby
<blackeel> what are the differences of Ruby and Eiffel?
Derperperd has quit [Ping timeout: 245 seconds]
lenwood has joined #ruby
bkxd has joined #ruby
<blackeel> what are the differences of Ruby and Eiffel?
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheWhip has joined #ruby
<xpt> blackeel: All the letters are different, Eiffel is longer but will be listed before Ruby if you sort the names in alphabetical order. Sorry I don't know anything about Eiffel so can't point more differences.
bkxd has quit [Ping timeout: 240 seconds]
csk has joined #ruby
TheWhip has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShoaibJahejo has quit [Ping timeout: 256 seconds]
hobodave has joined #ruby
jameser has joined #ruby
houhoulis has joined #ruby
jameser has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hobodave has quit [Ping timeout: 268 seconds]
brent__ has joined #ruby
jameser has joined #ruby
bruce_lee has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
brent__ has quit [Ping timeout: 245 seconds]
Chagel has joined #ruby
byte512 has joined #ruby
synthroid has joined #ruby
Derperperd has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
tyang has joined #ruby
UnknownSoldier has joined #ruby
moei has quit [Quit: Leaving...]
jameser has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
squ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wingwalker has quit [Quit: Leaving]
houhoulis has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Chagel has quit [Ping timeout: 240 seconds]
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
mnms_ has joined #ruby
hutch34 has joined #ruby
browndawg has joined #ruby
gnufied has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
ShoaibJahejo has joined #ruby
ShoaibJahejo has quit [Max SendQ exceeded]
mlkkk has joined #ruby
ocbtec has quit [Ping timeout: 256 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdm has joined #ruby
mnms_ has quit [Client Quit]
braincrash has joined #ruby
mnms_ has joined #ruby
ShoaibJahejo has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
<mnms_> Does Net::SMTP is able to send mails via 465 port (SMTPS)?
TheWhip has quit [Remote host closed the connection]
<apeiros> mnms_: seems like. see all methods which contain tls.
<apeiros> e.g. enable_tls
<mnms_> I cannot get something working and not writing everyday in ruby
JeanCarl1Machado has joined #ruby
JeanCarloMachado has quit [Read error: Connection reset by peer]
<mnms_> looking at examples on the internet I feel like Net::SMTP it's not working with ssl
<apeiros> so you mean those tls methods are just decoration? ok.
<dminuoso> "its not working"
<dminuoso> I love this kind of error description.
<mnms_> Im not sure I tried few combinations
<rob__> anyone know if theres a method similar to fetch for Array that accepts a block, and a default, so that i can chain .fetch methods to search through nested Arrays?
<dminuoso> Be glad you didnt just call me with that error description, or you would have learned about pain.
<dminuoso> &ri Array.dig rob__
<apeiros> rob__: you mean like Hash#fetch? (which accepts either a default or a block, not both)
<mnms_> dminuoso: read carefuly I said that I think Net::SMTP is not working with SMTPS
<mnms_> no that something in my code is not working
<apeiros> also yeah, dig for that specific purpose.
<dminuoso> <mnms_> looking at examples on the internet I feel like Net::SMTP it's not working with ssl
<dminuoso> Just saying.
<dminuoso> apeiros, I totally dig that method.
<dminuoso> Hooray, another pun!
<rob__> ah, thanks, i searched for dig but was on wrong ruby version, doh
<dminuoso> rob__, never not use ri.
<rob__> dminuoso: so used to googling for rdoc :\
<dminuoso> rob__, unlike this google which will at times give you 1.9.3 docs
<mnms_> dminuoso: Im not talking about code but that I cannot find any working example
<dminuoso> rob__, either search on the appropriate version on ruby-doc.org directly or use ri
<rob__> dminuoso: im going to talk to larry about making google better ;)
blackeel has quit [Ping timeout: 260 seconds]
<dminuoso> You do that, and if you succeed Ill get a provision right?
<dminuoso> Something like 1% of all Alphabet shares
<apeiros> google's search results AI already learnt enough about me to know that I'm almost certainly referring to something related to the newest ruby proglang version.
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> (the not-so-far future)
mlkkk has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
quiqua has joined #ruby
quiqua has quit [Client Quit]
quiqua has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
mnms_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mlkkk has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
beilabs has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
ocbtec has joined #ruby
jose_leeto has joined #ruby
agent_white has quit [Quit: bai]
hobodave has quit [Ping timeout: 240 seconds]
CloCkWeRX1 has quit [Quit: Leaving.]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Clarity has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
moei has joined #ruby
cdg has joined #ruby
__Yiota has joined #ruby
Slinky_Pete has joined #ruby
TheWhip has joined #ruby
beilabs has quit [Remote host closed the connection]
cdg_ has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 264 seconds]
Slinky_Pete has quit [Ping timeout: 245 seconds]
larcara has quit [Remote host closed the connection]
joneshf-laptop has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
Silthias1 has joined #ruby
ResidentBiscuit has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
malconis has joined #ruby
GeorgesLeYeti has quit [Quit: Leaving]
l4v2 has joined #ruby
bmurt has joined #ruby
malconis_ has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 268 seconds]
yokel has quit [Ping timeout: 252 seconds]
tusharmalik has joined #ruby
larcara has joined #ruby
malconis has quit [Ping timeout: 240 seconds]
dopamean_ has quit [Quit: WeeChat 1.3]
sonOfRa has quit [Quit: Bye!]
millerti has joined #ruby
sonOfRa has joined #ruby
hutch34 has joined #ruby
ramortegui has joined #ruby
DLSteve_ has joined #ruby
fuzzyhorns has joined #ruby
Snickers has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
beilabs has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
BackEndCoder has quit [Excess Flood]
hogetaro_ has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
TheWhip has quit [Remote host closed the connection]
radic has quit [Ping timeout: 258 seconds]
despai has quit [Read error: Connection reset by peer]
BackEndCoder has joined #ruby
safetypin has joined #ruby
browndawg has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
BitWhisperer has joined #ruby
quiqua has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
TheWhip has joined #ruby
quiqua has joined #ruby
_sfiguser has joined #ruby
SteenJobs_ has joined #ruby
lxsameer has joined #ruby
troulouliou_div2 has joined #ruby
andikr has joined #ruby
jhack has quit [Quit: jhack]
opt8 has joined #ruby
chouhoulis has joined #ruby
BitWhisperer has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
opt9 has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
Fernando-Basso has joined #ruby
futilegames has joined #ruby
Snickers has joined #ruby
grh has quit [Ping timeout: 240 seconds]
hinbody has joined #ruby
futilegames has quit [Client Quit]
harfangk has joined #ruby
ferr1 has quit [Quit: WeeChat 1.6]
stamina has quit [Quit: WeeChat 1.7]
despai has joined #ruby
Derperperd has joined #ruby
Anonymoose2 has joined #ruby
milardovich has joined #ruby
danguita has joined #ruby
milardovich has quit [Remote host closed the connection]
reverberations has quit [Ping timeout: 240 seconds]
emilkarl has quit [Quit: emilkarl]
lejit has quit [Quit: Leaving]
malconis_ has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has joined #ruby
malconis has joined #ruby
Derperperd has quit [Ping timeout: 255 seconds]
SteenJobs_ has quit [Ping timeout: 255 seconds]
raspado has joined #ruby
cschneid_ has joined #ruby
Qchmqs has quit [Remote host closed the connection]
Qchmqs has joined #ruby
nettoweb has joined #ruby
raspado has quit [Ping timeout: 255 seconds]
jdm has quit [Quit: Leaving]
jdm has joined #ruby
fuzzyhorns has quit [Quit: Leaving.]
milardovich has quit [Remote host closed the connection]
SteenJobs_ has joined #ruby
teclator has quit [Remote host closed the connection]
milardovich has joined #ruby
jhack has joined #ruby
saneax is now known as saneax-_-|AFK
nicola_pav has joined #ruby
fuzzyhorns has joined #ruby
<fuzzyhorns> i came up with another solution to the problem yesterday, though it mighve been mentioned before
<fuzzyhorns> str.split.map {|w| w[1..-2] = w[1..-2].chars.sort.join ; w }.join(" ")
mgorbach has quit [Remote host closed the connection]
<dminuoso> What problem was that?
<fuzzyhorns> taking a sentence and then in each word, sorting the characters alphabetically except for first and last
<fuzzyhorns> so str = "The quick brown fox"
<fuzzyhorns> then after my code there, => "The qciuk borwn fox"
<canton7> mutating the input inside a map smells a bit :P
polishdub has joined #ruby
<dminuoso> canton7, why would it?
milardovich has quit [Ping timeout: 255 seconds]
rlex has quit [Quit: Cya!]
<fuzzyhorns> canton7: def!
<fuzzyhorns> canton7: but it's most concise :d
<dminuoso> >> a = [[1]]; a.map(&:pop); p a
<dminuoso> It's fine to do this.
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
* dminuoso kicks ruby[bot]
<dminuoso> >> a = [[1]]; a.map(&:pop); p a
<ruby[bot]> dminuoso: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<havenwood> #=> [[]]
<dminuoso> havenwood, thanks
<dminuoso> ruby[bot], you are being replaced by havenwood.
<dminuoso> Faster *and* better looking.
<fuzzyhorns> lol
* havenwood bows
<canton7> map is supposed to be a pure mapping from a domain to a range. If you mutate the input, you're not following that
lanc has joined #ruby
mgorbach has joined #ruby
<fuzzyhorns> canton7: well, in my case, str is unchanged
<canton7> >> words = "abc 123".split; words.map{ |w| w[1..-1] = w[1..-2].chars.sort.join; w }.join; p words
<ruby[bot]> canton7: # => ["ab", "12"] ...check link for more (https://eval.in/737766)
<fuzzyhorns> it's just the return value that is diff
<canton7> yeah, but it's still very surprising to see a map mutate its input
<dminuoso> canton7, in a dynamic language like ruby you shouldn't be surprised if any method mutates the living hell out of its arguments.
<fuzzyhorns> hmm, idk that it is really, in this case — what i'd find weird is if map actually mutated words
<fuzzyhorns> not the scope it defines, w
<canton7> you're supposed to write code which people don't have to re-read a few times to make sure that it does what it's supposed to with no bad side-effects :P
<fuzzyhorns> and amazingly you can do all kinds of messed up stuff with that!
<dminuoso> This is precisely why I want this critical API to be written in C++, because I don't want this "You can easily shoot yourself in your head *and* the foot at the same time" gun in my hand.
<fuzzyhorns> check out the examples midway down where i mention "delete"
<canton7> fuzzyhorns, it *does* mutate the words!
neuraload has joined #ruby
<canton7> fuzzyhorns, you mean, where it uses #each?
<fuzzyhorns> str is unchanged
<dminuoso> canton7, the big issue is really that often you have a hard time telling which method mutates which object. In a language without cv specifiers it's hard to reason about this at all.
<fuzzyhorns> w is mutated
<canton7> that's expected - #each is a looping operation. #map is a mapping operation, and you'd expect it to be pure
* dminuoso waits for the "but.. write unit tests" argument
<canton7> fuzzyhorns, see my example - the *input* to the map is mutated
<fuzzyhorns> i wish ruby had a static type system, but i'm a bad person, so
<canton7> fuzzyhorns, you're not looking at the input to the map. Put 'str.split' into a var, feed it into the map, then print it afterwards, as I did
JeanCarloMachado has joined #ruby
<canton7> dminuoso, sure, but '=' is a fairly big red flag, which is why I did a double-take, followed by "it stinks"
KCmetro has joined #ruby
jdm has quit [Quit: Leaving]
shinnya has joined #ruby
<fuzzyhorns> canton7: yah, but that's different
<fuzzyhorns> canton7: split dups
jdm has joined #ruby
<fuzzyhorns> i see your point though
<canton7> fuzzyhorns, I think you're missing the point still. The point is that someone reading the code sees the mutation in the #map, does a double-take, re-reads it, then figures out that the input to the map is only used in that one place, so it's OK
bkxd has joined #ruby
<canton7> fuzzyhorns, the *point* is that you're requiring the reader to do that double-take and re-read your code. You haven't written good or clear code. You've written code which someone has to read twice to understand, and which raises red flags in their mind. It will disrupt their ability to scan through your code
<canton7> (bear in mind that this other person is most likely to be you in a few weeks)
mistermocha has joined #ruby
<fuzzyhorns> canton7: i. never. said. it's. good. code.
<fuzzyhorns> so i am unclear why you are taking great pains to convince me lol
<canton7> and I said it's bad code :P where's the argument then?
<canton7> I just said it stinks. You went to great lengths to try and convince me that it's OK. I know it's OK, but it still stinks :P
jhack has quit [Quit: jhack]
<fuzzyhorns> telling me the "point" is it's tough to read sure scans like that
lenwood has joined #ruby
<fuzzyhorns> & i actually think by focusing on veering that direction just to be right while i'm wrong missed an interesting line where i actually *am* wrong:
<fuzzyhorns> words.dup.map {|w| w[1..-2] = w[1..-2].chars.sort.join ; w }.join(" ")
<fuzzyhorns> this still mutates words!
<fuzzyhorns> that genuinely surprised me
jdm has quit [Client Quit]
jdm has joined #ruby
<Papierkorb> fuzzyhorns: #dup doesn't clone deeply, you duplicated the array, but not what's in the array
<canton7> yeah, as 'dup' is a shallow copy
jdm has quit [Remote host closed the connection]
<fuzzyhorns> i always forget that — i'd think at least with Array#dup you'd get the first dimension
jdm has joined #ruby
<fuzzyhorns> this has caught me up before too
<canton7> if you add/remove elements to the dup, that isn't reflected in the original. If you mutate elements in the dup, those are reflected, because they're the same elements
jhack has joined #ruby
jdm has quit [Remote host closed the connection]
<fuzzyhorns> yeah, that always gets me
radic has joined #ruby
andikr has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
bkxd has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 268 seconds]
Burgestrand has joined #ruby
Guest69 has joined #ruby
despai has quit [Ping timeout: 255 seconds]
railswebdev has joined #ruby
marchelzo has joined #ruby
patarr has joined #ruby
szulak has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jdm has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
cr3 has joined #ruby
saslam has joined #ruby
Burgestrand has quit [Client Quit]
KCmetro_ has joined #ruby
SteenJobs_ has joined #ruby
KCmetro has quit [Read error: Connection reset by peer]
KCmetro__ has joined #ruby
Qchmqs has quit [Quit: Konversation terminated!]
hobodave has joined #ruby
UserJosh has joined #ruby
Asher has quit [Quit: Leaving.]
<cr3> how folks, when I `bundle install` a package from a local gem (gem 'foobar', 'version', path: '/path/to/foobar.gem') and I require 'foobar' from `bundle exec irb`, I get 'cannot load such file -- foobar'. When I bundle install the same project from source (gem 'foobar', path: '/path/to/foobar'), I can require 'foobar' just fine. When I compare the installed files under /usr/local/bundle, they look the same to me. What would make one not found by require?
<canton7> fuzzyhorns, FWIW, I'd say 'str.split.map{ |w| w[0] + w[1..-2].chars.sort.join + w[-1] }.join(" ") or similar is the easiest to read - it clearly shows that the pattern is <first letter> <middle letters sorted> <last letter>
Slinky_Pete has joined #ruby
KCmetro_ has quit [Ping timeout: 256 seconds]
jshjsh has quit [Ping timeout: 268 seconds]
<fuzzyhorns> yep, i started with `str.split.map {|w| (f, m, l = w[0], w[1..-2].chars.sort.join, w[-1]).join }.join(" ")`
<fuzzyhorns> (though i imagine folks might disapprove of the destructuring technique, at least i can use it to name the segments clearly, not that i did above)
<fuzzyhorns> one thing i find kinda amazing about ruby is you could do that assignment in the pipes too
hutch34 has joined #ruby
<canton7> heh, I still had to read that 3 times to figure out that you were assigning f, m, l, then never directly referencing them :P
govg has quit [Ping timeout: 240 seconds]
<fuzzyhorns> yep hehe
<fuzzyhorns> if in pipes, i think it's ugly but clearer what's happening: `str.split.map {|w, first_char=w[0], middle_chars=w[1..-2], last_char=w[-1]| "#{first_char}#{middle_chars.chars.sort.join}#{last_char}" }.join("`
<fuzzyhorns> oops lost the last few chars there but you prob get
lenwood has quit [Ping timeout: 255 seconds]
<fuzzyhorns> in fact i think could've split to chars in pipes, lets see
Slinky_Pete has quit [Ping timeout: 264 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
<fuzzyhorns> haha omg this is awful: `str.split.map {|w, first_char=w[0], sorted_middle_chars=w[1..-2].chars.sort.join, last_char=w[-1]| "#{first_char}#{sorted_middle_chars}#{last_char}" }.join(" ")`
* canton7 winces
mark_66 has quit [Remote host closed the connection]
<nicola_pav> hi all, I am new to Ruby. I am using Dashing which is based on ruby. I have a code that runs SCHEDULER.
jolamb has joined #ruby
spiette has joined #ruby
<nicola_pav> the scheduler runs each 30s against sensu api. if the sensy api is down, nothing happens. I would like to catch the scehduler exception
<nicola_pav> how can I do that?
SteenJobs_ has quit [Quit: SteenJobs_]
t-recx has joined #ruby
module7 has joined #ruby
<module7> Why should I use Ruby? (I am serious)
<marchelzo> because it's beautiful
<marchelzo> it's art
<marchelzo> ruby brings me happiness when i'm feeling down. it brings meaning to otherwise meaningless programs.
Prepper_Jack has joined #ruby
mlkkk has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
aganov has quit [Remote host closed the connection]
<fuzzyhorns> module7: i think it has a nice central metaphor, and is very good for beginners to programming
blaxter has joined #ruby
mlkkk has joined #ruby
<fuzzyhorns> module7: if you already have some other dynamically typed lang under your belt, i think the main reason would be to use Rails, practically speaking
<fuzzyhorns> i also find it convenient for "i just need to write this tiny thing in a REPL real quick"
<dminuoso> module7, Ruby is extremely fast at prototyping.
<dminuoso> That's basically the major selling point.
<fuzzyhorns> a blessing and a curse hehe
<dminuoso> We have a rich set of libraries for all kinds of things, increasing prototyping speed even more.
<dminuoso> It's all based on getting things done quickly but having absolutely no clue how stuff works.
<fuzzyhorns> lmao
<dminuoso> It's like JavaScript, except our closures look better.
csk157_ has quit [Ping timeout: 240 seconds]
<marchelzo> nothing like javascript
SteenJobs_ has joined #ruby
conta has quit [Ping timeout: 255 seconds]
despai has joined #ruby
blaxter has quit [Client Quit]
brandon_ has quit [Ping timeout: 256 seconds]
SteenJobs_ has quit [Client Quit]
brandon_ has joined #ruby
<apeiros> !fact add whyruby Because ruby is a language made for developers. it is beautiful, mature, has a vibrant community. Also because we say so.
<ruby[bot]> apeiros: I will remember that whyruby is Because ruby is a language made for developers. it is beautiful, mature, has a vibrant community. Also because we say so.
<apeiros> hm, or maybe "because ruby is a language made for humans, not machines"?
<marchelzo> yes
brent__ has joined #ruby
<dminuoso> apeiros, that factoid doesnt have enough propaganda in it
<dminuoso> The ministry of propaganda rejects this factoid.
<apeiros> !fact edit whyruby because ruby is a language made for humans, not machines. It is beautiful, mature, has a vibrant community. Also because we say so.
<ruby[bot]> apeiros: I stand corrected that whyruby is because ruby is a language made for humans, not machines. It is beautiful, mature, has a vibrant community. Also because we say so.
<apeiros> dminuoso: we're not using alt-facts here
<dminuoso> alt facts is what the other say about ruby
<dminuoso> we speak the truth.
swills has quit [Quit: Leaving]
<case__> It's worth learning ruby just to have an excuse to read Why's poignant guide
nckpz has joined #ruby
SteenJobs_ has joined #ruby
quiqua has quit [Quit: Textual IRC Client: www.textualapp.com]
aryaching has joined #ruby
qba73 has joined #ruby
grh has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
aufi has quit [Quit: Leaving]
SteenJobs_ has quit [Client Quit]
marchelzo has quit [Quit: marchelzo]
PresidentBiscuit has joined #ruby
synthroid has quit [Remote host closed the connection]
BackEndCoder has quit [Excess Flood]
Derperperd has joined #ruby
nadir has joined #ruby
opt8 has quit [Ping timeout: 252 seconds]
module7 has left #ruby [#ruby]
case__ has quit [Quit: leaving]
BackEndCoder has joined #ruby
AndrewIsHere has joined #ruby
case__ has joined #ruby
opt9 has joined #ruby
KCmetro__ has quit [Quit: Leaving...]
blackmesa has quit [Ping timeout: 260 seconds]
PresidentBiscuit has quit [Ping timeout: 258 seconds]
grh has quit [Read error: Connection reset by peer]
raspado has joined #ruby
case__ has quit [Client Quit]
buzz0763 has quit [Quit: Textual IRC Client: www.textualapp.com]
case__ has joined #ruby
buzz0763 has joined #ruby
grh has joined #ruby
BackEndCoder has quit [Excess Flood]
_sfiguser has quit [Remote host closed the connection]
AndrewIsHere has quit []
qguv_ is now known as qguv
BackEndCoder has joined #ruby
marxarelli|afk has quit [Ping timeout: 240 seconds]
lanc has joined #ruby
bkxd has joined #ruby
gregf_ has joined #ruby
danguita has quit [Remote host closed the connection]
nofxx has joined #ruby
case__ has quit [Quit: Lost terminal]
ruby-lang979 has joined #ruby
nofxx has quit [Remote host closed the connection]
synthroid has joined #ruby
Guest91357 has quit [Quit: omg]
theRoUS has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
Definity has joined #ruby
csk has quit [Quit: ZZZzzz…]
nofxx has joined #ruby
qba73 has quit [Read error: Connection reset by peer]
Slinky_Pete has joined #ruby
maloik has quit [Remote host closed the connection]
mlkkk has quit [Remote host closed the connection]
qba73 has joined #ruby
maloik has joined #ruby
mistermocha has joined #ruby
blackmesa has quit [Quit: WeeChat 1.6]
ruby-lang979 has quit [Quit: Page closed]
szulak has joined #ruby
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nicola_pav has quit [Quit: Leaving]
mlkkk has joined #ruby
Cyrus has joined #ruby
esObe has quit [Read error: Connection reset by peer]
esObe has joined #ruby
Slinky_Pete has quit [Ping timeout: 258 seconds]
larcara has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 260 seconds]
amclain has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
larcara has joined #ruby
jsrn has quit [Quit: Leaving]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
marxarelli has joined #ruby
Silthias1 has quit [Quit: Leaving.]
Silthias has joined #ruby
esObe has quit [Read error: Connection reset by peer]
esObe has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
lenwood has joined #ruby
larcara has quit [Ping timeout: 260 seconds]
Silthias has quit [Read error: Connection reset by peer]
dyjakan_ is now known as dyjakan
naftilos76 has joined #ruby
braincrash has quit [Ping timeout: 268 seconds]
Silthias has joined #ruby
gman has joined #ruby
mistermocha has joined #ruby
braincrash has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grh has quit [Ping timeout: 268 seconds]
cagmz has joined #ruby
Silthias has quit [Client Quit]
mlkkk has quit []
Silthias has joined #ruby
dcunit3d has joined #ruby
xen0fon has quit [Ping timeout: 276 seconds]
mim1k has quit [Ping timeout: 240 seconds]
manjaro-kde5_ has joined #ruby
montanonic has joined #ruby
lenwood has quit [Ping timeout: 258 seconds]
shinnya has quit [Ping timeout: 256 seconds]
gusrub has joined #ruby
gusrub has quit [Client Quit]
larcara has joined #ruby
shiittydev has joined #ruby
shiittydev has left #ruby [#ruby]
FastJack has quit [Ping timeout: 240 seconds]
mokiwis has joined #ruby
gusrub has joined #ruby
mim1k|work has quit [Ping timeout: 240 seconds]
gman has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
SirOliver has joined #ruby
SirOliver has quit [Remote host closed the connection]
Beams has quit [Quit: .]
SirOliver has joined #ruby
rakm has joined #ruby
yokel has joined #ruby
mokiwis has quit [Quit: Textual IRC Client: www.textualapp.com]
dcunit3d has quit [Ping timeout: 240 seconds]
fusta has quit [Ping timeout: 240 seconds]
gman_ has joined #ruby
Lord_of_Life has quit [Excess Flood]
SirOliver has quit [Client Quit]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
ra88it has joined #ruby
Lord_of_Life has joined #ruby
Asher has joined #ruby
Kahraman has joined #ruby
djbkd has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mgorbach has quit [Remote host closed the connection]
djbkd has joined #ruby
larcara has quit []
milardovich has quit [Remote host closed the connection]
_djbkd has joined #ruby
gman_ has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
__Yiota has joined #ruby
gman_ has joined #ruby
freddymungo has joined #ruby
mgorbach has joined #ruby
aupadhye has quit [Quit: Leaving]
mgorbach has quit [Remote host closed the connection]
beilabs has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
mikecmpbll has quit [Quit: inabit. zz.]
mgorbach has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
<havenwood> bin/aot-image --ruby # \o/
milardovich has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
naprimer_2 has quit [Ping timeout: 240 seconds]
pandaant has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
blaxter has joined #ruby
blaxter has quit [Client Quit]
naprimer_2 has joined #ruby
bousquet has joined #ruby
bkxd has joined #ruby
pilne has joined #ruby
FastJack has joined #ruby
nofxx has joined #ruby
Slinky_Pete has joined #ruby
freddymungo has quit [Ping timeout: 260 seconds]
jhack has quit [Quit: jhack]
esObe has quit [Read error: No route to host]
TheWhip has quit []
lanc has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
ra88it is now known as mokiwis
esObe has joined #ruby
mokiwis is now known as ra88it
antgel has quit [Ping timeout: 258 seconds]
al2o3-cr has quit [Ping timeout: 245 seconds]
Slinky_Pete has quit [Ping timeout: 260 seconds]
newrubycoder has joined #ruby
l4v2 has quit [Quit: l4v2]
vuoto has joined #ruby
radic has quit [Ping timeout: 260 seconds]
ra88it is now known as mokiwis
qba73 has quit [Read error: Connection reset by peer]
qba73 has joined #ruby
mokiwis has quit [Quit: See ya!]
mokiwis has joined #ruby
mokiwis is now known as ra88it
nofxx has quit [Remote host closed the connection]
SirCmpwn has quit [Ping timeout: 240 seconds]
AndrewIsHere has joined #ruby
ra88it has quit [Client Quit]
mokiwis has joined #ruby
mokiwis has quit [Client Quit]
ra88it has joined #ruby
saneax-_-|AFK is now known as saneax
brent__ has quit [Remote host closed the connection]
SirCmpwn has joined #ruby
tolerablyjake has joined #ruby
ra88it has quit [Client Quit]
mokiwis has joined #ruby
nofxx has joined #ruby
mokiwis has quit [Client Quit]
x00r__ has joined #ruby
gman_ has quit [Ping timeout: 264 seconds]
brent__ has joined #ruby
enterprisey has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
xen0fon has joined #ruby
Pumukel has joined #ruby
banisterfiend has joined #ruby
mikecmpbll has joined #ruby
loechel has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 245 seconds]
<Eiam> why anything at all really.
SeepingN has joined #ruby
unshadow has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<newrubycoder> is it possible to set a range in the .tr command for multiple digit numbers like .tr 'A-I', '1-9' will work but not .tr 'A-Z', '1-26'
whathappens has joined #ruby
Cohedrin has joined #ruby
ketan has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
ketan has joined #ruby
vuoto has quit [Remote host closed the connection]
versigtig has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jhack has joined #ruby
nofxx has joined #ruby
<elomatreb> newrubycoder: Try gsub and a regex
govg has joined #ruby
hahuang61 has joined #ruby
enterprisey has quit [Remote host closed the connection]
<newrubycoder> elomatreb: maybe i will i guess, i kinda like the .tr command tho
hotpancakes has joined #ruby
<elomatreb> Yes, but recognizing multiple consecutive digits is a little more complex than what the tr patterns support
arecascino has joined #ruby
grh has joined #ruby
<arecascino> hey guys i made a really fast addition function
<ruby[bot]> arecascino: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e8c188617c15f75a760d9788a7ce29f5
<ruby[bot]> arecascino: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
szulak has joined #ruby
jhack has quit [Quit: jhack]
duderonomy has joined #ruby
chouhoul_ has joined #ruby
csk has joined #ruby
nofxx has quit [Remote host closed the connection]
bathtub_shark has quit [Quit: WeeChat 1.7]
chouhoulis has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcao219 has joined #ruby
ur5us has joined #ruby
pragmaticus has joined #ruby
Zarthus has quit [Ping timeout: 258 seconds]
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
chouhoul_ has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
renchan has quit [Quit: Leaving...]
chouhoulis has joined #ruby
bkxd has joined #ruby
arecascino has quit [Quit: Page closed]
tomphp has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
nankyokusei has joined #ruby
hobodave has joined #ruby
dcunit3d has joined #ruby
unshadow_ has joined #ruby
despai has quit [Ping timeout: 240 seconds]
despai has joined #ruby
saneax is now known as saneax-_-|AFK
jshjsh has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Slinky_Pete has joined #ruby
unshadow has quit [Ping timeout: 258 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
anisha has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
UserJosh has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 245 seconds]
fuzzyhorns has quit [Quit: Leaving.]
qba73 has quit [Read error: Connection reset by peer]
unshadow has joined #ruby
qba73 has joined #ruby
d5sx43 has joined #ruby
mistermocha has quit []
jaruga______ has quit [Quit: jaruga______]
nankyokusei has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
unshadow_ has quit [Ping timeout: 240 seconds]
Lord_of_Life has quit [Excess Flood]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
unshadow has quit [Client Quit]
Lord_of_Life has joined #ruby
SirOliver has joined #ruby
reverberations has joined #ruby
d5sx43 has quit [Quit: Leaving...]
dcunit3d has quit [Ping timeout: 240 seconds]
brent__ has quit [Read error: Connection reset by peer]
biox has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
lanc has joined #ruby
rakm has joined #ruby
chouhoul_ has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
djellemah_ has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
freddymungo has joined #ruby
markholmes has joined #ruby
antgel has joined #ruby
teclator has joined #ruby
izaac_ has quit [Ping timeout: 240 seconds]
jshjsh has quit [Ping timeout: 240 seconds]
biox has quit [Quit: brb servers are ded]
izaac_ has joined #ruby
horst has quit [Ping timeout: 240 seconds]
biox has joined #ruby
Puffball has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
fuzzyhorns has joined #ruby
jamesaxl has joined #ruby
Puffball has joined #ruby
JoshS has joined #ruby
Rodya_ has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.5]
SpeakerToMeat has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
SpeakerToMeat has left #ruby ["WeeChat 1.6-dev"]
elifoster has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
al2o3-cr has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
TomyLobo has joined #ruby
nankyokusei has quit [Remote host closed the connection]
bocaneri has quit [Remote host closed the connection]
username_ has joined #ruby
gman has joined #ruby
jshjsh has joined #ruby
enterprisey has joined #ruby
freddymungo has quit [Ping timeout: 268 seconds]
qba73 has quit [Remote host closed the connection]
DrN has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
DrN is now known as Montag
qba73 has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
qba73 has quit [Read error: Connection reset by peer]
jshjsh has quit [Ping timeout: 260 seconds]
qba73 has joined #ruby
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
cibs has joined #ruby
duderonomy has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
rfoust has joined #ruby
szulak has joined #ruby
bigtawm has joined #ruby
cdg has joined #ruby
Yzguy has joined #ruby
szulak has quit [Client Quit]
cdg_ has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 260 seconds]
gnufied has quit [Ping timeout: 256 seconds]
ecuanaso has joined #ruby
rikai_ is now known as rikai
AndBobsYourUncle has joined #ruby
zeroDi has joined #ruby
dcunit3d has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
Zarthus has joined #ruby
jose_leeto has quit [Quit: Leaving.]
jose_leeto has joined #ruby
jose_leeto has quit [Client Quit]
chouhoul_ has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
Montag has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bkxd has joined #ruby
bathtub_shark has joined #ruby
Rodya_ has joined #ruby
SeepingN has quit [Remote host closed the connection]
SeepingN has joined #ruby
AnoHito_ has joined #ruby
lupine has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
szulak has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gnufied has joined #ruby
nadir is now known as nadir|absentia
nadir|absentia is now known as nadir
AnoHito has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
qba73 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
manjaro-kde5_ has quit [Ping timeout: 255 seconds]
jhack has joined #ruby
maneco has quit [Quit: Leaving]
rakm has joined #ruby
jhack has quit [Client Quit]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dcunit3d has joined #ruby
ifctj has joined #ruby
Yzguy has quit [Quit: Zzz...]
SirOliver has quit [Quit: ZZZzzz…]
jenrzzz has quit [Ping timeout: 260 seconds]
qba73 has joined #ruby
Slinky_Pete has quit []
qmr has joined #ruby
<qmr> what's recommended for getting newer ruby on debian jessie? ruby-build ?
al2o3-cr has quit [Ping timeout: 240 seconds]
gnufied__ has joined #ruby
gnufied__ has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
<qmr> wtf, ruby-build has same definitions as the versions available in repos, nothing newer
qba73 has quit [Ping timeout: 240 seconds]
lupine has joined #ruby
jose_leeto has joined #ruby
kallisti5 has joined #ruby
<kallisti5> ok.. YAML.dump is stupid. Anyone know how to turn a yaml document into a hash / array map and back without all the silly Psych object stuff?
mim1k has quit [Ping timeout: 256 seconds]
<kallisti5> I pretty much want to pass in a yaml, tweak it, and turn it back into text. (like you can with json)
qba73 has joined #ruby
nowhere_man has joined #ruby
gman has quit [Ping timeout: 255 seconds]
ur5us has quit [Remote host closed the connection]
Fernando-Basso has joined #ruby
cschneid_ has quit []
ldnunes has quit [Quit: Leaving]
millerti has joined #ruby
qba73 has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
al2o3-cr has joined #ruby
anisha__ has joined #ruby
SirOliver has joined #ruby
freddymungo has joined #ruby
JeanCarloMachado has joined #ruby
mim1k has joined #ruby
anisha has quit [Ping timeout: 255 seconds]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
anisha__ has quit [Client Quit]
anisha_ has quit [Ping timeout: 264 seconds]
tvw has joined #ruby
jhack has quit [Quit: jhack]
gman has joined #ruby
JoshS has joined #ruby
radic has joined #ruby
username_ has quit [Ping timeout: 260 seconds]
saslam has quit [Quit: Leaving]
<kallisti5> aah safe_load. How silly
enterprisey has quit [Remote host closed the connection]
cschneid_ has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 240 seconds]
dc1 has joined #ruby
esObe has quit [Read error: Connection reset by peer]
esObe has joined #ruby
dcunit3d has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
gevans has joined #ruby
whathappens has quit [Remote host closed the connection]
mholmes has joined #ruby
whathappens has joined #ruby
bkxd has joined #ruby
markholmes has quit [Ping timeout: 260 seconds]
whathappens has quit [Read error: Connection reset by peer]
elifoster has quit [Quit: class]
whathappens has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
FastJack_ has joined #ruby
cdg has joined #ruby
FastJack has quit [Ping timeout: 260 seconds]
FastJack_ is now known as FastJack
ledestin has joined #ruby
zherbert has joined #ruby
grh has quit [Ping timeout: 258 seconds]
<zherbert> anyone free to take a quick look at this?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mim1k has joined #ruby
<toretore> zherbert: 1) determine format used in a string, then 2) parse string using a specific format string
<zherbert> if you look at the post i tried that
<toretore> no, you just fed it to parse to try and guess
<toretore> Time.strptime(determine_format(str), str)
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<toretore> determine_format would return a suitable format string for strptime
<toretore> but given the two formats you mentioned, there isn't a way you can determine which one is used accurately
<havenwood> zherbert: How do you handle?: "10101111"
<havenwood> zherbert: is that 10/10/1111 or 11/11/1010
<havenwood> ?
<toretore> "20012001" is valid in both, for example
zherbert has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
gman has quit [Quit: leaving]
zherbert has joined #ruby
BackEndCoder has quit [Excess Flood]
<zherbert> okay I see what you're saying
username_ has joined #ruby
<zherbert> i wish that these people new better formatting conventions to make my life a hell of a lot easier
Guest43 has joined #ruby
<zherbert> knew*
<havenwood> zherbert: Is there a date range you know it'll be in?
<toretore> if a string is valid for both formats, just pick one. if someone complains, tell them to not give you garbage data :P
BackEndCoder has joined #ruby
cdg has quit [Read error: Connection reset by peer]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
<zherbert> between today and sometime in like 2005
FastJack has quit [Quit: leaving]
whathappens has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
<zherbert> but they started off archiving data in one format and then decided to switch to another so most of them are in the %Y%M%D format
whathappens has joined #ruby
Yzguy has joined #ruby
csk157_ has joined #ruby
<toretore> can you tell exactly when the switch happened?
ur5us has joined #ruby
_aeris_ has quit [Remote host closed the connection]
x00r__ has quit [Ping timeout: 240 seconds]
<toretore> then you can do something like `if filename[/archive_(\d+)\.csv/, 1].to_i < 2254 then old_format else new_format`
whathappens has quit [Ping timeout: 240 seconds]
csk157_ has quit [Ping timeout: 255 seconds]
skweek has quit [Ping timeout: 256 seconds]
_aeris_ has joined #ruby
ocbtec has quit [Quit: leaving]
Lildirt has joined #ruby
<zherbert> Not really their data is kind of all over the place. I think I have a solution that will work for like 80-90 percent of the data.
<zherbert> that's going to have to be good enough and maybe they will learn their lesson ;)
nowhere_man has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
TheMoonMaster has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Guest43 has quit [Ping timeout: 264 seconds]
Guest43_ has joined #ruby
nowhere_man has joined #ruby
bigtawm has quit []
djellemah_ has quit [Remote host closed the connection]
bigtawm has joined #ruby
zherbert has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cdg has joined #ruby
nankyokusei has joined #ruby
<bigtawm> Im trying to create a copy of an instance variable. Its a multidimensional array that represents a chess board called @board and Im making changes to it but I want to save a copy of it in a variable called copy_board so I can revert back to the original when I am done making changes. Ive been having problems getting the copy to restore any advice?
markholmes has joined #ruby
cdg has quit [Read error: Connection reset by peer]
tercenya_ has quit [Read error: Connection reset by peer]
<bigtawm> I can share a gist upon request
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tercenya has joined #ruby
cdg has joined #ruby
Lord_of_Life has quit [Excess Flood]
nowhere_man has quit [Remote host closed the connection]
<Eiam> >> ["3.0," , "Stuff", "More stuff", "2015"].find {|x| x[/(d+.\d+)/]}
<ruby[bot]> Eiam: # => nil (https://eval.in/737928)
Lord_of_Life has joined #ruby
mholmes has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
<Eiam> meh. ["3.0," , "Stuff", "More stuff", "2015"].find {|x| x[/(\d+.\d+)/]} . So I'd like to have the regex first result ALSO be whats first returned without having to re-run it
<Eiam> instead of returning "3.0," which is the first value in the array that matches, return actually "3.0" which is the first match too
jhack has joined #ruby
lanc has joined #ruby
nankyokusei has quit [Ping timeout: 259 seconds]
<Eiam> but i can't think of a way to do it without re-running the match again
nowhere_man has joined #ruby
<Papierkorb> >> ["3.0," , "Stuff", "More stuff", "2015"].find {|x| x[/(\d+.\d+)/]}; p $1
<ruby[bot]> Papierkorb: # => "3.0" ...check link for more (https://eval.in/737929)
<Papierkorb> Eiam: yay ^
<Eiam> haha what
<Eiam> wtf is that
<Eiam> some global regex thing right?
<manveru> first match :)
<Papierkorb> Good 'ol ugly thread-global regex group match variable
<Eiam> haha okay I thought it looked familiar
<Eiam> okay thats very clever
synthroi_ has joined #ruby
<Eiam> but given it took me a minute to realize what it was, not sure I want to write it. it DOES solve what I was asking so props for that =)
<manveru> you can also use Regexp.last_match
<manveru> if you like it verbose
<Eiam> well I don't want to *write* the regex twice
<Eiam> and I want it all to be one line because i don't need to store the regex
despai has quit [Ping timeout: 245 seconds]
<Papierkorb> >> a = nil; ["3.0," , "Stuff", "More stuff", "2015"].find {|x| a = x.match(/(\d+.\d+)/)}; a[1]
<ruby[bot]> Papierkorb: # => "3.0" (https://eval.in/737930)
raul782 has joined #ruby
<Papierkorb> Eiam: Another solution not using any globals ^
<Papierkorb> They're still set, but at least you don't have to use em
despai has joined #ruby
Guest43_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Eiam> if we restate the problem "find the first value in an array that matches a regexp and return the matched value" make it seem any cleaner?
<Eiam> yeah.. I like the $1 because its hilariously clever but I don't think I'll use it
tyang has quit [Read error: Connection reset by peer]
<Eiam> maybe a map with a single return value
brent__ has quit [Remote host closed the connection]
synthroid has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
<Papierkorb> Eiam: Why not the last solution I posted? It doesn't use a global and does what you wanted
nowhere_man has quit [Remote host closed the connection]
<Eiam> I don't like it being 3 statements on one line
ocbtec has joined #ruby
nowhere_man has joined #ruby
<Papierkorb> well those are on one line because the bot doesn't let me write it otherwise :)
<Eiam> hehe right I understand that, but then its 3 lines to do work, but only one line is the real work
<Eiam> the rest is just placeholders
<bigtawm> Can anyone help me make a copy of a multidimensional array?
<Eiam> bigtawm: I'm sure! don't ask to ask tho just ask bud
<Papierkorb> >> def foo; ["3.0," , "Stuff", "More stuff", "2015"].each{|x| return a[1] if a = x.match(/(\d+.\d+)/)}; nil; end; foo
ifctj has quit [Ping timeout: 255 seconds]
<ruby[bot]> Papierkorb: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<manveru> bigtawm: Marshal.load(Marshal.dump(arr))
<qmr> I'm trying to run geminabox. I'm at the bit where it says 'Start your gem server with 'rackup' to run' ... how do I run that command ?
<qmr> ruby 2.2 or something is installed, but I have a rbenv with 2.4
<Eiam> manveru: thats still really how people do it? =( god I was writing code like that 6 years ago..
<manveru> qmr: you type `rackup` in your terminal
<qmr> that's not a valid command
<Papierkorb> Eiam: That crams it into two legitimate lines, but I still like the #find version more
<manveru> Eiam: well, it works, no idea if there's a new way
<bigtawm> manveru: will this create a deep copy that will preserve the objects inside?
<manveru> bigtawm: mostly, it doesn't do lambdas
tolerablyjake has joined #ruby
<qmr> -bash: rackup: command not found
<manveru> qmr: rackup is part of the rack gem
<manveru> maybe you need to run with `bundle exec rackup`
<Eiam> bigtawm: yeah its historically the way to do deep copies
<Eiam> there is a gem that might make it prettier iirc
<qmr> that doesn't help me very much. please assume I know nothing
<alexandernst> how can I get the content-length of a file I'm downloading with httpclient ?
<qmr> bundle is also not in path
<Eiam> alexandernst: check the headers
<bigtawm> Thanks fo much Ill go give it a try
<bigtawm> so*
<qmr> ok .rbenv/versions/2.4.0/bin/rackup did the needful. I think
<alexandernst> Eiam: yes, but how. How can I get access to the headers? client = HTTPClient.new \n client.get_content(url)
<Eiam> did the needful??
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
<Eiam> https://en.wikipedia.org/wiki/Do_the_needful oh thats a thing, okay then. TIL
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
<toretore> alexandernst: you are discarding the headers by using get_content (the name should be an indication)
<toretore> you need to use something else that will also return the headers
nettoweb has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
<qmr> ok, geminabox is running and I've disowned the pid
nettoweb1 has joined #ruby
<Papierkorb> qmr: You could also write a systemd service for it
<Papierkorb> to make it all kinds of nice
tildes has joined #ruby
bkxd has joined #ruby
<qmr> .... and now I can't connect, even though it's running and listening on port 80. wtf
<Papierkorb> qmr: Make sure you let it bind to the correct address (or just 0.0.0.0), and not only localhost
<qmr> it is, I could get to webui before I disowned it
ur5us_ has joined #ruby
synthroi_ has quit []
<Papierkorb> did you ^Z it before disowning?
<qmr> yes
<qmr> Process 15228 attached
<qmr> --- stopped by SIGTSTP ---
<Papierkorb> Then it's still stopped
nettoweb has quit [Ping timeout: 260 seconds]
<Papierkorb> Just send it SIGCONT through htop or kill
<qmr> Duh!
<qmr> I want to be just like you when I grow up Papierkorb
nettoweb1 has quit [Client Quit]
teclator has quit [Ping timeout: 252 seconds]
teclator_ has joined #ruby
<Radar> me too
<Papierkorb> qmr: Thanks for the compliment. But knowing about ^Z is already advanced, many coworkers don't know any shell job handling, you're doing fine
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
jhack has quit [Quit: jhack]
<qmr> any bright ideas for getting all our gems in there?
ur5us has quit [Ping timeout: 256 seconds]
<Papierkorb> gem inabox my_awesome_gem.gemspec
bkxd has quit [Ping timeout: 260 seconds]
gregf_ has quit [Ping timeout: 260 seconds]
csk has quit [Quit: ZZZzzz…]
<Papierkorb> Radar: OHAYO SIR
<Radar> Papierkorb: good morning
SirOliver has quit [Quit: ZZZzzz…]
tusharmalik has quit [Ping timeout: 240 seconds]
tildes has quit [Read error: No route to host]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has quit [Ping timeout: 240 seconds]
pragmaticus has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 260 seconds]
bousquet has quit []
marchelzo has joined #ruby
whathappens has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
<marchelzo> hello ruby family
raul782 has quit [Remote host closed the connection]
<Papierkorb> hello
blackwind_123 has quit [Ping timeout: 240 seconds]
leitz has joined #ruby
JeanCarloMachado has joined #ruby
<marchelzo> how are you Papierkorb
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<Papierkorb> Doing fine atm, on your end?
<marchelzo> doing ok :)
cdg has quit [Read error: Connection reset by peer]
<Papierkorb> neato
<leitz> Why is the hash getting a key for both the field name and the number? https://gist.github.com/LeamHall/5e6bc70e51caa43f7c01b5d9eefb3b60
cdg has joined #ruby
blackwind_123 has joined #ruby
<marchelzo> why not
<leitz> Same effective result if i do a row.each and puts the k,v pair.
<marchelzo> i don't see what that's a problem
<marchelzo> s/what/why/
malconis has quit [Read error: Connection reset by peer]
<leitz> Because I'm pulling one row with 18 fields and gettng 36 results.
<leitz> Beacuse if I want to iterate through the hash as a k/v set I have 50% trash.
<Papierkorb> leitz: Looks like it's mapping from the column id *and* from the column name
<alexandernst> I'm downloading a file with HTTPClient. And I want to upload each chunk at the same time. I have a StringIO buffer that I use to save the downloaded chunks, but as soon as I start the upload, the download stops (because the upload is blocking): http://pastebin.com/xyi63BUN
<ruby[bot]> alexandernst: as I told you already, please use https://gist.github.com
<marchelzo> why would you want to iterate over the columns in a table row? that's not really a sensible operation
<alexandernst> how can I avoid that?
<leitz> Papierkorb, agreed. The data, where listed, seems correct. Just not sure why the double listing.
<Papierkorb> leitz: so allowing both row[6] and row["species"]
hanmac has joined #ruby
<marchelzo> a row is like a record. in C, would you iterate over members of a struct?
nofxx has joined #ruby
<Papierkorb> leitz: I don't know the sqlite3 driver on that level (I always just use `sequel`...), but if there's no option to turn that off, you could just #select those entries which have a String as key
jamesaxl has quit [Quit: Leaving]
<leitz> Papierkorb, is "sequel" a gem that can do SQLite3 databases?
<Papierkorb> Yeah, it supports many RDBMSes, among them sqlite3 and postgres
<Papierkorb> It's a full-blown ORM though
mim1k has quit [Ping timeout: 252 seconds]
<toretore> not really orm the way most people think of it
username_ has quit [Quit: Lost terminal]
<Papierkorb> I may be biased, but I think it's fantastic and to me, the best ORM I've ever used
<leitz> Hmm...my needs are pretty small; read the fields, populate a gui, reinsert data.
<toretore> (unless you want that, in which case you choose to use that part of it)
<toretore> use sequel, it's good
<toretore> or continue using ruby-sqlite3
<leitz> Installing sequel now, will give it a go.
<Papierkorb> http://sequel.jeremyevans.net/ if you haven't found that yet leitz
<leitz> Papierkord, yup. reading that now too. :)
despai has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
<Papierkorb> And if you end up liking it, and you need a small web framework, see Roda :P
* leitz goes to look up Roda.
despai has joined #ruby
<adam12> I didn't think I'd take to Roda but I've been enjoying it a lot
<Papierkorb> made by the same guy, shares the same principles
psychicist__ has quit [Ping timeout: 240 seconds]
nofxx has quit [Remote host closed the connection]
csk has joined #ruby
<leitz> Actually, that leads to a question. I need to be able to edit fields in the DB, and was thinking of RubyTk. Would Roda be better/easier?
biberu has quit []
<Papierkorb> But I'm biased, I've been using both in my project template for the last 2 years or so, and still don't regret it
<leitz> I'm looking for a Ruby solution, a friend is writing the PHP/Apache webstuff for the actual site.
<qmr> so a gem is a gemspec file? or these trees of source code?
<marchelzo> why are you reinventing a rdbms front-end?
<Papierkorb> qmr: A gem has a gemspec file to describe itself, and has source code to actually do something useful. Though "gem" often times also refers to the packaged version of that, which you install through bundler or `gem`
jenrzzz has joined #ruby
cdg_ has joined #ruby
Snickers has quit [Quit: Snickers]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<qmr> Error fetching http://10.0.14.14/: bad response Not Found 404 (http://10.0.14.14/specs.4.8.gz)
cdg_ has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
<Papierkorb> Make sure you see the web interface qmr. If not, make sure it's not a network routing issue (that is, that IP is reachable from your computer)
<qmr> I can load webUI and reach that IP fine
<Papierkorb> did you already upload a gem into it?
tomphp has joined #ruby
<qmr> I'm just trying to add it as a source, I think
<qmr> I dropped all the source code repos with our gems in there, not sure if that will work
cdg has quit [Ping timeout: 255 seconds]
<Papierkorb> You see which gems it hosts on the web interface
<Papierkorb> if nothing's there, then it doesn't host any
<qmr> nothing listed in there
last_staff has joined #ruby
jc_io has joined #ruby
ramortegui has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> You have to 1) build a gem 2) and then upload the built .gem archive through the web interface. If you install `geminabox` on your computer, you can also write `gem inabox my_gem.gemspec` instead which does both for you
milardovich has joined #ruby
cschneid_ has quit [Remote host closed the connection]
Lord_of_Life has quit [Excess Flood]
millerti has joined #ruby
<leitz> Hrmph...can't find "sequel" in the load path. Off to figure it out.
<Papierkorb> leitz: Read about bundler, https://bundler.io/
jenrzzz has quit [Ping timeout: 258 seconds]
raul782 has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
<qmr> https://ptpb.pw/jaeP can't push
raul782 has quit [Remote host closed the connection]
fuzzyhorns has quit [Quit: Leaving.]
raul782 has joined #ruby
Lord_of_Life has joined #ruby
<Papierkorb> qmr: hang on, am on phone
Snickers has joined #ruby
jhack has joined #ruby
ddffg has joined #ruby
polishdub has quit [Quit: Leaving]
<leitz> Hmm...Papierkorb, I now have to lose time on another rabbit trail. Ugh.
al2o3-cr_ has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
fredolinhares has joined #ruby
malconis has joined #ruby
brent__ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Ping timeout: 255 seconds]
<Papierkorb> leitz: No problem. #ruby's will still be here by that time :)
marxarelli is now known as marxarelli|afk
<Papierkorb> qmr: Please try then building the .gemspec (`gem build the.gemspec`), and manually upload the .gem file through the web interface. If you already have the .gem from somewhere else, that's fine too
Prepper_Jack has quit [Quit: Leaving]
al2o3-cr_ is now known as al2o3-cr
Guest76152 has joined #ruby
<Guest76152> 9 11 attacks, Did USA do it itself or it just let it happen?
<Guest76152> Some of the benefits Americans say they achieved after 9 11 attacks include:
<Guest76152> If al-qaeda did it, why go to kill 2 million Iraqi?
<Guest76152> Did USA administration murder 3000 American citizen in 9 11 attacks to justify starting a war against iraq?
<Guest76152> *constant flow of oil, which price is in continuous decline. Trump said he will simply take the Iraqi oil, and when he was told that Iraqi oil belongs to iraq he said there is no iraq(after usa destroyed it ).
<Guest76152> *Invasion of afghanstan with construction of not less than 14 american military base which give a close eye on china.
<Guest76152> *Removal of potential threat to isreal represented in iraq which throw isreal with more than 30 rocket after American assault on iraq during 2nd gulf war.
Guest76152 has quit [Excess Flood]
Guest76152 has joined #ruby
<Papierkorb> !ops
<ruby[bot]> Papierkorb: ops currently in #ruby: adaedra, aredridel, havenwood, Radar, apeiros, banisterfiend, baweaver, helpa, jhass, matthewd, miah, ruby[bot], zenspider and zzak
Guest76152 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<baweaver> freenode got em first
<Papierkorb> G-lining works too I guess
<baweaver> that it does.
bkxd has joined #ruby
<qmr> Invalid gemspec in [./hbase-orm/hbase-orm/hbase-orm.gemspec]: No such file or directory - git
<leitz> Papierkorb, at this point I'd rather try and figure out the double key printing issue. Not ready to start learning multiple gems yet.
jenrzzz has joined #ruby
<Papierkorb> leitz: Look at the Enumerable#select method to filter the row
hotpancakes has quit [Remote host closed the connection]
* leitz goes to read.
hotpancakes has joined #ruby
<Papierkorb> leitz: To give you an example of usage in your case: `row.select{|key, value| key.is_a?(String)}.to_h`
hotpancakes has quit [Remote host closed the connection]
hotpanca_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<Papierkorb> leitz: important, #select doesn't change `row` (but #select! would). And #to_h gets you back a Hash again. I suggest trying the line without to see what's going on
<baweaver> Papierkorb: select returns a hash
jeffreylevesque_ has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
<baweaver> &ri Hash#select
<baweaver> so does reject
<Papierkorb> Did it before 2.3 too?
<baweaver> >> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<ruby[bot]> baweaver: # => {:b=>2} (https://eval.in/738013)
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<baweaver> I want to say 2.2, but I'd have to check
<Papierkorb> 22>> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<baweaver> 22>> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<ruby[bot]> Papierkorb: # => {:b=>2} (https://eval.in/738014)
<ruby[bot]> baweaver: # => {:b=>2} (https://eval.in/738015)
<baweaver> 21>> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<ruby[bot]> baweaver: # => {:b=>2} (https://eval.in/738016)
<baweaver> 20>> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<ruby[bot]> baweaver: # => {:b=>2} (https://eval.in/738017)
<baweaver> 19>> {a: 1, b: 2, c: 3}.select { |_, v| v.even? }
<ruby[bot]> baweaver: # => {:b=>2} (https://eval.in/738018)
<Papierkorb> Huh I thought Hash used #select from Enumerable
<baweaver> huh
<baweaver> So way back then
<qmr> Papierkorb: Ok, after installing git I successfully built and uploaded a gem
<baweaver> Na, it has it implemented in Hash
<qmr> doing this manually for 50 gems is going to suck though
<Papierkorb> leitz: In short, try the line without #to_h, as it's useless in this case
SeepingN has quit [Remote host closed the connection]
yokel has joined #ruby
<Papierkorb> qmr: shell for loop *cough*
jenrzzz has quit [Ping timeout: 260 seconds]
<qmr> ok smart guy, give me a shell for loop that tells your browser of choice to upload
SeepingN has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Papierkorb> `gem minabox the.gem` should work, if that fails, there's still curl
<qmr> huh, why is it working now
markholmes has quit [Remote host closed the connection]
jeffreylevesque_ is now known as jeffreylevesque
Xentil has joined #ruby
<qmr> yes, yes, shiny beautiful gems all up in here. the devs will rejoyce. thanks so much.
__Yiota has joined #ruby
mikeiniowa has quit [Remote host closed the connection]
mikeiniowa has joined #ruby
mim1k has joined #ruby
csk has quit [Quit: ZZZzzz…]
gusrub has quit [Remote host closed the connection]
safetypin has quit [Quit: ZZZzzz…]
gusrub has joined #ruby
<alexandernst> I'm downloading a file with HTTPClient. And I want to upload each chunk at the same time. I have a StringIO buffer that I use to save the downloaded chunks, but as soon as I start the upload, the download stops (because the upload is blocking): pastebin.com/xyi63BUN . how can I avoid that?
<ruby[bot]> alexandernst: as I told you already, please use https://gist.github.com
last_staff has quit [Quit: flailing asleep]
SirOliver has joined #ruby
brandon_ has quit [Quit: Leaving]
username_ has joined #ruby
cpruitt has quit [Quit: cpruitt]
jeffreylevesque has quit [Ping timeout: 240 seconds]
hobodave has quit [Quit: Computer has gone to sleep.]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
Lord_of_Life has quit [Excess Flood]
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
csk157_ has joined #ruby
SeepingN has joined #ruby
Lord_of_Life has joined #ruby
hotpancakes has quit [Remote host closed the connection]
despai has quit [Ping timeout: 260 seconds]
despai has joined #ruby
CloCkWeRX has joined #ruby
csk157_ has quit [Ping timeout: 260 seconds]
bigtawm has quit [Ping timeout: 260 seconds]
fowlduck has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
TPug has joined #ruby
Snickers has quit [Quit: Snickers]
<leitz> Papierkorb, the row is a SQLite3::ResultSet::ArrayWithTypesAndFields, and doesn't seem to have a to-h method.
<fowlduck> is there something like Enumerable#detect that returns the truthy value instead of the element for which the value is truth? Something like [nil, {}, false].method{|i| i } # => {}
Snickers has joined #ruby
<leitz> I can index the row by index key though.
Snickers has quit [Client Quit]
johnny56_ has quit [Ping timeout: 264 seconds]
Snickers has joined #ruby
<fowlduck> err, no, my example is bad
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
<fowlduck> [1, 2, 3].detect{|id| Account.where(:id => id).first } # => returns the first found Account object (it's more complicated than that but this is good enough)
Snickers has quit [Client Quit]
Snickers has joined #ruby
jose_leeto has quit [Quit: Leaving.]
marxarelli|afk is now known as marxarelli
<Radar> fowlduck: what do you expect to be returned there?
Snickers has quit [Client Quit]
<fowlduck> I'm looking for a method that does that, I know it's not Enumerable#detect
Snickers has joined #ruby
nofxx has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
<fowlduck> maybe it's better to show the current pattern I'm dealing with https://gist.github.com/nate/e8bd77259b81bfff61370f22d0b62eb3
<marchelzo> [1, 2, 3].map { |id| Account.where(:id => id) }.detect { |a| a }
Snickers has quit [Client Quit]
cr3 has quit [Quit: leaving]
Snickers has joined #ruby
<marchelzo> err, i forgot the .first but you get the point
<marchelzo> that still feels ugly as heck though
ocbtec has quit [Quit: leaving]
<fowlduck> oh, I could put lazy on that
Snickers has quit [Client Quit]
ocbtec has joined #ruby
nankyokusei has joined #ruby
<fowlduck> and do map with detect
<fowlduck> nice one marchelzo
Snickers has joined #ruby
<fowlduck> [1, 2, 3].lazy.map { |id| Account.where(:id => id) }.detect { |a| a }
<Radar> yeah nice one :)
Snickers has quit [Client Quit]
Snickers has joined #ruby
johnny56_ has joined #ruby
<marchelzo> you need .first after the Account.where call though, right?
Snickers has quit [Client Quit]
Snickers has joined #ruby
<fowlduck> I mean, ideally I'd prefer something like: account = [1,2,3].detect_returning_result{|id| Account.where(:id => id).first }
<fowlduck> yeah, I'd need .first
Snickers has quit [Client Quit]
Snickers has joined #ruby
Rodya_ has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
Snickers has quit [Client Quit]
Snickers has joined #ruby
ResidentBiscuit has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Axy has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
<Papierkorb> leitz: Are you already using `pry`?
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<Papierkorb> leitz: If not, it's a fantastic REPL for ruby. `gem install pry pry-{coolline,toys,doc,rescue}` for a full blown version, then start it with `pry`, require sqlite3, and do a request against your DB to get a `row`. Then do `ls row` to see not only what it is, but also, what it can do
jcao219 has joined #ruby
<leitz> Papierkorb, it's a klude but it sort of works. https://gist.github.com/LeamHall/f843ded91ab694f0a56ed199f17af877
ecuanaso has joined #ruby
<Papierkorb> leitz: Trust me, it'll be worth your time, makes it much much faster to dig through libraries and things
cschneid_ has joined #ruby
<leitz> Papierkorb, won't completely work. Remember, I'm the guy with ancient Ruby. pry-cooline requires 1.9.1
nckpz has quit [Ping timeout: 260 seconds]
<marchelzo> i like to reflect and think of one ruby feature i'm grateful for each day. usually something that came in handy recently. do you guys want to participate?
dc2 has joined #ruby
<Papierkorb> leitz: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you That's even more worthy of your time
<marchelzo> today it's the .each_cons method on Enumerable for me
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<Papierkorb> leitz: You just need `pry`, the other stuff is candy on top. nice to have, but not required per se
cschneid_ has quit [Ping timeout: 245 seconds]
<marchelzo> you can use pry with readline instead of coolline
<marchelzo> cooline*
<marchelzo> cooline is for hipsters anyway
<leitz> marcheizo, yesterday it was the ease of writing a Ruby string mangler to both grep and get rid of stuff from a chat log.
<Papierkorb> and now there's a ladybeetle on my screen. great. where the f does that thing come from
dc1 has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
<marchelzo> nice leitz. that must have been satisfying
<fowlduck> old ruby can use debugger, can't it?
toretore has quit [Ping timeout: 268 seconds]
<leitz> marcheizo, more than satisfying; I was on a winderz box. It was critical.
cdg_ has quit [Remote host closed the connection]
<marchelzo> haha
<leitz> Papierkorb, just start "pry" at the command line?
<fowlduck> oh, it's ruby-debug https://github.com/ruby-debug/ruby-debug
<fowlduck> on ruby 1.8
malconis has quit [Read error: Connection reset by peer]
centrx has quit []
<leitz> fowlduck, my simple code works, though it's a hack. I was trying to understand SQLIte3 row returns.
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz> Papierkorb, pry blew up. My guess is that it's my older Ruby.: https://gist.github.com/LeamHall/5d13188184ae55e79ec7eb67bc03767c
antgel has joined #ruby
Yzguy has quit [Quit: Zzz...]
hotpancakes has quit [Ping timeout: 258 seconds]
SirOliver has quit [Quit: ZZZzzz…]
Yzguy has joined #ruby
enterprisey has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
<leitz> marcheizo, I'd add that even though my DB skills are lousy, being able to pull out stuff like this with Ruby is pretty fun.
antgel has quit [Ping timeout: 264 seconds]
patarr has quit [Ping timeout: 240 seconds]
xrcode has quit [Ping timeout: 276 seconds]
mim1k has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby
Rodya_ has quit [Remote host closed the connection]