- Joined
- Dec 7, 2020
What would be the best programming language to learn to work on Matrix or making something like it?
<https://github.com/matrix-org>
JavaScript. WebRTC is a client side API.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
What would be the best programming language to learn to work on Matrix or making something like it?
<https://github.com/matrix-org>
Thanks fren
feels good. ribit. ribit.Thanks fren
public class Main {
public static void main(String[] args) {
System.out.println(-2 % 10);
}
}
... and now in Python3
print(-2 % 10)
James Gosling is a retard. How he got a job doing anything in software is proof that since 1970 the IQ of software engineers has decreased precipitously as time continued. This horrible failure to implement the simplest of operators ruined 3rd pagination implementation I've had to write this year.
void last() {
Integer l = this.index - 1;
this.index = l % this.limit;
}
void last() {
Integer l = this.index - 1;
if (l > -1) {
this.index = l % this.limit;
} else {
this.index = this.limit + l;
}
}
That's a common modulo implementation. C and most languages behave the same way.Did you know that Java has a fucked up modulus implementation?
Negative numbers don't return a quotient.
I wouldn't say most, it's a fucking mess in general. Of course the Lisp chads do it right and make you specifyThat's a common modulo implementation. C and most languages behave the same way.
Mathematically correct modulus should return 8 for -2 % 10. Just because it common doesn't mean it's correct.That's a common modulo implementation. C and most languages behave the same way.
But it is mathematically correct under the rules of modular arithmetic.Mathematically correct modulus should return 8 for -2 % 10. Just because it common doesn't mean it's correct.
Yes the floored definition of modulus is correct. Using the truncated definition that would return -2 instead of 8 would be incorrect mathematically. The only reason this matters is because if you want pages to wrap during pagination, and you are storing the current page this.index, then it would be easy to use modulus to force any indexes that exceed the maximum index possible to wrap around back to the first page's index.But it is mathematically correct under the rules of modular arithmetic.
Using the truncated definition that would return -2 instead of 8 would be incorrect mathematically.
You have -2 % 10 = -2 which means -2 === -2 (mod 10) which is true of course (k=0). QED.Given an integer n > 1, called a modulus, two integers a and b are said to be congruent modulo n, if n is a divisor of their difference (i.e., if there is an integer k such that a − b = kn).
-2 divided by 10 isn't -1 with a remainder of 8. It's 0 with a remainder of -2.Mathematically correct modulus should return 8 for -2 % 10. Just because it common doesn't mean it's correct.
---
I maintain that flooded is the correct definition for modulus.
You could just as correctly have -2 % 10 return 148, but there is also that little matter of practicality. Most people using the % operator are not actually using it to work with a set of equivalence classes that partition the integers.You have -2 % 10 = -2 which means -2 === -2 (mod 10) which is true of course (k=0). QED.
Isn't that a pretty common use? Like separating odd and even numbers.Most people using the % operator are not actually using it to work with a set of equivalence classes that partition the integers.
But they typically do that by mapping the odd numbers to 1 and the evens to 0, which from a mathematical point of view is just choosing one arbitrary representative each from the "odds" and "evens" equivalence classes.Isn't that a pretty common use? Like separating odd and even numbers.
I maintain that flooded is the correct definition for modulus.
You mean floored, right? I thought you made a typo at first but it's odd that you'd make the same typo across two different posts.Yes the flooded definition of modulus is correct.
a = -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
a % 10 = 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
a = -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
a % 10 -4 -3 -2 -1 0 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
Literally never heard of it until just now.Anyone use Nix? I've been interested for a while but have no idea where to start. I don't really like Docker so I figure given that I like Haskell a lot, I might like Nix more? Anyone have any opinions?
I'm curious too. Have you seen this?Anyone use Nix? I've been interested for a while but have no idea where to start. I don't really like Docker so I figure given that I like Haskell a lot, I might like Nix more? Anyone have any opinions?
Fuck me, why do the cranks that insist that mathematics itself is incorrect always write long-winded diatribes that don't even say anything?<jesus christ snip>
No, it's a mathematical argument. Legalist arguments actually have wiggle room, whereas mathematical arguments are infinitely more autistically pedantic. It is a mathematical fact that -2 % 10 == -2. It is also a mathematical fact that -2 % 10 == 8. So then you need further stipulations to narrow it down to one answer (like, say, the stipulation that you want the remainder to be positive, which seems to be what you're arguing about in that wall of text). That doesn't make -2 any less of a valid answer given the definition of modulo arithmetic.It is a mathematical legalist argument to state that -2 % 10 != 8 and then provide profs that state otherwise.