November 18, 2008

Python

In the last post I talked about Ruby and that I like it more because of the feeling the language gives to me. I like Ruby as a language more than Python as a language. But in the last days I realized more and more that I like Python as a programming environment more than Ruby.

Primarily it's because of libraries. Python does not even have a solid standard library, there are at least four very solid 3rd party libraries I would love to use and have used some of it already:
  • PyQt4 - I'm a big Qt fan and used it in some C++ projects. PyQt4 is the best Qt binding to a dynamic language.
  • Pygame - a solid binding for SDL
  • Twisted - I didn't use Twisted until now, but read many positive things about it and have to check it out. 
  • Django - a very solid web framework
Yes, Ruby also has some interesting projects, but I think what sells me most on Python is PyQt4... the Qt4 bindings for Ruby are not that great and lack documentation.

November 15, 2008

Ruby



I got interested in the Ruby programming language again, after I read about the release of the Merb framework on reddit. I've tested Merb a little bit, but web frameworks are not really the type of things I'm very interested in at the moment.

I've learned some Ruby 5-6 years ago, even before the "Rails-era". I don't know why, but Ruby is the language that feels "best" for me compared to the other scripting languages.

In the last weeks I've done some Perl stuff but the language feels ugly at many aspects. CPAN, DBI and perldoc is very cool stuff and I have big respect on the work all the perl hackers do and have done, but perl as a language seems to be something I personally can't get used to.

I've the same feeling about Python. The language is much cleaner, but there are some things that don't make sense to me like closure support with this local-variable-array-hack and limited lambda. Everytime I read and think about Python I say "I have to take Python for all my stuff because everybody else likes it..." but everytime I try to use Python, it just doesn't feel natural to me.

So now I'm in my "Ruby phase" again...

I find it interesting that some big players in the computer industry have "their own" ruby implementations: Sun has JRuby, Microsoft has IronRuby and Apple has MacRuby.

MacRuby seems to be some sort of an Apple strategy to push the development with Cocoa and dynamic scripting languages. Lately the Apple website released a tutorial for MacRuby with Cocoa and it seems to be very interesting, because the whole MacRuby object system is based on the Cocoa/Objective-C classes i.e. no sort of wrapper classes are needed and you can speak to Cocoa directly. This seems to be one of the best scripting language integrations with a native operating system framework I've ever seen.

Lately Apple also released their Cocoa/Objective-C GarbageCollection named AutoZone under an OpenSource license. An interesting note in the README says something about MacRuby:
While AutoZone was tested and deployed with a focus on supporting Cocoa application development, the implementation is language agnostic. For example, the MacRuby project uses the AutoZone collector to provide fully automatic garbage collection of object graphs that span between Ruby and Objective-C!

This verifies my speculation about a bigger role of MacRuby in the future at Apple.