Fun with ChatGPT
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 49
- Joined: Mon Apr 03, 2017 3:55 pm
- Location: Nova Scotia, Canada
Fun with ChatGPT
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.
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
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
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
Re: Fun with ChatGPT
Looks like fun… for the uninitiated, can you post a link?
-
- Posts: 49
- Joined: Mon Apr 03, 2017 3:55 pm
- Location: Nova Scotia, Canada
Re: Fun with ChatGPT
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!
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!
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Fun with ChatGPT
Wait... what?
Who trained it to know xtalk?
Who trained it to know xtalk?
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Fun with ChatGPT
OK - this is fun. I said "write a bubblesort script using the LiveCode programming language".
It came up with
I then said "that should be
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.
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
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
"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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Fun with ChatGPT
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/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Fun with ChatGPT
Morale of the story... Never use code which you haven't verified the license of firstFourthWorld wrote: ↑Wed Dec 07, 2022 5:25 pmYou 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/
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...
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Fun with ChatGPT
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?
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?
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Fun with ChatGPT
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.
-
- VIP Livecode Opensource Backer
- Posts: 4000
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Fun with ChatGPT
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
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Fun with ChatGPT
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"
I'm still logged onto the system but it's unresponsive except to say "Too many requests, please slow down"
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Fun with ChatGPT
Stop feeding the Gremlin
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Fun with ChatGPT
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/
"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/
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Fun with ChatGPT
That is hilarious! or scary... not sure which lol...mwieder wrote: ↑Fri Dec 09, 2022 5:12 pmEven 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/
All I can think of is "I'm sorry Dave, I'm afraid I can't do that"