Sure, you Mac switchers already know about Mac OS X Keyboard Shortcuts, mostly using the Command Key. If you're a typography geek like me, you'll want to explore all the useful characters (not commands) hidden behind the Option Key.

⌥ + keyproduces this:
[open double quote
{close double quote
]open single quote
}close single quote
-en-dash
_em-dash
2trademark
rregistered®
gcopyright©
;ellipsis
/divide÷
*degree°
Rpermille
=not equals
+plus minus±
5infinity
8big bullet
(small bullet·

There are some more, but I don't find them as useful. The keys probably vary by keyboard type; I use the US keyboard (not US Extended, which doesn't seem very useful). The best way to learn these is to go into System Preferences → International → Input Menu → Show input menu in menubar. Then go to the input menu in the menubar (a country flag) → Keyboard Viewer. Also fun to play with is the Character Palette; it lets you put in lots more characters, like ☛☆☺⏏℻♪. Exactly why these characters even exist in Unicode, I'll never know.

The typography geek in me says that the ⌥ Option Key is the best thing about switching to the Mac. Sure, some of you get the AltGr key in Windows and Linux, but I never figured out how to make it work. On the Mac, the Option key works out of the box, even on the US keyboard.

Update [2009-05-09]: Recent versions of Linux/X11 can emulate the Mac keyboard setup. In Gnome, go to Preferences → Keyboard → Layouts, then Add the USA/Macintosh layout, Remove the USA layout. Then go to Layout Options and set both Windows keys to be “third level choosers”. The Windows key will then act like the Option key on the Mac.

Labels: , ,

I got a late start to watching Heroes, and I've been trying to put everything together. One thing I've been interested in is how many connections already existed at the time the story starts. For example, Peter is connected to Nathan (brother), who is connected to Linderman (father's dealings), who is connected to Niki (owes money), who is connected to Ando (webcam), who is connected to Hiro (coworker). I tried assembling the pre-existing connections (many of which are not revealed in the first episode):

Heroes character connections before story began

The weird thing is, I can't find a pre-existing connection between the two groups. One one side is Hiro, Niki, Linderman, Peter, etc., and on the other side is Mr. Bennet, Claire, Mohinder, Sylar, etc. There are a few new connections made after the story begins—Nathan and Mohinder, Peter and Claire, Isaac and Eden, Matt and Mr. Bennet—but I can't find a way to connect them. I keep thinking Mr. Bennet and Linderman must be connected somehow, but if they are, I must've missed the connection.

There is of course the matter of Claire's biological father. The candidates I've read on the blogs are Nathan, Linderman, Sylar, and Mr. Bennet himself. Having Claire's father be Linderman or Nathan would make everyone connected, which seems like something the creators of Heroes would do.

Labels:

On the navigation bar of my pages, I have a search box for searching all of my pages. It's labeled “Search site:”. The implementation uses Google's Custom Search Engines. Google recently added a statistics page that tells me how many people use the search box each day and what the most popular queries are. Knowing these queries helps me improve the site. I look at the results of each query and determine if I'm missing information that people are looking for.

What are the most popular queries?

  1. myspace.com – 207
  2. www.myspace.com — 203
  3. http://youring.net – 40

Why would people search for these things on my site? I don't know, but I'm pretty sure it's spam! Especially suspicious is the two variants of myspace having almost the same count. It's as if the spam bot ran one search and then the other. Blogspot doesn't make its logs available to users, so I can't easily see what's going on here. Are the queries from the same IP address? What's the user agent? I don't know.

If your blog has been hit by this extremely weird form of spam, and you have server logs that let you investigate, please let me know what you find!

First, a bit of history.

I started using GNU Emacs in 1990. The latest version at the time was version 18. It had almost no support for menus, the mouse, fonts, colors, dialog boxes, drag & drop, etc. It was basically a text-only application. In these respects it was a step back from the editors I had been using in DOS, Windows, Mac, and OS/2. However, Emacs was what people used at school, and I needed to use it for some of my classes, so I learned it. I found that it was quite powerful, and I learned how to customize it to match my needs better. One of the things I liked best was automatic indentation. When you press Tab it will indent the line correctly based on what you're typing now and what you had typed earlier in the file. I want this on every line. Most of my classmates press Return and then Tab every line. I'm too lazy for that, so I changed Return to do the indentation (for Emacs users among you: (global-set-key "\r" 'reindent-then-newline-and-indent) does the trick). So now whenever I typed normally, it would automatically indent each line properly. A simple change but it made a big difference, and it encouraged me to learn more about Emacs customization.

I was still annoyed by the lack of colors, though. Colors in particular are quite useful when programming, because they can be used to highlight langauge constructs (keywords, punctuation, identifiers, expressions, definitions, etc.). It makes programs easier to read, and you can quickly spot errors as you type them because they show up in the wrong color. My classmates who had never used non-Unix editors had no idea what they were missing, but I did, and I kept looking for a way to have colors in Emacs. It was 1990, after all, six years after the introduction of Macintosh. Why should I be stuck in a black-and-white text-only world with only a single font? Ugh!

Well, Emacs 18 had come out in 1986. The Mac didn't even have color back then (but at least it had multiple fonts, which could have served the same purpose). Where was Emacs 19, I wondered, and would it have the features I wanted? As I looked around I found something intriguing: a version of Emacs called Epoch, maintained by someone named Marc Andreesen. I tried it out and I loved it. It had colors and fonts and supported multiple windows (what a concept!). I finally had a version of Emacs that gave me what I had been looking for. (Side note: Marc went on to write Mosaic, and then started a company called Netscape.)

Meanwhile, a few people were trying to work on Emacs 19, but work was apparently going very slowly, and a company named Lucid had been working on their own version of Emacs 19, called Lucid Emacs 19. Lucid's version progressed much faster than GNU Emacs 19 (thanks to Lucid's uber-hacker, Jamie Zawinski), and this was the beginning of the big split between Emacs and XEmacs. Around 1992 or 1993 I switched from Epoch to Lucid Emacs 19, and it was everything I wanted out of an Emacs system. When GNU Emacs 19 came out, I tried it, but it was missing so much. The menubar didn't match the standard Mac/Windows menubar, the scrollbar acted weird, you couldn't use multiple fonts, and lots of things in the UI seemed wrong to me. My impression was that GNU Emacs 19 had a UI designed for long-time Emacs users, and Lucid Emacs 19 was designed for the rest of us (DOS, Windows, Mac users). I stuck with Lucid Emacs, which later became XEmacs. (Side note: Jamie went on to a company called Netscape.)

While in school I found plenty of ways to procrastinate, and one of them was learning to customize my environment instead of working on my class project. I spent some time trying out and customizing window managers (twm, ctwm, vtwm, mwm, etc.), but most of my time I spent learning and customizing XEmacs. I tried out lots of extension packages and wrote my own customization. My classmates benefited from my procrastination, as I shared the best of what I had learned with them. Some of the Emacs customizations I developed back then are still in use.

Over the years I've continued to do learn, extend, and customize, and I've built up more and more XEmacs customization. A few years ago I tried running GNU Emacs, and my customization didn't work, and it didn't look easy to fix. XEmacs and GNU Emacs have diverged enough that the things I've learned for XEmacs weren't working in GNU Emacs. So I gave up on ever using GNU Emacs again.

The problem is that XEmacs development has slowed quite a bit. The “stable” version, XEmacs 21.4, came out in 2001. Features like anti-aliased fonts, support for the Mac, and UTF-8 are not available in that version. I've been using the development version, 21.5, and it has partial support for those things. One of the developers left XEmacs to work on his own version of Emacs, called SXEmacs (which looks neat). GNU Emacs on the other hand seems to be progressing faster, and is catching up in many ways to XEmacs. The stable version of GNU Emacs is also a few years old, so people who care about features run the development version (GNU Emacs 22).

The other problem is that last year, when I got a Mac, I found that none of the versions of XEmacs available on the Mac were satisfying. I tried out Aquamacs, which is GNU Emacs 22 for the Mac, and I liked it, except that none of my customizations worked. Non-Emacs editors like TextMate seem somewhat limited, and would require me to unlearn 15 years of Emacs. I had a tough choice to make: after 15 years of being on the XEmacs side of the Emacs/XEmacs split, should I switch back? After talking to several people about their experiences with both, I decided that I should at least consider it. GNU Emacs 22 seems like it has caught up with XEmacs in some ways (not all), and it's ahead of it in other ways.

I still love XEmacs. I like that it uses a package system, so you can choose packages, install new ones, and upgrade a package without upgrading XEmacs. The package system in XEmacs is somewhat like packages in popular Linux distributions. For example, I can download a new version of the Python editing package when that package is released, instead of installing it manually or waiting until a new version of Emacs is available. GNU Emacs doesn't seem to have anything like this. I like the XEmacs philosophy for colors/fonts (they are properties of how you look at a file) more than the GNU Emacs philosophy (that they are properties of the file itself). I like that XEmacs has abstract data types like hash tables. I like that XEmacs uses more readable names of key and mouse commands, like [(ctrl x) (alt tab)] instead of "C-x A-\t". I like that the XEmacs colorization package, font-lock, was more capable than the Emacs package, hilit19, although these days GNU Emacs also uses font-lock. I like that XEmacs had a menu structure more like other apps, although GNU Emacs seems to have adopted this too. I like that XEmacs can run as a “server”, where I can connect to it remotely and access all my open files from multiple machines (I've heard that GNU Emacs will get this at some point). I like that default XEmacs packages have historically seemed more advanced than GNU Emacs versions (for example, psgml seems much more advanced than html-helper-mode, and vm was more advanced than rmail). I like that XEmacs came with more packages standard. I like that XEmacs supported proportional fonts and multiple sized fonts in the same document (GNU Emacs seems to do that now, but it took them ten years). I like the XEmacs experiments (embedding XEmacs inside other apps, embedding other apps inside XEmacs, GTK support, incremental garbage collector, ability to run as a window manager, embedding images inside documents). I really like XEmacs. But I want really good Mac support, nice fonts, and UTF-8 support, so I'm going to try out GNU Emacs again.

This weekend's project is to look at GNU Emacs 22 (the Aquamacs version) much more closely. I'll try porting some of my XEmacs customizations to GNU Emacs. I'll look for GNU Emacs packages that do things similar to the XEmacs packages I had been using. And over the next few months I'll use both XEmacs (at work) and GNU Emacs (at home) and see how it goes.

Labels: ,