Good question. The two things that seem to work are:
(1) Provide correct information in a way that is more substantive and more respectful than the comment you're replying to;
and/or
(2) Chalk it up to the internet being wrong about everything and walk away (silently—not with a swipe).
As a side point, you'll usually end up at #2 anyhow, because #1 usually provokes more of the same, so after a certain number of iterations you'll find yourself in a tit-for-tat entanglement, which is greatly to be avoided.
The question is what is the optimal number of iterations. Probably it's 1. Maybe 2. Not 3. 4 is right out.
If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.