Miriam Ruiz
random thoughts on technology and life











{January 16, 2010}   Packaging openFrameworks for Ubuntu and Debian

It seems that I’m not blogging as often as I was some months ago. The main reason is microblogging, which is somehow quicker, even though briefer. It is also less informative, I guess, because 140 characters is a very limited length. Probably because of that, a friend of mine asked me to write a proper blog entry about this, and I think that he’s probably right.

openFrameworks is an open source toolkit, released under the MIT license, written in C++ and designed to assist the creative process by providing a simple and intuitive framework for experimentation. According to its authors, it was developed for folks using computers for creative, artistic expression, and who would like low level access to the data inside of media in order manipulate, analyze or explore. I attended a short course in openFrameworks some months ago, and decided that if I wanted to experiment with it, I should somehow structure the building process of the library a bit, remove the dependency on FMOD, which is not DFSG-free, even though that might require remove the whole audio subsystem, make it buildable without Code::Blocks, and hopefully build some more-or-less proper packages. I’ve also added some pkg-config files, so that it becomes easier to build projects based in openFrameworks (as easy as ‘g++ source.cpp -o test $(pkg-config openframeworks openframeworks-addons –cflags –libs)‘).

Even though the packages are still not as good as they should, they’re absolutely usable right now. I’ve uploaded them, as well as their dependencies, to my Ubuntu PPA (although I’m using those packages in my Debian), in case that someone is interested. I’ve also uploaded a couple of tiny examples (the second one downloaded from here) of openFrameworks.



{December 19, 2009}   Copyleft en imágenes

Diferencias entre no tener Copyleft (izquierda) y sí tenerlo (derecha):



Tipos de Copyleft:




{December 05, 2009}   La hipocresía de algunos/as artistas ( #manifiesto )

No hay mucho nuevo ya que escribir sobre el escándalo organizado por las pretensiones del Gobierno de imponernos una censura a la publicación en Internet sin el respaldo previo de un juez o jueza y la respuesta multitudinaria en forma de apoyo al manifiesto “En defensa de los derechos fundamentales en Internet”. Empiezan a aclararse ya algunas cosas, como la posibilidad de que todo esto esté relacionado de alguna forma con el poco transparente acuerdo ACTA (“Anti-Counterfeiting Trade Agreement”) que está intentando imponer USA a Europa, y que no quieren que sea sometido al escrutinio público europeo, porque sería rechazado por la ciudadanía democrática europea, y por los ISPs. O cómo, aunque la ministra de cultura esté teniendo ahora que soportar en solitario el chaparrón (ella se lo ha buscado), las órdenes, sin embargo, parecen provenir de más arriba, directamente desde el gabinete de Zapatero, de mano de José Enrique Serrano*. A nuestros políticos y políticas parece, de alguna forma, atraerles cada vez más la idea del despotismo ilustrado (“todo para el pueblo, pero sin el pueblo”), que la de la democracia (forma de gobierno en la que las decisiones colectivas son adoptadas por el pueblo mediante mecanismos de participación directa o indirecta que le confieren legitimidad a los y las representantes).

De lo que sí me gustaría hablar es de lo decepcionante que es la actitud de los “artistas” que están demandando esa reimposición de la censura y el desmantelamiento de las garantías que supone que los derechos garantizados por la Constitución solo puedan ser cercenados por un juez. Aún no he conseguido encontrar la lista completa de todas las personas firmantes del manifiesto que presentaron al ministro Sebastian solicitando estas medidas, pero sí que hay muchos nombres que han salido repetidamente en los medios. Es muy triste encontrar en esa lista a muchas personas que se han hecho famosas por defender las libertades civiles, y que ahora se quitan la careta, mostrando al mundo de forma abierta una notable hipocresía. ¿Quienes han firmado lo habrán hecho realmente con plena conciencia, o habrán sido las discográficas y los lobbies quienes les han forzado a hacerlo?
En la listas de nombres que están saliendo aparecen personas que, a estas alturas, no nos ofrecían ya ninguna confianza, porque ya se habían quitado la careta de alguna forma hace tiempo, pero aparecen otras que están resultando sorprendentes para mucha gente. La lista incluye nombres como Ana Belén y Victor Manuel, Luis Eduardo Aute, Miguel Bosé, Ana Torroja, Raphael, El Canto del Loco, La Oreja de Van Gogh o La Quinta Estación, pero también otros como Andrés Calamaro, Joaquín Sabina, Pedro Guerra, Chambao, Dover, Pereza, Estopa, Sidonie, Mägo de Oz, Celtas Cortos, Benito Kamelas, Poncho K, etc.
Lo que más duele es ver en ella a muchos y muchas artistas que han hecho fama vendiéndose como defensores de los derechos y las libertades de las personas liberales, como pseudo-hippies, idealistas… resulta muy decepcionante darse cuenta de que todo eso era mera fachada. Luego se extrañarán de que la gente sea una descreída, que estemos enmedio de una enorme crisis de valores y que nos parezcan todos iguales.
Como nota positiva, hay grupos que no he visto en ninguna de las listas, como Amaral, Alaska, Hombres G, …

De lo que sí me gustaría hablar es de lo decepcionante que es la actitud de las y los “artistas” que están demandando esa reimposición de la censura y el desmantelamiento de las garantías que supone que los derechos garantizados por la Constitución solo puedan ser cercenados por un juez. Aún no he conseguido encontrar la lista completa de todas las personas firmantes del ya famoso manifiesto del 20 de octubre, que presentaron al ministro Sebastian solicitando estas medidas, pero sí que hay muchos nombres que han salido repetidamente en los medios. Es muy triste encontrar en esa lista a muchas personas que se han hecho famosas por defender las libertades civiles, y que ahora se quitan la careta, mostrando al mundo de forma abierta una notable hipocresía. ¿Quienes han firmado lo habrán hecho realmente con plena conciencia, o habrán sido las discográficas y los lobbies quienes les han forzado a hacerlo?

En las listas de nombres que están saliendo aparecen personas que, a estas alturas, no nos ofrecían ya ninguna confianza, porque ya se habían quitado la careta de alguna forma hace tiempo, pero aparecen otras que están resultando sorprendentes para mucha gente. La lista incluye nombres como Ana Belén y Victor Manuel, Luis Eduardo Aute, Miguel Bosé, Ana Torroja, Raphael, El Canto del Loco, La Oreja de Van Gogh, Loquillo o La Quinta Estación, pero también otros como Andrés Calamaro, Joaquín Sabina, Pedro Guerra, Chambao, Dover, Pereza, Estopa, Marlango, Sidonie, Mägo de Oz, Celtas Cortos, Benito Kamelas, Poncho K, etc.

Lo que más duele es ver en ella a muchos y muchas artistas que han hecho fama vendiéndose como defensores de los derechos y las libertades de las personas liberales, como pseudo-hippies, idealistas… resulta muy decepcionante darse cuenta de que todo eso era mera fachada. Luego se extrañarán de que la gente sea una descreída, que estemos enmedio de una enorme crisis de valores y que nos parezcan todos iguales.

Como nota positiva, hay grupos que no he visto en ninguna de las listas, como Amaral, Alaska, Hombres G, … . Por otra parte, hay artistas como Carmen París o Conchita que se han distanciado del discurso “antipiratería” de las discográficas.

* Nota: Ya que la página de la Wikipedia sobre este hombre ha sido eliminada: José Enrique Serrano Martínez (Madrid, 1949): Nieto del abogado y político Francisco Martínez García, es un político español, abogado y profesor de la Facultad de Derecho en la Universidad Complutense de Madrid (Universidad de la que ha sido Secretario General). En 1987 fue Director general de Personal del Ministerio de Defensa, cuando su titular era Narcís Serra. En 1991, al ser nombrado vicepresidente del Gobierno Serra, pasa al entorno de la Presidencia. Fue subdirector del Gabinete de Felipe González en 1993 y Director de Gabinete en 1995. Entre 1997 y 2000 fue Director del Gabinete del Secretario General del Partido Socialista Obrero Español. Con la vuelta del PSOE al poder vuelve a funciones similares, al ser Jefe del Gabinete del Presidente del Gobierno de España, José Luis Rodríguez Zapatero, desde 2004.


{September 04, 2009}   Por qué hay que ir a velocidad moderada en zonas urbanas

Las carreteras nacionales son terribles, vas tranquilamente a una velocidad razonable y de repente, te encuentras con un pueblo y tienes que reducir a 50 Km/h, 40 Km/h o incluso 30 Km/h a veces. Al entrar, el cuerpo nos pide mantener la velocidad, y habitualmente lo que nos mueve a no hacerlo es la posibilidad de encontrarnos con radares, o con la policía misma, y que se nos caiga el pelo o, como poco, nos llevemos a casa una buena multa. Somos así de altruistas.

El otro día, leyendo una revista sobre seguridad (sí, yo leo esas cosas tan raras a veces), me encontré con un gráfico que, de repente, me hizo ver de golpe el por qué de esas velocidades tan incómodas. Y, lo peor, es que tienen razón.

Los resultados de los tres estudios señalados: Teichgräber (1983), Ashton (1982), y Waltz et al (1983), muestran que el riesgo de lesiones fatales oscila entre el 5% y el 15% a 30 Km/s, entre el 40% y el 80% a 50 Km/h y por encima del 95% a más de 70 Km/h. Además, otro estudio: Nilsson (2000), muestra que la influencia de la velocidad es determinante en los efectos de los accidentes, de tal forma que el número de accidentes que ocasionan daños personales es proporcional al cuadrado del incremento de la velocidad, y el número de accidentes es proporcional a la cuarta potencia de dicho incremento.

Referencias:

Enlaces:



{September 03, 2009}   New cutie in Debian: Zaz

Zaz (“Zaz ain’t Z***”) is nice action puzzle game, similar to Zuma, in which you have to get rid of all the balls that roll around the screen through some given paths by rearranging their order in the chain. The balls explode and dissapear when three or more of the same color get in contact. The whole game is controlled through the mouse device.


 

Through the game  some special balls appear, with a tiny symbol over them, that makes your life easier by doing thinks like make all the balls step back a bit, making them move more slowly, stopping them for a while or giving you a ray to help you point your device and get and drop the balls where you want. You lose a life when the balls reach their destination hole, so be quick!

The game currently has 10 different levels, but will probably have more in the future, and needs a 3D accelerator for decent gameplay. Zaz has just entered Debian repositories. If you like arcade puzzles, you should definitely give it a try. If you use Ubuntu Jaunty, you can also find it in my PPA.

The original game included CC-by-sa-nc 3.0 music from Nine Inch Nails, which had to be removed for the game to go into Debian Main.

The game has already been translated to Polish and Spanish, probably other translations will follow in the future, but it is not really text-based at all, so that shouldn’t really be a problem for anyone.



{September 01, 2009}   Adding a new HTML tag to Mozilla: mark

Starting from the patch included in bug report #485377 (” Implement HTML5’s <mark> tag”), it is easy to see the steps for adding a new tag to Mozilla. In this case the new HTML 5 tag mark, used for indicating text as marked or highlighted for reference purposes, due to its relevance in another context.

Lets start by adding the tag to the tag dictionary:

--- src.orig/content/base/src/nsGkAtomList.h
+++ src/content/base/src/nsGkAtomList.h
@@ -518,6 +518,7 @@
 GK_ATOM(manifest, "manifest")
 GK_ATOM(marginheight, "marginheight")
 GK_ATOM(marginwidth, "marginwidth")
+GK_ATOM(mark, "mark")
 GK_ATOM(marquee, "marquee")
 GK_ATOM(match, "match")
 GK_ATOM(max, "max")
--- src.orig/parser/htmlparser/public/nsHTMLTagList.h
+++ src/parser/htmlparser/public/nsHTMLTagList.h
@@ -128,6 +128,7 @@
 HTML_TAG(link, Link)
 HTML_TAG(listing, Span)
 HTML_TAG(map, Map)
+HTML_TAG(mark, Span)
 HTML_TAG(marquee, Div)
 HTML_TAG(menu, Shared)
 HTML_TAG(meta, Meta)
--- src.orig/parser/htmlparser/src/nsElementTable.cpp
+++ src/parser/htmlparser/src/nsElementTable.cpp
@@ -767,6 +767,15 @@
 /*special parents,kids*/            0,&gMapKids,
 },
 {
+    /*tag*/                             eHTMLTag_mark,
+    /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
+    /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
+    /*autoclose starttags and endtags*/ 0,0,0,0,
+    /*parent,incl,exclgroups*/          kSpecial, (kInlineEntity|kSelf|kFlowEntity), kNone,
+    /*special props, prop-range*/       0,kDefaultPropRange,
+    /*special parents,kids*/            0,0,
+  },
+  {
 /*tag*/                             eHTMLTag_marquee,
 /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
 /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
--- src.orig/parser/htmlparser/src/nsHTMLTags.cpp
+++ src/parser/htmlparser/src/nsHTMLTags.cpp
@@ -175,6 +175,8 @@
 {'l', 'i', 's', 't', 'i', 'n', 'g', '\0'};
 static const PRUnichar sHTMLTagUnicodeName_map[] =
 {'m', 'a', 'p', '\0'};
+static const PRUnichar sHTMLTagUnicodeName_mark[] =
+  {'m', 'a', 'r', 'k', '\0'};
 static const PRUnichar sHTMLTagUnicodeName_marquee[] =
 {'m', 'a', 'r', 'q', 'u', 'e', 'e', '\0'};
 static const PRUnichar sHTMLTagUnicodeName_menu[] =

Now for the second part, adding the style that the tag will have by default:

--- src.orig/dist/firefox/res/html.css
+++ src/dist/firefox/res/html.css
@@ -61,7 +61,7 @@
 * inherited value) to the transformed element." */

 address, blockquote, body, caption, center, col, colgroup, dd, dir, div, dl, dt,
-fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, isindex, li, listing, map, 
+fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, isindex, li, listing, map, mark,
 marquee, menu, noframes, ol, p, plaintext, pre, table, tbody, td, tfoot, th,
 thead, tr, ul, xmp {
 unicode-bidi: embed;
@@ -335,6 +335,11 @@
 white-space: nowrap;
 }

+mark {
+  background-color: #ff9;
+  font-weight: bolder;
+}
+
 /* titles */
 abbr[title], acronym[title] {
 border-bottom: dotted 1px;
@@ -488,8 +493,8 @@
 center:focus, cite:focus, code:focus, col:focus, colgroup:focus, dd:focus,
 del:focus, dfn:focus, dir:focus, div:focus, dl:focus, dt:focus, em:focus,
 fieldset:focus, font:focus, form:focus, h1:focus, h2:focus, h3:focus, h4:focus,
-h5:focus, h6:focus, hr:focus, i:focus, img:focus, ins:focus,
-kbd:focus, label:focus, legend:focus, li:focus, link:focus, menu:focus,
+h5:focus, h6:focus, hr:focus, i:focus, img:focus, ins:focus, kbd:focus,
+label:focus, legend:focus, li:focus, link:focus, mark:focus, menu:focus,
 object:focus, ol:focus, p:focus, pre:focus, q:focus, s:focus, samp:focus,
 small:focus, span:focus, strike:focus, strong:focus, sub:focus, sup:focus,
 table:focus, tbody:focus, td:focus, tfoot:focus, th:focus, thead:focus,
--- src.orig/layout/style/html.css
+++ src/layout/style/html.css
@@ -61,7 +61,7 @@
 * inherited value) to the transformed element." */

 address, blockquote, body, caption, center, col, colgroup, dd, dir, div, dl, dt,
-fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, isindex, li, listing, map,
+fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, isindex, li, listing, map, mark,
 marquee, menu, noframes, ol, p, plaintext, pre, table, tbody, td, tfoot, th,
 thead, tr, ul, xmp {
 unicode-bidi: embed;
@@ -335,6 +335,11 @@
 white-space: nowrap;
 }

+mark {
+  background-color: #ff9;
+  font-weight: bolder;
+}
+
 /* titles */
 abbr[title], acronym[title] {
 border-bottom: dotted 1px;
@@ -488,8 +493,8 @@
 center:focus, cite:focus, code:focus, col:focus, colgroup:focus, dd:focus,
 del:focus, dfn:focus, dir:focus, div:focus, dl:focus, dt:focus, em:focus,
 fieldset:focus, font:focus, form:focus, h1:focus, h2:focus, h3:focus, h4:focus,
-h5:focus, h6:focus, hr:focus, i:focus, img:focus, ins:focus,
-kbd:focus, label:focus, legend:focus, li:focus, link:focus, menu:focus,
+h5:focus, h6:focus, hr:focus, i:focus, img:focus, ins:focus, kbd:focus,
+label:focus, legend:focus, li:focus, link:focus, mark:focus, menu:focus,
 object:focus, ol:focus, p:focus, pre:focus, q:focus, s:focus, samp:focus,
 small:focus, span:focus, strike:focus, strong:focus, sub:focus, sup:focus,
 table:focus, tbody:focus, td:focus, tfoot:focus, th:focus, thead:focus,

There it is. The next part should be to find out how to take that tag into account, probably modifying toolkit/content/widgets/findbar.xml, so that when you search for a text, you can get the information from it, but that’s something that should be carefully thought.



{September 01, 2009}   Compiling Firefox from scratch (in Debian)

After Madrid Mozilla Technologies Course (MMTC) in July, which was great, and apart from finding out that the people involved in the development of Mozilla are really lovely, I also found out that the technologies they support are very powerful and solid. As I learn more about Mozilla code, I plan to keep posting stuff here. Please, don’t be too hard with me if I say any stupid or obvious thing, keep in mind that I’m just learning for the moment. Of course, comments and feedback is totally welcome, especially if I can learn from it. You can also go to the Mozilla/URJC Planet to find more about the people involved in the course.

Lets start by downloading the latest source code. We shall use Mercurial for that. We can get the latest source code by doing

hg clone http://hg.mozilla.org/mozilla-central/ src

but, as it is explained here, you might want to check the status of the code regarding the automatic tests beforehand. To avoid poisoning my system with the tests I’ll do, I’m gonna use “/opt/mozilla” as my working directory. I might have used something under “/usr/local/” instead, it doesn’t really matter.

$ sudo mkdir /opt/mozilla
$ sudo chown miriam:miriam /opt/mozilla
$ cd /opt/mozilla
$ sudo aptitude install mercurial
$ hg clone http://hg.mozilla.org/mozilla-central/ src

OK, it will take a while to fetch the whole code tree, so take it easy.

Now, lets install the dependencies. According to the build-dependencies of xulrunner-1.9.1, these should be:

$ sudo aptitude install build-essential automake autoconf2.13 libtool \
libx11-dev libxt-dev libidl-dev libgtk2.0-dev libstartup-notification0-dev \
libgnomevfs2-dev libgnome2-dev libgnomeui-dev libcairo2-dev libpng12-dev \
libjpeg62-dev zlib1g-dev libbz2-dev libreadline5-dev libkrb5-dev python-dev \
libnspr4-dev libnss3-dev libhunspell-dev libdbus-glib-1-dev libsqlite3-dev \
liblcms1-dev libasound2-dev zip xvfb xfonts-base xauth java-gcj-compat-dev

Not bad, isn’t it? :)

The next step will be to set some sane build configuration options from which we can start working. We can store them in a file called .mozconfig inside the src directory. You can have a look at mine if you want.

Last, but not least, you might have a problem if the libpng in your system does not support the APNG format. You can choose between using the libpng that comes with Mozilla instead of the system one, or you can apply a patch to be able to compile it even without APNG support. Your choice.

Now, we’re really close now. Lets build the program:

$ export JAVA_HOME=/usr/lib/jvm/java-gcj
$ autoreconf --force
$ ./configure
$ make
$ make install

According to the parameter “–prefix=/opt/mozilla” in .mozconfig, the program will be installed in that directory. As we already have assigned it to our current user, there’s no need to be root or use sudo for that.

You can run it with “/opt/mozilla/bin/firefox”

OK, we now have our building system ready for modifying it and see what happens :P



{August 22, 2009}   Masa crítica en colectivos minoritarios

Hace un par de años conocí a través de unos amigos (gracias, Javier y Helen) el concepto de masa crítica en el análisis de grupos minoritarios. Éste implica el número mínimo de personas que tiene que haber en un grupo para constituir una parte integral del mismo y poder tener alguna influencia sobre él. Para ello tienen que ser también capaces, por tanto, de mantener al menos esa proporción en el tiempo, sin que exista la necesidad de realizar una estrategia basada en acciones afirmativas. El concepto de masa crítica se puede aplicar a mujeres u hombres que trabajan en áreas no tradicionales para su género, en minorías raciales o religiosas, grupos minoritarios en parlamentos, y en otros muchos.

La escala Byrne de no tradicionalismo (1993) sugiere que es necesario superar la barrera del 30% del grupo por parte del grupo minoritario para que sean consideradas o considerados “normales” dentro del mismo. Aquellas personas que lleven bien el ser vistas como “no normales”, pueden participar en una actividad en la que supongan menos de un 15%, mientras que sólo quienes no tengan problema en ser considerados “bichos raros” participarán en contextos donde estén por debajo del 8%. Cuando se anda sobre estas cantidades, ni siquiera se puede hablar ya de que las personas puedan servir como modelos de referencia. En el Software Libre, las desarrolladoras -hasta donde yo sé- seguimos estando en proporciones inferiores al 2%.

Porcentaje Cómo es considerado el grupo minoritario
Por encima del 30% La disciplina es agnóstica respecto al género, y se considera normal para cualquiera de ellos.
Entre el 15% y el 30% Se considera una disciplina atípica para el colectivo en minoría.
Entre el 8% y el 15% Se ve como algo no normal para el grupo minoritario
Hasta el 8% Se considera a las personas del colectivo minoritario como algo extraordinario y totalmente excepcional, y no cuentan como modelo representativo para conseguir que se incorporen más personas del mismo.


{August 20, 2009}   How to break a big patch in its individual chunks
#!/bin/sh

if [ "$1" == "" ]; then
    FILE="/dev/stdin"
else
    FILE="$1"
    # make sure file exists and is readable
    if [ ! -f $FILE ]; then
        echo "$FILE : does not exists"
        exit 1
    elif [ ! -r $FILE ]; then
        echo "$FILE: is not readable"
        exit 2
    fi
fi

num=0;
mkdir -p chunks

# Set loop separator to end of line
BAKIFS=$IFS
IFS=$(echo -en "\n\b")

cat "$FILE" | while read -r l; do

    processed=0

    if echo "$l" | grep -e "^--- " 2>&1 >/dev/null ; then
        minus="$l"
        minus_file=`echo "$l" | sed -r -e 's|---\ [^/]*/||g'`
        echo "MINUS: $minus_file"
        processed=1
    fi

    if echo "$l" | grep -e "^+++ " 2>&1 >/dev/null ; then
        plus="$l"
        plus_file=`echo "$l" | sed -r -e 's|\+\+\+\ [^/]*/||g'`
        echo "PLUS: $plus_file"
        processed=1
    fi

    if echo "$l" | grep -e "^@@ " 2>&1 >/dev/null ; then
        test "$minus_file" != "$plus_file" && { echo "ERROR!"; IFS=$BAKIFS; exit 1; }
        num=$(($num+1))
        fname=`printf "chunk_%03d.patch" $num`
        echo "PATCH: $fname"
        echo "$minus" > chunks/$fname
        echo "$plus" >> chunks/$fname
        echo "$l" >> chunks/$fname
        processed=1
    fi

    if [ $processed -ne 1 ]; then
        test "$minus_file" != "$plus_file" && { echo "ERROR!"; IFS=$BAKIFS; exit 1; }
        echo "$l" >> chunks/$fname
    fi

done

# restore $IFS which was used to determine what the field separators are
IFS=$BAKIFS
exit 0


{August 17, 2009}   Some useful (or not) CLI tools for Debian administration

Top-like tools:

Statistics reports:

List stuff:

Hardware identification:

System management:

get/set program io scheduling class and priority



about

This is a personal webpage that belongs to Miriam Ruiz.
If you want to contact her, you can do at:
webmistress(at)miriamruiz(dot)es.

pages
categories
archive
twitter
calendar
March 2010
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031EC
upcoming events
credits
La Lista de Sinde
en isoHunt