this post was submitted on 21 Jul 2023
163 points (100.0% liked)
Technology
37724 readers
702 users here now
A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.
Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.
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
I've unironically done something like this
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.