Rosio Pavoris a blog

Seriously fucking adorable



Permalink 6 Comments

Encryptore

A classical cryptography library isn’t much of a toy to non-programmers, so in an effort to learn about Python’s Tkinter library, I wrote a quick-and-dirty GUI front-end to it:

Encryptore

I know it’s ugly, but that’s because it’s Tk. I think it’s meant to be ugly. Tell the Python dudes to use GTK+ bindings for Python’s standard toolset.
It works, though, even if you can’t paste text into the textboxes.

There are two ways to run this, and both require that you have Python installed (I still use 2.5.2, but I see no reason why it shouldn’t run under 2.6).
The first, and most obvious, is to copy all of that code into a file, and then copy all of this code into a different file called classicalcrypto.py. Put those into the same folder and just double-click on the first file to run it (if you aren’t using Windows, you’ll obviously need to chmod +x first).
The second and slightly more complicated way is to install the classical crypto module separately. Download and untar this file, and then install it by running the setup file like python setup.py install. Then just put this code into a file, and you won’t have to worry about keeping two files in the same folder.
If anyone has any problems getting it to work, let me know. I did try to package it using py2exe, but, unsurprisingly, py2exe is a piece of shit and that didn’t work.

Only most algorithms are included, because some have non-trivial key requirements; the four-square cipher, for example, requires two Polybius squares. I left the Solitaire cipher because it still works, for some reason, even though it shouldn’t. I wouldn’t trust it to be strong.
Atbash and ROT13 ignore the key you enter. Caesar and Rail Fence require it to be an integer (in Rail Fence’s case, higher than 1).
Keep in mind that Rail Fence is a permutation cipher, so trailing newlines are significant characters. For reasons I couldn’t be bothered to troubleshoot, Tk appends a newline when it updates the contents of the textbox, so if you just hit encrypt and decrypt in a row, you won’t get the original message back.

Permalink Comments

Why is Leterme still in charge?

What is it about Christian democracy and a pathological inability to balance a federal budget? If we must have a prime minister from that party, it’d be nice to at some point have one who doesn’t see it as his god-given duty to triple the national debt by the end of his term.
Dehaene managed to balance the budget, particularly in his second term (though only because Belgium was very close to not being granted membership of the Eurozone otherwise, with our massive public debt amounting to well over 100% of the GDP, courtesy of the Christian democrats in the 1980s), but it wasn’t until the liberals got elected that we actually had a real federal surplus (which, given the fact that they also lowered taxes and expanded social programs, was quite impressive). Verhofstadt actually managed to bring the public debt down to 83.5% of the GDP.1

Not that the Fortis bailout wasn’t a necessary measure2 (and so far, a successful one; I made several euros in the past few days), but since Leterme already managed to restore the federal deficit by fucking up the negotiations regarding the federal reforms and losing the desperately-needed 400 million € from the Flemish regional government because of it,3 promising that “the tax-payer” won’t be asked to “carry the burden” of Belgium’s 5.7 billion € contribution to it is ridiculous.

Yes, our taxes are higher than they are in most countries, but our ridiculously extensive social programs mean that doesn’t matter for the most part. They could be quite a lot higher, and this willingness to just shove stuff on top of our debt stack is going to do a lot more harm to the economic independence of our citizens in the long run than raising income taxes by, say, another 10% possibly could.
But obviously, raising taxes would hurt Leterme’s chances of getting re-elected, and those are low enough as it is, thanks to his pigheaded contempt for Wallonia and a complete inability to come to reasonable compromises.

I guess I should be grateful that gay marriage is still legal, and abortion and euthanasia.4 I voted for the socialists in the last federal election, and for the liberals in the one before that, and this sort of bullshit is exactly why.
The sad part is that many CD&V voters will just blame economic difficulties on immigrants and vote even further to the right next time. And Vlaams Belang is positively Republican.


1 Though in fairness, Dehaene started the trend.

2 Unlike the retarded and not entirely unrelated bailout proposed in the US, which would only have served to ensure President Obama would start up to his eyes in debt, rather than merely up to his chin.

3 The Flemish Minister-President is also a Christian democrat (indeed, it was Leterme himself until last year), so you might be inclined to think that at least they can run regional budgets, if not federal ones. The Flemish budget was drawn up by the Flemish Minister of Finances and Budget, though, who is a liberal.

4 To their credit, I don’t think getting rid of gay marriage is actually part of the CD&V platform. They did block further liberalisation of our euthanasia laws, though, which made them look like asses when Hugo Claus died earlier this year.
Abortion has been a non-issue in the Belgian political discourse for the past few decades, even though those laws could do with some serious review too. Much of the point is moot, though, because we actually have real sex ed, even in the Catholic schools.

Permalink 4 Comments