Evaluating programming languages for playing with Debtags
Since having workable bindings for the C++ Debtags libraries seems
to be still a bit in the future, I'm planning to build a bit of native
infrastructure in some higher level language. First step is seeing what
language I could start playing with.
The problem
At the most basic level, in Debtags we have a number of packages,
each of which have a set of tags.
The way I usually save tags is a file with the format:
package1, package2: tag1, tag2, tag3 package3: tag1, tag2
That is, every line has a list of packages with the same tags,
and the list of their tags.
Since any script I'm going to write has to at least be able to parse
the data into something like a
package -> tags hash, then print it out.
Let's see how perl, python and ruby perform.
Tests
C++
...
Perl
...
Python
Then comes Python. I'm not much of a Python fancier, but I'm rather
attracted by the new set native type introduced with
Python 2.4, which seems to have most of what I need nice and done.
...
Ruby
Finally, Ruby. I like to use Ruby. In this case, however, it lacks
a native set implementation, although it has a set module which is
implemented using a hash.
...
Results
As much as I don't fancy Python, it looks like it's currently the best choice for playing around with Debtags. I hope the native sets will bring me joy.
If in the future I'll be asked 'how come you chose Python for this Debtags thing?', I can point to this page.