Type runes on your Mac

I finally got around to making a Mac OS X keyboard to let you type Futhorc. I don’t know why I waited until just now (probably because it’s not important?), but it was really easy since they even have a program to automatically generate Mac OS X keyboard layouts, rather than typing the needed xml by hand. This is directly equivalent to the one I made for Linux, and by extension to the only Windows one I could find (see page).

Here’s my page on typing runes on your computer. It’s good whether you’re a Windows baby, a Mac fag or a Linux ass. It’s also avail under my code > type runes on your computer.

Mac OS X vs. My Keyboard

I like Mac OS X and all, but there’s just one thing that really bugs me about the Mac – Apple’s contempt for the keyboard. I wanted to know if any of you out there know the answer to these problems:

  • In Windows or Linux, you can hit the end key to go to the end of the line you’re typing or the home to get to the beginning. This neither works on my mac laptop nor my mac mini with a pc-keyboard.
  • On any other OS, you can hit the tab key while editing a form and the tab not only goes to the text fields, it goes to radio buttons, select boxes, etc. But on Mac, these are skipped right over. Why?! Can I change this? It doesn’t matter what browser I use; I could use the same browser on all platforms with the same problem only on Mac.

These issues waste more time for me than even writing this blog! The keyboard is so fast and I want to bypass Mac’s Mouse-ocracy. As a programmer, these things are particularly frustrating!

Type Runes on your computer

This falls squarely in the category of nerdy waste of time, but I just whipped up an anglo-saxon futhoric keymap (for US PC keyboards) for X11/linux. Get it here, save it under “/etc/X11/xkb/symbols/pc” or the equivalent dir on your box. Then, add “en_futhark Old English Futhark” under the layout section in /etc/X11/xkb/rules/xfree86.lst or the equivalent file blah blah. Windows users, simply d/l and install the right file from here. Note that my keyboard is almost identical to their Runic_AS.

fucking malloc()!

I am RETARDED! I spent most of today trying to get this app using OpenAL to work with a manually generated buffer (ie, not using a wave-loading function). I kept on trying to figure out why the damn program wouldn’t run without segfaulting. Finally, only after looking in the sources for ALUT, I realize that I should be using malloc instead of new like some sort of C++ baby.

stupid bug

there’s a bug in magpie, which this site uses to print out content from blogger. at least it’s a bug as far as I’m concerned. basically, it seems to convert the html entities into the actual characters (unless the actual php xml parser classes do this..) and as a result, the example wml file in the post below this one doesn’t appear. stupid!

Serving pages to cell phones

If you are bored on the train, never fear! Ugly, slow-loading websites on your cell-phone to the rescue! Seriously, kids. You can make a portable version of your website so easily.

Basically, you make the pages (index.wml) and throw them up. Easy, right? Below is a sample wml:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="c1" title="Thomas J. Webb" >
        <p>
        <a href="news.wml.php">blog</a>
        </p>
</card>
</wml>

Most webmasters like to put the WAP version of the site in a different subdomain (such as wap.yahoo.com), but I don’t know why they bother. We have a wonderful thing in Apache called content negotiation. Throw everything up there and let the webserver sort it out. First, enable multi-views in httpd.conf:

MultiViews on

Then set the directory index as simply index. This way, the webserver selects from index.html (or index.php or whatever) for regular browsers and index.wml for cell-phone browsers.

DirectoryIndex index

Another higher-performance alternative to MultiViews is to simply use a .var file for the index. See Apache’s documentation for details…

携帯のサイト

つまらなくて電車に乗ってる時、つまらないサイトを見られる。楽しいね!まじめに小さいバージョンを作りやすいだよ。

まず、index.wmlを作ってアップロードして。やさしいね。

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="c1" title="Thomas J. Webb" >
        <p>
        <a href="news.wml.php">blog</a>
        </p>
</card>
</wml>

ウェブマスタはほとんどサブドメーンを作る。たとえばwap.yahoo.com。でも、何でか分かんねえ。ApacheのContent Negotiationはスーパーである。サーバは頭が言い。まずhttpd.confにコレを入れて。

MultiViews on

すると、始め見るページがindexにさせて。サーバはindex.htmlとindex.wmlの中に決心出来る。

DirectoryIndex index