jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
justbleed has joined #ruby
toretore has joined #ruby
ropeney has joined #ruby
diegoviola has joined #ruby
amargherio has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
trinaldi has quit [Quit: zzz]
benlieb has quit [Quit: benlieb]
snockerton has quit [Quit: Leaving.]
IrishGringo has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
bhaak has joined #ruby
freerobby has quit [Quit: Leaving.]
lvn has joined #ruby
vikaton has joined #ruby
A124 has joined #ruby
pandaant has quit [Remote host closed the connection]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiljusti has quit [Ping timeout: 252 seconds]
solocshaw has joined #ruby
baweaver has joined #ruby
wldcordeiro has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
haylon has joined #ruby
LoneHerm_ has joined #ruby
solocshaw has quit [Quit: solocshaw]
fmcgeough has quit [Quit: fmcgeough]
blackmesa has joined #ruby
benlieb has joined #ruby
duckpupp1 has joined #ruby
_wwwbukolaycom has joined #ruby
baroquebobcat has joined #ruby
duckpupp1 has quit [Ping timeout: 246 seconds]
jayc0b0 has joined #ruby
zenlot_away is now known as zenlot
trosborn has joined #ruby
lemur has joined #ruby
htmldrum has quit [Ping timeout: 276 seconds]
graydot has quit [Read error: Connection reset by peer]
graydot has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
lemur has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby
mikeiniowa has joined #ruby
solocshaw has joined #ruby
fmcgeough has joined #ruby
amclain_ has joined #ruby
DLSteve has joined #ruby
eregi has joined #ruby
baweaver has quit []
haylon has quit [Quit: WeeChat 1.4]
Aviio has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
j3r0 has joined #ruby
amclain_ has quit [Ping timeout: 260 seconds]
djbkd has quit [Read error: Connection reset by peer]
eregi has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
djbkd has quit [Client Quit]
LoneHerm_ has quit [Remote host closed the connection]
freerobby has joined #ruby
tenderlo_ has quit [Read error: No route to host]
wldcordeiro has joined #ruby
darkf has joined #ruby
tenderlove has joined #ruby
ensyde_ has joined #ruby
LoneHerm_ has joined #ruby
lele has joined #ruby
x77686d has quit [Quit: x77686d]
ready has joined #ruby
ready has quit [Client Quit]
fmcgeough has quit [Quit: fmcgeough]
intrigueD has quit [Remote host closed the connection]
Respek has quit [Quit: gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
baweaver has joined #ruby
DmitryBochkarev has joined #ruby
sp4rrow has joined #ruby
podman has joined #ruby
Xiti has joined #ruby
idefine has quit [Remote host closed the connection]
QORRiE has quit [Read error: Connection reset by peer]
sudoubuntu has joined #ruby
matp has joined #ruby
marr has quit [Ping timeout: 250 seconds]
graphettion has joined #ruby
griffindy has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
trosborn has quit [Quit: trosborn]
dlitvak has joined #ruby
spuk has joined #ruby
freerobby has quit [Quit: Leaving.]
FernandoBasso has quit [Quit: Leaving]
deuxclique has joined #ruby
jesterfraud has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 248 seconds]
duckpupp1 has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
robbyoconnor has quit [Excess Flood]
lvn has quit [Ping timeout: 253 seconds]
htmldrum has joined #ruby
duckpupp1 has quit [Ping timeout: 246 seconds]
SCHAAP137 has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 246 seconds]
Respek has joined #ruby
aryaching has joined #ruby
chouhoulis has joined #ruby
B4daBing73 has joined #ruby
Respek has quit [Quit: gone to sleep. ZZZzzz…]
cdg has joined #ruby
idefine has joined #ruby
ta_ has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
B4daBing73 has quit [Quit: Leaving]
duckpupp1 has joined #ruby
mattwildig has joined #ruby
baweaver has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
ljames has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tlaxkit has quit [Quit: ¡Adiós!]
sgambino has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
sgambino has quit [Client Quit]
jenrzzz has quit [Ping timeout: 276 seconds]
mattwildig has quit [Ping timeout: 248 seconds]
diegoviola has quit [Quit: WeeChat 1.4]
graydot has quit [Quit: graydot]
jgpawletko has quit [Quit: jgpawletko]
rodolfowtf has joined #ruby
freerobby has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
hxegon has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
LoneHerm_ has quit [Read error: Connection reset by peer]
mattwildig has joined #ruby
deuxclique has quit [Remote host closed the connection]
augcesar has quit [Remote host closed the connection]
lvn has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
binaryplease has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
maletor has quit [Client Quit]
unreal_ has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
eregi has joined #ruby
unreal has quit [Ping timeout: 248 seconds]
uglybandersnatch has quit [Ping timeout: 260 seconds]
eregi has quit [Ping timeout: 252 seconds]
justbleed is now known as GETEMOUTTAHERE
Respek has joined #ruby
freerobby has quit [Quit: Leaving.]
safe has joined #ruby
freerobby has joined #ruby
chouhoulis has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 1.4]
Chagel has joined #ruby
blackmesa has joined #ruby
volty has quit [Ping timeout: 246 seconds]
idefine has quit [Remote host closed the connection]
jottr has joined #ruby
benlieb has quit [Quit: benlieb]
blackmesa has quit [Ping timeout: 250 seconds]
uglybandersnatch has joined #ruby
goodcodeguy has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
idefine has joined #ruby
lessless has joined #ruby
<lessless> hello folks! is it possible to receive a pair a values inside the block?
DLSteve has joined #ruby
jottr_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
idefine has quit [Ping timeout: 246 seconds]
statelesscode has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
<epitron> lessless: yep
tenderlove has quit [Remote host closed the connection]
<Ox0dea> lessless: Certainly. Anything you can say in a method signature can be said in a block signature.
<lessless> epitron, I mean current and next
<lessless> sorry, for being unclear
<epitron> lessless: each cons
<Ox0dea> lessless: I think you might want each_cons(2)?
bronson has quit [Remote host closed the connection]
tenderlove has joined #ruby
<lessless> I do not have control over the over the method enumerable method itself - it's a 'ActionView::FormBuilder#collection_check_boxes' - it takes a block and returns a collection of checkboxes. And I need to wrap each pair of checkboxes into a div
GETEMOUTTAHERE is now known as justbleed
<Ox0dea> #each_slice, then.
gigetoo has joined #ruby
kies^ has quit [Quit: baaaaiiiiiiiiiii~]
deuxclique has joined #ruby
deuxclique has quit [Remote host closed the connection]
deuxclique has joined #ruby
ensyde_ has quit [Ping timeout: 250 seconds]
lacuna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
x77686d has joined #ruby
myntcake has quit [Ping timeout: 246 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has quit [Ping timeout: 248 seconds]
<shevy> wheee https://github.com/ruby/ruby/blob/trunk/ChangeLog#L3 "lib/fileutils.rb: use keyword arguments instead of option hashes"
Rodya_ has joined #ruby
mjc_ has quit [Quit: Connection closed for inactivity]
shanemcd has joined #ruby
aaeron has joined #ruby
hxegon has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
kriskropd has joined #ruby
ericn81 has joined #ruby
freerobby has quit [Quit: Leaving.]
shanemcd has quit [Ping timeout: 248 seconds]
kies^ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
sudoubuntu has joined #ruby
mostlybadfly has joined #ruby
bronson has joined #ruby
robbyoconnor has joined #ruby
DmitryBochkarev has joined #ruby
bronson has quit [Remote host closed the connection]
astrofog has joined #ruby
rodolfowtf has quit [Quit: No Ping reply in 180 seconds.]
duncannz has joined #ruby
rodolfowtf has joined #ruby
freerobby has joined #ruby
zotherstupidguy has joined #ruby
astrofog has quit [Quit: Quite]
duncannz has quit [Remote host closed the connection]
duncannz has joined #ruby
krz has joined #ruby
jhack has joined #ruby
blackmesa has joined #ruby
mattwildig has quit [Remote host closed the connection]
stardiviner has joined #ruby
<havenwood> shevy: nice
blackmesa has quit [Ping timeout: 246 seconds]
Chagel has quit [Remote host closed the connection]
pawnbox has joined #ruby
krz has quit [Ping timeout: 260 seconds]
deuxcliq_ has joined #ruby
rdavila has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
Chagel has joined #ruby
deuxclique has quit [Ping timeout: 248 seconds]
devbug has joined #ruby
eregi has joined #ruby
DmitryBochkarev has joined #ruby
LoneHermit has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Client Quit]
DmitryBochkarev has joined #ruby
aaeron has quit [Quit: aaeron]
deuxcliq_ has quit [Remote host closed the connection]
eregi has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
rodolfowtf has quit [Read error: Connection reset by peer]
Chagel has quit [Remote host closed the connection]
adgtl has joined #ruby
adgtl has joined #ruby
FooMunki has quit [Quit: FooMunki]
rdavila has joined #ruby
sneakerhax has joined #ruby
x77686d has quit [Quit: x77686d]
elifoster has quit [Ping timeout: 252 seconds]
LoneHermit has quit [Ping timeout: 276 seconds]
leksster has joined #ruby
krz has joined #ruby
x77686d has joined #ruby
baweaver has joined #ruby
duckpupp1 has quit [Ping timeout: 260 seconds]
william3 has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
Chagel has joined #ruby
floatingpoint has joined #ruby
pawnbox has quit [Remote host closed the connection]
william3 has quit [Ping timeout: 246 seconds]
DLSteve has quit [Remote host closed the connection]
pdoherty has joined #ruby
makenoise has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
zast has joined #ruby
adgtl has quit [Remote host closed the connection]
Chagel has quit [Remote host closed the connection]
pawnbox has joined #ruby
jottr has joined #ruby
braincrash has joined #ruby
gix has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
aupadhye has joined #ruby
howdoi has joined #ruby
Chagel has joined #ruby
Chagel has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
Chagel has joined #ruby
chipotle has quit [Ping timeout: 260 seconds]
lpvb has joined #ruby
aupadhye has quit [Quit: Leaving]
aupadhye has joined #ruby
rodolfowtf has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 252 seconds]
graphettion has quit [Remote host closed the connection]
dlitvak has joined #ruby
queequeg1 has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
DmitryBochkarev has joined #ruby
blackmesa has joined #ruby
chouhoul_ has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
DmitryBochkarev has quit [Client Quit]
DmitryBochkarev has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
blackmesa has quit [Ping timeout: 260 seconds]
rizenine has joined #ruby
nachoman has joined #ruby
elifoster has joined #ruby
jhack has quit [Quit: jhack]
plonk_ has joined #ruby
plonk_ has joined #ruby
plonk_ is now known as plonk
InternetFriend has joined #ruby
nachoman has quit []
LoneHermit has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
sarlalia1 has joined #ruby
Rodya_ has joined #ruby
arlek has joined #ruby
dopamean_ has joined #ruby
sarlalia1 has quit [Client Quit]
makenoise has quit []
rodolfowtf has quit [Read error: Connection reset by peer]
aaeron has joined #ruby
godzillaenlacasa has joined #ruby
aaeron has quit [Client Quit]
LoneHermit has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
nachoman has joined #ruby
pawnbox has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ericn81 has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
djbkd has quit [Client Quit]
spuk has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
djbkd has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<epitron> "Reduce system calls by activating the `did_you_mean` gem before requiring the gem. Activating the gem puts the gem on the load path, where simply requiring the file will search every gem that's installed until it can find a gem that contains the `did_you_mean` file."
<epitron> hey, that's a neat trick!
<epitron> probably still loads all the gemspecs in the universe though
<drbrain> ↑ is what bundler does
<epitron> orly
makenoise has joined #ruby
<epitron> doh. it only reduces the system calls from 3400 to 3300
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
anaeem1_ has joined #ruby
makenoise has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
harryh has joined #ruby
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
adgtl has joined #ruby
adgtl has joined #ruby
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
makenoise has joined #ruby
wilbert has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
Rodya_ has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 276 seconds]
anaeem1__ has joined #ruby
InternetFriend has quit [Ping timeout: 260 seconds]
godzillaenlacasa has quit [Quit: ZZZZZ....]
thevaliantx has joined #ruby
makenoise has quit [Ping timeout: 250 seconds]
Chagel has joined #ruby
anaeem1_ has quit [Ping timeout: 250 seconds]
anaeem1__ has quit [Remote host closed the connection]
htmldrum has joined #ruby
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
ur5us has joined #ruby
Rodya_ has joined #ruby
dextertzu has joined #ruby
blackmesa has joined #ruby
zast has quit [Remote host closed the connection]
mattwildig has joined #ruby
eregi has joined #ruby
mattwildig has quit [Ping timeout: 248 seconds]
Rodya_ has quit [Remote host closed the connection]
Chagel_ has joined #ruby
fullofcaffeine has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
<shevy> epitron is that a non-default behaviour?
Chagel has quit [Ping timeout: 250 seconds]
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
eregi has quit [Ping timeout: 276 seconds]
arlek has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
eregi has joined #ruby
aupadhye has quit [Quit: Leaving]
lvn has quit [Ping timeout: 248 seconds]
aupadhye has joined #ruby
mary5030_ has quit [Ping timeout: 248 seconds]
podman has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
mary5030 has joined #ruby
<epitron> dunno!
deuxclique has joined #ruby
sq271 has joined #ruby
ta_ has joined #ruby
deuxclique has quit [Ping timeout: 248 seconds]
Rodya_ has joined #ruby
sp4rrow has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
Rodya_ has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 250 seconds]
fulgore_ has joined #ruby
Rodya_ has joined #ruby
trosborn has joined #ruby
nk121 has joined #ruby
JohnBat26 has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
Uber|Dragon has joined #ruby
<nk121> what does "dup" in "can't dup NilClass" mean?
<Uber|Dragon> it means the object you are trying to dup is nil
czerasz has joined #ruby
<nk121> what does the wrod "dup" mean
<nk121> word
<Uber|Dragon> duplicate the object
<nk121> cool, thx
<Uber|Dragon> np
<shevy> damn it ... IceDragon watch out, Uber|Dragon is there ready for a duel
<shevy> and then there is Fire-Dragon-DoL
brianpWins has joined #ruby
<Uber|Dragon> haha I've been Uber|Dragon on irc (and beyond) for 20 years :P
<Uber|Dragon> do the other dragons blow fire in real life?
<shevy> I think they only make it to dragonhood on IRC
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Uber|Dragon> then the battle shall be short my friend :)
bronson has joined #ruby
soujen has joined #ruby
soujen has quit [Client Quit]
soujen has joined #ruby
ur5us has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Rodya_ has joined #ruby
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
pawnbox has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
soujen has quit [Quit: Lost terminal]
nachoman has quit []
djbkd has quit [Quit: My people need me...]
adgtl has quit [Remote host closed the connection]
Chagel_ has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
devbug_ has joined #ruby
<shevy> yeah... IceDragon is old and grumpy ... not good duel material
ur5us has joined #ruby
Chagel has joined #ruby
aganov has joined #ruby
Mon_Ouie has joined #ruby
adgtl has joined #ruby
dionysus69 has joined #ruby
blackmesa has joined #ruby
aufi has joined #ruby
<Uber|Dragon> shevy: lol
dopie has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
snockerton has joined #ruby
RudolphFenz has quit [Quit: Saliendo]
thevaliantx has quit [Quit: Leaving]
trosborn has quit [Quit: trosborn]
blackmesa has quit [Ping timeout: 250 seconds]
safe has quit [Quit: Leaving]
<norc> nk121: Just beware of semantic differences between #dup and #clone across all the classes.
<norc> Also the fact that both will create a shallow copy.
<norc> (Clone will also copy over the objects singleton class and frozen state, where as dup does not)
<nk121> awesome, thanx norc. (fyi, someone also added that as a comment to the above linked page)
<norc> Oh brilliant.
<norc> Nevermind me then. :)
<Uber|Dragon> hehe
<norc> nk121: Does not mention the shallow copy bit though. :p
kam270 has quit [Remote host closed the connection]
<norc> So I was not entirely useless.
<norc> Oh no it does!
<norc> I am absolutely useless.
<nk121> haha
<nk121> no worries, its absolutely reinforced in my head now at least :P
<Uber|Dragon> ^^
wilbert has quit [Quit: quit]
tvw has joined #ruby
Rodya_ has quit [Remote host closed the connection]
YaknotiS has joined #ruby
intrigueD has joined #ruby
pandaant has joined #ruby
<shevy> I have used .dup quite a bit but I can not remember that I ever used .clone so far
djbkd has joined #ruby
baweaver has joined #ruby
elifoster has quit [Ping timeout: 276 seconds]
brianpWins has quit [Ping timeout: 248 seconds]
cibs has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
LoneHerm_ has quit [Remote host closed the connection]
dopie has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
dopie has joined #ruby
Guest73204 has joined #ruby
solars has joined #ruby
tobias_ has joined #ruby
eregi has quit [Ping timeout: 260 seconds]
Respek has quit [Quit: gone to sleep. ZZZzzz…]
robbyoconnor has quit [Read error: Connection reset by peer]
x77686d has quit [Quit: x77686d]
uglybandersnatch has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
TobiG77 has quit [Ping timeout: 276 seconds]
skade has joined #ruby
adgtl has quit [Remote host closed the connection]
adgtl has joined #ruby
Uber|Dragon has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
x77686d has quit [Quit: x77686d]
scepticulous has joined #ruby
tobias_ has quit [Quit: tobias_]
lxsameer has joined #ruby
intrigueD has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 248 seconds]
htmldrum has joined #ruby
lvn has joined #ruby
adgtl has quit [Remote host closed the connection]
Chagel has quit [Remote host closed the connection]
andikr has joined #ruby
baweaver has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
Chagel has joined #ruby
jas02 has joined #ruby
ta_ has joined #ruby
last_staff has joined #ruby
mlehrer has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattwildig has joined #ruby
hahuang65 has joined #ruby
robbyoconnor has joined #ruby
firstdayonthejob has joined #ruby
blackmesa has joined #ruby
mattwildig has quit [Ping timeout: 246 seconds]
ruby-lang608 has joined #ruby
htmldrum has quit [Ping timeout: 252 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarlalia1 has joined #ruby
m4rCsi has joined #ruby
PaulCape_ has joined #ruby
sarlalia1 has quit [Client Quit]
MuffinPimp has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
sarlalia1 has joined #ruby
MuffinPimp has joined #ruby
uglybandersnatch has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
gaf_ has joined #ruby
Morrolan has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
robbyoconnor has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
snockerton has quit [Quit: Leaving.]
robbyoconnor has joined #ruby
ziyadb has joined #ruby
moeabdol has joined #ruby
duncannz has quit [Quit: Leaving]
czerasz has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
baweaver has quit [Remote host closed the connection]
anisha has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
rkoller has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
ruby-lang697 has joined #ruby
atmosx has joined #ruby
<ruby-lang697> hi everyone!
LoneHerm_ has joined #ruby
<flughafen> hi ruby-lang697
astrofog has joined #ruby
biberu has joined #ruby
KKK4LIFE has joined #ruby
<KKK4LIFE> why are you voting for president trump?
<atmosx> tst
mary5030_ has joined #ruby
<apeiros> !badnick KKK4LIFE
KKK4LIFE was kicked from #ruby by ruby[bot] [nickname is not suitable for this channel, see http://ruby-community.com/pages/user_rules]
steffkes has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
LoneHerm_ has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
PaulCape_ has quit [Read error: Connection reset by peer]
TomyWork has joined #ruby
mary5030 has quit [Ping timeout: 248 seconds]
cpup has quit [Ping timeout: 252 seconds]
PaulCapestany has joined #ruby
cpup has joined #ruby
djbkd has quit [Quit: My people need me...]
ruby-lang697 has quit [Quit: Page closed]
<norc> So YAML.load() does not seem to trigger autoloading constants. Is this a bug?
toretore has joined #ruby
<norc> It is.
uglybandersnatch has quit [Ping timeout: 276 seconds]
ruby-lang921 has joined #ruby
tjbiddle has joined #ruby
ruby-lang921 has quit [Client Quit]
bronson has joined #ruby
ruby-lang980 has joined #ruby
hayden_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug_ has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
antgel has joined #ruby
lee0417 has joined #ruby
lvn has quit [Ping timeout: 250 seconds]
hololeap has joined #ruby
Hounddog has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
skade has joined #ruby
mark1 has joined #ruby
mark1 has left #ruby [#ruby]
vdamewood has joined #ruby
tulak has joined #ruby
mark1 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Amnez777 has joined #ruby
jenrzzz has joined #ruby
karapetyan has quit [Remote host closed the connection]
<TomyWork> lately I don't think very highly of instantiating classes on deserialization :)
karapetyan has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
<hanmac> i think thats one of the reasons why Autoloading is such an un-liked feature that matz wanted to remove it (or deprecate it) in the past
hahuang61 has joined #ruby
czerasz has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
adgtl has joined #ruby
scope has joined #ruby
<scope> hi guys anyone online
<scope> need a little help
tjbiddle has quit [Quit: tjbiddle]
<xpt> scope: Usually asking specific question helps fo achieve answer.
<scope> haha sorry
<scope> im trying to add some design to ROR
<scope> i have 3 files i have created a html file which sets the canvas
<scope> a css file and a js file
<scope> i cant for the life of me figure out where they go i have so far placed them in assets
<scope> i get this error message
<scope> Asset was not declared to be precompiled in production. Add `Rails.application.config.assets.precompile += %w( matrix.css )` to `config/initializers/assets.rb` and restart your server
tranvuong has joined #ruby
<scope> its supposed to be a raining code style background
dlitvak has joined #ruby
baweaver has joined #ruby
<xpt> scope: try asking this question on #rubyonrails
Gasher has joined #ruby
<scope> ok
<scope> thanks anyway
mja has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Freeaqingme has joined #ruby
Xeago has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 246 seconds]
ruby-lang608 is now known as lee0154
<lee0154> hello
Xeago has joined #ruby
tranvuong has quit [Remote host closed the connection]
rdark has joined #ruby
ruby-lang980 has quit [Ping timeout: 252 seconds]
jayc0b0 has quit [Remote host closed the connection]
norc has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mja> hi, guys! I'm using BigDecimal to parse some financial data in form of numbers. I have some cases where the user has the ability to enter data. How could I raise error if the data is some characters, or a string but not a number? I mean, how the parsing of the input into BigDecimal could fail?
Snowy has joined #ruby
tjbiddle has joined #ruby
<norc> mja: Are you perhaps looking for a gem like highline?
marr has joined #ruby
tjbiddle has quit [Client Quit]
<mja> norc: let me check out
<norc> mja: Anyway. A simple regex will solve your issue.
<norc> This should be enough for you I think /\a[+-]?\d+\.?\d*\Z/
<mja> norc: yeah, but I want to avoid of the overhead. Let's say I use something like Float("asd"), it will fail and raise exception.
<norc> (highline just greatly simplifies the cli interaction with the user)
troulouliou_div2 has joined #ruby
<norc> mja: Just test against the regex I mentioned above and raise and error if it does not match
<mja> norc: okay, thanks. I'll check and the gem that you mentioned
hari_ has joined #ruby
<hanmac> mja for financial stuff you might checkout the "money" gem
ferr has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
tomphp has joined #ruby
<mja> hanmac: thanks, I'll do it
tomphp has quit [Client Quit]
trosborn has joined #ruby
tomphp has joined #ruby
vdamewood has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
Xeago has quit [Remote host closed the connection]
trosborn has quit [Ping timeout: 276 seconds]
<lee0417> hi guys, when learning meta programming, I found a concept that said `Class` is the object of itself. How to implement that concept?
trosborn has joined #ruby
lee0154 has quit [Quit: Page closed]
trosborn has quit [Client Quit]
william3 has joined #ruby
<norc> lee0417: I do not understand your question. Can you rephrase it?
sepp2k has joined #ruby
<norc> Or lets settle some things first.
Chagel_ has joined #ruby
<norc> >> Class.ancestors
<ruby[bot]> norc: # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/528563)
<lee0417> I mean when create a new class we can do this: `Person = Class.new`
<lee0417> then it said that
<norc> lee0417: That pattern is quite commonly used to create exception classes in Ruby by the way. :)
Chagel has quit [Ping timeout: 250 seconds]
<norc> lee0417: I still do not understand your question. What do you mean by "is the object of itself" ?
Chagel_ has quit [Remote host closed the connection]
<lee0417> thank norc for your patience
whiteline has joined #ruby
<lee0417> I mean when looking about object model in ruby, I have the concept said that: class `Class` is the object of itself
astrofog has left #ruby ["Leave"]
<adaedra> you mean an instance?
<lee0417> so I don't understand how to implement that concept
<adaedra> >> Class.class
<ruby[bot]> adaedra: # => Class (https://eval.in/528564)
<lee0417> yep. that's right
<lee0417> Class.class => Class
<adaedra> But this is done in the interpreter, you won't reproduce it in Ruby
<lee0417> how did they implement that concept
<adaedra> Look at the Ruby code?
Chagel has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<lee0417> sorry. because I haven't reached to the point where I can understand the underhood of Ruby code
<lee0417> so I ask you guys to get an overview (high level) of that concept
<norc> lee0417: The problem is you have to dive under the hood to really understand whats happening.
<norc> Or simply accept that Class.class => Class
Gasher has quit [Quit: Leaving]
htmldrum has quit [Ping timeout: 276 seconds]
<adaedra> Are you writing your own language or something?
Xeago has joined #ruby
n008f4g_ has joined #ruby
mattwildig has joined #ruby
blackmesa has joined #ruby
<lee0417> no. I just learning metaprogramming in ruby then got that concept
<norc> adaedra: Mind my asking, do you happen to remember which doc in Ruby had the ancestor diagrams of the core classes?
<adaedra> norc: nope
<norc> lee0417: This particular bit does not have much to do with metaprogramming - at least it should not be relevant to you.
<adaedra> lee0417: you don't need to know under the hood how it is done to do metaprogramming
<lee0417> @norc: that ancestor is just how ruby lookup chaining method.
htmldrum has joined #ruby
<lee0417> so if you understand that you can draw your own diagram
<norc> lee0417: Give me a second to find this for you.
pawnbox has quit [Remote host closed the connection]
<adaedra> norc: did you mean this? http://ruby-doc.org/core-2.3.0/Class.html
Couch has joined #ruby
tranvuong has joined #ruby
AbdulR3hman has joined #ruby
<norc> adaedra: Oh yeah.
<norc> That is a bit limited.
mattwildig has quit [Ping timeout: 260 seconds]
tranvuong is now known as Kdz
<norc> That looks a bit more comprehensive.
zmartAzz is now known as zmartAway
Kdz has quit [Client Quit]
Gasher has joined #ruby
htmldrum has quit [Ping timeout: 276 seconds]
<lee0417> @norc: thank u so much
<adaedra> There's surely a tool that dumps a graph from a Ruby project. Should not be hard to do with ObjectSpace and graphviz.
j3r0 has quit [Ping timeout: 246 seconds]
BtcBen has joined #ruby
<Fire-Dragon-DoL> mhhh I was sleeping, shevy I've been Fire-Dragon-DoL since 15 years! :P
<lee0417> @adaedra: graph tool? do you remember its name?
uglybandersnatch has joined #ruby
<adaedra> lee0417: never seen such a tool; i was just saying that there is probably one somewhere
pawnbox has joined #ruby
ur5us has quit [Remote host closed the connection]
<AbdulR3hman> morning, is there a way to extract a gem spec from current enviroment and installing it using the same spec on a different machine?
gigetoo has quit [Ping timeout: 250 seconds]
Xeago has quit [Remote host closed the connection]
Jardayn has joined #ruby
william3 has quit [Remote host closed the connection]
ur5us has joined #ruby
<hanmac> AbdulR3hman: depending how different this machines are, this is not an easy way to do it
antgel has quit [Ping timeout: 248 seconds]
DoubleMalt has joined #ruby
jeanlinux has joined #ruby
gigetoo has joined #ruby
antgel has joined #ruby
Chagel has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
Chagel has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
william3 has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
nrsky has joined #ruby
jeanlinux has quit [Ping timeout: 250 seconds]
darkf has quit [Ping timeout: 276 seconds]
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
Xeago has joined #ruby
skade has joined #ruby
postmodern has quit [Quit: Leaving]
eregi has joined #ruby
SCHAAP137 has joined #ruby
dgncn has joined #ruby
darkf has joined #ruby
platzhirsch has joined #ruby
ur5us has joined #ruby
eregi has quit [Ping timeout: 252 seconds]
evidex has joined #ruby
mlehrer has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
uglybandersnatch has quit [Ping timeout: 248 seconds]
Hounddog has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 248 seconds]
vdamewood has joined #ruby
chouhoulis has joined #ruby
mfaeh has joined #ruby
hari_ has quit []
vasilakisfil has joined #ruby
adgtl has joined #ruby
djbkd has joined #ruby
darkf_ has joined #ruby
pydave6367 has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
araujo has joined #ruby
trosborn has joined #ruby
ready has joined #ruby
Xeago has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
InternetFriend has joined #ruby
darkf has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
bronson has joined #ruby
william3 has quit [Remote host closed the connection]
InternetFriend has quit [Ping timeout: 248 seconds]
supplication has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<AbdulR3hman> hanmac: windows to windows
darkf_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
darkf_ has joined #ruby
pawnbox has joined #ruby
binaryplease has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
william3 has joined #ruby
darkf_ is now known as darkf
<norc> >> ObjectSpace.each_object(Class).find { |a| a.name == "fatal" }
<ruby[bot]> norc: # => fatal (https://eval.in/528631)
<norc> What is this?
dgncn has quit [Quit: Leaving]
dgncn has joined #ruby
darkf has quit [Ping timeout: 276 seconds]
william3 has quit [Ping timeout: 276 seconds]
FooMunki has joined #ruby
lee0417 has quit [Quit: Leaving]
BtcBen has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 250 seconds]
dgncn has quit [Quit: Leaving]
dgncn has joined #ruby
<hanmac> norc: like its said something very "fatal" ;P hm i dont know why it has such a hidden class, but its for that cases for exceptions from the C-side which should not be catchable ... a fatal error does exit the entire ruby programm/interpreter
[gmi] has joined #ruby
dgncn has quit [Read error: Connection reset by peer]
dgncn has joined #ruby
<norc> hanmac: Fair enough. Ill have to look into that later today.
<norc> >> DidYouMean::ClassNameChecker::ClassName
<ruby[bot]> norc: # => private constant DidYouMean::ClassNameChecker::ClassName referenced (NameError) ...check link for more (https://eval.in/528636)
n008f4g_ has quit [Ping timeout: 246 seconds]
<norc> Funny things lying around.
croberts has joined #ruby
volty has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
william3 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Remote host closed the connection]
jaruga has joined #ruby
Xeago has joined #ruby
baweaver has joined #ruby
jeanlinux has joined #ruby
trosborn has quit [Quit: trosborn]
darkf has joined #ruby
InternetFriend has joined #ruby
j3r0 has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
jeanlinux has quit [Ping timeout: 246 seconds]
william3 has quit [Remote host closed the connection]
InternetFriend has quit [Ping timeout: 276 seconds]
volty has quit [Quit: Konversation terminated!]
tulak has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<norc> adaedra: The exercise was worth it. I learned that there is one core class that does not derive from Object -> Delegator. :)
<norc> (Well and SimpleDelegator of course)
quaristice has joined #ruby
quaristice has quit [Client Quit]
UtkarshRay has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
dlitvak has quit [Remote host closed the connection]
f4cl3y has joined #ruby
Chagel has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
trinaldi has joined #ruby
Xeago has quit [Remote host closed the connection]
toretore has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
chouhoulis has joined #ruby
UtkarshRay has quit [Ping timeout: 250 seconds]
hayden_ has quit []
hayden_ has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
rodfersou has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
uglybandersnatch has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
ldnunes has joined #ruby
karapetyan has joined #ruby
harryh has quit [Quit: Textual IRC Client: www.textualapp.com]
mlehrer has joined #ruby
pawnbox has joined #ruby
nettoweb has joined #ruby
maximski has joined #ruby
tvw has quit []
LoneHerm_ has joined #ruby
harryh has joined #ruby
mattwildig has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<maximski> i recently updated a gem in a project gemfile to use the github repository to fetch the gem but it still uses the old gem version (using rbenv), any idea why that might be?
blackmesa has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
lipoqil has joined #ruby
<maximski> sorry, was my bad, already found the issue
LoneHerm_ has quit [Ping timeout: 252 seconds]
AbdulR3hman has quit [Ping timeout: 252 seconds]
mattwildig has quit [Ping timeout: 276 seconds]
binaryplease has quit [Ping timeout: 260 seconds]
cassioscabral has joined #ruby
cassioscabral has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
Mon_Ouie has joined #ruby
csmb has joined #ruby
Kruppe has joined #ruby
hadronzoo has joined #ruby
jpterry has joined #ruby
ghormoon has joined #ruby
ghormoon has quit [Max SendQ exceeded]
ghormoon has joined #ruby
Xeago has quit [Remote host closed the connection]
skade has joined #ruby
Foren has joined #ruby
allcentury has joined #ruby
GreyHands has joined #ruby
UtkarshRay has joined #ruby
jeanlinux has joined #ruby
vondruch has joined #ruby
william3 has joined #ruby
adgtl has joined #ruby
rizenine has quit [Remote host closed the connection]
schickung has joined #ruby
jaruga has quit [Ping timeout: 260 seconds]
scope has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
gregf has quit [Quit: WeeChat 1.4]
karapetyan has quit [Remote host closed the connection]
Aviio has joined #ruby
lessless has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
<harryh> i have an array pages = [{ order: 1 }, { order: 2 }, ...] and need to get the element where order == currentPage.order + 1, or order == 1 if it reaches the final page. im trying to use .select, but idk a clean way to do it, since .select returns an empty array if no elements are found, it seems, so `nextPage = foo.select{ |f| f.order == current.order+1 } || foo.select{ |f| f.order == 1 }` doesn't work. is there a clean way to do this?
<harryh> here's my gist for reference https://gist.github.com/hedgerh/0d7f31b6686c417d58b0
<harryh> new to ruby from js, so not sure of the ins and outs. any help is really appreciated.
dlitvak has quit [Ping timeout: 244 seconds]
<harryh> think i got it, actually
<harryh> foo.select{ |f| f.order == current.order+1 || f.order == 1 }
<harryh> thanks anyway :D
<harryh> er wait
<harryh> that didnt work. brings up both results
dlitvak has joined #ruby
UtkarshRay has quit [Ping timeout: 248 seconds]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
chouhoulis has joined #ruby
gregf has joined #ruby
binaryplease has joined #ruby
moeabdol1 has joined #ruby
mfaeh has quit [Remote host closed the connection]
Aviio has quit [Read error: Connection reset by peer]
Aviio_ has joined #ruby
william3 has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 246 seconds]
hololeap has quit [Ping timeout: 248 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
Tempesta_ has joined #ruby
<norc> harryh: By the way, no need to annotate multiple versions in your gist. Just update it, and others will see previous "attempts" in the revision history. :)
adgtl has quit [Remote host closed the connection]
UtkarshRay has joined #ruby
bronson has joined #ruby
<harryh> norc: i never even realized there was a revision history for gists ha :p id rather just annotate to make it easier for someone to glance over since its a one liner though. TIL
<apeiros> harryh: position the faster test first
<apeiros> as a general advice
<apeiros> gists can even be forked/cloned. they're git repos.
<norc> harryh: Id say the best solution depends on what you are actually trying to do.
<harryh> yeah. so any suggestions? im starting to think im going to need to do the first select, check to see if it's empty, then do the next
nocontrol has joined #ruby
<Aviio_> Hi all - Anybody got experience with puppet?
<harryh> im building a portfolio site for someone in middleman. he's going to be able to set an `order` variable for each page to dictate the order they are listed
bronson has quit [Ping timeout: 260 seconds]
<norc> Aviio_: Ask your question instead of asking whether there is experienced people around.
<nocontrol> I am trying to do a ping sweep => write results to the (postgre) database and it works fine in a frequency of 1 second repeats, but after some time it piles up somehow and fails https://gist.github.com/chrisvel/e1474c66fef6de1fda10
<nocontrol> This is the problem I see "error_message"=>"could not obtain a connection from the pool within 5.000 seconds (waited 5.005 seconds); all pooled connections were in use"
<apeiros> a wild indentation appears
<harryh> at the bottom of each project page, there's a "Next Project" button that leads to the next project. so the fact that the client gets to set an order variable makes me not want to go on array size or anything
* apeiros uses advanced reading skills
<norc> nocontrol: Sounds like heroku.
<apeiros> it's not very effective…
<nocontrol> nope
<Aviio_> So I have some puppet files that ive been provided with, I have a manifest named cleanup.pp and a module which is stored in a 'cleanup' directory named config.pp ( https://github.com/Aviio/SecGen/tree/directory_change/modules/build/puppet ) but when I try and provision them through vagrant I get an error ( Error: Could not find class cleanup::config for debian-607-x64-vbox4210 on node debian-607-x64-vbox4210 ), i
<Aviio_> f I go onto the box both of the files are present and in the proper folders
<norc> nocontrol: ActiveRecord?
<nocontrol> norc: nope
<norc> nocontrol: The problem is quite obvious though. You have only a limited set of pooled connections and no queueing mechanis,.
<nocontrol> norc: just a vagrant ubuntu server on puma
<nocontrol> norc: I see and it's logical... because it might open 255 connections at once
<nocontrol> norc: but do you have any idea how to overcome this ?
<norc> nocontrol: I dont even know which part is being pooled.
<norc> nocontrol: You need to provide more information
<norc> A full stack trace would be helpful
openstruct has joined #ruby
<nocontrol> norc: https://gist.github.com/chrisvel/e1474c66fef6de1fda10 the last lines from 19+
<norc> Aviio_: Sounds like an actual puppet problem. Try #puppet
<Aviio_> norc: cool, cheers
<norc> nocontrol: I asked for a stack trace.
<harryh> looking at each_with_object now
<harryh> oh, deprecated
Suntzu has joined #ruby
<norc> harryh: use .with_index and .with_object
<nocontrol> norc: there's nothing useful there unfortunately
<norc> nocontrol: Can I be the judge of that?
<norc> nocontrol: also, what is Node?
<nocontrol> norc: it's model that stores IP Adresses
<norc> model based on which class?
bob_f has joined #ruby
<nocontrol> norc: the problem is strictly related to this iteration and opening 255 connections to postgres every 1 sec
<norc> Sequel? Datamapper? AR?
<nocontrol> nope
<norc> Then tell me.
<nocontrol> Rails
<norc> Seriously.
<nocontrol> ActiveRecord
<norc> I asked ActiveRecord and you said no.
<norc> Stop wasting my time.
<nocontrol> sorry, the no goes to your previous question
<nocontrol> it's activeRecord
<norc> nocontrol: Well, next time provide such details and dont force me to ask you every single bit about your application.
sgambino has joined #ruby
sgambino has quit [Client Quit]
<nocontrol> anything to suggest ?
dstarh has joined #ruby
<norc> nocontrol: Increase your pool size or introduce some other buffering mechanism.
krz has joined #ruby
william3 has joined #ruby
<norc> nocontrol: The latter is probably the better option.
william3 has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<norc> nocontrol: I would use a Thread pool, a Queue and a worker that takes data from the queue and writes it to the database.
atmosx has quit [Quit: This is aparting message!]
<norc> While the queue is being filled from each worker thread in the pool.
<nocontrol> norc: this is how it works
<nocontrol> norc: I've tried with Threads too but it doesn't change that connections pile up quickly
<norc> nocontrol: No you are not using a Queue.
<nocontrol> norc: I don't know what do you mean by "Queue", I used a Threads pool before
<nocontrol> If it's the same ?
<norc> No.
<norc> &ri Queue nocontrol
<nocontrol> this sounds good
<norc> nocontrol: And you should use threads because there is no reason to use processes.
<nocontrol> the previous one here
<nocontrol> told me to use Processes
<nocontrol> because Threads make no sense at all
<nocontrol> :P
flughafen has joined #ruby
<norc> nocontrol: I would not use external commands to begin with. I would just use worker threads using net-ping
[gmi] has quit [Quit: Leaving]
<nocontrol> norc: not a problem, this is another thing
aupadhye has quit [Quit: Leaving]
Vingador has joined #ruby
<nocontrol> norc: thanks for the queue thing, it may solve the issue actually
<norc> nocontrol: Though the more I look at it I do not think a queue is the solution.
<norc> Your problem lies elsewhere.
Xeago has joined #ruby
godzillaenlacasa has joined #ruby
mattwildig has joined #ruby
<nocontrol> norc: 255 INSERTs to the db every 1 sec, what else ?
<norc> nocontrol: That is not an issue. The way the code flows this would just use a single database connection.
<norc> At a time.
<norc> nocontrol: Is this a production server? Are there other jobs running?
<norc> What is your connection pool size?
<nocontrol> no just a vagrant ubuntu server 14.04 on my laptop
<nocontrol> norc: pool: 5
<norc> nocontrol: gist your model.
<norc> And the stack trace I asked for a while ago.
<nocontrol> but the first ones work fine, I see pings in the console happening and persisted to the db, but after 20-25 seconds it fails
InternetFriend has joined #ruby
schickung has quit [Quit: schickung]
<nocontrol> norc: https://github.com/chrisvel/networkify the whole project
<norc> nocontrol: and the stack trace. dont make me ask again.
jgpawletko has joined #ruby
yardenbar has joined #ruby
KervyN has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
<norc> nocontrol: And this is why I wanted the stacktrace, you could have saved us both a lot of time if you had pasted it right at the beginning when I asked for it.
<norc> You completely hid the fact that you are using sidekiq jobs here.
<n1colas> Hello
InternetFriend has quit [Ping timeout: 244 seconds]
mattwildig has quit [Ping timeout: 244 seconds]
<nocontrol> norc: I didn't hide this actually, sorry :)
vondruch has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<norc> nocontrol: You did not even mention that you are running this from sidekiq jobs to begin with.
synthroid has joined #ruby
<nocontrol> sorry
<nocontrol> I would like to see why theoretically this is wrong
<nocontrol> I got similar errors with Threads and the worst part is that after some time IF I don't end the processes manually by Ctrl+c, it freezes the vm
adgtl has joined #ruby
vasilakisfil_ has joined #ruby
<norc> nocontrol: As I said, I wouldnt use shell ping but do it all in Ruby, that would not be an issue then.
<nocontrol> it might be that the persistance of items to the db is slow so they pile up and overflow
william3 has joined #ruby
<norc> nocontrol: No.
<norc> nocontrol: Do you have other sidekiq jobs running?
<nocontrol> norc: but the problem is not the shell ping but the connections to the db
<nocontrol> norc: puma
<norc> nocontrol: You said you had issues with freezing with threads etc, that was just my response to that.
<nocontrol> norc: clockwork starts a job with the ping sweep
<nocontrol> norc: as I decrease the frequency it's more likely for it to fail
johnmilton has joined #ruby
<norc> nocontrol: There you go. Multiple concurrent workers.
<norc> nocontrol: You have more concurrent workers than your connection pool size.
<nocontrol> norc: possibly more than 5
vasilakisfil has quit [Ping timeout: 240 seconds]
karapety_ has joined #ruby
<nocontrol> norc: but why? the ping sweep completes in 1.3sec
johnmilton has quit [Max SendQ exceeded]
schickung has joined #ruby
<norc> nocontrol: If you have 6 concorrent jobs..
<nocontrol> norc: the iteration happens every 5 sec or more
<nocontrol> norc: is there any way to wait for the termination of the previous ones ?
johnmilton has joined #ruby
duckpupp1 has joined #ruby
<nocontrol> norc: and what wound be the cons If I increased the number of concurrent workers to 10 or 15 ?
<norc> nocontrol: Just resources. But if you have 10 concurrent workers which all use the database, it means they all need to be able to gain access within the timeout duration which is 5 seconds.
william3 has quit [Ping timeout: 244 seconds]
<norc> If you cannot guarantee that, increase your connection pool size to have enough for your jobs and web users.
<norc> nocontrol: Or better yet, use your redis queue that you already have!
<norc> nocontrol: Pump the data you need to write back into redis and have another sidekiq job write them to the database maybe.
karapetyan has quit [Ping timeout: 268 seconds]
<nocontrol> norc: the first suggestion makes sense
<nocontrol> norc: the second one.. I don't get it at all :(
<norc> nocontrol: If your actual jobs dont use the database, you are basically wasting database connections on your jobs for just inserting node data.
makenoise has joined #ruby
<norc> nocontrol: So if you have 10 concurrent workers all doing their ping sweep, they would all feed the data back into redis.
<norc> nocontrol: and next time, start with the stack trace... ;-)
adgtl has quit [Remote host closed the connection]
<nocontrol> norc: they use the database. Actually the workflow is: Start Job => Do a ping sweep and append data to a hash/array => iterate array and persist them to the db
<nocontrol> norc: this happens every 5 sec and I want to decrease it to 1 sec
<nocontrol> norc: the ping sweep takes 1.2seconds in shell alone, so I am pretty close
<nocontrol> norc: so I need the database in order to write the data and then show them in the frontend
karapety_ has quit [Remote host closed the connection]
<norc> nocontrol: So?
IrishGringo has joined #ruby
Xeago has quit [Remote host closed the connection]
karapetyan has joined #ruby
shanemcd has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
terlar has joined #ruby
<nocontrol> norc: it makes sense what you're saying because If the first one takes 5.5 seconds, the first and second ones will finish after the third begins
makenoise has quit [Remote host closed the connection]
<nocontrol> norc: so there's a "line" where each one ends and another one or two or three start
<norc> nocontrol: Just write the data back into your redis queue.
<nocontrol> norc: I don't get it what redis have to do
<norc> nocontrol: Do you know what redis is?
<nocontrol> norc: I only use redis for sidekiq
<nocontrol> norc: so far a key/value pair storage
shanemcd has quit [Remote host closed the connection]
<nocontrol> in the form of hashes
<nocontrol> but how could this help me ?
Mon_Ouie has quit [Ping timeout: 260 seconds]
swills has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 248 seconds]
<norc> nocontrol: You can simply take a redis list and push/pop from it.
chouhoulis has joined #ruby
<nocontrol> norc: so to use it as a database storage ?
<norc> More like a message broker.
shanemcd has joined #ruby
mfaeh has joined #ruby
lxsameer has quit [Quit: Leaving]
<norc> nocontrol: One other solution - is to prevent overlapping jobs to begin with.
<nocontrol> norc: I don't like using one gem for each problem
<nocontrol> norc: do you think it's a problem of postgres finally ?
<norc> nocontrol: You surely like using sidekiq for something its not meant for.
<nocontrol> norc: why should Redis work and PostgreSQL not ?
<nocontrol> or should I try using something like Mongodb ?
<norc> nocontrol: The issue is you have multiple concurrent processes which try to make use of a limited connection pool.
chouhoulis has quit [Ping timeout: 276 seconds]
Snowy has quit [Remote host closed the connection]
<norc> nocontrol: redis would work because it all works on the same connection.
<norc> nocontrol: Your whole job design smells a bit funny though.
<nocontrol> norc: it's a hobby project for learning purposes
tristanp has joined #ruby
<nocontrol> norc: to keep a ping sweeper on the background running as a job
<norc> nocontrol: If you want to learn, then use the right tools. ;-)
<nocontrol> norc: and update live with websockers later
pandaant has quit [Remote host closed the connection]
<nocontrol> norc: but it's not a problem for this project only
emilkarl has joined #ruby
<nocontrol> norc: what If I had a website with several http requests to the db at once ?
<nocontrol> norc: whould they fail ?
<norc> nocontrol: Usually you have a set up with multiple http workers, each of which contains a connection pool.
<nocontrol> norc: in this case they should be way more than just 255/second
<norc> nocontrol: But you are correct that this can become a problem.
yardenbar has quit [Quit: Leaving]
<norc> Which is why building robust websites that can handle hundreds of users is not trivial.
<nocontrol> norc: so raise the workers amount or the pool size ? or both ?
_rsc` has left #ruby [#ruby]
<norc> nocontrol: In your case I would seriously say neither.
<norc> nocontrol: You are using sidekiq in a way its not meant to, and are trying to remedy your issues by scaling resources up.
jottr has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<nocontrol> norc: but except redis, you're not suggesting anything else ?
<norc> [14:25] <norc> nocontrol: One other solution - is to prevent overlapping jobs to begin with.
Azulinho has joined #ruby
<nocontrol> norc: with the gem you suggested ?
william3 has joined #ruby
<norc> nocontrol: just dont use sidekiq for this.
<norc> You dont need sidekiq.
<norc> You just want cronjobs.
<nocontrol> ok got it
aclearman037 has joined #ruby
<nocontrol> at least I have some information to deal with
<nocontrol> thank you
<norc> nocontrol: in fact sidekiq does not even offer you the resolution to do something every second.
Chagel has joined #ruby
<nocontrol> norc: but it lets you manage workers and jobs
schickung has left #ruby [#ruby]
william3 has quit [Remote host closed the connection]
jeanlinux has quit [Ping timeout: 248 seconds]
<norc> nocontrol: Its for a different problem domain.
<norc> nocontrol: You just want for something to happen periodically every n timeslots.
<norc> While sidetiq (a sidekiq plugin of sorts) allows for something, its more designed to integrate the concept of cron into an existing sidekiq infrastructure.
eregi has joined #ruby
<nocontrol> norc: I don't get it but most possibly I need to read a bit more
dionysus69 has joined #ruby
goodcodeguy has joined #ruby
fmcgeough has joined #ruby
Pandorian has joined #ruby
eregi has quit [Ping timeout: 246 seconds]
Azulinho has quit [Quit: Azulinho]
aclearman037 has quit [Quit: Textual IRC Client: www.textualapp.com]
aclearman037 has joined #ruby
shanemcd has quit [Remote host closed the connection]
jaruga has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
darkf_ has joined #ruby
shanemcd has joined #ruby
InternetFriend has joined #ruby
william3 has joined #ruby
vdamewood has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
darkf has quit [Ping timeout: 276 seconds]
shanemcd has quit [Ping timeout: 276 seconds]
dstarh has quit [Quit: Textual IRC Client: www.textualapp.com]
aryaching has joined #ruby
makenoise has joined #ruby
makenoise has quit [Remote host closed the connection]
ESpiney has joined #ruby
skade has joined #ruby
william3 has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
sudoubuntu has joined #ruby
asahi has joined #ruby
crystal77 has joined #ruby
jaruga has quit [Quit: jaruga]
<asahi> hello, I'm trying to upgrade my ruby to 2.2.4 but am getting this message BUILD FAILED (Ubuntu 14.04 using ruby-build 20160228-1-g5297dbc)
<asahi> I'm using rbenv
ramortegui has joined #ruby
chouhoulis has joined #ruby
darkf_ is now known as darkf
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Gasher has quit [Quit: Leaving]
vasilakisfil_ has quit [Remote host closed the connection]
vasilakisfil_ has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<nocontrol> norc: I raised the clockwork to 10 seconds but it still fails. So it might be something else
<nocontrol> norc: could not obtain a connection from the pool within 5.000 seconds (waited 5.001 seconds); all pooled connections were in use but the pool is 10 and my clockwork frequency is 20 secons
vondruch has quit [Quit: Ex-Chat]
grn has joined #ruby
shanemcd has joined #ruby
malconis has joined #ruby
vondruch has joined #ruby
jaruga has joined #ruby
last_staff has quit [Quit: last_staff]
andikr has quit [Remote host closed the connection]
haylon has joined #ruby
AlphaAtom has joined #ruby
jmignault has joined #ruby
justbleed has joined #ruby
JohnBat26 has quit [Ping timeout: 260 seconds]
m0rph has joined #ruby
aryaching has quit []
hxegon has joined #ruby
sgambino has joined #ruby
decoponio has joined #ruby
m0rph has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nrsky has quit [Quit: Konversation terminated!]
jaruga has quit [Quit: jaruga]
mary5030_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
jhack has joined #ruby
ralsh has joined #ruby
bronson has joined #ruby
kerunaru has joined #ruby
aganov has quit [Quit: Leaving]
m0rph has joined #ruby
kies^ has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 276 seconds]
babblebre has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
<norc> nocontrol: How long are your jobs alive?
fullofcaffeine has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
emilkarl has joined #ruby
<norc> nocontrol: Remember that ping configured like that might timeout after 4s.
DoubleMalt has quit [Remote host closed the connection]
pawnbox has joined #ruby
<norc> nocontrol: And I dont know what your queue looks like.
nerium has joined #ruby
<apeiros> "could not obtain a connection from the pool within 5.000 seconds" sounds like you're having threads which check out connections and don't return them
<apeiros> or that you have too many concurrent threads with a too small pool
<nocontrol> norc: well I added ActiveRecord::Base.connection.close before each iteration ends and it doesn't throw any more errors
<apeiros> pool size should be > number of concurrently active threads
<nocontrol> norc: but the strange thing is that it takes 1.2sec to ping and possibly 2-3 seconds to persist to the db
<norc> apeiros: Careful where you tread on, he has an abusive usage of sidekiq. :S
<nocontrol> norc: and I see things as done: 29.851 sec
<norc> nocontrol: Which brings us all the way back.
hxegon is now known as hxegon_AFK
<nocontrol> apeiros: is it indeed abusive ?
<norc> nocontrol: Stop using this shell ping, stop using 255 concurrent processes.
shanemcd has quit [Remote host closed the connection]
<norc> Stop using sidekiq when you should be using whenever.
shanemcd has joined #ruby
<nocontrol> norc: regarding the shell ping, I've also tried nmap
<nocontrol> same error
moeabdol1 has quit [Quit: WeeChat 1.4]
<nocontrol> and I've used threads and processes
<norc> Do it in pure Ruby. Consider timeouts too.
<nocontrol> it shouldn't have a problem with 255 concurrent processes, it's not that much finally
<nocontrol> norc: the shell ping ends itself in 1 second
<nocontrol> whether the client replies back or not
<norc> nocontrol: Also on another thing:
<norc> host[1] == 0 ? true : false
<norc> Look at this carefully.
<nocontrol> hmm
DmitryBochkarev has joined #ruby
justbleed is now known as TomPeed
<norc> If you have trouble seeing whats wrong there, you might want to stop for a second using so many complex pieces of Ruby.
<nocontrol> you're talking about 0 that could be mistakenly considered as nil ?
<nocontrol> I feel something's leaking
<nocontrol> that's why it throws errors and it takes so much time to end a job
nachoman has joined #ruby
<nocontrol> but I am also confused because apeiros said I am abusing sidekiq
<norc> No I said.
<apeiros> reading. how does it work.
jhack has quit [Quit: jhack]
<apeiros> I don't know whether your use of sidekiq is abusive. I didn't read the backlog (and don't have the time to). but norc certainly has experience and if I were you I'd listen to them.
jhack has joined #ruby
jhack has quit [Client Quit]
Respek has joined #ruby
<nocontrol> norc: it shouldn't have a problem with concurrent shell commands though except If it does somehow because of O/S limitations
hxegon has joined #ruby
Respek has quit [Client Quit]
hxegon_AFK has quit [Ping timeout: 240 seconds]
<norc> nocontrol: Do me a favour and use threads with the net-ping gem.
<nocontrol> I will but tell me something first
binaryplease has quit [Ping timeout: 244 seconds]
<nocontrol> norc: why does this iteration work fine IF you run it from shell like ruby and not within rails ?
<nocontrol> If you run it by using ruby something.rb which iterates the pings (actually ping sweeps) then everything works fine
<nocontrol> so to exclude things first, I don't believe shell ping has anything to do here
<nocontrol> I am focusing between sidekiq workers and posgres connections
<norc> nocontrol: postgres is not your problem that much I can guarantee.
<nocontrol> which finally worked ok in terms of persisting stuff after I added ActiveRecord::Base.connection.close
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has joined #ruby
<nocontrol> and means that the connections are leaking, staying open for some reason
<norc> nocontrol: The advantage you gain with threads for example, is that you can timeout the entire thread. That gives you hard limits so you will not exceed your connection pool size as easily.
<nocontrol> and jobs take a long time to end
Xeago has joined #ruby
<nocontrol> norc: nice hint
<norc> nocontrol: The connections are not leaking.
<norc> nocontrol: your jobs are just overlapping.
rippa has joined #ruby
<nocontrol> norc: what's the difference between threads and processes ? aren't they on a O/S level both ?
jokester has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hammy_Work has joined #ruby
<apeiros> a thread shares the address space of the common process
<norc> nocontrol: Threads are very lightweight in comparison. They also share the same address space.
<apeiros> whether threads are an OS level construct depends on your runtime.
shanemcd has quit [Remote host closed the connection]
imgoinhungry has joined #ruby
myntcake has joined #ruby
<apeiros> mruby/cruby as of 1.9 has OS thread backed threads, but does its own scheduling.
floatingpoint has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
hxegon has quit [Quit: BRB]
<norc> nocontrol: Just keep in mind that threads require careful coding when working with shared resources *because* you are in the same address space.
<nocontrol> norc: this is my previous attempt using threads
<yorickpeterse> The easiest way to use threads is to not share any mutable data
<nocontrol> take a look in line 24 If you want
<yorickpeterse> ᕕ(ᐛ)ᕗ
<apeiros> if Node.where(ipaddress: node[0]) # that's always true
<norc> nocontrol: First, Hash is not thread safe.
<yorickpeterse> use a mutex
<norc> Ah. Beat me to it.
<norc> :)
<yorickpeterse> also I remember something about backticks causing a stop-the-world so the threading might not help as much here
<nocontrol> ok
<norc> nocontrol: Also try to use Net::Ping::ICMP if you can. :)
<apeiros> yorickpeterse: what? I rather doubt that…
<yorickpeterse> threads.each { |t| t.join } can just be threads.each(&:join) but it's a small detail
<nocontrol> I am walking an advanced knowledge path here and I believe I should stop and read a bit more
<apeiros> backticks should be threadable IO
<yorickpeterse> apeiros: IIRC it uses fork or something, though I might be mixing it up with rbx
<yorickpeterse> and fork requires a STW while it's forking, but it's been a while
<apeiros> that's possible. but should only concern initiation.
shanemcd has joined #ruby
vdamewood has quit [Quit: Life beckons.]
Xeago has joined #ruby
adgtl has joined #ruby
<yorickpeterse> Sure
<apeiros> i.e. a long running backtick command should be threadable
testuser123 has joined #ruby
<testuser123> why
<testuser123> why!!!!!!!!!!
<yorickpeterse> testuser123: because
adgtl has quit [Remote host closed the connection]
<ddv> lol
<apeiros> testuser123: 42
<testuser123> so tired
<testuser123> what
<nocontrol> norc: so to close this discussion and don't bother you anymore do you suggest three things that I should look at ?
<nocontrol> norc: is Threads all I want ?
adgtl has joined #ruby
grn has quit []
testuser123 has left #ruby [#ruby]
unl0ckd has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
unl0ckd has quit [Client Quit]
InternetFriend has quit [Ping timeout: 276 seconds]
unl0ckd has joined #ruby
<norc> nocontrol: Use Net::Ping::ICMP as well.
moeabdol has joined #ruby
<nocontrol> norc: it needs root privileges
asahi has left #ruby [#ruby]
<norc> That...
<nocontrol> norc: I am trying to keep things simple
<nocontrol> norc: I tried nmap also which is great but it's too heavy for the usage I want
InternetFriend has joined #ruby
<norc> nocontrol: All you want is to do this every N seconds right?
joonty has quit [Quit: Leaving]
<nocontrol> norc: true
<norc> nocontrol: I would then use Net::Ping::External instead - and make sure you specificy a timeout on that ping.
allcentury has joined #ruby
<norc> nocontrol: Replace the entire sidekiq/redis with just whenever
imgoinhungry has quit [Quit: Leaving]
<norc> (whenever is just a fancy way of using cron)
<nocontrol> but why ?
treehug88 has joined #ruby
hxegon has joined #ruby
<nocontrol> sidekiq is much stronger than cron
<norc> Do you really need a scalable high performance key/value store with a complex gem for asynchronous background processing?
<norc> I thought you just want to do the same job every n seconds.
vasilakisfil_ has quit [Remote host closed the connection]
<norc> sidekiq is not stronger, its for different problems.
joonty has joined #ruby
myntcake has quit [Ping timeout: 268 seconds]
vasilakisfil_ has joined #ruby
poguez_ has joined #ruby
volty has joined #ruby
<nocontrol> norc: I've been using it in work for scheduling jobs so I feel like I know how it works
<nocontrol> or at least I did before speaking here !
<nocontrol> I could easily remove sidekiq and redis, I 'm just using tools "I believe" I knew
x77686d has joined #ruby
asahi has joined #ruby
paul98 has joined #ruby
<norc> nocontrol: Lets say you have some computationally expensive task that is triggered from your users.
Pandorian has quit []
jottr has quit [Ping timeout: 246 seconds]
<paul98> hey, trying to install gem foodcrtic but get the following error, http://pastebin.centos.org/40676/ i've installed other gems ok just this one seems to be a issue.
<norc> nocontrol: That could drain your resources and if not done asynchronously would lead to a rather unresponsive website.
<norc> nocontrol: So these tasks are moved into background asynchronously. With only a preset amount of workers you limit the strain on your system resources.
adgtl has quit [Remote host closed the connection]
<nocontrol> norc: understood
ralsh has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<norc> nocontrol: Its also great when you want for a specific thing to happen at a specific time.
<norc> nocontrol: Say a user unsubscribes at a given date - sidekiq helps you do this too.
infra-red has joined #ruby
<norc> nocontrol: For things that need to run periodically it is just oversized, and sidekiq will not make any guarantees that it will actually run at that time.
mark1 has quit [Quit: Leaving.]
<nocontrol> and why is that? about guarantees ?
<nocontrol> it is supposed to be a professional tool
<norc> nocontrol: Because the queue might be filled with thousands of jobs.
<nocontrol> so I could wait more from it
<paul98> nvm sorted :)
vasilakisfil_ has quit [Remote host closed the connection]
<nocontrol> norc: sidekiq's queue ?
<norc> nocontrol: The redis list it works on, yes.
vasilakisfil_ has joined #ruby
<nocontrol> norc: so you suggest to remove sidekiq/redis
jas02 has quit [Quit: jas02]
Aviio_ has quit [Remote host closed the connection]
<nocontrol> norc: but will I still have ActiveJobs ?
jas02 has joined #ruby
goodcodeguy has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has joined #ruby
B1n4r10 has joined #ruby
GreyHands has quit [Quit: Textual IRC Client: www.textualapp.com]
hxegon is now known as hxegon_AFK
podman has joined #ruby
eregi has joined #ruby
uglybandersnatch has joined #ruby
hxegon_AFK is now known as hxegon
vikas027 has joined #ruby
<norc> nocontrol: why do you want activejob?
vikas027 has left #ruby [#ruby]
<nocontrol> because it's a job ?
aegis3121 has joined #ruby
<norc> nocontrol: Just use whenever.
<norc> Seriously, you need to simplify things.
eregi has quit [Ping timeout: 244 seconds]
nofacade has joined #ruby
<norc> nocontrol: whenever, rails runner - that is all you need to make this happen.
<norc> nocontrol: Further assistance you can find in #rubyonrails - I gotta catch a train now.
uglybandersnatch has quit [Ping timeout: 244 seconds]
<nocontrol> norc: I changed it back to threads with net-ping https://github.com/chrisvel/networkify/blob/master/app/services/networkify_service.rb
<norc> nocontrol: you need to protect your hash against mutual access with a mutex.
shanemcd has quit [Remote host closed the connection]
mary5030 has joined #ruby
<norc> Anyway Im gone for an hour.
vasilakisfil__ has joined #ruby
dhollinger has joined #ruby
ss_much has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
shanemcd has joined #ruby
<nocontrol> norc: thank you
antgel has quit [Ping timeout: 276 seconds]
vasilakisfil_ has quit [Ping timeout: 240 seconds]
shanemcd has quit [Remote host closed the connection]
kies^ has joined #ruby
platzhirsch has left #ruby [#ruby]
norc has quit [Ping timeout: 252 seconds]
jeanlinux has joined #ruby
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Internet1riend has joined #ruby
rdavila has joined #ruby
infra-red has quit [Remote host closed the connection]
zast has joined #ruby
pandaant has joined #ruby
InternetFriend has quit [Ping timeout: 240 seconds]
shanemcd has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
B1n4r10 has quit [Ping timeout: 260 seconds]
Scott2619 has joined #ruby
<Scott2619> Hi Can somebody help me please
<Scott2619> I am trying to open 2 files one with keywords and one with a list of product numbers and descriptions
<Scott2619> I want to see if one of the keywords are in the descriptions
<Scott2619> I have done this so far
kalopsian has joined #ruby
<Scott2619> but its not working as the description is always the same
DroidBurgundy has joined #ruby
anisha has quit [Quit: Leaving]
arup_r has joined #ruby
treehug88 has joined #ruby
nocontrol has quit []
norc has joined #ruby
norc is now known as Guest97962
Guest97962 is now known as norc
norc has quit [Changing host]
norc has joined #ruby
norc has joined #ruby
<norc> ast>> "$2147483648"
<ruby[bot]> norc: I have parsed your code, the result is at https://eval.in/528850
<norc> asm>> "$2147483648"
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/528851
shinnya has joined #ruby
<norc> asm>> $2147483648
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/528852
<norc> whops. :=
<norc> asm>> $2147483647
<norc> Silly timeouts. Nevermind this.
blackmesa has joined #ruby
hogetaro_ has joined #ruby
adgtl_ has joined #ruby
makenoise has joined #ruby
treehug88 has quit [Max SendQ exceeded]
<norc> I dont even know how I can debug this. It just crashes with a Ruby exception and no stack trace. :S
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eljimmy has joined #ruby
<norc> Mmm, well I think I nailed it down. Looks like it crashes during compilation.
<Scott2619> can anyone help or point me in the right direction please?
jeanlinux has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<volty> Scott2619: something like this: IO.readlines('keywords.txt').map(&:chomp) && IO.readlines('prods.txt').map { |ln| ln[/\w+$/].split }
<b|ackwolf> what is the space convention in ruby zen?
makenoise has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 248 seconds]
<Ox0dea> Two spaces. No hard tabs. No exceptions.
sonja has joined #ruby
Aviio has joined #ruby
<Scott2619> volty: I need it to print out the prnum of the line it matched also
<sonja> i have a regex problem
<yorickpeterse> b|ackwolf: triangular
<sonja> i'm trying to count the number of times vowels touch: http://i.imgur.com/hX4DAYB.png
<sonja> i expected an array of 4 and of 2. but it gave me 4 and 1
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> Scott2619: that should solve your prob. as for the your code you test with include? instead of regexp. so do regex or convert to array.
norc has quit [Ping timeout: 252 seconds]
<sonja> let me try
flughafen_ has joined #ruby
<volty> adding prnum, though it won't be a oneliner
jaruga has joined #ruby
<Scott2619> volty: that's find how do I add the prnum of the descripion it found?
blackgoat has joined #ruby
malcolmva has joined #ruby
<volty> go back to your code and instead if description.include? keyword do description =~ /\b#{keyword}/b/
<Scott2619> volty: fine*
<volty> s/if/of/
blackmesa has joined #ruby
neuraload has joined #ruby
eregi has joined #ruby
flughafen_ has quit [Ping timeout: 246 seconds]
aegis3121 has quit [Ping timeout: 240 seconds]
kies^ has quit [Ping timeout: 252 seconds]
treehug88 has joined #ruby
n008f4g_ has joined #ruby
aegis3121 has joined #ruby
_whitelogger_ has joined #ruby
<Ox0dea> Scott2619: https://eval.in/528853
voker57_ has joined #ruby
<Ox0dea> Something like that, anyway.
ddfreyne_ has joined #ruby
kalleth_ has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
jimeh has quit [Ping timeout: 264 seconds]
Eleeleth has quit [Ping timeout: 264 seconds]
deepak has quit [Ping timeout: 264 seconds]
_whitelogger has quit [Ping timeout: 264 seconds]
kellabyte has quit [Ping timeout: 264 seconds]
ramblinpeck has quit [Ping timeout: 264 seconds]
crayfishx has quit [Ping timeout: 264 seconds]
techietrash has quit [Ping timeout: 264 seconds]
heyimwill has quit [Ping timeout: 264 seconds]
knowtheory has quit [Ping timeout: 264 seconds]
Apocalypse has quit [Ping timeout: 264 seconds]
kellabyte has joined #ruby
Aviio has quit [Ping timeout: 264 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
cookiez has quit [Ping timeout: 264 seconds]
modin has quit [Ping timeout: 264 seconds]
ddfreyne has quit [Ping timeout: 264 seconds]
jevs has quit [Ping timeout: 264 seconds]
kapowaz has quit [Ping timeout: 264 seconds]
cookiez has joined #ruby
artmann has quit [Read error: Connection reset by peer]
Mekkis has quit [Read error: Connection reset by peer]
modin has joined #ruby
Eleeleth has joined #ruby
voker57 has quit [Read error: Connection reset by peer]
kalleth has quit [Read error: Connection reset by peer]
ohcibi has quit [Write error: Connection reset by peer]
nofacade has quit [Ping timeout: 264 seconds]
sgambino has quit [Ping timeout: 264 seconds]
ckrailo has quit [Ping timeout: 264 seconds]
krasnus has quit [Ping timeout: 264 seconds]
kellabyte has quit [Changing host]
kellabyte has joined #ruby
Apocalyp- has joined #ruby
ohcibi_ has joined #ruby
kellabyte has quit [Changing host]
kellabyte has joined #ruby
techietrash_ has joined #ruby
Eleeleth has quit [Changing host]
Eleeleth has joined #ruby
sgambino has joined #ruby
jimeh_ is now known as jimeh
Apocalyp- is now known as Apocalypse
deepak___ is now known as deepak
<adgtl> Is this correct way to spawn million threads in Ruby https://gist.github.com/2a07d5dd5a9ac727d8d4 ?
shanemcd has quit []
knowtheory_ is now known as knowtheory
johnny56 has joined #ruby
shanemcd has joined #ruby
ckrailo_ is now known as ckrailo
<apeiros> I'd use Array.new
unreal_ is now known as unreal
<adgtl> I am trying to run something similar as here https://gist.github.com/51e34e6c5feaa1e79b9c
crayfishx has joined #ruby
Mekkis_ has joined #ruby
<apeiros> and I'd also wonder why I'd have to spawn a million thread. as that almost certainly makes little to no sense.
<adgtl> apeiros: it never completes
<apeiros> it's quite possible that your OS says "no".
<adgtl> I have to reduce million number to like 10000, then yes
<apeiros> you'll have to set the limits of your OS appropriately. if it even allows limits that high.
kapowaz has joined #ruby
<adgtl> apeiros: on erlang, yes, it allows me to run million processes at once
<apeiros> well, I guess you've gotten an answer to your question?
<adgtl> apeiros: just POC.. wanted to know whether OS allows Ruby to spawn million threads
<apeiros> erlang doesn't use OS backed threads for its processes.
<adgtl> apeiros: nope.. wondering.. what's major difference there
<Scott2619> 0x0dea: thanks that works what is the first line doing? I have never seen it before?
<adgtl> apeiros: so you mean.. Ruby's threads are OS backed threads?
howdoi has quit [Quit: Connection closed for inactivity]
jeanlinux has joined #ruby
<apeiros> reading… how does it work. really, what's up today?
<apeiros> adgtl: read the backlog. I don't like to repeat myself.
iamdank is now known as Darkwater
jevs has joined #ruby
the-undefined_ has joined #ruby
infra-red has joined #ruby
jeanlinu_ has joined #ruby
<adaedra> apeiros: reading is so 20th century.
<apeiros> yeah. 2016 is the year of the goldfish.
<adaedra> >< ˚>
ramblinpeck has joined #ruby
<apeiros> »<<„°>
<arup_r> One more question, I didn't able to answer.. is "Give an example of a Ruby data type that is not normally thought of as an object, but supports the true statement "Everything in Ruby is an object." Accept that it's a true statement and support it with an example and remember case-sensitivity."
<arup_r> what should it be?
<arup_r> I need to know for future
evidex has quit [Quit: leaving]
<arup_r> I know the answr as `block` .. but the question i didn't get
<apeiros> "not normally". I guess I'm not in the target audience.
jaruga has quit [Quit: jaruga]
evidex has joined #ruby
jeanlinux has quit [Ping timeout: 244 seconds]
<apeiros> a block ain't an object. not even in ruby.
jeanlin__ has joined #ruby
symm- has joined #ruby
<apeiros> you can turn a block into an object using &blockarg syntax. but then it becomes a Proc.
baroquebobcat has quit [Ping timeout: 244 seconds]
* apeiros master pedant in training
<arup_r> yeah..
jeanlinu_ has quit [Ping timeout: 240 seconds]
<Ox0dea> I suspect that's the case-sensitivity they had in mind.
<Ox0dea> There's no Block class, for instance.
<arup_r> apeiros: you are in target audience .. haha
<arup_r> yeah, so what should be the reasoning.. ? That's why I was confused..
jaruga has joined #ruby
tjohnson has joined #ruby
<apeiros> every object can be used in conditional statements. every object is true-ish except nil & false. no idea which one they think is not normally thought of as an object.
<apeiros> a common mistake is to think 0, "", [] and/or {} are false-ish
<Ox0dea> arup_r: After some though, I bet they want you to focus on methods.
<Ox0dea> *thought
<volty> they are just nullish & emptish :)
<apeiros> and given some languages don't have numbers as proper objects, my guess would probably have been 0
<apeiros> but seriously, that question IMO sucks because it's highly subjective.
htmldrum has joined #ruby
rodfersou is now known as rodfersou|lunch
<Ox0dea> It's really not, though; they're either looking for the difference between "block" and "Proc" or "method" and "Method".
<apeiros> oh wait, "datatype". well… then numbers are probably not what they're looking for as those are used in most languages for conditionals.
<apeiros> Ox0dea: how do you figure?
<Ox0dea> apeiros: It feels like I'm applying common sense?
jeanlin__ has quit [Ping timeout: 248 seconds]
pandaant has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 244 seconds]
mjc_ has joined #ruby
<apeiros> IMO it makes little sense. but well, what do I know by which logic they consider something as "not normally considered an object".
<Ox0dea> Oh, yes, I see whence you're coming now; I guess they probably do have Fixnum and the like in mind.
antgel has joined #ruby
<apeiros> also I'm troubled by "supports the true statement" - what precisely is that supposed to mean? "is true-ish" is what I interpreted it as.
sneakerhax has quit [Ping timeout: 252 seconds]
<volty> >> nil.nil? "true-ish" : "false-ish"
<ruby[bot]> volty: # => /tmp/execpad-a18f347accef/source-a18f347accef:2: syntax error, unexpected ':', expecting keyword_end ...check link for more (https://eval.in/528865)
<Ox0dea> Well done.
<volty> >> nil.nil? ? "true-ish" : "false-ish"
<ruby[bot]> volty: # => "true-ish" (https://eval.in/528866)
jeanlinux has joined #ruby
<apeiros> eh, I'll remain at "this question sucks because subjective"
htmldrum has quit [Ping timeout: 252 seconds]
<volty> I didn't quite followed. going to try to catch up
<apeiros> next question probably is whether lambdas or procs are better.
diegoviola has joined #ruby
bronson has joined #ruby
mfaeh has quit []
m0rph has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Mattx has joined #ruby
hamed_r has joined #ruby
<Mattx> Hey guys! How do I print a Time in a different time zone?
jeanlinu_ has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<volty> "not normally considered an object", I hate these vague quantifiers. Or considered, or not considered. If there's normally, there should be also abnormally.
<Mattx> I want something like this, Time.parse("2016-03-02 13:31:06 -0300").to_zone "+5"
<volty> s/should be/must be/
<apeiros> Ox0dea: method/proc might fit the bill. it just feels pointless to think about them in a context related to conditions. assuming "supports true statement" is really "is true-ish"
kies^ has joined #ruby
kalleth_ is now known as kalleth
jeanlinux has quit [Ping timeout: 244 seconds]
<volty> "supports the true statement" does not has sense. "supports the frog's singing" could do well as well
rodolfowtf has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
infra-red has quit [Remote host closed the connection]
rodolfowtf has quit [Read error: Connection reset by peer]
<volty> subject, object, verb action. Who 'supports'?
heyimwill has joined #ruby
<volty> apeiros: on what are your comments? which source/text?
<volty> a book?
IrishGringo has quit [Ping timeout: 240 seconds]
m0rph has joined #ruby
cpup has quit [Ping timeout: 246 seconds]
m0rph has left #ruby [#ruby]
IrishGringo has joined #ruby
infra-red has joined #ruby
<Ox0dea> apeiros: Hm? I don't see how conditionals come into it.
cpup has joined #ruby
Guest63581 is now known as James
rodolfowtf has joined #ruby
<volty> could you be so kind and put a line about what's the topic/context ? (I apologize but really not sure if I am too tired | fuzzy)
James is now known as Guest89259
<arup_r> One more question: There are (at least) three different variations in the syntax for defining the when clauses of a case statement. (yes/no) .. I said no and it is wrong. lol .
<adgtl> Ruby threads are not OS threads, then why there is limit to number of threads it can run at at time?
Couch has quit [Ping timeout: 252 seconds]
<yorickpeterse> Ruby threads _are_ OS threads
<eam> adgtl: ruby threads are OS threads
<volty> could be ruby's own limit. have you found the upper limit?
<eam> at least, on modern rubies
<volty> 2.3 too?
mja has quit [Ping timeout: 248 seconds]
<yorickpeterse> The limit is there because of the Global Interpreter Lock
<volty> as I thought
<yorickpeterse> which exists to prevent shitty C code from wrecking everything
<ljames> what's the simplest way to enumerate through an Array, finding an element that meets a condition and get its index, followed by performing a second test starting the found index until the test succeeds and then stopping, returning a second index? optionally, drop items between those 2 indexes from the array. is there a simple way of doing this, or should I just each_with_index?
<eam> yorickpeterse: ruby has a limit? that's kinda odd
<yorickpeterse> eam: There's not a limit in the number of threads you can start
<yorickpeterse> However MRI can only run 1 Ruby thread at a time
<eam> oh, sure
<adaedra> ljames: should be doable combining some Array#index
infra-red has quit [Remote host closed the connection]
<Ox0dea> ljames: Perhaps you want the flip-flop operator?
<Ox0dea> (Sorry.)
<ljames> hmm
<eam> I think adgtl is actually running into OS thread limits (NPROC and the like)
<ljames> thanks adaedra, aegis3121. and flip flop might jsut work for it, thanks Ox0dea, will try
adgtl has joined #ruby
<eam> erlang doesn't actually use threads
adgtl has joined #ruby
adgtl has quit [Remote host closed the connection]
<adaedra> Ox0dea: haha, I was looking for this one the other day but couldn't remember the name, thanks
<aegis3121> First index, then a slice from there to the end to find the second?
_whitelogger_ has quit [Excess Flood]
_whitelogger has joined #ruby
<apeiros> Ox0dea: "which support the true statement"
<ljames> flip flop might just be the most elegant way to do this, thanks
<Ox0dea> apeiros: That's in reference to the statement that immediately follows about everything being an object in Ruby.
shanemcd has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.4]
<apeiros> Ox0dea: ooooh dear
<apeiros> I see
hanmac has quit [Ping timeout: 250 seconds]
<apeiros> is this just me as a non-native speaker or is that question awfully phrased?
<volty> me too, finally - behind arup_r's comments
eregi has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
<apeiros> Ox0dea: in that case, I'd throw in Class/Module into the mix. similarly uncommon as proper objects.
krasnus has joined #ruby
<volty> neither Ox0dea is infallible :)
adgtl has quit [Remote host closed the connection]
<Ox0dea> apeiros: I do concede that it's a shitty question, but it does strike me as pretty obvious that they're referring to numbers being objects in Ruby.
the_drow has joined #ruby
<apeiros> so IMO all datatypes which are primitives in other languages (true/false/nil/fixnum), and all datatypes which are not commonly objects (class/module/method/proc) are eligible
<Ox0dea> Sure, but that the question explicitly mentions case-sensitivity seems like they're after the difference between, say, "integer" and "Integer".
augcesar has joined #ruby
hogetaro_ has quit [Read error: Connection timed out]
<arup_r> I am way too confused.. :)
<arup_r> hehe
<apeiros> I assumed that they referred to the answer being case sensitive. which would probably apply to all class names.
<arup_r> but thanks to all
evidex has quit [Remote host closed the connection]
<arup_r> I was checking why I got negetatives... and thought to ask you also if you understand what they asked me..
naftilos76 has joined #ruby
<Ox0dea> The questions you're being given are open to interpretation, and yet they want concrete answers.
<Ox0dea> It's like MyMathLab for Ruby. :(
Scott2619 has quit []
asahi has left #ruby [#ruby]
hogetaro has joined #ruby
<arup_r> haha
Xeago has quit [Remote host closed the connection]
<volty> a 'shortcut' for Array#include?, something operator-like ?
diegoviola has joined #ruby
paul98_ has joined #ruby
Snowy has quit [Quit: ragequit]
nando293921 has joined #ruby
paul98 has quit [Ping timeout: 260 seconds]
<apeiros> eam: told adgtl actually already. another OS limit for ruby threads are afaik filehandles (not sure, iirc it's either 1 or 2 handles per thread)
darkf has quit [Quit: Leaving]
aegis3121 has quit [Ping timeout: 250 seconds]
<Ox0dea> volty: Nope. In the past, people have tried to get an `in` operator like Python's, but it's never come to fruition.
<apeiros> volty: nope. not in standard ruby.
htmldrum has joined #ruby
shanemcd has joined #ruby
<Ox0dea> volty: ActiveSupport provides Object#in?, but I think it's ugly.
<volty> pity, thx.
<apeiros> given that in? has to always delegate, it's IMO an anti-pattern.
<volty> Ox0dea: I'm far away from Active, and will stay so for a while
<Ox0dea> volty: There are plenty of diamonds in that rough. :P
arup_r has left #ruby [#ruby]
<volty> where diamonds there are too many light paths :)
evenix has joined #ruby
<evenix> weird.. how come I'm getting a unexpected tLABEL error on jruby 1.7.12 ruby 1.9.3
<evenix> I thought tLABEL error were fixed from 1.9.2 to 1.9.3
<eam> apeiros: yeah. With 1m threads he's going to at least run into pid_max limits -- as that's generally set to 65k or so
hanmac has joined #ruby
<eam> tid is limited by pid_max
amclain has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
<eam> "why aren't my pids ever more than 5 digits wide" etc
KensoDev has joined #ruby
stannard has quit [Remote host closed the connection]
marxarelli has joined #ruby
<apeiros> eam: interesting. good to know.
IrishGringo has quit [Ping timeout: 268 seconds]
jottr_ has joined #ruby
<apeiros> evenix: do you expect an answer from the info you've given?
aclearman037 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shanemcd has quit [Remote host closed the connection]
momomomomo has joined #ruby
stannard has joined #ruby
vasilakisfil__ has quit [Quit: Konversation terminated!]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<evenix> apeiros: what additional information do you need?
krz has quit [Ping timeout: 276 seconds]
rodfersou|lunch has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 248 seconds]
<evenix> I made it pretty straightfoward
aufi has quit [Ping timeout: 252 seconds]
<evenix> what's a tLabel? e.g: def get_user_profile(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
rodfersou|lunch has joined #ruby
<evenix> what error I'm getting? syntax error, unexpected tLABEL
<evenix> what else can I add @apeiros feel free to share
<evenix> because I don't see what else you expect my answer to have
<evenix> question*
[Butch] has joined #ruby
idefine has joined #ruby
<Ox0dea> evenix: The interpreter you're using doesn't support keyword arguments.
Uber|Dragon has joined #ruby
B1n4r10 has joined #ruby
<evenix> 0x0dea: Thanks. You mean my version of jruby? I looked into it and it seem that jruby 1.7.12 using >=1.9.3 is supposed to have an update that fixes it :/
benlieb has joined #ruby
eregi has joined #ruby
<evenix> Maybe I can try to update the ruby -v of my interpreter? .. it seem that the app was set to use 1.9.3
<Ox0dea> evenix: Keyword arguments is a 2.0+ thing.
<apeiros> evenix: with syntax errors? always code.
<apeiros> but I see you & Ox0dea already figured
<evenix> Ox0dea: Ok thanks.
<evenix> apeiros: yes thx
jmignault has quit [Ping timeout: 252 seconds]
niksrc has joined #ruby
Rodya_ has joined #ruby
rodolfowtf has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
rodolfowtf has joined #ruby
TomPeed has quit [Read error: Connection reset by peer]
Gasher has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
fullofca_ has joined #ruby
Ishido has joined #ruby
openstruct has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 244 seconds]
justbleed has joined #ruby
joonty has quit [Ping timeout: 260 seconds]
justbleed is now known as TomPeed
shanemcd has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
momomomomo has quit [Quit: momomomomo]
the_drow has quit [Quit: This computer has gone to sleep]
morbid_ape has joined #ruby
<morbid_ape> hi everyone burn all jews in oven
<morbid_ape> death to infidels
<havenwood> !troll morbid_ape
morbid_ape was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
Morrolan has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
Morrolan has joined #ruby
zast has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<Aviio_> oh wow, im super trolled right now
JohnBat26 has joined #ruby
<Ox0dea> Aviio_: Did the bad man rustle your Jonathans?
Aviio_ has quit [Read error: Connection reset by peer]
czerasz has quit [Ping timeout: 250 seconds]
baroquebobcat has joined #ruby
Ishido has quit [Remote host closed the connection]
Aviio has joined #ruby
<Aviio> Super rustled
<Aviio> I thought this was a safe space
<Aviio> [Triggered]
makenoise has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
krobzaur has joined #ruby
baroquebobcat has joined #ruby
Ishido has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
<adaedra> Aviio: it's ok, it's gone now
idefine has quit [Remote host closed the connection]
shanemcd has quit [Remote host closed the connection]
shanemcd has joined #ruby
hiljusti has joined #ruby
shanemcd has quit [Remote host closed the connection]
Ishido has joined #ruby
Guest89259 is now known as James
shanemcd has joined #ruby
James is now known as Guest58624
momomomomo has joined #ruby
troulouliou_div2 has joined #ruby
rodfersou|lunch has quit [Quit: leaving]
rodfersou has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
m0rph has joined #ruby
harryh has quit [Read error: Connection reset by peer]
malconis has joined #ruby
crystal77 has joined #ruby
blandflakes has joined #ruby
m0rph has left #ruby [#ruby]
nando293921 has quit [Quit: Lost terminal]
DexterLB has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
eurialo has quit [Ping timeout: 276 seconds]
DexterLB has joined #ruby
B4daBing73 has joined #ruby
aclearman037 has joined #ruby
f4cl3y has quit [Ping timeout: 246 seconds]
Oog has joined #ruby
Foren has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 268 seconds]
B4daBing73 has quit [Client Quit]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiljusti has quit [Ping timeout: 252 seconds]
humblespoon has joined #ruby
nerium has quit [Quit: nerium]
<humblespoon> I'm trying to initialize some instance variables but I'm not sure what I'm doing wrong. They are coming out nil https://eval.in/528915
sonja has quit []
JohnBat26 has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
JohnBat26 has joined #ruby
stannard has quit [Remote host closed the connection]
gizmore has joined #ruby
thevaliantx has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
dhollin3 has joined #ruby
firstdayonthejob has joined #ruby
dhollinger has quit [Ping timeout: 244 seconds]
<ddv> humblespoon, because in_words is an instance method
jxs_ has joined #ruby
<kgirthofer> hey all - I'm updating an old gem on a new machine, and I went t hrough and updated all the names and everything, and now when I run gem build gem_name.gemspec it is erroring out that it cant find the old named items... where am I missing?
<Ox0dea> norc: I am. What news?
<humblespoon> ddv: thanks
kgirthofer has joined #ruby
stannard has joined #ruby
<norc> Ox0dea, are you around?
<ddv> humblespoon, you are not creating an instance
<humblespoon> ddv: oooohhh. Ok I think I see what you mean
norc has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
<kgirthofer> While executing gem ... (Gem::InvalidSpecificationException)
<kgirthofer> ["lib/old_gem_name/chef.rb", "lib/old_gem_name/chef/version.rb",
<norc> Ox0dea, I just found the time to debug the NREF bug (when $n with n > (2**30 + x)) and would like you to take a quick glance at my conclusion.
deuxclique has joined #ruby
atomical has joined #ruby
<kgirthofer> and that's after I moved them from lib/old_gem_name to lib/new_gem_name
dhollin3 has quit [Client Quit]
<Ox0dea> norc: What's the bug? I couldn't get it to cause a crash.
stannard has joined #ruby
makenoise has quit [Remote host closed the connection]
dougsko has joined #ruby
deuxclique has quit [Read error: Connection reset by peer]
<Ox0dea> kgirthofer: You've got stale files still in git.
deuxclique has joined #ruby
<norc> Ox0dea, let me find the most generic way to provoke this error.
pdoherty has joined #ruby
momomomomo has quit [Quit: momomomomo]
<Ox0dea> norc: It only ever causes the parser to emit a warning, as best I can tell.
deuxclique has quit [Remote host closed the connection]
<norc> Ox0dea, screw it. Just execute $1073741824
douglascorrea has joined #ruby
<norc> Ox0dea, what architecture are you on?
Oog has quit []
<Ox0dea> x86-64.
<norc> MRI 2.3.0 ?
<norc> OSX/Linux?
vikas027 has joined #ruby
<Ox0dea> Hey, yeah, that is an error.
deuxclique has joined #ruby
<norc> ;)
amargherio has joined #ruby
<norc> this is basically what triggers the error (and why you dont get to see a stack trace)
binaryplease has joined #ruby
<norc> It happens during compilation at
vikas027 has left #ruby [#ruby]
jeanlinu_ has quit [Remote host closed the connection]
<Ox0dea> norc: It can't be rescued...
jeanlinux has joined #ruby
<norc> Yup.
shanemcd has quit [Remote host closed the connection]
<norc> Ox0dea, remember that this is still during compilation so things tend to be fatal there.
<norc> Ox0dea, as far as I can tell is that https://github.com/ruby/ruby/blob/trunk/parse.y#L7814 this is just wrong.
<norc> Simply because the N of your reference gets lshifted twice.
Aviio has quit [Read error: No route to host]
<norc> before being passed to FIX2INT
vdamewood has joined #ruby
<norc> or rather it gets lshifted already before being passed.
<Ox0dea> norc: Gotta love the comment.
<Ox0dea> You can tell they were like, "Should we even bother?"
atmosx has joined #ruby
<norc> Heh.
<norc> I was actually surprised to find a comment at all.
<Ox0dea> It does look like some architectures are getting snubbed.
<Ox0dea> They only have access to half as many numeric variables as they ought to.
jaruga has quit [Quit: jaruga]
<dougsko> anyone have experience with the parallel gem? im trying to get a simple cummulative sum working but i keep getting the wrong answer. this example demonsrtates the problem: https://gist.github.com/anonymous/021b1d3cc9509b8d8c14
[Butch] has quit [Quit: I'm out . . .]
kalopsian has joined #ruby
jeanlinux has quit [Ping timeout: 248 seconds]
<norc> Ox0dea, most annoying part was figuring out which damn code actually raised that error
shanemcd has joined #ruby
joonty has joined #ruby
shadoi has joined #ruby
<Ox0dea> norc: That damned "%s" for "big" and "small".
Blaguvest has joined #ruby
<norc> Ox0dea, indeed. I was staring at my damn screen for like 5 minutes when I could not find the "too small to converto to `int'" string
volty has quit [Quit: Konversation terminated!]
<norc> But plenty such strings for other types like unsigned int and what not.
eric2 has joined #ruby
spider-mario has joined #ruby
skade has joined #ruby
<norc> Ox0dea, considering the "do as others do" this significantly lowers the bar for contributors though. "Do whatever you fancy, and use macros. Lots of macros"
jeanlinux has joined #ruby
<Ox0dea> norc: And mix tabs and spaces however the guy before you did. :(
<norc> set ts=8
<norc> and be done
AlexRussia has quit [Ping timeout: 260 seconds]
<norc> ;)
kalopsian has quit [Ping timeout: 240 seconds]
<norc> Ox0dea, I loved whitespace mixing in Python. Had one nasty one that actually parsed and executed without an error - except the behavior was just completely buggy.
joonty has quit [Ping timeout: 246 seconds]
<Ox0dea> norc: I could swear the Ruby source files used to contain modelines.
eric2 has quit [Quit: WeeChat 1.4]
xMopxShell has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
<norc> Ox0dea - Im guessing the reason you do not see any is emacs users. They keep deleting vim modelines for giggles, and vim users do the same for emacs modelines.
<Ox0dea> norc: Ha. That'd certainly do it.
elifoster has joined #ruby
* norc wishes Ruby had MSVC project files
<norc> Perhaps with QMake!
djbkd has joined #ruby
saneax is now known as saneax_AFK
<norc> kgirthofer, have you committed the rename change to git?
rodolfowtf has quit [Read error: Connection reset by peer]
vdamewood has quit [Ping timeout: 264 seconds]
* norc is just guessing that you used the bundle template that uses `git ls-files' for spec.files
Rodya_ has quit [Remote host closed the connection]
<norc> kgirthofer, of course sharing the gemspec would be the best
openstruct has joined #ruby
Rodya_ has joined #ruby
AlexRussia has joined #ruby
dionysus69 has quit [Remote host closed the connection]
vdamewood has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
PaulePanter is now known as PaulePanetr
PaulePanetr is now known as PaulePanter
bronson has joined #ruby
rodolfowtf has joined #ruby
douglascorrea has quit [Remote host closed the connection]
rodolfowtf has quit [Max SendQ exceeded]
douglascorrea has joined #ruby
ironcame1 is now known as ironcamel
shellfu has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
Rodya_ has quit [Ping timeout: 250 seconds]
Guest34101 has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
ReK2GnULinuX has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
elifoster has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 240 seconds]
shanemcd has quit [Remote host closed the connection]
ReK2 has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
infra-red has joined #ruby
blackmesa has joined #ruby
ta__ has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
cassioscabral has joined #ruby
vdamewood has quit [Quit: Life beckons.]
niksrc has quit [Quit: Leaving]
jeanlinux has quit [Remote host closed the connection]
kuroro has left #ruby [#ruby]
damonkelley has joined #ruby
cassioscabral has quit [Client Quit]
jeanlinux has joined #ruby
<shellfu> Question, in trying to stick with single responsibility I am trying to determine the following: In a method that queries a database, the query hits many tables. Should the query be broken into small methods like, fetch_user, fetch_id, and assemble in ruby? Granted the method as it stands only performs a query. However, I am trying to determine where to draw the line.
rodolfowtf has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
rodolfowtf has quit [Max SendQ exceeded]
Guest58624 is now known as James
[Butch] has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
fullofca_ has quit [Remote host closed the connection]
James is now known as Guest74980
Timberwo|f has joined #ruby
hxegon has quit [Ping timeout: 244 seconds]
<apeiros> shellfu: depends on the details. but usually it's not a problem to write an sql query touching multiple tables.
<apeiros> and if it's a common case, you can abstract the multiple tables away by using db views.
dlitvak has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
sneakerhax has joined #ruby
jeanlinux has quit [Ping timeout: 260 seconds]
fullofcaffeine has joined #ruby
rodolfowtf has joined #ruby
<norc> shellfu, personally I dislike having to deal with databases at all when writing Ruby code unless I absolutely cannot avoid it - so I always opt for an ORM to deal with the pain for me.
hiljusti has joined #ruby
j3r0 has quit [Quit: Leaving]
<shellfu> So single responsibility is still considered unbroken so long as the method only executes the query, and I'm parsing elsewhere. Ok cool. I just wanted to know where to call it good, as if I broke the query up I risk running a class over too many lines.
sepp2k has quit [Quit: Leaving.]
htmldrum has joined #ruby
<shellfu> Yeah I am trying to do away with this piece of the puzzle, but until this database is deprecated I cannot. I will look into ORMs per your suggestion. I just can assemble a query pretty quickly, but perhaps that is me being lazy.
shanemcd has joined #ruby
<openstruct> Speaking of DB views - this gem is golden for versioning them, https://github.com/thoughtbot/scenic
freerobby has joined #ruby
kalopsian has joined #ruby
hxegon has joined #ruby
hahuang61 has joined #ruby
freerobby has quit [Client Quit]
<kgirthofer> norc, thanks that was it - git.
<kgirthofer> didn't think about that - appreciated
sp4rrow has joined #ruby
sp4rrow has quit [Client Quit]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
htmldrum has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
sp4rrow has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
<Mattx> Hey guys! How do I print a Time in a different time zone?
hahuang61 has quit [Ping timeout: 248 seconds]
<Mattx> Or whatever else equivalent to this
<Mattx> I want something like this, Time.parse("2016-03-02 13:31:06 -0300").to_zone "+5"
troulouliou_div2 has joined #ruby
shanemcd has quit [Remote host closed the connection]
<openstruct> Time.new(2002, 10, 31, 2, 2, 2, "+02:00") #=> 2002-10-31 02:02:02 +0200
DroidBur_ has joined #ruby
shanemcd has joined #ruby
<openstruct> Or something like: Time.utc(2000,"jan",1,20,15,1) #=> 2000-01-01 20:15:01 UTC
shanemcd has quit [Remote host closed the connection]
inukshuk_ has joined #ruby
DroidBur_ has quit [Read error: Connection reset by peer]
<openstruct> The documentation for Time is pretty thorough.
kalopsian has quit [Quit: Lost terminal]
sarlalia1 has quit [Quit: WeeChat 0.4.2]
sarlalia1 has joined #ruby
<openstruct> Why use a gem when Ruby can do it?
<drbrain> Time can convert from ENV['TZ'] to UTC
<drbrain> it can't convert to arbitrary time zones in a safe way
<openstruct> Gotcha - I've only ever converted to UTC.
binaryplease1 has joined #ruby
DroidBurgundy has quit [Ping timeout: 240 seconds]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
binaryplease1 has quit [Client Quit]
<drbrain> If you're OK with setting ENV['TZ'] to the time zone you need then ruby can do it
deuxclique has quit [Remote host closed the connection]
nullwarp has joined #ruby
binaryplease1 has joined #ruby
y2mq37 has joined #ruby
nullwarp has quit [Client Quit]
binaryplease has quit [Ping timeout: 244 seconds]
pdoherty has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 276 seconds]
shanemcd has joined #ruby
maximski has quit []
B1n4r10 has joined #ruby
PlasmaStar has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nettoweb has joined #ruby
baweaver has joined #ruby
jenrzzz has joined #ruby
spider-mario has quit [Remote host closed the connection]
blandflakes has joined #ruby
spider-mario has joined #ruby
hamed_r has quit [Quit: Leaving]
atmosx has quit [Quit: This is aparting message!]
PlasmaStar has joined #ruby
ur5us has joined #ruby
nullwarp has joined #ruby
nullwarp has quit [Client Quit]
joonty has joined #ruby
pawnbox has quit [Remote host closed the connection]
Guest34101 has joined #ruby
pawnbox has joined #ruby
relic has joined #ruby
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
<relic> well.....this is boring
pawnbox has quit [Remote host closed the connection]
<Uber|Dragon> lol true
relic has quit [Client Quit]
pawnbox has joined #ruby
<Uber|Dragon> I guess everyone is happyily testing
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drbrain> or deploying
sarlalia1 has left #ruby ["WeeChat 0.4.2"]
jenrzzz has quit [Quit: leaving]
joonty has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
b|ackwolf has quit [Ping timeout: 246 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
baweaver has quit [Remote host closed the connection]
infra-re_ has joined #ruby
codecop has joined #ruby
BtcBen has joined #ruby
ramfjord has joined #ruby
infra-red has quit [Ping timeout: 248 seconds]
infra-red has joined #ruby
relic has joined #ruby
<norc> Uber|Dragon, I wish I could even test this damn library Im writing. :(
<relic> whats it for?
sauvin has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
<norc> relic, it interfaces with telco equipment to do magic.
fullofcaffeine has quit [Remote host closed the connection]
infra-re_ has quit [Ping timeout: 248 seconds]
anisha has joined #ruby
<relic> ah
relic has quit [Quit: WeeChat 1.4]
Dimik has quit [Ping timeout: 268 seconds]
<norc> And I think I need to rewrite some parts of it to make mocking even possible.
sp4rrow has joined #ruby
snockerton has joined #ruby
bronson has quit [Remote host closed the connection]
<snockerton> anyone know if it's possible to set pry-remote binding IP to something other than 127.0.0.1 so it's truly remote?
fullofcaffeine has joined #ruby
s2013 has joined #ruby
<norc> snockerton, from the looks of it just pass a different host/port to remote_pry?
rdark has quit [Ping timeout: 252 seconds]
jenrzzz_ has joined #ruby
Es0teric has joined #ruby
binaryplease1 has quit [Ping timeout: 244 seconds]
<drbrain> snockerton: looks like --server=
pdoherty has joined #ruby
bronson has joined #ruby
<drbrain> --help should show it
<snockerton> yea i saw the --help
jenrzzz has quit [Ping timeout: 244 seconds]
<snockerton> for the client
binaryplease1 has joined #ruby
b|ackwolf has joined #ruby
<snockerton> but binding.remote_pry in my code needs an arg or something
<norc> snockerton, look at the link I showed you...
* norc sighs
<snockerton> yea trying that
<snockerton> sry
<snockerton> just noticed it was a Server object
<norc> snockerton, and technically its object.remote_pry (as you can see the method is defined on class Object)
<norc> Which might be important to notice since you can just pry into objects directly too.
<snockerton> ah interesting
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
supplication has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
infra-re_ has joined #ruby
baroquebobcat has joined #ruby
Guest34101 has quit [Ping timeout: 276 seconds]
infra-red has quit [Ping timeout: 244 seconds]
TomyLobo has joined #ruby
j0n3 has joined #ruby
Rodya_ has joined #ruby
ljames has quit []
Guest74980 is now known as James
emq has quit [Quit: quit]
James is now known as Guest85255
jenrzzz_ has quit [Ping timeout: 264 seconds]
infra-red has joined #ruby
Mattx has quit [Quit: Leaving]
infra-re_ has quit [Ping timeout: 250 seconds]
Es0teric has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
troulouliou_div2 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
mfb2 has joined #ruby
trinaldi has quit [Quit: WeeChat 1.5-dev]
mfb2 has quit [Client Quit]
nb_bez___ has joined #ruby
openstruct has quit [Remote host closed the connection]
Vingador has quit [Ping timeout: 260 seconds]
awe__ has joined #ruby
awe__ has quit [Max SendQ exceeded]
openstruct has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
mhb has quit [Ping timeout: 276 seconds]
sgambino has joined #ruby
wald0 has joined #ruby
openstruct has quit [Ping timeout: 240 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
treehug88 has joined #ruby
FooMunki has quit [Quit: FooMunki]
last_staff has joined #ruby
FooMunki has joined #ruby
makenoise has joined #ruby
pawnbox has quit [Remote host closed the connection]
<hanmac> "Members of Congress did something almost unheard of at Tuesday’s hearing on the brewing battle over encryption between Apple and the FBI: their job." XD http://www.theguardian.com/commentisfree/2016/mar/01/congress-showed-willing-fight-fbi-encryption-finally
mhb has joined #ruby
jenrzzz has quit [Quit: leaving]
makenoise has quit [Ping timeout: 240 seconds]
infra-red has quit []
jenrzzz has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
joonty has joined #ruby
dhollinger has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
joonty has quit [Ping timeout: 252 seconds]
shanemcd has quit [Remote host closed the connection]
QORRiE has joined #ruby
dlitvak has quit [Remote host closed the connection]
nerium has joined #ruby
shanemcd has joined #ruby
supplication has joined #ruby
dlitvak has joined #ruby
patrick99e99 has joined #ruby
shellfu has quit [Quit: Lost terminal]
baweaver has joined #ruby
fullofcaffeine has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
lvn has joined #ruby
Ilgazer has joined #ruby
decoponyo has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
decoponio has quit [Ping timeout: 246 seconds]
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
baweaver has joined #ruby
Guest88888 is now known as C0deMaver1ck
hahuang61 has joined #ruby
jeanlinux has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
circ-user-hoVeW has joined #ruby
<Ilgazer> do you have using sinatra?
jenrzzz has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
duckpupp1 has quit [Ping timeout: 268 seconds]
shanemcd has quit [Remote host closed the connection]
nettoweb has joined #ruby
schickung has joined #ruby
<Ilgazer> HEY
dionysus69 has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 264 seconds]
Guest34101 has joined #ruby
lemur has joined #ruby
Ilgazer has left #ruby ["Konversation terminated!"]
agent_white has joined #ruby
djbkd has joined #ruby
idefine has joined #ruby
<patrick99e99> Hey ruby friends... I am a little confused about something.. I've got some xml that has some unicode characters that I need to remove.. and I am a little confused.. if I see \u0034 .. how do I know if that number is hex or oct ?
<patrick99e99> will \u always be hex?
<Ox0dea> Yes.
<apeiros> yes
<shevy> u will always be my hex!
n008f4g_ has quit [Ping timeout: 248 seconds]
lemur has quit [Ping timeout: 250 seconds]
<hanmac> XD
<patrick99e99> U+omg would be oct?
<Ox0dea> Codepoints are always expressed in hexadecimal.
Guest34101 has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
gizmore has quit [Ping timeout: 264 seconds]
Guest85255 is now known as James
James is now known as Guest14285
aef has quit [Remote host closed the connection]
rodferso1 has joined #ruby
trosborn has joined #ruby
rodfersou has quit [Ping timeout: 260 seconds]
<norc> apeiros, first time I worked with MySQL for real today. I ended discovering such a damn shitty quirk, it makes Oracle fun in comparison.
QORRiE has quit [Remote host closed the connection]
<norc> Did you know how MySQL works with collation and German unicode with unique constraints?
<norc> It is so laughable.
diego4 has joined #ruby
diego4 has quit [Changing host]
diego4 has joined #ruby
davejlong has joined #ruby
<tobiasvl> MySQL is horrible
SCHAAP137 has joined #ruby
Snowy has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Ping timeout: 240 seconds]
<apeiros> norc: do tell?
<apeiros> been a while since I used mysql
<norc> apeiros, plain database with a table with a unique varchar column. insert "ß" and "ss" and watch the unique violation error throw into your face.
<norc> This is with the default utf8 setting.
evenix has joined #ruby
<norc> Or it was "ß" and "s" - cant remember. Either way, its downright horrible.
<hanmac> norc it depends on what collation you use ... there is a difference between "unicode" and "general" ...
<norc> hanmac, that particular bit is collated the same with both utf8_unicode_ci and utf8_general_ci
<norc> hanmac, funny eh?
spiette has joined #ruby
sgambino has joined #ruby
<norc> You basically have to specifically set utf8_bin for collation.
eregi has quit [Ping timeout: 244 seconds]
<norc> hanmac, but good luck even figuring out that issue when you are importing a dump and it just tells you "duplicate error for key weise"
<hanmac> norc i know the problem
<hanmac> i prefer unicode if possible
<norc> hanmac, I would prefer the builtin utf8 charset had utf_bin by default since that has no impact on data.
fullofcaffeine has joined #ruby
anisha has quit [Quit: Leaving]
<shevy> "* vm_eval.c (vm_call0_body): calling method_missing method is method_missing()."
<shevy> hanmac translate this for me please
evenix has quit [Remote host closed the connection]
<apeiros> norc: hm, I'm actually not sure whether that's an insensible thing to do by mysql
blandflakes has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
antranigv has joined #ruby
makenoise has joined #ruby
<hanmac> shevy: https://github.com/ruby/ruby/commit/be8005b977a2044534cef7c468a07fbc34f6b3d2 this and next commit are about method_missing
davedev24 has joined #ruby
<norc> apeiros, what is your reasoning?
despai has joined #ruby
<apeiros> norc: it depends on details I'd have to research. but assume you had a case insensitive unique constraint, you'd want "foo" and "FOO" to collide too.
<apeiros> s/collide/cause a constraint violation/
gguggi has joined #ruby
steffkes has quit [Ping timeout: 250 seconds]
godzillaenlacasa has quit [Quit: ZZZZZ....]
aclearman037 has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> as said, it depends on specifics, but if the unique constraint is supposed to adhere to the collation, and the collation specifies ß and ss to be equivalent (which might be bad since there's words which have a differing meaning depending on whether written with ss or ß), then it's sensible (the collation defining ss and ß to be equivalent might not be sensible, but that's not mysql's fault)
baweaver has quit [Remote host closed the connection]
bubbys has quit [Ping timeout: 276 seconds]
aswen has joined #ruby
makenoise has quit [Ping timeout: 240 seconds]
<norc> apeiros, except their entire reasoning is based on DIN 5007-1 - which talks about *sorting* not lexical equivalence.
ldnunes has quit [Quit: Leaving]
<norc> apeiros, and all the other databases have this notion of collation too. its about how things are sorted depending on your locale generally. ;-)
<norc> I dont know.
ready has quit [Ping timeout: 276 seconds]
sp4rrow has joined #ruby
davejlong has quit [Remote host closed the connection]
morochena has joined #ruby
<apeiros> mhm
<apeiros> again, depends on the specifics. it might not be sensible :)
<apeiros> one thing I'd want to cause a violation: "ä" and "ä"
<apeiros> if you can't spot the difference - don't worry ;-) it's both "ä", but once C and once D normalization
davejlong has joined #ruby
<norc> apeiros, just google for "collation problem mysql" - the advantages gained (namely slightly faster searches involving collated characters) are hardly worth the trouble so many users get when dealing with unicode.
davejlong has joined #ruby
<antranigv> greetings all, I'm new here, interested in learning Ruby, mostly cz my fav open source project is in Ruby :))
<norc> apeiros, honestly I would simply normalize this on the application level.
<norc> apeiros, a full text search engine can take care of any collation
<norc> and at the database I just have plain codepoints.
<norc> Hello antranigv :)
<apeiros> the codepoints differ for those two ;-)
nando293921 has quit [Ping timeout: 268 seconds]
<norc> apeiros, not after my application normalizes the input
<norc> so the database only sees one variant.
<apeiros> [228] vs [97, 776]
trosborn has quit [Quit: trosborn]
<antranigv> can you guys help me doing this little script in Ruby, I just wanted to have a general idea https://bpaste.net/show/72c2e1029699
<antranigv> hey norc ! ^^
Coldblackice has joined #ruby
<apeiros> yeah, sure. if you can control all venues values come from.
jxs_ has quit [Remote host closed the connection]
<apeiros> and sadly I've had to deal with more situations where that was not the case than the other way round :-/ (because the db is such an awesome place to interface between apps… :<)
<norc> apeiros, I constantly get shit for one of my applications constantly breaking things at work - with comments like "you dont test your application"
<antranigv> or just any guide will be good as well, heh :))
s2013 has joined #ruby
<norc> apeiros, and the issue is always the tables my rails app has no control over, so I cannot have migrations for them - so I cannot test it. Having no control over all "venues" is no excuse for bad design.
<norc> It just calls for placing the control where its needed imho.
<apeiros> um…
<apeiros> you understood the point about "no control", yes?
fullofcaffeine has quit [Remote host closed the connection]
joonty has joined #ruby
kalleth has quit [Ping timeout: 260 seconds]
<norc> apeiros, well I understand your point about db being abused for interfacing between apps.
<norc> But in the end the real issue is that you dont encapsulate your data behind APIs.
kalleth has joined #ruby
<apeiros> how exactly do you encaspulate data behind APIs when those other apps do not use them?
<apeiros> and don't get me wrong - that's precisely what I'd want. but I have no say about that.
<norc> Honestly I feel perfectly where you are coming from, Im in the same boat at times.
<apeiros> so that part you said about "proper design" - I have to put that into the db at times. one of the ways being constraints.
<norc> apeiros, I should apologize. I recently wrote a huge stack of pl/perl functions for our postgresql database, because the admin from the other dept was an idiot and would not let me write custom hooks for our radius server, so Im basically processing logs in triggers as they come in..
<norc> So I should know better than to advertise perfect design.
<apeiros> :)
* apeiros does that too
joonty has quit [Ping timeout: 248 seconds]
<norc> Im sorry.
<apeiros> heh, I'm fully on your side. as said - don't get me wrong. IMO you're totally right.
<apeiros> but some places simply don't allow for it :(
shanemcd has joined #ruby
<apeiros> with the current project, we will actually try to enforce going via the API. but honestly, I think it's only a question of time until somebody says "but doing this 'simply' on the db is easier/faster/better"
ready has joined #ruby
jeanlinux has quit [Remote host closed the connection]
<norc> apeiros, every time its short sighted since it drastically reduces maintainability, testability and scalability.
Spami has quit [Quit: This computer has gone to sleep]
<norc> So they get the spotlight for finding a cheap solution, and you get the blame when it all blows up and you cant maintain your systems.
<norc> Its an ugly world.
mlehrer has quit [Ping timeout: 248 seconds]
BTRE has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
davejlong has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
douglasc_ has joined #ruby
<norc> We have this rushed Rails framework in use that we have hired an external dev company to help with - and honestly I already feel pretty embarassed about the code already, since it barely has tests, is just hacked together because well - results needed to be produced in short time.
shanemcd has quit [Ping timeout: 276 seconds]
<norc> Dont even want to show that code to them.
<norc> So yeah, when Im off the job I just dream of a better world. Maybe this normal at my age, I am relatively young. ;-)
dougsko has left #ruby [#ruby]
Cohedrin has joined #ruby
<apeiros> norc: precisely @ spotlight & blame
<apeiros> and same @ dream of a better world :D
supplication has quit [Ping timeout: 244 seconds]
douglascorrea has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
douglasc_ is now known as douglascorrea
f4cl3y has joined #ruby
deuxclique has joined #ruby
Blaguvest has quit []
fostertheweb has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
morochena has quit [Quit: Leaving...]
dlitvak has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dlitvak has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
davejlong has joined #ruby
sudoubuntu has quit [Ping timeout: 246 seconds]
fullofcaffeine has joined #ruby
BTRE has joined #ruby
johnmilton has quit [Ping timeout: 260 seconds]
<norc> apeiros, at times I wonder whether Im just better off looking for a different place to work at.
<norc> Though based on everything I have learned I should know that its very likely that most places work like that.
atomical_ has joined #ruby
trosborn has joined #ruby
zeroDivisible has joined #ruby
n008f4g_ has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
theunraveler has joined #ruby
idefine has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 244 seconds]
kirillzh has joined #ruby
benlieb has quit [Quit: benlieb]
kirillzh has quit [Client Quit]
queequeg1 has quit [Remote host closed the connection]
idefine has joined #ruby
last_staff has joined #ruby
kirillzh has joined #ruby
Guest14285 is now known as James
James is now known as Guest65615
eregi has joined #ruby
idefine has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
synthroid has quit []
hiljusti has quit [Ping timeout: 252 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
ta__ has quit [Remote host closed the connection]
moos3 has joined #ruby
spiette has left #ruby [":q!"]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diego4 is now known as diegoviola
circ-user-hoVeW has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
czerasz has joined #ruby
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
idefine has joined #ruby
baweaver has joined #ruby
Spami has joined #ruby
baweaver has quit [Remote host closed the connection]
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
leksster has quit [Ping timeout: 276 seconds]
idefine_ has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
idefine_ has quit [Remote host closed the connection]
idefine has joined #ruby
treehug88 has quit [Max SendQ exceeded]
s2013 has joined #ruby
harryh has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
leksster has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
ropeney has joined #ruby
davejlong has quit []
mdw has joined #ruby
Vingador has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
Spami has joined #ruby
LoneHerm_ has joined #ruby
tvw has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
idefine_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dragooon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
supplication has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 260 seconds]
trinaldi has joined #ruby
norc has quit [Ping timeout: 244 seconds]
volty has joined #ruby
dlitvak has quit [Remote host closed the connection]
jud has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
Dragooon has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
diego2 has joined #ruby
dlitvak has joined #ruby
joonty has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
idefine_ has quit [Remote host closed the connection]
sp4rrow has joined #ruby
diegoviola has quit [Ping timeout: 248 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has joined #ruby
Jardayn has quit [Ping timeout: 252 seconds]
mattwildig has joined #ruby
IrishGringo has joined #ruby
postmodern has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
Jardayn has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
hahuang61 has joined #ruby
Axy has quit [Ping timeout: 252 seconds]
diego2 is now known as diegoviola
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
unl0ckd has quit [Quit: Bye!]
snockerton has quit [Read error: Connection reset by peer]
thevaliantx has quit [Quit: Leaving]
theunraveler has quit []
Mia has quit [Ping timeout: 244 seconds]
Axy has quit [Client Quit]
workmad3 has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
uglybandersnatch has quit [Ping timeout: 240 seconds]
danjam has joined #ruby
leksster has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
amclain has quit [Ping timeout: 248 seconds]
workmad3 has quit [Read error: Connection reset by peer]
Noxilex has joined #ruby
pdoherty has quit [Ping timeout: 276 seconds]
trosborn has quit [Quit: trosborn]
baweaver has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
danjam1 has joined #ruby
<humblespoon> so I defined a method for Fixnum to convert numbers to words, but when I use a number that's 1 billion or larger, it says my method is not defined (possibly to do with the BigNum class?) I don't quite understand what's happening https://eval.in/529069
danjam has quit [Client Quit]
<humblespoon> and if I can get my method to work with BigNum easily
<apeiros> humblespoon: define it on Integer instead of Fixnum
workmad3 has joined #ruby
<apeiros> and yes, larger integers are Bignum, not Fixnum. but all are Integer.
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has quit [Ping timeout: 276 seconds]
<humblespoon> apeiros: awesome that worked! Thanks for explaining the difference :D
[Butch] has quit [Quit: I'm out . . .]
Spami has quit [Quit: This computer has gone to sleep]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
idefine has joined #ruby
f4cl3y has quit [Ping timeout: 248 seconds]
zenlot_away has joined #ruby
Guest34101 has joined #ruby
zenlot has quit [Ping timeout: 260 seconds]
<danjam1> humblespoon: if you wanted to get really crazy you could extend it to works on floats too and put the methods on Numeric :P
elifoster has joined #ruby
fostertheweb has joined #ruby
<humblespoon> danjam1: I'm a bit scared playing with more than one class at once @_@ haha
idefine has quit [Ping timeout: 276 seconds]
<humblespoon> danjam1: just getting the hang of this now
<danjam1> cool, looks like a fun project
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
mlehrer has joined #ruby
<humblespoon> danjam1: thanks, a bit time-consuming but satisfying to get it done haha
y2mq37 has quit [Ping timeout: 268 seconds]
Guest34101 has quit [Ping timeout: 276 seconds]
mustmodify has joined #ruby
<mustmodify> > puts 'hello'
<mustmodify> >> puts 'hello'
<ruby[bot]> mustmodify: # => hello ...check link for more (https://eval.in/529086)
dlitvak has left #ruby ["ta luego"]
<mustmodify> ok great. Can someone tell me why this is NOT matching? I'm feeling pretty stupid.
amclain has joined #ruby
<ruby[bot]> mustmodify: # => 0 (https://eval.in/529088)
<mustmodify> BAH
fostertheweb has quit [Ping timeout: 240 seconds]
<mustmodify> >> "+12345678901" =~ /\+\d{11}/
<apeiros> 0 means it did match
<apeiros> nil means no match
<mustmodify> apeiros: I got that
<mustmodify> back to the console to figure out what I messed up over here.
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mustmodify> >> sip_endpoint="+12345678901"; sip_endpoint =~ /\+1\d{11}/
<ruby[bot]> mustmodify: # => nil (https://eval.in/529090)
duckpupp1 has joined #ruby
Internet1riend has quit [Ping timeout: 240 seconds]
binaryplease1 has quit [Quit: WeeChat 1.4]
Guest65615 is now known as James
<mustmodify> oh
Snowy has quit [Quit: ragequit]
<mustmodify> d'Oh
binaryplease has joined #ruby
James is now known as Guest72839
<mustmodify> well, thanks for listening everyone. :P
<apeiros> I assume that "oh" & "d'oh" means you figured your mistake?
benlieb has joined #ruby
<mustmodify> yes. There's an extra number in my regex.
<mustmodify> I kept looking past it, I guess.
<apeiros> general tip: don't forget your anchors.
<mustmodify> apeiros: good advice. In this case I already know it's validated but I'll probably add them anyway.
sp4rrow has joined #ruby
mlehrer has quit [Ping timeout: 246 seconds]
merqlove has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirillzh has joined #ruby
Ishido has quit [Remote host closed the connection]
hiljusti has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
pdoherty has joined #ruby
idefine has joined #ruby
jenrzzz_ has joined #ruby
duckpupp1 has quit [Read error: Connection reset by peer]
<mustmodify> >> "a" !=~ /a/
<ruby[bot]> mustmodify: # => true (https://eval.in/529093)
<mustmodify> I would have expected that to be false...
amargherio has quit [Ping timeout: 250 seconds]
saneax_AFK is now known as saneax
BSaboia has joined #ruby
<apeiros> negated =~ is !~
<apeiros> not !=~
<apeiros> ast>> "a" !=~ /a/
<mustmodify> apeiros: OK, but then what does !=~ do? :P
<ruby[bot]> apeiros: I have parsed your code, the result is at https://eval.in/529094
<apeiros> guess why I did ^
idefine has quit [Remote host closed the connection]
Uber|Dragon has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
lvn has quit [Ping timeout: 276 seconds]
<drbrain> "a" !=~ /a/ is seen as ("a" != (~ /a/))
jenrzzz has quit [Ping timeout: 268 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
idefine has joined #ruby
Snowy has joined #ruby
deuxclique has quit [Remote host closed the connection]
nando293921 has joined #ruby
haylon has quit [Quit: WeeChat 1.4]
baweaver has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
mattwildig has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jenrzzz_ has quit [Ping timeout: 276 seconds]
idefine has quit [Remote host closed the connection]
moos3 has quit [Quit: leaving]
flappynerd has joined #ruby
<flappynerd> can I rescue multiple exception types with the same handler?
<flappynerd> e.g.
<flappynerd> rescue FooException, BarException => e
<flappynerd> or must I have a separate rescue line for each?
wald0 has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<apeiros> flappynerd: if you'd just tried that ;-)
intrigueD has joined #ruby
chouhoulis has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dgncn has quit [Quit: Leaving]
solocshaw has joined #ruby
coffeecupp has joined #ruby
last_staff has joined #ruby
damonkelley has quit [Quit: WeeChat 0.4.2]
Gasher has quit [Ping timeout: 276 seconds]
deuxclique has joined #ruby
<flappynerd> is there any reason I can't put a begin/rescue/end blog inside a rescue handler?
<flappynerd> e.g. I'd like to attempt to log some info about the exception, but if that logging in turn fails, I want to at least fail gracefully and not throw another exception
mattwildig has joined #ruby
rideh- has quit [Ping timeout: 248 seconds]
<apeiros> you can
Papierkorb has quit [Ping timeout: 248 seconds]
Papierkorb has joined #ruby
deuxcliq_ has joined #ruby
coffeecupp has quit [Client Quit]
<apeiros> >> x=nil; begin; raise "foo"; rescue => e; begin; raise "bar"; rescue => e; x = e; end; end; x
biberu has quit []
<ruby[bot]> apeiros: # => #<RuntimeError: bar> (https://eval.in/529097)
hxegon has quit [Ping timeout: 244 seconds]
rideh has joined #ruby
<flappynerd> ok cool
<flappynerd> I mean, I figured it didn't seem like it would be a problem, but might as well ask
spider-mario has quit [Remote host closed the connection]
<Ox0dea> >> [~//, $_='', ~//]
<ruby[bot]> Ox0dea: # => [nil, "", 0] (https://eval.in/529098)
<Ox0dea> That's fun.
symm- has quit [Ping timeout: 250 seconds]
flappynerd has left #ruby ["Leaving"]
trosborn has joined #ruby
deuxclique has quit [Ping timeout: 252 seconds]
Guest___ has joined #ruby
[gmi] has joined #ruby
Guest___ has quit [Remote host closed the connection]
idefine has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
eregi has quit [Ping timeout: 248 seconds]
jgpawletko has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
uglybandersnatch has quit [Ping timeout: 260 seconds]
[gmi] has quit [Client Quit]
Noxilex has quit [Ping timeout: 248 seconds]
zenlot_away is now known as zenlot
Gasher has joined #ruby
uglybandersnatch has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
makenoise has joined #ruby
ready has quit [Ping timeout: 248 seconds]
bjensen82 has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
<bjensen82> Heres something I dont understand... 1135.61 * 100 # => 113560.99999999999. Why?
makenoise has quit [Remote host closed the connection]
supplication has quit [Ping timeout: 248 seconds]
makenoise has joined #ruby
johnmilton has joined #ruby
aswen has quit [Quit: WeeChat 1.4]
pdoherty has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Remote host closed the connection]
<mustmodify> floats.
<mustmodify> they haunt us.
<bjensen82> it must be a bug, right?
mallu has joined #ruby
<bjensen82> 111.61 * 100 # => 11161.0 OK!
jenrzzz has joined #ruby
duckpuppy has joined #ruby
<Ox0dea> bjensen82: http://floating-point-gui.de/
kirillzh has joined #ruby
mary5030 has joined #ruby
<mallu> Can someone please help me ? http://pastebin.com/fc6tau9D
<ruby[bot]> mallu: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d8d06a6803b0463fc382
<ruby[bot]> mallu: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
mustmodify has left #ruby [#ruby]
baweaver has joined #ruby
Spami has joined #ruby
<Ox0dea> apeiros: Why not just have ruby[bot] post the raw link?
blackmesa has quit [Quit: WeeChat 1.4]
despai has quit [Quit: This computer has gone to sleep]
IrishGringo has quit [Ping timeout: 250 seconds]
hololeap has joined #ruby
Spami has quit [Client Quit]
mary5030 has quit [Ping timeout: 250 seconds]
hightower6 has joined #ruby
<trosborn> bjensen82: I’m not the most qualified to help you, but basically your problem is you are using each as an iterator when in fact is is an enumerator. if you want to do a nested loop I think you need to use something like a while loop.
deuxcliq_ has quit [Read error: Connection reset by peer]
<Ox0dea> mallu: ^
<hightower6> Hey, is there a way to achieve the effect of 'include', but include the module at a particular point in the ancestors chain, not at the end?
schickung has quit [Quit: schickung]
deuxclique has joined #ruby
<Ox0dea> hightower6: There's #prepend for sticking it at the front.
<bjensen82> trosborn: i think your referencing the wrong person :-)
<trosborn> oops I meant mallu hah
<trosborn> yeah
deuxclique has quit [Remote host closed the connection]
Guest72839 is now known as James
deuxclique has joined #ruby
atomical has joined #ruby
<Ox0dea> hightower6: And then there's this if you *really* want arbitrary module injection: https://github.com/banister/remix
<Ox0dea> (And can swallow having to drop back to 1.8 or so. :P)
hxegon_ has joined #ruby
James is now known as Guest83414
<hightower6> Ox0dea, right, but which array would I prepend to? When I call .include() in a class to include a module, the array with the list of ancestors is not obvious / explicitly used
<Ox0dea> mallu: I think you probably want #zip.
<Ox0dea> hightower6: Huh?
<hxegon_> If I want to check that something isn't 0, 0.0, '', or nil, is there a less magic/clearer way than #to_f#zero?
<Ox0dea> The return value of #ancestors is generated dynamically; modifying that Array in-place has no bearing on the actual hierarchy.
<hightower6> Ox0dea, the advice you gave me (.prepend) is for arrays, not for what I asked about
<Ox0dea> &ri Module#prepend @hightower6
<Ox0dea> Have faith, friend.
SCHAAP137 has quit [Remote host closed the connection]
nachoman has quit []
atomical_ has quit [Ping timeout: 244 seconds]
<hightower6> Ox0dea, cool, seems it's not there in 1.9.3 though. But using a newer ruby in my case isn't a problem so it'll work
<hightower6> Ox0dea, thanks++
Gasher has quit [Quit: Leaving]
toretore has joined #ruby
<Ox0dea> Happy to help.
<mallu> Ox0dea: Can you please elaborate on zip?
Uber|Dragon has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eregi has joined #ruby
<Ox0dea> mallu: Perhaps you should clarify what you're trying to do.
devbug has joined #ruby
<mallu> Ox0dea: I am trying to tag unique ID for each elements in an array
LoneHermit has joined #ruby
<Ox0dea> mallu: And the indices don't serve that purpose?
Vingador has quit [Ping timeout: 248 seconds]