Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty amazing stuff. I used this prompt to have ChatGPT write me a coin flip game in python that flips a coin x amount of times and displays the result: "create a game in python to flip a coin x amount of times and show the results when done" It came back with python code that ran perfectly when saved into a .py file without having to make any changes.


I've had it generating working python code for entire text-adventure games based on unlikely novels (Thomas Hardy's "The Trumpet Major" eg).

If you ask it to start adding in NPCs and fighting mechanics it will start doing that, too. I built a small "Canticle for Liebowitz"-themed text adventure in pieces- first asking it to add NPCs, then add a fighting mechanic, then add weapons to be wielded, then for the weapons to have damage ratings that matter. All I had to do was update the functions that it wanted to change, and add a few "global" declarations.


Look at how many times that program appears when you paste your question into Google.

The language model was trained on it.


You're correct on the training - but how many things in engineering are re-hashing the same crud over and over?

I can even see it helping with core innovations. No - it won't write a realtime, infrastructure intense system (eg: Kafka) - but it could write all the non-innovative code around it, for example.


As someone who doesn't program/code at all, I don't care how it arrives at the result. It's just amazing to me that if I need a simple script or program, I can have an AI write usable code that I can use.


Yes, this will just further the unhealthy management attitude that programmers are fungible and "why can't you make X do Y, even my phone can do that".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: