Older blog entries for fxn (starting at number 498)

Gotcha: Ruby and Perl conflicting regexp flags

Both Ruby and Perl have /m and /s regexp flags, but they are different in each language.

  • To have the dot match newlines you use /s in Perl, but /m in Ruby.
  • To enable multiline mode, that is ^ matches beginning of line, you use /m in Perl and nothing in Ruby. In Ruby that's the only existing mode, you can't switch it off, ^ asserts beginning of line always. Beginning of string is \A and end of string \z or \Z as in Perl.
  • If that was not confusing enough, Ruby has a /s flag which means the regexp is in SJIS encoding.
4 Aug 2008 (updated 4 Aug 2008 at 15:09 UTC) »

Adam Kennedy in Barcelona

Perl wizard Adam Kennedy is doing a tour thanks to a TPF grant, and was with Barcelona.pm last Thursday. He gave a talk about PPI, a distribution of him that solves a hard problem.

After the talk we went out for dinner and had a great time. It was a real pleasure to meet him.

26 Jul 2008 (updated 27 Jul 2008 at 09:33 UTC) »

Hat Tip at Frederick Cheung

I admire the public work of Frederick Cheung.

He for example has been giving first-rate help at the rubyonrails-talk mailing list for a long time. Giving support in mailing lists, IRC, or Usenet is not something all people are able to do at that level. Of course you need to be correct and give quality answers, but also you need to have true respect for any question, of any level, and you need to have an intuitive way to guess the level of the OP from a few clues in his wording to tailor your response appropriately. That comes from a genuine willingness to help, to contribute, and from other skills not everyone in public forums have. Excellent job there.

Frederick has been also an important contributor to the Rails core. His work there ranges from small patches, to the entire non-trivial rewrite of eager-loading that saw the light in Rails 2.1.

In addition, he has started a series of articles in his blog that cover fundamental Rails stuff in-depth. For example, everyone knows params in Rails, but I think any developer, no matter he's an apprentice or an expert, should read this recent article.

Keep up the good work Fred!


Not much activity in this diary lately, I'm very busy with the company and an intensive summer course to add some epsilon to my very weak English speaking and listening. Unfortunately my reading rate has decreased in the last weeks as well, though there's always room for a good Mario Kart for Wii races with my lovely daughter.

I got a wonderful brand new car recently, enjoying the seaside each weekend with my family.

Now that the English course is over I hope to be able to catch up with Life.

14 Jun 2008 (updated 14 Jun 2008 at 17:35 UTC) »

Unicomp Customizer

I've always been a fan of IBM model M keyboards. I worked with one for some time and additionally had the luck of having very forgiving coworkers with plenty of patience (eh Noyda??? :-), because, you know, they are certainly noisy.

The one I have doesn't work very well with my Mac and IBM stopped building them a long time ago. But fortunately a company called Unicomp purchased the license to build keyboards with the same technology, I knew about Unicomp and their Customizer from this positive review and ordered one right away.

Bingo, an excellent keyboard with those lovely mechanics and feedback. The PACK! of the return key is exactly the same, it sounds unique! It has been a few days since it arrived and man I love typing with this keyboard.

28 May 2008 (updated 28 May 2008 at 20:30 UTC) »

brian d foy in Barcelona

Tomorrow Thursday Perl guru brian d foy will give a talk to Barcelona.pm. That's in the Faculty of Mathematics of the University of Barcelona, classroom B6, 7:30 PM (map). The talk is open, feel free to join us!

brian d foy in Barcelona

brian d foy is going to come to Barcelona next week. He will give a talk about Perl 6 to Barcelona.pm next Thursday 29 in the afternoon at the University of Barcelona. I'll post more details next week. Feel free to attend!

Euruko 2009 will be held in Barcelona

Barcelona is going to host the next European Ruby Conference 2009 (Euruko 2009), hoooray!

Spanish Ruby Users Group

The Spanish Ruby Users Group has been born as a byproduct of the effort to prepare the candidature of Barcelona for the Euruko 2009. There's a strong group of proactive people as founders of the group all over Spain, I am sure this will be an active and efficient association. I am honoured to have been elected president of the group.

2 May 2008 (updated 2 May 2008 at 22:40 UTC) »

Interview in Rails TakeFive

FiveRuns has published an interview with me which is part of their Rails TakeFive series.

Goodbye signature

Some years ago I started to systematically skip "Hello"s and "Regards"s in mails. Most of my mails are written to just say something and courtesy formulas like those add nothing but length. There are times where you feel you need to use them, but nowadays for me those are just a few.

I still use my signature in most of my mails:

  -- fxn

and I am getting tired of that. My name goes already in the From header, and since the mail is so direct that signature sometimes may look even assertive. It brings no information, it is inertia from previous standards. So I think I'll systematically cut that one as well.

12 Apr 2008 (updated 12 Apr 2008 at 01:15 UTC) »


It's been a few weeks working in doc-rails.

The Rails API lacks writing conventions because that's the aggregate work of a lot of people. You know, different tenses, lack of consistent typography, etc. The purpose of this project is not necessarily to fix that, though I'd say that's within scope, but when you revise and write new documentation you need to make choices. So one of the first things we did was to write a few guidelines.

Now, there's a lot of work to do and by now there are systematic revisions going on (that is going file by file in some Rails module), new documentation chunks here and there, tweaks, and transversal revisions (me myself grepped the source tree to find symbols in regular font for example). We monitor and fix doc patches in Rails Trac as well.

Once a week Rails core member Pratik merges the changes into Rails edge.

Being able to contribute to this project is great because you know, if you find something to fix you have the mean to do it right away. A few days ago for instance I wanted to understand a patch to ActiveRecord::Associations::AssociationProxy, and that class lacked documentation. I needed to figure everything from the source code. Not the following guy! I sat down, wrote it, and git pushed. That's fantastic!

489 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!