dormi.zone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
KaynA to Programmer Humor@programming.devEnglish • 2 years ago

JavaScript's days are numbered

message-square
60
  • cross-posted to:
  • programmerhumor@lemmy.ml
688

JavaScript's days are numbered

KaynA to Programmer Humor@programming.devEnglish • 2 years ago
message-square
60
  • cross-posted to:
  • programmerhumor@lemmy.ml

Source: https://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs#Year_275,760

alert-triangle
You must log in or register to comment.
  • @rockSlayer@lemmy.world
    link
    fedilink
    104•2 years ago

    Well y275.8k will certainly be interesting

    • @danc4498@lemmy.world
      link
      fedilink
      English
      40•
      edit-2
      2 years ago

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

      • @lars@lemmy.sdf.org
        link
        fedilink
        8•2 years ago

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

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

    • @Quoth_The_Revan@lemmy.world
      link
      fedilink
      3•2 years 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…

  • @call_me_xale@lemmy.zip
    link
    fedilink
    81•2 years ago

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

    • @__init__@programming.dev
      link
      fedilink
      71•2 years ago

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

    • @Redkey@programming.dev
      link
      fedilink
      5•2 years ago

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

      • Thinker
        link
        fedilink
        3•2 years 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.

    • @towerful@programming.dev
      link
      fedilink
      5•2 years ago

      String based date processing

  • @pm_me_your_quackers@lemmy.world
    link
    fedilink
    63•2 years ago

  • katy ✨
    link
    fedilink
    53•2 years ago

    slides £20 across the table make it end tomorrow

    • @ARk@lemm.ee
      link
      fedilink
      5•2 years ago

      reserve me tickets for the inevitable shit show that follows 🍿

  • @EmergMemeHologram@startrek.website
    link
    fedilink
    51•
    edit-2
    1 year ago

    deleted by creator

    • @chaorace@lemmy.sdf.org
      link
      fedilink
      English
      13•2 years ago

      Um excuse me time actually already ended in 1991

      • @schnurrito@discuss.tchncs.de
        link
        fedilink
        2•2 years ago

        No, that was the world that ended in 2012.

      • interolivary
        link
        fedilink
        2•2 years ago

    • @rekabis@lemmy.ca
      link
      fedilink
      5•2 years ago

      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.

      • @EmergMemeHologram@startrek.website
        link
        fedilink
        4•
        edit-2
        1 year ago

        deleted by creator

      • @CanadaPlus@lemmy.sdf.org
        link
        fedilink
        2•
        edit-2
        2 years 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.

    • @CanadaPlus@lemmy.sdf.org
      link
      fedilink
      4•
      edit-2
      2 years ago

      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.

      • @EmergMemeHologram@startrek.website
        link
        fedilink
        2•
        edit-2
        1 year ago

        deleted by creator

    • @14th_cylon@lemm.ee
      link
      fedilink
      2•2 years ago

      boy do i have a bad news for you… https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems

    • interolivary
      link
      fedilink
      1•
      edit-2
      2 years ago

      please apply a logistic transformation to your dates

      Which is definitely a totally normal and everyday operation that normal people do with dates

      • @EmergMemeHologram@startrek.website
        link
        fedilink
        2•
        edit-2
        1 year ago

        deleted by creator

        • interolivary
          link
          fedilink
          1•2 years ago

          for thousands of years dates counted upwards from a negative number

          wat

  • @xantoxis@lemmy.world
    link
    fedilink
    43•2 years ago

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

    • sik0fewl
      link
      fedilink
      17•2 years ago

      Nothing happens before c. 4000 AD anyway.

      • @NegativeInf@lemmy.world
        link
        fedilink
        29•2 years ago

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

        • sik0fewl
          link
          fedilink
          12•2 years ago

          I wish we would have popped into a better existence.

          • @NegativeInf@lemmy.world
            link
            fedilink
            8•2 years ago

            We should never have coalesced from the quantum foam.

        • @LinuxSBC@lemm.ee
          link
          fedilink
          7•2 years ago

          I thought it was last Thursday.

    • @PunnyName@lemmy.world
      link
      fedilink
      11•2 years ago

      GODDAMMIT

  • @FiniteLooper@lemm.ee
    link
    fedilink
    English
    27•2 years ago

    No programming language should last 200,000 years

    • @normanwall@lemmy.world
      link
      fedilink
      24•2 years ago

      deleted by creator

      • Midnight Wolf
        link
        fedilink
        English
        16•2 years ago

        Replaced. Hotel? Trivago.

    • @DudeDudenson@lemmings.world
      link
      fedilink
      16•2 years ago

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

    • @30p87@feddit.de
      link
      fedilink
      8•2 years ago

      C

  • @viking@infosec.pub
    link
    fedilink
    27•2 years ago

    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.

    • @Redkey@programming.dev
      link
      fedilink
      8•2 years 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
    link
    fedilink
    25•2 years ago

    there goes my plans to build a time machine in javascript

  • @Gentoo1337@sh.itjust.works
    link
    fedilink
    20•2 years ago

    Javascript 2 release date

  • Turun
    link
    fedilink
    16•2 years 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

    • interolivary
      link
      fedilink
      7•2 years ago

      That’s one thing that really bugs me about Javascript (weirdly enough I’m okay with eg prototypal inheritance and how this works, or at least worked before the bolted on classes that were added because apparently I’m like one of the dozen or so people who had no problems with those concepts). The fact that all numbers are floats can lead to a lot of fun and exciting bugs that people might not even realize are there until they suddenly get a weird decimal where they expected an integer

  • Alien Nathan Edward
    link
    fedilink
    15•2 years 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?

  • @dadGPT@lemmy.world
    link
    fedilink
    15•2 years ago

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

  • @rekabis@lemmy.ca
    link
    fedilink
    14•2 years ago

    past 13 September

    Yes, but will that be a Friday??

    • Sippy Cup
      link
      fedilink
      2•2 years ago

      That will be a Saturday

      • @14th_cylon@lemm.ee
        link
        fedilink
        1•2 years ago

        it may or may not be a monday - probably won’t. it will be monday based on the (4000 | year) => !(leap year) rule, but by the year 275000 the difference will be so big that i am pretty sure people will make more rules to solve that.

  • @shiveyarbles@beehaw.org
    link
    fedilink
    13•2 years ago

    Cockroaches will go extinct before JavaScript is dead

    • Nailbar
      link
      fedilink
      6•2 years ago

      The last cockroach writes an AI in JavaScript to carry on the legacy

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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
  • 2.46K users / day
  • 5.11K users / week
  • 8.9K users / month
  • 17.1K users / 6 months
  • 23.2K subscribers
  • 1.38K Posts
  • 48.3K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org