As HN user D-Coder pointed out a few years ago, that joke wasn't Twain but an author in the September 1946 issue of Astounding Science Fiction:
https://news.ycombinator.com/item?id=12108263
https://news.ycombinator.com/item?id=23587507
More links at https://news.ycombinator.com/item?id=26468884.