/ #blog 

Comparing Apples and... Apples?

Macworld has a performance test of the new dual core iMac vs. the old G5 iMac. They are saying, that the new Dual Core iMacs don’t perform twice as fast, and seem quite a bit disappointed. I think, they just aren’t comparing Apples to Apples. Let me explain: The old iMac is a single processor G5. The new iMac a Dual Core Intel chip. The applications they are testing (iMovie, iPhoto, iTunes, creating a ZIP file, iDVD and BBEdit) are most likely (correct me if I’m wrong, please) single threaded applications. That means, that the raw work of converting, compressing, searching and whatnot is running on a single core. Only applications that are built to be multi-threaded would be able to share the work on both cores. So what the test results are showing us (imo) is that the Intel Dual Core processor running an application on basically one of it’s core is a wee bit faster than the G5. ...

Jens-Christian Fischer
/ #blog 

libgd and ruby-gdchart on Mac OS X

Trials and tribulations: Installing libgd Use Darwinports to install GD $ sudo port install gd2 (it seems that you need to install gd2, and not gd because otherwise the linker will complain about a function not being defined: Arwen:/usr/local/lib/ruby/gems/1.8/gems/ruby-gdchart-1.0.0/examples jcf$ ruby bar_example.rb dyld: NSLinkModule() error dyld: Symbol not found: _gdImageCreateFromGif Referenced from: /usr/local/lib/ruby/gems/1.8/gems/ruby-gdchart-1.0.0/./GDChart.bundle it might be a good idea to update your installed darwin ports: $ sudo port upgrade installed Installing ruby-gdchart Thanks to the Pickaxe book and _why for the explanation of the extconf configuration. ...

Jens-Christian Fischer
/ #blog 

Worldwide Rails Training

RubyOnRailsWorkshops.com is a web site that tracks all Rails workshops around the world. So if you’d rather go to Los Angeles than to Zurich, that’s the place to look. In related news, it looks like my Geneva Rails Workshop won’t be happening. So far I have one interested person (coming all the way from Denmark) but none from the Geneva area. I need at least 8 people and I need some form of interest by Wednesday 18th. ...

Jens-Christian Fischer
/ #blog 

Magic? Of Course

I once read (in Hickman / Weiss: The Death Gate cycle) a very simple explanation of magic - here it is paraphrased: All things are possible, even the seemingly impossible ones. Magic is the act of changing the probabilities of making the impossible happen. That’s not only happening in fantasy books, but in real life as well. By acting in certain ways, doing certain things we influence the world around us so that things happen with a higher probability than not happening. ...

Jens-Christian Fischer
/ #blog 

Start postgres with launchd on OS X

The startup item for Postgres on OS X always fails on Tiger. Launchd (the launch daemon) to rescue: PostgreSQL launchd on Tiger gave me the starting point and my /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist looks like this: < ?xml version="1.0" encoding="UTF-8"?> < !DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"> GroupName postgres Label org.postgresql.PostgreSQL OnDemand ProgramArguments /opt/local/lib/pgsql8/bin/pg_ctl -D /opt/local/var/pgsql8/defaultd -l /opt/local/var/log/psql8/ start RunAtLoad ServiceDescription PostgreSQL Server UserName postgres8 Technorati Tags: mac, postgresql, launchd

Jens-Christian Fischer
/ #blog 

Ruby on Rails and PostgreSQL Schemas

I’m working on a Rails application on a Postgres DB Server. Our client has decided to change the database so that it uses db-schemas in order to simplify administration of rights on the database. However, he has also introduced tables with identical names in different schemas. Our rails application was already fairly well underway, so there were some substantial changes to be made. Here’s what I’ve learned in the process: ...

Jens-Christian Fischer