Page 1 of 1

Fun with ChatGPT

Posted: Tue Dec 06, 2022 3:02 pm
by M-A Kuttner
This post is just for fun. I was messing around with ChatGPT last night and asked it to generate some LiveCode script for me. Turns out, it can, sorta.
LiveCode GPT.png
Obviously it's got a bunch of holes in it and I had to clean up the script to get it to do exactly what I wanted, but I was impressed that it spat out any code at all. Might be a fun thing to check out!

Cheers
M-A

Re: Fun with ChatGPT

Posted: Tue Dec 06, 2022 3:23 pm
by stam
Looks like fun… for the uninitiated, can you post a link?

Re: Fun with ChatGPT

Posted: Tue Dec 06, 2022 3:39 pm
by M-A Kuttner
For sure: https://chat.openai.com/chat

You need to sign up (free). It's in beta right now, so short chats are free. Eventually you'll have to buy tokens, so now's the time to play. Have fun!

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 3:45 am
by mwieder
Wait... what?
Who trained it to know xtalk?

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 4:11 am
by mwieder
OK - this is fun. I said "write a bubblesort script using the LiveCode programming language".
It came up with

Code: Select all

-- Bubble sort function
on bubbleSort(arr)
  repeat for i = 1 to the number of items in arr
    repeat for j = i + 1 to the number of items in arr
      if item j of arr < item i of arr then
        swap item i of arr with item j of arr
      end if
    end repeat
  end repeat
end bubbleSort
I then said "that should be

Code: Select all

on bubbleSort arr
   local i
   
   repeat with i = 1 to the number of items in arr
      repeat with j = i + 1 to the number of items in arr
         if item j of arr < item i of arr then
            swap i, j, arr
         end if
      end repeat
   end repeat
   breakpoint
end bubbleSort

on swap i, j, @arr
   local temp
   
   put item i of arr into temp
   put item j of arr into item i of arr
   put temp into item j of arr
end swap
and it came back with
"Here is an updated version of the bubble sort script, using the LiveCode programming language:" followed by the code I just uploaded. It learns quickly.

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 5:25 pm
by FourthWorld
mwieder wrote:
Wed Dec 07, 2022 3:45 am
Wait... what?
Who trained it to know xtalk?
You did. And me. And everyone who's posted code.

Here's a copyright suit against a related "AI" content generator, GitHub's Copilot:
https://www.theregister.com/2022/11/11/ ... t_opinion/

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 5:46 pm
by LCMark
FourthWorld wrote:
Wed Dec 07, 2022 5:25 pm
You did. And me. And everyone who's posted code.

Here's a copyright suit against a related "AI" content generator, GitHub's Copilot:
https://www.theregister.com/2022/11/11/ ... t_opinion/
Morale of the story... Never use code which you haven't verified the license of first :)

To be fair, using ChatGPT is no different from using a human to write code for you - you need to ensure the code they have written/produced has an appropriate license to include in your software (usually by requiring them to ensure that it does satisfy a suitable license).

One wonders what ChatGPT says if you ask it to write code but with the source code license it is being provided under in a comment at the top...

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 6:56 pm
by mwieder
Ah. Yeah, that makes sense.

I'd be curious what would happen if someone else asked for a bubblesort... did it just spit back what I wrote in my own lane or did it actually add this to its corpus of knowledge?

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 7:21 pm
by Cairoo
mwieder wrote:
Wed Dec 07, 2022 6:56 pm
...
I'd be curious what would happen if someone else asked for a bubblesort... did it just spit back what I wrote in my own lane or did it actually add this to its corpus of knowledge?
I would test it but can't. They've since taken it offline due to an exceptionally high demand their systems weren't ready for.

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 7:50 pm
by bn
mwieder wrote:
Wed Dec 07, 2022 6:56 pm
I'd be curious what would happen if someone else asked for a bubblesort... did it just spit back what I wrote in my own lane or did it actually add this to its corpus of knowledge?
Mark, I tested your request before they the system offline and it returned something very similar to the result you had after your initial inquiry.
(did not compare word by word but there was no handler "swap" and the first line was "-- Bubble sort function", the second line: "on bubbleSort(arr)"

Kind regards
Bernd

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 8:09 pm
by mwieder
Ah, thanks. I was guessing that it was just spitting back what I uploaded and not really learning from it.
I'm still logged onto the system but it's unresponsive except to say "Too many requests, please slow down"

Re: Fun with ChatGPT

Posted: Wed Dec 07, 2022 9:59 pm
by stam
Stop feeding the Gremlin ;)

Re: Fun with ChatGPT

Posted: Fri Dec 09, 2022 5:12 pm
by mwieder
Even more fun.

"I Asked ChatGPT To Tell Me a Story about Cookie-Obsessed Squirrels and Iron Man’s Presidential Run. Here’s What It Cooked Up."

https://dlewis.net/blog/2022/12/08/i-as ... cooked-up/

Re: Fun with ChatGPT

Posted: Fri Dec 09, 2022 7:22 pm
by stam
mwieder wrote:
Fri Dec 09, 2022 5:12 pm
Even more fun.

"I Asked ChatGPT To Tell Me a Story about Cookie-Obsessed Squirrels and Iron Man’s Presidential Run. Here’s What It Cooked Up."

https://dlewis.net/blog/2022/12/08/i-as ... cooked-up/
That is hilarious! or scary... not sure which lol...
All I can think of is "I'm sorry Dave, I'm afraid I can't do that"

Re: Fun with ChatGPT

Posted: Fri Dec 09, 2022 7:29 pm
by Klaus
stam wrote:
Fri Dec 09, 2022 7:22 pm
...
That is hilarious! or scary... not sure which lol...
All I can think of is "I'm sorry Dave, I'm afraid I can't do that"
Hehe, exactly my thoughts! :-D