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]

    I recently tried it for scripting simple things in python for a game. Yaknow, change char's color if they are targetted. It output a shitton of word salad and code about my specific use case in the specific scripting jargon for the game.

    It all based on "Misc.changeHue(player)". A function that doesn't exist and never has, because the game is unable to color other mobs / players like that for scripting.

    Anything I tried with AI ends up the same way. Broken code in 10 lines of a script, halucinations and bullshit spewed as the absolute truth. Anything out of the ordinary is met with "yes this can totally be done, this is how" and "how" doesn't work, and after sifting forums / asking devs you find out "sadly that's impossible" or "we dont actually use cpython so libraries don't work like that" etc.

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

    It's possible the library you're using doesn't have enough training data attached to it.

    I use AI with python for hundreds line data engineering tasks and it nails it frequently.

    1 Reply Last reply
    0
    • B [email protected]

      I tried, it can't get trough four lines without messing up. Unless I give it tasks that are so stupendously simple that I'm faster typing them myself while watching tv

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

      Four lines? Let's have realistic discussions, you're just intentionally arguing in bad faith or extremely bad at prompting AI.

      B 1 Reply Last reply
      0
      • N [email protected]

        The ideal code is no code at all

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

        nocode

        1 Reply Last reply
        0
        • C [email protected]

          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...

          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
          #196

          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

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

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

            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
            #197

            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)

            1 Reply Last reply
            1
            • ikidd@lemmy.worldI [email protected]

              On Error Resume Next

              artvandelay@lemmy.worldA This user is from outside of this forum
              artvandelay@lemmy.worldA This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #198

              1 Reply Last reply
              3
              • B [email protected]

                It can become pretty bad quickly, with just a small project with only 15-20 files. I've been using cursor IDE, building out flow charts & tests manually, and just seeing where it goes.

                And while incredibly impressive how it's creating all the steps, it then goes into chaos mode where it will start ignoring all the rules. It'll start changing tests, start pulling in random libraries, not at all thinking holistically about how everything fits together.

                Then you try to reel it in, and it continues to go rampant. And for me, that's when I either take the wheel or roll back.

                I highly recommend every programmer watch it in action.

                aeri@lemmy.worldA This user is from outside of this forum
                aeri@lemmy.worldA This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #199

                I think Generative AI is a genuinely promising and novel tool with real, valuable applications. To appreciate it however, you have to mentally compartmentalize the irresponsible, low-effort ways people sometimes mostly use it—because yeah, it's very easy to make a lot of that so that's most of what you see when you hear "Generative AI" and it's become its reputation...

                Like I've had interesting "conversations" with Gemini and ChatGPT, I've actually used them to solve problems. But I would never put it in charge of anything critically important that I couldn't double check against real data if I sensed the faintest hint of a problem.

                I also don't think it's ready for primetime. Does it deserve to be researched and innovated upon? Absolutely, but like, by a few nerds who manage to get it running, and universities training it on data they have a license to use. Not "Crammed into every single technology object on earth for no real reason".

                I have brain not very good sometimes disease and I consider being able to "talk" to a "person" who can get me out of a creative rut just by exploring my own feelings a bit. GPT can actually listen to music which surprised me. I consider it scientifically interesting. It doesn't get bored or angry at you unless you like, tell it to? I've asked it for help with a creative task in the past and not actually used any of its suggestions at all, but being able to talk about it with someone (when a real human who cared was not available) was a valuable resource.

                To be clear I pretty much just use it as a fancy chatbot and don't like, just copy paste its output like some people do.

                1 Reply Last reply
                1
                • Z [email protected]

                  Oh my goodness, that's adorable and sweet of your dog! Also, I'm so glad you had such a big laugh. I love when that happens.

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

                  He’s a sweet guy. … Mostly. Very much in need of a lot of attention. Sometimes he just sits next to you on the couch and puts his paw on you if you’re not giving him enough attention.

                  Here he is posing with his sister as a prop:
                  A black and white heeler resting his head on a white and brown pit bull

                  Z 1 Reply Last reply
                  1
                  • 30p87@feddit.org3 [email protected]

                    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.

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

                    Can't you just send prints to serial?

                    30p87@feddit.org3 1 Reply Last reply
                    0
                    • softestsapphic@lemmy.worldS [email protected]

                      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

                      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
                      #202

                      It's useful if you just don't do....That. it's just a new fancy search engin, it's a bit better than going to stack overflow, it can do good stuff if you go small.

                      Just don't do whatever this post suggested of doing...

                      1 Reply Last reply
                      1
                      • J This user is from outside of this forum
                        J This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #203

                        I think the main barriers are context length (useful context. GPT-4o has "128k context" but it's mostly sensitive to the beginning and end of the context and blurry in the middle. This is consistent with other LLMs), and just data not really existing. How many large scale, well written, well maintained projects are really out there? Orders of magnitude less than there are examples of "how to split a string in bash" or "how to set up validation in spring boot". We might "get there", but it'll take a whole lot of well written projects first, written by real humans, maybe with the help of AI here and there. Unless, that is, we build it with the ability to somehow learn and understand faster than humans.

                        1 Reply Last reply
                        1
                        • C [email protected]

                          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.

                          borari@lemmy.dbzer0.comB This user is from outside of this forum
                          borari@lemmy.dbzer0.comB This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #204

                          It’s true that one is based on continuous floats and the other is dynamic peaks

                          Can you please explain what you’re trying to say here?

                          C 1 Reply Last reply
                          0
                          • V [email protected]

                            Can't you just send prints to serial?

                            30p87@feddit.org3 This user is from outside of this forum
                            30p87@feddit.org3 This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #205

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

                            1 Reply Last reply
                            0
                            • S [email protected]

                              Four lines? Let's have realistic discussions, you're just intentionally arguing in bad faith or extremely bad at prompting AI.

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

                              You can prove your point easily: show us a prompt that gives us a decent amount of code that isn't stupidly simple or sufficiently common that I don't just copy paste the first google result

                              S 1 Reply Last reply
                              0
                              • M [email protected]

                                He’s a sweet guy. … Mostly. Very much in need of a lot of attention. Sometimes he just sits next to you on the couch and puts his paw on you if you’re not giving him enough attention.

                                Here he is posing with his sister as a prop:
                                A black and white heeler resting his head on a white and brown pit bull

                                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
                                #207

                                Oh my goodness, he sounds precious! I've had a sweet and needy dog like that in the past, too. It can be a lot, but I loved it (and miss it,) haha.

                                Both your dogs are very cute! You and your pups gave me a much-needed smile. Thank you for that. 🙂 Please give them some pets from me!

                                1 Reply Last reply
                                0
                                • C [email protected]

                                  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.

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

                                  If you would like to link some abstracts you find in a DuckDuckGo search that’s fine.

                                  C 1 Reply Last reply
                                  1
                                  • B [email protected]

                                    You can prove your point easily: show us a prompt that gives us a decent amount of code that isn't stupidly simple or sufficiently common that I don't just copy paste the first google result

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

                                    I have nothing to prove to you if you wish to keep doing everything by hand that's fine.

                                    But there are plenty of engineers l3 and beyond including myself using this to lighten their workload daily and acting like that isn't the case is just arguing in bad faith or you don't work in the industry.

                                    B 1 Reply Last reply
                                    0
                                    • S [email protected]

                                      I have nothing to prove to you if you wish to keep doing everything by hand that's fine.

                                      But there are plenty of engineers l3 and beyond including myself using this to lighten their workload daily and acting like that isn't the case is just arguing in bad faith or you don't work in the industry.

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

                                      I do use it, it's handy for some sloppy css for example. Emphasis on sloppy. I was kinda hoping you actually had something there

                                      1 Reply Last reply
                                      0
                                      • T [email protected]

                                        The cursed Will Smith eating spaghetti wasn't the best video AI model available at the time, just what was available for consumers to run on their own hardware at the time. So while the rate of improvement in AI image/video generation is incredible, it's not quite as incredible as that viral video would suggest

                                        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
                                        #211

                                        But wouldn't you point still be true today that the best AI video models today would be the onces that are not available for consumers?

                                        T 1 Reply Last reply
                                        0
                                        • W [email protected]

                                          But wouldn't you point still be true today that the best AI video models today would be the onces that are not available for consumers?

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

                                          Probably is still true, but I've not been paying close attention to the AI market in the last couple of years. But the point I was trying to make was that it's an apples to oranges comparison

                                          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