Version 2.2.0 of the Gruta CMS, codenamed "Osmannoro", has been released. This release needs Artemus version 4.1.2. The following changes were made:
stories_by_date has changed the order of their output values; now they are topic_id, id and date.
tag, to get feeds on stories by tag.
sources argument is still supported (only the first one is used, though), but the scalar source is preferred now.
.META extension has been changed to .M, and .TAGS to .T. Also, new files appear in the stories directory with the .A and .B extensions, holding the rendered abstract and story body, respectively. The transition is made automatically on the first run, no manual operation is needed.
hard_top_ten_limit to Gruta::Source::FS, to set the maximum number of stories to be tested when generating the top read stories index (previously hardcoded to 100).
min_size_for_gzip to Gruta::CGI, to set the minimum size for the output body to be Gzip compressed (previously hardcoded to 10000).
CSS, RSS and SITEMAP pages. The following mod_rewrite rule must be added to the ones suggested in the previous version:
RewriteRule ^/style\.css$ /?t=CSS [PT]
La segunda edición en papel de mi libro Terra Incognita (1997) está lista para comprarla en la tienda Lulu.com.
El texto incluye algunas correcciones de fallos tipográficos y estilo. Pero lo más interesante es la nueva presentación y diseño hecho por Marisa Ortega, gran profesional que además es mi hermana.
Una vez más, se demuestra que el aspecto es fundamental y lo que antes parecía un panfleto sin el menor interés ahora parece un libro de verdad.
I use mod_rewrite intensively on this site, mainly to make the
transition from the old static files layout to this new, dynamic one
based on my Gruta CMS. Following the premise that
URLs must be eternal, I've
used mod_rewrite magic to make old URLs like
http://triptico.com/software/mp.html
still be accesible, but be interally redirected to
http://triptico.com/?t=STORY;topic=software;id=mp
Anyway, it may prove useful to only do this redirection if a file with that path and name does not already exist in the filesystem. This can be used, for example, to serve special, manually crafted HTML pages, statistics made by other software, or to 'freeze' a special page to avoid too much server load.
So these are the magic words:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule ^ %{DOCUMENT_ROOT}%{REQUEST_URI} [L]
They must be entered before any other rewriting directives.
What they mean is, if a file exists (-f) with a path formed by the
site's document root plus the requested uri, rewrite the query to it and
stop rewriting ([L]).
Una amistosa introdución a la codificación de vídeo, parte 3: sonido con pérdida, por Mark Pilgrim.
Version 2.0.15 of the Grutatxt text conversion package has been released. The following changes were made:
url-label-max to the HTML driver to set a maximum size for URLs.
pod2grutatxt, to convert Perl documentation in POD format to Grutatxt.
pre mode is really verbatim, so bold / italic markup is not processed.
File locking in Perl is done with the flock() function. It's portable among architectures, is advisory-only and locks full files.
It accepts two arguments: a file handle and an operation id. As expected, it allows only one writer or many simultaneous readers, with no wait. Locks are automatically released on closing. The usage is simple:
flock() with the file handle, and a second argument of 1 (if reading) or 2 (if writing).
And that's it. The magic numbers 1 and 2 can also be used as LOCK_* constants imported from the Flock module. The perldoc documentation is comprehensive, take a look at it.
Example reader:
open F, 'index.db'; # open for reading
# lock file. If a writer has it locked, it will
# wait until released. Many readers will read the
# file simultaneously without blocking.
flock F, 1;
while (<F>) {
# do things...
}
# lock is released
close F;
And a writer:
open F, '>index.db'; # open for writing # lock file for writing. If there is another reader # or writer using the lock, it will block until # released. flock F, 2; # file is now locked # write stuff to the file... # lock is released; any readers or writers waiting # will unblock and go on with its business close F;
As these locking semantics are advisory-only, anyone can screw everything by writing without locking, so take care.
LWN: Btrfs apunta a su inclusión, por Jonathan Corbet.
Desde hoy hasta mediados de febrero de 2009, y sin ninguna razón en especial, he decidido publicar cada día uno de los relatos o poemas de mi libro Las Tijeras del Viajero (1996).
La forma más cómoda de leerlos es mediante un lector RSS. Están por todas partes: Mozilla Firefox, Google Reader ó KDE Akregator. Tan sólo hay que usar el siguiente URL:
http://triptico.com/?t=RSS;tag=las%20tijeras%20del%20viajero
Una amistosa introdución a la codificación de vídeo, parte 1: contenedores, por Mark Pilgrim.
Una amistosa introdución a la codificación de vídeo, parte 2: vídeo con pérdida, por Mark Pilgrim.
LWN: Btrfs, ¿incorporarlo al núcleo principal?, por Jake Edge.
He escrito el siguiente artículo: El algoritmo Diffie-Hellman, una breve descripción del mecanismo en el que se basa el cifrado de clave pública.