Page 1 of 1

An AI writing code for you

Posted: Sat Jan 21, 2023 3:19 pm
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

Re: An AI writing code for you

Posted: Sat Jan 21, 2023 3:29 pm
by dunbarx
mrcoollion.

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

Craig

Re: An AI writing code for you

Posted: Sun Jan 22, 2023 8:10 pm
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.

Re: An AI writing code for you

Posted: Tue Jan 24, 2023 6:38 pm
by mrcoollion
Thanks for the updates. :D

Re: An AI writing code for you

Posted: Tue Jan 24, 2023 9:24 pm
by dunbarx
I dislike the use-list, but the thread there is:

"Training the AI to write better LiveCode"

Craig