2009-07-17

Thrichromatic Garfield

I contributed today's Square Root of Minus Garfield strip:

Like many other "funny" newspaper strips, the colour in Garfield seldom really adds value to the joke. It seems that colour is just added as an afterthought, because surely the newspapers did not invest in full-colour-on-every-page capable offset machines just to run monochrome line art!

However, for a strip that does not really need colour for its artistic message, we could put the colour process to better use, to wit, saving paper by printing three panels of line art in the space of one.

In this strip from 2004-04-16, the first panel is in cyan ink, the second in magenta and the third in yellow.

2009-07-12

Trackmap.net update: Central Berlin

My summer vacation this year went to Berlin. I spent a week riding trains, photographing tracks, sketching track maps. Like last year I had no trouble with authorities, despite people in DB Sicherheit uniforms often being around as I took pictures.

Unlike last year, this year I've taken the time to draw fair digital track maps from my photos and sketches. The first part of the results are now available at http://trackmap.net/de/bea. More will follow in the coming weeks. I hope.

2009-07-10

Garfield IN SPACE!

I contributed today's Square Root of Minus Garfield strip:

Strip from 1982-11-01. Original dialogue.

Obligatory TV Tropes link.

2009-07-03

Xcftools 1.0.7: This is getting embarassing

I missed a single GPL blurb as I changed the license notices in xcftools 1.0.6. Yet another version fixes it: http://henning.makholm.net/xcftools/xcftools-1.0.7.tar.gz with SHA-1 checksum 3c3cf07ad6183605a3febf5a8af9f2bd4cb4ef83 and signature

-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAkpN/bwACgkQ+NrXGVy8F3PBSACfT86FBeqyGSYYNFwPJHQpIgmu
N5QAoIxW9pFFMsQVlp7d0G4SKYAIlZFV
=pNYG
-----END PGP SIGNATURE-----

Xcftools 1.0.6: Murphy strikes again

What gives? Just a few hours after I released xcftools 1.0.5, I hit another bug myself. It turns out xcftools would malfunction for canvas-sized layers that have a layer mask but no alpha channel. And while looking through the code for the right place to fix this, I discovered yet another bug sitting in the code.

So here is version 1.0.6, the second patch release in 24 hours. Quite some interesting times to live in, given that nothing happened to the software for three full years previously.

The source tarball is a http://henning.makholm.net/xcftools/xcftools-1.0.6.tar.gz. Its SHA-1 checksum is 1cda6fb03116028a516e87c25113a1d61338703b. And here's a digital signature:

-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAkpN46wACgkQ+NrXGVy8F3PpggCdGeGpcM8KKN3CiQtox5K7Xohe
g0IAoINbJyXKBxxQFxurpX48+bq5t6S0
=lOs9
-----END PGP SIGNATURE-----

While I was at it, I changed the licensing of xcftools from GPL-2 to Public Domain.

Now I wonder what I'm going to discover a few hours from now ...

Xcftools 1.0.5: a security fix release

Some years ago, I wrote a set of small command-line programs that can extract image data from Gimp's native file format XCF. I call them xcftools and use them for automating some of the steps in the production of track maps. Others have, allegedly, found them useful too. (They are among the top Google leads to my personal website, which I'll admit may not be saying much).

A few weeks ago, Jörgen Grahn filed a bug report through Debian's bug tracking system, pointing out that the program would crash when its -C option was used on a test image he provided. This turned out to be a buffer overrun bug, which provides a security hole. An attacker could infect a victim's account by constructing a special XCF file and then tricking the victim into using my tools on the XCF file, giving particular options to them. This vulnerability was assigned the tracking number CVE-2009-2175.

A bare-bones patch for the security issue has been available for some time in the Debian bug report log, but now here is an official source code release that fixes the bug along with a number of other, not security sensitive bugs.

This release also includes a small patch from Marcus Alanen that should make it easier to build an RPM package of xcftools.

The source tarball for xcftools 1.0.5 is available at http://henning.makholm.net/xcftools/xcftools-1.0.5.tar.gz. Its SHA-1 checksum is f4f532b6f32001ca6994e7cf5d0a94eb0d620ad8; and here is a digital signature for the tarball:

-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAkpNTpgACgkQ+NrXGVy8F3OE7gCfbxPKBqeEMsdcaAiThi/HSfjD
CG0AoIJZwny2KQ+GAKGzGS0tRo/XrevF
=QyQ4
-----END PGP SIGNATURE-----

Now I just have to wait for somebody to upload the new version to the Debian repository. Typical of this to happen only a few months after I renounced my own upload privileges after they'd been unused for two years ...

2009-06-15

Nullum crimen sine ...

Chief Judge Easterbrook swings his trusty cluebat in USA v. Pulungan:

A regulation is published for all to see. People can adjust their conduct to avoid liability. A designation by an unnamed official, using unspecified criteria, that is put in a desk drawer, taken out only for use at a criminal trial, and immune from any evaluation by the judiciary, is the sort of tactic usually associated with totalitarian régimes. Government must operate through public laws and regulations.

2009-06-03

On the Calixte incident

An open letter.

Dear Mr. Zimmerman

Congratulations with the Calixte win -- but can I ask you a question? I don't quite understand the brouhaha about the infamous "black screen with white font" comment in the warrant application.

As far as I can tell from the documents, the informant volunteered a whole laundry list of unsubstantiated allegations to the detective, including the "OMG command prompts are spooky" one that the whole blogosphere is up in arms about. A few of these allegations were actually related to the emails which the detective was investigating, so he summarized the entire interview in his affidavit.

Then, when the whole thing went public, it was made to look as if the police was considering the use of dual-booting and command lines to be suspicious. I can see that the informant was ignorant, paranoid, and malicious – but what evidence do we have that the detective shared this ignorance? This seems to be based only on the fact that he included the informant's ignorant statement in the warrant application. But he explicitly introduced it as a statement from the informant:

[The informant] reported that Mr. Calixte used two different operating systems to hide his illegal activities. One is the regular B.C. operating system and the other is a black screen with a white font which he uses prompt commands on.

Now, I would assume that the detective follows the rule that when he applies for a warrant, he will disclose to the court everything the informant told him about the subject. I don't know whether such a rule is actually written down in Massachusetts, but even if not it sounds like a sensible one to follow.

Assuming that the detective follows such a rule, I can see nowhere in the warrant application where he, in his own voice, asserts or even implies that using Linux is suspicious.

You seem to prefer that the detective, on his own initiative, should have decided that the informant's remark about dual-booting into Linux were irrelevant to the case at hand, and therefore he should have omitted them from the warrant application. I think that is a very dangerous direction.

Surely we don't want police to hide exculpatory evidence in their possession from the court when they apply for warrants.

Do you really trust the police to distinguish correctly between "irrelevant information" and "exculpatory information" when they put together a warrant application?

I don't, and I would much rather see police leave in a few irrelevant statement from informers than neglect to mention facts that might contradict probable cause.

In fact, a good judge might take the entire laundry list of disparate allegations from the roommate as a sign that the roommate was grasping at straws for ways to get Calixte in trouble, thus reducing the roommate's credibility. If they had been left out, Calixte would really have had cause to complain.

Sincerely yours,

Henning Makholm

2009-05-03

Cause, effect and Maxwell's equations

I've always thought classical electrodynamics was a somewhat mysterious thing.

Consider Maxwell's equations, in free space and natural units:

  1. ∇·E = ρ
  2. ∇·B = 0
  3. ∇×E = –∂B/∂t
  4. ∇×B = J + ∂E/∂t

where E and B are vector fields that respond to the sources ρ (charge density scalar) and J (current density vector) while also interacting with each other.

These equation tells us that (1) charge causes the electrical field to diverge; (2) the magnetic field does not diverge (magnetic monopoles do not exist); (3) a changing magnetic field causes the electric field to curl; (4a) a current causes the magnetic field to curl; (4b) a changing electric field works like a current.

With me so far? Good.

It is indisputable that these laws work; huge swaths of practical engineering depend on them for their bread-and-butter. But how can they work? Say that we turn on a current somewhere, such that B starts to change. The E-field feels this change and instantly rearranges itself (globally!) such that its curl matches what the changing B-field requires. But surely the E field will need to change in order to achieve this. And the B-field will need to respond to that, so the change of B we started out with is not actually the right one, and so on ad infinitum... How do the fields manage to obey the laws always and everywhere, no matter how we shake the sources about? In other words, is Maxwell's theory even internally consistent?

Only recently did I realize how easy it is to see that, yes, the theory is in fact consistent. I feel a bit like a simpleton for not having noticed this earlier – but I'm going to arrogantly assume that some readers have had trouble seeing it too, and therefore would find the following explanation interesting.

The trick is to reorder the terms in the equations slightly:

  1. ρ = ∇·E
  2. 0 = ∇·B
  3. B/∂t = –∇×E
  4. E/∂t = ∇×BJ

The two first equations are unchanged; they describe conditions on the fields that hold at any frozen instant of time. But the two last equations, rather than being formulas for finding the curls of the fields, now describe how each field changes from time t to tt, given the instantaneous values of the fields and sources at time t.

In principle, if we know all of the sources, we can choose how the fields are going to look at time t0, subject only to the constraints of equations (1) and (2). Then we can use equations (3) and (4) to evolve the fields as time passes, without anything left for choice. (We can choose how the sources behave, of course; and we can let the fields influence the motion of the sources through the Lorentz force law, but that is no conceptual problem).

However, as we do this, we had better make sure that equations (1) and (2) still hold at time t>t0. Since there is no room for choice after applying (3) and (4), this had better happen automatically – or the theory really is inconsistent. Let's see what happens when we differentiate (1) and (2), remembering that time and space derivatives commute and then unfolding the LHS using (4) and (3):

  1. ∂ρ/∂t = (&part/&partt)&nabla·E = ∇·(∂E/∂t) = ∇·(∇×BJ) = ∇·(∇×B) – ∇·J = –∇·J
  2. 0 = (&part/&partt)&nabla·B = ∇·(∂B/∂t) = ∇·(–∇×E) = – ∇·(∇×E) = 0

The second equation dissolves into 0=0, so if only ∇×B=0 is true at t0, it will stay true forever. On the other hand, the first equation becomes ∂ρ/∂t = –∇·J, that is, charge conservation! To demand that that ∇×E=ρ will stay true after t0 is exactly the same as to demand that charge is conserved.

The fact that Maxwell's equations imply charge conservation is well known and can be found in textbooks. But now we also know that any fields at t0 that have the right divergences can be extended to a solution of Maxwell's equations over all of spacetime, simply by evolving with (3) and (4). (That is, unless we worry about fields becoming infinite, which I don't at the moment.) If the t0 fields do not have the curl we would expect from electro- or magnetostatics given the sources at t0, this simply means that some radiation was passing through the lab at t0. The equations then tell us where that radiation is going, and (running time backwards) where it came from.

So far, so good. But note that in our new perspective, the whys and therefores of electrodynamics look somewhat different from the usual presentation: (1) the divergence of the electric field always points to the charges; (2) the magnetic field never diverges; (3) a curly electric field causes the magnetic field to change in the opposite direction of the curl; (4a) a curly magnetic field causes the electric field to change in the direction of the curl; (4b) a current causes the electric field to change in the opposite direction of the current.

It's not that one field feels the other one changing and curls in response. Rather the latter field feels the former's curl and begins to change in response to that curl. That seems to me to be a much more philosophically satisfying causal relation.

But the big novelty here is (4b). Currents no longer cause magnetic fields, at least not directly. Instead, currents cause the E-field to change, and it is the resulting imbalance in E that causes magnetic fields to build up as a secondary effect.

Here is one way of looking at it: Imagine we have some positive charge sitting atop an equal amount of negative charge, such that ρ=0 throughout. Now we move the positive and negative charges away from each other, creating a current. The immediate effect of this current is to string out a pencil of electric field lines between the positive and negative charges. This initial E field closely follows path of the current – of course we shouldn't expect a nice dipole field immediately due to the finite speed of light. But now, at the boundaries of the region of current, the strength of E varies in a direction perpendicular to the field lines, which means that there is a curl of the E-field. This makes a B-field begin to circulate around the path of the current. At its edge there's a curl of B which again starts to modify the E-field, and so on ... The end result is that the original pencil of electrical field lines radiate away from each other into free space until they assume the configuration predicted by electrostatics.

Of course, all this does not mean that it isn't useful to imagine that changes cause curls rather than vice versa, when solving concrete problems. Once we've seen that the equations are consistent, we can apply them in whatever direction we choose.


Just for completeness, we can do the same thing with potentials. Introducing the vector and scalar potentials A and φ, a standard presentation of electrodynamics is:

  1. ∇²&phi – ∂²φ/∂t² = –ρ
  2. ∇²A – ∂²A/∂t² = –J

together with the Lorenz gauge ∇·A+∂φ/∂t=0. As before, we solve each equation for the highest time derivatives:

  1. ∂²φ/∂t² = ∇²φ – ρ
  2. ∂²A/∂t² = ∇²AJ

We see that if we know the sources at all times, and the potentials and their rate of change at time t0, the potentials at all times are determined. Of course the potentials at t0 must satisfy the Lorenz condition, and they must keep satisfying it in the future. We differentiate it to find

0 = (∂/∂t)(∇·A+∂φ/∂t) = ∇·(∂A/&partt) + ∂²&phi/∂t² = ∇·(∂A/&partt) + ∇²φ – ρ

which is another relation between the potentials and their rate of change, this time also involving the charge density. This has to hold at t0, just as there was an initial condition involving charge density in the E-B formulation. But it also has to continue holding, to maintain the Lorenz condition beyond t0t, so we differentiate it once more:

0 = (∂/∂t)(∇·(∂A/&partt) + ∇²φ – ρ) = ∇·(∂²A/∂t²) + ∇²(∂φ/∂t) – ∂ρ/∂t = ∇·∇²A – ∇·J – ∇²(∇·A) – ∂ρ/∂t

But ∇·∇²A=∇²(∇·A) as a matter of vector calculus, so this reduces to charge conservation. The end result, as for the field case, is that we have two equations for the time evolution of the world, and two equations that give initial conditions that must hold at t0 – and the initial conditions will be preserved by the time evolution exactly if charge is conserved.

2009-04-18

Be2 sells email addresses to spammers

An open letter.

Dear Nastya,

I was glad to receive your email which read:

> I saw your profile on the dating site: be2.dk
> I loved it, and I would like to learn more about you.
> My dear, i am girl and I am 27 years old,
> I would like to get acquainted with you,
> if you are not against it, we can support our contact.
> You can write me at my e-mail: [REDACTED]@yahoo.com
> Also, I sent my letter, my picture, I hope you like it.
> I would hope that you write to me and also send me your photo.
> Sincerely yours Nastya!!!

It is true that I had a profile on be2.dk -- but that was long ago, and it was only active for a few hours until I found out what exorbitant prices Be2 charge for the ability to write other than stock messages to other profiles. (They do not disclose their prices until after one has created a profile).

As mentioned, I quickly deleted the profile. But now, months later, your email was sent to the throwaway email address I used to create the Be2 profile and never used elsewhere. This tells me that Be2 must have been selling email address lists to spammers.

It is very nice to know this, because I was just about to decide that perhaps I had been too miserly and should give Be2 a second try, despite their high fees. Now that I know they associate with spammers I've lost my inclination to do so, and thereby saved a bunch of money.

For this I thank you.

However, the absence of any specific details in your email (aside from the minor matter of writing to a stolen address) suggests to me that you are simply spamming. I suspect that your eventual intent is to sell me some sort of (possibly interactive) pornography, rather than cultivating a honest friendship.

On this basis, I am sorry to say that I do not want to pursue a further acquaintance with you. But I do wish you the best of luck in whatever scam it is you're running.

Sincerely yours,

Henning Makholm