• @coherent_domain@infosec.pub
    link
    fedilink
    English
    143
    edit-2
    10 days ago

    The image is taken from Zhihu, a Chinese Quora-like site.

    The prompt is talking about give a design of a certain app, and the response seems to talk about some suggested pages. So it doesn’t seem to reflect the text.

    But this in general aligns with my experience coding with llm. I was trying to upgrade my eslint from 8 to 9, and ask chatgpt to convert my eslint file, and it proceed to spit out complete garbage.

    I thought this would be a good task for llm because eslint config is very common and well-documented, and the transformation is very mechanical, but it just cannot do it. So I proceed to read the documents and finished the migration in a couple hour…

    • Lucy :3
      link
      fedilink
      7410 days ago

      I asked ChatGPT with help about bare metal 32-bit ARM (For the Pi Zero W) C/ASM, emulated in QEMU for testing, and after the third iteration of “use printf for output” -> “there’s no printf with bare metal as target” -> “use solution X” -> “doesn’t work” -> “ude printf for output” … I had enough.

      • Björn Tantau
        link
        fedilink
        1810 days ago

        I used ChatGPT to help me make a package with SUSE’s Open Build Service. It was actually quite good. Was pulling my hair out for a while until I noticed that the project I wanted to build had changes URLs and I was using an outdated one.

        In the end I just had to get one last detail right. And then my ChatGPT 4 allowance dried up and they dropped me back down to 3 and it couldn’t do anything. So I had to use my own brain, ugh.

        • @noctivius@lemm.ee
          link
          fedilink
          English
          910 days ago

          chatgpt is worse among biggest chatbots with writing codes. From my experience Deepseek > Perplexity > Gemini > Claude.

      • Scrubbles
        link
        fedilink
        English
        510 days ago

        Yeah you can tell it just ratholes on trying to force one concept to work rather than realizing it’s not the correct concept to begin with

        • @formulaBonk@lemm.ee
          link
          fedilink
          English
          610 days ago

          That’s exactly what most junior devs do when stuck. They rehash the same solution over and over and it almost seems like that llms trained on code bases infer that behavior from commit histories etc.

          It almost feels like on of those “we taught him these tasks incorrectly as a joke” scenarios

      • @qqq@lemmy.world
        link
        fedilink
        2
        edit-2
        10 days ago

        QEMU makes it pretty painless to hook up gdb just FYI; you should look into that. I think you can also have it provide a memory mapped UART for I/O which you can use with newlib to get printf debugging

        • Lucy :3
          link
          fedilink
          110 days ago

          The latter is what I tried, and also kinda wanted ChatGPT to do, which it refused

        • Lucy :3
          link
          fedilink
          18 days ago

          Yes, that was the plan, which ChatGPT refused to do

    • @petey@aussie.zone
      link
      fedilink
      08 days ago

      I used Claude 3.7 to upgrade my eslint configs to flat and upgrade from v7 to v9 with Roo Code and it did it perfectly

    • @kkj@lemmy.dbzer0.com
      link
      fedilink
      English
      439 days ago

      And that’s what happens when you spend a trillion dollars on an autocomplete: amazing at making things look like whatever it’s imitating, but with zero understanding of why the original looked that way.

      • @CanadaPlus@lemmy.sdf.org
        link
        fedilink
        6
        edit-2
        9 days ago

        I mean, there’s about a billion ways it’s been shown to have actual coherent originality at this point, and so it must have understanding of some kind. That’s how I know I and other humans have understanding, after all.

        What it’s not is aligned to care about anything other than making plausible-looking text.

        • @Jtotheb@lemmy.world
          link
          fedilink
          119 days ago

          Coherent originality does not point to the machine’s understanding; the human is the one capable of finding a result coherent and weighting their program to produce more results in that vein.

          Your brain does not function in the same way as an artificial neural network, nor are they even in the same neighborhood of capability. John Carmack estimates the brain to be four orders of magnitude more efficient in its thinking; Andrej Karpathy says six.

          And none of these tech companies even pretend that they’ve invented a caring machine that they just haven’t inspired yet. Don’t ascribe further moral and intellectual capabilities to server racks than do the people who advertise them.

          • @CanadaPlus@lemmy.sdf.org
            link
            fedilink
            2
            edit-2
            8 days ago

            Coherent originality does not point to the machine’s understanding; the human is the one capable of finding a result coherent and weighting their program to produce more results in that vein.

            You got the “originality” part there, right? I’m talking about tasks that never came close to being in the training data. Would you like me to link some of the research?

            Your brain does not function in the same way as an artificial neural network, nor are they even in the same neighborhood of capability. John Carmack estimates the brain to be four orders of magnitude more efficient in its thinking; Andrej Karpathy says six.

            Given that both biological and computer neural nets very by orders of magnitude in size, that means pretty little. It’s true that one is based on continuous floats and the other is dynamic peaks, but the end result is often remarkably similar in function and behavior.

              • @CanadaPlus@lemmy.sdf.org
                link
                fedilink
                16 days ago

                I actually was going to link the same one I always do, which I think I heard about through a blog or talk. If that’s not good enough, it’s easy to devise your own test and put it to an LLM. The way you phrased that makes it sound like you’re more interested in ignoring any empirical evidence, though.

                • @Jtotheb@lemmy.world
                  link
                  fedilink
                  13 days ago

                  That’s unreal. No, you cannot come up with your own scientific test to determine a language model’s capacity for understanding. You don’t even have access to the “thinking” side of the LLM.

    • @petey@aussie.zone
      link
      fedilink
      28 days ago

      It needs good feedback. Agentic systems like Roo Code and Claude Code run compilers and tests until it works (just gotta make sure to tell it to leave the tests alone)

  • @Xerxos@lemmy.ml
    link
    fedilink
    8710 days ago

    All programs can be written with on less line of code. All programs have at least one bug.

    By the logical consequences of these axioms every program can be reduced to one line of code - that doesn’t work.

    One day AI will get there.

    • Lemminary
      link
      fedilink
      169 days ago

      On one line of code you say?

      *search & replaces all line breaks with spaces*

    • @gmtom@lemmy.world
      link
      fedilink
      119 days ago

      All programs can be written with on less line of code. All programs have at least one bug.

      The humble “Hello world” would like a word.

      • @Amberskin@europe.pub
        link
        fedilink
        199 days ago

        Just to boast my old timer credentials.

        There is an utility program in IBM’s mainframe operating system, z/OS, that has been there since the 60s.

        It has just one assembly code instruction: a BR 14, which means basically ‘return’.

        The first version was bugged and IBM had to issue a PTF (patch) to fix it.

        • @DaPorkchop_@lemmy.ml
          link
          fedilink
          89 days ago

          Okay, you can’t just drop that bombshell without elaborating. What sort of bug could exist in a program which contains a single return instruction?!?

          • @Amberskin@europe.pub
            link
            fedilink
            29 days ago

            It didn’t clear the return code. In mainframe jobs, successful executions are expected to return zero (in the machine R15 register).

            So in this case fixing the bug required to add an instruction instead of removing one.

        • Rose
          link
          fedilink
          39 days ago

          Reminds me of how in some old Unix system, /bin/true was a shell script.

          …well, if it needs to just be a program that returns 0, that’s a reasonable thing to do. An empty shell script returns 0.

          Of course, since this was an old proprietary Unix system, the shell script had a giant header comment that said this is proprietary information and if you disclose this the lawyers will come at ya like a ton of bricks. …never mind that this was a program that literally does nothing.

      • @phx@lemmy.ca
        link
        fedilink
        89 days ago

        You can fit an awful lot of Perl into one line too if you minimize it. It’ll be completely unreadable to most anyone, but it’ll run

        • Schadrach
          link
          fedilink
          English
          28 days ago

          Qrpff says hello. Or, rather, decrypts DVD movies in 472 bytes of code, 531 if you want the fast version that can do it in real time. The Wikipedia article on it includes the full source code of both.

          https://wikipedia.org/wiki/Qrpff

  • haui
    link
    fedilink
    7610 days ago

    Welp. Its actually very in line with the late stage capitalist system. All polish, no innovation.

    • @Saleh@feddit.org
      link
      fedilink
      5010 days ago

      My uncle. Very smart very neuronal. He knows the entire Internet, can you imagine? the entire internet. Like the mails of Crooked Hillary Clinton, that crook. You know what stands in that Mails? my uncle knows. He makes the best code. The most beautiful code. No one has ever seen code like it, but for him, he’s a genius, like i am, i have inherited all his genius genes. It is very easy. He makes the best code. Sometimes he calls me and asks me: you are even smarter than i am. Can you look at my code?

  • @SoftestSapphic@lemmy.world
    link
    fedilink
    60
    edit-2
    9 days ago

    Watching the serious people trying to use AI to code gives me the same feeling as the cybertruck people exploring the limits of their car. XD

    “It’s terrible and I should hate it, but gosh it it isn’t just so cool”

    I wish i could get so excited over disappointing garbage

    • @person420@lemmynsfw.com
      link
      fedilink
      118 days ago

      You definitely could use AI to code, the catch is you need to know how to code first.

      I use AI to write code for mundane tasks all the time. I also review and integrate the code myself.

  • @LanguageIsCool@lemmy.world
    link
    fedilink
    4310 days ago

    I’ve heard that a Claude 4 model generating code for an infinite amount of time will eventually simulate a monkey typing out Shakespeare

    • @MonkeMischief@lemmy.today
      link
      fedilink
      139 days ago

      It will have consumed the GigaWattHours capacity of a few suns and all the moisture in our solar system, but by Jeeves, we’ll get there!

      …but it won’t be that impressive once we remember concepts like “monkey, typing, Shakespeare” were already embedded in the training data.

    • Match!!
      link
      fedilink
      English
      4110 days ago

      llms are systems that output human-readable natural language answers, not true answers

    • @zurohki@aussie.zone
      link
      fedilink
      English
      1310 days ago

      It generates an answer that looks correct. Actual correctness is accidental. That’s how you wind up with documents with references that don’t exist, it just knows what references look like.

      • snooggums
        link
        fedilink
        English
        12
        edit-2
        10 days ago

        It doesn’t ‘know’ anything. It is glorified text autocomplete.

        The current AI is intelligent like how Hoverboards hover.

        • Oniononon
          link
          fedilink
          English
          9
          edit-2
          10 days ago

          Llms are the smartest thing ever on subjects you have no fucking clue on. On subjects you have at least 1 year experience with it suddenly becomes the dumbest shit youve ever seen.

            • @capybara@lemm.ee
              link
              fedilink
              English
              310 days ago

              You could claim that it knows the pattern of how references are formatted, depending on what you mean by the word know. Therefore, 100% uninteresting discussion of semantics.

              • @irmoz@lemmy.world
                link
                fedilink
                English
                3
                edit-2
                10 days ago

                The theory of knowledge (epistemology) is a distinct and storied area of philosophy, not a debate about semantics.

                There remains to this day strong philosophical debate on how we can be sure we really “know” anything at all, and thought experiments such as the Chinese Room illustrate that “knowing” is far, far more complex than we might believe.

                For instance, is it simply following a set path like a river in a gorge? Is it ever actually “considering” anything, or just doing what it’s told?

                • @capybara@lemm.ee
                  link
                  fedilink
                  English
                  210 days ago

                  No one cares about the definition of knowledge to this extent except for philosophers. The person who originally used the word “know” most definitely didn’t give a single shit about the philosophical perspective. Therefore, you shitting yourself a word not being used exactly as you’d like instead of understanding the usage in the context is very much semantics.

        • @malin@thelemmy.club
          link
          fedilink
          4
          edit-2
          10 days ago

          This is a philosophical discussion and I doubt you are educated or experienced enough to contribute anything worthwhile to it.

            • snooggums
              link
              fedilink
              English
              310 days ago

              Trying to treat the discussion as a philisophical one is giving more nuance to ‘knowing’ than it deserves. An LLM can spit out a sentence that looks like it knows something, but it is just pattern matching frequency of word associations which is mimicry, not knowledge.

              • @irmoz@lemmy.world
                link
                fedilink
                English
                1
                edit-2
                9 days ago

                I’ll preface by saying I agree that AI doesn’t really “know” anything and is just a randomised Chinese Room. However…

                Acting like the entire history of the philosophy of knowledge is just some attempt make “knowing” seem more nuanced is extremely arrogant. The question of what knowledge is is not just relevant to the discussion of AI, but is fundamental in understanding how our own minds work. When you form arguments about how AI doesn’t know things, you’re basing it purely on the human experience of knowing things. But that calls into question how you can be sure you even know anything at all. We can’t just take it for granted that our perceptions are a perfect example of knowledge, we have to interrogate that and see what it is that we can do that AIs can’t- or worse, discover that our assumptions about knowledge, and perhaps even of our own abilities, are flawed.

                • snooggums
                  link
                  fedilink
                  English
                  1
                  edit-2
                  9 days ago

                  Acting like the entire history of the philosophy of knowledge is just some attempt make “knowing” seem more nuanced is extremely arrogant.

                  That is not what I said. In fact, it is the opposite of what I said.

                  I said that treating the discussion of LLMs as a philosophical one is giving ‘knowing’ in the discussion of LLMs more nuance than it deserves.

          • snooggums
            link
            fedilink
            English
            310 days ago

            I asked ChatDVP for a response to your post and it said you weren’t funny.

              • snooggums
                link
                fedilink
                English
                110 days ago

                At first I thought that might be a Pepsi reference, but you are probably too young to know about that.

  • @markstos@lemmy.world
    link
    fedilink
    2510 days ago

    This weekend I successfully used Claude to add three features in a Rust utility I had wanted for a couple years. I had opened issue requests, but no else volunteered. I had tried learning Rust, Wayland and GTK to do it myself, but the docs at the time weren’t great and the learning curve was steep. But Claude figured it all out pretty quick.

        • @coherent_domain@infosec.pub
          link
          fedilink
          English
          9
          edit-2
          10 days ago

          This is interesting, I would be quite impressed if this PR got merged without additional changes.

          I am genuinely curious and no judgement at all, since you mentioned that you are not a rust/GTK expert, are you able to read and and have a decent understanding of the output code?

          For example, in the sway.rs file, you uncommented a piece of code about floating nodes in get_all_windows function, do you know why it is uncommented? (again, not trying to judge; it is a genuine question. I also don’t know rust or GTK, just curious.

          • @markstos@lemmy.world
            link
            fedilink
            610 days ago

            This is interesting, I would be quite impressed if this PR got merged without additional changes.

            We’ll see. Whether it gets merged in any form, it’s still a big win for me because I finally was able to get some changes implemented that I had been wanting for a couple years.

            are you able to read and and have a decent understanding of the output code?

            Yes. I know other coding languages and CSS. Sometimes Claude generated code that was correct but I thought it was awkward or poor, so I had it revise. For example, I wanted to handle a boolean case and it added three booleans and a function for that. I said no, you can use a single boolean for all that. Another time it duplicated a bunch of code for the single and multi-monitor cases and I had it consolidate it.

            In one case, It got stuck debugging and I was able to help isolate where the error was through testing. Once I suggested where to look harder, it was able to find a subtle issue that I couldn’t spot myself. The labels were appearing far too small at one point, but I couldn’t see that Claude had changed any code that should affect the label size. It turned out two data structures hadn’t been merged correctly, so that default values weren’t getting overridden correctly. It was the sort of issue I could see a human dev introducing on the first pass.

            do you know why it is uncommented?

            Yes, that’s the fix for supporting floating windows. The author reported that previously there was a problem with the z-index of the labels on these windows, so that’s apparently why it was implemented but commented out. But it seems due to other changes, that problem no longer exists. I was able to test that labels on floating windows now work correctly.

            Through the process, I also became more familiar with Rust tooling and Rust itself.

  • dumnezero
    link
    fedilink
    English
    2010 days ago

    Try to get one of these LLMs to update a package.json.

  • @TheReturnOfPEB@reddthat.com
    link
    fedilink
    English
    17
    edit-2
    10 days ago

    I’m pretty sure that is how we got CORBA

    now just make it construct UML models and then abandon this and move onto version 2

  • Drunk & Root
    link
    fedilink
    1310 days ago

    cant wait to see “we use AI agents to generate well structured non-functioning code” with off centered everything and non working embeds on the website

  • sturger
    link
    fedilink
    English
    1210 days ago

    Honest question: I haven’t used AI much. Are there any AIs or IDEs that can reliably rename a variable across all instances in a medium sized Python project? I don’t mean easy stuff that an editor can do (e.g. rename QQQ in all instances and get lucky that there are no conflicts). I mean be able to differentiate between local and/or library variables so it doesn’t change them, only the correct versions.

    • @barsoap@lemm.ee
      link
      fedilink
      2210 days ago

      Not reliably, no. Python is too dynamic to do that kind of thing without solving general program equivalence which is undecidable.

      Use a static language, problem solved.

    • @trolololol@lemmy.world
      link
      fedilink
      189 days ago

      I’m going to laugh in Java, where this has always been possible and reliable. Not like ai reliable, but expert reliable. Because of static types.

    • bitwolf
      link
      fedilink
      English
      139 days ago

      For the most part “Rename symbol” in VSCode will work well. But it’s limited by scope.

      • sturger
        link
        fedilink
        English
        49 days ago

        Yeah, I’m looking for something that would understand the operation (? insert correct term here) of the language well enough to rename intelligently.

    • @lapping6596@lemmy.world
      link
      fedilink
      1110 days ago

      I use pycharm for this and in general it does a great job. At work we’ve got some massive repos and it’ll handle it fine.

      The “find” tab shows where it’ll make changes and you can click “don’t change anything in this directory”

      • setVeryLoud(true);
        link
        fedilink
        49 days ago

        Yes, all of JetBrains’ tools handle project-wide renames practically perfectly, even in weirder things like Angular projects where templates may reference variables.

    • @derpgon@programming.dev
      link
      fedilink
      109 days ago

      IntelliJ IDEA, if it knows it is the same variable, it will rename it. Usually works in a non fucked up codebase that uses eval or some obscure constructs like saving a variable name into a variable as a string and dynamically invoking it.

    • @killabeezio@lemm.ee
      link
      fedilink
      610 days ago

      Itellij is actually pretty good at this. Besides that, cursor or windsurf should be able to. I was using cursor for a while and when I needed to reactor something, it was pretty good at picking that up. It kept crashing on me though, so I am now trying windsurf and some other options. I am missing the auto complete features in cursor though as I would use this all the time to fill out boilerplate stuff as I write.

      The one key difference in cursor and windsurf when compared to other products is that it will look at the entire context again for any changes or at least a little bit of it. You make a change, it looks if it needs to make changes elsewhere.

      I still don’t trust AI to do much though, but it’s an excellent helper

    • @pinball_wizard@lemmy.zip
      link
      fedilink
      410 days ago

      Okay, I realize I’m that person, but for those interested:

      tree, cat and sed get the job done nicely.

      And… it’s my nap time, now. Please keep the Internet working, while I’m napping. I have grown fond of parts of it. Goodnight.

    • @LeroyJenkins@lemmy.world
      link
      fedilink
      310 days ago

      most IDEs are pretty decent at it if you configure them correctly. I used intelliJ and it knows the difference. use the refactor feature and it’ll crawl references, not just rename all instances.