If only some sort of newfangled technology could come along

  • funkless_eck@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    3 days ago

    hey now but what if I want my code to be like

     if gun.is_valid and not gun == null and gun.id != null:
            shoot()
    
      func shoot():
             fire(gun):
    
    
        func fire(gun):
              if gun.is_valid and not gun == null and gun.id != null:
                       weapon_activate(gun)
    
    • sp3ctr4l@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      2 days ago

      Why… why are these nested… owwww my brain.

      Oh my god. Its soo bad, it keeps getting worse the more I look at it…

      I hate you but also, well done.

      • funkless_eck@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        2 days ago

        haha, it’s actually from experience of trying to undo what AI did to my code. And I’m just a casual hobbyist in scripting languages.

        I still have a to-do to unstick how it is using a lambda to set a bool value inside a dict with only one key, when any normal human would just do

          bool_var = my_func()
        
          def my_func()
               [code goes here]
                if x:
                     return true
                else:
                      return false 
        

        it’s really been a lesson in how I can’t even use AI to learn, let alone actually produce.

        • sp3ctr4l@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          2 days ago

          Lately I’ve been running into this wild thing where… they just cannot fucking understand nested arrays.

          Here, we have an array called points, its made of vec2s, vec2 elements can also be accessed as an array or via vec2.x or vec2.y

          Alright, now, figure out how to compute the distance from the last point in the points array to the first point.

          … and it will give me something like:

          points - points

          … and then I headdesk and explain to it what i just said.

          and it will go oh!

          points - points is incorrect!

          points - points is the corrected version!

          … and then i will tell it those are literally the same thing and cannot possibly be both correct and incorrect simultaneously.

          … and then it will either actually crash, or basicslly say ‘yep, sorry, im stupid’… and then crash.

          … fucking what? This is what Ford has been using to make all their software with the last year?

          God fucking damnit.

          They really must have actually scaled them back in some way, to just stupider models… 6 months ago… they could handle that no problem, and get tripped up on legitimately more complex things.

          … oh well, im never gonna directly pay for any of this shit anyway.