openai code

Alex Fraser beatnic at comcast.net
Sat Dec 16 18:29:23 EST 2023


After our Saturday Zoom session discussion on using AI to write code I 
went to the OpenAI website and started ChatGPT 3.5.

Oh my!

My first query "write c code to compare files" gave me

/"Certainly! Below is a simple example of C code that compares two 
files. The program reads the contents of both files and compares them 
byte by byte. If any difference is found, it prints a message indicating 
the first differing byte and exits. If the files are identical, it 
prints a message saying so."

/It then spit out the codewhich I haven't tested, but it//was pretty/.

/I tried getting it to write code for an Android phone
/
   I asked "/write program for android phone to invert audio"
    and also asked  "create program to encrypt audio on android phone"/

/In a couple of seconds I had code, once again I've not tested them.   
For the second one it gave a paragraph of advice and then step by step 
instructions
The advice

"Encrypting audio involves a more complex process than the basic 
inversion shown in the previous example. It typically requires the use 
of cryptographic algorithms to ensure the security of the data. Below is 
a simple example that demonstrates how to encrypt and decrypt audio 
using the Advanced Encryption Standard (AES) algorithm in Android. Keep 
in mind that security is a complex topic, and this example is for 
educational purposes only. In a real-world scenario, it's recommended to 
use well-established encryption libraries and follow best practices./"


/I finished off my play session by asking ChatGPT/to  "/create window 
executable file to create random numbers"

The machine said /"Creating a simple Windows executable file to generate 
random numbers can be done using a programming language like C++. Below 
is an example code using C++ that generates a specified number of random 
integers and prints them to the console. We'll then compile it into a 
Windows executable using a tool like MinGW."/

It wrote the code and then went on to give me the command line to 
compile it once I'd installed MinGW.

Well folks I was impressed, kind of scared too.  Can that darn thing ask 
itself questions?
/



/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amrad.org/pipermail/tacos/attachments/20231216/f3394c1f/attachment.html>


More information about the Tacos mailing list