« January 2007 | Main | March 2007 »

February 28, 2007

SAPO Messenger for Mac

One of my favorite projects in the last years is finally public. The first public version of SAPO Messenger for Mac, a Jabber client tied to the SAPO Messenger community.

The client has both English and Portuguese and given that most Portuguese Mac users have English as their default language, we choose to ignore the settings of the International preferences pane for now and force the Portuguese locale. To switch back to English, do this:

  1. in the Finder, select the SAPO Messenger icon, from the Applications folder;
  2. Use the Get Info menu option (Cmd-I shortcut);
  3. From the Languages section, enable English.

You have to do this after every upgrade, but we will probably change this in a future version.

You can register an account at the SAPO Messenger registration page, its free. Its Portuguese only for now, but it should be self evident. I'll try and do a a small screencast about that part.

The cool features that I think make this an excellent Jabber client for the Mac:

  • native Cocoa interface;
  • a rock solid Psi core (kudos the Psi team, Justin Karneges, Kevin Smith and Remko Torçon in particular);
  • a multi-contact implementation: just drag all the contacts of the same person on top of each other;
  • a search-as-you-type roster: amazingly useful with big rosters;
  • Growl notifications;
  • SOCKS5 File Transfer;
  • SMS text messaging to Portuguese networks;
  • and lots of other small things.

All in all, it was a great year fine tuning the first set of features. I'm particularly in love with the search-as-you-type roster (and the internal versions are already a lot better :) ).

There are some features that are not present because we haven't decided how to do them right. Two examples are tabbed chat and address book integration. We don't know if they will appear in a future version or not.

Other features are not present because we are still building them:

  • multi-user chat support;
  • better handling of offline and pending messages.

So download and give it a whirl. If you need to add a local user, feel free to add pedro.melo@sapo.pt.

One last thing: during the last year, we have had the privilege to have an amazing Cocoa programmer in the team. He single handed took the project into his hands, used the core framework and C++-to-Coocoa bridge developed by the Psi team, and built all the Cocoa goodies that you will see. kudos to João Pavão of Critical Software. This was a team effort of course, but some elements just stand out.

Last but not the least: expect a GPL source code release soon :).

Happy! Happy! Joy! Joy!

February 27, 2007

Please....

It can't be that easy...

I have to try this later in my wife laptoy.

February 23, 2007

pfig++

Hey, kudos to pfig for getting his photo published. I like his Tube set.

He can fall a sleep before sex like no other, but he takes good pics.

Module of the day: encoding::warnings

Today I was tracing a double-encoding error in a web app. The Fun never ends!

Anyway, with encoding::warnings the problem was easily spotted.

So, if you are getting "garbage" output on some of your Perl scripts. do yourself a favor and try it. A good tip from an excellent write up about UTF8 and Perl.

And remember, boys, girls, and mix-ins, $1 after m/(.)/ is a character, no matter how fat he is.

Pixels! Pixels! Pixels!

For me, the thing that most improves my productivity is pixels available for work. I would love to be able to connect a second external monitor to my Macbook Pro.

For now, I've settled on using my old TiBook with a external monitor, and synergy, to expand my workspace to 4 screens.

I already searched for DVI or VGA ExpressCards, but so far found none. It's a recurring query I have on Google Alerts. The best and closest thing I saw was Belkin Notebook Expansion Dock, but alas, no Mac support yet. Also, reports on the Dell site (they sell this as an add-on) are not that good.

Yesterday, Rui pointed out a USB solution. Will see if that one gets Mac support. It would create the need to buy an external hub (all my ports are full right now), but that's ok.

BTW, if any of you comes across a ExpressCard/34 VGA or DVI card, please leave a comment. Thanks.

February 22, 2007

OpenID

I like the concept of OpenID. I remember when Brad announced it, when it was still called Yadis. I remember because at the time I was cleaning up the code that Clix used for global authentication across all their properties, and that one shares a lot of ideas with Yadis/OpenID.

In recent weeks we've seen AOL, Microsoft (63 Million OpenID potential users just there, plus all the Yahoo! logins), Verisign, BitFrost (of the OLPC project), any XMPP account, and even Mozzila Foundation is thinking about OpenID inside Firefox3, and this makes me believe that OpenID is now in his teen years.

Brad passed the torch to Simon Wilson and he has made an excellent screencast showing him using his OpenID to access some sites.

We live in interesting times...

Lighttpd, file uploads and Safari

On one of the web applications I have, the setup is more or less like this:

In this case, lighttpd is used as a reverse HTTP proxy to Apache, using mod_proxy.

I was trying to get file uploads to work on this setup. Uploading directly to Apache works flawlessly, but via mod_proxy, Safari would hang at the end, never terminating the request.

The solution is simple: for now, just disable keep-alives. Add this to your Lighttpd virtual host configuration:

$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
    server.max-keep-alive-requests = 0
}

Given that this is a back-office, this is acceptable, but for other situations it might not be. I must try to target this just to file uploads, even if that means moving them to a special virtual host.

Module of the day: File::Inplace

The task was simple enough: edit a already existing file, to change something, keeping the name intact, and if possible doing a backup of the original version.

We could start dealing with all sorts of errors in open, rename and friends, dealing with temporary files and all that stuff.

Or we could just jump to CPAN:

cpan File::Inplace
perldoc File::Inplace

In my case, I wanted to remove a line from a file. A regexp matching the line in question was something like this:

qr/src="trivantis-titlemgr.js"/

So the code becomes:

  my $editor = File::Inplace->new(file => catfile($path, 'titlemgr.html'), suffix => '-'.time().'.bak' );
  while (my ($line) = $editor->next_line) {
    $editor->replace_line(undef) if $line =~ qr/src="trivantis-titlemgr.js"/;
  }
  $editor->commit;

Nice and sweet.

'update:' to clarify some point raised in the comments, yes I know about perl -i.bak, but I needed this inside a Catalyst web application, and thus this module.

February 19, 2007

Unrelated fun

Two written pieces of pure fun:

February 12, 2007

Best $30 you'll ever spend :)

Gruber rocks:

My guess is that a very simple explanation suffices, which is that Thurrott is starting with a significant but utterly broken assumption: That Microsoft matters in this debate.

Excellent article, as always.

Earthquake

I'm not in Lisbon, so I didn't feel the Earth move. At least not at that time of the day.

The question I have for those in Lisbon is very simple: did you knew where you towel was? Just in case?

February 08, 2007

A pergunta

Usually you'll only find articles written in english here, but next weekend there will be a referendum about abortion here in Portugal, so this post will be in portuguese.

Por várias razões vou votar sim. Nunca pensei muito nisso, mas nenhum dos argumentos pelo não me parece ter peso suficiente para justificar a actual situação legal relativamente ao aborto.

Infelizmente não herdei da minha mãe o dom da palavra, pelo que em vez de fazer figura triste a tentar escrever algo decente, deixo-vos um pdf com o texto que ela escreveu para uma intervenção ontem. Para quem não sabe (e como sei que algumas das pessoas que vão ler isto tem a paranóia do ''full-disclosure'', a minha mãe ocupa um lugar no parlamento, como independente, eleita pelo Partido Socialista.

February 06, 2007

Shove it!

Here is how Jobs says shove it! to the Nordic, French and German consumer groups that where complaining about Fairplay.

No comment from me, just providing the link. I'll watch this one from the sidelines. I couldn't care less about DRM. It's broken, it will always be and it does not prevent me from doing anything that I want to do.

BTW, at last count, I have 1311 tracks purchased from iTMS and I never ever bough a CD again since iTMS Portugal open up. I despise the waste of a CD Jewel case and leaflets more than I despise DRM. This could even be a slogan: DRM doesn't kill trees.

update: commented about a good call that MP3 doesn't kill tree either.

update 2: I was eagerly expecting Gruber view point. Good as always. Pay the man, he is worth it.

February 05, 2007

Tip: given a coderef, show me where the code is

In Perl, sometimes you have a coderef, normally a callback, and you need to know where is that code located in your source.

This will do the trick:

sub _dude_wheres_my_coderef {
    use Devel::Peek;
    $code = \&$code; # guarantee a hard reference
    my $gv = Devel::Peek::CvGV ($code) or return;
    return *$gv{PACKAGE} . '::' . *$gv{NAME};
}

Taken from dump_vars.pl. BTW, $name also includes filename and line number.

Defense of Marriage Initiative

If this gets approved, Washington state will be know as the Rabbit State, because all of them will try to stay married...

It's an absurd measure of course, and the proponents only want to promote discussing of same-sex marriage, but I find it disturbing nonetheless.

update: a bit of history behind all this. (via Pedro Timoteo), and I still find the idea disturbing. I don't know why really...

February 03, 2007

XMPP servers

ejabberd just reached 1.1.3, and you can download new fresh installers from the download page.

Of particular interest to me is the new Mac OS X Intel installer that allows me to have a ejabberd running on my Macbook.

With this, that makes three different XMPP servers now, that I run on a regular basis: ejabberd, Wildfire, and DJabberd. Each one has good and bad points. Lets see a couple of them.

Wildfire has the best admin web interface by far, and for small and medium size deployments (up to 3 or 4k online users) should work just fine. Adding plugins and most of the reconfiguring is done without service interruptions, has a decent Multi-User Chat (MUC), file transfer proxy, pubsub, and a beta gateway for other networks (MSN, Yahoo, AIM, and ICQ). All in all, pretty good package, and it's the one I use on my personal server right now. The only downsides for me are memory usage (he likes memory), and the fact that you cannot support more than one domain.

Ejabberd is the enterprise-class large scale deployment king. He keeps on working even when you throw at it indecent amounts of traffic. It has file transfer proxy, MUC, pubsub (although a bit out-of-date) and other goodies. The web interface is not the most beautiful but works and has most of what you need.

Ejabberd is also the only one of these three that can be configured as a cluster. Just add nodes and distribute your clients between them. Simple and just works.

These two are the ones you should look at first if you need a Jabber server for your company. They are actively developed and supported.

But if you like Perl and want to have fun, you can't beat DJabberd. You can easely modify any part of the server, it's all plugins, and there is still a lot to be done. There is no web interface, and only a handful of modules, but it works.

Use it if you need a very simple XMPP server or if you need to integrate with a already existing site or community.

All in all, I think that we have very mature XMPP servers out there. So, pick you poison and join the revolution.

One of the best things about kids...

... it's Lego.

Bought a bunch of them at the online store, but one of the ones I wanted apparently is not available in Portugal.

Hey, pfig, can you check out around your town for this and send it to me? Thanks :).

Update: I was able to order it from the online Lego shop! Strange, because last week I couldn't but yesterday it worked, at least they accepted my order. The only thing diferent between the two attempts was that yesterday I was logged on with a Lego Club account. For those wanting to buy 3772, I would suggest that you go to the Lego site, subscribe to the Lego club, sign in, and try to buy it them.

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2