this post was submitted on 21 Jul 2023
164 points (100.0% liked)
Technology
37360 readers
248 users here now
Rumors, happenings, and innovations in the technology sphere. If it's technological news or discussion of technology, it probably belongs here.
Subcommunities on Beehaw:
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Did... Did it work?
I actually did that for some code, and it did work.
I asked chatgpt to write me a prompt that would make chatgpt write a recursive function for uploading files and all files in subdirectories to a server as "multipart forms", because when I asked it to modify my code originally it was just giving me a do-while loop, whereas I wanted a recursive function.
I kept changing my prompts to try to phrase "write a recursive function" differently, and instead the prompt that chatgpt gave me explicitly told it not to use non-recursive logic. Weirdly, forbidding it from using non-recursive logic actually made it finally give me the proper function.