In which your humble servant strikes a blow for ecumenicism
ImHalal.com, meet Koshernet. Koshernet, meet ImHalal.com. Now that I’ve introduced you guys, I’m sure you can have a very fruitful collaboration.
via Hacker News
Dept. of “you can’t win for losing”
I’ve been trying to protect myself from the headaches of another massive hard-drive failure by backing up our home systems to Amazon S3, first by using JungleDisk, and more recently by using duplicity. (JungleDisk is a fine program—it’s one of the few pieces of software running on my Linux box that I’ve put down money for, and I’ve never regretted doing so—but the basic version is oriented towards backing up one user’s personal files, and knows nothing of Unix ownership, file permissions, etc.)
The one problem with this approach is that we have about 20 GB of music files on our desktop system, and our DSL connection is only 128 Kbps upstream, so the music stuff is not being backed up as frequently as everything else.
But this past week, we were on vacation in New York, and my wife and I independently hit on this brilliant idea: start One Great Big Backup right before we leave, and it should be done before we get back. (Well … mostly done. I should have worked out the math first. But that was the least of my problems.)
So I set One Great Big Backup to kick off at 10:00 a.m. Sunday morning, come back at about 4:30 Friday afternoon (the bus having arrived in Boston an hour and a half late), and discover that our system is even less responsive than it usually is under high load, and the console is printing out disturbing messages regarding the hard drive, containing cheerful messages like this:
SError: { PHYRdyChg CommWake Dispr LinkSeq TrStaTrns }
After a panicked reboot and some more panicked fumbling with fsck, I gave up and shut the machine down.
Did I mention that this is the computer that controls our X10 system for turning lights on and off at appropriate times?
Anyway, on Saturday night, I did a more sober assessment of the damage, and determined that:
- One Great Big Backup had not finished and seemed hopelessly corrupt, so the music files had not been backed up.
- The most recent backup of our music to JungleDisk had happened, umm, some time in July of 2008.
- Regular daily backups had been going on as expected, so at least the regular desktop files were safe.
- Googling the cheerful messages from the hard drive turned up advice along the lines of “hard drives are cheap, do you really want to keep using one that’s flaking out on you?”
So today’s adventures included a journey to Micro Center, where we picked up
- a Hitachi 500-GB internal SATA hard drive, on sale
- a Hitachi 640-GB external USB hard drive, on sale
- an Ubuntu 8.10 LiveCD
When I tried to install the first of these items, a little nub of plastic broke off the end of the SATA cable. Also, the drive came with two machine screws, wheres the drive bay in our desktop machine requires four screws on a drive to keep it in place. Maybe that’s why these things were on sale. Hopefully, the Micro Center folks won’t give us grief about replacing it tomorrow.
The second one seems to be working so far as well as one might expect, although VFAT’s limitations on file names and size make my attempts at recovery and forensics… well, I’ve used about as much creativity as I think I can stand right now.
The third item, though, has worked like a charm: I booted from the CD, plugged in the external drive, mounted the partition that had the music on it, and as far as I can tell, all those files were copied over without a hitch. I would have backed up disk images from the broken drive to the external one as well, but then I ran into VFAT’s 4-GB-per-file limit. See previous comment about creativity.
The incredible true story of the girl with two hearts
The Lancet, via the Guardian, the Boston Globe, and twelve thousand other media outlets, tells the story of Hannah Clark, a girl who used to live with two hearts.
Clark was diagnosed with heart failure as an infant, but because she had lung problems related to her heart disease, conventional treatment would have involved transplanting a heart and lungs. Instead, her doctors grafted a donor heart onto her own (see the diagram), in the hope that with less workload, her own heart would develop enough muscle strength to function by itself. She spent just over ten years steering between her own immune system rejecting the donor heart, and suffering cancer related to immunosuppressant therapy. Finally, the doctors removed the donor heart. She is now a healthy sixteen-year-old girl.
Quoth the Globe: “[I]f doctors can figure out how Clark’s heart healed itself and develop a treatment from that mechanism, many other cardiac patients could benefit. At the moment, doctors aren’t sure how that regeneration happens.”
Torchwood fans take note: Clark lives in Mountain Ash, Wales—near Cardiff.
The museum of institutional egotism
During my brief stay at yeshiva in Israel, we toured some of the archeological sites near Tiberias, and our guide pointed out a number of details about the Roman civil engineering from two thousand years ago. A tour guide who appreciates technology, I thought. Cool!
A few months ago, I read about the tunnel of Eupalinos, an aqueduct dug through a mountain on the Greek island of Samos by two teams starting at opposite sides. The tunnel is an impressive work of engineering when you consider that during the sixth century BCE, when it was dug, its surveyors had no magnetic compasses, nothing resembling modern surveying instruments, and possibly not even much geometry—Euclid’s Elements was written two centuries later. And yet, the two excavation teams intercepted each other in the middle of the mountain, just as Eupalinos had planned. Wow, I thought. If I could ever do a Geek’s Tour of Europe, that tunnel would be one of my stops.
So, when I heard someone had published The Geek Atlas, the first thing I did was look at the map to see if the tunnel of Eupalinos was on the list. To my surprise, it was not; in fact, not a single marker lay in Greece. The only place mentioned in Italy is the Tempio Voltiano, a museum dedicated to Alessandro Volta; nothing about classical Roman engineering here. The Neolithic excavations at Çatalhöyük are also off the list, but surely I am not the only nerd who trembles at the image of a nine-thousand-year-old city.
Perplexed, I shuffled the map to see what was in this atlas, and came across a marker near Boston. What local landmark did the author consider worth including among his 128 selections? The MIT Museum.
Oh, for the love of God and Jerome Weisner, I thought, you have got to be kidding.
My wife and I went to the MIT Museum in January, using our alumni status to get free admission, and we cannot in good conscience advise anyone to pay their own money to get in there. There are a few exhibits related to current research at the Institute, some kinetic sculptures that somebody presumably considers “art”, and a lot about our alma mater’s storied history. If you’re an MIT dean who wants to schlep naches from your department’s work being on exhibit to the public, or a rich and elderly alum looking to stoke your nostalgia for “Tech”, maybe you’ll like that kind of thing. Everyone else can give it a pass.
If you’re a geek visiting Boston and looking for something touristy, I can recommend the Museum of Science, especially if you have kids. There’s also the Harvard Museum of Natural History. Or, heck, you can just walk into MIT itself, wander the halls, and look for posters describing current research. And if you’re looking for something elsewhere in the world… I have no idea.
If anyone out there has come across a real geek atlas, please let me know. In the meantime, I’m saving my pennies for a trip to Samos and Çatalhöyük.
Unbound
A well-designed computer language, such as Lisp, strives to give its users “the illusion of infinite memory”: the programmer can allocate as many objects as he or she wants, and the language implementation is responsible for cleaning them up. As long as an object can be reached by the code that is running—as long as it is still useful, still capable of affecting the state of the world—then it remains “live”, and the garbage collector will pass it by.
Not so, alas, for human beings.
Rest in peace, Eric Naggum. You, who were passionate about denouncing the falsehoods that are commonplace in the geek world, are now in the World of Truth.
A debugging tip for weak-minded programmers (like me)
So if you have some script1 that was created with the time-honored “copy, paste, edit” method of abstraction, and it’s not doing what you expect, and you’re just tearing your hair out because the part that you edited is perfectly clear and works just fine when you try it from the command line all by itself, and you’re not really sure what one of the parts that you copied and pasted is doing but since all these other scripts use the same code surely there’s nothing wrong with it… you may want to consider the possibility that there’s some relationship between the code that you don’t understand and the output that you don’t expect.
There’s some cutting-edge engineering wisdom that I acquired through bitter and embarrassing experience. I’ll probably reacquire it next week.
1 If a one-liner2 in a Makefile can be dignified with the term “script”.
2 If five lines of shell code joined with backslashes can be dignified with the term “one-liner”.
Rediscovering Talmudic logic
[The following is based on a tikkun leil Shavuot talk that I gave at my synagogue last week.]
There is a mishnah in the tractate Nazir that I first learned from The Big Book of Jewish Humor, of all places:
Someone sees a koy [an animal that the rabbis were not sure whether to classify as wild or domesticated] and says
- “I swear to be a nazirite [see Numbers 6:1-21] if this is a wild animal”; [others say]
- “I swear to be a nazirite if this is not a wild animal”;
- “I swear to be a nazirite if this is a domesticated animal”;
- “I swear to be a nazirite if this is not a domesticated animal”;
- “I swear to be a nazirite if this is both a wild animal and a domesticated animal”;
- “I swear to be a nazirite if this is neither a wild animal nor a domesticated animal”;
- “I swear to be a nazirite if one of you is a nazirite”;
- “I swear to be a nazirite if none of you is a nazirite”;
- “I swear to be a nazirite if all of you are nazirites”;
the law is that they are all nazirites.
But the rabbis, it turns out, may have the last laugh.
If this mishnah sounds “illogical” to contemporary ears, it’s because to us, “logic” is a particular system of deduction that we learned in school, a tradition going back to Aristotle—what mathematicians call classical logic. But in the early twentieth century [isn’t it great to talk about “the twentieth century” as an era receding into history?], after classical logic had been reduced to axioms, some mathematicians began experimenting with other axioms, just as a chess master might entertain alternative rule sets for chess. One of these alternatives is intuitionistic logic, which is just like classical logic except that it lacks the law of the excluded middle—the axiom that every proposition must be either true or false.
(If you’re a geek who works with databases you may be familiar with “three-valued logic”, in which Boolean values may be true, false, or NULL. Intuitionistic logic is not three-valued logic. Nor is it fuzzy logic, in which a statement’s truthiness can be measured on a continuum from zero [totally false] to one [totally true]. The axioms of intuitionistic logic neither admit the law of the excluded middle nor define any third alternative to truth and falsehood.)
Let us assume that if you make a conditional oath, the condition is presumed to be true, and if you want to wiggle out of the oath later, you have the burden of proving the condition false. So if P is some statement that can neither be proven nor disproven, “I am a nazirite if P” renders you a nazirite, and so does “I am a nazirite if not-P”. By that principle, the first six oath-takers are uncontroversially nazirites, and there are several ways, depending on your logic system, to prove that the seventh one is as well.
By the time that we get to the eighth man, though, we have to consider what “I am a nazirite if none of you is a nazirite” means. If it means “I am a nazirite if the law would not declare any of you to be nazirites”, then the eighth man is off the hook, because, as we see, all seven of his predecessors end up nazirites. But since the halakhic judgement comes at the very end of the mishnah, maybe we are not allowed to interpret the eighth statement this way; perhaps, at the time the man took an oath, he had no idea what the law would declare, and therefore we cannot recursively apply the law’s judgement to interpret the validity of the oath.
So alternatively, we could interpret it as “I am a nazirite if none of the conditions that you imposed on your oaths are true”. And in order to wriggle out of the oath, the eighth man would have to prove that at least one of those seven conditions are true. Under classical logic, this is easy: “either the koy is wild or not-wild, so either the first or the second condition is true, so hand over the Manishevitz”. But under intuitionistic logic, the eighth man is stuck: he can’t assume “either the koy is wild or not-wild”, so he has to prove which of his predecessors swore by a condition that turned out to be false, which he can’t do.
For a reason that will become clear in the next paragraph, I think the mishnah considers “I am a nazirite if X, who swore another conditional oath, is also a nazirite” to have an ambiguous interpretation, and therefore considers both of the above possibilities and chooses the stricter one. Which is why the eighth man is also rendered a nazirite.
Now let’s consider the ninth. If we interpret “I swear to be a nazirite if all of you are nazirites” as “I swear to be a nazirite if the law would declare all of you to be nazirites”—look, that’s exactly what the law does, and he’s stuck. But if we interpret it as “I swear to be a nazirite if all of the conditions that you imposed on your oaths are true”, then he’s off the hook, because under both intuitionistic and classical logic, a statement cannot simultaneously be true and false, so the koy cannot be simultaneously wild and not-wild. But by the interpretive principle that I suggested in the last paragraph, the law interprets the ninth man’s statement conservatively, and he cannot use the axiom of non-contradition to escape. Thus he, like his eight fellows, is a nazirite.
(Note that none of the characters in our mishnah say “I swear to be a nazirite if this is a wild animal and not a wild animal.” Such a statement would not render you a nazirite, although it would earn you a flogging for the sin making a pointless oath.)
And so, seen through the lens of intuitionistic logic, our mishnah is a little more reasonable, but, I hope, no less funny.
Is this common thread between second-century Jewish law and twentieth-century mathematics a mere coincidence? I think not.
The early intuitionists were not merely tweaking the rules of logic out of whimsy; they had an agenda. Classical mathematics assumes that “the truth is out there” and a mathematician’s job is to discover the timeless properties of some Platonic realm of numbers, triangles, and so on. The intuitionists believed that the truth is in here (he said, tapping his own forehead); mathematical objects are constructed in the mathematician’s mind, and you can only prove things about objects that you can construct.
This attitude has a lot in common with halakhic decision-making. If you have a piece of meat that may or may not be kosher, at a certain point you may need to decide whether or not, in fact, you may eat the meat. If the meat’s status is confined to some ideal realm where all we can do is speculate “there exists in this slaughterhouse at least one side of beef such that…”, it does us no good. Jewish law gives us procedures by which, based on the incomplete information before us, we can make a decision one way or another. And by using these procedures, we are not merely discovering metaphysical facts about the physical world; instead, we create them.
We have experienced technical difficulties
Over this weekend I had one of those Learning Experiences that I could have done without. It turns out that when you transfer your domain registry to a different registrar, the information about your domain does not automatically get copied over. So if you sent email over the past few days and it bounced, or if you tried to access this site over the last few days and got a 404 error or a mysterious domain-parking page, that’s why.
I think everything is fixed now (except for the secondary MX record, which you don’t have to care about if you don’t know what it is, and maybe even if you do).
Beyond recycling
One of my pet peeves is hair-shirt environmentalism.
Since (at least) the 1960s, whenever policy-makers propose some change in environmental law (to reduce air pollution, to increase fuel efficiency, to retard global warming), a parade of grim corporate lobbyists descend on Washington to warn that if this law is passed, prices of essential goods will rise, factories will close, the economy will shrink, and millions will breathe clean air while standing on the unemployment line.
Environmentalism as it is popularly understood plays into this attitude by focusing our attention on how we should save the planet by limiting our own behavior. We should drive less, eat less meat and less conventionally-grown food, wash with less water, put up with less heat in the winter and less cooling in the summer, etc. Bummer!
I believe that the tradeoff between environmental quality and economic growth is false, and that as long as environmentalists are trapped into arguing against economic growth, then progress towards a cleaner and safer world will be, shall we say, glacial. So I am always interested to read stuff by environmentalists who show ways out of the tradeoff—people who can teach us how to tell the grim lobbyists, “this is not a death knell for the economy, although it might be a death knell for your client’s business plan.”
William McDonough and Michael Braungart are in this camp, and their book Cradle to Cradle: Remaking the Way We Make Things, is their manifesto. The gist of their book can be divided into two parts: bad news and good news.
The bad news is that practicing “reduce, reuse, recycle” will not, all by itself, save the planet; it will just ensure that we trash the planet more slowly, putting not so much toxic waste into the air and water supply, using not so much irreplaceable fossil fuel. (And sometimes it’s not clear that we have even that benefit. Recycled paper, for example, has to be bleached in order to be usable, which requires chlorine, creating a different sort of environmental problem.) Trashing the planet slowly is better than doing it quickly, but in the long run, we have to shift to a more radical change in the economy, one in which waste is not just minimized but eliminated entirely.
The good news is that this is possible, if the people who design industrial processes take care that every “waste” involved in producing their product (including the product itself, when discarded) can be “food” to make something else, of equal or higher quality. (A key term they use is “downcycling”—the form of recycling where the next-generation product is of lower quality than the original. Turning bright crisp virgin paper into dingy recycled paper is downcycling. Growing vegetables in compost is not.) One of their case studies involved an upholstery fabric for a Swiss textile mill; because they selected their raw materials carefully, the fabric can be thrown into a compost heap when the user doesn’t want it any more, and the effluent from the factory was as clean as the water going in.
McDonough is an architect and Braungart is a lawyer; while they bring their respective professional backgrounds to the book and the combination is useful, it’s a shame they couldn’t bring in an economist or political scientist as a third co-author. In economics, pollution is the classic example of a “negative externality”, a cost that you impose on other people and don’t have to pay for yourself. If every textile mill on the planet had to pay the full cost of making its effluent as pure as rainwater, then closed-loop processes would be the industry norm, not a niche market. Would this kind of regulation be feasible and enforcible? Is there another system, easier to implement, that would achieve the same result? Given that we can’t impose such a regime on all the world’s economies at one stroke, what would be some useful transitional steps, measures that prevent regulatory arbitrage? McDonough and Braungart don’t address these questions; they imply that we can make the world a sustainable place by making more virtuous choices as consumers within the existing capitalist economic system, and not by acting as citizens to change the rules by which that system operates. (Such an implication treads on another one of my pet peeves.)
But all in all, it’s a good and thought-provoking book. Nature is profligate: a tree produces hundreds of blossoms and fruits, and even though a tiny minority sprout into new trees, the rest are not “wasted”. We can be profligate, too: we just need to learn how to be profligate in the right way. It sure beats the alternative.
PS: In keeping with the authors’ principles, their book is printed on a plastic that can be melted down and reconstituted in perpetuity. (The authors say you can even wash the ink off the pages in hot water and reuse the paper directly, although since my copy is a library book, I didn’t try it.) Given how much paper is truly wasted in the publishing industry, it’s an interesting concept, although I suspect that e-books will become mainstream before plastic books do.

Someone sees a koy [an animal that the rabbis were not sure whether to classify as wild or domesticated] and says




