Rvm seems to be pretty popular with the Ruby / Rails crowd. It lets you install and switch between different versions of Ruby really easily. I have been working on more and more Perl code and wanted to find something similar so that I can make sure the code that is currently working with Perl 5.6 will continue to work with 5.12.

I found App-perlbrew the other day and have been using it and so far it seems pretty compilable to rvm.

Installing a local copy of Perl is as easy as

$ perlbrew install perl-5.12.2

You can then list your installed versions of perl with

$ perlbrew list
perl-5.12.2
* /usr/bin/perl
$

One thing that bugged me was it didn’t tell me the version of Perl /usr/bin/perl was. The nice thing about open source is the ability to modify it to do what you want, which is exactly what I did.

It seems there are basically two ways to set the correct author name (opposed to the system user name Eclipse is using per default) in Eclipse as it appears for example within the autogenerated javadoc comments.

First using -vmargs settings:
eclipse -clean -showlocation -vmargs -Xms512m -Xmx900m -XX:PermSize=128m -XX:MaxPermSize=128m -Duser.name="Your full name"

The other one is just by  changing the associated templates in Window -> Preferences -> Java -> Editor -> Templates -> @author , hardcoding the author’s name.

I’ve been playing Farmville recently on Facebook. The concept is simple, you plant things then harvest them for experience points and money. You then use the money you made to plow the fields and buy seed to do it all over again.

I’ve seen  some of my friends level really quickly and don’t have time to sit around and play the game all day so I figured it would be an interesting challange to write a bot to play the game for me. In the past I’ve used SCAR Divi in the past to write a bot for Puzzle Pirates so I think I try writing a bot for Farmville and post the results and possible the code.

I previously posted about an error I was seeing in the Xcode console when trying to run an application I was working building on an actual iPhone. I believe I have figured out what was causing the problem, if not at least I’ve managed to make it stop happening so I can go back to testing on a real device now.

It seems that the problem had something to do with a ‘#’ in either ‘#AppName_Prefix.pch’ or ‘#AppName.xcodeproj’. I renamed the Prefix header and the xcodeproject file and updated the project to reflect the new name of the prefix header then a build -> clean and voilà everything seems to be working again.

I’ve been doing some development for the iPhone lately and came across a post by Craig Hockenberry where he give out a nice little bash script to make working with the iPhone simulator easier.

I’ve been using that script for a few months now and have added alot to it and think I should give back. I’ve packaged it up with a nice readme, posted it up on github and released it under the GPL.

Usage:

usage: /Users/trcjr/bin/opensim [ <app_name> | updateLinks <link_dir> [ Preferences | Documents | <cmd> <file> ]
ex: /Users/trcjr/bin/opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.
ex: /Users/trcjr/bin/opensim SomeApp Preferences
Opens the Preferences folder
ex: /Users/trcjr/bin/opensim SomeApp Documents
Opens the Documents folder
ex: /Users/trcjr/bin/opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its first arguement

The README:

Opensim is a shell script that makes accessing applications on the iPhone
simulator a breeze.

Based on opensim by Craig Hockenberry

http://furbo.org/2009/03/03/open-sesame/

Examples.

opensim SomeApp Preferences
Opens the Preferences folder for SomeApp.
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Preferences )

opensim SomeApp Documents
Opens the Documents folder for SomeApp
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Documents )

opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its
first argument.
( sqlite3 ~/Library/Application Support/iPhone
Simulator/User/Applications/<GUID>/SomeApp.app/Documents/some_sqlite_database.sqlite )

Note:
If you have more than one file with the same name in two different
directories, ie db.sqlite in Documents/ and db.sqlite in SomeApp.app/
you would need to specify it by doing something like:
opensim SomeApp sqlite3 app/db.sqlite
This would open SomeApp.app/db.sqlite
opensim SomeApp sqlite3 Documents/db.sqlite
This would open SomeApp.app/Documents/db.sqlite

opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.

© 2011 Stupid Foot Suffusion theme by Sayontan Sinha