El virus de la antorcha

Recién me acaba de llegar otra vez una de esas cadenas pelotudas de “Urgente! no hagas [actividad informática habitual] es un virus!” […] “que Abre una antorcha olímpica que Quema Todo el disco duro C de la computadora” [bla blah…] que la cnn que mcafee no puede, etc.

Me encantaría saber qué clase de caca tienen en la cabeza, recibieron ese mismo mail para los juegos olímpicos, el mundial de fútbol, fin de año, Pascua y navidad. (Recibieron porque siempre me lo mandan a mi). Por Diox, no se dan cuenta del patrón?!

Lo mejor de todo es que termina diciendo “Es preferible Recibir 25 veces este correo que Recibir el virus y abrirlo..”. Alma de cántaro, que si recibo el virus me importa poco y nada (como si tener cientos de mails previniéndome fuera a cambiar algo). El de hoy debería ser medio chicato (aparte de capitalizar las palabras como le vino en gana), en el zoom normal entraban seis líneas de texto por pantalla. 25 veces tu vieja. Y dicho sea de paso se nota que no leen ni aunque se les fuera la vida en ello, será posible viejo que en todas las cadenas, estúpidas y no tanto, pongan como seis mails “fulano 1” <noreply@facebookmail.com> , “hijo de tendero 42” <noreply@facebookmail.com> … No te parece raro que tengan el mismo mail y diga noreply?

No se nota pero los quiero. A casi todos.

Dumpster diving 1

Es increíble la cantidad de cosas útiles que la gente tira. Hace unos días me encontré una lámpara fluorescente con tubo y todo. Estaba bastante sucia y tiene marcas de quemaduras, pero funciona! Debe haber sido cara en su momento, el balasto es italiano posta (MagneTek – Made in Italy)

Decadencia…

Mientras escribía lo anterior estaba en pata, short y con una quilmes rubia (una de las pocas bebidas que realmente me disgustan) tirado en una reposera de playa con la note comiendo un triple de miga. Supongo que será porque vine hecho pelota de la clase pero nunca creí que podía terminar así, otra que pepe argento.

Comenzaron las clases!!

Estoy recontra contento, hoy comenzamos con las clases de tango en la Casa de Cultura de Berisso; fueron diez personas, pagaron ocho. No es por hacer autobombo pero lo que más me gustó en comparación con otras es que logramos que todos salgan bailando con las herramientas mínimas como para mandarse a la milonga.

Regale a sus niños!!!

Hace un rato paveando entre las chorradas que caen en la carpeta de spam me llamó la atención este subject. Que loco, con lo bien que se pagan los niños sanos… (voz de Dolina?). Cual fue mi desilusión al ver su contenido “…cd educativos”. Parece que hay un personaje virtual llamado Pipo que les enseña desde reconocer formas hasta física de partículas.

Con ese nombre tampoco debe ser muy bueno que digamos, ni siquiera sabe hacer bien las cuentas, 4 discos por $60, 10 por $100 xD. Si le vas a dar algo a tu pibe comprale el libro “Alfie’s Home” que le va a enseñar un montón de valores y cosas útiles para que tenga calle desde chiquitín. Leete la review en Amazon (un poco sesgada) y si querés podés leerlo acá: http://www.b0g.org/wsnm/articles/Alfie’s+Home. Los comentarios en esta última página son geniales.

A esa edad me acuerdo que leía cosas como “Corazón” o “Tom Sawyer”, qué hubiera sido de mi con libros como ese. Moraleja? obvio, el mejor spam está en yahoo (o el Green Midget) pero si querés ser un impotente potente con una réplica de rolex quedate con google.

A lot like love.

Acá estan dando en el 13 “A lot like love” (creo que es la primera vez, el título en castellano es igual de horrible en cualquiera de sus variaciones). Me la había bajado en el 2006 después de verla en el 4 (tendrá un montón de defectos pero por lo menos las películas que pasan son bastante buenas y casi nunca las dan en los canales “grandes”. Y si te perdés algún fragmento en el mismo mes seguro seguro la pasan dos veces).

Tiene una banda sonora increíble, Aqualung, Hooverphonic, Eagle Eye Cherry…[Smash Mouth?]; por eso me la bajé en ese entonces. Después de haberla visto varias veces me doy cuenta que las situaciones se parecen bastante a mi vida sentimental, con la salvedad de que en mi caso siempre faltan cinco para el peso y termino mal. Y a pesar de ver mis errores reflejados ahí una y otra vez nunca aprendo.

En fin… si la peli te hace llorar es buena no?

Solving the *tex error “I can’t find file `pgflibrarytikzpositioning.code.tex”

Basically it means your PGF installation is waaay old. Like from 2007 if you run Ubuntu 8.04 as I happen to. If you want to find out what your version is compile this short tex file:

\listfiles 
\documentclass[]{article} 
\usepackage{tikz} 
%\usetikzlibrary{positioning} 
\begin{document} 
a 
\end{document}

(found in http://old.nabble.com/I-can’t-find-file-`pgflibrarytikzpositioning.code.tex’-td20634766.html)

After that grab a fresh copy from http://sourceforge.net/projects/pgf/. As root remove (or back up somewhere else) /usr/share/texmf/tex/context/pgf , /usr/share/texmf/tex/generic/pgf , /usr/share/texmf/tex/latex/pgf and /usr/share/texmf/tex/plain/pgf. Extract the new pgf and copy the corresponding folders to the same places, run (as root) mktexlsr and you are done.

Cheap logic analyzer.

Just a very simple analyzer based on this circuit http://www.akikorhonen.org/uploaded/2008/05/logic_analyzer_schematic.png

Added a jumper to use it as an output port. The centronics, flat cable and some other things came from and old Epson printer. It’s working relly nice using TFLA (‘The Fabulous Logic Analyzer’) as software backend, found at  http://tfla-01.berlios.de/

Look ma’ cardboard!

Logic analyzer

Logic analyzer

Logic analyzer

Logic analyzer

Milonga en BA

El otro martes acompañe a una amiga a la milonga Queer donde enseña Mariana Falcón. Esta vez fue en el Club Buenos Aires, un lugar bastante cálido en Perú al 500. Mariana no estaba pero la reemplazaba otra mujer que enseña muy pero muy bien a marcar. Conocí a ‘Agnes’ una sueca impresionante.

Milonga Queer en Peru al 500

Milonga Queer en Peru al 500

Milonga Queer en Peru al 500. Foto mia con una amiga

Milonga Queer en Peru al 500. Foto mia con una amiga

Using a cheap USB to Parallel adapter to controll stuff.

Whenever I have to control something I ssh into my desktop and work there, mostly because lately I turned a bit lazier (coding from the couch is really nice) and because I had to get rid of its screen for a while. Well, the hard disk is dying so I had to find a substitute till I buy a new one. Sometimes I don’t understand technology; that WD is at most three years old and smartd starts complaining. The Seagates in our router/print server/etc. have easily ten years spinning without a whine.

Enough ranting. Picked up a “Noganet” branded usb to parallel cable that was lurking in the basement. It appeared under Linux as /dev/usblp0 as expected (never saw one that really really implements a real parallel port). Trying to write to it resulted in a hang (the program was waiting for i/o) but pluggin a printer an cat’ing something resulted in a printed page. According to this page on BeyondLogic,

Centronics is an early standard for transferring data from a host to the printer. The majority of printers use this handshake. This handshake is normally implemented using a Standard Parallel Port under software control. Below is a simplified diagram of the `Centronics’ Protocol. […] Centronics Waveform Data is first applied on the Parallel Port pins 2 to 7. The host then checks to see if the printer is busy. i.e. the busy line should be low. The program then asserts the strobe, waits a minimum of 1uS, and then de-asserts the strobe. Data is normally read by the printer/peripheral on the rising edge of the strobe. The printer will indicate that it is busy processing data via the Busy line. Once the printer has accepted data, it will acknowledge the byte by a negative pulse about 5uS on the nAck line.
Quite often the host will ignore the nAck line to save time

So, I tied Busy(11) to ground and tried again. Success!!

From C everything is roses,

#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
/* not a single error check, will blow out very nice */
int main(int argc, char **argv)
{
    int fd = open("/dev/usblp0", O_WRONLY);
    char d = (char) atoi(argv[1]);
    write(fd, &d, 1);
    close(fd);
}

But not so with Python. I forgot to set the file to unbuffered, it wrote everything at once when exiting or flushing. The solution is to use something like

port = open('/dev/usblp0', 'wb', 0)

and you are all set to go.

It worked, somehow. The usb bus has a limit of 1000 packets per second, this means you can at most flip bits at that rate. It should work in other (faster) modes and allow me to read but haven’t figured yet how to do it, all I get now are non-working IOCTLS. Maybe the adapter is way cheaper than what I thought.