Tuesday, September 18, 2007

Ubuntizing Red Hat Liberation Fonts

You've probably heard that Red Hat has released a set of Liberation Fonts, which are metric equivalents of the Microsoft Arial, Courier New, and Times New Roman fonts; thus you can use, e.g., Liberation Serif and your OpenOffice.org document should be exactly the same size as a Word document with the Times New Roman font. Note that they don't look exactly like the Microsoft fonts, for that would be copyright infringement, and rightly so.

The fonts aren't available in Ubuntu at the moment, but following a Ubuntu Forums thread, I extracted the relevant part of the installation script. (The rest of the script is supposed to improve font rendering on your screen — my fonts render well enough for my needs, so I'm leaving that alone. YMMV.)

To install the Liberation fonts, save this script as red_hat_lib_install:

#! /bin/bash

## See http://ubuntuforums.org/showthread.php?t=515947&highlight=red+hat+liberation+fonts

## Or http://ubuntuforums.org/showpost.php?p=3123244&postcount=3

## We'll only add Red Hat Liberation Fonts, forget the sub-pixel stuff
##  for now.

## Download the fonts from Red Hat
wget https://www.redhat.com/f/fonts/liberation-fonts-ttf-3.tar.gz

## Extract the package
tar -xvf liberation-fonts-ttf-3.tar.gz

## Copy the fonts to the proper directory
cp -r liberation-fonts-0.2 /usr/share/fonts/truetype/

## Delete temporary files
rm -r liberation-fonts-0.2/ liberation-fonts-ttf-3.tar.gz

## Rebuilt the font cache
fc-cache

and then

sudo ./red_hat_lib_install

Open up an applications such as OpenOffice, and admire the fonts (or not, again, YMMV, but you don't have to use them if you don't like them).

And while you're at it, look at all of these already Debianed fonts. There may be something there you really like — just don't send me your resume in flatline regular.

Sunday, September 16, 2007

Blogger Play

This is probably a statement about how much privacy we're willing to surrender in exchange for free web presence.

Or, maybe, it's just interesting:

http://play.blogger.com/

“Real Time” viewing of images uploaded to Blogger.

Sunday, September 09, 2007

Welcoming Back an Old Friend

My favorite old calendaring software package is called ical, but it's got nothing to do with Apple. It's an old tcl/tk program, and I've discussed its installation many times before.

For whatever reason, I hadn't been able to run ical under Ubuntu Feisty. Today I decided to try, once again, to do something about it. A bit of Googling found that there's a bugfix version of ical, 2.3.2. I downloaded that, then followed the directions for creating a proper makefile:

$ tar xvf ical-2.3.2.tar.gz
$ cd ical-2.3.2
$ ./configure --with-tclconfig=/usr/lib/tcl8.4 \
--with-tkconfig=/usr/lib/tk8.4 \
--with-tclhdir=/usr/include/tcl8.4 \
--with-tkhdir=/usr/include/tcl8.4
$ make
$ sudo make install

Which puts the program in /usr/local/bin. Of course, you have to have the Tcl and Tk packages and -dev files (headers) installed:

$ dpkg -S /usr/lib/tcl8.4
tcl8.4, tcl8.4-dev: /usr/lib/tcl8.4

$ dpkg -S /usr/lib/tk8.4
tk8.4, tk8.4-dev: /usr/lib/tk8.4

$ dpkg -S /usr/include/tcl8.4
tcl8.4-dev, expect-dev, tk8.4-dev: /usr/include/tcl8.4

So at the very least you'll need tcl8.4, tk8.4, tcl8.4-dev and tk8.4-dev.

And so, once again, I have my favorite calendering program.

Thursday, September 06, 2007

Corfu, Greece

For some reason, not all of the pictures are displayed in this entry. I've uploaded the whole post to my personal web pages at
http://home.comcast.net/~mikemehl/corfu/
note that the pictures are significantly bigger there, so it will take longer to download.

Given our switch from Comcast to Verizon, I don't expect that link to stay up very long, so I've tried replacing the pictures in this blog. If they vanish again, I'll put them on my new web page, wherever that may be.

I spent the last week of August on the island of Corfu (Kerkyra), Greece, attending ISMANAM 2007 (which highly amused the immigration lady in London). The meeting was quite good, I learned a fair amount and, as with all good meetings, made contacts with people I'd never met before.

But I don't want to talk about that. I want to show you some of Corfu:

  • My hotel, the Louis Corcyra Beach, is a “resort” hotel. The view is quite nice:



    but the rooms aren't what you'd think of as American quality: there's a window air conditioner, the beds are small, and the floor is tile. If you want a resort that has fancy American style hotel rooms, for about the same price (or cheaper), go to Cancun. They did have a reasonable American-style (eggs, ham, bacon, etc.) breakfast included in the price (110 €/night).
  • The Louis Corcyra is in Gouvia, which is sort of the Ocean City, Maryland, of the island. That is, lots of bars, lots of tourists running around. This time of year it was mostly Brits, and every bar had a giant TV showing Premier League Soccer. I wish I'd taken pictures of the night-life, but all I have are shots like Thursday Morning, 10 a.m.:

  • Some of the hotels (but not the Louis C) have internet access, at a rate of about 6 €/hour. (1 € ≈ $ 1.40, at least last week). A better deal, after 6 p.m., at least, is to go up to Dassia (about 3 km from Gouvia) and stop at Great Shakes, a British pub serving Indian food prepared by a Welsh chef. They have free Internet access. Well, not exactly free, you're expected to buy something, but for 5 € you can get:



    which you can nurse for an hour or more. Good curries, too.

    (Note the abomination on the glass, required by the EU's slavish adherence to the metric system. I love the metric system, but some things are sacred.)
  • More interesting was Corfu City itself. I got to spend most of last Friday there, waiting for my plane to take off. Here I stayed at the Cavalieri Hotel, a refurbished 17th century mansion. The room was nicer than the one at the Louis C, cheaper (75 $euro;, with a smaller breakfast buffet), and had a bed that was way too soft, and a really small, two-level, bathtub that almost killed me (and may still, my ribs still hurt from where I fell).

  • Corfu contains several museums. I spent a half-hour (that's all it takes, really) in the Archaeological Museum, which features exhibits from the last 2,600 years. I particularly liked the lion from the 7th century B.C. tomb of Menecrates (the poet, I think):



    and the Gorgon pediment from the temple to Artemis:
  • Corfu is dominated by two forts, the Old Fort and the New Fort (duh). The Cavalieri is near the Old Fort,



    which was originally built by the Venetians, who controlled the island in the 15-18th centuries, and modified by just about everyone who since. The fort is on an islet that was artificially separated from the mainland.



    It's a long way up. Take a look at the view coming into the fort,



    and then a view of the cross from the level of the clock tower (but off to one side),



    and then look at how tall the cross itself is:



    Finally, take a look back at the town, from the top of the fort. The Cavalieri is off to the left just behind the park:



  • For one last shot, let's see if Blogger really can upload movies now:

Galen Frysinger has much, much, much, more about Corfu, along with just about every other place in the world.

(Pictures taken with a Canon PowerShot A550, downloaded to this computer using gthumb, though digikam also works.)

Sunday, August 19, 2007

AL Central, 18 August 2007

When your team is out of the cellar in August for the first time in four years, it's time to celebrate:

Team W L Streak Pct. GB
Cleveland68 54 W3 .557 —
Detroit67 56 L2 .545 1 ½
Minnestota61 61 L1 .500 7
Kansas City55 67 W3 .451 13
Chicago54 68 L7 .443 14

Since 2004, the KC number in the “GB” column has usually been in the 30's, so being only 13 games back is a considerable improvement.

Tuesday, August 14, 2007

Holyrood Cats

For reasons that escape me, this blogs pictures of our cats are very popular. In a shameless attempt to get more hits, Linux & Things presents:

The Cats of Holyrood, Kansas

Taken on a recent visit. Note that slight resemblance to our cats. These however, are only about eight months old, though the black one has already had one litter.

Sunday, August 12, 2007

The Final Frontier

Haven't posted for a long time, I know. We're doing lots of traveling in August. In the meantime, here's something to hold you over:

This is what it felt like to be a space geek in the '60s.

Tuesday, July 31, 2007

Doing the Wave

Be vewy, vewy quiet. I'm practicing waving.

I'm off to Kansas for a family reunion. While there, I'll engage in the Midwesterner's inalienable right to drive long distances to get groceries, go to the movies, and shop at WalMart.

It's not unlike living in suburbia.

The difference is that when driving in suburbia you're sitting with hundreds, if not thousands, of cars, all moving at about five miles per hour, down eight-lane superhighways.

In Kansas, you're meeting one car every five to ten minutes coming at you on a two lane road at a combined speed of well over 100 miles per hour.

And, likely as not, the driver knows you.

This requires some form of acknowledgment in the brief time you're going to be making eye contact. It might be, e.g., your third cousin's favorite niece's third husband's mother. If you don't acknowledge your existence you'll get a call from your aunt, along the lines of “ Michael John Mehl, you drove right passed Matilda Hollister and didn't even say hello!”

Or it might be someone from a school whose team you beat forty years ago for the Quivera League championship. “Did you see that Mehl kid? He just drove on buy without saying anything. He's gotten pretty stuck up since he got that job out East.”

On the other hand, you can't just stick up your hand and wave it back and forth, like Queen Elizabeth. Trust me, you look like a dork. You need a subtle wave, one that's visible to the other driver, but not looking like you're trying to flag down the bus to Salina.

It's kind of a half salute, really. You start to move your right hand off the steering wheel toward your forehead, but it never gets there. If it turns out you don't know the person, your thumb need never leave the wheel. If it's someone you know fairly well, say your Senior Prom date, it's OK to lift the hand halfway to your forehead and open the palm in a slight waving motion, possibly touching the brim of your cap, if you're wearing one.

Other people get proportionately smaller waves.

When I was out in Kansas last month I noticed that I'd forgotten most of this. Hence the remedial wave practice. So if you see me driving down the road today, hand moving up and down in random fashion, you'll know what I'm doing.

See y'all in a week or so.

From Our Wish-This-Happened-In-Real-Life Department

The way error reporting should be.

Saturday, July 28, 2007

The Frakin' Universe Re-explained

Some time ago I did a minor bit of playing around with Flash animations, using the "Export to SWF" option in OpenOffice.org.

It wasn't all that pretty, and you had to repeatedly click on the picture to move from frame to frame.

Then, a few weeks ago, Penguin Pete started a series of Flash tutorials. The first post used the SWFTOOLS package, which looked like it would be fun to play with. So I stripped out all of the frames from my original OpenOffice Impress file, translated them into JPEG, renamed them frame01.jpg, frame02.jpg, frame03.jpg, ..., give the command:

$ jpeg2swf --rate 0.2 frame*.jpg -o cbm2.swf

and produced the following:

(Click here for the animation)

Neat, huh? A few comments:

  • swftools isn't available through Ubuntu, so I complied it myself, with the standard options. This was fine, using ./configure with no options, except:
    • The gif2swf program was not compiled, because I didn't have the libgif4 library. libgif4 is available under Ubuntu, but its installation requires a bunch of programs to be removed from the system, including emacs. This makes it toxic, so I'll forget about converting gifs into flash. Fortunately, we have ImageMagick's convert program, and why is anyone using gifs in favor of pngs anyway?
    • When I did “make install” the man pages weren't copied into /usr/local/man/man1. I had to do it by hand.
    • There are some library files which are also compiled, and they aren't installed, either. I don't have any use for them right now, but someday I might, right?
  • I'd like to have the titles and pictures fade in. This doesn't seem to be available in swftools, so I'll have to look for another program.
  • It would also be neat to have the BSG theme playing in the background, but swftools doesn't seem to import sound files, either. Yet another reason to search more.
  • To be true to the original opening, the “many copies” picture should be a montage of Ann Coulter pictures. Anybody got one?
  • And the punchline should probably have Obama instead of Teddy.

So consider this the 0.2 version of the animation. More to follow, someday.

In the Beginning

Linus created the Kernel

(Don't you just hate it when bloggers create bookmark entries?)

Saturday, July 14, 2007

Silver Anniversary

At least according to Scientific American, the first computer virus was created twenty-five years ago, in 1982.

It ran on an Apple ][. I bought an Apple //e went it first came out, in 1983, but I never heard of this virus.

I seem to remember something about computer viruses in David Gerrold's When HARLIE was One (1972), but I may not have the correct reference. Certainly the idea of a computer virus was present before 1982, but it the development of the personal computer to make propagation possible.

Monday, July 09, 2007

My Job Description

People often ask me what I do to make money, as opposed to post this inane stuff.

This pretty much describes it:

Sunday, July 08, 2007

Dang, Missed It Again

Maybe next year:

A belated Happy Roswell Day to you all.

Wednesday, July 04, 2007

A Treatise On the Number of Wizards

In preparation for the biggest first-edition press run in the history of the world, I'm rereading all of the first six Harry Potter books. While doing that, I came up with a question that's not answered adequately in the books: Just how many wizards are there?

While we can't get an exact answer, we do have enough information to allow a Fermi estimate of the answer. (Named after Enrico Fermi, a Fermi estimate attempts to get to within an order of magnitude of the correct answer to a problem based on a limited amount of information and reasonable estimates of the rest.)

The crucial fact we know is that Harry Potter's boys' dormitory room in Gryffindor has five beds. Assuming that the girls' dorm has the same number of beds, and each of the four houses has the same number of students, we see that Hogwarts admits forty students a year. We know of three schools of wizardry in the world, so that means that there are 120 wizards of a given age, all throughout the world. Hogwarts itself would have something less than 40×7 = 280 students, since many students leave before the end of the seventh year.

Of course, not every wizard is admitted to a school. We know of some wizard family members, such as Fitch, who have extremely limited powers. Presumably they aren't generally admitted into schools — though the admission of Neville Longbottom must mean that the schools are willing to scrape near the bottom of the barrel, at least for legacies. Then, too, an unknown number of Muggles are admitted to the school.

Let's assume, for the sake of argument, that the schools admit ten percent of all who could conceivably be called wizards. This is probably too low a figure, so our final number will be on the high side. Since the schools admit 120 students a year, there are approximately 1200 wizards of a given age, in the teen years, at least.

We then assume that a typical wizard lives for about 100 years — if they don't live longer than us, then they aren't really trying, after all. And we know that Dumbledore has been a teacher at Hogwarts for at least fifty years, so he's at least seventy, and showed no sign of slowing down until his untimely misfortune in the sixth book. One hundred years is about right, I'd say.

If we then take 100×1200, we get a really rough estimate of 120,000 wizards in the world. This is probably on the high side, given the Neville problem and the fact that many wizards will die before they get to 100.

One hundred thousand wizards in the world, give or take. This is a bit small, I'd think, for all the wizards that populate the books, including complete sets of professional Quidditch leagues. So let's see if we can increase the count.

Apparently, J. K. Rowling once said that Hogwarts has about 600 students. This means that Harry's class is a aberration, in that it's about half the sizes of an average class, but then Harry was born during the Voldemort years, when the birthrate was no doubt rather low. In this case, each school admits on average about 100 students per year, so our numbers go up by about a factor of 3, to, say, 350,000 wizards in the world.

That's still too low, probably because the books are Euro-centric: as far as I recall, every character is from Europe or the Near East. In particular, there aren't native Asian or North/South Americans in the books. So let's assume that the three schools mentioned draw from Europe (including European Russia) and Northern Africa — a population of roughly 500 million, one twelfth of the world's total. Presumably there are then are about 33 other schools in the world to teach the other wizards, or maybe the rest of the world is run by the White Council.

So we must multiply the 350,000 answer above by 12, which gives us a total of about 4 million wizards in the world, and that's probably an upper bound.

And that's not a bad answer. It's big enough to form a society (think of the Jews in pre-war Europe) that interacts with the rest of the world but keeps itself separate. And, as you'll note if you've been following my arithmetic, this is an order of magnitude calculation, meaning that there could be as few as 500,000 wizards in the world, and as many as 40 million. I'm pretty sure there aren't more than 40 million wizards in the world, or we'd see more of them.

Four million wizards, give or take, and they'll all be ahead of you in line on July 21.