Search Results: "xam"

7 December 2007

Erich Schubert: Intel wireless (ipw3945) still broken

It's now far over a year that the ipw3945 driver doesn't work reliably for me on stock Debian kernels. From other blogs I figured it only occurs in SMP situation, and even then not on all systems.On my laptop, I can reproduce it rather reliably: connect to the WPA2 encrypted network at my parents and transfer a file to one of the other computers on the network. An IO rate of a couple hundred kb/s will make the wireless card disconnect frequently. Often I end up having to flip the kill switch twice to get it working again.I have however found a workaround: use a kernel with preemption enabled.So it seems that there is something in that driver which will in certain situations trigger a big lock. Actually you can even hear that - sound will also be interrupted shortly when the wireless dies. Without preemption enabled, this will make the wireless card run into a timeout and reset itself.I don't know yet if this completely fixes it. But other comments in the bug report at bughost suggest that it's at least much more stable. bug 1085 seems another instance of this bug and is open since june 2006. As good as their OSS record is, it seems that Intel has given up on fixing this bug.There are other drivers causing similar problems. For example the dcdbas driver for the Dell Bios used to check for the wireless kill switch, display brightness and such functionality. When I load that driver, hal or NetworkManager will interrupt my sound every few seconds when polling the kill switch. Maybe they would just need to get hold of a system affected so they can diagnose it properly themselves. There have been at least 20 people reporting this bug by now, most of them on Dell systems.

6 December 2007

Eddy Petrișor: I am laptop-less, but disk-ful

Today I went for the second time[1] to emag's service[2] to have my laptop's[*] battery replaced since it was powering the laptop only for 15 (yes, fifteen) minutes. This after only 11 months since I bought the laptop[**].

I didn't observed this drastic reduction until recently (last time I remember was about 1 hour and 50 minutes, back in August), because I wasn't so mobile since August.

To make the long story short, I had to: wait, wait, argue, wait, argue, talk normally to the manager, wait, wait, argue, argue, observe sheer contempt from the personal when I asked again for the manager, talked normally to the manager, left after 4-5 hours wasted (+2 yesterday).

All this just to be able to keep my data safe by holding on to my hard disk, since they insisted they wanted the whole laptop[3], and making them write on the warranty receipt they were the ones who pulled out the HDD (I might be over-cautious/paranoid, but I wouldn't trust emag with the garbage bin).


Now I am on a forced vacation away from Debian for an undefined time, although I might be able to send mails and do make small patches from work.


Hey, emag:


[*] Dell Inspiron 6400 / E1505
[**] when I think the long battery time was one of the most important points, it looks ridiculous now to have such a bad degradation in such a short time

[1] first was yesterday, but due to some support person's incompetence I had to postpone - I asked two questions, they gave me two wrong answers
[2] after all this I wouldn't recommend emag to anyone
[3] You might ask why would they need the whole laptop for a clear 'battery is broken' complaint? Apparently "the service can't test the batteries without the laptop". They probably have neither any spare laptops nor dedicated equipment to measure batteries.

Christian Perrier: I'm Indian-da

I think that all Debian developers (including the brand new ones) will be delighted to learn that we not only have 4 indian DD's now, but we have an Indian DPL, at least according to his own words after a few beers. The first two days at FOSS.in have been quite busy. Sam's first talk ("Giving back to the community, how does Debian perform") was really interesting with ideas about a possible place where various distributions' patches to software could be collected and made available to upstream authors. I then had two talks in a row, which I feared a little but went pretty well. The first one was a brand new for me ("Contributing to Debian for dummies"). I tried to enforce the idea that contributing to Debian might be fun and opened to everybody, not only deep hard-core hackers (I funnily took my friend Andrew McMillan as example for hard-core hackers....). To make the talk less boring, I did choose to illustrate the various ideas I was explaining with photos taken from the various Debian-related events I attended last years. So, many of my Debian friends will recognize themselves on my talk slides. I hope you people won't mind being taken as examples (I should maybe have asked your authorization before....in case some of you want to sue me for using your public image). The other talk I has was a quite standard i18n talk. As I don't like doing the same talk over and over, I changed that one slightly to make it more suitable for the local audience, putting focus on localization for languages of India (even doing some of the "famous" bubulle-style maps especially for India). In case you aren't bored with that one, here's the link to slides. The next day features some other projects days. I will put focus on talks from the Indlinux project day. Indlinux is indeed an amazingly active project and the small room was entrely packed with people attending quite technical talks about Indic computing, Text-to-Speech, Indic languages spellchecking and such really specific topics. I also attended a very promozing talk by Dimitri Glezios, in the Fedora project day room, talking about Transifex, a very promising localisation material collecting platform with the interesting ability to be able to push translations back to thei respective upstreams, avoiding one of the major drawbacks of tools such as Rosetta. I'll have to come back on that one. Now for the Main Confeence days....that will be busy, too, for sure ! And I didn't even mention the awful Mozilla party we had yesterday night. Some people will remember that one.

5 December 2007

Biella Coleman: Rethinking Blogs: The importance of fewer posts and preaching to the choir

It is hard to believe that I have been blogging for over five years. And what is clear is that being an assistant professor is not all that conducive for blogging and this is materially evident in my sparse posting pattern over the last few months. It has been particularly bad in the last month thanks to a week long international trip, back-to-back sickness over Thanksgiving week, and finally going to Washington D.C. for the AAAs. But this retreat from blogging as well as teaching on so-called Web 2.0 software, like blogs, has made me rethink the value and limits of the craft of blogging and so I am going to take some time (that I feel like I don t really have, but oh-well..) to write them down as I am preparing a short piece for on the politics of Web 2.0 and I hope I can transfer some of these ideas there. So as I have already mentioned, I am an now infrequent blogger. Prior to the era of RSS, this could have meant the death of my blog because if people went to visit my page and there was no new post and then this happened a few more times, they would just stop visiting. The magic of RSS is that it brings the blog post to you and this alters the landscape of possibilities within the context of what has been nothing short of a seismic explosion of blogs. What I am finding and this will be no surprise to anyone is that it is just too difficult to keep up too many of a certain class of blogger the prolific poster who posts medium to long posts and worse, nearly everyday! To make a point about the effects of this, allow me to tell a story: Two blogs I really like are Joe Reagle’s blog on Open Communities as well as Tenured Radical. Both provide captivating posts but I recently unsubscribed to Radical Tenure and not Joe Reagle s. Why? My decision was purely pragmatic. Because she posts way too much, I just can t keep up. If I stop reading her blog for 2 weeks, and then pay a visit via bloglines, I am faced with a blogolanche and I am trying to avoid, at all costs, overwhelming situations. On the other hand, if I stop reading Joe s blog for 2 weeks, there may be one or two posts so I feel like I can spare the time to continue reading. Ironically, I will now visit Tenured Radical every month, much as I did prior to the RSS era, just to take a quick scan and see if there is anything I must read. There is another class of blogs, such as Sivacracy, that update their site frequently but the posts are tidy and short and so I can usually keep up and they provide important news for my projects. But the type of blog that provides longer ruminations has proliferated (and I really like reading those) but I suspect that as the blogosphere has expanded, less people can commit to those types of blogs. In other words, today, you may hang on to more readers, if you only blog 1 to 2 times a week instead of 3-5 weekly posts that are medium to long in length. Now I may be completely OFF the mark with this by generalizing my own experience so I would be interested in hearing people s experiences or better, if anyone could point me to someone who studies these types of pattern, I would really appreciate it. On a related note, last week I taught a now famous piece by Cass Sunstein on political balkanization on the Internet that is in part secured by blogging. His core argument, which I think stands to some degree, is that the blogosphere is less an arena where people with different inclinations and views meet to debate, and thus change their views, but is an arena where your pre-existing ideas are reinforced because you are simply reading and debating with people who hold your worldview. As I mentioned, I think this is true in so far as you don t see people on the left and right engaging in some debate that substantially transforms their ideas. But the argument is faulty or missing something crucial about the nature of politics, in so far as that the so called left or right or so called liberal and conservative positions are truly not unitary so that if different types of liberals/lefties are engaging with each other to change positions and ideas within that group, well then, the critical function of blogging is in fact well and alive. To state using an example, there are plenty of liberals who, in my opinion, could use a little radicalization and perhaps this is happening in the blogosphere because people come across a spectrum of ideas and positions from within their political pole. Finally and this point really is not mine but I am poaching it from Jeff Juris who made it last weekend at the AAA meeting during his presentation on activist videos. One of his findings was that activists were the only ones watching video s documenting protests when hosted on radical political sites like Indymedia. When they were placed on Youtube, the audience expanded considerably: conservatives were also watching them, but they effect was not to make their more sympathetic toward the left and their political points, but simply to reinforce their position, which is evident in the archived comments expressing their great distaste of the left. This is a perfect example of the Balkanization that Sunstein talks about but with an important reversal: it comes from confronting difference not avoiding it! But Jeff made the excellent point that there is a critical function in preaching to the choir: it ensures that the choir will not stop singing! That is, your political passions are not simply ensured, they must be renewed and given the massive amounts of apathy peppering our population, renewal by confronting what you believe in, is vital. So my advice is keep producing posts, keep reading even if it tends to be stuff you already believe in BUT please, post less. Less, I think, is really becoming the new more….

Russell Coker: The Meaning of Godwin s Law

A widely cited unofficial rule on the Internet is known as Godwin’s Law [1]. In it’s original form this rule states that “As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches one“. Mike Godwin noted that “overuse of Nazi and Hitler comparisons should be avoided, because it robs the valid comparisons of their impact“. The purpose of noting and publicising this is to reduce such false comparisons. It’s often used as a rule for conduct in various fora where it’s regarded that if you compare your opponent in a debate to Hitler or unjustly call them a Nazi then the debate is over and you have lost. In more recent times due to successful application of Godwin’s Rule the frequency of inappropriate comparisons has dramatically decreased. This combined with the small number of people on the net who are interested in discussing historical events that happened ~60 years ago (and the even smaller number of people who are interested in learning about them) means that the possibility of robbing valid comparisons of their impact is small. Now a large part of the use of Godwin’s rule is because it’s regarded as an ad-hominem attack that distracts everyone from serious discussion more than most such attacks. To see examples of this you merely have to do a Google search for “Bill Gates” and “Hitler” (currently 597,000 web pages have both those terms). Note that the original reason for avoiding such false comparisons is given to sustain the impact of legitimate comparisons. It is quite legitimate to use the term Nazi when describing anyone who wants to implement mass-murder and slavery on a national scale (or any of the other awful things that the Nazis did), or the propaganda and other mechanisms that the NSDAP used to gain power. It is also legitimate to make historical comparisons, comparing Stalin to Hitler is historically valid (both were awful tyrants that committed a similar range of crimes) - I’m not going to compare them in this post but I merely note that such a comparison is valid (and is the subject of much debate by people who are interested in history). I’ve just had a religious zealot named Elder Dave accuse me of breaching some new version of Godwin’s Law. I believe that my mention of the fact that his religious group (which wants to deny homosexuals the same legal rights as all other people) has some beliefs in common with the Westboro Baptist Church [2] is valid. The Westboro Baptist Church seems to be the leading organisation in the English-speaking world for demanding legislation to discriminate against homosexuals. Anyone else who demands such legislation IS trying to achieve similar aims and should expect this to be noted by everyone who has any knowledge of what is happening in the world. Religious groups are given a lot of freedom to discriminate internally (EG “Priest” is one of the few jobs that can be denied to a qualified woman without any legal recourse). Also I think that most people will agree that it’s acceptable for them to advocate self-repression (EG the book What Some of You Were [3]). But when they try and get legislation enacted to institutionalise such discrimination I believe that they are going too far. As for why the 95% of us who aren’t gay should be bothered about this issue, there’s the famous poem by Martin Niem ller which is known by the line “First they came for the Jews” [4] (actually there are a few versions of the poem some of which don’t mention Jews - check the link for details). Here’s another Wikipedia link for the same poem [5].

Stefano Zacchiroli: pts debian style

On wiki.d.o and PTS styles [Eddy, you're totally right in stating that it is a pity to base the PTS reword on the wiki.d.o current theme. Actually, it would have been a pity :-), indeed after some people commenting that the wiki.d.o current theme is just one of moin's default I've made up my mind. In particular, thanks to Dan Callahan who contributed a new CSS, we now have a really more Debian-ish theme for the PTS. Here are some samples though, as you can guess from the URL, these links are not meant to last. I've been quite busy since my return from Extremadura and that's why I haven't mentioned the new colors on planet; I guess the next you'll see is directly a change in the PTS pages in the next days or something. On the reworking of the wiki.d.o theme though, I think making it resemble www.d.o is not the way to go. After all there have been many proposals to change it because a lot of people think it is not that nice, and many more think that it feels very old-fashioned, actually: too much old-fashioned. (The fact that those actual proposals haven't been turned into a working reality is sad, but somewhat unrelated ...) I would much prefer to see a wiki.d.o theme that is somewhat Debian-ish, i.e. it uses our "social colors", but which feels less ancient than current www.d.o. I think Dan's work is an example that something in that spirit can be achieved, maybe we can collaborate? (Well, actually you can, I'm nowhere near a web designer :-) )

Matthew Palmer: Strategists and Tacticians

Like most things, the scale of decisions that have to be made by a person or organisation fall across a wide spectrum. At one end, you've got the fine-detail work: lines of code, individual config settings, IP addresses, that sort of thing. This is crucial work, because it's this detail that ultimately produces saleable results. Travelling all the way to the other end, there's the "big picture" decisions: the "visionary" stuff. What market segment will we target? What will we do (in large-scale terms) to get there? I am convinced that individuals naturally gravitate towards one end of this spectrum or the other, depending on their psychology. While people usually can work at all scales, they have a "most comfortable" point where they work the most naturally. The further away from this point they are pushed, the less comfortable and effective they are. No level of thinking is better or worse than the other; they're just different. While "large scale thinker" and "small scale thinker" could be taken as being insulting, I certainly don't mean it that way. I should point out that "Strategy" isn't (just) about setting goals. A strategist isn't someone who comes out with grand pronouncements like "By the end of next year this company should be providing telecommunications services to 20% of the Fortune 500" without knowing how to get there. That's not a strategist, that's a poor-quality management consultant. People whose only skill is making vague pronouncements should just be taken out and shot. They're not doing anything useful for anyone. A strategist is someone who is good at planning the goal of "20% of the Fortune 500". They're thinking about the big picture issues, without getting bogged down in the minutiae. A tactician, given the job of planning something at the macro scale, will chase some good idea down an intricately detailed rabbit hole, and miss the other dozen or so large issues that need to be considered. The strategist's planning needs to stop at a certain level and let other people take on the detail work. Conversely, a good tactician can focus on the individual details without getting distracted by the big picture. A strategist put into a tactical role will miss all the important minutiae because they're working out how their little part fits into the big picture, instead of working out how to make their little part work, in and of itself. It's important, for individual happiness, to try and work out what level you're most comfortable thinking at, and then trying to find a job that puts you there. It's almost as important to make sure that the people who are working at the more and less detail levels around you are equally comfortable. Take, for example, the micromanager. We've all either been there ourselves or have heard multiple stories on the subject. I think the micromanager is nothing more than a person who wants to work at a smaller scale than they're being forced to by their organisational rank. Since they can't do the detail work any more, their only outlet is working vicariously through their subordinates. Voila! Instant micromanagement. An even more painful case of micromanagement would be when the subordinate wants to think at a larger scale than the superior. In that case, the subordinate will naturally be thinking large scale, and will miss the details. To the small scale thinking superior, that is incompetence, and will naturally be dealt with by more micromanagement. In reality, both parties are incompetent at their jobs, and they should really swap roles, so that everyone is in their element. It would be nice if companies stopped thinking hierarchically in this way -- that a more "senior" person has to think at larger levels. Just because you've been somewhere longer (or have been working in an industry longer, or got higher marks, or whatever), it doesn't mean that you're more of a strategist. This is probably the Peter Principle restated: people get promoted to a level where they just can't comfortably think at the necessary scale any more. If instead people were put into a planning hierarchy based on their natural scale of thinking, we'd all be a lot better off. There'd be a lot less power games, though, which makes me think it's not going to happen any time soon. A business, at whatever size it might be, needs an appropriate mix of strategists and tacticians. A really small business (1-10 people) can get away without needing large scale thinkers, in the same way that a really small boat can get away without needing a rudder or pilot. If a really small boat gets itself into trouble, everyone on board can grab an oar or bucket and help get the boat out it's predicament -- it's small and nimble enough to be able to do that. As the company expands, though, it's important to make sure you've got some strategists around. If you don't have anyone to keep an eye out for problems and plan around them, your small-to-medium sized boat is likely to have a hole punched in it by a submerged rock. Even if somebody on board happens to notice the rock before you actually hit it, once you get to a certain size you can't physically stop or turn the boat in time. If you don't understand the growth issues in the company, you might not even realise that you're no longer the nimble and low-inertia dinghy until you're up to your knees in sea water. Although an obvious solution to this problem might be to say that all businesses should be small and nimble ones, it's as impractical as saying that all boats should be dinghies. A fleet of dinghies isn't going to be able to support the worldwide sea freight market, and a fleet of small companies doesn't have the necessary resources on hand to take on the big projects that are so often needed. Also, a dinghy is at risk of being swamped by one freak wave, while a larger ship can weather significant storms without going under. Regardless of the size of the business, there always needs to be a good supply of tacticians. A boat (of whatever size) full of people who are all looking out for rocks isn't going to go anywhere, because nobody's making the thing move. Similarly, a company full of strategists isn't going to be doing any of the day-to-day work that actually earns money, and no money means no company. The single most important thing, though, is be self-aware enough to know what sort of person you are, and try to find something that lets you work at the level you're most comfortable at. Otherwise you're just setting yourself up for unhappiness.
(I'm not really sure why I'm suddenly writing management blog posts; this idea of "levels of thinking" just came to me and I figured I'd put it out there. If it makes you feel more comfortable, there's a fairly transparent mapping of these ideas to the practice of software development, although I'll leave the execution of that mapping to the reader. Comments are welcome.)

4 December 2007

Ondřej Čertík: M rida - wrap up

From November 28 till December 2, 2007, I attended a Debian QA and release teams work session in Extremadura, which is an autonomous community of western Spain, that managed to install Debian on 90000 computers in every school (technically a Debian based distribution called gnuLinEx) and Junta de Extremadura also sponsored this meeting.

I took photos of all participants, see my first, second and third posts. When I arrived at the Madrid airport where we first met, I set myself a goal to remember all names and faces, so I used my blog to help me and I think I succeeded in the end. :)

See also our wiki page that we used prior and during the meeting.

So what did we do besides throwing candies?


Lucas Nussbaum will send a summary email soon about the meeting, so I'll just speak for myself:


I worked with Gon ri on svnbuildstat, that is a service for building packages and show statistics about lintian/linda/piuparts checks. It for example contains all packages of the Debian Python Modules Team (that I am a member of) and many others. We discussed and started to work on how to create robust buildbots, that can be installed as a regular Debian package with zero (if possible) configuration, so that many people can just install them without pain, thus providing a huge scalability to the project.

We wrote a preliminary patch to pbuilder for killing the build if it exceeds given memory/disk usage. I had to learn the internals of pbuilder and I lost quite some time squashing some stupid bug I caused while writing the patch.

I spent most of my time with svnbuildstat, mostly learning and discussing things. This will be important for the future, but to also have some real results, I also fixed some packages I comaintain:

Together with Kumar Appaiah we fixed the python-numpy package and I had it uploaded, then I learned how to work with quilt instead of dpatch to handle patches in Debian packages, thanks to Holger's webpage, that contains a nice tutorial. Then I switched from dpatch to quilt in python-scipy and backported a patch from upstream svn to fix a segfault bug and had the package uploaded.

Then I finished the Cython package and had it uploaded. Cython is a marvelous package to speed up Python programs and interface C/C++ programs. I greatly recommend to try. If you don't like it, you can try some of at least 10 other ways to wrap C code in Python. I also used quilt in there to backport a patch from the upstream Mercurial repository to implement parsing @classmethods. Quilt is really a pleasure to work with.

Impressions from the meeting

I've been using Debian since 2001 as my only operating system on all of my computers, so I am not a complete beginner. But it never occured to me I could get involved in Debian more than a user and an occasional bug reporter. What a mistake.

I started packaging new things and fixing packages that I need for my work and that didn't work. This got me involved quite a bit in Debian. But in M rida it was the first time I could dring a beer (well, especially wine) with Debian Developers and I found out they are really cool people. They are all very skilled. Also something, that I love about Debian, is that the people involved in it share two common features, that are very important for them - respect to democracy and personal freedom. When I think about it, those are probably the first two items on my presonal list of values.

Of course, everytime there is a group of 1000+ people, there are good and bad people, more and less skilled, but important is the overall atmosphere - and that is as I described. I think Debian is truly unique. There is Gentoo, that has maybe 40 (?) active developers. There is Ubuntu, that has maybe 100 (?) developers, but it's basically a comercial distribution and there is not so many interesting work for non employees of Canonical. There is opensuse and fedora, where I am not sure about the numbers. The atmosphere in Debian can change in the future, one never knows, but as of the end of 2007, I think it's very cool to get involved.

Maybe it's not for everyone, but it's the right place for me.

3 December 2007

Michael Prokop: git[-svn] in 30 minutes

… or something like that… I planned to write a short note about how to start with using git-svn so I can provide a pointer to some of my colleagues. It turned out that git has too many nice features that you should be aware of. :) Hopefully my notes (now being a reference for myself as well, thx to gebi for all the help and feedback) are useful anyway. If you think something (more or less essential, or at least something most of us should be aware of) is missing: please feel free to mention that in the comment section of my blog entry, thanks. Disclaimer: I’m still happy with mercurial for what I - and we at grml in general - use it: linear, but anyway distributed development. git on the other hand provides some really nice features. Rebasing and branching with git is really great - so non-linear development just works. As usual: use the right tool for the right job. git is a bit complicate to use. Not only but especially in the beginning. On the other hand I’m not such a big friend of subversion. If you wanthave to use subversion (Graz University of Technology for example provides a svn service to their students and employees) but prefer to work with git instead you should be aware of git-svn. git-svn gives you bidirectional operation between subversion and git. First of all make sure you have all you might need when working with git. Make sure to use a current version of git (I’m refering to version >=1.5.3). Just execute the following command line on your Debian system to install all relevant packages:
aptitude install \
git-buildpackage git-core git-cvs git-daemon-run \
git-doc git-email git-gui git-load-dirs git-svn \
gitk gitweb qgit
Now let’s start with some general and basic configuration:
# Remove directories from the SVN tree if there
# are no files left behind, configure it globaly:
git config --global svn.rmdir=true
# Want some more global, personal git configuration?
for line in  
  user.name=Michael Prokop 
  user.email=foo@example.invalid 
  color.diff=auto 
  color.diff.new=cyan 
  color.diff.old=magenta 
  color.diff.frag=yellow 
  color.diff.meta=green 
  color.diff.commit=normal 
do
  git config --global $line
done
Check out man git-config for much more details about configuration options. First tip: set ‘g’ as an alias for git so you don’t have to type that much. I’ll write the long version in the following examples so copy/paste works for everyone. Make sure to use the short options of git itself as well: use ‘git co’ for example instead of ‘git checkout’. You can define your own aliases inside git as well - either manually in ~/.gitconfig or running something like:
git config --global alias.st status
Enough pre-configuration for now. It’s time to checkout the SVN repository:
# Check out the SVN repository and set 'svn/' as
# prefix for the branches:
git svn clone -s --prefix=svn/ \
https://svn.tugraz.at/svn/$project foobar && 
cd foobar
# Adjust svn:ignore settings within git:
git svn show-ignore >> .git/info/exclude
# List all branches:
git branch -a
# List all remote branches:
git branch -r
# Rebase your local changes against the
# latest changes in SVN (kind of 'svn up'):
git svn rebase
# Checkout a specific branch:
git checkout $branch
Ok so far? But what do we have to do if we want to work on the upstream source and are allowed to commit/push directly to the repository? Let’s see how to work on that without using branches:
# Hack:
$EDITOR foobar
# Check status
git st[atus]
# List diff:
git diff [foobar]
# Commit it with a commit message using $EDITOR:
git commit -a
# Now commit your changes (that were committed
# previously using git) to SVN, as well as
# automatically updating your working HEAD:
git svn dcommit
But what should we do if we do not have commit rights? Let’s create our own branch and send a patch via mail to upstream:
# Make a new branch:
git checkout -b mikas_demo_patch
# and hack...
$EDITOR
# Commit all changes:
git ci -a -m 'Best patch but worst commit msg ever'
# ... and prepare patch[es]:
git format-patch -s -p -n master
# Now send mail(s) either use git-send-email:
git send-email --to foo@example.invalid *.patch
# ... or if you prefer mutt instead (short zsh syntax):
for f in *.patch ; mutt -H $f
You got a mail from someone else and would like to incorporate changes from the attached patch in your repository? Just store the mail in a seperate mailbox (use save-message in mutt for example, keybinding ’s’ by default), then execute:
# Apply a [series of] patch[es] from a mailbox
git am /path/to/mailbox
Want to work on a seperate branch and rebase your work with upstream?
# First of all make sure to use recent sources...
# So pull when using plain git:
git pull -u
# .. or when using git-svn use:
git svn rebase
# Then create a new branch:
git checkout -b mika
# Hack:
$EDITOR
# Commit:
git ci -a -m 'Best patch but worst commit msg ever'
# Switch to master branch:
git checkout master
# Pull again when using plain git:
git pull -u
# .. or when using git-svn use:
git svn rebase
# Finally switch back
git checkout mika
# Now rebase it with plain git using:
git rebase origin/master
# ... or when using git-svn:
git svn rebase
# Now check out the last 5 commits:
git log -n5
Another branch-session might look like:
git co -b foo
$EDITOR
git ci -a -m 'foo changes'
git co master
git co -b bar
$EDITOR
git ci -a -m 'bar changes''
git co foo
git rebase bar
git log -n5
git st
git branch
Pfuhhh? Right. :) Now it’s time to check out another cool feature: git stash, which is just great when pulling into a dirty tree or when suffering from interrupted workflow. Demo:
git stash
git pull / fetch+rebase
$EDITOR # fix conflicts
git commit -a -m "Fix in a hurry"
git stash apply
git stash clear # unless you want to keep the stash
git reset rocks as well:
# List all recent actions:
git reflog
# Now undo the last action:
git reset --hard HEAD@ 0 
How to get rid of branches?
# Delete a branch. The branch must be fully merged:
git branch -d remove_me_branch
# Delete a branch irrespective of its index status:
git branch -D remove_me_branch
# Delete a remote branch:
git push reponame :branch
Repack a git repository to minimize its disk usage:
git pack-refs --prune
git reflog expire --all
git repack -a -d -f -l
git prune
git rerere gc
Use git cherry to find commits not merged upstream. Another really cool feature is the interactive rebasing: git rebase –interactive Make sure you are aware of gitk: Screenshot of gitk … and don’t forget to set readable fonts for gitk, like:
[ -r ~/.gitk ]   cat > ~/.gitk << EOF
set mainfont  Arial 10 
set textfont   Courier 10 
set uifont  Arial 10 bold 
EOF
If you prefer a Qt based interface check out qgit. Useful ressources:

Miriam Ruiz: Software patents are buggy

Patents are the best way to improve development, and software inventors have just the natural right to their algorithms and designs. Research and Development in industry wouldn’t just work without patent protection, and technology improvements would just stop, right? Well, I’m not so sure of that. Key arguments against software patents, stolen from Pieter Hintjens’ article:

2 December 2007

Matthew Johnson: Passwordless Encrypted Root in Debian

If, like me, you wanted both an encrypted root filesystem and some form of bootsplash you may have discovered that this is tricky. You need to enter the decryption passphrase on the terminal which means exiting the bootsplash. I decided it must be possible to use a USB token with the key on it rather than a passphrase to decrypt the drive and while this seems supported upstream, it is not supported out of the box on Debian. This is a short howto explaining my solution. Pre-requisites You will need a USB hard disk and a computer using Debian with an encrypted root filesystem. I am assuming that you are using a stock kernel with an initramfs image and have a luks encrypted LVM containing the root filesystem. You will have to change some of the details below to match your specific system. In the examples below /dev/hda5 is the encrypted partition and /dev/sda2 is the partition on the USB disk holding the key. Setting up the key First we need to generate a random key and put it on the disk. To save having to mount things in the initramfs, I chose to use a partition at the end of the USB flash disk. This means repartitioning and reformatting your USB disk. I recommend allocating the last cylinder in fdisk to primary partition 2. Once you have the second, small partition (you are only going to use 1k, so as small a partition as possible) you can put a key on it. This is as simple as dd if=/dev/urandom of=/dev/sda2 bs=1M . Adding the key to the luks partition Next, you need to add your new key as able to decrypt the partition. Luks allows several keys to be able to unlock the partition. The real key is decrypted under each of the user keys or passphrases and stored in a key slot' in the partition. To add your key type:
touch /tmp/keyfile
chmod 600 /tmp/keyfile 
dd if=/dev/sda2 bs=1k count=1 of=/tmp/keyfile
cryptsetup luksAddKey /dev/hda5 /tmp/keyfile
wipe /tmp/keyfile
Note the careful handling of the temporary key file (luksKeyAdd won't read from stdin, whereas luksOpen will), I recommend storing it on a ramdisk and you should certainly use wipe rather than rm if you don't. Once you have added your USB key you could remove the passphrase from the key list with luksDelKey, but if for any reason you lose the USB hdd you will be unable to decrypt the partition; I recommend leaving both keys available. Booting automatically In order to boot using the USB key we need to provide a couple of helper scripts in order for the initramfs to work. We also need to set some parameters on the kernel command line. In Debian these scripts can be added to the initramfs by putting them in /etc/initramfs-tools/. The first script is a helper script used when building the initramfs. This writes a second script into the initramfs itself which takes the partition as a parameter and prints the key on stdout. This should be written to /etc/initramfs-tools/hooks/cryptkey (executable) and contain:
#!/bin/sh --
PREREQ=""
prereqs()
 
   echo "$PREREQ"
 
case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac
. /usr/share/initramfs-tools/hook-functions
cat > $ DESTDIR /bin/loadkey 
The second script runs immediately before the cryptsetup script in the initramfs and ensures that the USB disk is available. This will cause the boot sequence to block until the USB disk is inserted and the device nodes created by udev. It can be provided directly in /etc/initramfs-tools/scripts/local-top/00ensureusb (executable) and should contain:
#!/bin/sh --
PREREQ=""
prereqs()
 
   echo "$PREREQ"
 
case $1 in
   prereqs)
      prereqs
      exit 0
   ;;
esac
if ! grep cryptopts /proc/cmdline >/dev/null; then return; fi
. /scripts/functions
log_begin_msg "Waiting for USB to become available..."
modprobe usbcore
modprobe uhci_hcd
modprobe ehci_hcd
modprobe usb_storage
while [ ! -b /dev/sda2 ]; do
   sleep 1
done
log_end_msg
exit 0
The cryptsetup script itself reads configuration from the kernel command line. Here you can give it a script which will read the key and the source for the key to read. Edit your grub or lilo config and append the following to the kernel command line: cryptopts=keyscript=/bin/loadkey,key=/dev/sda2,source=/dev/hda5,target=hda5_crypt,lvm=hecate-root You will obviously have to change the name of your lvm root partition (volumegroup-logicalvolume). I recommend having two entries in the boot menu, one with the cryptopts and one without to allow easy decryption using the passphrase instead. Conclusion That should be everything. Boot your computer and inset the usb hdd. When the boot process passes decryption you can remove it again. You may have to replug it if you boot with it inserted to start with.

Thomas Girard: Fun with templates

At work we had to use two C libraries defining structures with different size but same name. Function names were different though, so we believed no symbol clash would occur. We thought if we used the headers from each library in a different compilation unit we'd be safe. But we were wrong. The code compiled fine but crashed at runtime. Why? Because we used templates within these compilation units, and this generated weak symbols with the very same name. The linker then discarded duplicate symbols, and since structure size was different we got a crash. Let's reproduce this on a small example:
/* A.h */
#ifndef A_H
#define A_H
struct Data   int an_int;  ;
#endif
/* B.h */
#ifndef B_H
#define B_H
struct Data   char a_buffer[65];  ;
#endif
/* UsingA.cpp */
#inlude "A.h"
#inlude <deque>
static std::deque<Data> a_datas;
std::size_t get_a_size()   return a_datas.size();  
/* UsingB.cpp */
#inlude "B.h"
#inlude <deque>
static std::deque<Data> b_datas;
std::size_t get_b_size()   return b_datas.size();  
/* Main.cpp */
int main(int argc, char* argv[])    return 0;  
We compile these files:
$ g++ -c -I . UsingA.cpp UsingB.cpp Main.cpp
$ g++ -o Main UsingA.o UsingB.o Main.o
and inspect what got generated in UsingA.o, choosing the call to size() to reduce the output:
$ nm -C UsingA.o   grep '::size()'
0000000000000000 W std::deque<Data, std::allocator<Data> >::size() const
Likewise in UsingB.o:
$ nm -C UsingB.o   grep '::size()'
0000000000000000 W std::deque<Data, std::allocator<Data> >::size() const
g++ has generated code for the deque we're using. That's how templates work: they get "expanded" in the compilation unit using them. So far so good. Now if we look in Main:
$ nm -C Main   grep '::size()'
0000000000400a64 W std::deque<Data, std::allocator<Data> >::size() const
we see there's only a single symbol in the resulting binary. Because the symbols are weak (see the W in nm output), g++ silently discards one version, say the version in UsingB.o. (If they were not weak, link would fail because of duplicate symbols. And every C++ program would fail to link.) Therefore any call on b_datas is likely to fail: the deque code called will not use the right definition of Data. Lesson learned: avoid data structures with the same name.

1 December 2007

Raphael Geissert: I'm in!

I just went to a meeting where I received the results of the university admission exam I did some weeks ago.
And I'm in! :)

30 November 2007

Frans Pop: debtree 0.7.2

Now available from alioth: debtree 0.7.2. The main change in this release is a much better display of virtual packages in dependency graphs. With this release I consider debtree "feature complete" when it comes to the information that is displayed in the graphs. A quick summary: Currently not supported are displaying Relaces, Obsoletes and Enhances relationships. If there's demand for it, adding them should be trivial. If you haven't yet, take a few minutes to look at the example graphs on the debtree website. What's next for debtree? You may remember that I filed an ITP when 0.7.1 was released but obviously its not in the archive yet. One reason is that debtree is completely redundant, at least if you consider the original reason I wrote it: to list how a package depends on another package. Just after the release of 0.7.1 I found out that aptitude why <package> <package> already provides that functionality!
I'm tempted to blame Enrico because I asked him if that was possible before starting on debtree, and Enrico really is supposed to know such things [1]! Luckily debtree now produces such nice dependency graphs to justify its existence :-) Anyway, I think that option should probably just be stripped out of debtree now. And if that is done, maybe it should be renamed to debgraph or apt-graph... I also discovered that beside apt-cache there was already another utility that produces dependency graphs: apt-rdepends. While, just like apt-cache, it lacks most of the features of debtree, it is quite fast and, because it is written in Perl, I could possibly port debtree to Perl myself using apt-rdepends as an example. Another reason is that a few people commented that maybe it should not be a separate package. I somewhat agree with that, but also would not like it to disappear in something non-descriptive like debian-goodies. I'd very much prefer it to eventually see it included in apt itself, or maybe in apt-utils. So basically I've been holding back a bit on uploading debtree to allow me to consider all this. The next task definitely is a rewrite in a better language and thereby give debtree a performance boost. [1] To his (and my) defence: that feature was only recently introduced in aptitude.

Stefano Zacchiroli: buggy vcs-svn fields

Buggy Vcs-Svn fields around My statistics flu continues (oh, BTW, don't worry, I'll be quiet again on planet RSN). This time I wanted to check how many packages are maintained using some Version Control System in Debian, but at the same time are not declaring a proper Vcs-XXX field in their debian/controls. With the help of Goneri and the svnbuildstat I've managed to cross the data used to actually build nightly packages from subversion repositories with the Vcs-XXX fields declared in Debian source packages. The outcome is yet another daily updated page which lists packages which are missing Vcs-Svn field and/or declare a wrong one (i.e. one which is not in sync with what svnbuildstat is using to build the package). You might want to have a look to the corresponding dd-list to see if some of your packages need to be fixed. Several of mine do for example ... Oh, of course the check is limited to what svnbuildstat knows. If you want to be checked it's a good idea to ask for the addition of your repository to svnbuildstat.

Stefano Zacchiroli: pts DM and lowNMU

PTS again: LowThresholdNMU and Debian Maintainers As promised, the PTS is now able to show two new pieces of information about a given package: Both information are shown as unary "tags" (i.e. they can either exists or not, but they don't have any associated value) in a new field in the general information section of the page called "Maintenance info". Now both tags are implemented as "acronym" HTML elements, but if you are good at graphics don't hesitate to contact me, that would be the right place for two fancy icons!

Evan Prodromou: 8 Frimaire CCXVI

A few days ago I installed the Flock browser, version 1.0, on my notebook computer. I've been using it as my default browser for that time, and I have to say that I find it very slick and useful. I'd used the early beta versions of Flock and I thought it was a good idea, but I wasn't able to use most of the features. The blog posting tool, for example, doesn't work with my hacked-together WikiBlog system. Also, a lot of my must-have Firefox extensions, like SearchStatus, wouldn't install on Flock. But version 1.0 now installs all my Firefox extensions, and it also has lots of neat features that I find really useful. The feed reader, for example, is very slick, complete, and useful. The integration with social software sites like Facebook and Twitter is amazing, and the People View -- which tracks your friends on different systems -- is huge. The "My World" generated home page has replaced Netvibes for me. All good things. I'm a little disappointed with the narrow range of sites that are integrated into the browser, though. It'd be great to see more and better documentation on writing integration plugins on the Flock Developer site. I'd love to work on ways to make it easier to post to MediaWiki sites, upload files, get notifications, etc. I think getting site owners to make their own Flock plug-ins, or making it easy for users or third parties to do the plug-ins themselves, is going to be key to the success of these features. One other thing I found annoying was the indexer. This is a background task that indexes your browsing history so you can search for stuff you've recently seen ("Where did I read about that new version of JavaScript...?") Although this seems really useful, I found that the indexer was pegging the CPU on my Linux box -- possibly a threading problem? -- and I found the program increasingly unresponsive. Eventually I found the toggle in about:config to turn off the indexer ("flock.service.indexer.enabled"), and once I switched it off my browsing experience has been much less frustrating. I'd like to see Flock succeed -- it's a nice piece of work, and I think it's going down the right path. Getting more contributions from the world Web community will go a long way towards making it more useful for users. tags:

Yo Gamma Gamma Last night I dropped by the SAT for a great games event here in Montreal. Gamma 256 was a fun party, associated with the MIGS game summit. The event showcases submitted games based on a theme -- this year's theme was 256x256 pixel games (or smaller) -- thus the name. There were a ton of Montreal tech people there. The games were fun to play, especially the insanely violent Bloody Zombies, where your chainsaw-wielding alter ego slaughters the undead and then swims in their blood to reach the next level. Great fun, and a good example of Gamma's concentration on art in games. The music was good too -- lots of bleeps and boops and gamety fun. Congratulations to Heather Kelley and Damien DiFede and the rest of the Kokoromi Collective on their great job with this event. I'm already looking forward to next year. tags:

One-liners Some more things going on with me: tags:

29 November 2007

Stefano Zacchiroli: rss powered pts

The PTS has grown RSS feeds These days I'm taking part in the Extremadura Debian QA Metting. Today is the first day and I've mostly spent it doing some PTS hacks. The first visible tiny teeny outcome of that is the addition of RSS feeds for the "latest news" part of each package page. For example, in the PTS page of bash you can see a link to the corresponding RSS feed. (Other package pages will need a bit to be completely regenerated by the current PTS run ...) Thanks to KiBi and Luk the pages are now also listing links to the corresponding entry in svnbuildstat. Forthcoming additions are links to outcome of the piupart tests run by Liw and H01ger and 2 new markers: one for lowThresholdNmu-ability and the other for maintenance by Debian Maintainers. Stay tuned!

Russell Coker: Apprentices

Shintaro wrote an interesting post about Rakugo (a form of story-telling) and Mottainai (a particular form of gratitude that is now becoming an English word in reference to environmentalism) [1]. My definitions of the two words are poor, I encourage interested readers to read Shintaro’s post for the links. Recently I had been considering which jobs are most like a senior programmer position in terms of skills and the work environment. It occurred to me that a chess-master has a job that bears some similarities to that of a senior programmer. A chess master might play a Simul [2] which compares to a programmer or sys-admin fixing lots of small bugs at the same time. In a serious chess tournament up to seven hours may be on the time clocks - not an uncommon amount of time taken to find a subtle bug in a program. For quick chess games as little as three minutes may be on the clock for all your moves - similar to the situation where the network goes down and the CEO is watching you fix it. The intellectual abilities for playing chess and programming have many obvious similarities, memorising significant patterns to avoid re-calculation, having a large mental register set to allow considering complex situations or multiple possibilities at the same time, and being able to spend many hours thinking about a problem. With that in mind one thing that particularly interested me in Shintaro’s post was the reference to a Japanese apprentice system where “They are trained at his masters house from early years maybe after junior-high, living and caring his boss every day life, like Go or Shogi players“. I wonder how this could be used in other cultures and career paths (such as English-speaking countries and computer programming). Probably the “every day life” part wouldn’t be well accepted. When comparing with the high-school experiences that seem typical of people in the computer industry an apprentice program has a lot to offer. A small amount of pay (as opposed to school-fees) and an environment where laws apply (IE almost no bullying) are both significant benefits. Anyone who is reasonably intelligent is most likely to find that they can’t learn anything from the teachers in the final years of high-school because most teachers don’t know much about the subjects that they teach and in the instances where the teacher does know more the class environment doesn’t permit teaching more advanced material. Someone of average intelligence who has worked for 5+ years in an industry can always teach a beginner some useful things so there is some obvious potential to learn. There is a meme that apprentice programs only apply to trades not intellectual work. This meme is probably correct when applied to many categories of office work but seems obviously wrong when applied to computer work. My observation is that at most places where I have worked there has been a significant amount of time from the most productive, skilled, and highly paid people spent on tasks that are way below their skill level - and often requiring skills that they don’t have. One example is when I was working for an ISP in a senior sys-admin position, when things really went wrong on the network I was usually the person to fix them - but I spent moderate amounts of time fixing hardware problems with desktop PCs and some time fixing Windows networking issues (of which I know little). Some of the problems I fixed could have been fixed by a 16yo apprentice who would probably have taken less time to fix them while also having a much lower hourly rate - and in some cases may have done a better job). I’m not sure that having an apprentice assigned to an individual programmer would work well, but having one per team should. I have previously written about how to get the benefits of a university education without attending university [3] so I don’t think that the inability of such apprentices to attend university would necessarily be a problem.

28 November 2007

Lucas Nussbaum: Re: Two years of Python

Andrew writes about Python, Perl and Ruby:
Ruby has some nice things (like Perlish regular expression handling), but it brings back all that punctuation noise again.
He gives an example of punctuation noise in Perl:
I go back to Perl and my eyes bleed after trying to dereference a reference to a scalar, or something like that. It’s just ugly in Perl.
I don’t think that’s fair to compare Perl’s ponctuation noise with Ruby. Ruby has a feature that could qualify as punctuation noise, but it’s really a feature: variables are prefixed with their scope. For example, class variables start with @@ (@@var), instance variables start with @ (@var), global variables start with $ ($var), and constants are in CAPS. I don’t know if Ruby “invented” that, or if it comes from another language (it’s probably the case: Ruby takes a lot of good ideas everywhere). Also, Andrew, joining elements of an array in ruby is written myarray.join(” “), and Ruby has =~. So you should definitely give Ruby a try ;) No, seriously, Ruby is a really interesting language. It’s really a shame that it’s still so japanese-centric (most development decisions are taken on a japanese mailing list !!), since it’s not really help a wide adoption.

Next.

Previous.