• Re: [gentoo-user] has anybody use ChatGPT for programming?

    From Mark Knecht@21:1/5 to thelma@sys-concept.com on Tue Mar 21 02:00:02 2023
    On Mon, Mar 20, 2023 at 5:52 PM <thelma@sys-concept.com> wrote:

    Has anybody use ChatGPT for programming? I think it would very very
    handy (less bugs) and less questions on the mailing-list


    I've used it very early on to write some python code to read some text
    files and place them in numpy arrays, etc.

    It worked, the files were read correctly, then they cut off my access due
    to too many users and I haven't bothered since.

    <div dir="ltr"><br><br>On Mon, Mar 20, 2023 at 5:52 PM &lt;<a href="mailto:thelma@sys-concept.com">thelma@sys-concept.com</a>&gt; wrote:<br>&gt;<br>&gt; Has anybody use ChatGPT for programming?  I think it would very very handy (less bugs) and less
    questions on the mailing-list<br>&gt;<br><br><div>I&#39;ve used it very early on to write some python code to read some text files and place them in numpy arrays, etc. </div><div><br></div><div>It worked, the files were read correctly, then they cut
    off my access due to too many users and I haven&#39;t bothered since.</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From thelma@sys-concept.com@21:1/5 to All on Tue Mar 21 02:00:02 2023
    Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list

    I had a bash script to copy file from usb to HD
    --------
    #!/bin/sh

    if mount | grep -q '/run/media/fd/KIOXIA'; then
    rsync -av /run/media/fd/KIOXIA/SCILOG/ /home/thelma/business/backup/SCILOG/ else
    echo "disk not mounted"
    fi
    -------

    I asked ChatGPT to rewrite me the script utilizing zenity to show progress bar on a desktop, here is what I got:

    ------
    !/bin/sh

    if mount | grep -q '/run/media/fd/KIOXIA'; then
    zenity --progress --title="Backup Progress" --text="Backing up files..." --auto-close --auto-kill --pulsate &
    PID=$!
    rsync -av --info=progress2 /run/media/fd/KIOXIA/SCILOG/ /home/thelma/business/backup/SCILOG/ | while read line; do
    if [[ $line == *%* ]]; then
    percent=$(echo $line | awk '{print $2}' | tr -d '%')
    echo $percent
    echo "# Backing up files: $percent%"
    echo $percent | zenity --progress --title="Backup Progress" --text="Backing up files..." --auto-close --auto-kill --percentage=$(cat) &
    fi
    done
    wait $PID
    zenity --info --title="Backup Completed" --text="Backup has completed successfully." --timeout=5
    else
    zenity --error --title="Error" --text="Disk not mounted."
    fi
    -----------

    PS. I think I will try to utilize ChatGPT to upgrade my old osCommerce from php 7.4 to php 8
    It will not be easy but I'll try.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ezntek@21:1/5 to Mark Knecht on Tue Mar 21 04:30:01 2023
    ------AKF743YXYHMSNRZZZZ53AY9ARIUHAT
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    It's still early tech, sometimes I do use chatgpt but I prefer searching, stack overflow and official docs.

    On March 21, 2023 8:57:56 AM GMT+08:00, Mark Knecht <markknecht@gmail.com> wrote:
    On Mon, Mar 20, 2023 at 5:52 PM <thelma@sys-concept.com> wrote:

    Has anybody use ChatGPT for programming? I think it would very very
    handy (less bugs) and less questions on the mailing-list


    I've used it very early on to write some python code to read some text
    files and place them in numpy arrays, etc.

    It worked, the files were read correctly, then they cut off my access due
    to too many users and I haven't bothered since.

    ------AKF743YXYHMSNRZZZZ53AY9ARIUHAT
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <html><head></head><body>It's still early tech, sometimes I do use chatgpt but I prefer searching, stack overflow and official docs.<br><br><div class="gmail_quote">On March 21, 2023 8:57:56 AM GMT+08:00, Mark Knecht &lt;markknecht@gmail.com&gt; wrote:<
    blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
    <div dir="ltr"><br><br>On Mon, Mar 20, 2023 at 5:52 PM &lt;<a href="mailto:thelma@sys-concept.com">thelma@sys-concept.com</a>&gt; wrote:<br>&gt;<br>&gt; Has anybody use ChatGPT for programming?&nbsp; I think it would very very handy (less bugs) and
    less questions on the mailing-list<br>&gt;<br><br><div>I've used it very early on to write some python&nbsp;code to read&nbsp;some text files and place them in numpy arrays, etc.&nbsp;</div><div><br></div><div>It worked, the files were read correctly,
    then they cut off my access due to too many users and I haven't bothered since.</div></div>
    </blockquote></div></body></html>
    ------AKF743YXYHMSNRZZZZ53AY9ARIUHAT--

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna@21:1/5 to All on Tue Mar 21 14:30:01 2023
    Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list

    I've tried a bit but ultimatly gave up using it.

    At least on my experience, it's results are wildly inconsistent for
    code, specially for something non-trival. It can be confidently wrong,
    and thus would still require you to know what you want to do and fact
    check the reply...

    Trivial things I usually can do them myself from the get go, and for non-trivial stuff, reading man pages and searching online is usually
    faster than trying to fix whatever chatgpt gives me.

    Tho, GPT-4 is getting out and that may or may not change things.

    -----BEGIN PGP SIGNATURE-----

    iQGTBAABCgB9FiEEOQZJRvkRmxqE3cOfwdTp1azoUpoFAmQZsGVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MDY0OTQ2RjkxMTlCMUE4NEREQzM5RkMxRDRFOUQ1QUNFODUyOUEACgkQwdTp1azo UppeWgf/Ser5RkTy7fAxNB6clHEh1BsD0NSlTUa0GVpqzrMLnHj15OStzSHD8Q/s be8jXnNXfxdfsZzkyrI9cck6yYzEmDZg6dOq9oaOVjqyiTaTkp9NOjYfnZOBINZo lA3NsCIXB1YNewY4UmcYT0mmn//ubb7hKpmXWlPc9lkIWuAp89ExO1A+j3Gl6lVJ zJ+k3FpiRfWwLf0aLdgkr6BITJpr7h8M6Cs0uhGIi4ICOqgaE7azyHulXrxH0dbw z+sW8hOpx58FvB5D5WWXzkWc6k4uuZu1PzzXHw28HSBEddp9vsWEg9zyzG6BLAhB 6IZteWNfpEU9W+Y3Zx5HHiyQfWDAzg==
    =N8o1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Freeman@21:1/5 to navi@vlhl.dev on Tue Mar 21 15:20:01 2023
    On Tue, Mar 21, 2023 at 9:25 AM Anna <navi@vlhl.dev> wrote:

    Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list

    At least on my experience, it's results are wildly inconsistent for
    code, specially for something non-trival. It can be confidently wrong,
    and thus would still require you to know what you want to do and fact
    check the reply...


    I know Home Assistant banned posting AI-generated responses on their
    forums when some users decided to create bots that would take
    questions from newbies, run them through ChatGPT, and then auto-post
    the responses as replies.

    The result was mass confusion as often the answers seemed plausible
    but contained subtle errors. Dealing with the resulting frustration
    and chaos took more volunteer time from those hanging out on the
    forums than just dealing with the original questions.

    Now, as an individual running a question through such an AI can be
    useful, but you have to realize that it has no real measure of
    confidence attached to the answers, and it will make up an answer if
    it isn't sure. It is very human-like in that sense, but that includes
    all the downsides of humans.

    I've used it a little - it can be good for giving you alternative
    ideas or suggesting starting points, but you have to realize that just
    like humans it isn't infallible, and you aren't talking to the
    programmer who wrote whatever it is you're trying to deal with. If
    you use it for code I'd use it more as a suggestion or template, or
    maybe when you already have an approach worked out maybe see if it has
    another approach that you might want to consider.

    --
    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wols Lists@21:1/5 to Rich Freeman on Wed Mar 22 09:40:01 2023
    On 21/03/2023 14:09, Rich Freeman wrote:
    On Tue, Mar 21, 2023 at 9:25 AM Anna<navi@vlhl.dev> wrote:
    Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list
    At least on my experience, it's results are wildly inconsistent for
    code, specially for something non-trival. It can be confidently wrong,
    and thus would still require you to know what you want to do and fact
    check the reply...

    I know Home Assistant banned posting AI-generated responses on their
    forums when some users decided to create bots that would take
    questions from newbies, run them through ChatGPT, and then auto-post
    the responses as replies.

    The result was mass confusion as often the answers seemed plausible
    but contained subtle errors. Dealing with the resulting frustration
    and chaos took more volunteer time from those hanging out on the
    forums than just dealing with the original questions.

    The results I've come across suggest this is the norm.

    So code APPEARS better, but is usually WORSE, than code you actually
    wrote yourself.

    So it's probably good for study, or if you want a template to follow,
    but don't blindly use any code. It's only as good as the data it's
    trained on, and as a doctor I know said to me "We select doctors from
    the general population, and if half the population are below average
    what does that say about doctors?".

    ChatGPT (code especially) is probably trained mostly on student output.
    Do you really want to be "writing" student grade code?

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)