Luca's meaningless thoughts  

F.A.T.

by Leandro Lucarella on 2012- 10- 15 10:44 (updated on 2012- 10- 15 22:40)
tagged activism, art, cc, en, f.a.t., floss, hacking, politics, share, video, youtube - with 0 comment(s)

fffff.at

Reminds me a little of The Yes Men.

Update

You might want to take a look at the other videos from the PBS Off Book series if you liked this one.

Translation of e-mails using Mutt

by Leandro Lucarella on 2012- 09- 24 12:45 (updated on 2012- 10- 02 12:58)
tagged e-mail, en, floss, gmail, google translate, mutt, python, release, script, software, translate - with 0 comment(s)

Update

New translation script here, see the bottom of the post for a description of the changes.

I don't like to trust my important data to big companies like Google. That's why even when I have a GMail, I don't use it as my main account. I'm also a little old fashion for some things, and I like to use Mutt to check my e-mail.

But GMail have a very useful feature, at least it became very useful since I moved to a country which language I don't understand very well yet, that's not available in Mutt: translation.

But that's the good thing about free software and console programs, they are usually easy to hack to get whatever you're missing, so that's what I did.

The immediate solution in my mind was: download some program that uses Google Translate to translate stuff, and pipe messages through it using a macro. Simple, right? No. At least I couldn't find any script to do the translation, because Google Translate API is now paid.

So I tried to look for alternatives, first for some translation program that worked locally, but at least in Ubuntu's repositories I couldn't find anything. Then for online services alternatives, but nothing particularly useful either. So I finally found a guy that, doing some Firebuging, found how to use the free Google translate service. Using that example, I put together a 100 SLOC nice general Python script that you can use to translate stuff, piping them through it. Here is a trivial demonstration of the script (gt, short for Google Translate... Brilliant!):

$ echo hola mundo | gt
hello world
$ echo hallo Welt | gt --to fr
Bonjour tout le monde

And here is the output of gt --help to get a better impression on the script's capabilities:

usage: gt [-h] [--from LANG] [--to LANG] [--input-file FILE]
          [--output-file FILE] [--input-encoding ENC] [--output-encoding ENC]

Translate text using Google Translate.

optional arguments:
  -h, --help            show this help message and exit
  --from LANG, -f LANG  Translate from LANG language (e.g. en, de, es,
                        default: auto)
  --to LANG, -t LANG    Translate to LANG language (e.g. en, de, es, default:
                        en)
  --input-file FILE, -i FILE
                        Get text to translate from FILE instead of stdin
  --output-file FILE, -o FILE
                        Output translated text to FILE instead of stdout
  --input-encoding ENC, -I ENC
                        Use ENC caracter encoding to read the input (default:
                        get from locale)
  --output-encoding ENC, -O ENC
                        Use ENC caracter encoding to write the output
                        (default: get from locale)

You can download the script here, but be warned, I only tested it with Python 3.2. It's almost certain that it won't work with Python < 3.0, and there is a chance it won't work with Python 3.1 either. Please report success or failure, and patches to make it work with older Python versions are always welcome.

Ideally you shouldn't abuse Google's service through this script, if you need to translate massive texts every 50ms just pay for the service. For me it doesn't make any sense to do so, because I'm not using the service differently, when I didn't have the script I just copy&pasted the text to translate to the web. Another drawback of using the script is I couldn't find any way to make it work using HTTPS, so you shouldn't translate sensitive data (you shouldn't do so using the web either, because AFAIK it travels as plain text too).

Anyway, the final step was just to connect Mutt with the script. The solution I found is not ideal, but works most of the time. Just add these macros to your muttrc:

macro index,pager <Esc>t "v/plain\n|gt|less\n" "Translate the first plain text part to English"
macro attach <Esc>t "|gt|less\n" "Translate to English"

Now using Esc t in the index or pager view, you'll see the first plain text part of the message translated from an auto-detected language to English in the default encoding. In the attachments view, Esc t will pipe the current part instead. One thing I don't know how to do (or if it's even possible) is to get the encoding of the part being piped to let gt know. For now I have to make the pipe manually for parts that are not in UTF-8 to call gt with the right encoding options. The results are piped through less for convenience. Of course you can write your own macros to translate to another language other than English or use a different default encoding. For example, to translate to Spanish using ISO-8859-1 encoding, just replace the macro with this one:

macro index,pager <Esc>t "v/plain\n|gt -tes -Iiso-8859-1|less\n" "Translate the first plain text part to Spanish"

Well, that's it! I hope is as useful to you as is being to me ;-)

Update

Since picking the right encoding for the e-mail started to be a real PITA, I decided to improve the script to auto-detect the encoding, or to be more specific, to try several popular encodings.

So, here is the help message for the new version of the script:

usage: gt [-h] [--from LANG] [--to LANG] [--input-file FILE]
          [--output-file FILE] [--input-encoding ENC] [--output-encoding ENC]

Translate text using Google Translate.

optional arguments:
  -h, --help            show this help message and exit
  --from LANG, -f LANG  Translate from LANG language (e.g. en, de, es,
                        default: auto)
  --to LANG, -t LANG    Translate to LANG language (e.g. en, de, es, default:
                        en)
  --input-file FILE, -i FILE
                        Get text to translate from FILE instead of stdin
  --output-file FILE, -o FILE
                        Output translated text to FILE instead of stdout
  --input-encoding ENC, -I ENC
                        Use ENC caracter encoding to read the input, can be a
                        comma separated list of encodings to try, LOCALE being
                        a special value for the user's locale-specified
                        preferred encoding (default: LOCALE,utf-8,iso-8859-15)
  --output-encoding ENC, -O ENC
                        Use ENC caracter encoding to write the output
                        (default: LOCALE)

So now by default your locale's encoding, utf-8 and iso-8859-15 are tried by default (in that order). These are the defaults that makes more sense to me, you can change the default for the ones that makes sense to you by changing the script or by using -I option in your macro definition, for example:

macro index,pager <Esc>t "v/plain\n|gt -IMS-GREEK,IBM-1148,UTF-16BE|less\n"

Weird choice of defaults indeed :P

Release: Status Area Display Blanking Applet 1.0 for Maemo

by Leandro Lucarella on 2012- 08- 05 12:54 (updated on 2012- 08- 05 12:54)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

Finally 1.0 is here, and in Extras-devel! The only important change since last release is a bug fix that prevented display blanking inhibition from properly work in devices configured with a display blanking timeout of less than 30 seconds (thanks cobalt1 for the bug report).

For more information and screenshots, you can visit the website.

You can download this release (binary package and sources) from here:

But now you just might want to simply install it using the application manager.

You can also get the source from the git repository:

https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.9 (beta) for Maemo

by Leandro Lucarella on 2012- 07- 30 22:35 (updated on 2012- 07- 30 22:35)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

Final beta release for the Status Area Display Blanking Applet. Changes since last release:

  • Show a status icon when display blanking is inhibited.
  • Improve package description and add icon for the Application Manager.
  • Add a extended description for display blanking modes.
  • Update translation files.
  • Code cleanup.

Also now the applet have a small home page and upload to Extras is on the way!

This is how this new version looks like:

/proj/sadba/files/0.9/screenshot-1.mini.png /proj/sadba/files/0.9/screenshot-2.mini.png /proj/sadba/files/0.9/screenshot-3.mini.png /proj/sadba/files/0.9/screenshot-4.mini.png /proj/sadba/files/0.9/screenshot-5.mini.png

You can download this 0.9 beta release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.9/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.5 for Maemo

by Leandro Lucarella on 2012- 07- 29 18:55 (updated on 2012- 07- 29 18:55)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

New pre-release for the Status Area Display Blanking Applet. New timed inhibition button that inhibit display blanking for an user-defined amount of time. Also there's been some code cleanup since last release.

/proj/sadba/files/0.5/screenshot-1.mini.png /proj/sadba/files/0.5/screenshot-2.mini.png /proj/sadba/files/0.5/screenshot-3.mini.png /proj/sadba/files/0.5/screenshot-4.mini.png

You can download this 0.5 pre-release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.5/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.4 for Maemo

by Leandro Lucarella on 2012- 07- 27 18:12 (updated on 2012- 07- 27 18:12)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

New pre-release of my first Maemo application: The Status Area Display Blanking Applet. Now you inhibit display blanking without changing the display blanking mode. The GUI is a little rough compared with the previous version but it works. :)

/proj/sadba/files/0.4/screenshot-1.mini.png /proj/sadba/files/0.4/screenshot-2.mini.png

You can download this 0.4 pre-release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.4/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.3 for Maemo

by Leandro Lucarella on 2012- 07- 26 10:51 (updated on 2012- 07- 27 18:13)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

New pre-release of my first Maemo application: The Status Area Display Blanking Applet. Now you can pick whatever blanking mode you want instead of blindly cycling through all available modes, as it was in the previous version.

/proj/sadba/files/0.3/screenshot-1.mini.jpg /proj/sadba/files/0.3/screenshot-2.mini.png

You can download this 0.3 pre-release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.3/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.2 for Maemo

by Leandro Lucarella on 2012- 07- 23 09:56 (updated on 2012- 07- 23 09:56)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

Second pre-release of my first Maemo application: The Status Area Display Blanking Applet. No big changes since the last release just code cleanup and a bugfix or new features (depends on how you see it). Now the applet monitors changes on the current configuration, so if you change the display blanking mode from settings (or by any other means), it will be updated in the applet too.

You can download this 0.2 pre-release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.2/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Please feel free to leave your comments and suggestions here or in the Maemo Talk Thread..

Release: Status Area Display Blanking Applet 0.1 for Maemo

by Leandro Lucarella on 2012- 07- 15 20:09 (updated on 2012- 07- 15 20:09)
tagged en, floss, maemo, n900, release, sadba, software, status area display blanking applet - with 0 comment(s)

Hi, I just wanted to announce the pre-release of my first Maemo "application". The Status Area Display Blanking Applet let you easily change the display blanking mode right from the status menu, without having to go through the settings.

This is specially useful if you have a short blanking time when you use applications that you want to look at for a long time without interacting with the phone and don't inhibit display blanking by themselves (for example a web browser, image viewer or some GPS applications).

You can download this 0.1 pre-release (binary package and sources) from here: https://llucax.com.nyud.net/proj/sadba/files/0.1/

You can also get the source from the git repository: https://git.llucax.com/w/software/sadba.git

Here are some screenshots (the application is highlighted so you can spot it more easily :) ):

/proj/sadba/files/0.1/screenshot-1.mini.jpg /proj/sadba/files/0.1/screenshot-2.mini.jpg

Please feel free to leave your comments and suggestions.

I'll upload the package to extras-devel when I have some time to learn the procedure.

Subtítulos para todos (y todas)

by Leandro Lucarella on 2012- 07- 14 18:37 (updated on 2012- 07- 14 18:37)
tagged es, floss, release, software, subdivx, subdivxget, subtitle, subtítulos - with 0 comment(s)

¡Viva Perón, carajo!

Podrido de buscar subtítulos a mano en subdivx.com, que es una paja enorme por la interfaz bastaaante pedorra, decidí, hace mucho tiempo, hacer un pequeño script para hacer el trabajo sucio por mí. Como muchas veces pasa, esa mugre fue creciendo hasta convertirse en algo relativamente decente, así que decidí publicarlo.

Si bien no estoy tan orgulloso de él como para hacer un release serio, subí el código a un repo git que pueden bajar, mejorar y mandar parches.

También pueden bajar el script directamente y usarlo (chmod +x de por medio). Está probado con Python 2.7 y 3.2.

Acá un screenshot del usage, que es la única documentación que existe sobre el script:

Usage: subdivxget [OPTIONS] QUERY [FILTER ...]

Download subtitles from subdivx.com searching the string QUERY. If FILTERs
are specified, only subtitles that matches all those filters are downloaded.
Filters have the format "X:fitler", where X is a field specification:
t=titulo, d=desc, a=autor, f=formato, c=comentarios, C=cds, F=fecha and
D=downloads. filter is a string that should be found on that field (case
insensitive). If the format specifier is not known (or there isn't one) the
filter string is looked in all the fields.

Options:
  -h, --help       show this help message and exit
  -l, --list-only  Don't download the subtitles, just list them
  -q, --quiet      Don't print progress messages

Ah, sí, me quedó mezcla de inglés y castellano, es que estoy acostumbrado a codear en inglés, pero dado que subdivx AFAIK sólo tiene subtítulos en castellano se complica.

Espero que a alguien le sea útil.

More adventures with the N900

by Leandro Lucarella on 2011- 12- 18 19:30 (updated on 2011- 12- 18 19:30)
tagged en, fix, floss, hardware, linux, maemo, n900, nokia, notification, skype, software, sound - with 0 comment(s)

OK, after I recovered my phone without needing to reflash once, I was even much closer to do it again because of a new problem.

After missing an appointment and arriving at work about 3 hours late, I realized my phone stopped reproducing sound and vibrating when an alarm was fired. At first I thought I put the alarm incorrectly but then I verified that the alarm was not working. I still got a popup with the alarm message, but no sound or vibration.

So... Time to debug the problem. After searching a lot, I couldn't find anybody with my same problem, I found similar, but not the same, so I decided to report a bug. I got a very fast but useless response. Great!

Making long story short, I finally found some IRC channels and mailing lists where I could find a more opensourceish support that the one provided in the forums and bugzilla. So I'm happy I finally found a place where you can talk to actual developers.

I commented my problem and just after a very trivial but extremely useful suggestion (installing syslogd), I could trace the origin or the problem and fix it (I just love you strace!).

I also had another problem, suddenly the skype calls stopped working. Again the syslog helped a lot. Unfortunately I didn't save the exact syslog error message, but it was something like:

GStreamer - Could not convert static caps "!`phmcadion/x-rtp,
media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)[ 1,
2147483647 ], encoding-name=(string)MP4V-ES"

As the MIME TYPE looked like garbage, I just grep(1)ed the filesystem searching for that string, and I found some binary file at /home/user/.gstreamer-0.10/registry.arm.bin. I backed up the file, remove it, and everything started working again (the file was recreated but with a very different content).

I have no idea how the symlink or the gstreamer file got broken, except maybe because of the unexpected reboot because of the broken batterypatch, but still, is really strange.

Anyway... Lessons learned:

  • Maemo (Nokia) bugzilla is useless for getting help
  • Install syslogd to debug Nokia N900 problems
  • The maemo developers mailing list is your friend

Conclusion: Reflash my ass!

How to rescue your Nokia N900 without reflashing

by Leandro Lucarella on 2011- 12- 11 16:40 (updated on 2011- 12- 11 16:40)
tagged en, floss, hardware, initrd, linux, maemo, n900, nokia, rescue, software - with 0 comment(s)

I bought a Nokia N900 recently, a great toy if you like to have a phone with a Linux distribution that uses dpkg as package manager :)

Of course you can use it as an end user, and never find out, but as the geek I am, I had to hack it, and use the devel package repositories. Of course, with that comes the problems (and the fun! :D).

The last update of the batterypatch package came with a weird feature. The device rebooted itself each time it starts, leaving it in a restart loop that rendered the device unusable.

Searching for valuable information was not easy (thanks forums! You SUCK at organizing information... I miss mailing lists).

Anyway, I hope I can save some work to someone if you get in a similar situation, so you don't have to waste ours searching the Maemo Forums.

Nokia N900

First you will need a tool to flash the phone (it can do other things besides flashing it, I used the maemo_flasher-3.5_2.5.2.2_i386.deb file). You can also check some instructions on how to load a (very) basic rescue image (from Meego). The good thing is this image is an initrd that's loaded in MEMORY, so you don't loose anything if you tried, the device goes to it's previous state (broken in my case :P) after a reboot.

What this image can do is put the device in USB mass storage mode (the embedded MMC -eMMC- and the external MMC). I've done this to backup my eMMC data, which holds the MyDocs vfat partition and the 2 GiB ext3 partition used to install optional software. You can also put the device in USB networking mode, you can get a shell console (and reboot/power off the device), but I found that pretty useless (because you don't have any useful tools, the backlit is not turned on, so is really hard to see anything, and because the kayboard doesn't have the function key mapped, so you can't even write a "/").

The bad thing about this image, is you can't access to the root filesystem (wich is stored in another NAND 256MiB memory). I wanted to access it for 2 reasons. First, I wanted to edit some files that the batterypatch program created to see if that fixed the rebooting problem. And if now, I wanted to make a backup of the rootfs so I didn't loose most of my customizations and installed software.

I first found that a way to access the rootfs was to install Meego in a uSD memory, but for that I needed a 4GiB uSD. Also it looked like too much work, it has to be something battery and easier to just mount the rootfs and play around.

And I finally found it. It was the hardest thing to found, that's why I not only passing you the original link, I'm also hosting my own copy because I have the feeling it can disappear any time! :P

This image let's you do all the same the other image can, but it turns on the backlit, it has better support for the keyboard (you can type a "/") and it can mount the UBI root filesystem. Even more, it comes with a telnet daemon, so you can even do the rescue work remotely using USB networking ;)

You can see the instructions for some of the tasks, but here is how I did to be able to log in using telnet, which is not documented elsewhere that I know off. Once you have your image loaded:

  1. You have to activate the USB networking in the device: /rescueOS/usbnetworking-enable.sh

  2. Configure your host PC to assign an IP to usb0: sudo ip a add 192.168.2.14/24 dev usb0 && sudo ip link set usb0 up

  3. Start the telnet daemon in the device: telnetd

  4. I couldn't find out the root password, and since the initrd root filesystem is read-only, so I did this to change the root password:

    cp -a /etc /run/
    mount --bind /run/etc /etc
    passwd
    

    Now type the new root password.

  5. That's it, log in via telnet from the host PC: telnet 192.168.2.15 and have fun!

With this I just could edit the broken files and saved the device without even needing to reflash it, but if you're not so lucky, you can just backup the root filesystem and reflash using this instructions (I didn't tested them, but seems pretty official).

Now I should probably have to try the recovery-boot package, if it works well it might be even easier to rescue the phone using that ;)

Sequreisp

by Leandro Lucarella on 2011- 07- 15 19:30 (updated on 2011- 07- 15 19:30)
tagged adsl, es, floss, isp, linux, ror, sequre, sequreisp - with 0 comment(s)

Estoy demasiado lazy como hacer posts con contenido propio, así que sencillamente, como vengo acostumbrando, me voy a limitar a copiar algo que hizo otra persona:

Buenas comunidad.

Hoy tengo la alegría de contarles que ya está oficialmente disponible
sequreisp, que es un completísimo software para gestión de ISPs made in
Argentina.

Si bien el proyecto esta en github desde hace unos meses recién ahora lo
estamos dando a conocer públicamente, una vez que superamos una fase de
prueba y feedback entre conocidos.

Para los que no saben que es sequreisp les cuento que es un soft escrito en
Ruby On Rails que permite montar un server de ISP para manejar multiples
proveedores con balanceo y failover, control de ancho de banda, priorizado
entre muchas otras cosas, todo muy comodamente desde una interfaz web.

Esta pensado para pequeños y medianos ISP o WISPs, desde unos pocos clientes
hasta 3000 mil o más que son los setups más grandes que tenemos actualmente
en un single server, pero creemos que se puede escalar aún más. Respecto al
balanceo hemos llegado a balancear 32 ADSL en un sólo servidor. La solución
es muy estable, actualmente la están usando alrededor de unos 40 ISPs/WISPs
de argentina y latinoamérica y el número va creciendo.

Si bien sequreisp es un producto comercial se eligió liberar su core bajo
AGPLv3 para devolver a la comunidad todo lo que siempre nos da y sigue dando,
sin el kernel de linux, iptables, tc, mysql, ruby y un largo etc. sequreisp
no existiría.

Existe también una versión comercial(de algo hay que vivir =) que agrega
funcionalidades mediante módulos, y es la que usan nuestros clientes, ya que
además incluye soporte, asesoramiento, backups online y otros servicios.

Agradecemos la difusión del proyecto e invitamos a toda a la comunidad
a usarlo y participar del mismo, git-hub facilita enormemente esto último.
Tickets, bugs reports, sugerencias y sobre todo pull-request son más que
bienvenidos.

Les dejo las urls.

Sitio oficial:

Codigo fuente:

Foro:

--
Luciano Ruete
lruete at sequre.com.ar

Gracias Lucho por compartir :)

Bitcoin: p2p virtual currency

by Leandro Lucarella on 2011- 05- 17 00:04 (updated on 2011- 05- 17 00:04)
tagged bitcoin, currency, en, floss, p2p, paper, politics, virtual - with 1 comment(s)

Bitcoin is one of the most subversive ideas I ever read, it's as scary as exciting in how it could change the world economy dynamics if it works.

Bitcoin is (quoting WeUseCoins.com):

Decentralized
Bitcoin is the first digital currency that is completely distributed. The network is made up of users like yourself so no bank or payment processor is required between you and whoever you're trading with. This decentralization is the basis for Bitcoin's security and freedom.
Worldwide
Your Bitcoins can be accessed from anywhere with an Internet connection. Anybody can start mining, buying, selling or accepting Bitcoins regardless of their location.
No small print

If you have Bitcoins, you can send them to anyone else with a Bitcoin address. There are no limits, no special rules to follow or forms to fill out.

More complex types of transactions can be built on top of Bitcoin as well, but sometimes you just want to send money from A to B without worrying about limits and policies.

Very low fees
Currently you can send Bitcoin transactions for free. However, a fee on the order of 1 bitcent will eventually be necessary for your transaction to be processed more quickly. Miners compete on fees, which ensures that they will always stay low in the long run. More on transaction fees (Bitcoin Wiki).
Own your money!

You don't have to be a criminal to wake up one day and find your account has been frozen. Rules vary from place to place, but in most jurisdictions accounts may be frozen by credit card collection agencies, by a spouse filing for divorce, by mistake or for terms of service violations.

In contrast, Bitcoins are like cash - seizing them requires access to your private keys, which could be placed on a USB stick, thereby enjoying the full legal and practical protections of physical property.

Here is a video, if you are too lazy to read:

If you want some more detailed information, there is a paper describing the technical side of the project (which I read and didn't fully understand, to be honest).

You have to add bitcoin mining to the equation. Which is not very well explained there. Bitcoin mining is a business, just like gold mining is. You need resources to do it, and if you don't do it efficiently, you'll loose money (the electricity and hardware cost will supersede what you're earning).

Quoting again:

The mining difficulty expresses how much harder the current block is to generate compared to the first block. So a difficulty of 70000 means to generate the current block you have to do 70000 times more work than Satoshi had to do generating the first block. Though be fair though, back then mining was a lot slower and less optimized.

The difficulty changes every 2016 blocks. The network tries to change it such that 2016 blocks at the current global network processing power take about 14 days. That's why, when the network power rises, the difficulty rises as well.

DMDFE copyright assigned to the FSF?

by Leandro Lucarella on 2010- 11- 10 23:07 (updated on 2010- 11- 10 23:07)
tagged copyright, d, dmd, dmdfe, en, floss, fsf, gdc, walter bright - with 0 comment(s)

It looks like Walter is willing to (finally) give the copyright assignment of the DMD front-end to the FSF, so GDC can have a chance at being merged to the official GCC distribution.

Let's see how this turns out...

FreeDroidRPG

by Leandro Lucarella on 2010- 11- 07 01:48 (updated on 2010- 11- 07 01:48)
tagged es, floss, freedroidrpg, game, juego - with 0 comment(s)

Ahora que ando con un poco más de tiempo al pedo, estuve buscando algunos jueguitos. El Wesnoth para mí es un clásico, y está siempre ahí, y aunque dispuesto para ofrecer alguna campaña nueva cada tanto, ya me quedan muy pocas sin jugar =P

Así que estuve tratando de ampliar horizontes, motivado por un simpático directorio de juegos que encontré en algún feed RSS. Probé, o intenté probar, varios juegos, en particular de estrategia y RPG (por turnos o de tiempo real) y si bien hay cosas muy prometedoras (como el 0 A.D.) la mayoría están verdes.

Así di con el FreeDroidRPG, una mezcla entre Monkey Island (por el humor), el Diablo (por la forma de jugarlo) y un juego que ya no recuerdo bien el nombre, creo que era algo como The Vault (por lo elije-tu-propia-aventurezco y el universo pseudo post-apocalíptico). No es una locura, pero tiene buena calidad, es muy jugable, es particularmente simpático para geeks (tiene muuuchos guiños) y la verdad que hace mucho que un juego no me resultaba tan adictivo. Lo terminé en una semana aproximadamente, y me quedé con ganas de más.

Sé que está activamente en desarrollo (de hecho participó del GSoC 2010), pero no sé si agregarán más quests o de que manera lo extenderán, lamentablemente en la web hay bastante poca información.

En fin, si les gusta este tipo de juegos, es muy recomendable :)

Bacap updates

by Leandro Lucarella on 2010- 10- 02 00:11 (updated on 2010- 10- 02 00:11)
tagged bacap, en, floss, self, software, update - with 2 comment(s)

Just in case you are a Bacap user (and a lazy one, that doesn't want to subscribe to the repository RSS feed :), you might be interested in a few recent updates:

Enjoy!

GDC activity

by Leandro Lucarella on 2010- 08- 10 01:21 (updated on 2010- 08- 10 01:21)
tagged activity, d, dmd, en, floss, gcc, gdc - with 0 comment(s)

There is a lot of activity lately in the GDC world, both the repository and the mailing list (mostly closed bug reports notification).

The reborn of GDC is a courtesy of Vincenzo Ampolo (AKA goshawk) and Michael P. (I'm sorry, I couldn't find his last name), but it received a big boost lately since Iain Buclaw (apparently from Ubuntu, judging from his e-mail address) got commit access to the repository in July.

They are working in updating both the DMD front-end and the GCC back-end and judging from the commits, the front-end is updated to DMD 1.062 and 2.020 (they are working on Druntime integration now) and the back-end works with GCC 3.4, 4.1, 4.2, 4.3 and 4.4 is in the works.

Really great news! Thanks for the good work!

Bacap

by Leandro Lucarella on 2010- 07- 02 01:02 (updated on 2010- 07- 02 01:02)
tagged bacap, backup, en, floss, release, rsync, software - with 0 comment(s)

I've published my backup script (and named it Bacap, which is how it sounds when you pronounce "backup" in Spanish ;), as it suddenly became used by somebody else and received some patches =)

It has a simple home page for those wanting to see what is it about. I won't be doing formal releases thought, since is such a simple script, that would be overkill (just be thankful it has a git repo and a home page ;).

How can you don't love FLOSS?

by Leandro Lucarella on 2010- 06- 12 00:11 (updated on 2010- 06- 12 00:11)
tagged en, floss, jabber, mcabber, migration, psi, python, script - with 0 comment(s)

Let me tell you my story.

I'm moving to a new jabber server, so I had to migrate my contacts. I have several jabber accounts, collected all over the years (I started using jabber a long time ago, around 2001 [1]; in that days ICQ interoperability was an issue =P), with a bunch of contacts each, so manual migration was out of the question.

First I thought "this is gonna get ugly" so I thought about using some XMPP Python library to do the work talking directly to the servers, but then I remember 2 key facts:

  1. I use Psi, which likes XML a lot, and it has a roster cache in a file.
  2. I use mcabber, which has a FIFO for injecting commands via the command line.

Having this two facts in mind, the migration was as easy as a less than 25 SLOC Python script, without any external dependencies (just Python stdlib):

import sys
import xml.etree.ElementTree as et

def ns(s):
        return '{http://psi-im.org/options}' + s

tree = et.parse(sys.argv[1])

accounts = tree.getroot()[0]

for account in accounts.getchildren():
        roster_cache = account.find(ns('roster-cache'))
        if roster_cache is None:
                continue
        for contact in roster_cache:
                name = contact.findtext(ns('name')).strip().encode('utf-8')
                jid = contact.findtext(ns('jid')).strip().encode('utf-8')
                print '/add', jid, name
                print '/roster search', jid
                g = contact.find(ns('groups')).findtext(ns('item'))
                if g is not None:
                        group = g.strip().encode('utf-8')
                        print '/move', group

Voilà!

Now all you have to do is know where your Psi accounts.xml file is (usually ~/.psi/profiles/<your_profile_name>/accounts.xml), and where your mcabber FIFO is (usually ~/.mcabber/mcabber.fifo, but maybe you have to configure mcabber first) and run:

python script.py /path/to/accounts.xml > /path/to/mcabber.fifo

You can omit the > /path/to/mcabber.fifo first if you have to take a peek at what mcabber commands will be executed, and if you are happy with the results run the full command to execute them.

The nice thing is it's very easy to customize if you have some notions of Python, for example, I didn't want to migrate one account; adding this line just below the for did the trick (the account is named Bad Account in the example):

if account.findtext(ns('name')).strip() == 'Bad Account':
        continue

Adding similar simple lines you can filter unwanted users, or groups, or whatever.

And all of this is thanks to:

Thank god for that!

[1]

A few people will be interested in this, but I think the ones that are will appreciate this link :) (in spanish):

http://www.lugmen.org.ar/pipermail/lug-org/2001-December/004482.html

Plug Computing

by Leandro Lucarella on 2010- 01- 07 14:20 (updated on 2010- 01- 07 14:20)
tagged en, floss, hardware, linux, marvell, plug computing - with 0 comment(s)

Definition by Wikipedia:

A plug computer is a small form factor network-attached server for use in the home. It is a lower cost and lower power alternative to a PC-based home server. In effect, a plug computer is a network appliance that is fully enclosed in an AC power plug or AC adapter.

Look at this little bastard (up to 2Ghz CPU, 512MB of RAM + 512MB of flash memory, 1.8" hard drive, gigabit ethernet, SD reader, USB, Wi-fi, Bluetooth, under USD100):

https://llucax.com:8043/blog/posts/2010/01/07-plug-computing.jpg

Runs Linux and it's supposed to be fully open source.

I want one! =)

bpython

by Leandro Lucarella on 2009- 12- 03 14:56 (updated on 2009- 12- 03 14:56)
tagged bpython, curses, en, floss, interpreter, python, software - with 0 comment(s)

I'll just copy what the home page:

bpython is a fancy interface to the Python interpreter for Unix-like operating systems (I hear it works fine on OS X). It is released under the MIT License. It has the following features:

  • In-line syntax highlighting.
  • Readline-like autocomplete with suggestions displayed as you type.
  • Expected parameter list for any Python function.
  • "Rewind" function to pop the last line of code from memory and re-evaluate.
  • Send the code you've entered off to a pastebin.
  • Save the code you've entered to a file.
  • Auto-indentation.
https://llucax.com:8043/blog/posts/2009/12/03-bpython.png

Tucan {up,down}load manager for file hosting sites

by Leandro Lucarella on 2009- 10- 06 14:02 (updated on 2009- 10- 06 14:02)
tagged download, en, floss, python, software, tucan, upload - with 0 comment(s)

Meet Tucan:

https://llucax.com:8043/blog/posts/2009/10/tucan.png

Tucan is a free and open source application designed for automatic management of downloads and uploads at hosting sites like Rapidshare.

GDC resurrection

by Leandro Lucarella on 2009- 10- 05 14:31 (updated on 2009- 10- 05 14:31)
tagged compiler, d, en, floss, gcc, gdc, software - with 0 comment(s)

About a month ago, the GDC newsgroup started to get some activity when Michael P. and Vincenzo Ampolo started working on updating GCD. Yesterday they announced that they successfully merged the DMD frontend 1.038 and 2.015, and a new repository for GDC. They will be hanging on #d.gdc if you have any questions or want to help out.

So great news for the D ecosystem! Kudos for this two brave men! =)