Conversation started Oct 22, 2021 at 3:10.
Oct 22, 2021 03:10
CMQ: Should (-1) mod 10 be -1 or 9?
W D
W D
9
I remember depending on the day they were either very quick to post or took quite a while, so RSS feeds makes sense
W D
W D
0 <= a mod K < K
maths
like 9 mod 10 wouldn’t be -1
unless you’re doing congruence or something
concurring 9, i think any mod that does the weird negative thing should be clearly notated as a separate command
signedmod or something
@Skidsdev Yeah, nowadays the challenge is to get New Posts or New Sandbox Posts to post something with a score greater than 0 :P
and I mean "post", not "edit to", hyper :P
Oct 22, 2021 03:12
@DLosc if in doubt, ask apl
@cairdcoinheringaahing i was just about to mention that
10 | ¯1
9
why are you still up at (i think it's) 4
Because my brain seems to think that sleep is the enemy
Oct 22, 2021 03:13
@cairdcoinheringaahing Returns an empty string
W D
W D
@thejonymyster maybe “Nearly Fibonnaci Golden Rectangle” ???
i mean for the title, sure
the actual rules are the real issue
@WD @thejonymyster @lyxal I agree! But Scala doesn't. :P
@DLosc Braingolf, aka python, agrees that it is 9
W D
W D
@DLosc how doesn’t it? I don’t do Scala so I have no idea
Oct 22, 2021 03:14
i guess you could quick fix it by checking for a negative output and adding 10
W D
W D
Um
what about -101 mod 10
@thejonymyster I'm writing a function to do that right now
@WD that will return -1, which you can add 10 to to get 9
if it doesnt, then the mod function just doesnt support negatives XD
@hyper-neutrino 4:15 to be exact. At least that's what github refined tells me
@WD Even more shocking is that Julia, a language that's a lot more angled toward math, also does it wrong: Try it online!
Oct 22, 2021 03:16
well i was just too lazy to include that but yes 4:15 (well actually, 4:16 now)
W D
W D
QUICK FIX
For mod
Function mod_returns_pos
If LEFT is negative
Return mod_returns_pos ( negative 1 * LEFT, RIGHT )
Otherwise
Return builtin_mod( LEFT, RIGHT )
@hyper-neutrino I think you'll find its 4:17
@WD python3/braingolf still says 9
W D
W D
actually, it’s 16:17
Oct 22, 2021 03:18
@WD That doesn't work, though, right? It'll give 1 instead of 9
@WD so -1 mod 10 =... 1?
yeah ahah
W D
W D
Oops
@lyxal Jelly also runs on python afaik
W D
W D
lol
oof
@cairdcoinheringaahing no, my clock says 4:18
W D
W D
Oct 22, 2021 03:18
16:18
not 4:18
uh it's actually 23:18
W D
W D
For me it’s 14:18
@WD ooh, golden ratio
no I actually mean 4:18
W D
W D
Oct 22, 2021 03:18
OI STOP WITH THE language says 9
but with the ratio bar moved a bit
It's 4:18 PM for me
and also wrong mathematically
W D
W D
2:18pm
because I am talking about caird where it is 4:18 and no I do not mean PM. it is 23:18 where I am
W D
W D
Oct 22, 2021 03:18
99999999999999999999am
@WD hey we're in the same timezone
W D
W D
-_-
or at least, i'm artificially in your timezone
W D
W D
I’m joking, I’m actually 3:19pm
im in all of your timezones because im in your computer
Oct 22, 2021 03:19
@WD no, you're not JoKing.
You're WD
W D
W D
Oh wait
i can't believe you made that mistake
@WD it's 14:19 here though
@WD That unfortunately overflowed time, it is now -2147483648 o clock
5
W D
W D
the oldest trick in the book be like
@cairdcoinheringaahing correction: Infinity o’clock (maybe inf o’clock if python 3)
Oct 22, 2021 03:20
@cairdcoinheringaahing what is that with daylight saving
-2147483647 o'clock
To be 100% precise with the remainder thing, there are three different ways to do it: always positive, follow sign of divisor, follow sign of dividend
The second is C way, the third is Python way
average the positive and negative version
W D
W D
What about 100 mod 3 and 100 mod -3
I have a fourth: randomly choose one
Oct 22, 2021 03:21
My fourth is always negative
W D
W D
I have a fifth: crash the computer
@Bubbler what does following a sign entail?
If it's negative, go backwards
A sixth way: positive and negative at the same time until you observe it
Oct 22, 2021 03:22
check the wikipedia page for the visual graphs
#7: Make it positive if Lyxal's online, otherwise negative
W D
W D
I.e. quantum physics and superposition
@lyxal or positive and negative while you observe it, ± exists
W D
W D
#8: always return 42
#11: Positive aside from mod intervention
Oct 22, 2021 03:22
@thejonymyster It defines the output of 100%-3 and -100%3
Former gives -2 if you follow the sign of the divisor, latter gives -1 if you follow the sign of the dividend
W D
W D
#-2147483647: always return -2147483647
@WD guaranteed to be modulo by fair supercomputer calculation
W D
W D
lol x36
@Bubbler QBasic does it C way and now I am sad :(
@DLosc no, you're not sad.
W D
W D
Oct 22, 2021 03:23
#Infinity: return square root of -1 (= i)
@DLosc You're DLosc
I am DLosc and I am sad :(
Well, what do you expect from a pre-C language
I am saDLosc
@DLosc No, C does it QBasic way
W D
W D
Oct 22, 2021 03:24
I have few doors
I have fe-WD-oors
IIRC the C way was determined by the x86 way
i cant do that with my name u_u
W D
W D
Well, let’s get back on topic as we always do in this totally always on-topic and well-moderated chatroom
12 mins ago, by lyxal
@DLosc if in doubt, ask apl
Oct 22, 2021 03:25
@WD can I use you to make my Rubiks cube go faster?
W D
W D
I know how to solve them
but not really
@WD no. Curiously JS says -1
WD-40 is an American brand and the trademark name of a water-displacing spray manufactured by the WD-40 Company based in San Diego, California. WD-40 acts as a lubricant, rust preventative, penetrant and moisture displacer. == History == Different sources credit different men with inventing WD-40 formula in 1953 as part of the Rocket Chemical Company (later renamed to WD-40 Company), in San Diego, California; the formula was kept as a trade secret and was never patented.According to Iris Engstrand, a historian of San Diego and California history at the University of San Diego, Iver Norman Lawson...
W D
W D
More on topic, can anyone review this?
oh damn, I've never drafted a question and gotten only one "similar questions"
W D
W D
Oct 22, 2021 03:27
OI STOP WITH THE <language> says <number>
I think that might be enough tho
 
Conversation ended Oct 22, 2021 at 3:27.