The Boolean Gate (Dead Romantics)
by Walter Jon Williams
Mark Twain versus the Singularity!
The elderly, disillusioned Sam Clemens discovers that his friend, the brilliant scientist Nikola Tesla, may be transmitting the discoveries of a malevolent entity from beyond the Earth. Mark Twain could save the world, but Sam Clemens must decide whether the human race is worth saving.