« October 2008 | Main | December 2008 »

November 26, 2008

In sync

Since I upgraded from a single laptop to dynamic duo including a new desktop, the "how do I keep the two in sync" problem became a topic of some significance on my geek life.

There are several sets of information that I want to keep in sync, and for some of them I found solutions, and for others I'm still struggling.

The first and easiest to solve was my work/ directory. This directory has all my code, in subversion checkouts or git repositories. The solution was a single Unison profile that I manually have to run at the begging and end of the day. It's not an automatic process and it is not transparent, but sometimes, and in this case, I see that as a feature. I also include my dotfiles in this work directory, so all Macs share the same set of UNIX-style configuration files.

Then we have "other files". This is a category for random files, documents, PDF downloads of stuff to read, whatever. This is also perfectly solved by Dropbox. I could not in a million years write a better explanation why Dropbox is great than Michael Lopp's article Dumbing Down the Cloud, so read that and you'll understand why it is really really great. (Update: but make sure you understand some of the limitations with as pointed by Michael Tsai).

One important part of my day is my personal R&D time, about 1 hour per day where I read a lot. I find stuff to read using RSS feeds, about 350 right now, that are kept in sync using NetNewsWire and NewsGator service. It is not nowhere near perfect, the snippets system easily gets out-of-sync (16, 66, 12: that's the number of snippets I have on the web interface, desktop NNW and laptop NNW right now...), sometimes I get an old feed back from the dead, all marked as unread, and (most infuriating) the order of the groups is not synchronized between instances. But it "works" well enough. I'm considering the Google Reader as an alternative, but I admit that I would prefer to keep using a desktop application.

After these three, I still need to tackle my mail (and more important, my mail configurations), my address book, music, photos and applications.

The last three I just don't bother. Applications will be re-installed on each computer without any sort of sync between them. I just install them when I need them. Music and photos are not synced, at all. I could use the desktop as the master and just rsync them from time to time to the laptop, but it wasn't worth it yet. Eventually I'll get a new iPod (all my iPods are currently dead), and I'll use that when I'm away from the desktop.

But the other two are still unsolved. Although all my mail is stored on IMAP accounts, I have a large set of local rules that are not easy to synchronize. I know about MobileMe (not worth the cost, and the "went wrong" stories scare me a bit, even with decent backups) but I'm still looking for some other alternative.

One possible solution that I'm considering is a change in my workflow: make sure all my rules only apply to a "To Process" mailbox. When scanning through the inbox, I either reply/forward, delete, or move the that special folder. Then, on the desktop, I just run all the rules and the messages are archived properly. This would allow me to keep the rules in a single computer and still read mail on all of them.

The same for Address Book. Although only a single file needs to be kept in sync, and given that MobileMe is not an option for now, its still unsolved.

I bought the newest Take Control of Syncing Data in Leopard, in the hope that I can solve the last to items on my checklist. Time will tell, I guess.

November 20, 2008

Bluetooth between Macs

I paired two Macs via BlueTooth but the OBEX File Transfer service was not available. WTF?

Is this some limitation of my BT dongle (I can send and receive with a mobile phone...) or something idiotic on Apple part? Any ideas?

FriendFeed

I'm keeping track of all the stuff out there using FriendFeed. For now, it is the best service I found to do it.

I'm using a Fluid SSB with the "real-time" view, and I disabled all the XMPP updates. This way, I can glance to the SSB from time to time, without the interruption of real real-time notifications.

The only feature I miss, I would like to have an action "Mark as seen" at the top of the page tab (next to the "Pause updates"). This way I could glance at it, mark them as seen (this could make them grey-ish) and later it would be easy to pick up where I left it.

Now where is the feature request button for FriendFeed?

November 19, 2008

Codebits 2008 XMPP presentation

My "XMPP - Hands on" presentation at Codebits 2008 is online. You can find it at GitHub and download the tarball (the big Download button). Its in Portuguese so most of you can ignore the PDF and dig straight through to the code.

I didn't have Keynote.app on the laptop where I wrote it so I decided to try S5 to write my slides.

The HTML version is great, and with a bit of syntax highlighter even the XML examples look good.

But the PDF version is very basic. I searched around for a better CSS to print S5 slides, but could not find anything. Maybe CSS is just too limited for decent printing control.

I don't know if I'm going to use it again. The lack of a decent PDF output is a big minus. On the plus side, I really like having the full power of HTML/CSS/JS inside my presentations.

As for the code examples, I wrote two:

All examples are written in Perl using the Net::XMPP2 framework. I made a few fixes to some of the Net::XMPP2 modules, you can find them inside the repository to make running the bots easier. I'm going to send Robin Redeker (Net::XMPP2 author) those fixes, so they should appear in a future version.

November 17, 2008

MacPorts

My love/hate relationship with systems like MacPorts and Fink requires an re-evaluation.

I used fink a lot in the 10.2 days, and I didn't like it that much, and given that my OSS software needs where either covered on 10.4 and 10.5 or a simple ./configure --prefix=my_local_app_dir && make && make install away, I was always able to stay away from them.

But the installation of CouchDB has a lot of dependencies, and there is no way that I'm going to try and install Erlang OTP and SpiderMonkey from source by hand.

So I downloaded the MacPorts installer and run it only to be greeted with a message like "The following install step failed: run postflight script for MacPorts-1.6.0".

Our friend Google tells me that this is was known problem with the 1.6.0 installer in January of this year, but the mentioned 1.6.1 installer is still not released.

So right now I'm trying to run the postflight script by hand. Lets see how that goes.

And by the way, for all of those that told me that "MacPorts is totally safe, it only install under /opt so a mere rm -rf will remove it from the system", I'll recommend you to lsbom the Archive.bom file inside the package, and stop saying that non-sense.

Update: cd /Volumes/MacPorts-1.6.0/MacPorts-1.6.0.pkg/Contents/Resources/English.lproj && sudo postflight seems to work.

November 12, 2008

GTalk Videochat

By now, you have probably read that GMail has added video-chat to its web interface.

The blog post mentions the usual suspects: XMPP for signaling, RTP for transport and a H264/SVC codec. The implementation uses a browser plugin. Time will tell if this plugin will be bundled with Chrome (most likely) or bundled with Gears (would make sense for Google).

The Mac installer includes a meta-package with two packages: Keystone.pkg and the GoogleVoiceandVideo.pkg.

The Keystone.pkg includes the GoogleSoftwareUpdate.bundle that is installed at /Library/Google. Inside it has a GoogleSoftwareUpdateDaemon but so far I don't have it running on my system.

The GoogleVoiceandVideo.pkg is the real deal. It installs several things:

  • two QuickTime components, Google Camera Adapter 0 and Google Camera Adapter 1;
  • an Internet plug-in, googletalkbrowserplugin.plugin;
  • an GoogleTalkPlugin.app support application.

After installation, it opened my GMail account and detected my iSight camera. I wasn't able to find someone to use it with so far, so I'll report back on the quality of the image. I expect a decent quality given the chosen codec.

I'm focusing on Codebits right now, so not much time to check out the XMPP part of this, but it seems to me that then reused the same signaling already used by the Google Talk client, nothing new there.

The big question for me is this: will other sites be able to use this plugin for their own video-chat features? I need to read the license more carefully.

As for Skype, it still has one advantage: I can use it without opening a browser on my Mac. But if I where them, I would start thinking about XMPP support and interoperability with Jingle, but thats just me.

Skype window of opportunity to be the leading XMPP client is shortening every day.

November 10, 2008

Codebits 2008 counting down

Codebits 2008 is this week, and although I have received a couple of ideas already for my presentation, I still need more.

So get of your collective chair-interface-parts and send your ideas.

Thanks!

November 07, 2008

That was quick...

Wow... Just 48 hours after winning... change.gov is up.

November 06, 2008

AnyEvent::Mojo 0.6

Uploaded to PAUSE AnyEvent::Mojo 0.6, should hit the CPAN mirrors throughout the day.

Update: uploaded 0.6001, with an attempted fix for some 100% CPU usage cases.

The major change is the renaming of AnyEvent::Mojo to AnyEvent::Mojo::Server.

There are two reasons for this change. The first is to prepare the release of AnyEvent::Mojo::Client in the next release, wrapping the Mojo::Client API.

The second is to free the AnyEvent::Mojo to be used with the new functional API.

Starting a Mojo server inside your AnyEvent apps is now very simple:

use AnyEvent;
use AnyEvent::Mojo;

my $server; $server = mojo_server undef, 4323, sub {
  my ($self, $tx) = @_;

  $tx->res->body('Cool!');  
};

$server->run;

The interface is similar to AnyEvent::Socket.

This is the first beta release. I don't expect to change the API in a backwards incompatible way until 1.0.

I do plan the following for the next releases:

  • implement AnyEvent::Mojo::Client and the correspondent mojo_client function;
  • implement support for 100 Continue.

Mojo is fun!

Oh, and please vote for the Perl Foundation grant to improve Mojo.

November 04, 2008

Who needs a pony when you have a fairy?

The Django people came up with a new logo for the project, a magical pony.

Its nice and all, but it doesn't beat the "Best logo of all times, in the Software category"-contest. That prize is still clearly in the hands of SQL::Translator.

Sorry guys, but bonus points for effort. The color of the first version was a step in the right direction.

AnyEvent::Mojo now with resumable requests

I've uploaded to PAUSE (give it a couple of hours to appear on your local CPAN mirrors) the latest release (0.5) of AnyEvent::Mojo.

The biggest change is the new resumable requests. After your handler is called, you can pause the connection, do other stuff using the AnyEvent asynchrounous nature, and when you are ready to send back the response, you can resume the request.

In pratical terms, this is now possible:

sub my_handler_cb {
    my ($self, $tx) = @_;

  # Pause the connection while we HTTP GET our information
  $tx->connection->pause;

  # This HTTP get is done asynchronously
  http_get $status_url, sub {
      my ($data) = @_;
    my $res = $tx->res;


      if (!defined $data) {
        $res->code(503);
      }
      else {
        $res->body($data);
      }

      # Ok, the response will be sent now
      $tx->connection->resume;
  }

  # We paused the connection so we can return
  return;
}

While the inner http_get is going on, the AnyEvent::Mojo server can handle other requests.

This allows you to keep several thousands of requests going on without any effort at all.

I'm still labeling AnyEvent::Mojo as alpha. The interface will change one last time for 0.6. After that it should be beta time until 1.0.

I need to find a decent WebSockets client implementation (or some sort of long-pooling client) to make a decent application with this. Any recomendations?

November 03, 2008

Codebits 2008

Next week I'll be attending the 2008 edition of Codebits.

I also have a slot to talk about XMPP and this is where you can help.

I don't want to do another abstract talk about XMPP, but instead I want to write code that you would like to see.

So if there is some XMPP-based functionality that you want to see how you can get it done, ping me or email me with the high-level details.

I'll take all the projects I can cover in an hour and present my skeleton or even complete solution at the conference and discuss why it was done that way.

All the code will be available before the presentation so you can also follow along.

Kids are my favorite anti-RSI tool

Nothing else to see, move along.

What he said

Although I like GPLv2, since the first I read the GPLv3 I got a sense of dread. I couldn't put my finger on it.

Fortunately someone did, and I can just point to it and say "thats what I wanted to say".

Update: and by the way, if you want to see the entire Obama speach that he talks about:

  • Go to Obama faith issue section of his website;
  • click on the "Watch Videos";
  • scroll all the way down on the video selection box. Its the last one.

Direct link to Obama Call to Renewal speech.

November 02, 2008

Other uses for Rasputine

Rasputine was born to connect Moo/MUD/talkers to the XMPP network, but in fact its a generic Telnet-to-XMPP gateway. This opens up a lot of interesting use cases.

You could add a buddy for each router that you have. Or one for each perlbal/memcached admin interface.

The internals are still a bit messy but after a small cleanup, you could even have two users, with their own Jabber ID, sharing a telnet session to a router. A kind of Pair-Configuration session.

Just think of all the devices you have with a Telnet administration console: Rasputine should be able to handle it.

Rasputine

Apparently some things never die. In January 1994, a friend of mine, Paulo Ferreira, created an online community around a Lambda Moo server. Its called Moosaico and it still kicking.

I spent an enormous amount of time there and I still have fond memories of that time, of the people, the stories, everything.

But access to Moosaico (and other MUD's or Talkers) is usually done with Telnet or using a client like TinyFugue or Atlantis. Keeping one of those open to be connected somehow never entered my normal workflow, so I drifted away.

Its amazing that something that I was hooked on 14 years ago is still alive in me.

The friday something happened that will pull me back in.

Another friend, Marcos Marado, commented that he was looking for a XMPP interface to his talker, Selva. I had an headache and didn't feel like working on what I was supposed to, so I took the challenge.

Later that afternoon, Rasputine was born.

Rasputine (or Ras, as Corto Maltese called him) is a generic Moo/MUD/Talker-to-XMPP gateway. You add a buddy to your roster and then you can use it to connect to that world.

For example, to log in to Moosaico, add moosaico@rasputine.simplicidade.org and then type //connect. Presto, the login window of Moosaico should be readily available. The Selva talker is available at selva@rasputine.simplicidade.org.

The code is still very young and feature-less. The copy that I run on my staging server already has per-user status messages and avatars, and next I plan to implement auto-connect (probably even XEP-0100 support).

For now, I'm just enjoying getting back to Moosaico.

Update: by the way, if you want to connect your own talker/MUD/Moo, ping me via XMPP or email and I can set you up. At least to try it out.