<testone>
sahar_sedigh: 2 possibilities: 1) you need to set include dir with options or env vars, or 2) you have the compiled lib, while you need sources too (hence -devel)
<testone>
anyway, if the script is done with void linux in mind too (as it seems), I would check better for repos to enable or similar
lutherann has joined #ruby
itok has quit [Ping timeout: 252 seconds]
itok has joined #ruby
<sahar_sedigh>
testone: the funny thing is this:
<sahar_sedigh>
it looks for a package that is not available in void linux repo
<sahar_sedigh>
it seems void doesn't support libressl for sometime. 2021-02-03
<sahar_sedigh>
I guess rvm is out for me.
<sahar_sedigh>
unless a work around would pop up somewhere
<testone>
rvm does a lot of mess, try chruby instead
hexreel has joined #ruby
hexreel has quit [Quit: leaving]
cappy has quit [Quit: Leaving]
STASIdownunder has quit [Ping timeout: 244 seconds]
svm has joined #ruby
msv has quit [Ping timeout: 268 seconds]
andy-turner has joined #ruby
<nakilon>
the Numeric#/ should have a "return 0 if zero?"
<nakilon>
or "return self if zero?"
<nakilon>
this way there will be no DivideByZero error in the methods that count average from the list
<nakilon>
millions of projects will be able to omit their own check on size.zero?
<nakilon>
if the number is 0, multiplication and division should return 0 no matter what the argument is
<nakilon>
so this return should be built in
<nakilon>
it would be a profit from the fact that number is an object and operation is a method
<nakilon>
especially when there is already a built-in assumption that the sum of empty list is 0
<nakilon>
irb(main):001:0> [].sum => 0
Linux_Kerio has joined #ruby
STASIdownunder has joined #ruby
TomyLobo has joined #ruby
STASIdownunder has quit [Remote host closed the connection]
svm is now known as msv
<o0x1eef>
C defines division by zero as "undefined behavior" and I'd guess that's why Ruby raises ZeroDivisionError. JavaScript produces Infinity. I don't know the right answer, but your suggestion seems practical.
<havenwood>
Returning the number itself or zero seems bad. Infinity is what Float specs specify, except NaN for zero divided by zero.
<havenwood>
Ruby could have chosen to do the same with Integer, and return Float::INFINITY and Float::NAN, but the number itself or zero seems incorrect and prone to causing undiscovered bugs.
<havenwood>
At least it's Ruby, so if you want to make a refinement to return Infinity and NaN or None and Some, you can!
patrick has quit [Ping timeout: 246 seconds]
patrick_ is now known as patrick
patrick_ has joined #ruby
patrick has joined #ruby
patrick has quit [Changing host]
patrick_ is now known as patrick
patrick_ has joined #ruby
ih8u has quit [Read error: Connection reset by peer]
ih8u has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
user71 has joined #ruby
ih8u has quit [Remote host closed the connection]
fantazo has joined #ruby
__jmcantrell__ has joined #ruby
joako has quit [Quit: quit]
joako has joined #ruby
Sheilong has joined #ruby
Sheilong has quit [Client Quit]
cappy has joined #ruby
jmcantrell is now known as Guest7797
Guest7797 has quit [Killed (copper.libera.chat (Nickname regained by services))]
__jmcantrell__ is now known as jmcantrell
jmcantrell_ has joined #ruby
ih8u has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 265 seconds]
ih8u2 is now known as ih8u
___nick___ has quit [Ping timeout: 252 seconds]
Sheilong has joined #ruby
aesthetikx has quit [Ping timeout: 248 seconds]
___nick___ has joined #ruby
dionysus69 has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 245 seconds]
ih8u2 is now known as ih8u
mweckbecker has quit [Quit: leaving]
cappy has quit [Quit: Leaving]
mweckbecker has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 244 seconds]
ih8u2 is now known as ih8u
user71 has quit [Quit: Leaving]
ih8u has quit [Quit: ih8u]
Sheilong has quit []
ih8u2 has joined #ruby
ih8u2 is now known as ih8u
Linux_Kerio has quit [Ping timeout: 244 seconds]
kathryn1024_ has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 248 seconds]
ih8u2 is now known as ih8u
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
ih8u has quit [Quit: ih8u]
ih8u has joined #ruby
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
___nick___ has quit [Ping timeout: 252 seconds]
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 245 seconds]
ih8u2 is now known as ih8u
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
andy-turner has quit [Quit: Leaving]
ih8u has quit [Ping timeout: 245 seconds]
kathryn1024_ has quit [Ping timeout: 264 seconds]
GreenResponse has quit [Quit: Leaving]
ruby[bot] has quit [Remote host closed the connection]
<o0x1eef>
In my experience zero serves well as a no-op value and doesn't skew the results. I think blowing up with an error is not always preferable -- especially if the "fix" is something similar to .reject(&:zero?)
<testone>
the very issue is: should mathmatical operations in programming language follow mathematical 'usual' habits?
<testone>
if reply is "yes", programmers would expect to have errors/Infinity/... as they would doing math calcs by hand
<testone>
if reply is "no", programmers should read 'particular implementations' of arithmetics of each programming language
<testone>
and always think about before 'translating' from ona lang to another even supposedly simple things like arithmetics
<testone>
IMHO the best solution is the one already adopted: follow math rules
dionysus69 has quit [Ping timeout: 252 seconds]
<o0x1eef>
That makes sense. Usually I lean towards being practical. I don't think Infinity is helpful or practical, it is another value to work around -- same as an error would be. But yeah, from the perspective of math, it is correct.