He didn't mention Donald Trump by name, but he didn't disappoint them and told them what he thought about all that anyway.

Former U.S. president Barack Obama told a Canadian audience that the world may be a dark place since he left the White House, but its natural upward momentum can be corrected through a positive story of tolerance to counter the "primal" narrative of populism that has taken hold around the world.

"I left the office cautiously optimistic," said Obama, sparking laughter among the 11,400 paying attendees at the Canadian Tire Centre in Ottawa on Friday night.

"I know why you all are laughing."

That was as close as Obama came to confronting the politics of the man who followed him to the White House. Wearing an open-collar white dress shirt and dark grey suit, Obama sat answering questions for about an hour from Tobias Lutke, the founder and CEO of the Ottawa-based commerce company Shopify.

It wasn't a real journalistic interview, but when asked how optimistic he felt as he left the presidency, Obama answered like he often did in that setting: with a long, grim essayistic sweep punctuated with hope.

"I believe the long-term trajectory of humanity is in a positive direction," he said. "But you get dark ages before the Renaissance."

"You get World War Two and 60 million dead before there's a post-World War Two order that stabilizes societies."

The world, he argued, has never been healthier, wealthier, better educated, more tolerant and less violent than right now.

But it's an age of political and social disruption where technology is gorging us with information and no one can agree on what constitutes the truth so a coherent debate can ensue, he said.

"It's indisputable that things have gotten better. But in that march of progress we had the Holocaust, and we had Jim Crow and we had the Killing Fields. So we cannot be complacent."

He said an "ancient story" that has appeared time and again throughout history is back and it is very "primal."

"It focuses on us and not us — it's tribal. It's a zero-sum contest between people. And a strong man appears who is going to protect all of us from them," Obama said.

"That kind of politics has gotten traction, that story has gotten a lot of traction around the world . . . it's not unique to any particular country."

Then came his prescription: "That, I think, has to be combated with better stories because I think there's a better story to be told about human progress — it's inclusive and it's hopeful and it is generous and it is kind and is based on science and facts and not fear.

"We have that in our capacity, but I think we get complacent."

Obama spoke to Parliament during his last official visit in 2016. (Pablo Martinez Monsivais/Associated Press)

'Love affair with Canada'

With that, Obama capped an hour in front of an audience that welcomed him like a rock-star with a standing ovation.

"I do have a little bit of a love affair with Canada," he said as he took the stage at an event where tickets cost from $75 to well into the hundreds of dollars.

Since Obama's presidency ended in January 2017, he's become a big name on the paid speaking circuit, and appeared at a similar event in Calgary in March.

Obama offered a rambling and reflective view of the world since leaving the presidency, and high praise of the ingenuity and entrepreneurship that drives economies.

He fondly recalled his first trip to Canada in 2009 and his initial discussions with then Conservative prime minister Stephen Harper to combat the Great Recession. Obama called it a "a fairly intense conversation about how we were going to avoid Armageddon."

There were fond reflections of raising his two daughters, Malia and Sasha, and unabashed praise for his wife, Michelle.

As social media and the technology behind it evolves and becomes more powerful, society needs to have an important conversation about what constitutes "baseline truth," he said.

"The Fox News viewer has a completely different reality than the New York Times reader," he said.

Following Pence

Obama garnered applause when he called for a re-think in how young people are educated, to teach them critical thinking, and "experiential learning." An education system with a blackboard and boring teacher may have been good to teach kids to work in a factory or an office in the past but that is no longer adequate.

The visit came one day after U.S. Vice-President Mike Pence was in town on behalf of Trump, who is decidedly less popular in Canada than the 44th occupant of the Oval Office.

Trump has yet to pay a solo visit to Ottawa but his appearance as part of the larger G7 leaders' summit in Quebec last year plunged Canada-U.S. relations to a new low. Tweeting from Air Force One after departing Canada last year, Trump called Prime Minister Justin Trudeau "very dishonest and weak."

Former Newfoundland premier Brian Tobin, who was also a federal Liberal cabinet minister, said Friday's talk contained a warning not to take for granted "all of the privileges we enjoy as citizens in this global community."

"It's a wake-up call from Obama," Tobin said, "done gently, but done very effectively."