• Zannsolo@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    22 hours ago

    Meanwhile I’m asking ai to code review a snippet of code for a regex and it keeps saying it’s wrong every time I paste the previous answer in a new chat.

    • Theoriginalthon@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 hours ago

      I asked it to generate a SQL query with a bit of python, as the database schema is huge and unknown to me, obviously I checked it for glaring errors etc. I went back and clarified a couple of basic points. It then told me what I was doing was completely wrong, generated new code that worked is a different way, with a different edge case missed.

      It’s literally stack overflow but arguing with itself

    • flying_sheep@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      10 hours ago

      That’s how you’re writing a regex validator that’s almost always correct!

      def is_regex_valid(p: Pattern | str, purpose_description: str):
          return False