Rewrites are definitely not “always a bad idea” as Joel Spolsky once said. What they are is highly situational.
HN has a bunch of factors that make it amenable to a rewrite. It has gigantic scale, not a ton of complexity at a business level, and what it “is” is pretty slow moving at this point.
That means it’s not a great example to justify a rewrite at work :) that said the success does prove rewrites are possible. Bravo on shipping!
But they didn't rewrite HN; they created a different implementation of the language it's written in.