Mar 2004

Subversion for Mac OS X

Note: I don’t support this package anymore: Martin Ott of TheCodingMonkeys provides his own statically-linked Subversion binaries, and Darwinports also supplies their own subversion package. The main reason I made this package was because I wanted an easy way to install Subversion without going through Fink, which wants to install Apache 2 at the same time. Both the above two places enable you to do that. I’m only keeping this around for posterity’s sake :).

Subversion Package

Detailed Dependency Build Information

Subversion has quite a number of dependencies, which make building it not a lot of fun. My binary distribution puts all of Subversion’s dependencies into the /usr/local/libexec/subversion directory, so if you have any of its required libraries installed yourself or via Fink, none of these versions will conflict. The downside is that you use a bit more disk space, but hey, who’s complaning about a few megabytes these days?

The APR (the Apache Portable Runtime) 0.9 branch was used, checked out on 15 March 2003 3:20pm (UTC +10), with the following ./configure line:

./configure --prefix=/usr/local/libexec/subversion/apr

apr-util ./configure line:

./configure --prefix=/usr/local/libexec/subversion/apr-util --with-dbm=db42 --with-berkeley-db=/usr/local/libexec/subversion/berkeley-db --with-apr=/usr/local/libexec/subversion/apr

Berkeley DB 4.2.52 with the and 4.2.52 patches applied. The following ./configure line was used to compile it:

../dist/configure --prefix=/usr/local/libexec/subversion/berkeley-db

The version of OpenSSL that is distributed with Mac OS X Panther 10.3.2 (0.9.7, I believe) was used.

Neon. Note: ./ was run for Neon, so that a newer version of libtool and the auto{conf,make} utilities would be installed which understands how to build shared libraries on Mac OS X.

./configure --prefix=/usr/local/libexec/subversion/neon --with-ssl --enable-shared


./configure --prefix=/usr/local/libexec/subversion/swig

Subversion itself was ./configured with (note also ./ was run):

./configure --with-ssl --with-apr=/usr/local/libexec/subversion/apr --with-apr-util=/usr/local/libexec/subversion/apr-util --with-neon=/usr/local/libexec/subversion/neon --with-apxs=/Library/Apache2/bin/apxs --prefix=/usr/local/libexec/subversion

Comments Pictures

You know those cute little pictures which pop up if you receive an email from somebody with a account? It turns out that you can set that picture with an email header: no account needed.

Simply add a X-Image-Url header to your email, with the contents being a URL that contains the picture, e.g. X-Image-Url:

Credit where credit is due: I found out about this tip from the following two links:


USB Numeric Keypad

If you didn’t know, you can use the numeric keypad to select options that appear on the radial menu (that appears when you, for example, right-click on your character). Of course, the numeric keypad is in an inconvenient spot: most gamers have their left hand resting on the left-hand side of the keyboard on the Quake-inspired W/A/S/D keys, not on the right-hand side where the numeric keypad is. On laptops, it’s in an even more inconvenient spot—like, it doesn’t exist and stuff. D’oh.

If you’re willing to fork out a bit of dough for a game, drop $50 on a USB numeric keypad, and put that to the left of your keyboard. Your enjoyment of Neverwinter will go up dramatically. It’s also useful for Alpha Centauri if you’re a laptop person :-).


VideoLAN Annodex patches

Here are some patches for the VideoLAN cross-platform multimedia player, to enable support for Annodex bitstreams.

  • Annodex support for the Ogg demuxer (modules/demux/ogg.c): vlc_modules_demux_ogg.c.diff (MERGED)
  • A modification to the vout_ShowTextAbsolute function in src/video_output/video_text.c, so that it returns the subpicture_t created. This is required for the upcoming CMML support: vout_STA_returns_subpicture_t.diff (MERGED)

VLC now supports playback of Annodex files and CMML tracks as of version 0.7.2. Woo!


Disable the Splash Screens (Introduction Movies)

Add the line:

Disable Intro Movie=1

to the [Display Options] section of the nwn.ini file in your Neverwinter Nights directory. (This tip’s fairly widely known: it’s described in the NWVault FAQ, and it’s also a topic in the BioWare NWN forums. I mostly have it here for my own reference.)


Suggested Neverwinter Nights Additions


Note that all hakpacks can be used in any modules—including the standard BioWare campaigns—by extracting the data in them and putting their data files into NWN’s override\ directory. In fact, that’s what I do with all the hakpacks listed below.


Interfacing Haskell to Object-Oriented Languages

AndrÈ T. H. Pang and Manuel M. T. Chakravarty

In Greg Michaelson and Phil Trinder, editors, IFL 2003 - 15th International Workshop on the Implementation of Functional Languages, LNCS, Springer-Verlag, 2004.


The interfacing of object-oriented languages with functional languages, in general, and with Haskell, in particular, has received a considerable amount of attention. Previous work, including Lambada, a Haskell to Java bridge, showed how an object-oriented class hierarchy can be modeled using Haskell type classes, such that Java libraries can be used conveniently from Haskell.

The present paper extends this previous work in two major directions. Firstly, we describe a new implementation of object-oriented style method calls and overloading in Haskell, using multi-parameter type classes and functional dependencies. This enables calling of a foreign object’s methods in a syntactically convenient, type-safe manner. Secondly, we sketch an approach to automating the generation of library bindings using compile-time meta-programming for object-oriented frameworks featuring reflection. We have evaluated the practicality of our approach by implementing a Haskell binding to the Objective-C language on the Mac OS X platform.


16 pages: Postscript (.ps.gz), Adobe Acrobat PDF. The copyright for the papers is held by the authors or by the publisher. The papers are provided for personal use only; other use requires the explicit permission of the copyright holder.

Related Webpages


Use HakPaks in the Standard Campaigns

If you extract the files from a .hak pack and place those extracted files in Neverwinter Night’s override directory, you can use that hakpack in any of the standard BioWare campaigns (with the usual disclaimer that hakpacks may break stuff, you will actually need to put in new merchants to use any of the new items, etc.) This is very useful for non-intrusive hak-pack changes, like the jiggly hi-poly human torsos models.

You can use tools like NWN Explorer or NWN Viewer to extract the files from a .hak pack.


NWScript Dissassembly

After Neverwinter Nights just came out, I started dissembling the NWScript bytecode that it uses internally for its game engine, with the intention of writing a command-line script compiler some day. I since stopped work on it since I had a few other things to do. It seems that the great Torlack (who now works at BioWare) beat me to it, but I thought I’d put up my results for download anyway. For budding dissasemblers (like myself :-), I’ve also put up all the scripts I used to try to figure out the bytecode, which may be more important than the bytecode itself for some people.

Note that BioWare provides their own command-line compiler now anyway, if you have a version more recent than 1.40 or something like that—see utils\clcompile.exe.

I find it interesting that BioWare chose their own scripting format for NWN considering that they used the very flexible and extensible Lua for Baldur’s Gate I/II (which is also used in a number of other games; in fact, one of the Monkey Island games had a bar named Lua as a dedication to the Lua community for their great efforts). While NWScript is OK as a language, I certainly wonder why they didn’t stick with Lua …

Anyhoo, feel free to download the results of my peeking and poking.


Auto-Save Every 5 Minutes!

Play in multiplayer all the time, even if you’re just playing single-player mode—and turn on the auto-save option and set it to save every 5 minutes or so. That’s saved my arse a few times now!