• MotoAsh@lemmy.world
      link
      fedilink
      arrow-up
      33
      arrow-down
      1
      ·
      11 months ago

      Floating point error? Yeaahhh no. No. Just… no. That is NEVER as big as 0.01 unless the number is also insanely massive.

      The error is relative in scale. It’s not magically significant fractions off.

    • ⲇⲅⲇ@lemmy.ml
      link
      fedilink
      arrow-up
      3
      arrow-down
      16
      ·
      edit-2
      11 months ago

      Gnome is coded with JavaScript (lmao 🤣) so yeah, I Think you are right.

      EDIT: Actually, even if JavaScript and other languages have this issue, the value 1.7518248558044434 has not this issue. There is another reply that explains it and makes totally sense. But still pretty lame to know the desktop runs with JavaScript. (Yeah, I hate Gnome)

        • ⲇⲅⲇ@lemmy.ml
          link
          fedilink
          arrow-up
          2
          arrow-down
          12
          ·
          11 months ago

          Okay, but still needs JavaScript, they are slowly trying to remove or improve it. But it is a fact that it also runs on JavaScript. 🤣

          • priapus@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            8
            ·
            11 months ago

            Using JavaScript isn’t inherently a bad thing. JavaScript can be very useful when used for scripting. Obviously anything with a new for performance will be done in C.

            • ⲇⲅⲇ@lemmy.ml
              link
              fedilink
              arrow-up
              2
              arrow-down
              2
              ·
              11 months ago

              JavaScript isn’t the best language to make a desktop interface in my opinion, it can be very efficient, but you can see in bugs (at least in the past) how bad performance it had, and they needed to re-factor it to replace to C or improve the JavaScript. I’m just laughing and making fun of it using JavaScript, not saying it is slow, Gnome is pretty fast nowadays.

      • atzanteol@sh.itjust.works
        link
        fedilink
        arrow-up
        12
        ·
        11 months ago

        It’s not a “language” issue it’s a “computer” issue. This math is being done on the CPU.

        IEEE 754

        Some languages do provide for “arbitrary precision math” (Java’s BigDecimal for example) but it’s slower to do that. Not what you want if you’re multiplying a 4k matrix every millisecond.

      • TheGrandNagus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        11 months ago

        It’s mostly C.

        And Gnome is far from the only desktop that uses JS, KDE Plasma, for example, also uses a lot of JavaScript.

        It’s weird when people bash Gnome for using JS, when practically everybody else uses it a lot too. Shows that they’re just regurgitating “Gnome = bad!!!” nonsense.

        We get it, you think disliking Gnome is a quirky, edgy personality trait.

          • TheGrandNagus@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            11 months ago

            There’s a lot more to your UX than just the Plasma desktop. And you’re also trying to pass off Gnome’s shell as being Gnome desktop. Pretty disingenuous.

            • ⲇⲅⲇ@lemmy.ml
              link
              fedilink
              arrow-up
              1
              ·
              11 months ago

              But at least the desktop itself isn’t using JavaScript that much like Gnome do. Show me the repo with the % to see what are you referring.