UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer. | We can haz pdf
<egg>
!wpn whitequark
* galois
gives whitequark an octagon with a t-test attachment
<egg>
!wpn Iskierka
* galois
gives Iskierka a life
<egg>
!wpn eigenellies
* galois
gives eigenellies a cupric proactinium kaon
<eigenellies>
!wpn egg
* galois
gives egg a rectangle
<egg>
hmm
* egg
triangulates the rectangles
<UmbralRaptop>
!wpn egg
* galois
gives egg a jagged convergent ⹋
<egg>
gah sore throat
<egg>
;8ball can sore throats be improved with a jagged convergent triple dagger
<kmath>
egg: Outlook good
<egg>
hm
<UmbralRaptop>
kmath, no!
egg|zzz|egg has quit [Remote host closed the connection]
<kmath>
<whitequark> roommate#2: hums a few notes quietly ⏎ my brain: autocompletes the rest of the track ⏎ ⏎ does it work that way for everyone else or is it just me
egg|zzz|egg has quit [Remote host closed the connection]
egg|zzz|egg has joined #kspacademia
UmbralRaptop has quit [Remote host closed the connection]
<whitequark>
egg|zzz|egg: is ada's division truncating or flooring?
<egg|zzz|egg>
whitequark: it's consistent with its rem, so the devil's greatest trick applied to it as well
<egg|zzz|egg>
but at least rem is called rem
<egg|zzz|egg>
not mod
<whitequark>
so, truncating
<egg|zzz|egg>
yeah
<whitequark>
that's good (for us)
<egg|zzz|egg>
(which us?)
<whitequark>
(because verilog also truncates, and because dsp benefits)
<whitequark>
(hdl toolchain developers)
<egg|zzz|egg>
(ah)
<egg|zzz|egg>
whitequark: as the cat says, were division flooring, there would be no difference between rem and mod and that whole insanity would not occur
<whitequark>
hm
<egg|zzz|egg>
but if they are distinct then at least rem must not be called mod
<whitequark>
i don't actually understand the difference between mod and rem i think :(
<egg|zzz|egg>
(which, in languages where it's called %, it tends to be, because people tend to use words and % doesn't sound more like remainder than modulus)
<egg|zzz|egg>
whitequark: rem is the remainder, it's defined with respect to division as a / b * b + a % b == a or something along those lines
<egg|zzz|egg>
s/%/rem/
<galois>
egg|zzz|egg meant to say: whitequark: rem is the remainder, it's defined with respect to division as a / b * b + a rem b == a or something along those lines
<egg|zzz|egg>
whitequark: mod is about modular arithmetic, so it gives you a consistent representative of the equivalence class modulo b
<whitequark>
ohhhhhhhhh
<egg|zzz|egg>
so if a is congruent to c (mod b), then a mod b = c mod b
<egg|zzz|egg>
> if a is congruent to c (mod b), then a mod b = c mod b << this is not the case for rem if a and c differ in sign
<whitequark>
ok so with `a mod b = r`, two things hold: `sign(r) = sign(a)`, and if `sign(a) = sign(b)`, then `a mod -b = b - r` / `-a mod b = b - r`
<whitequark>
i think
<egg|zzz|egg>
`sign(r) = sign(a)` << no, the sign of r is independent of a for mod (you're thinking of rem)
<egg|zzz|egg>
a mod b lies in [0, b[ (for b > 0) or ]b, 0] (for b < 0)
<whitequark>
oh right
<whitequark>
sign(r) = sign(b)
<whitequark>
but like 10 mod 3 = 1, and -10 mod 3 = 2
<egg|zzz|egg>
yup
<egg|zzz|egg>
whitequark: very often you are dealing with b>0, and you want mod rather than rem
<egg|zzz|egg>
rem is kinda weird
<egg|zzz|egg>
e.g. you want to index into a circular buffer, you want positive indexes, i.e., mod
<egg|zzz|egg>
(positive in the french sense, 0 is positive :-p)
<SilverFoxy>
0 is positive in french?
<egg|zzz|egg>
it's both positive and negative instead of neither
<SilverFoxy>
that's crazy, yall using two's complement like that
<whitequark>
in two's complement 0 is positive, arguably
<whitequark>
(since the sign bit is not set)
<egg|zzz|egg>
yeah
<egg|zzz|egg>
whitequark: honestly I don't think I've encountered a case where I wanted rem
<egg|zzz|egg>
obviously there are plenty of cases where it didn't matter because everything was positive, but I can't think of cases where I wanted rem over mod
<kmath>
<stephentyrone> @whitequark But remainder being modulo when the divisor is positive would benefit it immensely. ⏎ ⏎ Search for x % 2 =… https://t.co/ufmPkA3vzH
<SilverFoxy>
I think we need to end the stigma on negative numbers, treating them like sub-class citizens, negative numbers are natural numbers too
<egg|zzz|egg>
x % 2 == 1 intended to mean x mod 2 = 1
<kmath>
<whitequark> @stephentyrone @eggleroy right. did you mean "But remainder being modulo when the divisor is positive <benefits> it… https://t.co/s51rQBoKfR
<egg|zzz|egg>
wait no nevermind I have cnofused myself
<egg|zzz|egg>
whitequark: hm, so Python % is actually mod? nice
<whitequark>
yes.
<iximeow>
opinion: `/` should give me a tuple of (quotient, remainder) and `%` should be mod, always
<egg|zzz|egg>
in the current state of cross-language confusion, there is a good argument to call mod "mod" (and remainder "rem" if it is provided)
<galois>
[WIKIPEDIA] Modulo operation#In programming languages | "In computing, the modulo operation finds the remainder after division of one number by another (called the modulus of the operation).Given two positive numbers, a and n, a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n, where a is the dividend and n is the divisor..."
<whitequark>
yes.
<iximeow>
what the Fuc
<egg|zzz|egg>
AAAAAA there are languages that call rem mod
<UmbralRaptop>
Galois is protecting me from the bad bird website?
dx_ is now known as dx
* UmbralRaptop
🔪 Sakurai
* UmbralRaptop
grumbles about physics textbooks that think nonconstructive proofs are sufficient
<whitequark>
hey, even math textbooks don't have a single position on that (afaik?)
<UmbralRaptop>
Depends on the math, I think
<mlbaker>
mainstream math isn't intuitionistic
<mlbaker>
we accept the law of the excluded middle
<whitequark>
<crankpot voice> this is why mainstream math is wrong
<UmbralRaptop>
(The trick is to go with something like statistics that's full of dirty numbers)
_whitenotifier-a3da has joined #kspacademia
<_whitenotifier-a3da>
[Principia] pleroy opened pull request #2379: Get the inertia tensor of the body and push it to the plugin - https://git.io/JePtG