They did it! 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 Apples ADC website seems to be overstrained at the moment with all the developers trying to download the SDK.
On March 8, 2008 the Cocoa Dev House Munich will take place at equinux AG 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.
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.
Continue reading ‘Syntax Highlighting for NSTextView with flex’
Today, Steve Jobs announced a native SDK 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.
Technorati Tags: Apple, iPhone, SDK
Wincent Colaitua has written an interesting, worth reading blog post why functional programming could become more and more important in the future.
Note to myself: Have a deeper look at Haskell.
Technorati Tags: functional programming
A few months ago I wrote about a mechanism which allowed simple Pattern Matching with NSPredicate.
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 (who also wrote my favourite SMTP server, Exim created a library called PCRE (Perl-Compatible Regular Expressions) a long time ago which implements the Regular Expression syntax used in Perl (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, which provides a sweet object-oriented interface to Regular Expressions. It looks very mature and there is also a very good documentation available.
Thank you very much, John!
Technorati Tags: objective-c, regular expressions
I started this project because I was faced with the following problem:
Let’s say you want to plan a skat tournament with 12 players and you have four tables available. So three players are sitting on every table playing one round against each other. After a round the players are changing their seats so that no player is playing against an opponent he or she already played against.
The question now is: Can I arrange my players in a way so that every player is playing five times and not playing against an other player twice? And if so, how would this arrangment look like?
Technorati Tags: combination, skat tournament
Continue reading ‘Brute Forcing best Arrangement for a Skat Tournament’
I am currently working on a interesting project written in C (more about the project in a few days or weeks) which requires a very clean memory management. I decided to write it in C because it does pretty long and complex calculations and I wanted to do it fast. But using C also means to do the whole memory management by myself. This can be a very hard job especially if a program is very memory-intensive.
Technorati Tags: MallocDebug, memory leaks
Continue reading ‘Locating Memory Leaks with MallocDebug’
Everyone who is working with Subversion using multiple branches knows this problem: Merging changes from branch A to branch B needs to be documented (in most cases in the log).
This can be risky as if one developer forgets to put that important information in the log, no one will ever see which change sets are now merged in branch B and following merges can cause lots of conflicts or loss of changes.
There is no automatic book keeping in Subversion - yet. In the upcoming release, Subversion 1.5 will provide merge tracking support.
I am really happy to see that great software gets even better!
Technorati Tags: merge tracking, subversion
I updated the STNPostgreSQL.framework project page with a download link to a Universal Binary of the framework and a few examples on how to use it.
Technorati Tags: objective-c, postgresql
Latest Comments