Move semantics and regex tutorial

Although it starts off a bit fuzzy, eventually this article managed to explain to me these by now old-fangled move semantics of C++11. I still am not a hundred percent certain when C++ will invoke this operator (after ‘analysis’), but apparantly you can force it by using std::move. Hmm, good idea, and not quite the simplest implementation, because now I must think when C++ will use it and when not.

More straightforward is this regex tutorial. It’s the first of these tutorials I’ve done, and I can recommend this one. Very hands-on.

Infrastruct

A pasttime of mine during longer car or train journeys is to imagine new and better infrastructural links. I also like to (a a child very often) to browser maps and notice missing links, and sometimes even researching that in fact a removed rail line is indeed the reason for that multi-kilometer gently arced forest edge. During traffic jams I like to imagine metro lines between my source and destination.

Here is an anonymous person writing up rather elaborately some (actually many) of such musings: Infrastruct. In case you like infrastructure and fantasy, then have a look!

The Birth & Death of JavaScript

Watch this half hour presentation from the future about Javascripts life. To be honest, after seeing this presentation, I am suddenly not as sad about the Javascriptification of all things software. Perhaps there are indeed eventually benefits. Having made my first par2deep release I am confronted by the woe that is multiplatform development. Cross-platform executable .jars or .Net-exes suddenly sound like great solutions!

Python and Qt

With the Qt for Python announcement, it is hopefully going to be easier to develop Qt-gui’s for Python programs. I’ve written a Python-Gui once, and I used the included Tkinter, which was OK, but no more. First of all, there’s both an old and a new Tkinter included in Pythons standard library (why?). The newer version looks more native, but has a slightly different set of widgets, and in some cases worse (looking at you, slider!).

On the todo has been for a while a Python packaging tool, that would make it easy to both build and distribute Python-QT software: fbs. So far, I distributed only Windows version of that gui tool, and that by simply zipping up a full Python install, which is of course not great. I dicovered that both Qt for Python (or PySide2) and PyQt provide wheels, so you don’t have to build Qt yourself anymore when making your Python and Qt application, which is very nice. The size of those wheels are the bad news (~200 and ~100MB respectively), and I have not tried fbs yet but hope it removes the unused parts. Another tool that abstracts over both of these Qt bindings (allowing one to swap one in and the other out without changing a line of code) is the aptly named Qt.py.

Well, as you can see all this is a bit messy, and unless fbs removes unused components a bit harsh on the installation size (your Python application is probably far less than 1% of the total package size) . Hopefully Qt’s official support means it will improve the situation.

Nederland Geldland

Bij den Correspondent legt een Vlaamse SPA minister uit waarop Nederland, en Dijsselbloem in het bijzonder, heel van van het socialistische padje af zijn. Met een aantal getuigenverslagen van de zwoele jaren ‘08 en de daaropvolgende Eurocrisis maken het gesprek interessant.

Verder een driedelige serie over “Arbeid en Kapitaal” bij de Groene, die althans mij wat financiele geschiedenis weet wijs te maken. Lees delen 1, 2 en 3.

Trein is vervuilender dan vliegtuig

Tot deze verassende conclusie komt de NRC. Om precies te zijn: het energieverbruik in Joules ongeveer gelijk, uitgaande van volle bezetting. Als die trein zoals in Frankrijk op nuclaire stroom rijdt, dan is de uitstoot van het vliegtuig uiteraard groter. Maar in de rest vaan Europa rijdt die trein helaas op kolen, en dan is de vervuiling groter dan het vliegtuig.

Mail clients

‘t Is been a while since I spoke of technology, but a lot has changed. With the new Gmail interface out, let’s discuss email for a while. I’ve been using Zoho.eu (Zoho hosted in Europe, seems like a parallel implementation in order to be free of the American state having free access) for a number of years now, with great delight. Their web interface is modern (conversation view!), they have both IMAP/CalDAV/CardDAV and Exchange Activesync, and I have never had an issue with mail delivery or receiving.

Have you noticed how email clients have moved online but on phones, which most of us use more and more for email, we still use clients? In fact, on phones everything is being appified, it almost seems that nobody uses the browsers anymore! Of course, websites are fatter and fatter, and mobiles don’t like that, so an app that interfaces through an API is much easier on the loading times and data usage, and app publisher get to snoop on you as a nice side-effect!

Anyway, email clients. Actually, first encryption. De-googlifying myself, I’ve toyed with the idea of GPG encryption for years, while at the same time realizing I will never ever be able to get others to use it. In particular because everybody uses webmail nowadays. There is Mailvelope, and GPG javascript has seen development by the fair people at Protonmail, but it seems to me we’re still quite a ways from mom-and-pop-proofing ubiquitous encrypted email. Que Autocrypt, a protocol that will do away with complicated key-sharing issues and send them along with the first message to a person. This creates end-to-end encryption similar to Whatsapps: unless at the moment of key exchange a snooper has access, all future communication is safe (the content of your email that is). Provided your client supports Autocrypt, you have to do exactly nothing (except transfer your own key to the devices you use that email address on). Well, unless you use webmail clients. The protocal uses email headers to negotiate the keys, which are typically not available from a webmail client. Mailvelope developers are keen to add the functionality but this is a pretty severe obstacle.

So, in order to anticipate using Autocrypt, I decided to try how good-old Thunderbird has held up. Well, it’s old, as we know it does not receive much attention, but it’s not bad either. It does IMAP, with a plugin also CalDAV and CardDAV, and another plugins gives you Conversation View. It can be a bit slow, and I do not have a lot of email (I save important messages to disk, and generally delete). I tried out KMail too, and while it also supports eveything (through Kontact it bundles various KDE PIM apps into a suite) it requires a much more elaborate setup. Each calender separately like Thunderbird, but also IMAP is separate from SMTP is separate from what it calls ‘identities’, so after entering eveything in different panels in different areas you have to string them together under one identity. Oh and by default all new (read or unread) mail in any folder will give a notification. And deleting mail (or drafting, or sending) will by default put mails in a local folder, not the folder associated to the account you’re sending from (SMTP and IMAP being separate concepts to KMail and all). Also, the grouping of messages by title is not across folders and a workable but ultimately poor impression of Conversation View. Ah, and although I do not use it yet, no Autocrypt support yet. In other words, I have set up KMail for the last time ;) Birds of Thunder next time.

What’s also funny is how Windows Phone supports CalDAV/CardDAV by default (if you pretend to use iCloud and then change the server) whereas Android requires you to install seperate non-Google apps to sync your stuff. Googles own account is priviledged. What, Android? Yes, I’ve turned (partially) to the dark side. But I flashed on LineageOS and mostly use F-Droid. It’s still not as easy to use as Winphone. Delta Chat is a fun implementation of Autocrypt by the way, it implements email as a Whatsappy chat alternative and uses Autocrypt for it’s end-to-end encryption. Android only however :/