havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: 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
nofxx has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has quit [Remote host closed the connection]
aduabu has joined #ruby
Pisuke has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
MyMind has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #ruby
bruno-_ has quit [Ping timeout: 252 seconds]
nofxx has joined #ruby
kies has quit [Ping timeout: 248 seconds]
kn-928 has joined #ruby
enterprisey has joined #ruby
aduabu has joined #ruby
reaVer has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
reaVer has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
bruno- has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
GodFather has quit [Remote host closed the connection]
milardov_ has quit []
harai has quit [Read error: Connection reset by peer]
guardianx has joined #ruby
canteen4 has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
cagomez_ has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 252 seconds]
cagomez has joined #ruby
aduabu has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
TinkerTyper has quit [Ping timeout: 240 seconds]
brent__ has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
brent__ has joined #ruby
bruno- has joined #ruby
marr has quit [Ping timeout: 276 seconds]
aduabu has quit [Ping timeout: 252 seconds]
GodFather_ has quit [Ping timeout: 252 seconds]
cagomez has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
TinkerTyper has joined #ruby
orbyt_ has quit [Client Quit]
brent__ has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
aduabu has joined #ruby
GodFather_ has joined #ruby
SqREL has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
xco has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 260 seconds]
kn-928 has quit [Quit: WeeChat 1.9]
jackjackdripper1 has quit [Quit: Leaving.]
xuanrui has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather_ has quit [Client Quit]
sdrew has quit [Ping timeout: 240 seconds]
SqREL has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Remote host closed the connection]
GodFather has joined #ruby
nobitanobi has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
kn-928 has joined #ruby
xuanrui has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
nobitanobi has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
bruce_lee has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
aduabu has joined #ruby
harai has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
runescape07rsps has quit [Quit: Leaving]
xuanrui has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
xuanrui has quit [Remote host closed the connection]
kn-928 has quit [Quit: WeeChat 1.9]
nertzy has quit [Ping timeout: 246 seconds]
aduabu has joined #ruby
nertzy has joined #ruby
gizmore has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
mson has quit [Quit: Connection closed for inactivity]
__Yiota has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
chmurifree has quit [Ping timeout: 240 seconds]
beilabs has joined #ruby
<Mrgoose2> Hey, I have an ip address in bytes. How can I convert that to a string?
aduabu has quit [Ping timeout: 252 seconds]
d^sh has quit [Ping timeout: 240 seconds]
gizmore|2 has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
<Radar> Mrgoose2: ipv4 or ipv6?
<Mrgoose2> could be either
nofxx has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
d^sh has joined #ruby
beilabs has quit [Ping timeout: 252 seconds]
xuanrui has joined #ruby
aduabu has joined #ruby
<Mrgoose2> i tried this . ip_addr[-4,4].unpack("C4").join(".")
<Mrgoose2> no luck
<Mrgoose2> wrong number of arguments (given 2, expected 1)
canteen4 has quit [Ping timeout: 252 seconds]
<Radar> Mrgoose2: Do you have some input and expected output that I could play around with?
canteen4 has joined #ruby
cdg has joined #ruby
nofxx has joined #ruby
aduabu has quit [Ping timeout: 260 seconds]
SqREL has joined #ruby
aduabu has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
nofxx has quit [Remote host closed the connection]
umaaji has quit [Quit: Leaving...]
TinkerTyper has quit [Ping timeout: 252 seconds]
cdg has quit [Ping timeout: 246 seconds]
<gr33n7007h> Mrgoose2: IPAddr.ntop should do it
gnufied has joined #ruby
chmurifree has joined #ruby
TinkerTyper has joined #ruby
nofxx has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
nofxx has quit [Remote host closed the connection]
guardianx has quit []
<gr33n7007h> >> require 'ipaddr'; IPAddr.ntop "\b\b\b\b" # works for ipv4 and ipv6 addresses
<ruby[bot]> gr33n7007h: # => "8.8.8.8" (https://eval.in/849332)
SqREL has quit [Ping timeout: 248 seconds]
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
<waveprop> (0..255).to_a.each { |i| print '\x'; print i.to_s(16).upcase }
<waveprop> >> (0..255).to_a.each { |i| print '\x'; print i.to_s(16).upcase }
<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]
bronson has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
cschneid_ has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
aduabu has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
roshanavand has joined #ruby
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
canteen4 has quit [Ping timeout: 252 seconds]
oleo has quit [Quit: irc client terminated!]
bkxd has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
SqREL has joined #ruby
roshanavand has quit [Quit: roshanavand]
<Radar> >> (0..255).to_a.each { |i| v = i.to_s(16).upcase; print (v.length == 1 ? '\x' + "0#{v}" : '\x' + "#{v}") }
<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)
<Radar> Cheeky way ^
canteen4 has quit [Ping timeout: 260 seconds]
TinkerTyper has quit [Ping timeout: 276 seconds]
<Radar> >> (0..255).to_a.each { |i| v = i.to_s(16).upcase; print '\x' + (v.length == 1 ? "0#{v}" : v) }
<ruby[bot]> Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Radar> >> (0..255).to_a.each { |i| v = i.to_s(16).upcase; print '\x' + (v.length == 1 ? "0#{v}" : v) }
<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]: E_COME_ON_BRO
alfiemax has joined #ruby
TinkerTyper has joined #ruby
SqREL has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
<waveprop> Radar: nice
<waveprop> lol
cdg has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
<Radar> It's shorter than doing ljust at least.
<Radar> rjust*
<baweaver> >> (0..255).map { |i| '\x' + "0#{i.to_s(16).upcase}"[-2..-1] }.join
<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]
xuanrui has joined #ruby
<baweaver> >> (0..255).map { |i| '\x' + "0#{i.to_s(16).upcase}".last(2) }.join
<ruby[bot]> baweaver: # => undefined method `last' for "00":String (NoMethodError) ...check link for more (https://eval.in/849382)
TinkerTyper has quit [Ping timeout: 260 seconds]
<baweaver> hrm... Rails methods, dangit
aduabu has joined #ruby
xuanrui has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
reber has joined #ruby
<baweaver> >>(0..255).each{|i|print'\x'+"0#{i.to_s(16).upcase}"[/..$/]}
<ruby[bot]> baweaver: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
SqREL has joined #ruby
<baweaver> Radar: 1 2 3 4
<baweaver> I declare a codegolf war
alfiemax has joined #ruby
<Radar> Pft. You've missed an obvious win already.
<Radar> >> 0.upto(255) {|i|print'\x'+"0#{i.to_s(16).upcase}"[/..$/]}
<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]
Tempesta has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
gregf_ has joined #ruby
sami__ has joined #ruby
<sami__> Hello, I'm having trouble understanding this strange array. https://gist.github.com/samimb/f6be105b0368506fbb59a99c63b5b27d
<cantom> darix: I see
jamesaxl has quit [Read error: Connection reset by peer]
<sami__> How do I access the other items. I would have thought item[0]["active_checks_enabled"]
<elomatreb> What you have there isn't an Array, it's a Hash
harfangk has quit [Ping timeout: 252 seconds]
shiru has joined #ruby
jamesaxl has joined #ruby
patronte_ has quit [Remote host closed the connection]
patronte_ has joined #ruby
SqREL has joined #ruby
<sami__> elomatreb: Ok, I'm still not able to access it's items. Wouldn't that mean I would be able to access item with item[0].active_checks_enabled?
shiru has quit [Remote host closed the connection]
arminius has quit [Remote host closed the connection]
<elomatreb> If you iterate over a Hash and your block only takes a single argument, you get an array of the form [key, value] for each entry
umaaji has quit [Ping timeout: 260 seconds]
<elomatreb> You can change your block to take two parameters to get key, value as arguments
mim1k has quit [Ping timeout: 248 seconds]
<darix> cantom: ruby mine seems good
<darix> (from jetbrains)
lxsameer has quit [Quit: WeeChat 1.7]
<cantom> darix: thanks
patronte_ has quit [Remote host closed the connection]
patronte_ has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
umaaji has joined #ruby
TinkerTyper has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
Burgestrand has quit [Quit: Closing time!]
canteen4 has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
pandaant has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
patronte_ has quit [Remote host closed the connection]
<pinksandles> nice song darix
patronte_ has joined #ruby
<darix> pinksandles: huh?
bruno-_ has joined #ruby
<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]
cagomez has quit [Ping timeout: 246 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
patronte_ has joined #ruby
patronte_ has quit [Remote host closed the connection]
jinie has joined #ruby
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
adlerdias has joined #ruby
aduabu has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
alfiemax has joined #ruby
zenit has joined #ruby
alfiemax has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
canteen4 has joined #ruby
GorillaApe has joined #ruby
<GorillaApe> hi
reber has quit [Remote host closed the connection]
<GorillaApe> I am an ape
bronson has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
aduabu has quit [Ping timeout: 240 seconds]
Defenestrate has quit [Quit: Leaving]
clemens3 has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
aduabu has joined #ruby
runescape07rsps has joined #ruby
xuanrui has quit [Ping timeout: 248 seconds]
mikecmpb_ has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
anisha_ has joined #ruby
SqREL has quit [Remote host closed the connection]
SqREL has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
SqREL has quit [Ping timeout: 260 seconds]
ldnunes has joined #ruby
canteen4 has joined #ruby
xuanrui has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
<tobiasvl> aren't we all
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
rwb has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
_sfiguser has joined #ruby
TinkerTyper has joined #ruby
MoskitoHero has quit [Quit: MoskitoHero]
bmurt has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
mson has joined #ruby
<ineb> iam text.
marr has quit [Ping timeout: 248 seconds]
skweek has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
sundhell has quit [Quit: WeeChat 1.9]
__Yiota has joined #ruby
kapil___ has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
MrBismuth has joined #ruby
selim has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
XD_ has joined #ruby
xaxisx_ has joined #ruby
bmurt has joined #ruby
<pinksandles> if only it were that simple.
brent__ has joined #ruby
selim has joined #ruby
runescape07rsps has quit [Ping timeout: 248 seconds]
xaxisx has quit [Ping timeout: 248 seconds]
BSaboia has quit [Quit: Leaving]
brent__ has quit [Ping timeout: 240 seconds]
high_fiver has joined #ruby
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
XD_ has quit [Quit: Leaving]
runescape07rsps has joined #ruby
TLAXKIT has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 276 seconds]
TinkerTyper has joined #ruby
__Yiota has joined #ruby
canteen4 has joined #ruby
roshanavand has quit [Quit: roshanavand]
skweek has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has quit [Ping timeout: 240 seconds]
f48ds2 has joined #ruby
SqREL has joined #ruby
chouhoulis has joined #ruby
t-recx has joined #ruby
bmurt has joined #ruby
rwb has joined #ruby
<Bish> wow, i think i annoyed the channel with this problem already
<Bish> how do i get a reliably list of month from now backwords
aduabu has joined #ruby
<Bish> backwards
<Bish> i struggly pretty hard to find a reliable way
TinkerTyper has quit [Ping timeout: 240 seconds]
<Bish> no matter what i try, there is always a stupid mistake
<leah2> backwards to?
<Bish> leah2: no rails
TinkerTyper has joined #ruby
<leah2> that was a question
<leah2> ;)
<Bish> oh i thought u meant like .backwards_to
<leah2> no, i wanted to know the end of the month list
<Bish> like obj.last_months(3) should give me the last 3 months
<Bish> as time
<leah2> ok
canteen4 has quit [Ping timeout: 248 seconds]
<Bish> (including the current)
<leah2> >> require 'date'; d=Date.today; (0...3).reverse_each.map { |i| (d << i).to_time }
<ruby[bot]> leah2: # => [2017-06-24 00:00:00 +0000, 2017-07-24 00:00:00 +0000, 2017-08-24 00:00:00 +0000] (https://eval.in/849723)
<Bish> the << operator does months?!
<leah2> yes
<Bish> ohgawd.. maybe i shouldve just read the docs
<leah2> but on Date, not Time
<Bish> yeah thats fine
<Bish> fucking around with date for like an hour
SqREL has quit []
<leah2> also has .next_month tho :)
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has quit [Ping timeout: 240 seconds]
mikeric has quit []
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
patrontechnosoft has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has joined #ruby
storer has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
quiqua has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
InfinityFye has quit [Ping timeout: 276 seconds]
WeiJunLi has joined #ruby
aduabu has joined #ruby
tera_ has joined #ruby
nowhere_man has joined #ruby
im314ous has joined #ruby
cdg_ has joined #ruby
storer has quit [Read error: Connection reset by peer]
TinkerTyper has quit [Ping timeout: 240 seconds]
<Bish> good lord, that was easy for real
canteen4 has quit [Ping timeout: 260 seconds]
TinkerTyper has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
WeiJunLi has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
canteen4 has joined #ruby
haylon has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
tera_ has quit [Quit: Page closed]
<GorillaApe> does this
<GorillaApe> show a leak ?
yokel has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
xuanrui has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 252 seconds]
mim1k has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
TinkerTyper has quit [Ping timeout: 246 seconds]
<Bish> well u mean these repeating spikes?
<Bish> i'd say thats gc
<Bish> it's not getting worse
<GorillaApe> it is slowly increasing though
yokel has joined #ruby
cabotto has quit [Remote host closed the connection]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
ams__ has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 255 seconds]
TinkerTyper has joined #ruby
haylon has quit [Ping timeout: 252 seconds]
pugc has joined #ruby
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Quit: ZZZzzz…]
haylon has joined #ruby
canteen4 has joined #ruby
apparition47 has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
paranoicsan has joined #ruby
mim1k has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 255 seconds]
cabotto has joined #ruby
kies has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 276 seconds]
cabotto has quit [Ping timeout: 252 seconds]
aduabu has quit [Ping timeout: 255 seconds]
<dminuoso> GorillaApe: This could normal behavior if the old generation becomes larger
TinkerTyper has joined #ruby
<dminuoso> GorillaApe: You could test this by forcing a major GC and see what happens
cabotto has joined #ruby
<leah2> or memory fragmentation
aduabu has joined #ruby
<GorillaApe> hm ok
<GorillaApe> I am running ruby 2.3.0
skweek has quit [Ping timeout: 248 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
ryandv has joined #ruby
<dminuoso> GorillaApe: Please update to 2.3.4 at least.
<GorillaApe> I would but I can't
<GorillaApe> I am not allowed to.
ryandevilla has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
ryandv has quit [Ping timeout: 240 seconds]
cabotto has quit [Remote host closed the connection]
canteen4 has joined #ruby
pugc has quit [Quit: pugc]
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
al2o3-cr has quit [Ping timeout: 248 seconds]
ldnunes has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
bruno-_ has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
aduabu has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
teh0xqb has joined #ruby
ldnunes has joined #ruby
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
bruno- has joined #ruby
ResidentBiscuit has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
Denommus has joined #ruby
<Denommus> can I ask rbenv-related questions here?
<dminuoso> You may.
<Denommus> rbenv is always creating an executable ~/.rbenv/shims/yarn when I call eval "$(rbenv init -)"
<Denommus> I don't have the yarn gem installed, though
<Denommus> so it is getting in the way of the yarn package manager
njichev has quit [Quit: WeeChat 1.9]
<Denommus> is there any other way an executable is intalled in a rbenv environment
<Denommus> ?
dionysus69 has joined #ruby
guille-moe has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
InfinityFye has joined #ruby
smithascari has joined #ruby
<Denommus> ... found it
<dminuoso> Glad I could help you.
teh0xqb has quit [Quit: ctrl+d]
laphoraig92 has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
oleo has joined #ruby
TinkerTyper has joined #ruby
eroux has quit [Ping timeout: 260 seconds]
guille-moe has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
Sambsquanch has joined #ruby
bronson has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
orbyt_ has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
runescape07rsps has quit [Ping timeout: 240 seconds]
<konsolebox> what exactly is the site directory for?
rippa has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
slima_ is now known as slima
<konsolebox> e.g. /usr/share/ri/2.4.0/site
aduabu has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
aduabu has joined #ruby
zenit has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 264 seconds]
TinkerTyper has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
InfinityFye has quit [Ping timeout: 252 seconds]
polishdub has joined #ruby
<Denommus> only to be clear for everyone: my problem was with the rbenv-binstubs plugin
dionysus69 has quit [Quit: dionysus69]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
mark_66 has left #ruby ["PART #elixir-lang :PART #crystal-lang :QUIT :Leaving."]
drcode has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
cr3 has joined #ruby
dviola has joined #ruby
<cr3> is there a way to get more output when running `bundle install`, especially the part about building native extensions?
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
cschneid_ has joined #ruby
ana_ has quit [Ping timeout: 248 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
aufi has quit [Quit: Leaving]
goyox86_ has joined #ruby
canteen4 has joined #ruby
jamiejackson has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
sekmo has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
ShalokShalom has quit [Ping timeout: 255 seconds]
apparition47 has quit [Quit: Bye]
<matthewd> cr3: Not as far as I know; you have to open the log file after it fails
<cr3> matthewd: I couldn't find the log file either, where should I look?
<dminuoso> cr3: Which native extension failed to build?
<matthewd> It should tell you when it fails :/
TinkerTyper has quit [Ping timeout: 248 seconds]
aubyoub__ has quit [Quit: Leaving]
<matthewd> Gist whatever output you are getting?
<dminuoso> matthewd: I've had cases where it didn't. Is it possible that bundler has no control over building native extensions?
<cr3> matthewd: it doesn't fail though, I'd just like to visually inspect what happened.
TinkerTyper has joined #ruby
WeiJunLi has joined #ruby
<matthewd> cr3: /Users/matthew/.rbenv/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/pg-0.20.0
<dminuoso> Now we know your first name!
<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]
bmurt has joined #ruby
canteen4 has joined #ruby
cdg_ has quit [Remote host closed the connection]
quiqua has quit [Quit: Textual IRC Client: www.textualapp.com]
TinkerTyper has quit [Ping timeout: 246 seconds]
jud has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
quattro_ has quit [Quit: quattro_]
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?
<tycoon177> refinement?
goyox86_ has joined #ruby
goyox86_ has quit [Client Quit]
goyox86_ has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
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
<tycoon177> thanks for your help
antgel has joined #ruby
frozengeek has joined #ruby
mikecmpb_ has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
mim1k has quit [Read error: Connection reset by peer]
bronson has joined #ruby
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
TinkerTyper has joined #ruby
sekmo has quit [Quit: Textual IRC Client: www.textualapp.com]
aduabu has quit [Ping timeout: 248 seconds]
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]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
guille-moe has joined #ruby
roshanavand has joined #ruby
<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]
guille-moe has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
Karunamon is now known as karunamon
cloutz has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
guille-moe has joined #ruby
conta3 has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
charliesome has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
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
<havenwood> RedNifre: sudo apt-get install ruby-full
<RedNifre> Way ahead of you :)
postmodern has joined #ruby
SeepingN has joined #ruby
guille-moe has quit [Ping timeout: 260 seconds]
rkoller has joined #ruby
<RedNifre> Ah, it worked, thanks :)
canteen4 has joined #ruby
ryandevilla has quit [Ping timeout: 252 seconds]
<havenwood> You're welcome
<RedNifre> What other things came with ruby-full? (I guess it's a "batteries included" bundle?)
TinkerTyper has quit [Ping timeout: 260 seconds]
aduabu has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
<zenspider> FrostCandy: cool. glad you got it sorted out.
aduabu has joined #ruby
<zenspider> >> 5.times
<zenspider> ugh. is the damn thing dead again?
cagomez has joined #ruby
<zenspider> well... here's how I'd implement it:
<zenspider> class Integer; def mytimes; return to_enum(:mytimes) unless block_given?; (0..self).each do |n| yield n; end; end; end
canteen4 has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
canteen4 has joined #ruby
hahuang65 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
aduabu has quit [Ping timeout: 248 seconds]
<RedNifre> When I define a method in irb, say def bla, it prints => :bla, as if it returned a symbol. Why is that?
rwb has quit [Ping timeout: 246 seconds]
<zenspider> that's what def does now
aduabu has joined #ruby
<RedNifre> woludn't it make more sense to return a proc?
<zenspider> how does that make "more" sense?
<zenspider> what should that proc do?
<zenspider> how would you use it?
<RedNifre> Well, a method is sort of like a proc that sits in a variable of the object?
harfangk has joined #ruby
<RedNifre> you know, like a method reference.
<zenspider> class X; myproc = def y; ...; end; ...what to do here?... end
canteen4 has quit [Ping timeout: 248 seconds]
<RedNifre> well, what can I do with the returned symbol?
TinkerTyper has quit [Ping timeout: 240 seconds]
<zenspider> what is self inside that proc?
<zenspider> assuming I store off myproc and then call it, where do instance variables come from?
<zenspider> obj.send method_name
<RedNifre> well, if I think in Javascript self in that proc would be undefined unless I bind the Proc to another object first.
TinkerTyper has joined #ruby
alfiemax has joined #ruby
<RedNifre> well, it could pick the instance variables of the place where it was defined, closure style.
cdg has joined #ruby
<zenspider> no... because where it is defined self is the class
<RedNifre> but I feel like I should continue reading before I ask questions like that :o)
<zenspider> not an instance of the class
<RedNifre> anyway, what do I do with the symbol that gets returned?
<zenspider> binding is one option, certainly
<zenspider> I said above... you can always use send on it.
<zenspider> but you can also do things like generate other methods from the name. wrappers and the like
<RedNifre> oh, sorry, I missed that one.
<zenspider> n/p
sleepee has quit [Ping timeout: 240 seconds]
<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]
bronson has quit [Ping timeout: 240 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
guille-moe has joined #ruby
ryandevilla has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
BTRE has quit [Read error: Connection reset by peer]
alfiemax has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
canteen4 has joined #ruby
postmodern has quit [Quit: Leaving]
ldnunes has quit [Quit: Leaving]
aduabu has quit [Ping timeout: 252 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
BTRE has joined #ruby
TomyLobo has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
GodFather has joined #ruby
jackjackdripper has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
nadir has joined #ruby
<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?
<mikecmpbll> FrostCandy ^
guille-moe has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
<FrostCandy> mikecmpbll: ty
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? :)
TinkerTyper has quit [Ping timeout: 248 seconds]
<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
xco has joined #ruby
<FrostCandy> apeiros: like what?
nowhereman has joined #ruby
goyox86_ has joined #ruby
<apeiros> >> def foo=(val); return 1; end; def foo(val); return 1; end; [self.foo = 2, foo 2]
<ruby[bot]> apeiros: # => /tmp/execpad-f37b4c66dad3/source-f37b4c66dad3:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/850021)
BTRE has joined #ruby
<apeiros> >> def foo=(val); return 1; end; def foo(val); return 1; end; [self.foo = 2, foo(2)]
<ruby[bot]> apeiros: # => [2, 1] (https://eval.in/850023)
WeiJunLi has joined #ruby
<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…]
storer42 has joined #ruby
harai has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
canteen4 has joined #ruby
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
gregf_ has quit [Ping timeout: 260 seconds]
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
bruno-_ has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby
harfangk has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
milardovich has joined #ruby
__Yiota has joined #ruby
gbgdev has quit [Remote host closed the connection]
mim1k has joined #ruby
ltd has quit [Quit: leaving]
canteen4 has quit [Ping timeout: 248 seconds]
ltd has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
p0p0pr37_ has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
ramfjord has joined #ruby
brent__ has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 240 seconds]
SeepingN has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
p0p0pr37 has quit [Ping timeout: 252 seconds]
p0p0pr37_ is now known as p0p0pr37
goyox86_ has quit [Quit: goyox86_]
aduabu has joined #ruby
cschneid_ has joined #ruby
minimalism has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
cschneid_ has quit [Ping timeout: 246 seconds]
_sfiguser has quit [Ping timeout: 255 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
gusrub has joined #ruby
canteen4 has joined #ruby
jordanm has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 260 seconds]
ShalokShalom has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aduabu has joined #ruby
Ropeney has joined #ruby