An AI writing code for you

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 669
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

An AI writing code for you

Post by mrcoollion » Sat Jan 21, 2023 3:19 pm

For those who are interested in an AI bot generating code (and many other things, like reports) for you! Try https://beta.openai.com/playground
Not only for starters this could be interesting to use.
E.g. as a test, I gave it the question: Show me the code in livecode with which i can update data in a file in windows.
It gave me the following answer:

Code: Select all

put "This is new data" into tData
put url ("file:" & specialFolderPath("documents") & "/myfile.txt") into tURL
open file tURL for write
write tData to file tURL
close file tURL
I just thought it would be nice for all in the community to know about this.

Regards,

Paul

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8918
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: An AI writing code for you

Post by dunbarx » Sat Jan 21, 2023 3:29 pm

mrcoollion.

Check out the use-list. There is a very interesting thread there that will delight.

Craig
Last edited by dunbarx on Tue Jan 24, 2023 9:16 pm, edited 1 time in total.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6858
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: An AI writing code for you

Post by jacque » Sun Jan 22, 2023 8:10 pm

Note that the write option will overwrite any existing text. If you did mean to update the text by appending it, the syntax should be "open file tURL for update". You'll have to teach the AI that.

Do check out the use-list.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mrcoollion
Posts: 669
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: An AI writing code for you

Post by mrcoollion » Tue Jan 24, 2023 6:38 pm

Thanks for the updates. :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8918
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: An AI writing code for you

Post by dunbarx » Tue Jan 24, 2023 9:24 pm

I dislike the use-list, but the thread there is:

"Training the AI to write better LiveCode"

Craig

Post Reply

Return to “Talking LiveCode”