Search Results: "ema"

1 October 2009

Daniel Kahn Gillmor: sexist behavior in the free software community

So not even 3 months out from RMS's sexist Gran Canaria virgins remarks, we have another powerful leader in the Free Software Community making sexist remarks in a talk to developers (this time, it's Mark Shuttleworth). It's a shame that these two people have said stupid things that hurt their causes and their communities by perpetuating an unfriendly environment for women. And it's a bigger shame that neither leader appears to care enough about their community to issue a sincere public apology for their screwup (if i'm wrong about this, please point me to the apology i've looked). These guys are in a situation which is nowhere near as hard as writing good software or managing complex technical projects: if you make a stupid mistake, own up to it, apologize, and try not to make similar mistakes in the future. Perhaps worst of all, are the remarkable number of unreasonably fucked-up comments on the blog posts discussing these unfortunate events. If you're in the habit of defending remarks like those made by RMS and Shuttleworth on the 'net, please take a minute and ask yourself a few questions: Please read the Geek Feminism wiki and blog. Even if you don't agree with everything on those sites (hey, it's a wiki! and a blog! you don't have to agree with everything!), people are at least trying to address the problem of sexism in our community there. Engage constructively and don't hide or ignore problems! UPDATE: I've asked the site admin to remove some trollish comments. If you want to use the comments on this blog to announce something like "i'd like for free software to be a boys-only club", that's fine, i'd like to know who you are so i can adjust my perception of you accordingly. Anything advocating or excusing rape and/or murder is way over the line and is not welcome here. i'm sure you can find some other place to troll. Tags: community, conduct, feminism, free software, sexism

Gerfried Fuchs: Times Are Changing

Since I returned from this year's debconf quite a lot things have changed in my life. One thing I knew way before debconf already, I switched jobs. I was working for a pretty long time (and also through great times) for Silver Server, for well over 6 years. Let's see what I can do in and for my new job. I'm still only pretty short there yet and I being to understand what's going on (and what could need improvements in some workflows) but it's too early to see that more precisely. On a small side-note, the job change also required me to switch my mobile phone number because the old one was a company's number. I now have a private one that I don't fear of losing anymore. If you subtract the number 3933309527644 from my old one you have my new one. On the other hand you can always ask me for it in case you had my old one and wonder. ;) Besides my mobile phone number other smaller things have changed over time too. Most of you noticed that I'm neither using my @ist.org nor my @debian.org address anymore because they did carry the wrong nick. And given that everyone was switching their gnupg keys I did so too. Like before I again created separate keys for private usage and for Debian usage. I'm not really following the procedure of sending out signing requests to people who have signed my old key(s), personally I don't follow them myself so I don't expect others to do. They are though cross-signed with the old ones just to be on the save side to keep the WoT not losing connections. Also I finally got around to set up my own ejabberd server and did create my a new jabber ID that I also plan to keep. It is the same as my private mailaddress as you can see linked above in the key for private usage. ;) One of the reasons for the server is by the way also a testbed for the packaging of ejabberd which will get moved into team maintenance with the next upload which will be the next upstream version, 2.1. But the biggest and most important change in my life is that I will have to rethink my spare time spending quite a lot because there will be something demanding a lot of time starting in about march next year. An extremely fortunate change and almost as happy one even though it means that I won't be able to attend next year's debconf in NY, but I hope the people whom I told that I will be there aren't too disappointed by this announcement. Sorry! :)

John Goerzen: MoinMoin as a Personal Wiki, Zen To Done, And A Bit of Ikiwiki

Since I last evaluated and complained about wikis last year, I ve been using moinmoin for two sites: a public one and a personal one. The personal site has notes on various projects, and my task lists. I ve been starting out with the Zen To Done (ebook, PDF, paper) idea. It sounds great, by the way; a nice improvement on the better-known GTD. My To Do Page Anyhow, in MoinMoin, I have a ToDos page. At the top are links to pages with different tasks: personal, work, yard, etc. Below that, are the three big rocks (as ZTD calls them) for the day: three main goals for the day. I edit that section every day. The Calendar And below that, I use MoinMoin s excellent MonthCalendar macro. I have three calendars in a row: this month, next month, and last month. Each day on the calendar is a link to a wiki page; for instance, ToDos/Calendar/2009-10-01. The day has a red background if the wiki page exists, and white otherwise. So when I need to do something on or by a specific day, I click on the link, click my TaskTemplate, and create a simple wiki page. When I complete all the tasks for that day, I delete that day s wiki page (and can note what I did as the log message if I like). Very slick. The Task Lists My task pages are similar. They look like this:
= Personal =
<<NewPage(TaskTemplate,Create new task,@SELF)>> <<Navigation(children,1)>>
<<BR>>
So, my personal task page has a heading, then it has an input form with a text box and a button that says Create new task. Type something in and that becomes the name for a wiki page, and takes you do the editor to describe it. Below the button is a list of all the sub-pages under the Personal page, which represent the tasks. When a task is done, I delete the page and off the list it goes. I can move items from one list to another by renaming the page. It works very, very nicely. Collecting Part of both ZTD and GTD is that it must be very easy to get your thoughts down. The idea is that if you have to think, I ve got to remember this, then you ll be stressed and worried about the things you might be forgetting. I have a Collecting page, like the Personal or Work pages, that new items appear on when I m not editing my wiki. They get there by email. MoinMoin has a nice email system. I ve set up a secret email address. Mail sent there goes directly into MoinMoin. It does some checks on it, then looks at a combination of the From and Subject lines to decide what to do with it. If I name an existing page, it will append my message the the end. If it s a new page, it ll create it. I have it set up so that it takes the subject line as a page name to create/append to under ToDos/Collecting/$subject (by putting that as the name on the To line). So, on my computers, I have a newtodo script that invokes mail(1), asks for a subject, and optionally lets me supply a body. Quick and painless. Also, I ve added the address to my mobile phone s address book. That way I don t have to carry around pen and paper. Need to get down some thought ? No problem. Hit send email, pull the last address sent to, give it a subject and maybe a body. Very slick. Wiki Software As a way of updating my posts from last year: I ve been very happy with MoinMoin overall. It has some oddities, and the biggest one that concerns me is its attachment support. It doesn t let you specify a maximum upload size, and doesn t very well let you restrict attachment work to only certain people. But the biggest problem is that it doesn t track history on attachments. If a vandal deletes the attachment on a page, it s GONE. They expect to have that fixed in 2.0, coming out in approximately November, 2010. I also looked at Ikiwiki carefully over the past few days. Several things impressed me. First, everything can be in git. This makes for a very nice offline mode, better than Moin s offline sync. The comment module is nicer than anything in Moin, and the tagging system is as well. Ikiwiki truly could make a nice blog, and Moin just couldn t. It also puts backlinks at the bottom of each page automatically, a nice feature. And it s by Joey Hess, who writes very solid software. There are also some drawbacks. Chief on that list is that ikiwiki has no built-in history of a page feature. Click History and it expects to take you to gitweb or ViewVC or some such tool. That means that reverting a page requires either git access or cut and pasting. That s fine for me, but throwing newbies to gitweb suddenly might not be the most easy. Since ikiwiki is a (very smart) wiki compiler, its permission system is a lot less powerful than Moin s, and notably can t control read access to pages at all. If you need to do that, you d have to do it at the webserver level. It does have a calendar, but not one that works like Moin s does, though I could probably write one easily enough based on what s there. A few other minor nits: the email receiving feature is not as versatile as Moin s, you can t subscribe to get email notifications on certain pages (RSS feeds only, which would have to be manually tweaked later), and you can t easily modify the links at the top of each page or create personal bookmarks. Ikiwiki looks like an excellent tool, but just not quite the right fit for my needs right at the moment. I ve also started to look at DokuWiki a bit. I was initially scared off by all the plugins I d have to use, but it does look like a nice software. I also re-visited MediaWiki, and once again concluded that it is way too complicated for its own good. There are something like a dozen calendar plugins for it, some of which even are thought to work. The one that looked like the one I d use had a 7-step (2-page) installation process that involved manually running SQL commands and cutting and pasting some obscure HTML code with macros in it. No thanks.

30 September 2009

Romain Beauxis: About free software and yellow pages...

Even if it has happened in the past that I could support a pragmatic approach in the context of free software and media technologies, there is something that offenses me in the context of free audio players. In the world of audio streaming servers on for net radios, there are two majors competitors. In the one hand, Shoutcast, the commercial proprietary streaming server released by Nullsoft, which is also the editor of Winamp, the popular media player. On the other hand, Icecast, which started as an open source implementation of the protocol used by Shoutcast, but was rewritten in its version 2 release to support the free codecs from xiph. Now, appart from the respective quality of the two servers, the real competition takes place in another place: availability of the radios using this or that server. For that purpose, both have implemented Yellow Pages. Shoutcast's yellow pages are here, whereas Icecast/Xiph's yellow pages are there. The great thing with yellow pages is their integration into the audio player. Then, the user can browse the list of radios, and test them. It is very good both for convenience no need to download a playlist or enter manually a complicated URL and advertisement a single place to list all possible radios. The yellow pages from Shoutcast are very popular. They are integrated in Winamp of course, but also in many other popular players, in the PSP, in the iPhone, etc... The Shoutcast yellow pages are reserved for shoutcast users. Of course, the protocol has been reversed it is kind of dummy but if your radio get caught registering to Shoutcast's yellow pages while not using their proprietary software, your radio gets blacklisted and you loose a whole lot of listeners (and money too). For that reason, many net radios want to use Shoutcast as their broadcasting server. From the point of view of Nullsoft, it seems a good call. At least, they play their game and make their money out of it, so let's put this appart. But, what about the free software world ? The obvious idea would be that the free software projects should push altogether for the use of free alternatives, hence pushing for a support of Icecast's yellow pages in the free players. Of course, free software being also a matter of choice, it should be possible to also support Shoutcast's yellow pages. After all, both protocols are very simple, so it is no big deal to implement.. Well, unfortunately, that is not exactly what happens.. Guess what, Amarok and VLC only implement Shoutcast's yellow pages... Given that VLC is a massively popular audio player that spreads among a lot of plateforms, I find it quite a pity that they do not do something to encourage its users to use free alternatives to the proprietary Shoutcast yellow pages, and similarly for Amarok. The adoption of free alternatives only works with massive demand, and we should not hope that proprietary softwares help in any way, but, at least, free softwares should be a bit more aware of what they're advocating when they choose to implement only the proprietary support...

Chris Lamb: GeoDjango and the UK postcode database

This post describes how to play with the UK postcode database that recently turned up on WikiLeaks using GeoDjango. You will need the following pieces of free software:
  1. PostgreSQL (MySQL does not provide sufficient geospacial features) I will be using Postgres 8.4.1; please adjust your paths for your version and/or distributor.
  2. PostGIS spacial database extensions I will be using version 1.4.0.
  3. Django I will be using version 1.1. This version includes the GeoDjango framework.
  4. GEOS geometry engine I will be using version 3.0.0 from the libgeos-c1 package in Debian unstable.
You will also need a copy of the leaked postcode data. Usage of this data is almost certainly a copyright violation.
Getting started First, create a Django project and application for this example:
$ django-admin startproject ukpostcodes
$ cd ukpostcodes
$ ./manage.py startapp postcodes
Next, edit settings.py:
  • Configure DATABASE_*. You must use the postgresql_psycopg2 PostgreSQL database driver.
  • Add django.contrib.gis & ukpostcodes.postcodes to INSTALLED_APPS.
If you have not already done so, you must install PostGIS in your database:
$ sudo -u postgres createlang plpgsql -d <databasename>
$ sudo -u postgres psql <databasename> -f /usr/share/postgresql/8.4/contrib/postgis.sql
$ sudo -u postgres psql <databasename> -f /usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql
Modelling a postcode Now define a simple model to store imported postcodes:
from django.contrib.gis.db import models
class Postcode(models.Model):
    name = models.CharField(max_length=8, db_index=True)
    location = models.PointField()
    objects = models.GeoManager()
  • We import models from django.contrib.gis.db instead of django.db.
  • We override the default objects manager with GeoDjango's GeoManager() so we can perform spacial queries.
Save this model in postcodes/models.py. We can now create this model in our database using:
$ ./manage syncdb
Importing postcode data We will use a management command to import the data. First, create the necessary modules with:
$ mkdir -p postcodes/management/commands
$ touch postcodes/management/commands/__init__.py
$ touch postcodes/management/__init__.py
Next, save the following code in postcodes/management/commands/import_postcodes.py:
import sys
import csv
from django.contrib.gis.geos import Point
from django.core.management.base import BaseCommand
from postcodes.models import Postcode
class Command(BaseCommand):
    def handle(self, \*args, \*\*options):
        Postcode.objects.all().delete()
        count = 0
        for row in csv.reader(sys.stdin):
            try:
                name = row[0].upper().strip().replace('  ', ' ')
                location = Point(map(float, row[13:15]))
            except ValueError:
                print "I: skipping %r" % row
                continue
            Postcode.objects.create(name=name, location=location)
            count += 1
            if count % 10000 == 0:
                print "Imported %d" % count
Finally, we can import the data using:
$ bunzip2 /path/to/uk-post-codes-2009.bz2   ./manage.py import_postcodes
This takes approximately one hour on my computer. If you plan to import the data multiple times, consult the Django documentation for faster methods of importing initial data.
Quering the postcode database We can now query our postcode database. First, let's find the postcode for Buckingham Palace:
>>> from postcodes.models import Postcode
>>> palace = Postcode.objects.get(name='SW1A 1AA')
>>> palace
<Postcode: SW1A 1AA>
Next, let's find all postcodes within 1 mile. For this, we will need to construct a tuple representing the area we want to search in.
>>> from django.contrib.gis.measure import Distance
>>> area = (palace.location, Distance(mi=1))
>>> Postcode.objects.filter(location__distance_lte=area)
[<Postcode: SE1 7BF>, <Postcode: SE1 7SG>, <Postcode: SE1 7JA>, <Postcode: SE1 7PB>,
 <Postcode: SE1 7PD>, <Postcode: SW1A 1DW>, <Postcode: SW1A 1EA>, <Postcode: SW1A 1EE>,
 <Postcode: SW1A 1EF>, <Postcode: SW1A 1EG>, '...(remaining elements truncated)...']
>>> Postcode.objects.filter(location__distance_lte=area)
7024
To find "neighbour" postcodes, we can pass a Point object to the .distance(..) method on our queryset this adds a field we can then sort on:
>>> Postcode.objects.distance(palace.location).order_by('distance')[:4]
[<Postcode: SW1A 1AA>, <Postcode: SW1E 6JP>, <Postcode: SW1E 6LA>, <Postcode: SW1E 6WG>]
Putting it all together Let's pretend we are making an app to find pizza from an arbitrary user-submitted postcode. (We will assume we have parsed the user's postcode and have found its Postcode object, but we will continue to use Buckingham Palace here.) First, define the following model in postcodes/models.py and re-run ./manage.py syncdb:
class PizzaJoint(models.Model):
    name = models.CharField(max_length=200)
    postcode = models.ForeignKey(Postcode)
    objects = models.GeoManager()
    def __unicode__(self):
         return self.name
Now, add some local pizza places:
>>> def add_pizza_joint(name, loc):
...     code = Postcode.objects.get(name=loc)
...     PizzaJoint.objects.create(name=name, postcode=code)
...
>>> add_pizza_joint('Pizza Hut', 'SW1E 6SQ')
>>> add_pizza_joint('Pizza Express', 'SW1E 5NA')
>>> add_pizza_joint('Pizza On The Park', 'SW1X 7LY')
If we were not using GeoDjango, we would have to be content with simply matching the postcode:
>>> PizzaJoint.objects.filter(postcode=palace)
[]
However, we can now find the cloest pizza places:
>>> PizzaJoint.objects.distance(palace.location,
            field_name='postcode__location').order_by('distance')
[<PizzaJoint: Pizza Hut>, <PizzaJoint: Pizza Express>, <PizzaJoint: Pizza On The Park>]
The .distance(..) method also sets a distance attribute on all the objects returned; this makes it easy to show the actual distance to the user:
>>> for x in PizzaJoint.objects.distance(palace.location,
                     field_name='postcode__location').order_by('distance'):
...    print "%s (%d metres away)" % (x, x.distance.m)
...
Pizza Hut (499 metres away)
Pizza Express (509 metres away)
Pizza On The Park (902 metres away)
For more details, see the GeoDjango documentation.

29 September 2009

Matt Zimmerman: Explaining to girls


There has been some discussion recently about Mark Shuttleworth s keynote at LinuxCon, in particular a comment he made in passing about the need to explain to girls about free software. I haven t had much time for writing since then, but a few people have asked me what I thought about it, so I thought I should say something. First, a few things to note:
  • Yes, I was there, in person, at the event, in the audience, during the keynote
  • Mark is my direct manager at Canonical, and occupies various positions of authority in the Ubuntu community
  • I am speaking mainly for myself, and in part on behalf of the Ubuntu community (not Canonical)
  • I briefly spoke to Mark in private about what he had said, shortly after his talk, before saying anything publicly
The remark in question was sexist, and although it may seem small in itself, it is representative of an attitude which is harmful to the community. I think that Mark cares about the health of the free software community, and the Ubuntu community in particular. I don t think that he set out to exclude and alienate women, but he did so without meaning to. It was a mistake. It was a mistake which very likely had deep, unconscious roots. I make such mistakes myself, more often than I would like. My own mistakes are the most difficult to see and grapple with, so I can identify with his situation. I, too, care about the health of the community, which is why I m speaking up. Mark probably didn t realize that he was othering, or invoking a pattern of men explaining things to women. His intent was to make his (overwhelmingly male) audience laugh, and they did laugh. Now, it s clear that some people didn t find it funny, and were made uncomfortable by it, some to the extent that they want nothing to do with Ubuntu because of this attitude. The fact that it was only a joke doesn t change that. They know it was intended as a joke, and they still feel this way. This sort of mistake is very common, common enough that there is handy reference material which explains how to handle it without making it worse. There have been much more severe incidents in the free software community this year, with more lasting effect than passing comments. This one is pretty easy to correct, and I hope that Mark does so. It would send the message that we mean it when we say that a community where people feel uncomfortable or threatened is not a productive one.

27 September 2009

Steve Kemp: Looks like me an Vincent caught you boys at breakfast

It is interesting that Fran ois Marier recently posted a brief "howto" document on debugging problems caused by overly-agressive filtering with privoxy, as I've recently been having problems with that tool. My home network frequently changes configuration depending on what I'm concentrating upon, but every few months I'll start/cease using the following tools: Recently I was experimenting with XSS attacks against various browsers, which meant using them for real. As not all browsers have the same anti-advert setups I was running privoxy to filter out web-annoyances, and I spotted a major flaw with it. Unfortunately I can only describe the problem, not reproduce it, or track it down. I'm 80% certain the bug is in privoxy, but the stack is suitably high that determining that for sure is problematic. In short the issue is that HTTP requests would end up being sent to the wrong host: After that clicking around consistently sends requests to the first HTTP host which was accessed succesfully. So, for example, attempting to visit http://foo.com/bar/ will send the request to http://steve.org.uk/bar - which then gives a 404. In terms of setup I use a dnsmasq DNS cache, privoxy and iceweasel from Debian unstable. From the symptoms I'm not sure if iceweasel's "KeepAlive" system is to blame, or if privoxy has a bad cache of hosts. Perhaps it is dnsmasq returning bogus DNS data, or my cable connection itself having DNS issues. Anyway once the symptoms present themselves closing the browser and restarting the cache fixes it. Until the next time which might be hours or days later. I'd report it as a bug - but I don't know where it should be. Privoxy caching things it shouldn't? iceweasel having keepalive issues? dnsmasq returning wrong DNS entries? I'd ask "Have you seen this before, internet world?" but I guess if you have tracked it down it'd be fixed by now, and it clearly isn't! Anyway for the moment I've uninstalled privoxy. ObFilm: Pulp Fiction

26 September 2009

Ana Beatriz Guerrero Lopez: How to get your bugs solved in Debian+KDE

Imagine you have found a bug in your Debian running KDE, a nasty one, and you want to get it resolved. What you should do? This is centered on KDE and Debian but most of it is useful in general. First Case: You have a problem and you have no idea whether it is a bug or not. Even worse, you don t know which package to report it to. This happens more often than you might believe; it even happens to experienced people. Your first step should be to checking user forums and mailing lists [0] to see if someone else has encountered the same issue. You might find that your problem is already known (and maybe easy to solve). In the case that you do not find your problem there, then you can ask for help and post a mail or message explaining your problem. Pick one mailing list or forum board, the one you think is more appropriate, then post your issue there. The most detailed you are about your problem, the bigger is the likelihood of you obtaining help. It could happen that: If you do not get any answer it might be that nobody got into the same problem and they do not how to help you. But it is also possible you were not clear about your problem. Also, you need to be patient; it is unlikely someone will answer your question 2 minutes after you posted it.
If you find out more about your problem, it is a good idea to send another email or post updating your first message. If after 5-7 days you do not get any answer, you can try asking for help in another forum or mailing list. If you are given pointers to what software is causing the problem you can go to the second case. [0]
Mailing lists: Forums: Second case: You know where the problem is. Where you should report your bug? First, you should check in both the Debian and the KDE bug tracking systems [1] to see if the bug is already reported. If that is the case, and you are able to give more information about it, update the bug report. If the bug is not reported, then report it in the KDE bug tracking system if you think it is a problem in the application or in the Debian BTS if it is a packaging problem. If you re not sure what kind of bug it is, you can go to the first case (in the beginning of this post) and ask in the users forums and mailing lists [0]. However, you won t always get it right, and in some cases you will be pointed to the other bug tracking system. Do not take it personally; KDE developers can not help you with packaging problems and Debian packagers can t always help you with the application bugs. It might be that your problem is solved in the development version, so if possible check what is going on in the development version before report. When reporting the problem, give all the details you can about your problem. If you can detail the steps to reproduce the bug, even better. Also, if you are asked for more information, reply the best you can. Somebody is trying to help you. Be nice !:) Also, remember to be patient when reporting bugs or being asked for more information: both KDE and Debian are big projects with a lot of traffic on their respective bug reporting systems (esp. KDE), so sometimes there is not a quick reply from the developers. [1] In Debian, a lot of people report upstream issues in the bug tracking system and they think it is good and what they have to do. The truth is that in a very few cases, such as security bugs or data loss bugs, this is a good idea. But most of the time it is not useful to report problems to the people who can not solve them. Do not expect Debian/KDE maintainers to forward your problem upstream (a problem which they may well not be able to reproduce), then back to you when upstream ask for more information, then back with the information to upstream it is time consuming and we have big (wo)manpower problems. In any case, if you think the bug is very important and should be in the Debian BTS, you can report it in Debian as well as reporting it to KDE. Make sure you mention the KDE bug in the Debian bug. Third case: your problem is not a bug, just a feature request. Until now, I have talked about bugs, when you find something that is clearly not working right in your system. But what about when you want to ask for a new feature in a piece of software? In very few cases this belongs in a Debian wish list. Most feature requests apply upstream and you should tell the about your idea. If you do not tell them, it is unlikely they will implement it. Still, after reporting, you should accept it if upstream thinks it is not a good idea or it is not interested enough to implement it. Post updated on the 30th September, thanks to Rupert Swarbrick for grammar fixes.

Pablo Lorenzzoni: Ruby versus Python

This is not another rant to praise one in spite of the other (an everybody knows I love Ruby, so it would not be impartial), but sometimes people seems to live in another world and do things for the wrong reasons. I just read this blog post by Kanwei Li in which he gives 2 or 3 reasons he ditched Ruby in favor of Python. First of all, both are great languages and, although I favor Ruby, I use Python for some projects and they are not all that different. Of course, everyone is free to choose which language one favors, but Kanwei seems to be ditching Ruby out of not knowing much about it, or out of preferring one style over the other His first reason is that in Python white spaces matter. I used to think this is just a matter of style, but every now and then mandatory alignment hurts me (just try to put together a code generator and you ll notice it). Although my code is always correctly aligned, I like that it s done so because I want it that way, and not because some language demands it. Rants and more rants have been written about Python s mandatory alignment (or other languages lack of it), and I am not going through all of it Just I don t think it s a good reason to ditch Ruby After, he makes a big deal out of Ruby s ternary if. As written by him, he prefers

#python
if len(a) > 0:
        v = a[0]
        a = a[1:]
else:
        v = None
over Ruby s ternary if

#ruby
v = a.empty? ? a.shift : nil
Hey! Come on Ruby s ternary if is not mandatory It was copied from C just as a syntax sugar. You can do without it, just as in Python:

#ruby
if ! a.empty?
    v = a.shift
else
    v = nil
end
Better yet! you can use if s return as v value:

#ruby
v = if ! a.empty?
    a.shift
else
    nil
end
How beautiful is that! Python lacked ternary if for a long time, and when it finally acquired one via PEP 308 its syntax was made different from every other language! Although I don t think that is a problem, some people might think it would be better not reinventing the wheel. Next, Kanwei goes over a famous problem of Ruby: the lack of a sum method for Array. I admit it s strange, but that is completely coherent: Ruby s Arrays are ordered collection of objects and not mathematical arrays. How do you sum objects that are not numbers? Many different people will have many different answers to that, so Ruby leaves this decision for the programmer and provides basic methods to deal with collections of anything (that can be used to apply sum to numbers, if wished). So, in Ruby you have to use Array#inject to perform a sum:

[1,2,3].inject(0)    sum, value  sum + value  
Array#inject (actually Enumerable#inject) was borrowed from Smalltalk and allows you to loop through an array, building up an accumulator value as you go. When it s done, the final value of this accumulator is returned. Very useful for combining array elements, whether by summing them, building up a pretty display string, whatever. In the example above, I am initializing the accumulator with 0. If you use Array to mathematical operations and you want your arrays to work that way, you can always add a sum method to Array class:

class Array
    def sum
        self.inject(0)  sum, value  sum + value 
    end
end
Maybe it would be better if you just use Arrays as containers (as it was intended to) and implement that sum inside your own class I completely agree with Reg Braithwaite here. Kanwei also mention Python is faster than Ruby. That is true, but was more true some time ago. First of all, Python is older and has had more time to improve its speed. Ruby, ITOH, just now acquired a good VM and improvements to it finally can run parallel to improvements in the language itself, so I am expecting this to be less true every release. Python is already not getting much faster between releases, unlike Ruby (the differences between 1.8.7 and 1.9.1 are really impressive!). IMHO this is not a good reason to choose one instead of the other: if you really need speed, go for C :-) Now this is something I find interesting Kanwei has mentioned: Python is more production ready . He argues that Google is using it, so it must be good. Well I cannot argue against that: Google is really using Python. But IBM, Oracle, EA, Cisco, Siemens, etc are using Ruby so that is just a matter of preferring one or another company. Both are production ready I agree, though, that Ruby 1.9.1 has many differences from 1.8.7, and that that may be seen as some inconsistency, but Python also has changed a lot since its 2.0 version, for that matter. And the changes to Ruby brought many benefits I think they worth it. At last, Kanwei compares Python and Ruby docstrings. Here I also have to agree with him: Ruby docstrings sucks. Actually that s why everybody uses rdoc instead (and that is much more powerful than Python s docstrings). Again, I don t think that is reason enough to ditch Ruby (actually, the existence of rdoc, rubygems & friends should bring people to Ruby instead), but that is a matter of personal taste. Surely, Kanwei s reasons were easy to argue against. There are areas were Python shines much more than Ruby (and vice-versa), but those Kanwei mentioned are not among them. I think both languages are powerful enough, and both are way better than Perl or PHP, so either one you choose would be fine. Better if you don t have to choose and use both ;). If you have to, ITOH, pay more attention on how you feel while coding in each one, and not to some cheap reasons such as above. If you are a programmer, what matters most is that you ll spend a lot of time coding with any given language let that be something pleasant then.

25 September 2009

Julian Andres Klode: cupt and how to write package managers


cupt is a new package manager written in Perl by Eugene V. Lyubimkin, who previously contributed to APT. And more than all, the project makes no sense at all. First of all, there is a language issue. Implementing a package manager in Perl has some major drawbacks. One of the features of APT was it being written in a lower-level language (i.e. C++ which really is below Perl), making it possible to write applications like synaptic and python bindings which in turn lead to applications like gnome-app-install or Ubuntu s new Software Store. Furthermore, writing a package manager in Perl means that Distributions such as Emdebian might not be able to use it since they have excluded Perl due to its space requirements. This becomes even more important considering that cupt depends on even more perl libraries. This means that cupt will never be able to replace APT. Secondly, a package manager should not be designed specifically for one distribution. This is another major drawback of cupt and other package managers such as yum or zypper. The smart package manager, written in Python and funded by Canonical Ltd. is an example for a distribution-neutral package manager. Now let s take a look at package management in modern distributions. Usually we have two levels of package managers, the first being tools like dpkg and rpm which take care of installing and removing the packages and level-2 package managers implementing dependency resolvers and package retrieval from remote locations. Recently, distributions started to add a third layer named PackageKit, which shall provide distribution-independent package management user interfaces. The project was well-received by RPM-based distributions, but failed in Debian-based distributions due to not supporting debconf. Furthermore, adding a third layer just increases the possibility of problems. The right way to do package management is a distribution-independent level-2 package manager written in C. The smart project shows us that this is possible although itself fails to meet the lower-level language (C) requirement. That s why I decided to write a package manager in Vala, a GObject-based language which gets converted to C and then compiled. If successful, this project will be able to replace most of the current level-2 package managers and will also provide the same distribution-independence as provided by a level-3 package manager such as PackageKit. It is also easy to create binding for other programming language such as Python or Perl thus enabling application developers to choose the language they like most. The core of this project is a vendor-neutral library, temporarily called libapt (as the project is called APT2 for now). This library contains all the code which is not specific to a vendor i.e. file retrieval, dependency resolver, caches, etc and is then enhanced by several vendor-specific plugins, each implementing a PackageManager (interface to the distribution s level-1 package manager) and a Repository (well, repositories from which you can download packages) interface. We could even enhance the vendor-independent interface to include more details of a repository. Most repositories nowadays consist of 4 components: A meta index (Release files for Debian, repomd.xml for Fedora/openSUSE/etc.), a package index (e.g. Packages files for Debian, *primary.xml.gz on Fedora, etc. ), a source index (e.g Sources files in Debian) and a files index (e.g. Contents-*.gz for Debian). I took a look at the repository formats of Slackware, openSUSE and Fedora and it seems that this concept can be applied to all of them. So maybe all we need are distribution dependent parsers for those files. One of the most important issues with APT is its use of mmap() for the cache. Using mmap() makes it hard to grow the cache, which is sometimes needed. We see a lot of bug reports from people with too small cache sizes. We can circumvent this problem by utilizing an embedded database like SQLite for this, but we would probably loose some speed and it may be harder to maintain a flexible API. We should see what the best option is here, both ways are possible since Vala 0.7.6 includes my patches for adding mmap(), ftruncate(), mremap() and some other functions. An idea to circumvent the mmap() issue is gathering statistics about the relation between the number of repositories and the size of the cache and then using a value which is slightly above the average statistical value. The project is not very mature yet, it only includes basic library functions for downloading files and parsing configuration files, etc. You can find the (MIT licensed) code at http://git.debian.org/?p=users/jak/apt2.git. I also have some local code for repository management and multi-threaded file fetching, but it s just not ready to be merged yet. Posted in APT2, Debian

Julian Andres Klode: APT2: config parser testing


If you have an amd64 system, install the apt2 package from deb http://people.debian.org/~jak/debian/ unstable/ and run the apt2-config command. Make sure that the parser reports no errors, otherwise send me an email or leave a comment here. One known exception is that all values must be quoted in the configuration file, I have no plans to fix this (probably just deprecate unquoted strings in APT instead). The parser is not as strict as cupt s parser, but it gives you more help if something wents wrong. We also ignore most semicolons for now (they will be turned into warnings or errors later on). It is using GScanner from GLib for parsing the files. apt2-config replicates the functionality of apt-config. It currently do not read the configuration files in the correct order, so don t expect apt2-config dump to produce exactly the same output as apt-config dump . To build APT2 yourself, you need a patch for waf from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548329. Posted in APT2

Gunnar Wolf: Honduras: .hn NIC attacked/intervened by the de-facto government authorities

I was requested to forward this information to as wide an audience as possible. Possibly two months ago the legality/legitimacy of the actions carried out by the Hondurean armed forces, which captured a democratically elected president and without a judicial order or trial process forced him out of the country, starting a de-facto government, was something questionable. Each day, however, it becomes clearer and clearer the Hondureans are suffering a represive military-backed system which cannot be expected to fulfill as a trustable entity to conduct fair, credible elections. I got this message from a Hondurean friend (of course, whose identity I am not divulging) denouncing the government's invasion of the .hn domain name registry, which is handled by the Sustainable Development Network (Red de Desarrollo Sustentable RDS-HN). The National Telecomunications Comission (Comisi n Nacional de Telecomunicaciones, CONATEL) demands all domain name registration under the .hn top-level domain (TLD) to be suspende, and all the lists and databases regarding said TLDs to be handed over, detailing the IP ranges and the responsibles. They did this under the argument that RDS-HN is an Internet Service Provider (which it is not Being a registrar means they are responsible for the well-keeping of public information and of handling a public good, the .hn TLD, not that they provide any kind of regulated service to individuals or organizations), with military personnel disguised as civilians (and who refused to identify themselves). If you are interested, please read further on the text I received straight from my Hondurean contacts (Spanish) (or its unaccurate but often helpful automated translation to English, done through Google Translate) Even though this information is normally accessible via WHOIS and similar services (this only states clearly nobody in CONATEL was able to do what I just did legally and anonymously from my personal workstation), they did it in such a fashion in order to scare the operators and the society. Honduras is going through a very hard process. Whatever happens there will likely impact on the future reactions to the most retrograd and powerful sectors of society in the rest of Latin America. We do our best (even if as non-Hondureans living outside Honduras it only means raising our voices) to avoid the risk of our region going back to the sad, cruel and bloody 1970s history. [update] My friend Mave, who works at NIC Chile, sent as a comment to this post LACTLD's official stand on this regard (Spanish. English version also available). LACTLD (Latin American and the Caribbean ccTLD's Organization) clearly backs RDS-HN and condemns the illegal government's actions.
AttachmentSize
Detailing the intervention attempt of RDS-HN by the de-facto government agents (Spanish)8.61 KB

MJ Ray: Strange Spammer Sightings

I ve seen a couple of the conversation-spams described in Misspelled nemesis club: A new twist on spam? It looks like they exploit the typically weak moderation practices of many software discussion mailing lists. Do you think they are human-powered? Are they caught out if you set default_member_moderation (new list member postings are moderated) or equivalent in the list software? Google and Yahoo Groups seem to be suffering worst. Do they even have such an option? I ve also caught some strange behaviour on one of the SMTP servers we run for a customer. Does anyone know what virus or worm or other nasty authenticates but gives itself away by sending RCPT TO:<MISSING*EMAIL*ADDRESS> to SMTP servers?

Kumar Appaiah: Community at work - a success story

This is a positive event which happened to me recently in a Debian bug report, with regard to audio troubles. There are several positives, and I owe some gratitude to several people in the Debian (and ALSA) community, so I thought a blog post would be a good idea. It also shows the advantage in filing a well-written installation report to the Debian project. Here is the description of events.This was an extremely positive experience. While I agree that the number of people who would encounter this quirk may not be large, it makes me happy that at least some users who use Linux on this hardware will not have to face this issue anymore, irrespective of which distribution they use, as long as it carries an up-to-date ALSA.I wanted to share this experience with you, since this is a glowing example of how the "community" approach works perfectly for FOSS. Thanks to Elimar, for being a concerned maintainer, and to the ALSA upstream developers who were proactive in producing a fix to this problem. And, most of all, thanks to me, for filing an installation report; these things really work! (OK, tongue-in-cheek. But I did take the effort of filing it, so I deserve the credit, don't I?) :-)So, have you filed an installation report for your Debian installation? If not, I urge you to do so; I sincerely believe that filing good bugs and being proactive in helping developers zero in on the problem and fix is an important contribution to free software which any user can do. And the best way to start this process in Debian, is with an installation-report. :-)Tags: debian

Tiago Bortoletto Vaz: Irony


almost sleeping during a pathetic Microsoft s talk, so an email arrives: New Debian developer Tiago Bortoletto Vaz . Oh god! Couldn t this ticket be closed in a better moment? Of course not! :) ) Posted in english

24 September 2009

David Welton: LangPop.com Updates

It took me a while to get the September update of LangPop.com out. The reason: I had to redo the book statistics. Previously, I got those from Amazon's web service, which worked ok as far as those things go. However, recently, I ran into several problems:
  • They started requiring signatures on the requests, which meant I had to stop and fiddle with my code, which I did not appreciate. (If you have this problem and use Ruby, get the amazon-ecs Ruby gem)
  • Their results suffered from some kind of regression in any case: C, C# and C++ all showed up with the same number of results. They didn't use to show the same numbers. Not good from my point of view.
  • They were completely unresponsive to requests for information or help.
  • And for good measure, they hid their information about their products API on some other web site, with no links from their web services page, which makes it kind of annoying to look for it, and suspicious that they may be removing it at some point in the future.
All of these together made me decide it was time to switch data providers. Where to go? The answer was obvious: back to my home state of Oregon, to Powell's Books, a huge independent book seller. If you ever go to Portland, do yourself a favor and go to Powell's. It is a city block full of books on multiple floors. When I lived in Portland, I would go there before eating to give myself a reason to leave (although they do have a cafe...). And that's just the regular book store. They have another huge space a few blocks away dedicated entirely to technical books. Powell's is one of my favorite things in Oregon, and a great experience. Anyway, I decided that they're big enough, and do enough business online that I'd ask them about getting data, so I sent some email asking after what options were available. I got a very helpful answer from a real person, CJ Stritzel, who was kind enough to explain what the options were, and work with me to help find the best one for what I needed. Definitely better than "/dev/null", the Amazon message board! The API is still something they're working on, but it works well enough for what I need, and I'm quite happy with the situation. It has caused some changes in the rankings, though: they show Java books as being by far and away the most popular, which has pushed that language into the top spot in the rankings. We'll see over the coming months; I may rework the queries I'm using some as their API stabilizes and I experiment with different combinations of keywords. In any case, thanks Powell's, and enjoy the new statistics everyone.

Biella Coleman: I Pity the Fool



I Pity the Fool, originally uploaded by the biella.
When I fly, I often do so with Continental Airlines because 1) I tend to like their international flights 2) they have many flights at convenient times to San Juan, PR where I head to around 4-6 times a year. Like most airlines, their food is nothing to be desired but their gluten free option is about some of the worst food I have ever tasted. The chicken is cooked to death but otherwise entirely buck naked. Like there is nothing on it, they throw some rice in the container, and sometimes (and only sometimes) a packet of Mrs. Dash. The best part of the meal, is a coconut macaroon. After about five years of this meal (usually putting it to the side but sometimes forgetting my food and suffering from hunger) I decided it was high time to take action; I could no longer confront the bleak reality of nude rubbery chicken. So I wrote them letter. I kept it brief and knew boring would not advance My Cause, so I just decided to add some rhetorical flourish and, naturally who else came to mind than the grand master of rhetorical flourish, Mr. T. After providing the basics, like describing the truly offensive nature of nude and rubbery chicken, I drove the nail deep into wood by stating : I pity the fool that has has to survive through their gluten free meal and that naked chicken sucked more than the word suck could ever really convey (though I did duly note my appreciation for the gluten free option and that I generally liked their service). After sending off the letter I forgot about it almost immediately nor did I fly with them again for many months (not because I boycotting, I just found cheaper flights). I recently flew to Puerto Rico and lo and behold have found the gluten free option has taken a drastic turn for the better. In fact, not only was the chicken no longer naked it was in fact, fully clothed, blackened chicken, spiced to no end. And the cherry on top was a gluten free blueberry muffin and some nice fruit. Go Continental. I will never know if my letter touched the soul of some Continental office employee, working in some nameless faceless, practically windowless office park, one whose life of labor is a bit like that gluten free chicken that I so despised, rubbery and naked, in other words with no flavour or spice. But I will forever think that a dash of spice, that with the aid of the badassery that is Mr. T, one can lightly kick corporate ass to take action.

Biella Coleman: I Pity the Fool



I Pity the Fool, originally uploaded by the biella.
When I fly, I often do so with Continental Airlines because 1) I tend to like their international flights 2) they have many flights at convenient times to San Juan, PR where I head to around 4-6 times a year. Like most airlines, their food is nothing to be desired but their gluten free option is about some of the worst food I have ever tasted. The chicken is cooked to death but otherwise entirely buck naked. Like there is nothing on it, they throw some rice in the container, and sometimes (and only sometimes) a packet of Mrs. Dash. The best part of the meal, is a coconut macaroon. After about five years of this meal (usually putting it to the side but sometimes forgetting my food and suffering from hunger) I decided it was high time to take action; I could no longer confront the bleak reality of nude rubbery chicken. So I wrote them letter. I kept it brief and knew boring would not advance My Cause, so I just decided to add some rhetorical flourish and, naturally who else came to mind than the grand master of rhetorical flourish, Mr. T. After providing the basics, like describing the truly offensive nature of nude and rubbery chicken, I drove the nail deep into wood by stating : I pity the fool that has has to survive through their gluten free meal and that naked chicken sucked more than the word suck could ever really convey (though I did duly note my appreciation for the gluten free option and that I generally liked their service). After sending off the letter I forgot about it almost immediately nor did I fly with them again for many months (not because I boycotting, I just found cheaper flights). I recently flew to Puerto Rico and lo and behold have found the gluten free option has taken a drastic turn for the better. In fact, not only was the chicken no longer naked it was in fact, fully clothed, blackened chicken, spiced to no end. And the cherry on top was a gluten free blueberry muffin and some nice fruit. Go Continental. I will never know if my letter touched the soul of some Continental office employee, working in some nameless faceless, practically windowless office park, one whose life of labor is a bit like that gluten free chicken that I so despised, rubbery and naked, in other words with no flavour or spice. But I will forever think that a dash of spice, that with the aid of the badassery that is Mr. T, one can lightly kick corporate ass to take action.

Paul Wise: Adobe CMap and AGLFN data now free software!

In March 2009 I contacted Adobe about the self-contradictory nature of the license for the Adobe Glyph List For New Fonts (AGLFN) data. I did so because one of the upstreams I am involved in (fonttools) embeds a copy of aglfn.txt and I noticed the license was a bit strange. An Adobe employee by the name of David Lemon replied to say that the license would become less free than it was. I then asked him to consider using a free software license for both the Adobe CMap and AGLFN data. We discussed the benefits and drawbacks of doing this for both Adobe and the free software community. David was initially skeptical about the balance between benefits and drawbacks for Adobe and I was feeling pessimistic about the situation. The conversation ended and several months passed, with me sending the occasional ping and David being busy. Then in June he told me a new license was coming in a month. So I sent another ping on September 20th to find out what the status of that was. A couple of days later I received a mail saying that the Adobe CMap data has now been released under the BSD license and that the Adobe AGLFN data will soon follow! Please note that while this means that modifications are technically allowed, they are still strongly discouraged for compatibility reasons. Adobe has assigned an emailable maintainer (currently Ken Lunde) for these files so there is no reason that modifications should not be done upstream. You can also edit the wiki to document things or post in the forum. If you happen to meet David, Ken or Dave McAllister (who manages the Open@Adobe program) somewhere, please thank them and offer beverages. So, what does this mean for free software projects? Debian CJK users will be able to read many more PDFs with CJK characters without using any non-free packages once the new CMap files reach main. I will need to package the new AGLFN data for Debian. I will need to remove the embedded AGLFN from fonttools upstream and adapt it to use the packaged one if available or suggest the user download it if not. GNU Classpath and the other software projects using AGLFN data might like to do the same. I may consider writing a library for loading the AGLFN data, mainly as an exercise in learning how to write a good library though. Oh, and perhaps I can convince (Kenshi MUTO) my minimal level of involvement in this is worth a beer if I ever meet him :D

23 September 2009

Jo Shields: directhex@debian.org

For those who don t follow my exciting life on the IRCosphere or Tweetoscape, I m now officially a Debian Developer, complete with snazzy email address. What this means in real terms is that the pkg-cli-apps, pkg-cli-libs and pkg-mono teams now have a second person with upload rights, alongside the talented but occasionally overworked Mirco Bauer. Which should lower the amount of time that contributor packages and patches spend waiting to be sponsored. As the cool kids say: woo!

Next.

Previous.