Archive for August, 2005

Back at CMU

August 30, 2005

I am back in Pittsburgh after a 13 week internship with IBM, working at their T.J.Watson Research Lab in Hawthorne, New York. I spent 12 of those weeks living in a dorm room at Pace University Law School in White Plains, then 1 week living with a friend at 4 Park Ave. in Manhattan. Suffice it to say that I had an productive, lucrative, and enjoyable summer.

Practice Begins!

August 30, 2005

This morning was the first day back on the water for Carnegie Mellon Crew. It was strangely enjoyable, despite being out of the boat since May. I will be watching the sun rise for the forseeable future.

100 miles!

August 30, 2005

I just signed up for the Shenandoah Mountain 100, which is a 100 miles off road mountain bike race. My objective is simply to survive, as I have heard tales of 12 and 13 hour race times. That is a long time to pedal. I’m sure when it’s over I’ll have stories and pictures to post here.

Reading free space on ramdisks

August 23, 2005

I’m having a problem running an application in a ramdisk-only busybox-based Linux domain (a BOINC client in a user domain on Xen, if you must know). The BOINC client, with the best of intentions I’m sure, tries to see how much free disk space is available so it doesn’t fill up the disks. Well, in this system there aren’t any disks. “df” prints only the column headings when you run it, and “mount” doesn’t seem to know where ‘/’ is mounted.

# df
Filesystem 1k-blocks Used Available Use% Mounted on
# mount
/proc on /proc type proc (rw,nodiratime)
none on /sys type sysfs (rw)

I decided to create a ramdisk image (which is stored inside the initrd for the user domain, pay attention now ;-) ) which I try to mount once the ramdisk domain is up and running. I used “dd” to create the image file in a normal (with-disk) Linux environment, and then I formatted it ext2. That didn’t work, as you can see here:

# mount -t ext2 -o loop rd.img ./mnt/
mount: Mounting /BOINC-runnable/ramdisk/rd.img on /BOINC-runnable/ramdisk/mnt failed: Block device required

I still haven’t solved this problem. I’ll post more when I solve it.

Software Suspend 2 (swsusp2) for IBM T42p

August 19, 2005

I had no trouble getting swsusp2 working on my IBM T42p. I am running kernel 2.6.13-rc5. In addition to patching and recompiling the kernel, you will have to download the hibernate script. It worked like a champ from within X (using WindowMaker) on the first try. The resume process is a little strange; the kernel mostly loads the way it always does, and only then does it see the image and resume. But hey, it works. :-)

Flying Spaghetti Monster

August 18, 2005

This is fantastic.

J2ME Bluetooth Application HowTo

August 16, 2005

One of these days I’ll put this here. I find it annoying how difficult it is to just get a simple J2ME Bluetooth application up and running.

Java 1.5 API
Java 1.4.2 API

The MIDP API comes with the WTK2.1 and is accessible from your local machine if you’ve installed WTK2.1.

BBS Documentary!!!

August 15, 2005

Slashdot just told me about the BBS Documentary project. As someone who got their start in computers logging onto BBS systems, and later running a BBS of my own, I found this to be very exciting.

I ran “Realm of Insanity,” out of Washington, PA for a year or two around 1995, as a 7th and 8th grade student. Standing as what I consider to be my biggest computer-related mistake of all-time, I had the entire BBS backed up on a tape drive (once the Internet “came out” and I closed down the BBS) which I later sold. The buyer haggled me, and in the end I decided to throw in the tapes as well. My entire BBS was thus lost forever.

It is listed in the BBS Documentary, though! Right here! I was a frequent visitor to “Zorro” and “Land of the Lost”. My best friend at the time, Brian Hamman, ran “SubAtomic Domain.”

Those were “the good old days” from my perspective.

I remember most vividly using TheDraw to try to create cooler ASCII art than my friend. Here is a page where you can download TheDraw. Another ASCII editor of that era was ANSIPaint.

I haven’t managed to run these under Windows XP yet, but I haven’t really tried yet. :)

Developing C++ Series 60 Applications under Linux

August 11, 2005

My motivation for creating this little page is to pull together resources that I found valuable while developing an application for Symbian OS 7.0s under Linux.

Simon Woodside’s HowTo
Symbian SDK on Unix HowTo

I had to downgrade bison; I used 1.29. I confirmed 1.75 and 1.875 do not work.

Symbian 7.0s C++ API Reference
Symbian 7.0 C++ API Reference
Symbian OS Error Codes from NewLC

Symbian’s Active Objects

FEC
IT++ C++ Lib.
Computing Algebraic Codes
4i2i Reed-Solomon Codes

RegEx commands to fix case of included files, work under ZShell (Which
you should be using if you’re not, see this.)

for i in *.h; do perl -pi -e "s/\Q$i\E/$i/i" ../src/*.cpp ../inc/*.h; done

“path to gcc include directory”
“path to editor example include directory”

Related projects:
Semacodes
Visual Codes

Bookmark Sync in Firefox

August 9, 2005

I just discovered the Bookmarks Synchronization extension for Firefox, thanks to this page. In order to get it working, I had to figure out how to setup a WebDAV server. Setting up the WebDAV server proved to be the most challenging part, and it is that information that I am trying to post here.

I’m using Apache2 running under Debian Linux. As such, these configuration steps are Debian-specific. They should generalize without too much difficultly though.

The first thing that is necessary is to enable mod_dav in your Apache installation. Fortunately, the version that ships with Debian makes it easy to add modules (it pre-compiles a healthy number of them, but leaves them uninstalled: you must create symlinks to install - the sprit is similar to /etc/init.d and /etc/rcN.d).

cd /etc/apache2/mods-enabled
ln -s ../mods-available/dav_fs.conf ../mods-available/dav_fs.load ../mods-available/dav.load .

I suggest restarting apache at this point and using phpinfo() to make sure the module is actually loaded.

Now, it is time to create the folder where you’re going to put the WebDAV stuff. I suggest keeping this tree separate from your web tree. So, for example, if your website is in /var/lib/apache2/www/, then you might put WebDAV in /var/lib/apache2/webdav/. Create the webdav directory and change its owner to the www-data user.

Next, I edited the /etc/apache2/sites-enabled/000-default file and added an appropriate Directory directive:

# Added for web_dav stuff
Alias /webdav/ “/var/lib/apache2/webdav/”
<directory /var/lib/apache2/webdav/>
DAV On
Options None
AuthType Basic
AuthName “WebDav Access”
AuthUserFile “/var/lib/apache2/users”
<limitexcept GET HEAD OPTIONS>
require user bookmark
</limitexcept>
</directory>

Now, authentication won’t be possible unless the /var/lib/apache2/users file actually exists and contains a user.

htpasswd -cm /var/lib/apache2/users bookmark
New password: xxxxxxxx
Re-type new password: xxxxxxxx

If you have any troubles, go into /etc/apache2/sites-enabled/000-default and change LogLevel to Debug. Have a look at /var/log/apache2/*

Please remember that every time you change the Apache’s configuration files you must restart Apache. This is accomplished by running as root: /etc/init.d/apache2 restart.

I then configured the Firefox Bookmark Sync plugin by selecting Tools -> Extensions, selecting “Bookmarks Synchronizer 1.0.1,” clicking the “Options” button, and filling in the fields as follows:

Check the “HTTP” radio button.
Host: www.myhost.com
User: bookmark
Password: xxxxxxxx
Path: /webdav/xbel.xml

Most of the problems that I had turned out to be related to typos. Be careful!

Michael Rollis has posted some stylish things to enhance your WebDAV Bookmarking experiences. Go check it out.

Resources that helped me to figure this out:
webdav.org
mod_dav page