That guy from the Black Eyed Peas, a robot, and the prime minister of Canada walk into a ski chalet. What do they talk about?

The answer, as it turns out, is the "fourth industrial revolution." Chances are that Justin Trudeau, will.i.am and Hubo the South Korean robot don't have to worry about their jobs being automated away any time soon. World leaders and pop artists have a certain human flair that cannot be encapsulated in an algorithm quite yet, and Hubo the robot is on the offensive.

Technology Will Make You Redundant

Doctors, lawyers and journalists – not to mention cashiers – are back on their heels, however. And that is what the assembled rich and powerful personages at the World Economic Forum's annual Davos meet-up are discussing.

The first industrial revolution was steam-powered. Work that had been done by domesticated animals or human brawn was transferred to water-powered mills and coal-fired steam engines, accelerating the pace of manufacturing and commerce. This led to overall economic growth, but the millers, weavers, blacksmiths and periauger pilots who lost their jobs were anything but thrilled.

Meanwhile the handful with the luck and foresight to take advantage of change – the Cornelius Vanderbilts – became the wealthiest people since Crassus. The pattern repeated itself a century later with the advent of electricity and the assembly line manufacturing techniques pioneered by Ford Motor Co. (F). It happened again a century after that, with the adoption of computers and robotics.

Now we're on round four. The machines have come a long way from Samuel Crompton's "spinning mule." Now they can think, more or less, meaning that it's not just those who do physical labor who risk losing their livelihood. International Business Machines Corp.'s (IBM) Watson, a computer endowed with what currently counts as "artificial intelligence," will definitely beat you at Jeopardy.

For now that might be a party trick, but the implications of a computer that can handle natural language and learn from its mistakes should trouble many in once-safe professions. The very toughest medical, research and legal problems will require humans for a while yet, but the more routine parts of these fields like drawing up a contract, diagnosing a common ailment, or (God forbid) writing this article could soon be done by a relatively cheap, uncomplaining algorithm.

The Peripherals

Other developments feed into the advent of artificial intelligence, particularly smartphones. Of course, comparatively, they're not actually smart at all. They don't think, but they do put incredible computing power in the palm of just about everybody's hand. This in turn makes the sharing economy possible. Taxi drivers are already sweating in the face of Uber, but add "deep learning" to the equation, and you begin to render all drivers obsolete, not just taxi drivers. Alphabet Inc. (GOOG) and Apple Inc. (AAPL) have been working on self-driving cars for a while, and are now being joined – perhaps too late – by just about every major automaker.

The feedback loop of innovation doesn't stop there, though. Given how much time the average car spends sitting idle in a garage, there's still much more room for the mobile and sharing economy's role to grow. Using a smartphone, you could summon a nearby self-driving car that's not being used, meaning cars spend much more time on the road, so we need far fewer of them. Perhaps individuals would continue to own cars, or perhaps businesses would take over. Either way, a lot of cars themselves will become redundant, just like horses a century before.

Where to Now?

Considering the implications of this shift, you begin to see how millions and millions of jobs could simply evaporate. You can't work on the assembly line building the car, you can't drive the car, you can't even sit on the board of the carmaker—so many of them are out of business (not to mention that half of the execs at Davos think a machine will sit on a corporate board by 2026). Perhaps you can code the apps that summon the cars and the software that drives them, but then again, machines may do much of that too, soon enough. The same pattern repeats itself across several industries, and soon we're left with a hollowed-out middle class and a couple dozen Silicon Valley gazillionaires.

So, Davos crew, since you're thinking so much about this, what do we do? As in previous industrial revolutions, the eventual result will probably be a larger, stronger economy with more wealth and higher standards of living for all. But to avoid falling victim to rising inequality in the near-term, the World Economic Forum advises you learn these 10 skills by 2020: complex problem solving, critical thinking, creativity, people management, coordinating with others, emotional intelligence, judgment and decision making, service orientation, negotiation and cognitive flexibility. Perhaps I lack cognitive flexibility, but those sound like soupy abstractions, not skills.

Then again, one man has figured out how to apply all of these skills quite effectively. Jon Kabat-Zinn, a mindfulness meditation expert, is at Davos right now helping the world's business elite to keep a handle on things by "cultivating intimacy with their moment-by-moment bodily experience." Creative. Service-orientated. Emotionally intelligent. Definitely falls under people management. Seems like it's all there.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.