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: 744
Joined: Thu Sep 11, 2014 1:49 pm

An AI writing code for you

Post by mrcoollion »

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: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: An AI writing code for you

Post by dunbarx »

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: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: An AI writing code for you

Post by jacque »

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: 744
Joined: Thu Sep 11, 2014 1:49 pm

Re: An AI writing code for you

Post by mrcoollion »

Thanks for the updates. :D
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: An AI writing code for you

Post by dunbarx »

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

"Training the AI to write better LiveCode"

Craig
Post Reply