this post was submitted on 04 Nov 2023
648 points (97.9% liked)

Programmer Humor

19623 readers
1 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

founded 1 year ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 105 points 1 year ago (2 children)

Well y275.8k will certainly be interesting

[–] [email protected] 40 points 1 year ago* (last edited 1 year ago) (1 children)

They’ll work on a solution in the year 275,759

[–] [email protected] 8 points 1 year ago

They’ll work on a solution in the year 275,759

…written in ES5, Python 2 and mostly Rust++

[–] [email protected] 3 points 1 year ago

It's fun how oddly close that year is with 0°C in Kelvin: 273.15. Seeing 275.8K just instantly brought me back to chemistry...

[–] [email protected] 77 points 1 year ago (3 children)

Bold of you to assume no one will come up with a replacement date library rather than just getting rid of JS.

[–] [email protected] 67 points 1 year ago

It’s javascript. We’ll have gone through 275,760 new datetime libraries before then, it’ll be fine.

[–] [email protected] 5 points 1 year ago

String based date processing

[–] [email protected] 5 points 1 year ago (1 children)

Of course! There's already a proposal for a replacement Temporal object.

[–] [email protected] 2 points 1 year ago

It’s not just a proposal, it’s already fully defined and almost completely implemented - I believe they’re just waiting on a standards update from ISO for time zone stuff.

[–] [email protected] 63 points 1 year ago
[–] [email protected] 53 points 1 year ago (1 children)

slides £20 across the table make it end tomorrow

[–] [email protected] 5 points 1 year ago

reserve me tickets for the inevitable shit show that follows 🍿

[–] [email protected] 44 points 1 year ago* (last edited 1 year ago) (4 children)

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.

[–] [email protected] 12 points 1 year ago (1 children)

Um excuse me time actually already ended in 1991

load more comments (1 replies)
[–] [email protected] 5 points 1 year ago (2 children)

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.

[–] [email protected] 4 points 1 year ago

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.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

For all those who believe time is infinite please apply a logistic transformation to your dates.

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.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 43 points 1 year ago (2 children)

Also means you can't reference anything earlier than the late Pleistocene.

[–] [email protected] 17 points 1 year ago (1 children)

Nothing happens before c. 4000 AD anyway.

[–] [email protected] 29 points 1 year ago (2 children)

Sorry, that's also wrong. The entire universe, in its current state, popped into existence last Tuesday. It's been terribly inconvenient tho.

[–] [email protected] 12 points 1 year ago (1 children)

I wish we would have popped into a better existence.

[–] [email protected] 8 points 1 year ago

We should never have coalesced from the quantum foam.

[–] [email protected] 7 points 1 year ago

I thought it was last Thursday.

[–] [email protected] 11 points 1 year ago
[–] [email protected] 25 points 1 year ago (1 children)

What people fail to see is that this is the largest date the API can store, not a magical cutoff date in the distant future.

You could create a date today and send it to the API, and it could potentially crash it, or create a buffer overrun.

[–] [email protected] 8 points 1 year ago

The definition of the Date object explicitly states that any attempt to set the internal timestamp to a value outside of the maximum range must result in it being set to "NaN". If there's an implementation out there that doesn't do that, then the issue is with that implementation, not the standard.

[–] darcy 25 points 1 year ago

there goes my plans to build a time machine in javascript

[–] [email protected] 24 points 1 year ago (3 children)

No programming language should last 200,000 years

[–] [email protected] 16 points 1 year ago

JavaScript shouldn't have lasted as long as it has and it's still used widely

[–] Gentoo1337 20 points 1 year ago

Javascript 2 release date

[–] [email protected] 15 points 1 year ago

please hide this. this is how john connor defeats skynet.

[–] [email protected] 14 points 1 year ago

That's because this is the maximum integer that can be stored in a double precision floating point number without loss of precision, lol

[–] [email protected] 14 points 1 year ago

I've got a bunch of freeze dried food from my backpacking days. Who wants to jump in on a business selling Y275.76K Survival Kits?

[–] [email protected] 13 points 1 year ago (2 children)

past 13 September

Yes, but will that be a Friday??

load more comments (2 replies)
[–] [email protected] 11 points 1 year ago (1 children)

2036 to 2038 is gonna be wicked.

[–] [email protected] 6 points 1 year ago

This will be a tough one to fix. There must be millions upon millions of embedded systems out there with 16-bit epoch burned in.

They'll all be much tougher to find than "YEAR PIC(99)" in COBOL was.

Y2K wasn't a problem because thousands upon thousands of programmers worked on it well in advance (including myself) we had source code and plenty of static analysis tools, often homegrown.

The 2038 bugs are already out there...in the wild...their source code nothing but a distant dream.

[–] [email protected] 9 points 1 year ago

Well, I am comfortable leaving the upcoming disaster this will cause to the next generations.

[–] [email protected] 8 points 1 year ago

Too far away for my comfort.

[–] [email protected] 8 points 1 year ago (1 children)
[–] [email protected] 6 points 1 year ago

Be sure to cross-post it to the Usenet group for visibility.

[–] [email protected] 6 points 1 year ago

Maybe by then my system will have recovered from this unresponsive javascript page

[–] [email protected] 6 points 1 year ago (1 children)

We survived the 2000 crash, we will survive this

[–] [email protected] 5 points 1 year ago (1 children)
load more comments (1 replies)
load more comments
view more: next ›