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.
  • A [email protected]

    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 This user is from outside of this forum
    D This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #168

    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?!?

    A 1 Reply Last reply
    3
    • codiunicorn@programming.devC [email protected]
      This post did not contain any content.
      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
      #169

      Write tests and run them, reiterate until all tests pass.

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

        But not just text

        Also that's not converse to what the parent comment said

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

        Did you want to converse about conversing?

        1 Reply Last reply
        1
        • A [email protected]

          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.

          umbraroze@slrpnk.netU This user is from outside of this forum
          umbraroze@slrpnk.netU This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #171

          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.

          1 Reply Last reply
          0
          • B [email protected]

            Write tests and run them, reiterate until all tests pass.

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

            That doesn't sound viby to me, though. You expect people to actually code? /s

            A 1 Reply Last reply
            7
            • K [email protected]

              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 This user is from outside of this forum
              C This user is from outside of this forum
              [email protected]
              wrote on last edited by [email protected]
              #173

              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.

              J 1 Reply Last reply
              3
              • O [email protected]

                well, it only took 2 years to go from the cursed will smith eating spaghetti video to veo3 which can make completely lifelike videos with audio. so who knows what the future holds

                kazerniel@lemmy.worldK This user is from outside of this forum
                kazerniel@lemmy.worldK This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #174

                cursed will smith eating spaghetti video

                oh gods, why did I look it up

                1 Reply Last reply
                0
                • D [email protected]

                  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?!?

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

                  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.

                  1 Reply Last reply
                  0
                  • C [email protected]

                    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.

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

                    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.

                    C 1 Reply Last reply
                    6
                    • isveryloud@lemmy.caI [email protected]

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

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

                      Just be carerul when refactoring variable names in doc comments, I've seen some weird stuff happen there

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

                        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 This user is from outside of this forum
                        S This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #178

                        Why do you want AI to save you for learning and understanding the tools you use?

                        iavicenna@lemmy.worldI 1 Reply Last reply
                        0
                        • C [email protected]

                          That doesn't sound viby to me, though. You expect people to actually code? /s

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

                          You can vibe code the tests too y'know

                          C N 2 Replies Last reply
                          5
                          • merc@sh.itjust.worksM [email protected]

                            It confidently gave me one

                            IMO, that's one of the biggest "sins" of the current LLMs, they're trained to generate words that make them sound confident.

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

                            Sycophants.

                            1 Reply Last reply
                            0
                            • J [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.

                              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.

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

                              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 J 2 Replies Last reply
                              0
                              • A [email protected]

                                You can vibe code the tests too y'know

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

                                You know, I'd be interested to know what the critical size you can get to with that approach is before it becomes useless.

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

                                  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 This user is from outside of this forum
                                  S This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #183

                                  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

                                  1 Reply Last reply
                                  0
                                  • M [email protected]

                                    This made me laugh so hard one of the dogs came to check in on me.

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

                                    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 1 Reply Last reply
                                    1
                                    • 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

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

                                      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.

                                      P 1 Reply Last reply
                                      4
                                      • P [email protected]

                                        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.

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

                                        The AI code my “expert in a related but otherwise not helpful field” coworker writes helps me have a lot of extra work to do!

                                        1 Reply Last reply
                                        1
                                        • S [email protected]

                                          Why do you want AI to save you for learning and understanding the tools you use?

                                          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 [email protected]
                                          #187

                                          If you do it through AI you can still learn. After all I go through the code to understand what is going on. And for not so complex tasks LLMs are good at commenting the code (though it can bullshit from time to time so you have to approach it critically).

                                          But anyways the stuff I ask LLMs are generally just one off tasks. If I need to use something more frequently, I do prefer reading stuff for more in depth understanding.

                                          1 Reply Last reply
                                          1
                                          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