This will be the first of many articles about why mac os sucks for the everyday developer work…

I’m mainly working with Perl now, and I started to have problems as soon as I went to mac os. The modules I was used to work with started to fail on mac os. After some digging I found that every failure was related with some string format problem.

For example, I discovered that this expression sprintf '%f' 0.3 gives you the string 0,300000 and not the “expected” 0.300000. You can’t imagine how this thing breaks some Perl modules…

Then I realized that my locale settings were defined to C. Clearly that could be a problem. Google helped me a bit, and I found this website that has instructions on how to prepare your mac os to the correct locale and unicode settings.

A little bit of hacking later (I set my new locale to en_US.UTF-8), a new bash from macports, and sprintf started to behave “correctly”, and Perl modules no longer complain :-) Great success!

About

photo of Ruben Fonseca

My name is Ruben Fonseca. I'm a Computer Science and Systems Engineer from Portugal that loves FLOSS.

I'm currently taking some time off to myself, but feel free to contact me anytime at or via LinkedIn:

View Ruben Fonseca's profile on LinkedIn

Feeds

4 Comments | rss | atom | xml | json

  1. avatar incude

    Finally you feel the pain!!!! All those years of you saying, “buy a mac!”... OHHHHH THE JOY! Now, imagine your mac laptop (sugested by… you) runs on powerpc and has a nvidia graphic card, and after months of tearing eyes out (the mac way), you decide to give linux a go, but wait, nvidia doesn’t have a powerpc driver for linux, HOLLY SHIT!! at that point in time you’ll have two options, swallow a frog (the mac way) or use linux and have no dri and no suspend.

  2. avatar Rúben Fonseca

    you bought the wrong mac :P this one runs linux with all his glory :D

  3. avatar balsagoth

    don’t tell me that! My ibook has an ati 9200 and a powerpc processor, and this week when i put openbox on x11 i fell so confortable with this old mac, and i decided install debian on it. But i haven’t google anything about debian on ibook and if airport, graphic card and sleep works well. I’m felling sick with a very slow machine and with that fuck thing called FINDER and TERMINAL.app. Yes openbox with urxvt makes me a happy guy.

  4. avatar incude

    Rúben Fonseca: that´s why i said imagine! balsagoth: (I´m not sure i understood your comment) you should be ok, ibooks have full support under linux! As i said my powerbook runs an nvidia and there is no support to nvidia in ppc so that means no graphic acceleration and no sleep! the point of having a laptop is mobility, so having no sleep means, usually, choosing OS X over linux. it´s true they get a new life running linux, specially with a minimalistic wm ;)

new comment New Comment