SO, how do you greet Irvine Welsh on meeting him for the first time?

You’d considered something effusive like: “I’ve been dying to meet you for years because you’re one of my favourite writers.” And then launch into an oleaginous appreciation of his ‘seminal’ 1993 novel Trainspotting (the book critics always seem to include ‘seminal’ in their reviews, don’t they).

And then you would say something about Trainspotting being as important as anything Charles Dickens ever wrote because it shook society out of its callous indifference inequality and the marginalisation of entire communities happening on its doorstep. And that it will never not be relevant or urgent.

All this is true, but you don’t want to come across like a fan-boy roaster and have him wondering how long he can politely hang about without being considered rude. And so you opt for the old Glasgow/Edinburgh divide thing. “At long last, I’m getting to meet the man who gave the world ‘weegie’,” I say.

Read more: Kevin McKenna: Let's hope Flynn's seafood supper sharpens his political nous

“I only popularised it,” he replies. And then I get into a fankle trying to pour tea through one of those wee sieves for the tea-leafs, only to discover it’s the bowl that the sieve sits in. And now it’s beginning to overflow. And not for the first time, I’m making a horse’s arse of it in an Edinburgh establishment that’s miles above my station. Welsh laughs loudly. “I did that too and hoped no one would see me.”

Welsh gave us the bleakest howl of despair in Scottish literary history when Renton, the Leith savant launched into his “Choose Life” soliloquy. And then, perhaps, the world’s most anarchic pro-independence statement. “It’s sh**e being Scottish. We’re the lowest of the low. The scum of the f**king earth! The most wretched, miserable, servile, pathetic trash that was ever s**t into civilization. Some hate the English. I don’t. They’re just w**kers. We, on the other hand, are colonised by w**kers. Can’t even find a decent culture to be colonised by. We’re ruled by effete ar**holes.”

He’s mellowed since then, but only slightly. “I still support Scottish independence but not the SNP. If they could actually make a difference, they wouldn’t be allowed to. Like all the other social democratic parties they’re just programmed by the tyranny of algorithms and the whims of corporate finance.”

The Herald: FILM ' TRAINSPOTTING '  (1996)
Picture shows :  EWAN McGREGOR
01/05/1996rborough...North Yorkshire...England...Portrait looking right (51182182)

He cites all the SNP MPs not standing for re-election. “I think they and we all believed they were going down there to cause ructions because we were in the middle of an Independence boom. But they’ve turned out to be a bunch of nest-feathering bureaucrats, exactly like the Labour Party and the Conservatives. These people are inherently cautious. They’re not really interested in standing up against anything.

“Unfortunately the mechanisms for change are so limited and the system dictates policy. The idea that a parliamentary party can seize power and change anything is delusional. They tried it in Greece and international capitalism just stamped all over them. Jeremy Corbyn tried it and got completely taken out before he got anywhere near there.”

We talk about the recent plans by the Scottish Government to de-criminalise drug possession. “It’s just gesture politics,” he says. He despairs at how political and civic inertia and a reluctance to offer anything radical or ground-breaking infects every facet of life. “It’s not rooted in reality and pays no heed to the way that ordinary people conduct themselves.

Read more: Scots 'not ready for more enlightened penal systems' fears Barlinnie governor

“Someone asked me recently if I was afraid of being cancelled like JK Rowling. I said ‘Look, I was in King's Cross Station the other week and it was mobbed by people who were all going to her stage production. You’re living in a parallel universe if you think she’s been cancelled in any way whatsoever.

“JK and Janey Godley have both been abused by men they’ve been close to and although they’re on opposite sides of the trans issue, they’re both feminists. And if you look at whose abusing them online whether unionist or nationalist; trans or not, it always seems to be misogynistic men.

“But people aren’t like that in real life. They don’t scream and shout at each other. People in real life respect each other more than they’re given credit for by the political establishment. They can sit down in pubs and discuss these matters civilly.”

He advises me to watch Accelerate or Die (You Get the Dystopia You Deserve) a startling arthouse documentary by Jake Chapman, one half of the Chapman Brothers who’ve been holding Britain’s art and media establishment in a state of stupefied terror for the last 30 years. It explores the troubling concept of accelerationism, a belief that by actually hastening the predatory and rapacious forces within capitalism we can bring about its self-destruction.

The Herald: Irvine Welsh at the Edinburgh International Book Festival monday. (57367675)

Welsh returns to this theme again and again while observing the under-currents that prevent meaningful change in improving the lives of those living on the margins. As with the chaotic lives of his five main characters in Trainspotting, it’s underpinned by liberal doses of compassion and understanding. “Authentic democracy is such an unfashionable thing now. It runs contrary to the accelerating spirt of our times. Voting is merely window-dressing for democracy.

“I think we’ve reached a stage where neither Socialism nor Social Democracy can stop this. It has to play out. Labour and the SNP are doing little other than posturing. They might slow down the effects of rampant capitalism a little at the margins, but basically they’ve joined up to the same agenda. I don’t see how they can put a spoke in it now.”

We discuss the theory that we’ve all actually participated and acquiesced in AI’s implacable annexation of our lives. That by subjecting our creative processes and all decision-making to the tyranny of algorithms that we’ve stripped out all risk-taking, uncertainty and imagination from modern life. And that the preferences of those with the money and influence to control them will always come first.

Read more: Decriminalisation of drugs is elitist caprice masking abject failure

“Look at what’s happened when people have tried to challenge the influence of the power-groups,” says Welsh. “When Greece attempted to re-set the dial the forces of global capitalism simply stamped all over them. The same happened to Jeremy Corbyn before he could inflict any lasting damage on their influence.”

He laments what’s happened to the creative arts in the UK and acknowledges the organic, grass-roots process by which Trainspotting rocked the literary establishment. It emerged from a literary fanzine culture in Scotland where small, independent outlets were publishing brilliant and searing work from previously unpublished authors influenced by working-class themes of social alienation.

“It’s a nightmare for young writers and musicians now,” he observes. “People just won’t consider looking at a new writer unless big sales happen immediately. We were looked after. Publishers were patient with us and built us. It’s far more difficult for young artists to become visible now.

The Herald: A view of Edinburgh's Royal Mile during the Fringe. Pic Gordon Terris

“When I started listening to music there were about 200 singles brought out every week. You had a one in four of making the Top 50 and one in ten of being in the top ten. Now, there’s maybe about 70,000-80,000 songs coming out every week. How can anyone hope to compete against those odds?”

Next month sees a new work being launched at the Edinburgh Book Festival. It will be a fleeting appearance by him. “I really appreciate the f*ck out of Glasgow during the festival. It’s a haven. As the Edinburgh festivals have become bigger they’ve got sh**er.

“It’s about getting tourists and business into the centre of the city and keeping working-class people out. You’re expected to pay about 30-40k for a hall per week. The Book Festival can’t even afford to be in Charlotte Square. The money guys just kept saying ‘we want more’.”

Read more: Scots gay pioneer: ‘It’s depressing that a lot of our good work is being trashed’

His new book is a novella called In Real Life, from the Seal Club 2 collection, The View from Poacher’s Hill. It also features works by his two gifted literary contemporaries, Alan Warner and John King. “It’s basically about the featureless lives of disenfranchised Edinburgh youths in a working-class housing scheme and how their existence has become dominated by video games and social media marked occasionally by drugs, alcohol and porn.

“It’ll consider the dilemmas of this generation: how to make money; have a career and a family and how all that’s cut off from them. And so they retreat into a world offering them dopamine hits and throwing their algorithmic choices at them.”

His own social media engagement proceeds on the basis of valour being the better part of discretion. This was his Twitter analysis of Thursday’s English by-elections. “Congratulations to the highly electable Sir Keir coming a strong second in the seat of the most lying, corrupt, racist privileged w**ker to set foot in parliament.” So, he’s still telling it as it is.