Older blog entries for fxn (starting at number 387)

28 Apr 2005 (updated 28 Apr 2005 at 22:55 UTC) »

Barcelona.pm Monthly Meeting

Barcelona.pm had its monthly meeting tonight. We were nine people today, and had a great time. This month I was the one to give the talk, which was a summary of the main changes since Perl 5.8.0. The presentation is in Catalan, I uploaded it in PDF format, and as an interactive QuickTime movie (1.9MB), where a few beautiful Keynote 2 transitions and animations can be seen.

Tiger Arrived Today

I have a nicely packaged black box in front of me, if everything goes fine my next entry will be written with Safari RSS :-).

Steve Ballmer Talk

I attended today the talk Steve Ballmer has given in Barcelona, in the Liceu. The public was heterogeneous, and perhaps because of that the content was, uhm, plain. Innovation is central to strategy, you must listen to your costumers, ..., that level. I didn't expect much from the talk itself, but I was curious about him and could see and hear him in live.

What's new since Perl 5.8.0

I have been working today in the presentation I'll give this week at the next Barcelona.pm meeting. The talk summarises the changes introduced since Perl 5.8.0, released back in July 2002. That comprises seven stable releases and a lot of stuff. I'll work on it until Thursday.


Last news about Perl, comments about Perl programming, reviews, and more, as weekly podcasts.

Paper generator


15 Apr 2005 (updated 15 Apr 2005 at 17:50 UTC) »

This week I have had the pleasure to meet Jan Wielemaker, the author of SWI-Prolog. I've been in Madrid in a meeting of an European Project I have recently joined in which Jan has worked.

Unfortunately he has done his part already and will be no longer involved in the project :-(.

That's a nice coincidence, back in 1998 I needed to do an immersion in Prolog. I used SWI-Prolog for that and since I was working as a proof-reader by then I did a careful revision of a couple of chapters of the user manual and sent it to him. He was very grateful and the corrections were merged.

Those days I followed The Art Of Prolog (1st Edition) and Prolog Programming in Depth. In case I play with Prolog again Jan recommended to study The Craft Of Prolog.

11 Apr 2005 (updated 11 Apr 2005 at 13:20 UTC) »

Interview with Mark Jason Dominus

The Perl Review has an interview with Mark Jason Dominus about his recently published Higher-Order Perl. I am reading HOP and can't put it down.

5 Apr 2005 (updated 5 Apr 2005 at 19:33 UTC) »

The Return of Emacs

Getting the fonts right has got Emacs back to my desktop. Since I got the Mac (hey, that was October 2003, time flies!) I was using it occasionally to edit my encrypted passwords file with crypt++.el, and some editing here and there, but the font rendering made it kind of ugly and in consequence didn't fire it up often.

I was mainly flirting with SubEthaEdit, or TextMate for quick scripting, with vi in the command-line as usual. Regular programming at work, or playing around with my personal projects, went to Eclipse.

Although I don't have the same control over Eclipse than I have over Emacs (not to mention the list of available modes), and I miss a lot the smart M-q, Eclipse is an IDE I like, and its support for Java is superb. Only it eats too memory for these 512MB, so I need to keep the number of open applications small.

For Perl, Python, reStructuredText, and some other stuff my editor of choice now is Emacs again.

Talking about SubEthaEdit, I saw the other day an interesting usage: people at some Python Conference were taking notes in parallel. Cool!

By the way, with the configuration I came up with a couple of days ago most glyphs were OK, but then I noticed a few keys didn't work properly. Thanks to news:gnu.emacs I could figure out the correct value for mac-keyboard-text-encoding is kTextEncodingMacRoman.

3 Apr 2005 (updated 3 Apr 2005 at 12:40 UTC) »

Monaco in Native OS X GNU Emacs

My current preferred fixed-width font on the Mac is Monaco, but when I compiled Carbon GNU Emacs sometime ago Monaco wasn't rendered cleanly, Andale Mono was more or less OK, but not as nice as in a native editor either. In addition, I needed to create a fontset by hand to be able to enter accented characters.

I installed yesterday the last .dmg and this has dramatically improved. Monaco looks perfect now and there's no need to create the fontset, just configure the keyboard this way:

    ;; See C-h f set-language-environment RET for details.
    (set-language-environment "Latin-1")
    ;; This is a PowerBook.
    (set-keyboard-coding-system 'mac-roman)
    ;; Transform input from the keyboard into latin1.
    (setq mac-keyboard-text-encoding kTextEncodingISOLatin1)

This definitely makes Emacs a better Mac citizen.

21 Mar 2005 (updated 21 Mar 2005 at 23:14 UTC) »

Pragmatic Documentation

One of the things I miss when I am programming in something that is not Perl is pragmatic library documentation accompanying specifications, architecure descriptions, or whatever you want to put there. I don't understand why you are supposed to infer the usage of some library from the spec so often in Java, C, Python, etc. From my experience, in general the Perl conventions are ahead of any other I know.

When you read the documentation of a Perl module you see:

  1. How the module is used
  2. The module specification

The first part is code, right there, no English. By convention it goes in a section called SYNOPSIS which is the first one you see after the one-line description and the table of contents. See for instance the SYNOPSIS of IO::All. You get the picture at a glance. Not the details, to know the details or get the complete interface you then read what you need below, but you already have context.

To give a recent example of lack of pragmatism, look at the most recent documentation of the standard Python module CGIHTTPServer. Oh man, how on earth do I set up a server with that class? One reads that page and thinks: Hum, well, let's try the docs of its parent class. Ha, not so easy dude! Have a look at SimpleHTTPServer. Nope, you find a similar page. OK, be patient, maybe we'll have more luck with the documentation of BaseHTTPServer? Now something! At last! Some example!

But now, how to translate that example to CGIHTTPServer? You backtrack the links and try to figure it out. Finally you come to produce:

    import BaseHTTPServer
    import CGIHTTPServer
    handler_class = CGIHTTPServer.CGIHTTPRequestHandler
    server_address = ('', 8080)
    httpd = BaseHTTPServer.HTTPServer(server_address, handler_class)
    except KeyboardInterrupt:
which curiously enough does not instantiate a CGIHTTPServer. Shrug.

378 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!