The UK has issued a white paper.

It doesn’t work; it cherry picks and requires the EU to accept a customs arrangement which is harmful to them, and, profoundly, it does not solve the NI problem.

The PM has given up trying to solve the NI problem, as she should, because it cannot be solved within the constraints in operation : she has now asked the EU to change their requirements for NI, which is properly tantamount to asking Southern Ireland and EU to accept an open border with a third country.

This will never happen.

The Conservatives have already crossed the line such that their vote has split; they’ve lost 5% overnight, the UKIP have gained 5%.

Now, what it comes down to is this : the UK Government cannot present any plan which will command a majority. A hard Brexit will be blocked, a soft Brexit will be blocked. Neither approach solves the NI problem.

So now what?

Now the UK either crashes out with no deal, or, second referendum. I’d like to see a third option – rescind exiting until the Government has an accepted plan for leaving.

I read what I think was an perceptive comment about the whole matter : article 50 was triggered immediately after the referendum, when it should have been triggered only after a plan for leaving had been agreed.

It’s like selling your house before you’ve bought the next one.

My personal view is that with bureaucracy, the worst possible choice is *always* taken, and so it will be no deal.

If you hold Sterling, I advise you to change to a safe-haven currency, because a no deal exit will lop off probably 10% to 20% of the value of your currency holdings.

Disclosure : I now hold no Sterling. Most of my wealth is in Swiss Francs.

Brexit / Second Referendum

The Conservative Party has failed to produce a viable hard Brexit plan, because it is impossible.

A softer plan has emerged and the key hard exit politicians have resigned.

The consequence of this is that the Conservative vote has split. They were equal with Labour, now they’re five points behind, because the UKIP vote has increased overnight by five points.

The Conservatives only hope now is that come an election, UKIP voters will actually vote Conservative, because if they do not, Labour will get in.

So the question now is simply what can the Conservatives do to try to UKIP voters on-side come an election?

I think on the whole this means no second referendum.

The people who want this are people who wanted to remain. The exiters are very happy with it because it gave them what they want. They will not be happy with a second referendum.

A second referendum now would vote to stay in the EU, mainly because the old and rich voted to leave and after two years of them dying and two years of younger voters getting older and so obtaining the vote, the balance has shifted.

The basis to argue for a second referendum is that people were misinformed in the first; it’s only now they can make a genuinely informed choice.

In fact, I don’t think people’s views have changed at all; actual information is not part of the debate. It’s an emotional matter. The vote outcome will change because of the change in the voting population by the passage of two years.


I think Trump will take the USA out of NATO; if not today, if not at this summit, as soon as he can. He is preparing the ground.

This has begun with his current claims, that Germany is completely controlled by Russia.

The purpose of this is to devalue the alliance with Germany (through NATO). If Germany is already subverted, what point is there being in alliance with them?

So, when Europe is composed of individual States with their own armies you sooner or later get war. Maybe not in our lifetime, but certainly for our children, and war now means war in a world with widespread nuclear weapons.

When there is a pan-European war, the USA gets involved. It happened in WW2 and it happened in WW1. This leads to many hundreds of thousands or millions of American deaths. US Presidents until now have been wise enough to know that it is infinitely better and cheaper to station troops in Europe and so prevent war, than to remove them and then have war; Europe and the far east centered upon Japan constitute along with the USA the First World, and the USA ultimately benefits so profoundly from the First World that it acts, our of self-interest, to preserve the First World. This has post-war been achieved by the US alliance with Germany through NATO) and with Japan.

(US troops prevent war in Europe by being part of NATO, and if you attack anyone in NATO, you attack all of NATO, and the USA has massive military power. So it hasn’t happened, and Europe has had a very long period of peace. So much so in fact I think people have forgotten that war is the normal, default state of affairs and peace is something which only happens when efforts are taken to stabilize matters.)

Trump is going to lead the USA out of NATO.

This is happening because Trump is above his ceiling. When a man is above his ceiling, he continues to operate in his new role as he did in his old role. Trump is running the USA as if it were a hotel chain; he is also I judge from what I read of his conduct to his staff authoritarian. Authoritarian leaders are so because of insecurity, and this leads them to hire weak and submissive staff, always, as such people form no threat or competition and can be dominated. This we have seen the departure of all those around Trump who are capable and strong, being replaced with the weak and submissive. This is also why Trump is so single-minded about loyalty; if you are insecure, you need blind loyalty to reassure you, as you’re sure you’re no good but can’t stand to think other people will know it or think it.

I may be wrong, but I think Trump sees NATO only as a cost, and the whole situation as unjust (as the insecure tend to), as the USA spends and NATO does not. Beyond this, he sees not. I doubt he knows much history, or reads much. (I must say that I do not expect the USA to reduce its spending when it leaves NATO.) I also have some vague wonderment about the relationship between Trump and Russia. What *is* going on there? Trump doing a great deal which supports and encourages Putin’s goals. It is purely co-incidence? I think so, but I am maybe oh 5% not sure, and I tend to see Russian influence in a lot that happens – Russia historically has always been expansionist, and I think it the same now. You have to think that the mass of Russian people are conditioned into a world view which condones that which Putin does; the Russian people *believe and support*. I expect to find Russian money making its way into the hands of those who are acting to destabilize the EU and the West; it happened for the last hundred years. Why would it stop now?

The NATO States, knowing it is in the best interest of the USA to keep troops in the EU, have not spent enough on defence. The UK and France have spent barely enough, they have a long military history and so culturally are inclined to at least spend something, the Germans have spent very little because they are inculcated with war guilt and do not like military spending. The Italians have not spent enough because their economy is regulated to death so they cannot afford it, the Spanish have not spent enough, but here I cannot say why. Turkey spends a lot, but has never moved on from more direct forms of dictatorship, overt or covert, and currently has departed from the Western sphere. The other States are small players.

This provides a possibility of failure where a populist comes to power in the USA and removes the USA from NATO. Populism has arisen in the USA because the body politic is understood by the mass of people to be corrupt and foul, but they do not understand why, nor what ought to be done, for the mass of people in all countries have for centuries been brought up and conditioned from birth not to think but to simply accept the State as right, and so people are utterly open to manipulative populism; they have no framework of concepts of their own of what is right or wrong, or the mental defences or capability to detect something which is bogus. In short, people have been raised to be gullable and naive, to be obedident to the State, and so they are vulnerable to deception.

(The basic ethical rule is that everything two entities – individial, business, State, anything – do together, must be voluntary and well-informed, except in self-defence. You cannot force others to do things, nor trick them into it, unless you act in self-defence. Almost everything State does violates this principle, taxation for example.)

But NATO still exists, and if defence spending rises and it becomes a credible force, that will keep Europe from being a collection of individual States with their own armies, which will lead sooner or later to a pan-European war, in a world with widespread nuclear weapons.

The EU also helps in this matter, as it has acted to pull the individual States together into something more like a single entity.

The problem here though is that the EU is going to fail. You cannot have economic union without political union, and there is not enough political union. When the economy part falls over, the political part will be profoundly weakened. (There have been sixteeen currency unions in history. Eight ended when the States involved merged, the other eight failed.)

So all we have between us and individual States with their own armies is NATO, and Trump is weakening it by taking the USA out.

The EU I think will end up weakening NATO as well, as it is now that the Brits are out calling for an EU military. The Brits always flatly blocked this, citing NATO as the combined military force. The problem with the EU assumining a military role is that when it collapses, the military as with the econonmy will re-nationalize. So it doesn’t work – attaching the military the EU will lead to its fragmention when the EU fails, and then we’re back to individual States. NATO is the right solution in that sense.

Looking over the US web-sites, I see for example Fox news (which seems to be a Trump mouthpiece) asserting NATO is obsolete.

My experience of people is that if you imagine the most destructive, self-destructive, staggeringly horrific and utterly incomprehensible act – something really beyond imagination – like moving the world toward a war where millions in appalling agony, along with the chance of nuclear exchanges, where the ecological damage will devastate the planet globally even if the nuclear explosions do not do so directly – you will find tons of people calling for it and huge numbers of people thinking its a good idea and wanting it to happen.

Plenty of people are evil, and plenty of people are gullable and naive. The former is human nature, the latter is that the mass of people have been raised to be gullable and naive, to be obedient to the State, and so they are vulnerable to deception.

So all in all, NATO is our hope.


I think Donald Trump will bring the USA out of NATO, or at least eliminate the US troop presence in Europe.

When Europe goes to war, the USA gets involved.

With nuclear weapons now widely fielded, any large scale war contains risks of a magnitude and type which never before have existed.

I rather think people have become so accustomed to peace they think not of it and assume it will always been so.

The USA has maintained an alliance with Germany (via NATO) for the last seventy years to ensure peace in Europe, so that the USA never has to be involved in the European war.

The EU States have been reckless with this American aid, and spent almost nothing on their own defense.

Now out of the blue a populist, out of his depth, ascends to the Presidency and the USA acts in ways profoundly against its own interest; and this all comes out of the blue, an utter surprise, to an EU lacking so very much in the way of its military strength.

Thank God the Brits and French held on to their own nuclear weapons.

So, the USA will leave, and Europe will need to arm itself, as it should have done (although Trump would have left anyway, I think : some other reason would have been found).

I hope Europe will arm itself through NATO, and if not NATO, then through the EU; the Germans do not want an army, because of how they feel about their past, and if each nation has its own army outside of the EU, then we are back to where we were before, with a range of nations in Europe, and sooner or later, conflict and war.

States can fight, so sooner or later they do.

Europe needs to federate.

Military unification must however be preceded by political integration, just as economic unification must be preceded by political union.

The EU I think is not unified enough politically to support economic or military union, and so when that unification unravels (as it is not complete and not sound), the military will nationialize – as happened in the Soviet Union – and we will be back to where we started, with a range of nations in Europe and sooner or later, conflict and war.

The road to hell is paved with affinity APIs

I’m working away on the new test and benchmark application.

I need to support creating processes, to test position-independent data structures.

That means I need to pin processes to particular logical cores.

Know what?

That’s what’s written on the sign that points the way into hell.

Let me put this bluntly : Windows has no API to set process affinity beyond the first processor group, which has a maximum of 64 logical cores.

You read that right.

So if you have say 128 cores, and let’s say Windows has split these up into two 64 core groups – you can only set process affinity to be on cores 0 to 63.

You *can* set *thread* affinity to be on any core – but this is *not the same* as process affinity, and is less performant – but it looks like this is the best you can do.

It’s problematic to do this remotely (from another process). To do so you’d need to call CreateRemoteThreadEx(). In my case, I’m spawning new processes and I want them to quit when the benchmark work is done, so I need to co-ordinate between the main thread (which begins when the process is spawned) and the thread created by CreateRemoteThreadEx(), which will be created at some point after the main thread… it’s hard to wait on things in the main thread which haven’t yet been created. I could busy wait on a global variable…. but this is stomach-twistingly bad. I don’t *want* to write code like this.

You can set thread affinity from within the process itself by calling SetThreadGroupAffinity(). Obviously to use this you have to pass in information about which logical core in which processor group. I’m passing in some information already to the child process, through the command line (shared memory name and length in bytes), so I’ll have to add this.

It’s still not what I actually want. I want to set process affinity, from the parent process.

Windows thread/process affinity APIs are Civil Service quality – and I don’t mean the British Civil Service. I mean the *Egyptian* Civil Service.

Next step, finding out how bad it is under Linux. It’ll be bad, but it won’t be as bad, even if it’s just by not having processor groups, which are the worst single concept I’ve encountered since MS-DOS was designed with a 640kb RAM limit.

Shared memory and NUMA

Windows always does things differently to Linux, and this is almost always a problem, because Linux gets them right.

NUMA is the one exception I know of. Linux got it wrong, and Windows did it differently, and Windows did it right.

Linux has a system-wide policy which controls NUMA, and this is applied whenever a page is paged back in after being paged out. The upshot is you’ll get the system-wide NUMA policy, unless you pin your pages into memory so they can’t be paged. You youself in your application cannot control your NUMA behaviour. It’s controlled in the OS.

Windows does what you’d think would be done : when you make an allocation, you specify the NUMA node, and the OS tries as hard as it can to keep those pages in that node.

So this was all good and fine and clear until this week when I realised something.

I’ve been working on the test application for the position-independent data structures. They are intended for use with shared memory, where the shared memory has different virtual addresses in the difference processes; the data structures internally are using offsets rather than proper virtual memory addresses.

The new test application actually combines the test and the benchmark applications.

With the benchmarks, you want to be NUMA aware and take advantage of it. That means you need to pass in to the benchmark library a block of memory in each NUMA node, so it can put data in the correct places.

Now we see the problem – with shared memory, the data structure state, and all its elements, must be in the same single allocation.

How can you have one allocation per NUMA node *and* shared memory? because that means you have multiple allocations.

Suddenly Linux looks like it’s doing the right thing. Say you select striped allocations – your pages in any given allocation are striped over NUMA nodes. Okay, it’s not what you really want in your app – you want more fine grained control – but at least you’re able to *do* something meaningful with NUMA *within a single allocation*.

On Windows, where an allocation specifies its NUMA node, you just can’t do this.

You could in theory actually still make things work. In the data structure state, you’d have an array, which shows the address ranges for each allocation, and when you get hold of an offset (by popping an element from a freelist, say) you can then figure out *which* address range it is in, and so know the start of that range, and so figure out the actual virtual address represented by that offset.

Here though obviously you’re needing to do an array scan per freelist access, which is really not what you want.

Ironically, it’s on Windows where the position independent stuff really matters, because there are no locking primitives on Windows which are cross-process.


AirBnB continues its strenuous efforts to destroy any lingering friendliness, sense and ease of use in its web-site.

The latest dribble of madness : the property map is no longer shown by default. You have to actually click to turn it on.

The larger a company becomes, the worse its product and web-site becomes – and we’re not talking a bit worse, we’re talking dribbling wall-to-wall madness.

AirBnB – 30bn USD cap – it’s a property rental site *and now the property map is deactivated by default*.

Every single fucking web-site user has to click, and wait, to turn it on.

As a reminder, AirBnB have also changed their site so they will *only* bill you in the currency of the country your bank card is registered in : and if that currency is different to the currency of the booking, AirBnB apply a nice huge conversion charge to your bill for the service they forced you to use. You are no longer permitted to use your bank’s currency conversion.

For me, I have a multi-currency card, and I get billed for free, with no charges, in any currency I like.

But not with AirBnB.

Barclays Bank

I had to write.

So, I have an account with Barclays, a UK bank.

I’ve been with them a few months – I opened the account after wanting for a long time to get away from my previous bank, but not being in the UK, I couldn’t. Yay for banking regulation.

So Barclays are no good.

I’m going to move on – to do that, I need to update my address at Barclays so I can present a proof of address to the new bank.

So I go on-line to change my address.

Ohhhhh boy.

Pulling on a serious fuckin’ thread here.

So you can go on-line to an address page form.

It says – this change only works for on-line products. It does not work for your bank card. For your bank card, please call us – and “call us” is a link.

You follow it, it takes you to a page where you can have on-line chat.

So you use it.

Guy turns up pretty fast, that’s fine.

We talk.

Turns out the “call us” link takes you to the *unauthenticated* chat, and they can’t change your address.

What they can do is tell you to go and use the authenticated chat.

They need to tell you where it is on the site, to find it, because when you click on the *other* “contact us” link, it only offers phone and secure messaging.

Turns out the link for “make a complaint” is the link you need to follow to get to the authenticated chat customer support.

You couldn’t make it up.

I would let them know, but there’s no point. Zillions of people are letting them know, every day. Nothing changes, because if it did, it wouldn’t still be like this.

Royal Mail – just when you think it couldn’t be less useless, it is

I posted a package of birthday presents on the 9th June, to Switzerland.

ETA 3-5 working days.

Ten working days later, I check tracking.

According to tracking (which I do not trust) the package has not left the post office.

I try to contact the Royal Mail.

The only way offered is an 03457 number.

This costs me 1.2 euros a minute.

I found a complaints form – which has a “my complaint is not listed above” which seems to lead to a form which is for reporting missing packages!

I fill it in.

It has a Google fucking captcha.

After several minutes of intense frustration, it completes.

I hit submit.

The form fails to submit, on the basis that the Captcha has failed.

I now need to copy everything I’ve typed, reload the page, enter it all in again, and repeat the fucking Captcha, and I presume, try to get it to work quickly enough that the form does not time out.

Royal Mail -> absolutely fucking shit.


Having gone through it all again, I have discovered Captcha authentication ALWAYS fails.

I am rather coming to the view that *all* customer support forms, from larger companies, do not work.

The attempt to use them should not be made.

I will phone the fucking RM tomorrow, and never ever have anything to do with them ever again.

Fucking hell.

(Addendum. I tried calling their cusomter support number, from home, since they close at 1pm and there’s no time to get into the office. I was afraid to do so – the VOIP provider I use has a major failing, in that they cannot tell you the per minute rate of calls *before* you make them. If there was anothor viable Swiss provider, I’d use them. I tried an alternative 0845 number, and also the RM head office number which is also supposed to work, but no go. So I tried the 0345 number, having logged into the VOIP account so I could watch the call in the call history and see the price. Turns out the call is not shown until the call is complete; but is *does* change from having no header to the list, to having a header – so I thought the call might actually be being free. It wasn’t. It was 1.20 a minute, I was put on hold because there were busy, and after emptying the balance in the account (there wasn’t much there, which is why I was okay to risk it) the call disconnected. The VOIP provider is shit, and RM are shit. Well done guys, you’re fucking useless.)

Brexit #3

The UK two days ago passed a specific law forbidding the construction of border infrastructure on the NI/SI border.

(I thought this was already the case due to Good Friday!)

The EU has rejected the UK suggestion that the UK as a whole remain within the EU customs union and in ‘full alignment’ with the single market.

(This proposal has a couple of fundamental flaws. First, ‘full alignment’ is not ‘in the single market’. So the UK wants in, but also while being out. EU says – no cherry picking. Second, this is a UK-wide solution to an NI-specific problem – and this is because of UK internal politics. EU says – this is an NI problem, the solution must be NI specific. You cannot have a solution to this problem which abrogates the UK departure from the EU and in effect allows cherry picking, because of your internal political concerns.)

SI flatly refuses a hard border between NI and SI and the EU is backing them up. The UK has two options – either NI stays in the EU, or this is not done, and there is no deal.

In the event of no deal, the EU will erect a border – it has to do so, you can’t have an open border to another sovereign State – and the UK will not. This won’t last for long, and the border will return. (That the UK has a law blocking this means nothing : they can make another law.)

The Conservative Party and the DUP do not directly suffer from this. It is extraordinarily bad for the people of NI and SI.

In the event NI remains in the EU, the DUP will not vote with the Conservatives, Labour can then vote against Brexit, block Brexit, split the Conservative vote, and get into power.

Labour however is led by someone profoundly detatched from reality. He may not take the opportunity presented to him and his party.

UK really is in a bad spot. It can leave the EU, or quite possibly get a hard-left Labour government.