Hacker News new | past | comments | ask | show | jobs | submit login

I asked GPT what the source code does, was pretty impressed with the response

>This code is a JavaScript program that creates a "snow" animation on a web page. When executed, the code generates a number of white, circular elements (which represent snowflakes) and animates them to move across the page, creating the illusion of snow falling. The snowflakes are given random positions, sizes, and animations to make the effect more realistic.




What precisely did you enter into GPT?

Just the raw source code, or other parts of the website?

Which text did you use to ask it for a description?

Can you try progressively removing parts of the source code to see what the minimal version is which makes GPT say that the code renders a snow effect?


If you want to try things out it's free to use for now https://chat.openai.com/chat. Just pasting the raw source with no prompt is enough to get that description.


Thanks for the clarification. Really interesting that just the code is enough!

(I cannot sign up to ChatGPT myself because it requires a cell phone number and I won't hand that out to any websites.)


It is not entirely accurate (thankfully) the animations are done by CSS which is generated by JavaScript. But the way it understands context is pretty impressive.


Okay, this is seriously cool, it's a better summary of the code than I could give just by reading it (and the code being minified doesn't help here).


Why is this downvoted? Is GPT the new thing to unconditionally hate now?


Because if you care what GPT says about something, you can ask it yourself.


But in a more abstract code example where you don't have good context for what is happening, this similar behavior could be very helpful.


Actually I couldn’t because the site was overloaded. Plus it never came to mind my to check, so I appreciate the GP post for mentioning this.




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

Search: