ronny.haryan.to

Icon

Print: $9.50 — Online: free

Live with it

To everyone that’s been complaining about the size of newer LCD monitors that are getting bigger causing neck pains:

DON’T SIT SO CLOSE TO THE MONITOR!

psycopg2 and 64-bit Apache on Leopard

The Apache httpd that comes with Mac OS X Leopard runs in 64-bit mode, so everything else that’s loaded, including mod_wsgi and psycopg2 must be able to run in 64-bit mode as well. Graham Dumpleton explained this behaviour in a post to the django-users mailing list.

Compiling psycopg2 using MacPorts as well as from the tarball would result in something like this when loaded from a web application that runs on Apache:

ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Library/Python/2.5/site-packages/psycopg2/_psycopg.so, 2): no suitable image found.  Did find: /Library/Python/2.5/site-packages/psycopg2/_psycopg.so: no matching architecture in universal wrapper

So all I needed to do was force psycopg2 extension to be built for 64-bit as well as 32-bit. After extracting the latest psycopg2 source, do this instead:

LDFLAGS="-arch ppc -arch i386 -arch x86_64" CFLAGS="-arch ppc -arch i386 -arch x86_64" python setup.py build

Then sudo python setup.py install. After that, check the .so file, it should look something like this:

$ file /Library/Python/2.5/site-packages/psycopg2/_psycopg.so 
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so: Mach-O universal binary with 3 architectures
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture i386): Mach-O bundle i386
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture ppc7400):      Mach-O bundle ppc
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture x86_64):       Mach-O 64-bit bundle x86_64

Don’t forget to restart Apache, and that should be it.

Update: It happened to PIL too, it was giving this error: The _imaging C module is not installed, so I had to do the same thing as above: LDFLAGS=... CFLAGS=... python setup.py build followed by sudo python setup.py install.

30-inch Apple Cinema Display

30-inch display

I just visited a local AppleCentre shop here in Sydney at Broadway today with my friend Jul because he wanted to buy an iPod Mini. I was trying my best not to drool over the keyboards and the displays, but it was really tough, you know. They have (almost) all of the usual suspects in the shop: Powerbook G4, iBook G4, iMac G5, eMac, iSight, PowerMac G5, yada yada yada, and–always–a cute Asian girl behind the counter. The first thing I noticed when entering the store, however, was a QuickTime movie in a window (not fullscreen) projected on a huge canvas screen as a second display to a 30-inch Apple Cinema HD display connected to a half-transparent-cased dual-CPU PowerMac G5. And the cute girl, of course.

I immediately played around with the G5 and the 30″ display. It was running Mac OS X Tiger, so I got a chance to play around with that and Dashboard, too. I wanted to try the iSight camera sitting on top of the 30-inch display but I don’t know which application to open other than iChat, and I couldn’t find anything in the menu that can show the video from the camera.

Now I know what I want for my Christmas present. A 30-inch Apple Cinema Display. This baby’s optimum resolution is 2560×1600 pixels and it probably takes almost the same space as my bulky 19-inch CRT monitor, just perfect for my desk, although I might have to sit a bit farther back. The display was bright and crisp like nothing else I’ve ever seen before. Just the 30-inch size alone was enough to amaze anyone.

The AU $4,899 price tag, however, is way too high for my wallet at the moment, but I reckon I’ll be getting one of these in the future. Maybe there are better models out by the time I can afford this, but you know what they say about there being no good day to buy any computer or techie gadgets because there’s always a better, less expensive model waiting in the corner the following day, so maybe I could be getting something better then, we’ll see. I should probably buy a Powerbook G4 or a PowerMac G5 first, though.

apple displays

Here’s the full tech specs for the Apple Cinema displays.

Oh, and my friend didn’t get his iPod Mini because it was out of stock, and the shop staff didn’t know when the next shipment is coming, it could be anytime between next week and next year. What the…?? My friend was a bit pissed off about it I think because it took him so long to think about buying, but when he actually decided to buy it, it’s not available. Looks like he’s buying it from eBay.

About

Ronny Haryanto is a technology addict/chef wannabe living in beautiful Melbourne, Australia.

Read more…

Follow Me on Twitter

Follow @ronny on Twitter where I post much more often than my blog.