—
From The Rise And Fall of Languages in 2010.
This guy is good! Count me in!
Juan J. Martínez used to talk here about Open Source and Other Things.
This is a blog in archive mode, you can read new posts at en_GB@blog
—
From The Rise And Fall of Languages in 2010.
This guy is good! Count me in!
I’ve just released Nautilus Flickr Uploader 0.09, with an important fix and a new feature.
The bug fix was related to privacy settings, or how dumb I can be sometimes, because I got it wrong since the beginning, and although one user commented me the issue through Twitter, until recently (thanks to a proper bug report) I couldn’t manage to understand what the problem was.
Basically my implementation was missing some privacy combinations (public, private, and private with family and/or friends), and I didn’t notice it because I upload public content only.

The only other change in this version is the possibility to open a file chooser as an alternative to add pictures to the upload list. Basically I added this feature after some testing with the upcoming Gnome 3, because drag and drop doesn’t look as easy to do as in Gnome 2, and because one of the UX changes in Gnome Shell is to have less focus in browsing.
So now we have 3 ways to add photos to upload:
Again, because my use case is mostly drag and drop from one of the picture viewers of Gnome, I didn’t notice that it would be interesting to add pictures using an internal browser in the application.
So far, so good. I’ve updated the Fedora 13 & 14 packages, and if you’re using the repository, the update will be pushed eventually in your system. I’ll try to provide DEB packages as soon as possible.
Btw, remember I’m looking for a package maintainer for Fedora.
Today I released the 0.08 version of Nautilus Flickr Uploader, and it fixes a bug that has been around since 0.03 (more than one year ago!).
The short explanation is ‘there was a race condition while uploading the pictures that affected to fast machines only’ (really), and the long one would be a quote from the great Jamie Zawinski:
Some people, when confronted with a problem, think “I know, I’ll use threads.” Now they have two problems.
Zawinski never said that, but it’s my favourite version of the two problems original quote. Anyway, the problem is fixed!

I’ve included the Russian translation kindly provided by Anaart, and I’ve rebuilt the Fedora repository to support specifically Fedora 12, 13 and 14 (thanks to Koji), and you’ll have to download and install the new repo file (sorry for the inconveniences!).
According to Flickr, the application has +600 registered users, so go and upgrade!
Update: you know Debian/Ubuntu packages lag behind Fedora’s because I haven’t found someone to maintain them. Good news, a twitter fellow updated the DEB package to 0.08! Have I found a maintainer?
With LANG=haskell, Why isn’t Haskell popular in Industry?
It’s interesting because I think that list of 9 points can apply to other languages too (such as Perl).
A language is unpopular because it’s different, and it makes it difficult to learn. Moreover a language can be popularly known to be difficult, or believed to have known problems, such as maintainability or code readability.
It’s very difficult to hire programmers that already know it, because it’s unpopular. Although you can teach it, it doesn’t make the language suitable for your projects, because you need good programmers already trained, and you can’t find them!
All together makes that language a risky option that gets discarded in favour of other ‘industry leading’ languages such as Java.
And don’t forget the customer: they’re used to some words, and although it’s not their business, they tend to be more happy if they know (or think they know) about the technology you’re using. So, it can be harder to sell an application made in Haskell.
At the end, sadly, the advantages of using $LANG aren’t that important.
Since I upgraded the firmware of my Acer Aspire One 110, I’ve noticed some little problems with the 6 cells battery: the laptop switches off when about one hour of battery time is left.
Well, it’s not really switch off but like it hangs: the power light it’s on, and the side cooler is working, and I have to press the power button for some seconds to stop it.
I did some research and tests, and these are the results:
$ cat /proc/acpi/battery/BAT1/info present: yes design capacity: 7200 mAh last full capacity: 6610 mAh battery technology: rechargeable design voltage: 11100 mV design capacity warning: 300 mAh design capacity low: 264 mAh capacity granularity 1: 32 mAh capacity granularity 2: 32 mAh model number: UM08A73 serial number: 096D battery type: LION OEM info: SIMPLO $ cat /proc/acpi/battery/BAT1/state present: yes capacity state: ok charging state: discharging present rate: 824 mA remaining capacity: 6569 mAh present voltage: 12232 mV
The remaining capacity (green) it’s the actual battery charge, and the design capacity warning (yellow) and the design capacity low (red) are the values I assume ACPI and the battery applet are checking to calculate the remaining battery charge:
$ acpi Battery 0: Discharging, 97%, 08:41:40 remaining
I don’t know if I’m getting it wrong, but it makes sense to me (and that 08:41:40 remaining is obviously wrong). The netbook freezes when the charge reaches 19% (aprox).
I guess the battery is advertising wrong values, and because the applet uses time as factor, I can’t adjust it properly.
So I programmed a Perl script to run by cron every minute, to check the battery charge value instead of the time:
#!/usr/bin/perl
use strict;
use warnings;
# empirical fix
my $fix = 1200;
sub getData
{
my $file = shift;
open(FD, '<', $file) or
die('failed to open: ' .$file);
my @lines = <FD>;
close(FD);
my %data;
foreach(@lines)
{
chomp;
s/\s+//g;
s/mAh//g;
my ($key, $value) = split(':');
$data{$key} = $value;
}
return %data;
}
my %state = getData('/proc/acpi/battery/BAT1/state');
exit 0 unless $state{'chargingstate'} eq 'discharging';
my %info = getData('/proc/acpi/battery/BAT1/info');
if($state{'remainingcapacity'} <= $info{'designcapacitywarning'} + $fix)
{
system('aplay alarm.wav');
}
if($state{'remainingcapacity'} <= $info{'designcapacitywarning'} + $fix - 100)
{
system('sudo /sbin/halt -p');
}
exit 0;
# EOF
Please, keep into account that this is a hack. After some tests, I’ve found that adding 1200 to design capacity warning it’s a good fix.
When the limit is reached, I play an alarm sound, until I call halt to switch off the netbook as cleanly as possible (notice that I’ve configured sudo to let my user run halt without password).
With this little workaround, everything in my LXDE based Fedora 13 fit my needs!
—
From Sven Heinicke (@failedvegan) at identi.ca’s timeline.
I agree, browse, and use them. Don’t repeat yourself.
—
From How SQLite Is Tested, via Reddit.
Impressive. In comparison, Perl 5.12.0 has 29826 tests*.
* from running egrep -ri "tests ?=> ?" * | perl -e '$s = 0; while(<>) { m/.*tests ?=> ?([0-9]+)/; $s+=$1;} print "total: $s\n"' inside t/ directory. Remember Tumblr RSS is broken, you may not see the right code in your feed reader.
—
From Perlop about Yada Yada operator.
Perl 5.12.0 it’s out! Yada Yada!
I’ve tested both frameworks, with one public result (built with Mojolicious), and another one ongoing (playing with Dancer).
I like both, but both frameworks have their own problems.
Mojo it’s more advanced than Dancer, but it has an important problem with the documentation (the lack of it) and with the non existent API stability (at least when I tried it, it was easy to break your application after an upgrade).
Dancer it’s simpler to use (and simpler overall), with good and almost complete documentation, but it’s less mature IMHO (and you can find rough edges while programming a real world application).
Anyway, both are interesting projects and I recommend them if you want to try a modern Perl based MVC framework.
—
From Crufty Old Perl.
Yes, I agree (indeed I’m guilty myself of coding some bad Perl code). Seems that Perl it’s the only one language capable of having bad practices: unmaintainable code, unreadable code, etc; or what it’s even worse, the only one language not being able to avoid these bad and undesirable things.