this post was submitted on 04 Nov 2023
669 points (98.0% liked)
Programmer Humor
19707 readers
158 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Partitioning by integer secobds is dumb.
Just assign 0 to the start of time, 1 to the end of time, and every point between is represented by a double precision floating point number.
For all those who believe time is infinite please apply a logistic transformation to your dates.
Um excuse me time actually already ended in 1991
No, that was the world that ended in 2012.
Fun fact: infinities can be different sizes, such that one infinity can be larger than another.
They’re still infinities, with no end. Just of different absolute sizes. Fun stuff to rabbithole down into if you want to melt your brain on a lazy afternoon.
My nephew refuses to talk to me because of this.
He said I smelled like farts, then I said he did times 10, he replied times a hundred, I pulled out the infinity card, then he replied with times infinity plus one, activating my trap card. I sat him down and for 90 minutes, starting with binary finger counting and Cantor’s diagonalisation argument, I rigorously walked him through infinities and Aleph numbers (only the first 2 in detail, I’m not a monster).
Now he knows the proper retort (not infinity plus one, use Aleph 1). Unfortunately now he’s not sure if numbers are “real” or not because I taught him that natural numbers are the cardinal numbers.
Even more fun: nobody can agree on how many there are (some people say none!), and mathematics is self-consistent regardless of if you assume certain ones definitely do or definitely don't exist.
In what unit? They're not scale invariant.
Also in case you're serious, I'm sure (by the pigeonhole principle) you'll run out of exponents just about as fast as you would run out of integers.
You can derive the date by first taking the largest unit, checking if it makes sense, then moving to a smaller time unit iteratively until the date comes out right.
boy do i have a bad news for you... https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
Which is definitely a totally normal and everyday operation that normal people do with dates
It’s a little out of the ordinary for now, but for thousands of years dates counted upwards from a negative number, which this new method easily avoids.
wat