AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
knight33 has joined #ruby
canteen4 has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
beilabs has joined #ruby
knight33 has quit [Client Quit]
aduabu has quit [Ping timeout: 240 seconds]
harai has quit [Read error: Connection reset by peer]
xuanrui has quit [Quit: Leaving]
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
nofxx has joined #ruby
mikeric has quit []
<Radar>
I thought we banned you for a month.
aduabu has quit [Ping timeout: 240 seconds]
mikeric has joined #ruby
helpa has joined #ruby
t-recx has quit [Quit: t-recx]
<gr33n7007h>
Radar: a week
ascarter has joined #ruby
aduabu has joined #ruby
AndBobsYourUncle has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
bronson has joined #ruby
TinkerTyper has joined #ruby
ascarter has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
ascarter has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 276 seconds]
aduabu has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 240 seconds]
goyox86_ has joined #ruby
cdg has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
xuanrui has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
aduabu has quit [Ping timeout: 248 seconds]
canteen4 has quit [Read error: Connection timed out]
canteen4 has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
TinkerTyper has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
tacoboy has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
xuanrui has quit [Ping timeout: 240 seconds]
Prgall has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
ShalokShalom has quit [Remote host closed the connection]
guacamole has quit [Ping timeout: 252 seconds]
xuanrui has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
xuanrui has quit [Remote host closed the connection]
slayman has joined #ruby
Prgall has quit [Quit: Page closed]
aduabu has joined #ruby
xuanrui has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
goyox86_ has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 1.9]
goyox86_ has joined #ruby
_sfiguser has quit [Quit: Leaving]
sentor``` has quit [Read error: Connection reset by peer]
drcode has joined #ruby
aduabu has joined #ruby
drcode has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
pgal_pug has joined #ruby
TinkerTyper has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
ShekharReddy has joined #ruby
pgal_pug has quit [Client Quit]
mim1k has quit [Ping timeout: 248 seconds]
frozengeek has quit [Quit: frozengeek]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
pgal_pug has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
cadillac_ has quit [Quit: I quit]
canteen4 has joined #ruby
cadillac_ has joined #ruby
uZiel has joined #ruby
beilabs has quit [Remote host closed the connection]
drcode has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
aduabu has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
sspreitz has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
sspreitz has joined #ruby
logicscience has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
logicscience has joined #ruby
pgal_pug has quit []
aduabu has joined #ruby
pgal_pug has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
nobitanobi has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
goyox86_ has quit [Quit: goyox86_]
TinkerTyper has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
ascarter has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
canteen4 has joined #ruby
xuanrui has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 248 seconds]
gix- has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
xuanrui has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
TinkerTyper has joined #ruby
gix has joined #ruby
bronson has joined #ruby
aduabu has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
SqREL has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
SqREL has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
xuanrui has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
nobitanobi has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
maryo has quit [Quit: Leaving]
aduabu has joined #ruby
SteenJobs has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
xuanrui has joined #ruby
guacamole has quit [Read error: Connection reset by peer]
canteen4 has joined #ruby
chouhoulis has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 260 seconds]
umaaji has joined #ruby
bkxd has joined #ruby
TinkerTyper has joined #ruby
mtkd has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
kt has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 248 seconds]
weemsledeux has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
canteen4 has quit [Ping timeout: 252 seconds]
kt has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
jameydeorio has joined #ruby
TinkerTyper has joined #ruby
uZiel has quit [Remote host closed the connection]
canteen4 has joined #ruby
<jameydeorio>
I’ve got a class variable that stores all the objects it has created. I’m trying to write tests with minitest, but the class variable isn’t initialized between tests
<jameydeorio>
So they end up failing in random orders when testing the length of that array, because the objects created between tests
AnotherNick has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
uZiel has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
jeremy has joined #ruby
jeremy is now known as jdrobertso
xaxisx has quit [Ping timeout: 248 seconds]
alfiemax has quit [Remote host closed the connection]
jdrobertso has quit [Client Quit]
emilford has quit [Ping timeout: 240 seconds]
jdrobertso has joined #ruby
aduabu has joined #ruby
unknownxunknown has joined #ruby
unknownxunknown has quit []
naprimer2 has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
gusrub has quit []
TinkerTyper has quit [Ping timeout: 248 seconds]
naprimer has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
canteen4 has joined #ruby
xuanrui has quit [Remote host closed the connection]
howdoi has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
xuanrui has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
SqREL has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
MoskitoHero has joined #ruby
fullstack has quit [Ping timeout: 246 seconds]
TinkerTyper has quit [Ping timeout: 252 seconds]
SqREL has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
aduabu has joined #ruby
sleepee has quit [Ping timeout: 248 seconds]
sleepee has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
MoskitoHero has quit [Quit: MoskitoHero]
Tempesta has quit [Quit: See ya!]
fullstack has joined #ruby
canteen4 has joined #ruby
Bock has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
waveprop has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jdrobertso has quit [Quit: Leaving]
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
<waveprop>
i need ruby to print ascii 1-127 in hex notation, here's what i have so far: (1..127).each { |i| h = i.chr; puts h }.to_a
canteen4 has quit [Ping timeout: 240 seconds]
<waveprop>
i did this a while ago using pack or unpack, i know there's a better way to get this into an array
enterprisey has quit [Ping timeout: 248 seconds]
kies has joined #ruby
bruce_lee has quit [Remote host closed the connection]
<Radar>
waveprop: 1.upto(127).map(&:chr)
<Radar>
>> 1.upto(127).map(&:chr)
<ruby[bot]>
Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar>
ruby[bot]: <3 u 2
<waveprop>
Radar: thank you!
<waveprop>
lol
SqREL has joined #ruby
dionysus69 has joined #ruby
<waveprop>
is there a way to force each chr to be represented as it's hex code
<waveprop>
rather than just the non-printable ones
TinkerTyper has joined #ruby
canteen4 has joined #ruby
SqREL has quit [Ping timeout: 252 seconds]
jameydeorio has quit [Quit: jameydeorio]
<havenwood>
waveprop: You want hex strings from "1" to "7f"?
slayman has quit [Quit: Leaving]
<waveprop>
waveprop: woops nope, \x00 through \xff
aduabu has quit [Ping timeout: 240 seconds]
patrontechnosoft has joined #ruby
jdrobertso has joined #ruby
cagomez has joined #ruby
nofxxx has joined #ruby
jdrobertso has quit [Remote host closed the connection]
jdrobertso has joined #ruby
Lyubo1 has quit [Ping timeout: 252 seconds]
cagomez has quit [Ping timeout: 248 seconds]
brent__ has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
paranoicsan has joined #ruby
ana_ has joined #ruby
enterprisey has quit [Client Quit]
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
xuanrui has quit [Remote host closed the connection]
xaxisx has joined #ruby
Lyubo1 has joined #ruby
brent__ has quit [Ping timeout: 248 seconds]
xuanrui has joined #ruby
aduabu has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ayonkhan has joined #ruby
biberu has joined #ruby
hhhh has joined #ruby
pgal_pug has quit [Ping timeout: 248 seconds]
xuanrui has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 252 seconds]
hhhh has quit [Client Quit]
cschneid_ has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
sarbs has joined #ruby
TinkerTyper has joined #ruby
dlitvak has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
<waveprop>
this is nearly what i want. i just need to find a way to get the .to_s(16) to left-pad the first sixteen hex-strings with a leading 0
<ruby[bot]>
waveprop: # => \x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xA\xB\xC\xD\xE\xF\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C ...check link for more (https://eval.in/849377)
drcode has quit [Read error: Connection reset by peer]
<ruby[bot]>
Radar: # => \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18 ...check link for more (https://eval.in/849379)
<ruby[bot]>
baweaver: # => "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0A\\x0B\\x0C\\x0D\\x0E\\x0F\\x10\\x11\\x12\\x1 ...check link for more (https://eval.in/849381)
aduabu has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
<ruby[bot]>
Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
jameydeorio has joined #ruby
jameydeorio has quit [Client Quit]
beilabs has joined #ruby
SqREL has quit [Ping timeout: 260 seconds]
<baweaver>
>>0.upto(255){|i|print'\x'+"%02X"%i}
<ruby[bot]>
baweaver: # => \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18 ...check link for more (https://eval.in/849383)
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
AnotherNick has quit [Ping timeout: 248 seconds]
<baweaver>
Radar: en garde
<baweaver>
sprintf always has a few dirty tricks.
<baweaver>
eam: care to join the fun?
TinkerTyper has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
<baweaver>
>>"\\x%02x"*255%[*0..255]
<ruby[bot]>
baweaver: # => "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\\x10\\x11\\x12\\x1 ...check link for more (https://eval.in/849384)
<baweaver>
though double backslack
ur5us has quit [Ping timeout: 240 seconds]
Eiam has quit [Ping timeout: 240 seconds]
<baweaver>
single throws hex escape errors
roshanavand has joined #ruby
<baweaver>
Ah, uppercase X on that last one.
aduabu has quit [Ping timeout: 248 seconds]
<baweaver>
>>"\\x%02X"*255%[*0..255]
<ruby[bot]>
baweaver: # => "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0A\\x0B\\x0C\\x0D\\x0E\\x0F\\x10\\x11\\x12\\x1 ...check link for more (https://eval.in/849385)
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
ur5us has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
SteenJobs has quit [Quit: peaceee]
<waveprop>
baweaver: noice
beilabs has quit [Remote host closed the connection]
<Radar>
baweaver: concede
conta has joined #ruby
ayonkhan_ has joined #ruby
aduabu has joined #ruby
jackjackdripper has joined #ruby
<Radar>
baweaver: bravo :D
<baweaver>
Channeling my inner Ox0dea
andikr has joined #ruby
ayonkhan has quit [Ping timeout: 248 seconds]
rabajaj has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
eroux has joined #ruby
aduabu has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 276 seconds]
mim1k has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
f48ds2 has joined #ruby
xuanrui has joined #ruby
mim1k has quit [Ping timeout: 252 seconds]
aduabu has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
<waveprop>
how did that magic even work
<waveprop>
what that % do
aduabu has joined #ruby
xuanrui has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 260 seconds]
<Radar>
sprintf
<waveprop>
ah
<waveprop>
concise af
canteen4 has joined #ruby
<Radar>
Something something perl ancestry
<Radar>
something something HOMETIMEEEE
TinkerTyper has quit [Ping timeout: 260 seconds]
tsia has joined #ruby
TinkerTyper has joined #ruby
aufi has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
beilabs has joined #ruby
<waveprop>
haha
<waveprop>
ive successfully avoided learning perl, went straight to ruby from sh+sed+awk+core_utils
aduabu has joined #ruby
paranoicsan is now known as paranoicsan[Away
juggler has joined #ruby
beilabs has quit [Ping timeout: 240 seconds]
ejnahc has joined #ruby
jdrobertso has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 252 seconds]
Ishido has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
harfangk has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
aduabu has quit [Ping timeout: 246 seconds]
aduabu has joined #ruby
Tempesta has joined #ruby
jamesaxl has joined #ruby
Tempesta has quit [Client Quit]
paranoicsan[Away is now known as paranoicsan
Tempesta has joined #ruby
Tempesta has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 240 seconds]
marr has joined #ruby
ShalokShalom has joined #ruby
<waveprop>
i'll admit though, i feel like i'm missing something
AnotherNick has joined #ruby
Silthias has joined #ruby
canteen4 has joined #ruby
beilabs has joined #ruby
mark_66 has joined #ruby
beilabs_ has joined #ruby
jaruga has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
vondruch has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 260 seconds]
* waveprop
buys a perl book
canteen4 has quit [Ping timeout: 260 seconds]
TinkerTyper has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
canteen4 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
reber has quit [Remote host closed the connection]
reber_ has joined #ruby
aduabu has joined #ruby
ur5us has quit [Remote host closed the connection]
xuanrui has joined #ruby
DTZUZO has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
xuanrui has quit [Client Quit]
TinkerTyper has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
canteen4 has joined #ruby
TinkerTyper has joined #ruby
mica has quit [Quit: bye bye]
aduabu has quit [Ping timeout: 240 seconds]
xuanrui has joined #ruby
bronson has joined #ruby
njichev has joined #ruby
ayonkhan has joined #ruby
Alina-malina has quit [Ping timeout: 240 seconds]
ayonkhan_ has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
Alina-malina has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
Xiti` has joined #ruby
reber_ has quit [Ping timeout: 240 seconds]
ryandv has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 255 seconds]
MoskitoHero has joined #ruby
zapata has quit [Ping timeout: 246 seconds]
reber has joined #ruby
ur5us has joined #ruby
workmad3 has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
cabotto has joined #ruby
juggler has quit [Ping timeout: 246 seconds]
alfiemax has quit [Remote host closed the connection]
ryandv has quit [Ping timeout: 260 seconds]
gixxer1k has joined #ruby
tvw has joined #ruby
xuanrui has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
bruno- has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
TinkerTyper has joined #ruby
charliesome has joined #ruby
cdg has joined #ruby
cdg has quit [Read error: Connection reset by peer]
canteen4 has joined #ruby
cdg has joined #ruby
vondruch has joined #ruby
cdg_ has joined #ruby
Burgestrand has joined #ruby
frozengeek has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
zapata has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 246 seconds]
MoskitoHero has quit [Remote host closed the connection]
MoskitoHero has joined #ruby
cdg_ has quit [Ping timeout: 246 seconds]
frozengeek has quit [Client Quit]
MoskitoHero has quit [Client Quit]
MoskitoHero has joined #ruby
xuanrui has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
djbkd has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
linduxed has quit [Ping timeout: 246 seconds]
thnee has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
juggler has joined #ruby
minimalism has quit [Quit: minimalism]
MoskitoHero has quit [Remote host closed the connection]
MoskitoHero has joined #ruby
sysvalve has joined #ruby
cdg has joined #ruby
aduabu has joined #ruby
danbishop has joined #ruby
pugc has joined #ruby
jdrobertso has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer is now known as Guest92766
in0perable has quit [Quit: user rectified]
TinkerTyper has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 268 seconds]
Defenestrate has joined #ruby
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
TinkerTyper has joined #ruby
juggler has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
Guest92766 has quit [Changing host]
Guest92766 has joined #ruby
Guest92766 is now known as lxsameer
canteen4 has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
canteen4 has joined #ruby
InfinityFye has joined #ruby
marr has quit [Remote host closed the connection]
xuanrui has quit [Quit: Leaving]
MoskitoHero has quit [Quit: MoskitoHero]
aduabu has quit [Ping timeout: 276 seconds]
mtkd has quit [Ping timeout: 248 seconds]
MoskitoHero has joined #ruby
njichev has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
pugc has left #ruby [#ruby]
frozengeek has joined #ruby
rahul_bajaj has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
canteen4 has joined #ruby
rabajaj has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
linduxed has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
thnee has joined #ruby
canteen4 has joined #ruby
frozengeek has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
frozengeek has joined #ruby
aduabu has joined #ruby
Cope has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
rahul_bajaj has quit [Ping timeout: 252 seconds]
Cope has joined #ruby
Cope is now known as Guest6243
TomyWork has joined #ruby
bruno- has joined #ruby
TinkerTyper has joined #ruby
rahul_bajaj has joined #ruby
gr33n7007h has joined #ruby
tomphp has joined #ruby
canteen4 has joined #ruby
Guest6243 has quit [Ping timeout: 260 seconds]
Cope_ has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 252 seconds]
Mgtuiw211 has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
frozengeek has quit [Quit: frozengeek]
frozengeek has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Mgtuiw211 has quit [Client Quit]
sundhell has joined #ruby
njichev has joined #ruby
beilabs_ has quit [Remote host closed the connection]
cdg has joined #ruby
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
beilabs has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
marr has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
beilabs has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
canteen4 has joined #ruby
sylario has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
cagomez has joined #ruby
brent__ has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
brent__ has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 248 seconds]
paranoicsan is now known as paranoicsan[Away
aduabu has joined #ruby
paranoicsan[Away has quit [Quit: ZZZzzz…]
alfiemax has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
alfiemax_ has joined #ruby
Serpent7776 has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
aduabu has quit [Ping timeout: 240 seconds]
cantom has joined #ruby
<cantom>
is there a ruby IDE wijth a good autocompletion support and how does that work without type annotations?
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
aduabu has joined #ruby
patronte_ has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
Tempesta has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
Tempesta has quit [Client Quit]
dionysus69 has quit [Ping timeout: 252 seconds]
<darix>
cantom: your bigger problem is meta programming. (think rails' find_by_columnname)
alfiemax_ has quit [Remote host closed the connection]
<pinksandles>
your real name or w/e has the same lyric from the song
aduabu has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
roshanavand has quit [Quit: roshanavand]
mim1k has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
roshanavand has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
cadillac_ has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
ShalokShalom_ has joined #ruby
drcode has joined #ruby
quattro_ has joined #ruby
<quattro_>
I’m having a problem with json parser in ruby, it’s triggering on this unexpected token at '{"_id":"566f634565689ecb098b5555","type":"http","host":null,"retry_data":null,"timeout":20,"down_from":1,"monitor":{"$oid":"555575ca88109e15a27e9663"},"co'
lxsameer has joined #ruby
ShalokShalom has quit [Ping timeout: 240 seconds]
<elomatreb>
quattro_: Did your message get cut off?
GodFather has joined #ruby
tacoboy has joined #ruby
<quattro_>
I don’t think it is but to be sure I’ll try to output the whole json string
TinkerTyper has quit [Ping timeout: 252 seconds]
<elomatreb>
Because if it wasn't cut off it's pretty obvious where the error is
patronte_ has quit [Remote host closed the connection]
patronte_ has joined #ruby
TinkerTyper has joined #ruby
aduabu has joined #ruby
bkxd has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
charliesome has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
pandaant has quit [Quit: Lost terminal]
TinkerTyper has quit [Ping timeout: 248 seconds]
paranoicsan has joined #ruby
<pinksandles>
use gist.github.com
<pinksandles>
your client might be protecting you from flood
mim1k has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
ur5us has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
Defenestrate has quit [Quit: This computer has gone to sleep]
canteen4 has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
Burgestrand has joined #ruby
canteen4 has joined #ruby
MrBismuth has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
patronte_ has quit [Remote host closed the connection]
nadir has joined #ruby
patronte_ has joined #ruby
TinkerTyper has joined #ruby
rahul_bajaj has quit [Quit: Leaving]
aduabu has joined #ruby
alfiemax has quit [Remote host closed the connection]
paranoicsan is now known as paranoicsan[Away
alfiemax has joined #ruby
canteen4 has quit [Ping timeout: 255 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
paranoicsan[Away has quit [Quit: ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
sepp2k has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
f48ds2 has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 248 seconds]
gr33n7007h has joined #ruby
cabotto has quit [Remote host closed the connection]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
gr33n7007h is now known as al2o3-cr
ShalokShalom_ is now known as ShalokShalom
canteen4 has joined #ruby
Defenestrate has joined #ruby
cabotto has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
xuanrui has joined #ruby
paranoicsan has joined #ruby
TinkerTyper has quit [Ping timeout: 246 seconds]
cabotto is now known as _cabotto
gixxer1k has quit [Quit: Leaving]
_cabotto is now known as cabotto
TinkerTyper has joined #ruby
gixxer1k has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
aduabu has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
skweek has quit [Ping timeout: 248 seconds]
vondruch has quit [Quit: vondruch]
canteen4 has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
harai has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
umaaji has quit [Quit: Leaving...]
cagomez has joined #ruby
aduabu has joined #ruby
gixxer1k has quit [Quit: Leaving]
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
patronte_ has quit [Remote host closed the connection]
<matthewd>
dminuoso: Strictly speaking, yes: bundler just calls rubygems.. but rubygems does have some degree of control*
<cr3>
matthewd: perfect, I found a gem_make.out which is exactly what I was looking for
<matthewd>
* assuming the gem follows the "normal" build process.. it *could* do anything it likes
conta has quit [Ping timeout: 252 seconds]
<cr3>
matthewd: actually, gem_make.out and gem.build_complete are empty :(
<matthewd>
dminuoso: Extensions is actually my middle name
FrostCandy has joined #ruby
chaugiang has joined #ruby
chaugiang has left #ruby [#ruby]
cagomez has joined #ruby
<FrostCandy>
Brand new to Ruby, thrown on a project. Is there an obvious start page for a ruby program? So I can start tracing some logic? Like a Main() function or soemthing?
<matthewd>
cr3: In that case, you might be hitting the above asterisk. Check the gem's extconf.rb to see what it actually does to build itself.
<bougyman>
not necessarily, FrostCandy
<bougyman>
what does the tree look like?
<FrostCandy>
bougyman: ok thanks
<bougyman>
what kind of program is it?
<FrostCandy>
MVC tree
<bougyman>
rails or other?
<FrostCandy>
rails
<bougyman>
routes.rb is where i'd look to see what methods are exposed to the public.
<FrostCandy>
ok great thanks, that's a start
<bougyman>
though that can be abstracted so much as to not be helpful sometimes.
<bougyman>
app/models should contain the business logic.
<dminuoso>
FrostCandy: ?rails
<dminuoso>
?rails FrostCandy
<ruby[bot]>
FrostCandy: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<FrostCandy>
ok thanks
<bougyman>
and app/controllers are where routes are dispatched to. methods in the controllers/ classes are, that is.
<matthewd>
There isn't really a single entry point (in the application) in Rails, by its nature: that pretty much is the framework's job description
<bougyman>
yep
<dminuoso>
Well I guess you could see Rack as a sort of entry point
<matthewd>
But yeah, routes -> controllers -> models and/or database -> models, are probably the best points of inquiry
TinkerTyper has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
<matthewd>
dminuoso: Okay yes, strictly speaking, the entry point is config.ru... but it basically just does "run the application now", not exactly the first crumb on a followable trail ;)
mim1k has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
high_fiver has quit [Ping timeout: 264 seconds]
TinkerTyper has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryandevilla has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
goyox86_ has quit [Quit: goyox86_]
alfiemax has joined #ruby
nobitanobi has quit [Remote host closed the connection]
goyox86_ has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
mikeric has joined #ruby
nobitanobi has joined #ruby
ryandevilla has joined #ruby
canteen4 has joined #ruby
brent__ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
gusrub has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 276 seconds]
_sfiguser has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
goyox86_ has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
mim1k has joined #ruby
jaruga_________ has joined #ruby
jaruga has quit [Read error: Connection reset by peer]
weaksauce has quit [Read error: Connection reset by peer]
Burgestrand has quit [Quit: Closing time!]
_sfiguser has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
ShalokShalom has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
frozengeek has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
tycoon177 has joined #ruby
smithascari has quit [Quit: mithbook has gone to sleep. ZZZzzz…]
smithascari has joined #ruby
<tycoon177>
I hate the idea of monkey-patching a gem, but i need to because no compatible versions of the gem include this fix. How would I go about monkey patching a gem before db:test:prepare? I'd rather avoid doing so in any other case
jdrobertso has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
harai has quit [Ping timeout: 252 seconds]
quattro_ has joined #ruby
aduabu has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
Serpent7776 has quit [Quit: Leaving]
<havenwood>
tycoon177: Could you use a refinement instead?
kapil___ has quit [Quit: Connection closed for inactivity]
<tycoon177>
how would i use that in rake db:test:prepare? i figured out the monkey patch by putting it in my Rakefile (i still don't like it, but it works)
TinkerTyper has joined #ruby
<havenwood>
You could use a refinement in your Rakefile.
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<tycoon177>
would i have to then do "using X" in my rakefile? i don't see how that would cause any other issues since the monkeypatch should only be in effect within rake, no?
<havenwood>
tycoon177: I don't know how complex your Rake tasks are, but yeah - if you're not worried about it leaking to other dependent tasks.
cantom has quit [Ping timeout: 260 seconds]
<tycoon177>
havenwood: the problem is that it's a built in test, not a custom one
<havenwood>
tycoon177: In general, if you're worried about the scope of monkey patches, refinements are a really nice way to limit them lexically to the file and class you're in.
<tycoon177>
i'll keep that in mind, thanks havenwood!
andikr has quit [Remote host closed the connection]
<tycoon177>
it's the first time i've ever done a monkey patch and i still don't feel good about it.
antgel has quit [Ping timeout: 240 seconds]
<havenwood>
tycoon177: You shouldn't feel bad about it! Call it a "freedom patch" like DHH to feel better.
deduped has joined #ruby
<havenwood>
tycoon177: And if there's really a worry about overbroad scope, refine.
runescape07rsps has joined #ruby
alex`` has joined #ruby
<tycoon177>
it shouldn't be an issue, i just added a data type for sql server so that spinning up a test environment won't fail
<havenwood>
nice
marxarelli|afk is now known as marxarelli
bmurt has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
al2o3-cr has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
stormpack has joined #ruby
<tycoon177>
havenwood: i went back into the Rakefile and made it check if the method was defined before the monkey patch :) now it won't have issues of overwriting the built-in when it eventually gets patched :D
bruno- has quit [Read error: Connection reset by peer]
aduabu has joined #ruby
nobitanobi has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has joined #ruby
skweek has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 276 seconds]
mson has quit [Quit: Connection closed for inactivity]
bmurt has joined #ruby
__Yiota has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
bovis has joined #ruby
paranoicsan has quit [Quit: Gone]
FastJack has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
FastJack has joined #ruby
quiller has quit [Ping timeout: 252 seconds]
kies has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.9]
aduabu has joined #ruby
sysvalve has quit [Quit: Leaving]
bronson has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
ledestin has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
Sambsquanch has quit [Read error: Connection reset by peer]
dviola has quit [Ping timeout: 240 seconds]
<pinksandles>
monkey patching is cool, in isolated cases, not as the vehicle behind a whole library (eg ActiveSupport)
bronson has quit [Ping timeout: 240 seconds]
phinxy has joined #ruby
WeiJunLi has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
<pinksandles>
people disagree obviously. but i think that's what the counter-argument against monkey patching is usually using as an example.
aduabu has joined #ruby
ledestin has quit [Ping timeout: 240 seconds]
smithascari has quit [Quit: mithbook has gone to sleep. ZZZzzz…]
smithascari has joined #ruby
ltem has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mson has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
bmurt has joined #ruby
joast has quit [Quit: Leaving.]
bmurt has quit [Client Quit]
canteen4 has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
joast has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
TinkerTyper has joined #ruby
weaksauce has joined #ruby
aduabu has joined #ruby
Ishido has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
TinkerTyper has joined #ruby
p0p0pr37 has quit [Ping timeout: 240 seconds]
Rutix`away is now known as Rutix
mikecmpbll has joined #ruby
gixxer1k has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 248 seconds]
emilford has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
Sammichmaker has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
dviola has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
uZiel has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
canteen4 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sami__ is now known as sami
bmurt has joined #ruby
skweek has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
orbyt_ has joined #ruby
TinkerTyper has quit [Ping timeout: 255 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
canteen4 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laphoraig92 has quit [Ping timeout: 248 seconds]
conta3 has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
<FrostCandy>
Shouldn't res = Net::HTTP.get('google.com','/') make res a string full of the content of google.com? When i do puts source i get nothing
<FrostCandy>
puts res*
aduabu has joined #ruby
uZiel has joined #ruby
canteen4 has quit [Ping timeout: 260 seconds]
canteen4 has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
<Zarthus>
did you get any errors or require net/http?
aduabu has quit [Ping timeout: 246 seconds]
Ishido has quit [Ping timeout: 252 seconds]
TomyLobo has joined #ruby
drcode has joined #ruby
enterprisey has joined #ruby
<FrostCandy>
I found my problem, it needed the full address like index.html at the end.
drcode has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
<Zarthus>
I didn't.
<Zarthus>
which ruby version?
<apeiros>
you probably got a 302 redirect
<Zarthus>
I did.
<apeiros>
that was actually directed at FrostCandy :D
<FrostCandy>
apeiros: i did get 302 ya
conta5 has joined #ruby
<apeiros>
FrostCandy: well, redirects don't contain the contents of where they redirect you to. you have to follow that redirect.
TinkerTyper has quit [Ping timeout: 276 seconds]
<apeiros>
i.e. you read the location header and do the next get request
<FrostCandy>
apeiros: yup it worked correctly, I just didn't type the full url. I didn't know it wouldn't follow automatically
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
lxsameer has joined #ruby
Ishido has joined #ruby
jackjackdripper has joined #ruby
ryandevilla has quit [Ping timeout: 240 seconds]
anime4christ has joined #ruby
conta5 has quit [Ping timeout: 240 seconds]
laphoraig92 has joined #ruby
aduabu has joined #ruby
eckhardt has joined #ruby
al2o3-cr has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
phinxy has quit [Read error: Connection reset by peer]
canteen4 has quit [Ping timeout: 248 seconds]
ryandevilla has joined #ruby
laphoraig92 has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Quit: Leaving.]
laphoraig92 has joined #ruby
jackjackdripper has joined #ruby
Denommus has quit [Ping timeout: 255 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
Bock has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
canteen4 has joined #ruby
beilabs has joined #ruby
emilford has quit [Ping timeout: 248 seconds]
aduabu has quit [Read error: Connection timed out]
aduabu has joined #ruby
cdg_ has joined #ruby
orbyt_ has joined #ruby
tomphp_ has joined #ruby
jaruga_________ has quit [Quit: jaruga_________]
canteen4 has quit [Ping timeout: 246 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 255 seconds]
TinkerTyper has joined #ruby
cdg_ has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
enterprisey has quit [Remote host closed the connection]
nowhereman has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
storer has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
nowhere_man has quit [Ping timeout: 248 seconds]
nowhereman has quit [Remote host closed the connection]
WeiJunLi has joined #ruby
nowhereman has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
bmurt has joined #ruby
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
WeiJunLi has quit [Remote host closed the connection]
canteen4 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
bronson has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
bronson has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
canteen4 has joined #ruby
bmurt has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
guille-moe has joined #ruby
alfiemax has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 276 seconds]
marxarelli is now known as marxarelli|afk
pinksandles has quit [Quit: Updating details, brb]
pinksandles has joined #ruby
aduabu has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
Asher has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
stormpack has quit [Quit: Leaving]
AnotherNick has quit [Ping timeout: 255 seconds]
CrazyEddy has joined #ruby
goyox86_ has quit [Quit: goyox86_]
anime4christ has quit [Quit: (null)]
CrazyEddy has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 248 seconds]
smithasc has joined #ruby
<FrostCandy>
This fails but why: print [1,2,3].map do |k| k; end print [1,2,3].map{|k| k} works and print [1,2,3] do |k| k end works. If I use a do block on a map, does that mean it's putting the entire map in |k| whereas using braces means put the contents into |k| ?
smithascari has quit [Ping timeout: 240 seconds]
<matthewd>
FrostCandy: The do is associated with the print call. Add parens to see the difference.
TinkerTyper has quit [Ping timeout: 276 seconds]
<matthewd>
FrostCandy: `print([1,2,3].map) do .. end` (what's happening, which is not what you want), vs `print([1,2,3] map do .. end)`
CrazyEddy has joined #ruby
smithasc has quit [Client Quit]
RedNifre has joined #ruby
TinkerTyper has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guille-moe has quit [Ping timeout: 248 seconds]
<FrostCandy>
matthewd: you had me add parens just for readability right, the output is the same with or without them.
<matthewd>
No, those parens I showed will cause different behaviour
harai has joined #ruby
<FrostCandy>
print [1,2,3] do |k| k end works
<pinksandles>
use {}
<FrostCandy>
pinksandles: yup {} woudl work , but i'm tring to understand why the other does not. :D
<pinksandles>
precendence
<pinksandles>
the block in do; end form is passed to print, not map
<FrostCandy>
pinksandles: yup i read some stuff on precdence, but it wasn't clear to me. Matt , i'll try again with the parens
<matthewd>
FrostCandy: Given `foo bar do .. end`, the block is associated with the call to #foo; given `foo bar { .. }`, it's associated with #bar
<matthewd>
`foo(bar do .. end)` also forces the latter interpretation, and `foo(bar) { .. }` forces the former -- i.e., suitably-placed parens override the default precedence
<FrostCandy>
ok i think that's making sense
elcontrastador has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RedNifre>
Hi there. I'd like to learn ruby properly. So far I only used it for small scripts, but I'd like to learn how to use it more professionally (real project setup with a gem file, using rake(?), using gems etc.). The idea is to use it on my raspberry pi to fetch some information from somewhere on the web and "visualize" it by turning colored LEDs on and off. I'm already good at programming in various languages.
<RedNifre>
What's the best way to learn it?
<matthewd>
FrostCandy: {} hugs tightly, so it associates with the directly-adjacent method call; do/end feels more like a statement, so it associates with the outermost one on the line
bovis has quit [Quit: leaving]
<RedNifre>
I also have an old "Programming Ruby 1.9" book here, is this still useful or is it outdated beyond all hope?
mson has quit [Quit: Connection closed for inactivity]
guille-moe has joined #ruby
<pinksandles>
still good i think, but many new features since then
<havenwood>
RedNifre: A Ruby 1.9 book would still be useful. Think of 1.9 as 2.0-beta.
<havenwood>
1.8, not so useful.
<matthewd>
FrostCandy: As for the "why why".. it's handy to have both options without needing explicit parens sometimes -- though often wiser to avoid the ambiguity
<FrostCandy>
matthewd: good way of thinking about it, but still it throws me that [1,2,3] array works fine but adding the .map doesn't even though both associate with the print call right?
<havenwood>
RedNifre: Please feel free to ask us questions here if you run into Ruby issues!
ducklobster has quit [Quit: Page closed]
<pinksandles>
1.9 useful, 2.0+ recommended, because 2.0 has worthwhile features that are worth learning from the start.
<matthewd>
FrostCandy: You want the block to be sent to the map call, not the print
<havenwood>
pinksandles: good point
orbyt_ has joined #ruby
<matthewd>
pinksandles: Syntactic features other than kwargs?
jamesaxl has quit [Read error: Connection reset by peer]
TinkerTyper has quit [Ping timeout: 252 seconds]
jamesaxl has joined #ruby
<matthewd>
I wouldn't learn Enumerable's API from a 1.9-era book (because you'd miss a bunch of newer methods), but Enumerable-the-concept would be just fine
<pinksandles>
well, language features too. there's refinements, 'prepend', ...
TinkerTyper has joined #ruby
<RedNifre>
Okay, thanks. I guess I'll read the book then.
guille-moe has quit [Ping timeout: 248 seconds]
<RedNifre>
I have one question regarding the depth of ruby: How hard is it to understand how the language works on a fundamental level?
<pinksandles>
if those features existed at 1.8 then the ruby code we write today may be very different, so i think it's good to learn with the new methods available than thinking on the old way only.
aduabu has joined #ruby
<matthewd>
Ah, yeah, I'll pay prepend. Refinements seem less important to me, just because they're under-adopted. Useful to know about, but it seems early to go refinements-first, if you want to read code from / work with other ruby developers.
<RedNifre>
E.g. there is the Io language which is the most easy to fundamentally understand language I know of: Objects have "slots", slots can contain values and methods, there's a slot for the prototype object etc.
nobitanobi has joined #ruby
<craysiii>
So I started reading learn ruby the hard way, but have seen criticisms on the way zed Shaw has written it, and that some parts are not very ruby-like. Are those criticisms valid, and is there a "universally" recommended book out there?
<RedNifre>
If you do bla[x] it actually desugars to bla.squarebrackets(x) etc.
bkxd has joined #ruby
<RedNifre>
Contrast that to, say, java where you have a lot of special cases like primitive types vs objects, static methods, volatile etc. How hard is it to explain how ruby works fundamentally?
canteen4 has quit [Ping timeout: 240 seconds]
laphoraig92 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
<matthewd>
RedNifre: I'd say Ruby is more at the "few, widely reused, concepts" end
<RedNifre>
that sound good.
<matthewd>
To use your example, bla[x] is actually bla.[](x)
<RedNifre>
Also, what's up with lambda vs proc vs block? Isn't that all the same thing, basically?
<matthewd>
A block is a syntactic construct; a lambda/proc is an object representing same
<RedNifre>
Ah, so when a method has a "block parameter" like &b it's actually a proc/lambda parameter?
laphoraig92 has joined #ruby
<pinksandles>
@matthewd true. except i imagine if refinements were available years ago, then activesupport and how monkey patches in rails in general might be different..
<matthewd>
The lambda vs proc distinction is very minor, around invocation and argument handling
aduabu has quit [Ping timeout: 248 seconds]
<matthewd>
pinksandles: If there were a way for the "app" to opt in without needing crap at the top of every file, maybe
<pinksandles>
sounds meta-able.
bkxd has quit [Ping timeout: 260 seconds]
<matthewd>
RedNifre: Yes; `b` there will be [converted to] an instance of Proc
TinkerTyper has quit [Ping timeout: 248 seconds]
<matthewd>
pinksandles: With a moderate amount of irony, one could monkey-patch #require to avoid monkey-patching things, I guess
<havenwood>
An interesting trivia point is that lambdas don't *always* have strict arity.
<RedNifre>
so the "block" is just a way to write a Proc, always?
laphoraig92 has quit [Remote host closed the connection]
laphoraig92 has joined #ruby
<pinksandles>
not in same way? i mean, refinements can give you contextual monkey patches. rails just doesn't seem to concerned about that being a feature.
TinkerTyper has joined #ruby
<havenwood>
RedNifre: An object doesn't need to be allocated for a block like it does with a proc or lambda. You can always use an &proc in place of a block, but it's unnecessary work.
<havenwood>
RedNifre: `&` is syntactic sugar that calls #to_proc then passes that result as a block.
<RedNifre>
I don't understand. What do you do with a block if not convert it to be used with '&'? What else can be done with blocks?
<matthewd>
pinksandles: ActiveSupport is intended to be stdlib/core for Rails applications, so we wouldn't want narrow-contextual, no. But if we could affect all app code without affecting other gems, there could be value to that.
ams__ has quit [Quit: Connection closed for inactivity]
<matthewd>
RedNifre: `3.times { puts "x" }` has a block, and passes it to a method, but it never gets converted to an object, just because it's not needed
DTZUZU has joined #ruby
<matthewd>
RedNifre: Whereas in `3.times(&b)`, b is an object (because it's in a variable), regardless of where it came from
<pinksandles>
right yeah, makes sense. i guess there's an argument for `ActiveSupport::String.some_patch(str)` too. tbh i never noticed the monkey patches being a problem in practice.
<FrostCandy>
matthewd: A better question, if I add a method to bar in foo bar.method do |k| k end, then k will operate on foo, but if no method is applied to bar, then k will operate on the variable. Is that correct?
<matthewd>
RedNifre: Even though the #times method can't distinguish between those invocations
<RedNifre>
but how is 'times' implemented then? I would have thought 'times' looks like def Number.times(&b) or something? Or does it just use 'yield' which doesn't need the block to be an object?
<pinksandles>
iirc lotus takes that approach (Foo::String.some_patch).
<matthewd>
FrostCandy: No; `foo bar.baz do .. end` and `foo bar do .. end` both pass the block to foo
<matthewd>
RedNifre: Yes, it'll do one or the other
<matthewd>
RedNifre: If it takes an explicit &b parameter, then that b will contain an object no matter what -- the block will get wrapped into a proc object if necessary
<pinksandles>
times could just be: `def times(&b) 0.upto(self-1, &b); end`
fyodorn has joined #ruby
fyodorn has left #ruby [#ruby]
<havenwood>
RedNifre: but for those reasons a block and yield are faster than a proc and block call
<havenwood>
RedNifre: blocks are less overhead than procs, yielding is less overhead than allocating and calling a block
<FrostCandy>
matthewd: https://repl.it/KYf1/1 , on the second line I use puts [1,2,3] do |k| k end , that works but k must opperate on bar in that case because it prints correctly. foo bar do .. end works if bar is an array i guess. or something else is going on there
<havenwood>
sorry for the "block" equivocation there
<pinksandles>
but you can't capture them without a Proc. which is sometimes very useful.
<RedNifre>
Okay, but I thought that in ruby was an object. When you call a block with yield, what is it that actually gets called? Or is that a runtime specific optimization that we shouldn't think about?
<havenwood>
pinksandles: that always looks so hacky!
<havenwood>
but yeah, can be handy
<pinksandles>
i pass Proc's around like functions sometimes, a la JS.
<matthewd>
FrostCandy: Use k+1 or something, so you can see better. The block is just not getting invoked.
<FrostCandy>
matthewd: OOOOoooOoOOo Thanks !
hahuang65 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
tvw has joined #ruby
guacamole has joined #ruby
TinkerTyper has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
diego4 has joined #ruby
diego4 has quit [Changing host]
diego4 has joined #ruby
diego4 is now known as dviola
tomphp has joined #ruby
aduabu has joined #ruby
<zenspider>
rawr
jinie has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
<zenspider>
FrostCandy: did you figure out that second block problem?
adlerdias has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
<zenspider>
it is pretty simple to explain...
blznblzn2 has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
Karunamon has joined #ruby
ShalokShalom has quit [Remote host closed the connection]
brent__ has quit [Remote host closed the connection]
jinie has joined #ruby
f48ds2 has quit [Ping timeout: 240 seconds]
selim has quit [Ping timeout: 276 seconds]
<RedNifre>
hm, ri seems to find nothing. do i have to initialize it?
canteen4 has quit [Ping timeout: 252 seconds]
stu314 has joined #ruby
postmodern_ has quit [Quit: Leaving]
relyks has joined #ruby
<FrostCandy>
zenspider: not sure which you mean - my problem was not realizeing why [] worked but [].map did not in print [1,2,3] do .. end but I think matt explained it pretty well - but if you want to toss in your tought i'd like to hear it anyway :)
nowhereman has quit [Ping timeout: 240 seconds]
<havenwood>
RedNifre: how'd you install Ruby?
selim has joined #ruby
<RedNifre>
sudo apt install ruby I think?
<RedNifre>
I'm on Ubuntu 16.04 LTS
<RedNifre>
...which comes with ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
<havenwood>
RedNifre: If you install ruby-full package it should include ri
<zenspider>
so... I'm gonna ask again... where is this "more"? the result of def was nil for the longest time. The result of def seems pretty arbitrary to me
<zenspider>
some people seem to like doing `private def blah ... end`
beilabs has quit [Remote host closed the connection]
<zenspider>
but there's no real benefit since you can just do `private\ndef blah ... end`
<zenspider>
I think that style is gross, personally (both, really)
<RedNifre>
what other styles are there to define a method as private?
<zenspider>
you can do modal private (my second example) or `private :meth1, :meth2`...
<zenspider>
but I find all of it to be a waste of time, personally
brent__ has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
<RedNifre>
Yeah, private is too serious. If I need a serious language I just use Haskell.
marr has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
<stu314>
RedNifre: everything you don't need to use from outside just declare private
TinkerTyper has joined #ruby
<stu314>
there is nothing serious about it
<stu314>
:-D
swills has joined #ruby
swills has quit [Changing host]
swills has joined #ruby
ryandevilla has joined #ruby
Trynemjoel has quit [Ping timeout: 276 seconds]
ldnunes has quit [Ping timeout: 255 seconds]
<RedNifre>
Well, I see ruby as a "Just let me quickly implement this without hassle"-language; Why overcomplicate it if I know what I'm doing? (That's hypothetical by the way, so far my ruby scripts were very small, I guess when I'll write a larger project I'll use more and more of these "serious" features ;)
<RedNifre>
Is there a performance difference between @BLA and @@BLA? Or should I write @@BLA anyway because it sort of makes more sense maybe?
<RedNifre>
No, wait.
<RedNifre>
@@BLA is still a variable, huh?
<zenspider>
1) questions of performance should be answered ONLY with benchmarks... which is really easy using the built in benchmark or (better) benchmark-ips gem
<stu314>
i never use @@bla. i don't like class variables. i use class instance variables instead.
emilford has joined #ruby
<zenspider>
2) probably not enough performance difference to matter for you (going on what you just said above)
<RedNifre>
Yeah, I meant constants that are only visible inside of a class, but I guess you just write BLA in the class.
<stu314>
well ... inheritance matters, but ... i've never needed class variables
<zenspider>
3) use what makes the most sense for your design
conta1 has joined #ruby
roshanavand has quit [Quit: roshanavand]
ryandevilla has quit [Ping timeout: 248 seconds]
marxarelli|afk is now known as marxarelli
Trynemjoel has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 248 seconds]
conta1 has quit [Ping timeout: 240 seconds]
ryandevilla has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
quattro_ has quit [Quit: quattro_]
quattro_ has joined #ruby
quattro_ has quit [Client Quit]
ur5us has joined #ruby
quattro_ has joined #ruby
milardovich has joined #ruby
ldnunes has joined #ruby
dmtd has joined #ruby
runescape07rsps has quit [Ping timeout: 255 seconds]
<FrostCandy>
Where can I find info on what all the parts of a class opening are? Class MyObject is easy enough but then there are < moreStuff < moreStuff < MoreStuff sometimes. Are they child classes read left to right who knows. Can't find a good resource on it
xelkarin has joined #ruby
<FrostCandy>
ah maybe looking up ruby class inheritance will do the trick
orbyt_ has joined #ruby
<xelkarin>
Is there a way to determine if a ruby app is being called by the stand-alone interpreter (ruby -I gem_libdir /path/to/executable) or as an installed gem?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
Puffball has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
TinkerTyper has joined #ruby
mim1k has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
mson has joined #ruby
canteen4 has joined #ruby
phinxy has joined #ruby
chrisarcand has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.8]
mim1k has quit [Ping timeout: 248 seconds]
chrisarcand has quit [Client Quit]
nowhereman has joined #ruby
chrisarcand has joined #ruby
xelkarin has quit [Quit: WeeChat 1.4]
aduabu has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RedNifre has quit [Ping timeout: 240 seconds]
haylon has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
postmodern has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
TinkerTyper has joined #ruby
hahuang65 has joined #ruby
frozengeek has quit [Quit: frozengeek]
<pinksandles>
in JS i think it's nicer/different to pass around closure's/functions than Proc's. mostly cuz, `foo()` vs `foo.()` or `foo.call()`.. maybe just different, but something to appreciate about JS.
<pinksandles>
JS approach feels more functional where as ruby it feels like a functional approach applied to an OO language
aduabu has joined #ruby
biberu has quit []
canteen4 has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Quit: WeeChat 1.9]
opekktar has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
canteen4 has joined #ruby
<mikecmpbll>
pinksandles : probably because ruby isn't a "functional" language in that sense? :)
<pinksandles>
mikecmpbll: yea. i think there was a Q&A where matz said the grammar/syntax of ruby made `foo()` on a Proc impossible too
<mikecmpbll>
ah okay.
mtkd has quit [Ping timeout: 252 seconds]
ltem has quit [Quit: Leaving]
TinkerTyper has joined #ruby
<pinksandles>
so, .() was added
<pinksandles>
as a compromise
opekktar has quit [Client Quit]
<mikecmpbll>
i hardly ever see .() in ruby code though
<pinksandles>
same
aduabu has quit [Ping timeout: 248 seconds]
[Butch] has quit [Quit: I'm out . . .]
mtkd has joined #ruby
<FrostCandy>
Following a tutorial but missing this concept. In a class you can do def password=(password) or def password(password) - aren't those saying the same thing? Were just going to pass password to the method right? Does the = sign do something special?
<matthewd>
FrostCandy: One is a method called "password", one is a method called "password="
polishdub has quit [Quit: leaving]
nowhereman has quit [Remote host closed the connection]
<FrostCandy>
matthewd: lol oh
<apeiros>
FrostCandy: mostly they are the same. the main difference is in what it communicates to the user
<apeiros>
there is a small difference in how the two work, though
<apeiros>
foo= methods always return the right-hand side (rhs), regardless of an explicit return or implicit last value.
<pinksandles>
also too diffilcult/inconvient to get a callable reference to a method in ruby. which i think contributes
gusrub has quit [Remote host closed the connection]
ShekharReddy has quit [Quit: Connection closed for inactivity]
TLAXKIT has quit [Quit: Saliendo...]
gusrub has joined #ruby
stu314 has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
guille-moe has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<pinksandles>
syntax for `foo.method(:bar).to_proc` in form of `blah = ^foo.bar`
TinkerTyper has quit [Ping timeout: 252 seconds]
<pinksandles>
then passing around methods would be easy in function calls etc
WeiJunLi has quit [Remote host closed the connection]
<apeiros>
why'd you call to_proc on Method? o0
TinkerTyper has joined #ruby
milardovich has quit [Remote host closed the connection]
<apeiros>
also usually you'll just pass :bar. IME it's rare that you need an actual Method object
milardovich has joined #ruby
<pinksandles>
to get a lambda :) closest thing to an anonymous function, or same thing in JS.
<apeiros>
again, why?
<apeiros>
Method has #call
<apeiros>
I see literally no point in converting it to a Proc
<pinksandles>
correct. Method could work too, but my gut would go with a lambda for closest semantics with JS.
<apeiros>
oh, good old "lets keep writing fortran in other languages"
<apeiros>
bravo.
<pinksandles>
lol ok
orbyt_ has joined #ruby
<cr3>
how can I get the source location of a class? Foo.source_location returns undefined method
<apeiros>
cr3: you can't. there's workarounds, but they're quirky.
Puffball has quit [Remote host closed the connection]
<apeiros>
cr3: use pry with pry-doc, it comes with commands which use those workarounds
<apeiros>
e.g. $ and ?. there's probably also one to just tell you all lines where the class is opened
quattro_ has quit [Quit: quattro_]
rwb has joined #ruby
aduabu has joined #ruby
ShalokShalom has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
<pinksandles>
cr3: starting point, to do via code: Pry::WrappedModule.new(String).source
relyks has quit [Quit: Leaving.]
MoskitoHero has joined #ruby
<cr3>
apeiros and pinksandles: thanks for the tips, that worked nicely!
<pinksandles>
there's Pry::WrappedModule.new(String).source_location too
<pinksandles>
np
MoskitoHero has quit [Client Quit]
beilabs has joined #ruby
pugc has joined #ruby
cadillac_ has quit [Ping timeout: 255 seconds]
milardovich has quit [Remote host closed the connection]
ShalokShalom has quit [Remote host closed the connection]
cadillac_ has joined #ruby
phinxy has quit [Quit: Leaving]
beilabs has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
MoskitoHero has joined #ruby
bkxd has joined #ruby
canteen4 has joined #ruby
cr3 has quit [Quit: leaving]
aduabu has quit [Ping timeout: 252 seconds]
bkxd has quit [Ping timeout: 240 seconds]
MoskitoHero has quit [Quit: MoskitoHero]
aduabu has joined #ruby
__Yiota has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
<konsolebox>
is it common practice to have `Rake::TestTask.new do(:test => :compile)`?
<konsolebox>
i.e, to have :compile a dependency of :test
<konsolebox>
i'm thinking about possible issues with package managers that emulate installation of gems. because they have test phases which are separate.
MoskitoHero has joined #ruby
<konsolebox>
but having :test dependent on :compile somehow adds assurance that the binary/library that would be tested is updated.
<pinksandles>
less common than not having it.
p0p0pr37 has joined #ruby
FrostCandy has quit []
p0p0pr37 has quit [Read error: Connection reset by peer]
MoskitoHero has quit [Client Quit]
<konsolebox>
pinksandles: but what do you think about having it?
p0p0pr37 has joined #ruby
<pinksandles>
seems fine, if the tests have C exts to build
nowhereman has quit [Remote host closed the connection]
<konsolebox>
yes. it also looks fine even with Gentoo's ebuilds. the compilation doesn't happen twice, but i'm not sure about other package managers.
gixxer1k has quit [Quit: Leaving]
<pinksandles>
package maintainer problem ;)
<matthewd>
If :compile will only do things if it needs to, then it seems fine
xco has quit [Quit: xco]
<matthewd>
If compile will always do a from-scratch compilation, that seems less pleasant both for a developer and a packager
<konsolebox>
matthewd: if there's already a compiled library, it won't unless it has to
balazs has quit [Ping timeout: 248 seconds]
aclark has quit [Remote host closed the connection]
<konsolebox>
the thing i worry about is if package managers decide to isolate compilation from testing
chouhoulis has quit [Remote host closed the connection]
aclark has joined #ruby
<pinksandles>
well. can't account for every crazy idea linux tries out. `rake test` dependencies have to be satisified to run tests.
<konsolebox>
so, in test phase, another binary/library would be compiled and tested
chouhoulis has joined #ruby
<matthewd>
Yeah, I'd call that a future problem
bmurt has joined #ruby
<matthewd>
If it comes up, then you make a new task that actually runs the tests, and have 'test' be just compile+really_test
nowhereman has joined #ruby
<matthewd>
But even if they do the compile elsewhere, they'd surely need to move the lib into the right place for the tests to use it ¯\_(ツ)_/¯
milardovich has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
<pinksandles>
yea. it sounds like an issue of packager having to integrate than vice versa
harai has quit [Ping timeout: 252 seconds]
cdg has quit [Remote host closed the connection]
storer42 has joined #ruby
storer42 has quit [Max SendQ exceeded]
gbgdev has joined #ruby
milardovich has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
gwilkes has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
storer has quit [Ping timeout: 248 seconds]
milardovich has quit [Remote host closed the connection]
mniip has quit [Ping timeout: 600 seconds]
canteen4 has joined #ruby
milardovich has joined #ruby
TinkerTyper has joined #ruby
cschneid_ has quit [Remote host closed the connection]
pugc has quit [Quit: pugc]
aduabu has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
jamiejackson has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
harai has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
TinkerTyper has joined #ruby
milardovich has quit [Remote host closed the connection]
TinkerTyper has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
canteen4 has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]