News for hackers. Stuff that matters.
Re:GPT-3 can generate a React app from natural language desc... by aerovistae on Tuesday July 21, 2020 @02:01PM (#23909175)
I don't really understand. How is GPT-3 able to do this? Understanding English is one thing, but how did it learn JavaScript, HTML, CSS, and the React framework?
Re:GPT-3 can generate a React app from natural language desc... by jpindar on Tuesday July 21, 2020 @02:18PM (#23909330)
It doesn't understand English. It knows how to make up text that looks a lot like the text that it read. It read a lot of examples of code, so it know how to make up code that looks a lot like what it read. Some of this code works, since some of what it read works. But if it read too much non-working code from stack overflow questions, it might write code that doesn't work.

Edit: apparently it read a lot of Github repositories, so most of what it mimics is working code.

Re:GPT-3 can generate a React app from natural language desc... by andreaorru on Tuesday July 21, 2020 @02:14PM (#23909283)
Apparently it was trained over GitHub repositories.

https://youtu.be/fZSFNUT6iY8

Re:GPT-3 can generate a React app from natural language desc... by aerovistae on Tuesday July 21, 2020 @02:32PM (#23909465)
What I'm wondering is how it matched up the natural english description with the repository content though.
Re:GPT-3 can generate a React app from natural language desc... by zumachase on Tuesday July 21, 2020 @04:40PM (#23910752)
The prompt contained a few react examples with annotated English descriptions that were similar enough. You’re not seeing the entire prompt and as impressive as this is, it’s likely that you’d end up writing more code trying to get it to do what you want than if you just wrote it yourself. Future GPTs may of course be better, but there’s a bit of “magic” to these demos that the author isn’t super upfront about.
Re:GPT-3 can generate a React app from natural language desc... by taylorfinley on Tuesday July 21, 2020 @04:27PM (#23910629)
I'd like to see this done with tests as the input, and the working app as the output. Then writing an app would be as simple as defining the tests it must pass.
Re:GPT-3 can generate a React app from natural language desc... by FabioBertone on Tuesday July 21, 2020 @05:54PM (#23911407)
> Then writing an app would be as simple as defining the tests it must pass

In most cases, if you can define the tests, you have already figured out 80% of the solution.

Re:GPT-3 can generate a React app from natural language desc... by p49k on Tuesday July 21, 2020 @02:53PM (#23909682)
Probably through tutorials and verbosely-commented code examples?