endorama has quit [Remote host closed the connection]
ropeney_ has joined #ruby
darris_ is now known as darris
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
endorama has joined #ruby
jud has quit [Quit: Leaving]
yokel has quit [Ping timeout: 258 seconds]
cd has quit [Quit: cd]
bmurt has joined #ruby
gueorgui_ has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
gueorgui has quit [Ping timeout: 246 seconds]
istrasci has quit [Remote host closed the connection]
meinside has joined #ruby
drincruz has quit [Ping timeout: 246 seconds]
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
zacts has quit [Ping timeout: 240 seconds]
Secret-Fire has joined #ruby
yokel has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
Secret-Fire has joined #ruby
Rudd0 has quit [Remote host closed the connection]
<nakilon>
it is just because NaN by definition means that the value can't be determined so you can't say if it's equal to anything or not
teardown has joined #ruby
<nakilon>
not sure why INFINITY == INFINITY though
teardown has quit [Read error: Connection reset by peer]
<nakilon>
if they were equal then subtracting one from another had to be zero
yokel has quit [Ping timeout: 258 seconds]
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
yokel has joined #ruby
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
bruce_lee has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
teardown has joined #ruby
TCZ has quit [Quit: Leaving]
teardown has quit [Read error: Connection reset by peer]
alexherbo2 has quit [Ping timeout: 244 seconds]
bkuhlmann has joined #ruby
teardown has joined #ruby
teardown has quit [Read error: Connection reset by peer]
yokel has joined #ruby
iamse7en has joined #ruby
<havenwood>
nakilon: In the IEEE spec, positive infinity is represented by the 7f800000 hex bit pattern. So one infinity is the same as another, for a Float at least.
<havenwood>
nakilon: Quiet NaNs are hex bit patterns between 7FC00000 and 7FFFFFFF.
akem_ has joined #ruby
<havenwood>
Oh, wait, Ruby uses Float doubles.
<havenwood>
So infinity is 7FF0000000000000 and NaN is between 7FF8000000000000 and 7FFFFFFFFFFFFFFF.
akem has quit [Ping timeout: 256 seconds]
<havenwood>
Anyway, Floats are strange.
<havenwood>
I prefer not to use them since I typically don't do anything involving floating point operations.
<havenwood>
nakilon: The spec also says positive infinity plus negative infinity is NaN.
<havenwood>
iamse7en: Since it's JSON, just use JSON from the stdlib and leave Nokogiri out of it.
dan64 has quit [Ping timeout: 240 seconds]
<iamse7en>
I already have a bunch of existing code that uses .xpath to iterate throughout the document. If I use JSON, can I still use existing code or must I re-write it all
dan64- has joined #ruby
dan64- has quit [Remote host closed the connection]
<iamse7en>
They updated the API recently
<havenwood>
iamse7en: Then as go|dfish suggests, set Accept to application/xml.
BH23 has quit [Read error: Connection reset by peer]
Ediz has quit [Remote host closed the connection]
Ediz has joined #ruby
Ediz is now known as Guest16698
leitz has joined #ruby
Guest16698 has quit [Remote host closed the connection]
Guest16698 has joined #ruby
BlakSAM has quit [Ping timeout: 256 seconds]
BlakSAM has joined #ruby
lucasb has joined #ruby
<leitz>
Newbie question, getting a syntax error on ",". How do i do the insert with multiple value sets? It works with a single value pair. insert into countries (country_code, country_name) values (('gb', 'Great Britan'), ('de', 'Germany'));
<leitz>
Err...I should check the channel....
TCZ has joined #ruby
Guest16698 has quit [Remote host closed the connection]
Guest16698 has joined #ruby
yasumi2136 has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
akem has joined #ruby
yasumi2136 has quit [Client Quit]
cd has joined #ruby
yokel has joined #ruby
yasumi2136 has joined #ruby
yokel has quit [Ping timeout: 258 seconds]
ellcs has quit [Remote host closed the connection]
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
yasumi2136 has quit [Remote host closed the connection]
yasumi2136 has joined #ruby
yokel has joined #ruby
ujjain2 has joined #ruby
ellcs has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
kerframil has joined #ruby
yasumi2136 has quit [Remote host closed the connection]
yasumi2136 has joined #ruby
yokel has joined #ruby
dfucci has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
ruurd has joined #ruby
ellcs has quit [Ping timeout: 244 seconds]
yokel has quit [Ping timeout: 256 seconds]
yasumi2136 has quit [Remote host closed the connection]
BlakSAM has quit [Quit: leaving]
BTRE has quit [Remote host closed the connection]
BTRE has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata_ is now known as zapata
cthu| has joined #ruby
schne1der has joined #ruby
TCZ has quit [Quit: Leaving]
yokel has joined #ruby
andremedeiros has quit [Quit: ZNC 1.8.2 - https://znc.in]
andremedeiros has joined #ruby
gix has joined #ruby
alexherbo2 has joined #ruby
yokel has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Quit: WeeChat 2.9]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
ramfjord has joined #ruby
zacts has quit [Quit: leaving]
yokel has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 260 seconds]
imode has joined #ruby
Spitfire_ is now known as Spitfire
yokel has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
wildtrees has quit [Remote host closed the connection]
bmurt has joined #ruby
<jrhorn424>
Suppose I want to rescue multiple error. Will ruby rescue the most specific error, least specific error, or will it try to rescue in order? Example: `rescue NoMethodError, NameError, StandardError => e`. If the block throws other `StandardError`s, are they caught? If it throws `NameError`, will it be caught as `NameError` or `StandardError`?
wildtrees has joined #ruby
impermanence has joined #ruby
schne1der has quit [Ping timeout: 272 seconds]
yokel has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
MrCrackPot has joined #ruby
MrCrackPot has quit [Client Quit]
yokel has joined #ruby
ediz_ has joined #ruby
Guest16698 has quit [Ping timeout: 256 seconds]
zacts has joined #ruby
Technodrome has joined #ruby
rippa has joined #ruby
sepp2k has joined #ruby
yokel has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
ediz_ has quit [Read error: Connection reset by peer]
Ediz has joined #ruby
Ediz is now known as Guest12856
<adam12>
jrhorn424: AFAIK, they are tried in order without specificity. It would be up to you to set the specificity.
<adam12>
jrhorn424: I can't seem to find where `rescue` is defined, but looking at the instruction sequence generated by something like `begin; rescue NameError, Standarderror => e; end`, it just loops through the list of classes.
yokel has quit [Ping timeout: 240 seconds]
<adam12>
jrhorn424: In your example, I believe NoMethodError and NameError both inherit from StandardError, so you could in theory just `rescue => e` then `case e` if you had to do anything with a specific type of exception.
justache has quit [Read error: Connection reset by peer]
justache has joined #ruby
wildtrees has quit [Quit: Leaving]
bocaneri has quit [Read error: Connection reset by peer]
zacts has quit [Quit: leaving]
dfucci has quit [Ping timeout: 240 seconds]
go|dfish has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
go|dfish has joined #ruby
yokel has joined #ruby
jenrzzz has joined #ruby
wimpog has joined #ruby
<wimpog>
what's the difference between `rescue => e` and `rescue Exception => e`?
<jhass>
wimpog: rescue => e is equivalent to rescue StandardError => e
<wimpog>
jhass: so it captures more errors than `rescue Exception => e` ?
<jhass>
no, less, StandardError is below Exception in the hierarchy
<wimpog>
jhass: I see. So it is better to use `rescue Exception => e` if I want to capture more errors?
<jhass>
it's generally a smell, because there's quite some exceptions you generally don't want to catch and can make stopping your program difficult. Again reference above list for details
vondruch has quit [Ping timeout: 256 seconds]
<jhass>
I like being as specific as sensible, as it nicely documents which error cases I expect
<wimpog>
Thank you, jhass! I don't know yet what more specific should be, so I want to capture all and see how to make it more precise
yokel has joined #ruby
<jhass>
for developing/testing fine, for deployment I would highly recommend you to invest a) into a supervisor that can restart your program on crashes, if it's long running (say a webserver) b) into an error monitoring solution (sentry, honeybadger etc)
<jhass>
and then just deploy with the most specific error cases you know and know how to handle and just let it crash and report for the stuff you didn't expect yet
impermanence56 has joined #ruby
skape has joined #ruby
impermanence44 has joined #ruby
impermanence56 has quit [Client Quit]
impermanence44 has quit [Client Quit]
impermanence40 has joined #ruby
<wimpog>
thanks, jhass
akem has quit [Quit: Leaving]
dionysus69 has joined #ruby
impermanence has quit [Ping timeout: 244 seconds]
Guest12856 has quit [Read error: Connection reset by peer]
Ediz has joined #ruby
Ediz is now known as Guest40325
yokel has quit [Ping timeout: 272 seconds]
yokel has joined #ruby
wimpog has quit [Quit: wimpog]
zacts has joined #ruby
justache has quit [Remote host closed the connection]
yokel has quit [Ping timeout: 272 seconds]
kerframil has quit [Ping timeout: 272 seconds]
justache has joined #ruby
<jrhorn424>
Thank you adam12! Good point about `case`. Cheers
TCZ has joined #ruby
kaleido has quit [Remote host closed the connection]
wildtrees has joined #ruby
dionysus69 has quit [Remote host closed the connection]
kaleido has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
yokel has joined #ruby
supercoven has quit [Ping timeout: 256 seconds]
yokel has quit [Ping timeout: 256 seconds]
cnsvc has joined #ruby
yokel has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Guest40325 has quit [Read error: Connection reset by peer]
Guest40325 has joined #ruby
kerframil has joined #ruby
schne1der has joined #ruby
imode has quit [Ping timeout: 246 seconds]
yokel has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
yokel has quit [Ping timeout: 265 seconds]
akem has joined #ruby
DTZUZU_ has quit [Read error: Connection reset by peer]
zacts has quit [Ping timeout: 246 seconds]
DTZUZU has joined #ruby
yokel has joined #ruby
dfucci has joined #ruby
yokel has quit [Ping timeout: 256 seconds]
zacts has joined #ruby
Nerium has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
ellcs has joined #ruby
elcuervo has quit [Ping timeout: 258 seconds]
Nerium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zacts has quit [Quit: leaving]
zacts has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wildtrees has quit [Quit: Leaving]
bmurt has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ule has quit [Ping timeout: 256 seconds]
ule has joined #ruby
yokel has joined #ruby
Guest40325 has quit [Read error: Connection reset by peer]
Ediz has joined #ruby
Ediz is now known as Guest35032
sgen has joined #ruby
ur5us has joined #ruby
leitz has quit [Quit: Leaving]
yokel has quit [Ping timeout: 265 seconds]
TCZ has quit [Quit: Leaving]
yokel has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
yokel has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
roshanavand has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 244 seconds]
roshanavand_ is now known as roshanavand
impermanence has joined #ruby
schne1der has quit [Ping timeout: 272 seconds]
gix has quit [Ping timeout: 256 seconds]
gix has joined #ruby
impermanence40 has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
yokel has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
yokel has joined #ruby
zacts has quit [Quit: leaving]
dfucci has quit [Ping timeout: 264 seconds]
zacts has joined #ruby
alexherbo20 has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Ping timeout: 264 seconds]
alexherbo20 is now known as alexherbo2
ellcs has quit [Ping timeout: 244 seconds]
yokel has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
sgen has quit [Ping timeout: 260 seconds]
akem_ has joined #ruby
akem has quit [Ping timeout: 256 seconds]
zacts has quit [Quit: leaving]
zacts has joined #ruby
dviola has quit [Quit: WeeChat 2.9]
akem_ has quit [Ping timeout: 272 seconds]
zacts has quit [Quit: leaving]
zacts has joined #ruby
roshanavand has quit [Remote host closed the connection]
sh7d has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo2 has joined #ruby
yokel has joined #ruby
cow[moo] has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
braincrash has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
Guest35032 has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo2 has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 272 seconds]
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]