Originally posted by NotMine999
View Post
Announcement
Collapse
No announcement yet.
Linus Torvalds Isn't Happy With Some Of The Bcachefs Code For Linux 6.9
Collapse
X
-
This is gold. The next time someone attempts to write a shared library code in our codebase I'll say this in the code review: "Your foo_and_bar stuff is just horrendous interfaces with no explanations. The interfaces are disgusting. Keep it in your own code where it belongs, don't try to make it some generic library thing!"​
- Likes 2
Comment
-
Originally posted by danger View PostThis is gold. The next time someone attempts to write a shared library code in our codebase I'll say this in the code review: "Your foo_and_bar stuff is just horrendous interfaces with no explanations. The interfaces are disgusting. Keep it in your own code where it belongs, don't try to make it some generic library thing!"​
If Linus is right here, it is truly ugly to do 128bit math when 64 is enough to achieve the same.
- Likes 2
Comment
-
Originally posted by ckafi View PostI can respect Linus' objections about the interfaces, but I don't see what's so insane about the math implementations. The computations are entirely correct, they're neatly optimized, and there's even a PDF linked with the derivations for each formula. What more do you want? Is it just because it's 128-bit math? Also, no, MAD is not a valid substitution, because there's no way (at least to my knowledge) to increment it on-line.
- Likes 1
Comment
-
Originally posted by sdack View PostI believe it is the same old problem as always: theory versus practical application. Formulas for solving a problem may be valid in theory (on paper), but their implementation in code becomes wasteful. It can sometimes be enough to use only integer types instead of floating point types, or to use 8 or 16 bit instead of 64 or 128 bit, or to use a metric based on addition and multiplication instead of one based on division, square roots or logarithms, and so on ... Computers are meant to be deterministic and we always first try to solve problems discretely without using probability. When a new file system then needs 128-bit floating point math to implement statistical functions before it all works then I would get sceptical, too. Statistics just do not strike me as the final solution to computational problems, because they rarely.
Comment
-
Originally posted by ckafi View PostThis has nothing to do with probability. Mean and variance are deterministic metrics. ...
Often formulas that use the square root can be transformed by transforming the data. I.e. a test like R >= SQRT(X^2 + Y^2 + Z^2) used in measuring distances can be transformed into R^2 >= X^2 + Y^2 + Z^2. It is faster and can be implemented with integers. You would know this if you did write graphics code.
Comment
-
Originally posted by sdack View PostA metric measures the distance of two points in a metric space.
Originally posted by sdack View PostA deviation measures the variation of a probability distribution.This generally means that descriptive statistics, unlike inferential statistics, is not developed on the basis of probability theory [...]Originally posted by sdack View PostOften formulas that use the square root can be transformed by transforming the data. I.e. a test like R >= SQRT(X^2 + Y^2 + Z^2) used in measuring distances can be transformed into R^2 >= X^2 + Y^2 + Z^2. It is faster and can be implemented with integers. You would know this if you did write graphics code.
Comment
-
Originally posted by ckafi View Post...Last edited by sdack; 19 March 2024, 10:55 AM.
Comment
-
It must be nice to suffer under the delusion of being "the wise one", so you don't have to use any arguments when you try to "lecture" someone. I hope for you that you treat people offline better than this, otherwise you will find yourself very lonely one day.Last edited by ckafi; 19 March 2024, 04:43 PM.
Comment
Comment