O’Reilly Media founder Tim O’Reilly says he’s trying to prevent a “disaster.”

On the latest episode of Recode Decode, hosted by Kara Swisher, O’Reilly explained how the title of his new book, “WTF? What’s the Future and Why It’s Up to Us,” can be read in two ways.

“‘WTF’ is an expression, either of amazement or dismay,” he said. “And technology can give us both; in fact, it often is. I’m saying, ‘What’s the future? It can be the WTF of amazement or the WTF of dismay, and it’s up to us to decide which one we want.’”

However, O’Reilly fears that today’s prevailing philosophy of elevating profit above all other goals is setting the entire economy down a dangerous path. When Wall Street’s priorities come before society’s, he said, the financial markets become a “rogue AI,” making choices that are ultimately bad for us.

“We have, over the last 30 or 40 years, created a global system which has as its objective function — the thing you’re optimizing for — they are telling companies, ‘Optimize for one thing, and one thing only: corporate profit,’” O’Reilly said. “And that’s become so enshrined. It’s really ruling every company. That is the master algorithm, and it is fundamentally hostile to humanity.”

You can listen to Recode Decode on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts.

On the new podcast, O’Reilly said tech companies are merely the “most visible incarnation” of change, and many of them create things that are useful to society — a virtue he said he could not apply to people like day traders. But generally, he predicted that today’s elites are headed for a “big backlash.”

“I think we’re in the throes of a period where technology is going to make possible great wealth for all people, or great wealth for a small number of people, which is what it’s doing now,” he said. “If the people who are wealthy and powerful now keep on the path that we’re going, we are going to see another period of war and revolution and great instability.”

“In an odd way, we may be saved by climate change, in the way that World War II pulled us out of the Great Depression, and we realized that we had to actually invest in the future because things were so bad,” O’Reilly added. “We might end up having events like that. In a dismaying WTF future, we do end up with war and instability that we don’t get out of. We definitely have the possibility of very bright futures, or very dark futures.”

If you like this show, you should also sample our other podcasts:

Recode Media with Peter Kafka features no-nonsense conversations with the smartest and most interesting people in the media world, with new episodes every Thursday. Use these links to subscribe on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts.

features no-nonsense conversations with the smartest and most interesting people in the media world, with new episodes every Thursday. Use these links to subscribe on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts. Too Embarrassed to Ask , hosted by Kara Swisher and The Verge's Lauren Goode, answers the tech questions sent in by our readers and listeners. You can hear new episodes every Friday on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts.

, hosted by Kara Swisher and The Verge's Lauren Goode, answers the tech questions sent in by our readers and listeners. You can hear new episodes every Friday on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts. And Recode Replay has all the audio from our live events, including the Code Conference, Code Media and the Code Commerce Series. Subscribe today on Apple Podcasts, Spotify, Pocket Casts, Overcast or wherever you listen to podcasts.

If you like what we’re doing, please write a review on Apple Podcasts— and if you don’t, just tweet-strafe Kara.