Archive for category work

Things I always forget about resolving Erlang nodes on localhost

Switching back and forth between programming languages and development environments gets easier over time. There is one thing that I’m constantly forgetting as switch back and forth between Java and Erlang however. In order to work with distributed Erlang nodes on OSX, you need an entry in your /etc/hosts file resolving to your (short) hostname (because the OS seems incapable of resolving its shortname properly). The problem with doing this is it wreaks all kinds of havoc with java applications, so you need to remember to switch it back again when you’re jumping between developments environments. If you have both kinds of VM running at the same time in your dev environment then it’s a bit of a challenge to keep everything running smoothly. My solution (thus far) has been to use my extra laptop and run the java and erlang apps separately for dev/testing. This works fine as the target environment is generally linux so this OSX nonsense goes away once you’ve actually deployed somewhere.

Still, I forget this point regularly when flitting between my day job and personal projects. Hopefully having written it down will help me to remember.


Leave a comment

Getting GHC/Cabal-Install working on Snow Leopard

Cribbed from

* Open /Library/Frameworks/GHC.framework/Versions/Current/usr/bin/ghc-6.10.4 in a text editor
* Insert -optc-m32 -opta-m32 -optl-m32 just before the last parameter.

The last line in that file is rather long, and should now end like -dynload wrapped -optc-m32 -opta-m32 -optl-m32 ${1+”$@”}

Don’t be tempted to just put an edited local copy of the script in ~/bin/ghc, or edit all the various GHC files in /usr/bin. There is a maze of twisty symlinks that all eventually lead to the above script, and fixing just it is far simpler. Many packages need hsc2hs. To make it work correctly you need similar hackery:

* Open /usr/bin/hsc2hs
* Insert –cflag=”-m32″ –lflag=”-m32″ before $tflag

Leave a comment

Archived flash players for testing…

Leave a comment

I’ve just had to do it again…

Install Cabal that is. This time (many thanks once again jan) I’m putting out the details inline.

ghc –make Setup.hs
./Setup configure
./Setup build
sudo ./Setup install

Download HTTP and zlib from HackageDB:

ghc –make Setup.lhs (.lhs in case of HTTP, zlib uses the .hs extension)
./Setup configure
./Setup build
sudo ./Setup install

Change into the cabal-install directory and repeat these steps again. Run cabal update to obtain the latest package list.

Leave a comment

Getting the firefox flash plugin working on Ubuntu

Just ran through the instructions here and my firefox/flash setup is sorted. Nice.

Leave a comment

fixing git-svn woes

At work we mostly use subversion for revision control, although some of the cooler kids are using git. I find subversion a bit of a pain compared to git, so I use the git-svn wrapper to get the best of both worlds whilst at work. Since upgrading to the latest Ubuntu however, I’ve noticed that a clash between gnutls and open-ssl causes git/subversion integration to fail. A fellow git-ite pointed out a quick fix however!

$ sudo rm /usr/lib/
$ sudo ln -s /usr/lib/ /usr/lib/

Works a treat. 🙂

Leave a comment

Launch Anywhere fails on Ubuntu 9

I ran into a problem installing (wait for it…..) Borland Together 2007 (gasp!) on Ubuntu this morning. The binary installation package failed to load with an interesting stack trace:

An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX)
Stack Trace:
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Unknown Source)
at java.util.Properties.load(Unknown Source)
at com.zerog.lax.LAX.<init>(DashoA8113)
at com.zerog.lax.LAX.main(DashoA8113)

After some googling around, I discovered that Launch Anywhere often screws around with PS1, so changing this for the current shell resolves the issue:

$ export PS1=">"

And after that everything works fine (apart from having to use Together 2007 in the first place).