logoalt Hacker News

charcircuityesterday at 2:36 PM2 repliesview on HN

When the condition for when you want to replace is hard to properly specify, AI shines for such find and replaces.


Replies

Aachenyesterday at 3:04 PM

This one is literally matching "innerHTML = X" and setting "setHTML(X)" instead. Not some complex data format transformation

But I can see what you mean, even if then it would still be better for it to print the code that does what you want (uses a few Wh) than doing the actual transformation itself (prone to mistakes, injection attacks, and uses however many tokens your input data is)

show 1 reply
lelanthranyesterday at 6:24 PM

> When the condition for when you want to replace is hard to properly specify, AI shines for such find and replaces.

And, in your opinion, this is one of those cases?

show 1 reply