Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. the beautiful code

the beautiful code

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
226 Posts 135 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M [email protected]

    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.

    Z This user is from outside of this forum
    Z This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #148

    Holy shit someone on here that know how to use them. Surprised you haven't been downvoted into oblivion yet.

    1 Reply Last reply
    0
    • I [email protected]

      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.

      spankmonkey@lemmy.worldS This user is from outside of this forum
      spankmonkey@lemmy.worldS This user is from outside of this forum
      [email protected]
      wrote on last edited by [email protected]
      #149

      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.

      I 1 Reply Last reply
      0
      • G [email protected]

        you're a fool. chess has rules and is boxed into those rules. of course it's prime for AI.

        art is subjective, I don't see the appeal personally, but I'm more of a baroque or renaissance fan.

        I doubt you will but if you believe in what you say then this will only prove you right and me wrong.

        what is this?

        1000001583

        once you classify it, why did you classify it that way? is it because you personally have one? did you have to rule out what it isn't before you could identify what it could be? did you compare it to other instances of similar subjects?

        now, try to classify it as someone who doesn't have these. someone who has never seen one before. someone who hasn't any idea what it could be used for. how would you identify what it is? how it's used? are there more than one?

        now, how does AI classify it? does it comprehend what it is, even though it lacks a physical body? can it understand what it's used for? how it feels to have one?

        my point is, AI is at least 100 years away from instinctively knowing what a hand is. I doubt you had to even think about it and your brain automatically identified it as a hand, the most basic and fundamentally important features of being a human.

        if AI cannot even instinctively identify a hand as a hand, it's not possible for it to write software, because writing is based on human cognition and is entirely driven on instinct.

        like a master sculptor, we carve out the words from the ether to perform tasks that not only are required, but unseen requirements that lay beneath the surface that are only known through nuance. just like the sculptor that has to follow the veins within the marble.

        the AI you know today cannot do that, and frankly the hardware of today can't even support AI in achieving that goal, and it never will because of people like you promoting a half baked toy as a tool to replace nuanced human skills. only for this toy to poison pill the only training data available, that's been created through nuanced human skills.

        I'll just add, I may be an internet rando to you but you and your source are just randos to me. I'm speaking from my personal experience in writing software for over 25 years along with cleaning up all this AI code bullshit for at least two years.

        AI cannot code. AI writes regurgitated facsimiles of software based on it's limited dataset. it's impossible for it to make decisions based on human nuance and can only make calculated assumptions based on the available dataset.

        I don't know how much clearer I have to be at how limited AI is.

        Z This user is from outside of this forum
        Z This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #150

        LMFAO. He's right about your ego.

        G 1 Reply Last reply
        0
        • Z [email protected]

          "I'm not again LLMs I just never say anything useful about them and constantly point out how I can't use them." The other guy is right and you just prove his point.

          W This user is from outside of this forum
          W This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #151

          I don't see how that follows because I did point out in another comment that they are very useful if used like search engines or interactive stack overflow or Wikipedia.

          LLMs are extremely knowledgeable (as in they "know" a lot) but are completely dumb.

          If you want to anthropomorphise it, current LLMs are like a person that read the entire internet, remembered a lot of it, but still is too stupid to win/draw tic tac toe.

          So there is value in LLMs, if you use them for their knowledge.

          Z 1 Reply Last reply
          0
          • gmtom@lemmy.worldG [email protected]

            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.

            P This user is from outside of this forum
            P This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #152

            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

            S 1 Reply Last reply
            3
            • C [email protected]

              This is just your ego talking. You can't stand the idea that a computer could be better than you at something you devoted your life to. You're not special. Coding is not special. It happened to artists, chess players, etc. It'll happen to us too.

              I'll listen to experts who study the topic over an internet rando. AI model capabilities as yet show no signs of slowing their exponential growth.

              W This user is from outside of this forum
              W This user is from outside of this forum
              [email protected]
              wrote on last edited by [email protected]
              #153

              Coding isn't special you are right, but it's a thinking task and LLMs (including reasoning models) don't know how to think. LLMs are knowledgeable because they remembered a lot of the data and patterns of the training data, but they didn't learn to think from that. That's why LLMs can't replace humans.

              That does certainly not mean that software can't be smarter than humans. It will and it's just a matter of time, but to get there we likely have AGI first.

              To show you that LLMs can't think, try to play ASCII tic tac toe (XXO) against all those models. They are completely dumb even though it "saw" the entire Wikipedia article on how xxo works during training, that it's a solved game, different strategies and how to consistently draw - but still it can't do it. It loses most games against my four year old niece and she doesn't even play good/perfect xxo.

              I wouldn't trust anything, which is claimed to do thinking tasks, that can't even beat my niece in xxo, with writing firmware for cars or airplanes.

              LLMs are great if used like search engines or interactive versions of Wikipedia/Stack overflow. But they certainly can't think. For now, but likely we'll need different architectures for real thinking models than LLMs have.

              1 Reply Last reply
              1
              • irelephant@lemm.eeI [email protected]

                Ai code is specifically annoying because it looks like it would work, but its just plausible bullshit.

                K This user is from outside of this forum
                K This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #154

                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.

                C 1 Reply Last reply
                21
                • merc@sh.itjust.worksM [email protected]

                  No, I'm sure you're wrong. There's a certain cheerful confidence that you get from every LLM response. It's this upbeat "can do attitude" brimming with confidence mixed with subservience that is definitely not the standard way people communicate on the Internet, let alone Stack Overflow. Sure, sometimes people answering questions are overconfident, but it's often an arrogant kind of confidence, not a subservient kind of confidence you get from LLMs.

                  I don't think an LLM can sound like it lacks in confidence for the right reasons, but it can definitely pull off lack of confidence if it's prompted correctly. To actually lack confidence it would have to have an understanding of the situation. But, to imitate lack of confidence all it would need to do is draw on all the training data it has where the response to a question is one where someone lacks confidence.

                  Similarly, it's not like it actually has confidence normally. It's just been trained / meta-prompted to emit an answer in a style that mimics confidence.

                  L This user is from outside of this forum
                  L This user is from outside of this forum
                  [email protected]
                  wrote on last edited by [email protected]
                  #155

                  ChatGPT went through a phase of overly bubbly upbeat responses, they chilled it out tho. Not sure if that’s what you saw.

                  One thing is for sure with all of them, they never say “I don’t know” because such responses aren’t likely to be found in any training data!

                  It’s probably part of some system level prompt guidance too, like you say, to be confident.

                  merc@sh.itjust.worksM 1 Reply Last reply
                  0
                  • X [email protected]

                    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.

                    L This user is from outside of this forum
                    L This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #156

                    On one line of code you say?

                    *search & replaces all line breaks with spaces*

                    S 1 Reply Last reply
                    3
                    • gmtom@lemmy.worldG [email protected]

                      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.

                      A This user is from outside of this forum
                      A This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #157

                      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.

                      D umbraroze@slrpnk.netU 2 Replies Last reply
                      1
                      • L [email protected]

                        ChatGPT went through a phase of overly bubbly upbeat responses, they chilled it out tho. Not sure if that’s what you saw.

                        One thing is for sure with all of them, they never say “I don’t know” because such responses aren’t likely to be found in any training data!

                        It’s probably part of some system level prompt guidance too, like you say, to be confident.

                        merc@sh.itjust.worksM This user is from outside of this forum
                        merc@sh.itjust.worksM This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #158

                        I think "I don't know" might sometimes be found in the training data. But, I'm sure they optimize the meta-prompts so that it never shows up in a response to people. While it might be the "honest" answer a lot of the time, the makers of these LLMs seem to believe that people would prefer confident bullshit that's wrong over "I don't know".

                        1 Reply Last reply
                        1
                        • O [email protected]

                          I get a bit frustrated at it trying to replicate everyone else's code in my code base. Once my project became large enough, I felt it necessary to implement my own error handling instead of go's standard, which was not sufficient for me anymore. Copilot will respect that for a while, until I switch to a different file. At that point it will try to force standard go errors everywhere.

                          D This user is from outside of this forum
                          D This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #159

                          Yes, you can't use Copilot to generate files in your code structure way if you start from scratch. I usually start by coding a skaffold and then use Copilot to complete the rest, which works quite good most of the time. Another possibility is to create comment templates that will give instructions to Copilot. So every new Go file starts with coding structure comments and Copilot will respect that. Junior Devs might also respect that, but I am not so sure about them

                          1 Reply Last reply
                          0
                          • Z [email protected]

                            LMFAO. He's right about your ego.

                            G This user is from outside of this forum
                            G This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #160

                            thank you for your input obvious troll account.

                            Z 1 Reply Last reply
                            0
                            • P [email protected]

                              To be fair, if I wrote 3000 new lines of code in one shot, it probably wouldn’t run either.

                              LLMs are good for simple bits of logic under around 200 lines of code, or things that are strictly boilerplate. People who are trying to force it to do things beyond that are just being silly.

                              iavicenna@lemmy.worldI This user is from outside of this forum
                              iavicenna@lemmy.worldI This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #161

                              I am on you with this one. It is also very helpful in argument heavy libraries like plotly. If I ask a simple question like "in plotly how do I do this and that to the xaxis" etc it generally gives correct answers, saving me having to do internet research for 5-10 minutes or read documentations for functions with 1000 inputs. I even managed to get it to render a simple scene of cloud of points with some interactivity in 3js after about 30 minutes of back and forth. Not knowing much javascript, that would take me at least a couple hours. So yeah it can be useful as an assistant to someone who already knows coding (so the person can vet and debug the code).

                              Though if you weigh pros and cons of how LLMs are used (tons of fake internet garbage, tons of energy used, very convincing disinformation bots), I am not convinced benefits are worth the damages.

                              S 1 Reply Last reply
                              1
                              • spankmonkey@lemmy.worldS [email protected]

                                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.

                                I This user is from outside of this forum
                                I This user is from outside of this forum
                                [email protected]
                                wrote on last edited by [email protected]
                                #162

                                I never said discussing LLMs was itself philosophical. I said that as soon as you ask the question "but does it really know?" then you are immediately entering the territory of the theory of knowledge, whether you're talking about humans, about dogs, about bees, or, yes, about AI.

                                1 Reply Last reply
                                0
                                • X [email protected]

                                  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.

                                  N This user is from outside of this forum
                                  N This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #163

                                  The ideal code is no code at all

                                  R 1 Reply Last reply
                                  4
                                  • captain_aggravated@sh.itjust.worksC [email protected]

                                    Well I've got the name for my autobiography now.

                                    runeko@programming.devR This user is from outside of this forum
                                    runeko@programming.devR This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #164

                                    "Specifically Annoying" or "Plausible Bullshit"? I'd buy the latter.

                                    1 Reply Last reply
                                    0
                                    • M [email protected]

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

                                      I This user is from outside of this forum
                                      I This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #165

                                      Dude.. the point is I don't have to be. I just have to be human and use it. If it sucks, I am gonna say that.

                                      1 Reply Last reply
                                      0
                                      • K [email protected]

                                        So its 50% better than my code?

                                        I This user is from outside of this forum
                                        I This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #166

                                        If the code cannot uphold correctness, it is 0% better than your code.

                                        1 Reply Last reply
                                        0
                                        • 1984@lemmy.today1 [email protected]

                                          Its like having a junior developer with a world of confidence just change shit and spend hours breaking things and trying to fix them, while we pay big tech for the privilege of watching the chaos.

                                          I asked chat gpt to give me a simple squid proxy config today that blocks everything except https. It confidently gave me one but of course it didnt work. It let through http and despite many attempts to get a working config that did that, it just failed.

                                          So yeah in the end i have to learn squid syntax anyway, which i guess is fine, but I spent hours trying to get a working config because we pay for chat gpt to do exactly that....

                                          N This user is from outside of this forum
                                          N This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #167

                                          I have a friend who swears by llms, he sais it helps him a lot. I once watched him do it, and the experience was exactly the same you described. He wasted couple of hours fighting with bullshit generator just to do everything himself anyway. I asked him wouldn't it be better to not waste the time, but he didn't really saw the problem, he gaslit himself that fighting with the idiot machine helped.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups