this post was submitted on 31 Dec 2024
342 points (97.0% liked)

Programmer Humor

32831 readers
543 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
all 43 comments
sorted by: hot top controversial new old
[–] Madrigal@lemmy.world 59 points 1 week ago (9 children)

Imagine thinking that’ll be the biggest date-related computing problem for a galactic society.

If you really want to make programmers despair, point out:

  • massive variations in day, month and year lengths on different worlds.
  • some worlds may not have “months” (no moons, or many moons).
  • ambiguous definition of “year” for multi-star systems.
  • days may be longer than years (hello Venus).
  • communication latency across interstellar distances.
  • tine dilation.
[–] Dhs92@programming.dev 18 points 1 week ago

Don't we technically already have to account for time dilation for things like GPS satellites

[–] tetris11@lemmy.ml 18 points 1 week ago* (last edited 1 week ago)

That's easy. We'd just use Greg time.

Greg's age and mood is highly deterministic, and he has atoms in his body present from the big bang. His sense of time varies, and seems to accelerate as he gets older, and he will tell you about it with extreme detail down to either 2 decimal places or 3 beers. If you call him up and ask him what time it is, the degree of the obscenities used in his reply is usually a good enough correction coefficient when calling over long distances.

Also two of his kids hate him, and his current wife is thinking of leaving him; all countable metrics that one can use to ascertain what stage in his life Greg is at, and thus what the local date/time in your area is, based on all the above Greg stats.

[–] UnsavoryMollusk@lemmy.world 9 points 1 week ago

Relief point: we will still be using unix timestamp.

Anxious point: we will still be using unix timestamp.

[–] xmunk@sh.itjust.works 8 points 1 week ago

We're all just going to use tz_database and turn the maintainer into a ghost trapped in the machine for all of eternity.

[–] FourPacketsOfPeanuts@lemmy.world 7 points 1 week ago (1 children)

tine dilation

Holds up fork and squints at it

[–] Madrigal@lemmy.world 1 points 1 week ago

It's what happens when James uses the good dining forks to unjam the cupboard door again.

[–] kameecoding@lemmy.world 5 points 1 week ago (1 children)

I will just rely on ISO 8602 to introduce a universal time format

[–] Madrigal@lemmy.world 1 points 1 week ago

Then your only challenge will be converting to and from human-friendly formats and cleansing user input. Easy.

[–] lord_ryvan@ttrpg.network 4 points 1 week ago (1 children)

days may be longer than years (hello Venus).

Hello back

[–] Madrigal@lemmy.world 1 points 1 week ago

Well, that was certainly the peak of human artistic achievement.

[–] waspentalive@lemmy.one 3 points 1 week ago

Nah, all this is solved with star-dates. One of the Federation's crowning achievements - Warp Drive is small potatoes compared to getting hundreds of delegates from as many different worlds to all agree on one calendar system that is not based on their own world's orbit around its primary.. Diplomatic impossibility, but they managed it.

[–] 4z01235@lemmy.world 3 points 1 week ago

Also, interplanetary timezones and leaps.

[–] ZephyrXero@lemmy.world 43 points 1 week ago (2 children)

Don't worry, we're not far away from 2038, when 32 bit unix time rolls over 😅

[–] lordnikon@lemmy.world 15 points 1 week ago (2 children)

I will be so excited if we make it that far, double if I'm alive to see it.

[–] Zagorath@aussie.zone 21 points 1 week ago (1 children)

double

I hope you're not storing time in floating point.

[–] Madrigal@lemmy.world 2 points 1 week ago

The Y9999.999999871K bug

[–] Tyfud@lemmy.world 1 points 1 week ago (1 children)

We won't be around, but Unix time will be.

[–] lordnikon@lemmy.world 1 points 1 week ago

This is correct Unix time is eternal i kinda wished we would change the calendar again 1970 is just as arbitrary as 2024 years ago so why not set the mark at 1970. Tomorrow will be Jan 1st 0055

[–] waspentalive@lemmy.one 5 points 1 week ago (2 children)

Hopefully we are all working on 64 bit dates, right? right? </Padme mode> :^)

What, and miss out on all the overtime pay from fixing everything at the last minute?

[–] HiddenLayer555@lemmy.ml 1 points 1 week ago (1 children)

A surprising number of embedded devices (you know, the ones controlling machinery in factories and stuff) are still running 32-bit processors.

[–] waspentalive@lemmy.one 1 points 1 week ago

But you can still do 64 bit math on a 32 bit processor, if you have a carry/borrow flag.

[–] uservoid1@lemmy.world 21 points 1 week ago (1 children)

Storing the date as offset in seconds from 1970 in 64bit should last to about the end of the universe, after that it's not my problem.

[–] FourPacketsOfPeanuts@lemmy.world 6 points 1 week ago* (last edited 1 week ago) (1 children)

Programmers in the next universe iteration: deep sigh

[–] lordnikon@lemmy.world 19 points 1 week ago (3 children)

There is always the assumption that we will colonize the galaxy in 7000 years. When really we will still be on earth and someone is still running and old FreeBSD machine in prod and just doesn't want to update cause it still works.

[–] Jolteon@lemmy.zip 6 points 1 week ago

While I doubt will be stuck on Earth in 7000 years, there's absolutely going to be some of those old systems with 7000+ years of uptime. Just throw the nanite repair gel on it every 50 or so years.

[–] SkaveRat@discuss.tchncs.de 5 points 1 week ago

Also hasn't been rebooted in 7000 years, because uptime is important

[–] waspentalive@lemmy.one 1 points 1 week ago* (last edited 1 week ago)

deleted by author cuz @scaverat beat me to it. : ^ )

[–] vane@lemmy.world 13 points 1 week ago
[–] irotsoma@lemmy.world 10 points 1 week ago

03:14:07 UTC, 19 January 2038.

[–] BmeBenji@lemm.ee 8 points 1 week ago

Bold of you to assume the human race will survive past be Y2038 problem

[–] NigelFrobisher@aussie.zone 7 points 1 week ago (1 children)

We simply reset the years when the Butlerian Jihad happens.

[–] humorlessrepost@lemmy.world 2 points 1 week ago* (last edited 1 week ago)

Also computer issues aren’t a problem anymore after that (perhaps aside from the Ixians).

[–] pineapplelover@lemm.ee 6 points 1 week ago

My company still uses 2 digit year date. They're gonna have to deal with the whole y2k thing all over again

[–] peteypete420@sh.itjust.works 4 points 1 week ago (1 children)

Surely AI will make it easier.

[–] Madrigal@lemmy.world 5 points 1 week ago

I asked ChatGPT for some potential solutions to the Y10K issue. I particularly enjoyed this suggestion:

Plan for Y10K Early: Build flexible and extensible systems now, with modular design to incorporate future changes seamlessly.

[–] Presi300@lemmy.world 4 points 1 week ago

Y10k's gonna be wild

[–] hyacin@lemmy.ml 2 points 1 week ago

I said this to my father in 98/99ish when we were already updating to four digits anyway and he told me I was crazy.

We'll see who has the last laugh.

[–] Hammocks4All@lemmy.ml 1 points 1 week ago (1 children)

What would Y10K cigarettes be like?

[–] ikidd@lemmy.world 1 points 1 week ago