• Sonalder@lemmy.ml
    link
    fedilink
    arrow-up
    15
    arrow-down
    2
    ·
    15 hours ago

    You cannot, that’s why reproducible builds are hard. Modern compiler are made with compilers (egg/chicken problem) not assembly nor machine code and you always loose some perfect prediction.

    Yes LLMs are less predictible than compiler but their output is readable to human, while machine code is very hard (yet not impossible).

    Is that a bad things that 99% of devs have forgot how to write code cutting holes in paper? Tools are changing and while a direct comparison between the move from paper to COBOL or assembly to C is not the same as python to LLM generated it’s hard to deny that LLM will change how human write code.

    • Doomsider@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      15 hours ago

      Thanks for that explanation. Are you saying that if I rebuild the exact same code on the same machine I could get different results for a given compiler? I think this would render solutions like docker useless. Could you elaborate?

      • Sonalder@lemmy.ml
        link
        fedilink
        arrow-up
        7
        arrow-down
        3
        ·
        15 hours ago

        Yes you can get a different result. Compilers are designed to be deterministic, but a build is more than the compiler. Usually the bytes differ but the behavior is identical.

        Docker is far from being reproducible!

        It works on my machine ≠ reproducible. But reproducible will make it works on your machine.

        Using a compiler does not guarantee you to get byte-perfect output each time, especially not on different machines.

        • Doomsider@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          15 hours ago

          Yes, that is a great explanation. Thank you.

          That is, of course, the whole point of docker (making sure the results of compiling are identical). I totally get the different machines giving slightly different results. This is not really in the same realm of the dramatically different output a LLM will give though.

          • Sonalder@lemmy.ml
            link
            fedilink
            arrow-up
            6
            ·
            14 hours ago

            No the goal of Docker is not to make sure the results of compiling are identitcal. It is to make it work on your machine, there is some nuance to it.

            This is more the goal of something like nixpkgs (NixOS).

            This is not really in the same realm of the dramatically different output a LLM will give though.

            Yes this is not same realm but my point was that eve if LLM would give you different results each time the result is transparent and editable. Also developers tools evolve and Linus have more technical knowledge to use this tool in a way that will gave him satisfying result than me or a junior dev with 1.5 years of experience. He was against LLM generated code a few years ago, not because he hated on AI but because this tool was giving him unsatisfiying results. If compilers were not working 50% of the time he would probably write everything in assembly. LLM models and their coding harness cannot be compared to what they were 2 years ago. And most of the devs are using them. Will that transform bad devs into good ones? Probably not. Does that mean that LLM generated or assisted code is the way to go? Not necessarly. But it means that it’s a tool that find its use in the majority of development teams and thus that they find it quite useful.

            There is some issues with it and I’m not here to deny them. Whether they are social, environmental, capitalist, monopolist, learning. Like every new disruptive tool we use them in ways we won’t in the future and I think it’s similar with AI.