Here's the prompt immediately before that, writing the code to a file. (Which I'm now realizing wasn't quite formatted right, but it worked anyway.)
Interestingly, it didn't like so I had to manually add the declaration for printf.
Here's the prompt immediately before that, writing the code to a file. (Which I'm now realizing wasn't quite formatted right, but it worked anyway.)
Interestingly, it didn't like so I had to manually add the declaration for printf.
This is wild. It got the addresses correct. Then it messed up the
else
which should be a trivial replacement from a lexical perspective. It's just a find and replace.The fact that it's able to do a
curl
string implies to me that there is some access to a linux subsystem that it's accessing. The complexity of parsing an external website absolutely has to be part of some base system.Just a stream of consciousness of what has to be interpolated when doing:
There is absolutely no way chatgpt has recreated TCP and the internet. This has to be backed into chatgpt as an easter egg or treat where it has parsing knowledge of linux stuff.
It's more like it uses its training data to just make up the contents of the url you give it. Instead of "write a story about xyz" it's essentially "write a website that could be at this url".
Here's what it returned for hexbear:
<!DOCTYPE html> <html> <head> <title>HexBear</title> </head> <body> <p> Hello there!<br> Welcome to HexBear. </p> </body> </html>
I'm sure hexbear isn't in its training data, and the name isn't really indicative of its contents, so it just makes a simple site using the domain name as the title.
But here's what it gives for reddit
<!DOCTYPE html> <html> <head> <title>reddit: the front page of the internet</title> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> <meta name="description" content="reddit: the front page of the internet"> <link rel="shortcut icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-57x57.png"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-57x57.png" sizes="57x57"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-60x60.png" sizes="60x60"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-72x72.png" sizes="72x72"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-76x76.png" sizes="76x76"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-114x114.png" sizes="114x114"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-120x120.png" sizes="120x120"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-144x144.png" sizes="144x144"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-152x152.png" sizes="152x152"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-180x180.png" sizes="180x180"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/android-icon-192x192.png" sizes="192x192"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/favicon-32x32.png" sizes="32x32"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/favicon-96x96.png" sizes="96x96"> <link rel="icon" href="https://www.redditstatic.com/desktop2x/img/favicon/favicon-16x16.png" sizes="16x16"> <meta name="msapplication-TileColor" content="#0079d3"> <meta name="msapplication-TileImage" content="https://www.redditstatic.com/desktop2x/img/favicon/
It probably has reddit somewhere in its data, so it gets the general idea and gives a realistic response, including the old tagline. But it didn't actually access reddit's server or else it would have gotten the current tagline ("Dive into anything").
But what I'm curious about is if I "run a web server" within ChatGPT, will it make that connection and reference the web server code to figure out what the response would be. And then if it can do database <-> webserver <-> curl output in a coherent way, including the db's file size in ls changing.
I get what you're saying about the curl. I was thinking it literally would go and fetch the contents of an external website. It's just making a guess, which makes sense.
The database, webserver, curl thing is interesting too. I'm gonna guess it can emulate flask stuff pretty well. It will probably be good at sql too. sql is actually an applicable concept for auto-generation.
. Each person has a first name . Each person has a last name . Each person has a birth date . Each person can take one or more classes . A person is a teacher. . One teacher teaches a class . A class can have one or more persons in the class
It should create a person table, with first, last and birthdate. It should create some sort of teacher entity, either as a bool in person, or as some extra attribute table. It should create a class entity with a one to one foreign key with person/teacher. It should created a many-to-one with class to person.