has anyone had ChatGPT write QB64 code yet? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: has anyone had ChatGPT write QB64 code yet? (/showthread.php?tid=1281) |
has anyone had ChatGPT write QB64 code yet? - madscijr - 12-15-2022 Apparently somebody tried to get it to write a game for the Atari VCS, so why not try BASIC? The results could be amusing! LoL https://www.reddit.com/r/Atari2600/comments/zm4ryu/i_asked_chatgpt_to_write_a_game_for_the_atari/ RE: has anyone had ChatGPT write QB64 code yet? - vince - 12-15-2022 I've heard team official got a hold of this tech, "I demand qb64pe but better!" RE: has anyone had ChatGPT write QB64 code yet? - SpriggsySpriggs - 12-15-2022 ChatGPT scares me. That thing was built too well. RE: has anyone had ChatGPT write QB64 code yet? - madscijr - 12-16-2022 (12-15-2022, 09:54 PM)Spriggsy Wrote: ChatGPT scares me. That thing was built too well. I gave it a try! If you ask: Code: (Select All) Can you write a program in QuickBasic that implements an associative array? It outputs: Code: (Select All) Sure! Here is a simple program in QuickBasic that implements an associative array: Next might be to ask it to optimize performance with hashing, or add functions for insert/update/delete/sort, etc. Maybe it will choke, maybe it will surprise us! Maybe it will answer differently in a month or a year, having learned more stuff from people and off the Internet. RE: has anyone had ChatGPT write QB64 code yet? - madscijr - 12-16-2022 (12-16-2022, 05:53 AM)madscijr Wrote:(12-15-2022, 09:23 PM)vince Wrote: I've heard team official got a hold of this tech, "I demand qb64pe but better!"(12-15-2022, 09:54 PM)Spriggsy Wrote: ChatGPT scares me. That thing was built too well.... I went ahead and asked: Code: (Select All) Can you do that again, but also optimize performance with hashing, and add functions for insert / update / delete / exists / sort? And lo! It did just that! Code: (Select All) Sure! Here is a revised version of the QuickBasic program that implements an associative array using hashing to optimize performance, and includes functions for inserting, updating, deleting, and checking the existence of key-value pairs, as well as a function for sorting the array: But wait... where's the rest? Th-th-that's all, folks?! Is there a limit to the output? Where's the beef??? Code: (Select All) can you show the rest of the program? Ask and you shall receive! Code: (Select All) Certainly! Here is the rest of the revised QuickBasic program that implements an associative array using hashing to optimize performance, and includes functions for inserting, updating, deleting, and checking the existence of key-value pairs, as well as a function for sorting the array: I haven't tried running or looking over the code it spat out yet - it's late and I have to sign off now. But it looks legit enough! Maybe tomorrow we can try asking it to write some QB64 code. Supposedly it was only "trained" (i.e. allowed to surf the Internet and fill its brain with knowledge) upto 2021, so it wouldn't know that QB64 became QB64PE or that Queen Elizabeth II is no longer with us, but if it can write a QuickBasic program based on a couple sentences, that's pretty cool. Maybe it can figure out that RawInput API multiple mouse problem! LOL RE: has anyone had ChatGPT write QB64 code yet? - mnrvovrfc - 12-16-2022 This is entirely expected from the son of somebody a lot like Dr. Frankenstein but as ultimate computer programmer deep like an expert Linux user. I have tried and failed to create a program that builds a song for me. It required too many rules, too much input for me to create and then to feed it, and it did only one style of music. It would have required a lot more work for the project to stop focusing on electronic music -- maybe get it to create a Wiener Waltz, or jazz, or merengue, or maybe something a bit simpler like trap... LOL. I wasn't patient enough to begin with to work on the input, and then adjusting the project according to the input. Artificial Intelligence could become somebody's lifetime project, but not mine. RE: has anyone had ChatGPT write QB64 code yet? - mnrvovrfc - 12-16-2022 @madscijr Let me get this straight. If the request for a program is "too complex" does this "chatgpt" spit out an incomplete program? That's a hint that it's futile. I think you've been asking it to do too much. You're posting stuff in code blocks that is difficult to follow along. Better leave it to the chess pieces ROFL or to Snoopy cursing out his own shadow or something like that. I was going to post in your thread that's current at this time about the subject. "Would you please show the rest of the program?" I thought it was one of your gags. RE: has anyone had ChatGPT write QB64 code yet? - James D Jarvis - 12-16-2022 I hadn't spotted this thread yet when I posted my results earlier. It is interesting that as it is a chat program of sorts you have to discuss solutions with the AI. It'll also cheat and say .... the function "MIXLBLIT" (as an example) does this to solve a problem even when the function doesn't exist. You can certainly get it to elaborate and re-evaluate expressions. I had it acting like Stack.pop() did something in an example and while I was more then capable of implementing a simple stack structure it was interesting to figure out how to tell the chat to fix it. RE: has anyone had ChatGPT write QB64 code yet? - madscijr - 12-16-2022 (12-16-2022, 10:52 PM)mnrvovrfc Wrote: @madscijr One of my gags! Ha! I don't post too many gags, do I? Seriously, you can ask it to show the rest of the code and it will show more. (See my newer post about getting it to create a Spacewar game to see that in action!) RE: has anyone had ChatGPT write QB64 code yet? - madscijr - 12-16-2022 (12-16-2022, 11:11 PM)James D Jarvis Wrote: I hadn't spotted this thread yet when I posted my results earlier. It is interesting that as it is a chat program of sorts you have to discuss solutions with the AI. It'll also cheat and say .... the function "MIXLBLIT" (as an example) does this to solve a problem even when the function doesn't exist. You can certainly get it to elaborate and re-evaluate expressions. I had it acting like Stack.pop() did something in an example and while I was more then capable of implementing a simple stack structure it was interesting to figure out how to tell the chat to fix it. Yeah, it does seem to fudge things a little, and it makes some incorrect assumptions about the language (for instance it thought QB64 has native Boolean and Collection types), but it does seem to write somewhat workable code... (depending on how much extra work you are willing to put in to get it working...) If you want to see what happens when you really try to push it, see the Spacewar thread! |