Archive for December, 2007

Flash player problem in Debian Lenny: “This SWF file is known to trigger bugs in the swfdec decoder.”

[Update: read a more recent post]

I have recently come accross this problem, and I am posting the solution I just found. The problem is the following: when trying to watch any online flash animation with Iceweasel on my Debian Lenny (e.g. in YouTube), instead of the video, I got a grey window, with the following black letters on it:

This SWF file is known to trigger bugs in the swfdec decoder. Playback is cancelled.

This bug can be followed in this August 2007 thread at donarmstrong.com. I am amazed why it didn’t affect me sooner than this week, but oh well…

The steps that fixed the issue for me where to install two packages. I am not 100% sure the first one was needed, though. I first installed the package flashplayer-mozilla, which uninstalled flashplugin-nonfree as a side effect. This step alone fixed nothing.

The second step was to actually read the donarmstrong.com bug report, and see that it says that “This is fixed in swfdec-0.4.2 […]”. Great! I did a aptitude search swf, and found out that Lenny has libswfdec-0.5-4, and a swfdec-mozilla that depends on it. I installed the latter, which obviously also installed the former, plus it removed swf-player and libswfdec0.3.

After that, I opened Iceweasel again, and now flash works!

Comments (2)

rip2ogg released

I have released (how pretentious!) rip2ogg.py, the wonderful CD ripper everyone was waiting for. You can check its “home page” at isilanes.org.

Why did I do it? Well, one of the wonderful tools GNU/Linux provides to rip CDs is KAudioCreator, which is very neat. However, it has some shortcomings I wanted to overcome (again, how pretentious!):

  1. It’s slow. It rips the CD to WAV and encodes the ripped WAVs to Ogg in parallel, while rip2ogg.py does both things sequentially. Yet rip2ogg.py is 40% faster! I have ripped a whole CD in 14 minutes with KAC, and in 10 minutes with r2o.
  2. You can not have arbitrary character substitution, just one, and the interface for that is horrible. For example, with KAC it’s very simple to substitute every blank in the track name with an underscore. BUT I have found no way to provide KAC with two lists, so that it substitutes every character in the first list with the corresponding character(s) in the second list.
  3. You can change the track title to get a “nice” filename for the Ogg, but the change is also reflected in the “track tile” tag. You can not tell KAC to substitute a “ñ” in the title for a “n” in the filename, but to keep the “ñ” in the “tag title” tag.
  4. KAC is not able to rip all CDs. It sometimes chokes on DRM‘d CDs, and copes horribly with scratched surfaces. In contrast, the programs rip2ogg.py uses to rip have never failed for me. More than once command-line was my only way of ripping some rogue CDs. KAC simply couldn’t.

In the end, it all boils down to be able to control what the ripper is doing. To do so, I decided to make this simple script.

Obviously it is FLOSS (GPLv2), so use, modify and redistribute to your heart’s content!

Comments

Interesting TeX tricks

Simply a page with some interesting TeX tricks: volkerschatz.com.

Comments

Labeled breaks in Python

I am a recent fan of Python, a very neat scripting language.

One thing I miss from Perl is the availability of labeled breaks. What are those? Suppose you have two nested loops. When a condition is met in the inner loop, you want to exit both loops. With Python there is not straightforward way of doing it. Imagine we are reading an array of data, line by line and column by column, and we want to exit when meeting the first zero value. With Perl:

LINELOOP: foreach my $i (0..$lines)
{
  COLLOOP: foreach my $j (0..$columns)
  {
     break LINELOOP unless $val[$i][$j];
  };
};

A simple “break” will exit the innermost loop, but we can use a label to exit a specific loop. However, in Python there is no such a thing as a labeled loop, as explained in this PEP.

My rant is with the explanations given by van Rossum himself in Python mailing list to reject the change:

1. The complexity added to the language, permanently.
2. My expectation that the feature will be abused more than it will be used right.

Wow! Incredible reasons!

The first one is silly: other languages have it, and it has worked fine. Adding complexity to a tool for the sake of it is really stupid, I agree. But the fact is labeled breaks would be tremendously useful, so the increase in complexity would be justified. Surely a language that can only print “Hello world” would be less complex, yet of little use.

The second reason is absolutely over-the-shoulder-of-the-users. So now good old Guido must guide his sheep along the “correct” path, lest we get lost! He is punishing the good programmers by not giving them a useful tool, so that bad programmers are protected from their stupidity. It’s like not selling cars at all because some people drive while drunk.

Just my 2 cents…

Comments (3)

Homemade Minority Report-like finger tracker with a Wiimote

When I see videos like the following, I always think two things:

  1. There are always freaks out there that will do anything with anything. They keep this world spinning, and I thank them for that.
  2. There are sooo many things that can be done with nowadays technology and a little bit of wit. Why don’t we see all that in stores? Nintendo, or anybody else, can’t do it? Or they don’t want to do it? In both cases… why? Obviously for marketing reasons, and because they want to maximize their benefit, not users’. The reader should think twice on that before assuming it’s natural.

[youtube=http://www.youtube.com/watch?v=0awjPUkBXOU]

You can page where I found it (actually somebody who found it told me) at Johnny Chung Lee’s page.

Comments (1)

PDA Linux en el folleto de MediaMarkt

La propaganda de MediaMarkt que hoy acompañaba al periódico me ha sorprendido bastante. Como se puede ver en la imágen (sacada de su página web), no solo ofrecen una PDA con Linux, sino que la palabra “Linux” aparece dentro de la flechita blanca que utilizan para resaltar los “puntos fuertes” del producto.

Clic para ver folleto completo

No quiere esto decir que se hayan vuelto “buenos”, pero hasta ahora (y como todos los vendedores) han estado vendidos al Enemigo Oscuro incondicionalmente. Ya sé que si venden gadgets con Linux o lo anuncian es simplemente por marketing: es una palabra de moda y vende más. Lo que me llena de alegría es precisamente que “Linux” sea una palabra que venda más y pueda ser utilizada por motivos de marketing. Eso significa que cada vez hay una base más amplia de consumidores que lo toman en cuenta, ¿no?

Comments (1)

Shakira es una hacker: Ciega, sordomuda lo confirma

Siempre que he escuchado la canción Ciega, sordomuda de Shakira, me ha parecido que esta tía es una hacker y una friki.

[youtube=http://www.youtube.com/watch?v=KOeaxkMbGO8]

¿Por qué digo eso? Porque la primera estrofa de la canción…

Se me acaba el argumento
y la metodología
cada vez que se aparece
frente a mí tu anatomía

… habla claramente de un programa informático, por ejemplo un script Python:

#!/usr/bin/python

import sys

class myclass:

  def __init__(self,var):
   var = self.var

  #def mymethod(self):
  #  pass

if 'frente_a_mi' == 'tu_anatomia':
  sys.argv = []
  myclass.mymethod()

Comments (1)

Compiz Fusion on an integrated Intel 865G graphics chip under Debian Lenny

This YouTube video shows Compiz Fusion running on my work computer. It has a fairly decent CPU (P4 3.00GHz), but no “useless” things like sound cards or (more relevant for this issue) graphics card. The only thing it has is an Intel 82865G graphics chip integrated in the motherboard. We are talking about an integrated chip (not dedicated graphics card) released in May 2003.

Judge the performance for yourself (take into account that the actual performance is higher, since the recording program to make the video also uses up some resources):

Comments (7)

Blackout summary IX

Yesterday morning, a new failure from Iberdrola turned the power supply of the whole campus off. So, here goes the updated list of blackouts I have been able to compile, with comments if any:

  1. 2007-Dec-10 (I used the reboot of my computer to install kernel 2.6.22-3)
  2. 2007-Oct-16
  3. 2007-Aug-27 (at least three short power failures, 5-10 minutes apart)
  4. 2007-May-19
  5. 2006-Oct-21 (they warned beforehand)
  6. 2006-Sep-14 (Orpheus fell, the DNSs fell, the DHCP servers fell)
  7. 2006-Jul-04 (Orpheus didn’t fall)
  8. 2006-Jun-16
  9. 2006-Jun-13
  10. 2006-Jun-08
  11. 2006-Jun-04
  12. 2006-May-26 (The card-based automated access to the Faculty broke down)
  13. 2005-Dec-21
  14. 2005-Dec-13

Summary: 14 blackouts in 728 days, or 52 dpb (days per blackout). 56 days since last blackout. Average dpb went up by 0.3.

First post in the series: here

Comments

Vendor lock-in for dummies

Intro

Any GNU/Linux user ends up hearing, sooner or later, the Ultimate Argument(tm) from a Windows fanboy:

If Linux is so good, and is given away for free, how can Windows still be so prominent?

Ironically, many Windows users answer the question themselves, when explaining why they can’t make the switch to Linux:

  • There are no games for Linux
  • Photoshop or AutoCAD are vital for me, and they only work under Windows
  • I fear some pieces of hardware won’t work under Linux
  • The web page of my bank only displays correctly under IE
  • My friends/colleagues/business partners share documents in MS Office formats, and I need to be compatible

The concept than embraces all the preceding points, and answers the rhetorical question above, is vendor lock-in. I will try to explain the concept with a humble tale I have used twice so far in comments to entries in Enrique Dans’s blog.

Tales of bicycles and cars

Imagine a country with no bicycles.

One day a guy comes up with the idea of making them, and starts to produce, and sell, bicycles that we shall call of type A. Being an empty market, the A-type bicycles quickly triumph, and the maker makes a lot of money.

But some time later, a second guy devises a better bike design (type B), and decides to produce and sell it. The price and the quality are better, so when people buy a new bike or replace an old one, they tend to buy bikes of type B. Soon enough, the market is dominated by the new, better, bicycle.

Now imagine a country with no cars.

One day a guy comes up with the idea of making cars, and starts to produce and sell cars of type A. As cars need petrol to run, A-type gas stations develop in parallel to car sales. Building gas stations is expensive, but sales are guaranteed, as everyone has or will have A-type cars, and they need A-type petrol: their growth is synergistic.

But some time later, a second guy devises a better car design (type B) and decides to produce and sell it. The price and the quality are better, BUT drivers can not buy B-type cars, because there is no B-type gas station. The problem is that, since noone has a B-type car, making B-type gas stations is doomed to bankrupt. So, no B-type cars are sold, because there are no B-type gas stations, and B-type gas stations will not be made until B-type cars are popular!

The result is a vendor lock-in.

Consequences

When a market (such as the one in the tale above) is dominated by vendor lock-ins, the producers benefited by the lock-in have little, if any, incentive to make better products. Their sales are guaranteed by the lock-in situation, not by their superior product in a fair market.

On the other hand, other producers will have an extremely hard time for competing, as their products will be almost unusable for the buyers.

The moral is that the lock-in situation is bad for either the potential users of the product locked-out (the B-type car above) and the locked-in one (the A-type car). Even if a consumer would never choose the locked-out product, the lack of competition will adversely affect the evolution of the product they do choose. The lock-in is bad for everyone: all consumers and all producers but the locker ones.

And this relates to Windows vs. Linux in what way?

In a really straightforward way. Microsoft, cunning as they are, have tried their best to get as many lock-ins on the software market as they can. Ironically, instead of abhorring this practice, most Windows users happily continue not only using, but even defending the product. I shudder at the simpleton comment that “freedom is not using Linux, but using Windows and Linux whenever you feel like it”. Literally taken, it is a very wise argument. But unfortunately the reality is not so simple: using Windows helps enforce a lock-in that keeps Linux out (while in this case the contrary is not true). You can not use Windows/Linux 50/50, because Windows asks you for monogamy.

The many lock-ins that MS has forced down the throats of the users, while the latter still claim them to be benefits of Windows include (as mentioned at the beginning):

  • Proprietary communication protocols that will not work with any other OS. This includes modifications on the IE web browser, so that web pages had to be done for it, and then be incompatible with other browsers. Or the MSN protocol, that is kept as closed as possible, to make free clones of the MSN client as little compatible as possible.
  • Proprietary file formats that will not be possible to modify with tools other than the “official” MS ones: WMV for video, DOC, XLS, PPT for office documents.
  • As much “Windows-only” software as possible, including games. Making games for platforms other than Windows ensues the wrath of MS, something that game makers can not take lightly, since their sales depend on the game actually running under Windows.
  • As much “Windows-only” hardware as possible. The first idea that someone gets about an OS is that it is the piece of software that interacts with the hardware. If so, it is astonishing why it is not MS the one incorporating the drivers in the OS, instead of the hardware makers (hardware != software) providing them. We have all grown accustomed to buying printers, mice, external CD/DVD/HDs… with a CD with the “Drivers for Windows 98” or some such. Why? Windows can not make the drivers out of the blue, true. But the hardware makers can just make the necessary data public, so anyone will be able to make drivers. If the maker keeps these specifications secret, they will simply not sell anything.

Comments (1)