Actual liblfds work – shock, surprise!

Shockingly, I’m actually do some liblfds work!

The hazard pointer implementation has a bug.

The tests for the implementation pass – but the hazard pointer-using freelist sometimes finds the freelist has a loop, when it comes to clean up the hazard pointer state.

Only happens when you come to deregister the threads. Mmm.

I have three sources of stress in my life

1. Telcos
2. Banks
3. Gyms

I no longer keep a phone number, which solved problem #1.

Banks are unavoidable – no decentralized currency yet – and whenever I need to do something financial, it’s hell.

Gyms are always a problem, because there are so few to choose from (heavy regulation), they charge stupid money to join and if you’re only in a place for a month or three, they’re not an option. I’ve solved this by buying a bike box and taking my racing bike with me. No more gyms.

There is right now a fourth problem. It used to be very easy to find somewhere to live – AirBnB. However, more and more Governments are banning or “regulating” AirBnB in a way which is properly tantamount to a ban. As such, I’ve had to turn sometimes to non-AirBnB sites. They are uniformly appalling.

This is my current problem – The web-site is a joke. It was made ten years ago and hasn’t changed – and it wasn’t *good* ten years and hasn’t changed. It was written I think by a good graduate and they’ve not changed it since – except for one change, which I have now encountered.

When you come to pay, there is a Google captcha on the form where you enter your card details.

Card details are complete – full card and address. Type it all in, dig up the address, type that in, It’s onerous. It has to be done.

The captcha takes over a minute to complete, because it usually doesn’t work.

Having done all this, the card was rejected.

I now really need to repeat the exercise – perhaps I made a typo.

If it doesn’t work again, I have to use a new card.

I do not want to flil in this fucking form three times.

I just tried to phone to pay.

I was on hold for a few minutes, and then told lines were too busy and put to an answerphone.

I hate Git. I really, really, really, really, really hate Git.

Know why?

Because the way it interacts with users ia absolutely fucking *appalling*.

So I close a repo. Make some changes, commit, push. No upstream set, I set it.

Not allowed – and it’s trying to use my *liblfds* account, which I didn’t want.

Okay – my mistake. I change the user name and email address, wipe the checkout (it’s probably got a bunch of stuff relating to liblfds in it, I’d guess) and do it all again.

Problem is…

…exactly the same problem.

Still using my old account.


So now I’m Goolging for 15 minutes and I *think* what’s happening is that Github is recognizing the SSH key in use and deciding which account it is based on that.


This is my experience with Git all over.

Unless you know, a priori, what’s going, it is *baffling*.

It is the least friendly source control system I have seen.

I’ve been trying to make a *one character* change to the Light’s Hope WoW server code. So far, it’s taken THREE HOURS. I’ve just fucked it up AGAIN, because I forgot to branch my own fork. You understand that after a few hours of problems, you become progressively less diligent, and a development process with a large number of separate, detailed steps inherently promotes the frequency of mistakes.

Mailing list

I’ve been working a lot on a mailing list.

A list has an email address, a user has an email address, a user can subscribe to a mailing list.

A subscribed user can email to that list, and all subscribers will get that email.

To subscribe, you give your email address, you receive a confirmation email, you click on the link to confirm.

Same to unsubscribe.

Simple, right?

Well it’s been a voyage of discovery 🙂

So it’s CGIs in Python with an SQL database for the back-end. No need for anything more than this – this is a simple, lightweight mailing list. We’re not talking ongoing background processes here.

Obviously, I used a state machine to control the flow of execution, and on an impulse I decided to try implementing the state machine in the database – which is to say, there’s a table of states, of events, and the state -> event -> state combinations.

I then after some time realised I would need to implement my usual approach to error handling – Python just throws a wobbly when something goes wrong, and actually want to build up a sane and user-readable call stack and ensure I always emit something sane to the HTTP server (otherwise it just thinks the CGI has fallen over and prints a 5xx).

Having done all this, what I’ve realised is that I’ve not thought properly about what happens when the database goes down.

The state machine steps through states (no kidding right) and there are resting states (like subscribed, or waiting for a confirmation link to be clicked on) and there are sequences of states, where you start the sequence and it moves through a sequence of states (which states depends on the outcomes of each state) and then reaches a resting state.

So what happens if the database dies during a sequence of states?

Well, what has to happen is *something picks up where we stopped*.

Uh. Ain’t nothing doing that… all the scripts are CGIs, they run when the user makes them run.

So really we need something like a background task which applies the state machine as necessary to every email address subscribed to every list.

Well, okay…

…but in fact, all this state machine checking, you know why you need it? it’s for and only for handling the subscription and unsubscription work – sending out the email asking for confirmation.


So, those confirmations – they are good practise. In fact, on a list with any significant readership, they are necessary, to prevent abuse.

But are they necessary, *now*, for my list? my tiny list?


Not at all.

I could just have a subscribe / unsubscribe button, which directly issues the necessary single-statement SQL.

So in fact what we have here is an example – which has cost me many days of work – of writing *unnecessary code*.

This is in fact one of the key problems of software engineering – making sure you only write that which is *actually needed*.


…has been updated by apt-get, and has completely lost all configuration information.


Now I see also a bunch of new preferences – like “enable/disable cookies”…!

I don’t want a web-browser, I want a *text based email client*.

I don’t like being spied on normally.

I like it even less when it’s in email.

BBC news just fell off the list

I am never going to visit the BBC news web-site again.

I idly went over to the site, while munching a little food, before going out.

There’s a story about a US police officer who repeatedly shoots and kills someone totally helpless and unarmed and (as ever) is found not guilty of murder or manslaughter.

The BBC page for the story has at the top the bodycam footage, on automatic play, of the victim begging not to be shot, and the police officer shooting him five times, as he crawls towards the police, screaming and dying.


Duplicity Catastrophe

The word “catastrophe” is not a word you want to see next to the next of your backup software.

It’s actually the same problem as before, only with much more impact.

Duplicity *synchronizies* your machine with the remote store, according to the command you’ve issued which describes which files to include and which files to exclude.

I’ve spent a solid week uploading – FLACs, videos, images, you name it. Good feeling getting it done.

I then think about my SVN repo, so I issue a new command on that drive with the svn repo listed for include, and excluding everything else.


Now, I made a mistake.

Users do that though. Assuming perfect user operation *is* a mistake. The sync model is for me unorthodox, and I was mentally treating each drive I have separately because they have different paths and I was using relative paths in the Duplicity command line.

Whatever, it happened – and mistakes do happen.

Because mistakes happen, when you come to *delete data permanently*, you check with the user, unless he’s specified an explicit over-ride.

The behaviour here makes Duplicity unfit for use because of the risk for inadvertant large-scale data loss.

Backblaze / Duplicity

I’m looking now to use an on-line backup.

I’ve selected Backblaze B2.

This is used from Linux with Duplicity, a command line tool.

I’ve been learning how to use it.

I just spent 20.5 hours uploading my collection of FLACs, ripped from my CDs.


So I then issued the next command, to upload the misc audo directory.

Wanna know what happened?

Turns out duplicity doesn’t *upload* what you tell it to upload; rather, it *syncs* between the backup destination and the backup you just specified.

So it just *automatically and without prompting deleted everything except the misc audio directory*, so it wiped the FLAC directory I just uploaded.

Seriously guys. Deleting data is a huge step and you never do it without prompting. This is as basic a mistake as sending passwords in clear in email.

But hey, open source. No quality pressure from paying customers. This is what you get. *Not* having profound and fundamental errors is almost unheard of.