2009-09-04

Awesomeness not truth

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

In which the Garfield cast enact a Dinosaur Comics pastiche, creating a sort of complement to No. 5 "Qwantzfield".

Art clipped from the strips of 1994-02-14, 1994-04-19, 2001-04-10, 2003-03-24, 2005-03-08, 2005-07-10, and 2007-02-15.

2009-08-24

Garfield recolored

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

I drained the colors from the 1995-02-27 Garfield strip and put new ones in. Does it bother you that Garfield is now a gray/white cat instead of an orange one? Should it bother you? Complex issues arise.

First, the strip already has the "token gray" character Nermal, but his appearances are few and far between, especially considering how many gray cats there are in real life. Surely having Garfield be gray in a single strip is just a (small) step towards breed parity in Square Root of Minus Garfield?

Unfortunately, not unambiguously so. Because Garfield already has an established color scheme, any change it is apt to be taken as implying that the change is for the better. Is gray better than orange for cat fur? In my (unscientific) experience it is certainly more common. Is the recolored strip perhaps an attempt to reinforce/perpetuate the notion that a "default" cat is (or ought to be) be gray and that it is meaningful to think of "orange" as a primary attribute of one cat though we would not consider the greyness of another one similarly distinctive?

On the other hand, we must not forget that Garfield is a stereotypically mean, egotistical (and, yes, squirrel-maiming) jerkass. That does not ordinarily reflect badly on all orange cats, because, well, duh, it's Garfield! But once we change his color, it is no more "just Garfield", and the characterization begins to interact with the coloring. In this context the strip seems to say that gray cats are egotistical squirrel-maimers. Strictly speaking it only asserts that some gray cats sometimes maim squirrels. But that was never in doubt to begin with, so it is inevitable that it will be perceived as a statement about gray cats in general.

Of course, one may also take the position that any attempt to use the coloring to make a point, no matter whether in favor of gray or orange, is an unwelcome abuse of the original strip's artistic vision. The counterpoint to that is if you don't even know what the point is, how can you be sure it's being made in the first place? Perhaps it's all just in your head.

On the other-other-other hand, now that the possibility of a gray Garfield has been aired, the cat is out of the bag, so to say. Even if henceforth Garfield is always orange, that too will be taken as a statement of sorts.

So, should you be offended? You decide. But eventually we'll all just have to come to terms with the fact that there is more than one way to skin a cat.

2009-08-14

The Happiest Dog in the World

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

With apologies to David Lynch.

Original strip from 1994-03-05, with new art cribbed from the 1991-01-03 and 1992-08-09 strips.


Earlier I also did No. 124: Krazy minus Kat, but didn't post about it. And a whole slew of Comment on a Postcard reconstructions.

2009-07-28

Lolfield

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

Readers who have been away from the Internet for the past several years, please see Lolcats at TV Tropes. Or the Other Wiki.

It's easy enough to create a Garfield lolcat. The trick is to find a framing such that Garfield is kept even remotely in character.

Original strip from 2007-02-14.

2009-07-24

Dissociated Garfield

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

Taking "remixed Garfield strips" fairly literally, I created these three strips using a generalisation of the Dissociated Press algorithm to two dimensions. Here is how it works, more or less:

  1. Construct a source image consisting of all regular non-Sunday Garfield strips from 2007, forced into a common 216-color palette. (Avoid dithering; that gives bad results).
  2. Generate the pixels of the output image in pseudo-random order, as follows:
  3. Set N=32 and find the N pixels closest to the target pixel coordinates that have already been generated.
  4. Locate all pixels in the source image that have exactly the same colours in the same relative positions as the neighbour pixels found in step 3
  5. If no source pixels were found in step 4, decrease N by one and start over from step 3.
  6. Otherwise, set the target pixel to the colour of a randomly chosen one among those found in step 4.

I generated a dozen-odd images – each takes about 6 hours of CPU time – and selected the most interesting ones. They tend to be more chaotic than I had hoped (and increasing the initial N does not seem to help), but still they are not complete failures.

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

2009-02-21

Do you know this tune?

Here's a song I wrote: [lead sheet] [midi] [mp3].

At least I hope I wrote it. I have a nagging suspicion that I may have accidentally plagiarized the first 2 and last 4 measures from somewhere, but I cannot for the life of me locate the source. Perhaps they are original after all. Have you heard them before? It would have to be before 1990, which is when I first remember diddling this.

I'm not posting any lyrics. The meter is common enough that there should be plenty of Western verse that fits the tune. If you think the mood somehow matches Danish poet Halfdan Rasmussen's wonderful Noget om skærsommernætter (which I do not have legal permission to set to music), I assure you that it must be pure coincidence.

Updated 2009-05-10: Horrible typos in chord progression on the lead sheet fixed.

2018-09-07: Plagiarism source found! Lines 1, 7, and 8 here are lines 5, 7, and 4 of Alf Cranner's tune to Den skamløse gamle damen (lyrics by Klaus Hagerup). I must have heard it in a recording by Eddie Skoller (Hugo og de andre, 1979).

2009-02-19

More socket strangeness

Today's fun fact:

If you're on Windows XP, and you have a TCP socket, and you have set SO_SNDBUF to 0 in order to do your own sender buffering, and you have called WSASend to start an overlapped send operation and Windows has called your callback stating the the send succeeded, and the other end of the socket is on the same machine, and that other end has not yet read the data you wrote, and you then call shutdown() to close the sending end of the socket, then the connection will be reset!

It works fine if you never touch SO_SNDBUF at all. But it doesn't help to set SO_SNDBUF to a nonzero value only just before shutdown()...

Downtime

My home server, which hosts trackmap.net as well as my personal website, all images on this blog, as well as my email inbox and a few other minor things, died on Boxing Day. It's been dead for seven weeks now.

I'm not blaming it for dying, really – it's been working faithfully round the clock since 2003. Five years of continuous service is not bad for a box I bought for £150, everything but a monitor included. It must have been built from the cheapest components around and never meant for anything but occasional word processing and web surfing. Instead I put it to work as an allround server and made it run a news server and SpamAssassin in 64 MB of RAM. Cruel me. It took to wheezing loudly in the final year of its life, though.

But gone is gone, which means that I was without email, which means that I was without spam. And I found that so pleasant that it took me seven weeks to gather myself together to buy a replacement. But now it's done and everything should be up and running again. I managed to restore all my data from the old machine's hard drive, which works fine if noisily. All that's lost is whatever email people have been sending me for the last seven weeks. If you have sent me mail and you read this, please resend!

The new server is a Shuttle X27, which cost me twice as much as the old one, but is four times more powerful in all relevant specs. And it's practically noiseless, at least compared to the other sources of noise in my living room – there's a fan inside for the CPU heatsink, but you have to know it's there to notice it.

My only complaint about the X27 is that is was hard to get an OS installed on it. I did not buy an optical drive for it, thinking there would be plenty of other options for getting software into it. But it stubbornly refused to recognize any USB stick as bootable, and setting the BIOS to boot from LAN had no visible effect at all. Eventually I discovered that it was willing to boot Grub from the old servers IDE disk hooked up through an external USB enclosure. Why it did that but would not boot from an ordinary USB solid-state stick is beyond me. Don't both use the same protocol on the USB level?

Anyway, all is well and I am connected again. Sorry for the interruption.