Just a shower thought I had when thinking about claims like “80% of all code will be written by AI”…

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 day ago

      I could’ve sworn that I saw a headline recently that gcc isn’t deterministic. But maybe that was some really weird edge case or a bug.

        • jenesaisquoi@feddit.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          23 hours ago

          I don’t think that’s true - or thst it is a bug. It would make reproducible builds impossible.

          • fragrantvegetable@sopuli.xyz
            link
            fedilink
            arrow-up
            4
            ·
            11 hours ago

            My understanding was that clang isn’t deterministic by default but can be made deterministic with flags. I checked and this is still true but not for the reasons I thought. I assumed this was due to the way LLVM iterates over functions and basic blocks in a non-deterministic order (because of the way they are laid out in memory) and because some optimisations use heuristics. But it appears LLVM tries to make all optimisation passes deterministic. The remaining non-determinism comes from file paths and timestamps which can be worked around with the correct flags and some extra work to create reproducible builds.

            • jenesaisquoi@feddit.org
              link
              fedilink
              English
              arrow-up
              1
              ·
              25 minutes ago

              Thank you very much for looking it up! I learned something new thanks to you.

              So I guess in the end it is deterministic, because for a given set of inputs it always produces the same output, it’s just that file paths and timestamps must also be considered as input.

        • MangoCats@feddit.it
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          Say what you will, Turbo C++ in 1991 was dysfunctional for anything over 5 pages of code, a lot like LLMs a year ago.

    • MangoCats@feddit.it
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      7
      ·
      2 days ago

      No, but a statistical token generator can help you create a deterministic algorithmic program quickly, if you know what you are doing.

      • _stranger_@lemmy.world
        link
        fedilink
        arrow-up
        19
        arrow-down
        1
        ·
        edit-2
        2 days ago

        And I’d you don’t know what you’re doing, it’ll probably be a long time before you realize it, because the token generator really wants you to keep paying your subscription.

        • neclimdul@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          2 days ago

          Honestly if you do know what you’re doing that’s still true. They’re really good at looking like good code which makes it not always obvious when it’s not, even to an experienced developer.

          Or maybe more bluntly, they’re really good at volume, not necessarily quality.

          • MangoCats@feddit.it
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            edit-2
            2 days ago

            They’re really good at looking like good code which makes it not always obvious when it’s not, even to an experienced developer.

            There can be a lot of difference between an experienced developer and a good/responsible developer.

            Know your limits. Professional engineering has been wrestling with these problems for a long time - unfortunately the practices of professional apprenticeship, sealed drawings etc. have only informally been partially migrated into the software development world.

        • MangoCats@feddit.it
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          2 days ago

          If you don’t know what you’re doing, you shouldn’t be using powerful tools in the first place, whether that’s heavy lift cranes, chainsaws, arc welders, or driving an SUV 80mph…

          The day may come when the token generator manipulates you to keep you subscribed, but at this point in time I don’t believe the frontier models are playing those games too extensively - at least not models like GPT and Claude.

          Back in the 1990s I was deeply impressed that when my ISP’s service started sucking, I could use their service to search for and find alternate ISPs to switch my subscription to. I wondered how long that would continue - so far, you still can - although since broadband came around much of the U.S. is locked into essentially monopoly providers of last-mile connectivity service.

          Hopefully, there will be enough competition among LLM providers that subscribers continue to have choices to move to non-manipulative models.