ChatGPT and LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
ChatGPT and LiveCode
I’ve been trying out a number of the ai generators out there and tried ChatGPT this evening to see if it knew about LiveCode. It does at least to some degree. I asked it to generate code for a “hello world” program and to multiply two numbers. It mentioned “stack” in its response, so next I asked it to create a stack to display a bouncing ball…and it described the steps to do it with example code. Thought you all might want to play with it. Just google chatgpt and it will get you the link on the OpenAI website. Have a Happy LiveCode New Year folks!
-
- Posts: 722
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: ChatGPT and LiveCode
I have tried it as well and it is pretty amazing. However, the AI does not have internet connection so it has its limits at this time. maybe just as well ???
Re: ChatGPT and LiveCode
The latest version of chat gpt-4 does have internet access, so more up to date than previous versions.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: ChatGPT and LiveCode
I have a funny feeling AndyP, that the last 2 posts before yours were Spam Bots.
Re: ChatGPT and LiveCode
Hi Richmond,
Maybe so, time will tell
Maybe so, time will tell
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: ChatGPT and LiveCode
How are the posts preceding Andy's spam bots? They are all from known users.
Craig
Craig
Re: ChatGPT and LiveCode
The mod moderated them, but left the real users' posts
Re: ChatGPT and LiveCode
Hi all, I thought I'd like to share a few thing I'm doing with A.I. that are helping me be more productive in coding. I have configured a GPT I call "LiveCode Helper" that is turning out to be a great little assistant.
I've configured it with directions such as telling it all variables need to be declared in compliance with using "Strict Compilation" mode in the IDE (my preference). I uploaded a lot of information for its knowledge base. Until we get LiveCode Create I am finding this agent extremely helpful. Tonight, for instance, I uploaded an old Basic card game listing called "War" (a card game). It analyzed it, spit out a pseudocode listing, and at my request created a script to generate a nice interface for the game (such as color scheme, size and position of elements in the layout, etc.) It then used the pseudocode and Basic listing to generate a pretty detailed LiveCode script in a code block. Then we went back and forth debugging a few minor things.
I think my biggest takeaway from using it is that I am talking back and forth with it and it is very engaging to work like this. "We" worked on recreating this "War" game and had it done and working in about 45 minutes. Anyway, here is the link to this GPT should you want to play (but you need a subscription to ChatGPT plus): https://chat.openai.com/g/g-gfplNpGOd-livecode-helper
Happy Coding and have a Happy New Year,
Mike
I've configured it with directions such as telling it all variables need to be declared in compliance with using "Strict Compilation" mode in the IDE (my preference). I uploaded a lot of information for its knowledge base. Until we get LiveCode Create I am finding this agent extremely helpful. Tonight, for instance, I uploaded an old Basic card game listing called "War" (a card game). It analyzed it, spit out a pseudocode listing, and at my request created a script to generate a nice interface for the game (such as color scheme, size and position of elements in the layout, etc.) It then used the pseudocode and Basic listing to generate a pretty detailed LiveCode script in a code block. Then we went back and forth debugging a few minor things.
I think my biggest takeaway from using it is that I am talking back and forth with it and it is very engaging to work like this. "We" worked on recreating this "War" game and had it done and working in about 45 minutes. Anyway, here is the link to this GPT should you want to play (but you need a subscription to ChatGPT plus): https://chat.openai.com/g/g-gfplNpGOd-livecode-helper
Happy Coding and have a Happy New Year,
Mike
Mike Roberts
https://mygiantbrain.com
https://mygiantbrain.com
Re: ChatGPT and LiveCode
BTW, here is the link to the "War" game I mentioned above. https://mygiantbrain.com/blog/files/1d8 ... cb4-7.html There is a bit more discussion there about how I am using AI assistance during LiveCode sessions. For my purposes I am really exploring how much more productive I can be and it feels like it is paying off. (Note: I am not striving for the most elegant code in the world but just getting the job done. ) - Mike
Mike Roberts
https://mygiantbrain.com
https://mygiantbrain.com
Re: ChatGPT and LiveCode
Yeahhhhhh.... word of warning:
if you try to run the War! stack it causes LC to hang on launch (M2 Mac running LC 10 DP7 on MacOS Sonoma 14.2.1)
Good-looking blog though
There are issues with the code (it's possible to view this by Suppressing Messages prior to attempting to open the stack).
for example:
'number' is used as a variable name but is a reserved keyword. That's a definite no-no...
I haven't really tried to debug this properly, this just caught my eye...
EDIT:
That actually seems to have been the problem - the initializeDeck handler causes the crash. Replacing 'number' with a different variable name, such as 'x' fixes the issue. This works:
if you try to run the War! stack it causes LC to hang on launch (M2 Mac running LC 10 DP7 on MacOS Sonoma 14.2.1)
Good-looking blog though
There are issues with the code (it's possible to view this by Suppressing Messages prior to attempting to open the stack).
for example:
Code: Select all
repeat with number = 2 to 14 -- 2-10, 11: Jack, 12: Queen, 13: King, 14: Ace
put number & "-" & suit & "," after gDeck
end repeat
I haven't really tried to debug this properly, this just caught my eye...
EDIT:
That actually seems to have been the problem - the initializeDeck handler causes the crash. Replacing 'number' with a different variable name, such as 'x' fixes the issue. This works:
Code: Select all
-- Initializes the deck of cards
command initializeDeck
put empty into gDeck
repeat with suit = 1 to 4 -- 1: Spades, 2: Hearts, 3: Diamonds, 4: Clubs
repeat with x = 2 to 14 -- 2-10, 11: Jack, 12: Queen, 13: King, 14: Ace
put x & "-" & suit & "," after gDeck
end repeat
end repeat
delete char -1 of gDeck -- Remove the trailing comma
shuffleDeck
end initializeDeck
Re: ChatGPT and LiveCode
Thanks, since it is working in my environment I didn't give it a second thought...usually reserved words get flagged. I'll go in and revise the code and reupload. Thanks for the quick reply and for the comment on my website...my blog experiment :-)
Re: ChatGPT and LiveCode
You’re welcome!
I’ll keep an eye on your blog, we need more stuff like this!
PS:
If “number” isn’t flagged/coloured in your script editor there is probably an issue with your installation…
I’ll keep an eye on your blog, we need more stuff like this!
PS:
If “number” isn’t flagged/coloured in your script editor there is probably an issue with your installation…
Re: ChatGPT and LiveCode
Hey there! Thanks for sharing your experience with ChatGPT and LiveCode. It's awesome that it could generate code for a "hello world" program and even guide you through creating a bouncing ball in a stack. I'm intrigued to give it a try myself now! Wishing you a Happy LiveCode New Year too!Hutchboy wrote: ↑Thu Dec 29, 2022 2:28 amI’ve been trying out a number of the ai generators out there and tried ChatGPT this evening to see if it knew about LiveCode. It does at least to some degree. I asked it to generate code for a “hello world” program and to multiply two numbers. It mentioned “template” in its response, so next I asked it to create a stack to display a bouncing ball…and it described the steps to do it with example code. Thought you all might want to play with it. Just google chatgpt and it will get you the link on the OpenAI website. Have a Happy LiveCode New Year folks!
Re: ChatGPT and LiveCode
Hi,
I want to share my continuing experience with ChatGPT 4. I use the unlimited version 3.5 occasionally, it spits out code fast but has a short attention span compared to version 4. Since I have created a custom GPT 4 that contains a lot of specific knowledge about LiveCode it is my daily driver.
One regular use I make of ChatGPT is to upload my longer scripts and ask it to furnish me with a header within block comment markers. It creates a standard layout and summary and then I ask it to include a list of all the handlers in the script and the key variables. Most of the recent files I've uploaded have their script headers generated this way.
Another use is to upload almost any source code (basic, hypercard, python, javascript) and ask the A.I. to analyze the code and produce a pseudocode listing. It does this in a code block which is nice. Then I ask it this specifically: "Using the pseudocode listing and the original source code as a guide let's begin to recreate this in LiveCode for a stack size of 1024x768 pixels." This usually begins a very productive coding session.
- Mike
I want to share my continuing experience with ChatGPT 4. I use the unlimited version 3.5 occasionally, it spits out code fast but has a short attention span compared to version 4. Since I have created a custom GPT 4 that contains a lot of specific knowledge about LiveCode it is my daily driver.
One regular use I make of ChatGPT is to upload my longer scripts and ask it to furnish me with a header within block comment markers. It creates a standard layout and summary and then I ask it to include a list of all the handlers in the script and the key variables. Most of the recent files I've uploaded have their script headers generated this way.
Another use is to upload almost any source code (basic, hypercard, python, javascript) and ask the A.I. to analyze the code and produce a pseudocode listing. It does this in a code block which is nice. Then I ask it this specifically: "Using the pseudocode listing and the original source code as a guide let's begin to recreate this in LiveCode for a stack size of 1024x768 pixels." This usually begins a very productive coding session.
- Mike
Mike Roberts
https://mygiantbrain.com
https://mygiantbrain.com
Re: ChatGPT and LiveCode
Hi Mike,
Don’t know if it’s possible for you, but have you considered creating a series of YouTube videos showing how to integrate chatGPT with liveCode?
I suspect that may be fairly popular…
Stam
Don’t know if it’s possible for you, but have you considered creating a series of YouTube videos showing how to integrate chatGPT with liveCode?
I suspect that may be fairly popular…
Stam