Search Results: "ag"

29 September 2009

Jon Dowland: archfs build dependencies

build-dependencies using an XML manpage
build-dependencies using an nroff manpage
archfs has been accepted into unstable! I've been working on this package in between other tasks for quite a long time. I based my package on prior packaging work by Adam Sloboda from mentors.debian.net. The upstream package lacks a manpage, and one of the changes I have made from the initial packaging was to replace an XML-authored manpage by Adam with a roff one (based on the processed output of the XML one). I did this because I find authoring roff documents easier than XML ones. Another consequence is the build dependencies a lot simpler. We can see just how simpler thanks to Frans Pops' debtree.

Julian Andres Klode: upgrade failures


Today I wanted to upgrade my sid system again (like I do 1-3 times per day, especially when I have nothing else to do). First of all, I was hit by a bug in APT Could not perform immediate configuration (2) on perl . I worked around it by running the latest git commit of cupt, which then started to upgrade my system. At some stage however, after upgrading parts of perl it seems, the progress stopped and perl complained that it could not find English.pm anymore. I tried to manually install the perl packages using dpkg -i, but this did not work. Then I just thought I should just try to unpack it and run dpkg -x <package> / on the perl packages. Now dpkg -i was working again and I could run dpkg -i on the packages again and continue my upgrade using apt-get. Posted in Debian

Kartik Mistry: 3 years!


* It has been just 3 years since I uploaded my first package, Xosview!
xosview (1.8.2-10) unstable; urgency=low * New Maintainer (Closes: #390066)
* standards-version to 3.7.2 Kartik Mistry Fri, 29 Sep 2006 10:16:09 +0530

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.

28 September 2009

Martin Meredith: Dear Lazyweb

Is there a decent dotfile manager packaged in Ubuntu/Debian? I need something that ll let me have a repository of my dotfiles and manage them easily amongst multiple locations. I ve seen a lot of homebrew implementations of something like this, I m just wondering if there s something that s worth using already out there!

Jon Dowland: Ruby vs. Python

Pablo Lorenzzoni writes to defend Ruby in response to Kanwei Li's April post about dropping it in favour of Python. Kanwei's post has some questionable points that Pablo rightly picks up on (being forced to use ternary operators?) and some that he doesn't ("LOC matters, people."). Just like Kanwei, some time ago I decided to ditch Ruby and focus on Python for the tasks that I would normally use Ruby for. The two final nails in the coffin for me were Interestingly, Pablo cites rubygems as one of the points in favour of Ruby. Whilst both Pablo and Kanwei mostly focus on technical details for their attack and defence of Ruby, these two points for me were largely social, community issues.

MJ Ray: Concentration, Community and Cooperation

I read the news about the launch of Ubuntu User by Linux New Media AG with some sadness. I believe that free software is stronger because of the informal cooperation between different distributions that usually do different jobs. It lets us see what s growing in our neighbour s garden. I m a debian developer, but I don t subscribe to many debian-specific products or services because I like the broader view. Also, at a generally-economically-weak time when some more general publications seem to be dying and restarting, concentrating on the Ubuntu users seems like it probably won t be a big enough audience to sustain a title. The temporary loss of readers could also push other multi-distribution magazines over the brink. Now, I use and support Ubuntu systems from time to time (among others), but it feels like Ubuntu attracts this sort of anti-social single-distribution concentration more often than any other current one. Its users seem even more fixed on it than Gentoo s users, which is almost the opposite of what I expect from a distribution which claims Ubuntu and Free Software are about collaboration and working together . So why does this happen? Are any sociologists researching whether there are really narrower horizons among Ubuntu users than others? Have any Ubuntu community leaders questioned the lack of collaboration with Free Software in launching an Ubuntu-only magazine in a recession?

27 September 2009

John Goerzen: How To Record High-Definition MythTV Files to DVD or Blu-Ray

I ve long had a problem. Back on January 20, I took the day off work to watch the inauguration of Barack Obama. I saved the HD video recordings MythTV made of the day (off the ATSC broadcast), intending to eventually save them somehow. I hadn t quite figured out how until recently, so there they sat: 9 hours of video taking up about 60GB of space on my disk. MythTV includes a program called mytharchive that will helpfully transcode your files and burn a DVD from them. But it helpfully will transcode the beautiful 1920 1080i down to DVD resolution of on a good day 720 480. I couldn t have that. Background My playback devices might be a PC, the MythTV, or the PlayStation 3. Of these, I figured the PS3 was going to be hardest to accommodate. ATSC (HD) broadcasts in the United States are an MPEG Transport Stream (TS). Things are a bit complicated, because there may be errors in the TS due to reception problems, the resolution and aspect ratio may change multiple times (for instance, down to SD for certain commercials). And, I learned that some ATSC broadcasts are actually 1920 1088 because the vertical resolution has to be a multiple of a certain number, and those bottom 8 pixels shouldn t be displayed. Adding to the complexity, one file was 7 hours of video and about 50GB itself. I was going to have to do quite some splitting to get it onto 4.7GB DVD+Rs. I also didn t want to re-encode any video, both for quality and for time reasons. Attempts So, I set out to try and figure out how to do this. My first approach was the sledgehammer one: split(1). split takes a large file and splits it on byte or line boundaries. It has no knowledge of MPEG files, so it may split them in the middle of frames. I figured that, worst case, I could always use cat to reassemble the file later. Surprisingly, both mplayer and xine could play back any of these files, but the PS3 would only play back the first part. I remembered this as an option if all else failed. Next, I tried avidemux. Quite the capable program and I thought I could use it to cut my file into DVD-sized bits. But I couldn t get it to let me copy the valid MPEG TS into another MPEG TS it kept complaining of incompatible formats, but wouldn t tell me in what way they were incompatible. I could get it to transcode to MPEG4, and produce a result that worked on the PS3, but that wasn t really what I was after. Then, I tried mpgsplit. Didn t recognize the MPEG TS as a valid file, and even when I used a different tool to convert to MPEG PS, acted all suspicious as if it bought the MPEG from a shady character on a grungy street corner. dvbcut I eventually wound up using dvbcut to split up the ATSC (DVB) recordings. It understood the files natively and did exactly what I wanted. Well, *almost* exactly what I wanted. It has no command-line interface and didn t have a way to split by filesize, but I calculated that about 35 minutes of the NBC broadcast and 56 minutes of the PBS broadcast could fit on a single DVD+R. It worked very, very nicely. The resulting files tested out well on both the PS3 and the Linux box. So after that, I wrote up an index.txt file to add to each disc and a little shell scripting later and I had a directory for each disc. I started burning them with growisofs. Discs 1 and 2 burned well, but then I got an error like this:
File disc06/VIDEO/0930-inaug-ksnw-06.mpg is larger than 4GiB-1.
-allow-limited-size was not specified. There is no way do represent this file size. Aborting.
Eeeeepp. So apparently the ISO 9660 filesystem can t represent files bigger than 4GB. My files on disc 1 had represented multiple different programs, and stayed under that limit; and disc 2 s file was surprisingly just a few KB short. But the rest of them weren t. I didn t want to have to go back and re-split the data to be under 4GB. I also didn t want to waste 700MB per disc, or to have to make someone change video files every 15 minutes. So I decided to investigate UDF, the filesystem behind Blu-Ray discs. mkisofs couldn t make a pure UDF, only a hybrid 9660/UDF disc that risked compatibility issues with big files. There is a mkudffs, but it doesn t take a directory of its own. So I wrote a script to do it. Note that this script may fail with dotfiles or files with spaces in them:
#!/bin/bash
set -e
if [ ! -d "$1" -o -e "$2" -o -z "$2" ]; then
   echo "Syntax: $0 srcdir destimage [volid]"
   echo "destimage must not exist"
   exit 5
fi
if [ " id -u " != "0" ]; then
   echo "This program must run as root."
fi
EXTRAARGS=""
if [ ! -z "$3" ]; then
   EXTRAARGS="--vid=$3"
fi
# Get capacities at http://en.wikipedia.org/wiki/DVD+R as of 9/27/2009
SECSIZE=2048
# I'm going to set it a few lower, than capacity 2295104 just in case.
# Must be at least one lower than the actual size for dd to do its thing.
# SECTORS=2295103
SECTORS=2295000
echo "Allocating image..."
dd if=/dev/zero "of=$2" bs=2048 "seek=$SECTORS" count=1
echo "Creating filesystem..."
mkudffs --blocksize=2048 $EXTRAARGS "$2"
mkdir "$2.mnt"
echo "Populating..."
mount -o rw,loop -t udf "$2" "$2.mnt"
cp -rvi "$1/"* "$2.mnt/"
echo "Unounting..."
umount "$2.mnt"
rmdir "$2.mnt"
echo "Done."
That was loosely based on a script I found on the Arch Linux site. But I didn t like the original script, because it tried to do too much, wasted tons of time writing out 4.7GB of NULLs when it could have created a sparse file in an instant, and was interactive. So there you have it. HD broadcast to playable on PS3, losslessly. Note that this info will also work equally well if you have a Bluray drive.

John Goerzen: Jacob Is Three

Jacob s third birthday was Saturday, and I thought I ought to give a bit of an update on him. I ll start with his exactness. Jacob has become very particular about certain things. This morning, I was getting him dressed for church. We had this conversation:
Me: OK Jacob, it s time to get your pull-ups on. Jacob: No, Dad! Not pull-UPS. I don t have free (3) of them! I have one. It a pull-UP. Me: OK. Let s put it on Now, let s put on your pants. Jacob: Daaaad! Not pants! They SHORTS!
So yes, Jacob is trying to correct me about plurals. Also, when I sing Home On The Range to him at bedtime, and get to the line that says, and the skies are not cloudy all day, Jacob will look outside, and point out, the skies ARE cloudy today! (Even if they re not.) But the big thing is guitars. Terah wrote about how this happened. But suffice it to say that he s been almost all-guitar, all the time. At dinner time, he ll hold a spoon across his chest and strum the lots of pretend strings over the big end. Outside, he ll find leaves from irisis, and excitedly yell, I have LOTS of guitars! Pretty soon it wasn t just him that needed to play guitars. He d hand an iris leaf or a spoon to me and say, shall you play it too? So I d start strumming my leaf, and he d smile happily for a second. Then, No, not like that! This way! He meant I was supposed to hold it in a certain position, but it was not always clear exactly what he wanted. Then at supper Friday night, we had some family here, and Jacob said, Shall we ALL play guitars? And he d keep repeating it until we all did it. And he spent about 5 solid minutes getting us each to hold our spoons in the proper musical position. Then he was happy. So you can imagine the excitement when he got a guitar from his grandparents on Saturday. It s a child-sized one, but a real one, with metal strings. He proudly went around sitting on many different chairs to try out his guitar on each one. He played it in the car on the way home. He strummed it at home. He skipped dessert so he could play. And he cried every time he had to put it down: at dinner time, at bedtime last night, when it was time to go to church today. The next thing he wanted was for everyone to sing while he played the guitar. That was a bit difficult, since, after all, it is a 3-year-old playing a guitar he doesn t know how to play. He seemed to really enjoy it though. I have some great photos of him playing his guitars I ll be uploading hopefully this week.

Carl Chenet: Python-keyring in Debian


I have been introducing the Python Keyring library in this previous post. At that time I was looking for a sponsor and thanks to Piotr O arowski, python-keyring is now available in Sid. What for ?
  • You can access the keyring you use on your system (Gnome-keyring, KWallet) to store your app s passwords.
  • It s a unified access to keyrings that the Python Keyring library provides, meaning you can easely write your own backend for your keyring software.
  • You can create your own keyring, crypted on a file, still with the same library.
  • Keyrings are cool and this library provides a great way to play with them, from your Python applications.
  • When mature, the Keyring library will be integrated in the official Python module getpass, which means you re not learning yet-another-soon-unmaintained library.
How ? The source package provides three binary packages :
  • python-keyring : the Keyring library without the support of both Gnome-keyring and KWallet.
  • python-keyring-gnome : the support for Gnome-keyring.
  • python-keyring-kwallet : the support for KWallet.
If you use passwords in your Python apps, it s worth to give python-keyring a try.

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

Zak B. Elep: Help Ondoy Victims

Hey $WORLD, Philippines needs your help! We just got hit by ondoy, and there seems to be a couple more storms coming in. You can help out via donations to the Red Cross/Red Crescent. If you have friends or family in Manila, you can check the RescueHub and Sahana lists for persons missing and in distress. And lastly, pray to your $DEITY for us (or do what works best for you.) UPDATE: Google is helping out too. The local Red Cross is also accepting donations. UPDATE 2: There's a new site up with additional info on the relief efforts.

Eddy Petri&#537;or: Remus Cernea - how media blocks information

I wrote in my last post about my decision to support Remus Cernea's candidacy to he Romanian Presidency.

The fact is that main stream media ignored for a whole month his candidacy and the fact that Radio Rom nia Actualit i (Radio News Romania) removed an internet poll (true, not a social poll, but one of the percepted image of the Internet users) from the site www.politicaromaneasca.ro which credited him with 30% of the preferences of the visitors.




Here (Romanian) is the article on Remus' blog in which he talks about this. And no, he did not set himslef on fire, he set on fire a picture of himself as a symbolic gesture against the media blockade.


As a proof that the poll was not doctored, the first article mentioning Remus Cernea in a search for "presedintia romaniei alegeri" is the 5th unsponsored hit on google.ro. There is an obvious correlation between the position of other candidates in the results and the hits on Google.


If you want to support Remus' candidacy, please sign the support list(ro) or even collect signatures (ro) for him. He needs 200 000 signatures to be able to candidate, a task which is even harder for a candidate without a big party behind him.

You can contact me at eddy.petrisor+remuscernea _at_ gmail.com, for more details or you can contact Remus directly.

Francois Marier: OpenStreetMap/OpenLayers and Privoxy

I have been meaning to switch to OpenStreetMap for a while now, but the fact that it didn't work with Privoxy was holding me back. I don't enjoy surfing the web without protection and Privoxy is one of the most convenient ways of enhancing one's browsing experience on Debian and Ubuntu.

So I decided to spend some time trying to figure out what was wrong. If you want to skip the details and just get the fix, scroll down to the bottom of this post for the solution.

Finding all affected URLsIn order to get a list of all of the URLs that Privoxy filters when one visits the front page of OpenStreetMap, I did the following:

Comparing the filesArmed with the list of all affected URLs, I downloaded them through Privoxy using wget into a privoxy/ directory:
$ http_proxy=localhost:8118 wget URL
Then I downloaded the same URLs without Privoxy into a noproxy/ directory:
$ http_proxy= wget URL
To find identical files, I ran md5sums in each directory:
md5sum *
After deleting all identical files, I was left with:
index.html
OpenLayers.js?1251388304
Which I diff'ed together:
colordiff -u noproxy/FILE privoxy/FILE
The first file, index.html did not have any relevant changes, but I noticed in the second one that a few of these
this.moveTo(this.position)
were replaced with
''.concat(this.position)
Searching for "concat" in /etc/privoxy/, I found that the "jumping-windows" filter was the culprit. After disabling it, all of the problems went away.

I have filed a bug upstream.

The SolutionHere's what you need to put in your /etc/privoxy/user.action:
 -filter jumping-windows 
.openstreetmap.org

26 September 2009

Gunnar Wolf: The bad and the worse; Representative democracies' minimums

Martin rants about the German electoral system. From his rant, I'll pick up only two points And I'll try to connect with Toxicore's excelent (Spanish) blog post, where he quotes political analist Denise Dresser. Dresser has made a great point: Our probably-imposed, legitimacy-impaired president Felipe Calder n has requested the society to talk good about Mexico, to project a positive image of the country. Dresser says, yes, there is a lot of good to talk about the country, and we should emphasize on its richness and beauty, invite people to come and visit, to know what the country is really like. But at the same time, it is our duty to talk bad about the bad areas and decisions of our government, as that is the best (if not the only) thing many of us can do to really get things to happen That is what we can do to push our country's good things forward, to make the country sustainable, to pull attention towards what needs (such as the very very deplorable cases of censorship, human rights violation, ecosystem predation we have seen in the last years). Anyway... What did I want to comment about Martin's post? He criticizes Germany's law requiring a 5% quota for a party to have parliamentary representation. In Mexico, the minimum is 2%. Most people agree, though, that it is too low, and that we should push to increase it. Why? Because the money that is spent in supporting the party system. In Mexico, when a political party fails to get 2% of the vote, it is basically disbanded and it is very hard for it to regroup, to compete again. Many people believe we should aim to a political system with as few political parties as possible (such as the semi-democratic system they have in the USA). I strongly prefer the system found in most European (and even many South American) countries where there is a real wealth of ideological positions represented, and where governments have to be formed by agreeing to form coalitions, as it is almost impossible for them to get full majority. I would much rather see Mexico march towards a parliamentary-based political system, away from the presidential one. Of course, that is almost impossible to expect. With the current political system, we are bound to have forever few monolithic, meaningless political parties. We will likely converge on three blocks, following the current three major blocks (leftoid PRD, centroid PRI, rightoid PAN). They are different in some important senses, yes, but in general they are much the same. I don't hold any hopes to ever see something like the Pirate Party appearing in our system...

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.

Christoph Haas: This should work fine nowadays (about vino, Compiz and wrong optimism)

I ve been back from KDE (4.2!) to Gnome and with the mighty powers of Compiz my desktop is the envy of my Windows coworkers and still geeky functional. Well, somehow functional. For a while I wondered why I can t properly use VNC to remote-control my desktop from home. The connection works and I see the desktop but nothing seems to happen when I click or type. Now I figured out the desktop in the VNC client window is just not refreshed while my mouse and keyboard actions really do what they were supposed to on the VNC server. This is my sad tale of how I learned that a regression may mean driving the motorcycle to work in the middle of the night after cursing VNC. :) After a little searching through the lazyweb I found out that it s a bug reported on Ubuntu already. Apparently Compiz doesn t use the XDAMAGE extension properly. Somehow when using the graphics adapter s magic 3D powers X11 loses control of what sections are changed I m not an X11 guru. At least the client doesn t know when to redraw areas of the screen that have changed. The suggested workarounds were pretty ridiculous. Start another x11vnc session without compiz and connect to that. Very funny. I want to control my running desktop not create a new one. So I switched off compiz at work and voila VNC works again. Some eye-candy and shortcuts are gone but remote controlling the desktop is far more important while im on call. But I quickly missed Compiz. The missing eye-candy wasn t that bad. But metacity s window placement algorithm sucks as badly as back in 2002. As if I can hear it whisper: I have no idea where to put that stupid window. You tell me. I researched a little further and somehow the bug is known to Gnome, too. And other users suffering from the problem are pointed to the VirtualGL page of Wikipedia. Apparently the problem was fixed for several people until a regression was reported where things failed again. Seems like the vino developers removed the piece of code that detected the use of 3D window managers as a 2008 christmas present. Their reason: This should work fine nowadays. Hell, no, it doesn t! Somehow I downgraded vino to version 2.24.1-3 and ran the vino server manually (/usr/lib/vino/vino-server sm-disable) to see if it prints any error message. Indeed it does:
Composite detected, disabling XDamage extension.
This is a workaround while XDamage extension does not work correctly with 3d desktops.
Hopefully it will work at next vino release.
This time it worked well, too . I upgraded to the current version 2.28.0-1 (as in unstable by today) and suddenly my VNC connection had the same problems again. Aha! Let s try the Lenny version 2.22.2-1. Works, too. This has taken me hours to debug. Finally I know I can report a bug against the vino package. I wonder how long it would have taken a mortal to figure that out. :( [Sorry to my sponsorees who's package sponsoring requests were delayed again due to this mess.]

Julian Andres Klode: Results of the APT2 config parser testing


Thanks to those who have tested it (and/or will test it). The results where helpful and resulted in Bug#548443 filed against localepurge and GNOME Bug #596429 against glib. The first one is a case where quotes where used inside a value, although this has never been defined to work, and the second one is a problem with GLib s GScanner not ignoring multi-line C-style comments although it was configured to do so. I also fixed some bugs in APT2, like the missing build-depends on libgee-dev and the configuration parser now accepts . , _ , + in the option name. I also talked with Eugene about some differences in the way cupt and APT2 handle quotes and about some other parts of the configuration format. Seems this was a good day. Posted in APT2

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.

Martin F. Krafft: Voting denied, enter pirates

This coming Sunday, Germany is voting its parliament for the next four years. I wanted to participate remotely, but they didn t let me. The letter, inviting me to order the voting forms, was sent too late. Instead of ordering and waiting for the voting forms, hoping for them to arrive back in Germany before the municipal agency stops all their work at 16:59 on Friday afternoon, I filled in the fields in a way to give my mother full authority to submit my vote. On the document, it only said that she would need a notary procuration, which she has. When my mother tried to vote in my name, they refused her: the vote has to be confidential, and proxies may only vote for disabled people, or those who cannot read. I can understand half of the motivation behind this it guards against abuse but the bottom line is that I am now unable to cast a vote. Democracy stabbed by bureaucracy. Well, democracy to the limited degree that we have it in Germany. I do not mean to criticise at this time that voting in Germany means to place trust into people you d rather not trust, but once they get majority, they can do whatever they want for four years. The specific shortcoming in our democracy on which I would like to focus is the five percent clause , which states that a party needs to reach 5% of votes before they can enter the parliament; if those 5% are not reached, all votes for the party are basically lost. I suspect that this clause is what s keeping back a lot of people from electing Germany s pirate party, which focuses on the importance of freedom in today s media-centric and interconnected world. It seems doubtful that the Piratenpartei will reach the limit this round, but given all the attention they recently received, as well as their plain cause, I would not be surprised if they did. I think it is important for people to vote the party they want, without letting the 5% limit discourage them. Anything else would be undemocratic. Let s return to the pirates: it s paramount for the government to consider freedom and related issues, and to put clueful people on the job. The Piratenpartei is the only party that approaches the issue properly, all the others are just too happy to succomb to castration of personal freedom for such lofty goals as anti-terrorism, or the containment of child pornography. I don t like terrorists, and I think child pornography is among the most horrific ways to abuse defenceless humans in irrevocable ways that I can imagine. But I also don t like losing my deodorant to airport security, cameras tracking my every move, (diletantic) censorship on the Internet, and lack of control over my own data. Time to put an end to that, and to solve problems without castrating freedom. Benjamin Franklin is credited with saying: they that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. The Piratenpartei is probably not capable of leadership at this point, for they are young. But they can help the leading party maintain a bearing. That s what the Greens did, successfully albeit slowly, and I appreciate that the pirates are approaching the matter before it will be too late. The media have not missed a chance to try to stomp over them in recent months, but at the end of the day, after all the slander and some obvious mistakes on the side of the party, I still see a group of people prepared to fight for freedom with an open and honest approach. The run-ins with the media are hardly about content, it seems more that the Piratenpartei is simply unable to become part of the sensationalist mash which is our media-politician ensemble. And I think that s good. I appreciate a party communicating not via their PR office, but with new media, like blogs, or e-mail. I appreciate that their people maintain the personality of a human trying to do politics, not a politician trying to come across as human. If my municipality had let me vote, I would have selected the pirates. They may not make the 5% this year, but I would not let that be a reason against them. If one believes in democracy, then it s important to do it right.

Next.

Previous.