Compiling CuPP on Mac OS X
[CuPP](http://www.plm.eecs.uni-kassel.de/CuPP/) is a C++ framework to easily integrate [CUDA](http://www.nvidia.com/object/cuda_home.html) into existing C++ applications.
Unfortunately, CuPP doesn't compile on Mac OS X right out of the box. [Here is a patch](http://www.stiefels.net/~sst/files/cupp-macosx.patch) which modifies the CMakeLists.txt files of the project so that it can be compiled on OS X.
Getting Started with iPhone Development
This weekend I finally found some time to watch [Bill Dudney](http://bill.dudney.net/roller/bill/)'s screencasts about iPhone development.
The screencast series is called '[Writing your first iPhone Application](http://pragprog.com/screencasts/v-bdiphone/writing-your-first-iphone-application)' and it is an ideal way to get started with iPhone application development.
All you need is a recent version of Xcode and some basic knowledge about Objective-C and Cocoa.
In 2,5 hours Bill shows you how to create a simple but nice recipe application where you can store recipes and its ingredients (sure, it is NOT a full-blown recipe database application but it serves its purpose). You learn a lot about table views, view controllers, navigation controllers and how to store your entered data persistently by using [SQLite](http://sqlite.org/).
I really enjoyed watching it and I'd recommend to write the application in parallel while you are watching it. That way you'll think more about how all the stuff works.
Every episode (five in total) costs $5 but I think it's completely worth the money.
Starcraft and Mac OS X 10.5.3/4
[Starcraft 2](http://starcraft2.com/) has been announced for a while now and as I watched the in-game movies I got the urge to play the good old Starcraft again.
Starcraft is over 10 years old but Blizzard did a good job and released an installer for Mac OS X a long time ago.
The installation did not make any problems but the game didn't start. The app quit itself shortly after I started it.
After looking for a solution for this problem I found out that Apple removed the support for 256 color mode from the nVidia graphics drivers in 10.5.3. (Ok, its 2008 and who really needs a 256 color mode??).
Fortunately there is an easy way to get the [old 10.5.2 graphics drivers back](http://70.181.80.166:82/blog/archives/2008/07/mac-os-10531054-nvidia-256-colors.html).
Starcraft now runs without any problems and looks gorgeous even with only 256 colors.
iPhone SDK Beta Out!
Today Apple released a beta version of the iPhone/iPod touch SDK for developers to create their own applications for these devices. The final SDK is about to be released in June this year.
Unfortunately Apple's [ADC website](http://developer.apple.com) seems to be overstrained at the moment with all the developers trying to download the SDK.
Cocoa Dev House Munich
On March 8, 2008 the [Cocoa Dev House Munich](http://cocoadevhouse.org/wiki/index.php/Main/CocoaDevHouseMunich) will take place at [equinux AG](http://www.equinux.de/) in Munich. There are already nearly 30 attendees on the list and I hope that I can write my name on that list soon, too.
Syntax Highlighting for NSTextView with flex
Implementing syntax highlighting can be a painful task. Lots of regular expressions and thinking may be required to master this.
On the search for an easy way to implement a syntax highlighting mechanism for NSTextView I found an easy and fast (regarding runtime) way to do this. By using flex (a tool with its roots in the 1970's) defining the rules of what should be highlighted makes it a lot more easier and structured.
flex is the GNU version of lex, the lexical analyzer generator (Buzzword jackpot!) developed by Eric Schmidt and Mike Lesk in 1975. By defining some rules (mainly regular expressions) it generates a C program which allows us to scan through a text and do something with the text, e.g. divide it into tokens. Tokens are chunks of characters with a special meaning (as defined in our rules). Confused? Read on, this concept will become very clear soon.
In this article I want to show you how we can use this ancient but very powerful tool to implement a basic syntax highlighting within a NSTextView.
Building PostgreSQL on Leopard
As you might know the [PostgreSQL Global Development Group](http://www.postgresql.org) is currently working on the final version of the PostgreSQL Database Management System (DBMS) 8.3 which has some nice features. Unfortunately, there is no prebuilt package available for Mac OS X of the current beta versions. But fortunately building PostgreSQL is very easy on Leopard:
Leopard and Adobe Creative Suite 3
If you plan to use Adobe Creative Suite 3 on Mac OS X Leopard make sure that the filesystem Creative Suite is installed on is **Mac OS Extended (Journaling)**, and NOT Mac OS Extendend (case-sensitive, Journaling).
Otherwise, the Creative Suite installer ends with an error message which says that the filesystem is not supported, argh.
Third Party Applications on iPhone and iPod touch
Today, Steve Jobs [announced a native SDK](http://www.apple.com/hotnews/) for their mobile OS X devices (iPhone and iPod touch).
This SDK allows third-party developers to create their own applications running natively on the iPhone and iPod touch.
Apple plans "to have an SDK in developers’ hands in February". Well, that sounds very interesting.
Full Perl-Compatible Regular Expressions in Objective-C
A few months ago I wrote about a mechanism which allowed simple [Pattern Matching with NSPredicate](http://www.stiefels.net/2007/01/24/regular-expressions-for-nsstring/).
Although it is a good method to check if a string matches a Regular Expression it lacks a lot of features you normally expect while you're doing something with Regular Expressions, such as capturing subpatterns or doing search and replace.
[Philip Hazel](http://www.uit.co.uk/exim-book/author-bio.htm) (who also wrote my favourite SMTP server, [Exim](http://www.exim.org) created a library called [PCRE (Perl-Compatible Regular Expressions)](http://www.pcre.org) a long time ago which implements the Regular Expression syntax used in [Perl](http://www.uit.co.uk/exim-book/author-bio.htm) (sometimes I miss that time) for the C Programming Language.
While PCRE is great for doing Regular Expressions in C, it's usage with Objective-C is some kind of cumbersome as NSString objects must be converted to plain C strings and back again.
But recently John Engelhart released an alpha version of his PCRE-based [RegexKit framework](http://regexkit.sourceforge.net), which provides a sweet object-oriented interface to Regular Expressions. It looks very mature and there is also a [very good documentation](http://regexkit.sourceforge.net/Documentation/index.html) available.
Thank you very much, John!