Search Results: "andy"

2 March 2009

Jeff Bailey: Leif's second birthday!

I'm going to post pictures and such later, but we celebrated Leif's second birthday yesterday with 20-or so of us. He had a great time running around and dancing and seeing everyone.

As a fun side-effect, it was our first big house party. The place is finally setup enough that it feels like most things have a place to go. Yay! Sandy and Angie did a wonderful job with decorating while I was in California last week.

17 February 2009

Gunnar Wolf: Yay for Lenny! (But nay for installation media)

Yay! This blog post is not strictly speaking news anymore - But for those who don't know it yet, three days ago Debian 5.0 Lenny was released, after 22 months of work (plus fun, plus flamewars, plus everything that makes a Free Software lover tick). And, of course, that makes us all very happy and proud. As always, upgrading is a breeze. Hats off specially to Wolfgang and everybody who worked towards the great release notes - No, it is not a simple task, by far. And I _do_ feel ashamed I didn't even beep that way :-( So, many of us are in the middle of planning/executing our servers' migrations. So far, I'm amazed for good. Even hairy issues such as firmware removal are magically and beautifully taken care of - i.e. my firewall kindly informed me during update that I would need to install the non-free firmware for my BNX2 (Broadcom) network interfaces, and I was just a package away from absolute happiness. Lets see what happens next Friday, as I will be upgrading our storage+application server (which is _way_ more complex than the servers I've dealt with so far). Anyway... But what good is a blog post if you are not ranting? Many people recognize me as one of the most Debian-connected people in Mexico, and that's very good. And yes, besides being a Debian Developer, I am a co-sysadmin for the main Debian mirror in Mexico. Some people have already asked me for CD-ROMs and DVDs. Of course, if I had a BluRay drive, I'm sure I'd also get requests for it. People: Do you really want such media? Think again... Do you really want 31 CDs or five DVDs for your favorite architecture? Ok, maybe many will say "nah, just give me the first one" - Then, do you want to limit your Debian experience to just the software that lives on the first 1/31th (or 1/5th) of it all? Of course there are many situations where it is desirable. Low bandwidth users, or people with no regular connectivity, will be much better served by suitable media from which to install. However, most of us (computer geeks living in Mexico City - Yes, that's the people contacting me) have at least a 1Mbps connection at home. People, just get the Netinst or Businesscard (180 or 40MB) images and download whatever is left via the network. Debian is extremely network-friendly. And, believe me, even if packages are sorted by popularity (and that's why most people will be happy with the first DVD if needed), you never know if you will want precisely a package that sits towards the lonely tail of popularity. And, yes, I did have my CD images handy for the Potato, Woody and Sarge cycles - but increasingly, it became easier for me just to ask apt-get to fetch stuff from the web (which is done without me moving from my comfy chair while I do anything else) than asking apt-get to ask me to go search for the f.*ing CD which I left dont-remember-where. Anyway... I'm not saying I won't burn your CDs - If you want them, please tell me in advance and come to my office, I'll be glad to give you some Debian disks. But spare the environment. We don't need to burn more and more disks. Use the network, be a better human being!

10 February 2009

Biella Coleman: New Media Practices in International Contexts

In the next 11 months, I will be spending a significant amount of brain power and time writing a fairly long review article on digital media and ethnography which will assess the state of the literature and various trends. Since my expertise certainly lies in the west or global questions. I will be immersing myself in the literature that looks at various international, national, and regional contexts, which is exciting. It is nice to leave the well trodden path and venture into new lands. There is a handy new site related to this topic, which some of you might be interested in: New Media Practices in International Contexts Blog Series. The entries are less blog-like and more article-like but that is was makes them great resources.

Biella Coleman: New Media Practices in International Contexts

In the next 11 months, I will be spending a significant amount of brain power and time writing a fairly long review article on digital media and ethnography which will assess the state of the literature and various trends. Since my expertise certainly lies in the west or global questions. I will be immersing myself in the literature that looks at various international, national, and regional contexts, which is exciting. It is nice to leave the well trodden path and venture into new lands. There is a handy new site related to this topic, which some of you might be interested in: New Media Practices in International Contexts Blog Series. The entries are less blog-like and more article-like but that is was makes them great resources.

7 February 2009

MJ Ray: Top 8 J2ME MIDP Applications

Well, in line with the Do Not Drive from the local police (and one from Gloucestershire), I ll be phoning in to ThePhoneCoop AGM today and doing a bit of work from home. While preparing for the journey that never was, I realised that I ve mentioned some of these phone tools in articles like Connecting from the k608i with SSL, but not all of them. So, here s my favourite Java phone applications:-
  1. MidpSSH: this is my main workhorse, as long as I have a stable data connection (even 3G seems to freak sometimes above 120mph). I ll be connected to a screen session in our server (TERM=linux) using lynx, irssi, mailx and other tools I learnt back at UEA;
  2. MujMail: if I don t have a stable network connection, this seems a good way to download email from SSL in bursts for offline reading;
  3. Mobile RSS Reader: downloads RSS in bursts for offline reading;
  4. anyRemote: this is my main workhourse at home, replacing the above three applications. My phone doesn t do WiFi, so I use bluetooth to run shell commands on my workstation, read RSS feeds and email and view web pages. Combined with a video-sender, it also acts as a remote control when playing internet video feeds on the TV. At a push, it can control the workstation s full GUI, but that s a bit slow and awkward;
  5. JabberMixClient: I m having a few problems controlling this in version 2, but 1.x uses the basic GUI and works mostly fine. I guess I ought to fix its bugs, but I m terrible at Java;
  6. MicroCalc2: a cool lisp-driven spreadsheet, handy for sums you want to keep and it went GPL about two years ago;
  7. ReadManiac: much better than the built-in browser for text files and went GPL about a year ago. If only I could work out how to sign it with my local TTLLP certificate authority and get rid of the security prompts;
  8. MFRadio: useful when the built-in FM RDS radio can t find anything interesting. The interface is a bit clunky and it really racks up data transfer charges, but it seems worth keeping around.
All of those are free and open source software, mostly under the GNU GPL. The only thing I feel I m really missing now is a free and open source FTP client, for uploading photos to my preferred photo-sharing site. Any suggestions?

22 January 2009

David Welton: Github Part III

Since this seems to be fairly constructive, I'll keep going. Those not interested in Github, or the dynamics of open source code creation can safely tune out. Chris, the Github dude, has some more to say: http://ozmm.org/posts/forking_continued.html
I mentioned the Network Graph and Fork Queue but David mentioned neither. I think he doesn t know what they are, probably because I didn t explain what they are :)
I had had a look at them, and they're handy tools (I would never accuse Github of not doing good work, that's not the issue at all), but I would respectfully submit that perhaps Chris is looking at things from a very Github-centric perspective, in which it's second nature to go look at those. They aren't obvious, and certainly don't jump out at the user to say "hey, maybe this code your looking out isn't the latest and greatest!". For someone just cruising around, perhaps it should be more evident who's the 'top dog'? Chris then goes on with a very helpful and illustrative demo of how things work at Github, which is good stuff. However, at the end, he says something that I don't agree with:
It may seem strange, and perhaps even like a lot of work. Why should I have to check to see which is the most current? In the old model, there s always a canonical repository.
That's precisely the problem. It does seem like a lot of work, especially when your search space is not limited to Github, but may include other places like Sourceforge, RubyForge, Google Code, project specific sites, and so on.
In the old model, actionwebservice wouldn t have made it past 1.2.6. Welcome to distributed version control.
Plenty of 'old style' projects have survived beyond their founders' interest in the project. What happens is that you ask for permission to work on the project, and either :
  1. It's given to you, in which case you can keep working on the canonical code. For instance, someone could have asked DHH to work on the RubyForge version of actionwebservice. Did they? Did he say no? At the very least, he could have been asked to point the RubyForge actionwebservice page at some other site with a more current version of the code.
  2. You have to fork the project, and in that case, sure, you might as well have been using the Github model.
I've often found that people are happy to let you contribute to their projects, though, and part of my original point with all of this is that if people just go spitting out forks willy-nilly, it creates a "paradox of choice" type problem, and perhaps takes something away from the community aspect of open source projects. As people are fond of saying at the Apache Software Foundation, it's about the people, not necessarily about the code. I'm not saying that forks are always bad and that everything should be centrally done, but there's a balance to be struck between people just working on their own, and some sort of onerous, bureaucratic Central Project Authority. It's nice that people who want to improve the code make themselves heard on a mailing list/forum/whatever, and thus cover the "people" part of merging in new code and new ideas. More often than not, help and contributions are more than welcome. Design decisions and conversations recorded on mailing lists are available for people to peruse in the future when they have questions. Just to repeat something that bears repeating: I am not claiming that Github will lead to social disintegration of open source projects or anything drastic like that. However, I'm a bit wary of certain patterns I've seen. It's certainly possible that I'm wrong - as I mentioned, one error I might be making is that people are dumping code they simply wouldn't have shared on Github, because Github makes it so easy. I do hope my worries are unfounded, and in any case, it's a good thing that the Github guys are interested in the problem too, and will hopefully do things to alleviate it where possible.

David Welton: Github Part III

Since this seems to be fairly constructive, I'll keep going. Those not interested in Github, or the dynamics of open source code creation can safely tune out. Chris, the Github dude, has some more to say: http://ozmm.org/posts/forking_continued.html
I mentioned the Network Graph and Fork Queue but David mentioned neither. I think he doesn???t know what they are, probably because I didn???t explain what they are :)
I had had a look at them, and they're handy tools (I would never accuse Github of not doing good work, that's not the issue at all), but I would respectfully submit that perhaps Chris is looking at things from a very Github-centric perspective, in which it's second nature to go look at those. They aren't obvious, and certainly don't jump out at the user to say "hey, maybe this code your looking out isn't the latest and greatest!". For someone just cruising around, perhaps it should be more evident who's the 'top dog'? Chris then goes on with a very helpful and illustrative demo of how things work at Github, which is good stuff. However, at the end, he says something that I don't agree with:
It may seem strange, and perhaps even like a lot of work. ???Why should I have to check to see which is the most current? In the old model, there???s always a canonical repository.???
That's precisely the problem. It does seem like a lot of work, especially when your search space is not limited to Github, but may include other places like Sourceforge, RubyForge, Google Code, project specific sites, and so on.
In the old model, actionwebservice wouldn???t have made it past 1.2.6. Welcome to distributed version control.
Plenty of 'old style' projects have survived beyond their founders' interest in the project. What happens is that you ask for permission to work on the project, and either :
  1. It's given to you, in which case you can keep working on the canonical code. For instance, someone could have asked DHH to work on the RubyForge version of actionwebservice. Did they? Did he say no? At the very least, he could have been asked to point the RubyForge actionwebservice page at some other site with a more current version of the code.
  2. You have to fork the project, and in that case, sure, you might as well have been using the Github model.
I've often found that people are happy to let you contribute to their projects, though, and part of my original point with all of this is that if people just go spitting out forks willy-nilly, it creates a "paradox of choice" type problem, and perhaps takes something away from the community aspect of open source projects. As people are fond of saying at the Apache Software Foundation, it's about the people, not necessarily about the code. I'm not saying that forks are always bad and that everything should be centrally done, but there's a balance to be struck between people just working on their own, and some sort of onerous, bureaucratic Central Project Authority. It's nice that people who want to improve the code make themselves heard on a mailing list/forum/whatever, and thus cover the "people" part of merging in new code and new ideas. More often than not, help and contributions are more than welcome. Design decisions and conversations recorded on mailing lists are available for people to peruse in the future when they have questions. Just to repeat something that bears repeating: I am not claiming that Github will lead to social disintegration of open source projects or anything drastic like that. However, I'm a bit wary of certain patterns I've seen. It's certainly possible that I'm wrong - as I mentioned, one error I might be making is that people are dumping code they simply wouldn't have shared on Github, because Github makes it so easy. I do hope my worries are unfounded, and in any case, it's a good thing that the Github guys are interested in the problem too, and will hopefully do things to alleviate it where possible.

21 January 2009

David Pashley: DBI boilerplate code

I keep writing code to talk to databases in perl and I'm forever forgetting the correct runes for talking to databases, so I thought I'd stick it here for easy reference.
use DBI;
my $db_driver = "Pg" # Pg or mysql (or others)
my $db_name = "database";
my $db_host = "localhost";
my $db_user = "username";
my $db_pass = "password";
my $dbh = DBI->connect("dbi:$db_driver:dbname=$db_name;host=$db_host", 
   $db_user, $db_pass);
It's probably handy to give an example of a common database read operation
my $sth = $dbh->prepare( "SELECT * FROM table WHERE id  = ?") 
      or die $dbh->errstr;
$sth->execute($id) or die $dbh->errstr;
while (my $hashref = $sth->fetchrow_hashref)  
   print $hashref-> id ;
 
Read Comments (1)

18 January 2009

Wouter Verhelst: Filesystems: the saga continues

Bernhard comes up with a few arguments in support of multiple filesystems which, in my arrogant opinion, make no sense. The first argument (about hardlinking a file to your homedirectory until something bad is discovered in one of the binaries) has been sufficiently debunked by Joey Hess. The second and third arguments are the same, really. Repeating your argument won't buy you any beer, sorry. Finally, all your arguments talk about server. I was talking about laptop. I don't know about you, but me, I'm not in the habit of loaning out my laptop to someone I don't trust. I'm not even in the habit of loaning out my laptop to someone I do trust, come to think of it. I do run some servers on my laptop, but I also have a firewall on my laptop that refuses incoming connections. This is a laptop. Not a machine in a data center. As such, the only person with access to my machine is me. Now I don't say I trust each and every bit of software that I run on my laptop, but I do trust myself. I won't start scanning my laptop's hard disk for rogue SetUID hardlinks in another user's home directory, because there isn't another user, stupid! Paranoid security is nice and dandy and totally useless. Security is all about trade-offs. Even Bruce says so: if the cost of a security measure (having to deal with with 73 filesystems) does not outweigh its benefit (protection against cosmic rays changing not only my firewall configuration, but also writing a suid CGI binary and installing that in /usr/lib/cgi-bin), then it's just not worth it. Now of course you might argue that 'having to deal with 73 filesystems' is no cost at all, in which case it would be worth it. But to me, it certainly is a cost, and one I'm not willing to take even if it did protect me against a real-life problem. And if someone were to break into my system, I'll just reformat it and recover from back-ups. I won't even have to revoke my GPG key, this time, since it's no longer on the disk.

12 January 2009

Pablo Lorenzzoni: Quick and Dirty VPN with pppd and ssh

This is just to keep a reference (so I don t have to google it again :-) ): One can create a quick and dirty VPN using pppd and ssh:

bash$ /usr/sbin/pppd noauth 10.0.0.1:10.0.0.2 pty 'ssh -x -t -e none remote_user@remote_server /usr/sbin/pppd passive noauth'
This assumes both users (local and remote) have permissions to run pppd (some sudo trickery may become very handy) and that no password is asked by ssh (password-less key authentication). Quite handy, ain t it?

2 January 2009

David Welton: Twitter? Hrm. Ok...

Yoav's post about twitter was interesting: http://yoavs.blogspot.com/2009/01/one-curious-thing-about-twitter.html Personally, I don't really see the appeal. So far there are only two uses I have for it:
  • Lance Armstrong writes a fair bit, and even posts some pictures, and since I am a huge cycling fan, that's kind of fun to read.
  • I use the search API to keep track of people talking about my stuff... Hecl, LangPop.com, and so on. That's kind of handy, but it feels more like a big wiretap than a "conversation".
Other than that, it's another firehose of data that I really don't need - I probably read too much junk on the internet as it is.

David Welton: Twitter? Hrm. Ok...

Yoav's post about twitter was interesting: http://yoavs.blogspot.com/2009/01/one-curious-thing-about-twitter.html Personally, I don't really see the appeal. So far there are only two uses I have for it: Other than that, it's another firehose of data that I really don't need - I probably read too much junk on the internet as it is.

23 December 2008

Emilio Pozuelo Monfort: Collaborative maintenance

The Debian Python Modules Team is discussing which DVCS to switch to from SVN. Ondrej Certik asked how to generate a list of commiters to the team s repository, so I looked at it and got this:
emilio@saturno:~/deb/python-modules$ svn log egrep "^r[0-9]+ cut -f2 -d sed s/-guest// sort uniq -c sort -n -r
865 piotr
609 morph
598 kov
532 bzed
388 pox
302 arnau
253 certik
216 shlomme
212 malex
175 hertzog
140 nslater
130 kobold
123 nijel
121 kitterma
106 bernat
99 kibi
87 varun
83 stratus
81 nobse
81 netzwurm
78 azatoth
76 mca
73 dottedmag
70 jluebbe
68 zack
68 cgalisteo
61 speijnik
61 odd_bloke
60 rganesan
55 kumanna
52 werner
50 haas
48 mejo
45 ucko
43 pabs
42 stew
42 luciano
41 mithrandi
40 wardi
36 gudjon
35 jandd
34 smcv
34 brettp
32 jenner
31 davidvilla
31 aurel32
30 rousseau
30 mtaylor
28 thomasbl
26 lool
25 gaspa
25 ffm
24 adn
22 jmalonzo
21 santiago
21 appaji
18 goedson
17 toadstool
17 sto
17 awen
16 mlizaur
16 akumar
15 nacho
14 smr
14 hanska
13 tviehmann
13 norsetto
13 mbaldessari
12 stone
12 sharky
11 rainct
11 fabrizio
10 lash
9 rodrigogc
9 pcc
9 miriam
9 madduck
9 ftlerror
8 pere
8 crschmidt
7 ncommander
7 myon
7 abuss
6 jwilk
6 bdrung
6 atehwa
5 kcoyner
5 catlee
5 andyp
4 vt
4 ross
4 osrevolution
4 lamby
4 baby
3 sez
3 joss
3 geole
2 rustybear
2 edmonds
2 astraw
2 ana
1 twerner
1 tincho
1 pochu
1 danderson
As it s likely that the Python Applications Packaging Team will switch too to the same DVCS at the same time, here are the numbers for its repo:

emilio@saturno:~/deb/python-apps$ svn log egrep "^r[0-9]+ cut -f2 -d sed s/-guest// sort uniq -c sort -n -r
401 nijel
288 piotr
235 gothicx
159 pochu
76 nslater
69 kumanna
68 rainct
66 gilir
63 certik
52 vdanjean
52 bzed
46 dottedmag
41 stani
39 varun
37 kitterma
36 morph
35 odd_bloke
29 pcc
29 gudjon
28 appaji
25 thomasbl
24 arnau
20 sc
20 andyp
18 jalet
15 gerardo
14 eike
14 ana
13 dfiloni
11 tklauser
10 ryanakca
10 nxvl
10 akumar
8 sez
8 baby
6 catlee
4 osrevolution
4 cody-somerville
2 mithrandi
2 cjsmo
1 nenolod
1 ffm
Here I m the 4th most committer :D And while I was on it, I thought I could do the same for the GNOME and GStreamer teams:
emilio@saturno:~/deb/pkg-gnome$ svn log egrep "^r[0-9]+ cut -f2 -d sed s/-guest// sort uniq -c sort -n -r
5357 lool
2701 joss
1633 slomo
1164 kov
825 seb128
622 jordi
621 jdassen
574 manphiz
335 sjoerd
298 mlang
296 netsnipe
291 grm
255 ross
236 ari
203 pochu
198 ondrej
190 he
180 kilian
176 alanbach
170 ftlerror
148 nobse
112 marco
87 jak
84 samm
78 rfrancoise
75 oysteigi
73 jsogo
65 svena
65 otavio
55 duck
54 jcurbo
53 zorglub
53 rtp
49 wasabi
49 giskard
42 tagoh
42 kartikm
40 gpastore
34 brad
32 robtaylor
31 xaiki
30 stratus
30 daf
26 johannes
24 sander-m
21 kk
19 bubulle
16 arnau
15 dodji
12 mbanck
11 ruoso
11 fpeters
11 dedu
11 christine
10 cpm
7 ember
7 drew
7 debotux
6 tico
6 emil
6 bradsmith
5 robster
5 carlosliu
4 rotty
4 diegoe
3 biebl
2 thibaut
2 ejad
1 naoliv
1 huats
1 gilir

emilio@saturno:~/deb/pkg-gstreamer$ svn log egrep "^r[0-9]+ cut -f2 -d sed s/-guest// sort uniq -c sort -n -r
891 lool
840 slomo
99 pnormand
69 sjoerd
27 seb128
21 manphiz
8 he
7 aquette
4 elmarco
1 fabian
Conclusions:
- Why do I have the full python-modules and pkg-gstreamer trees, if I have just one commit to DPMT, and don t even have commit access to the GStreamer team?
- If you don t want to seem like you have done less commits than you have actually done, don t change your alioth name when you become a DD ;) (hint: pox-guest and piotr in python-modules are the same person)
- If the switch to a new VCS was based on a vote where you have one vote per commit, the top 3 commiters in pkg-gnome could win the vote if they chosed the same! For python-apps it s the 4 top commiters, and the 7 ones for python-modules. pkg-gstreamer is a bit special :)

14 December 2008

Biella Coleman: Gluten Free Beer

There is not much I miss from the world of gluten (though it does make it hard to eat on the fly) but I do miss good beer, especially Belgium beer. Thankfully, the last five years has seen a mini-explosion of decent to great gluten free products, including beer and here is a handy list of gluten free beers.

12 December 2008

Romain Francoise: Pimp your git meme

Zack's post on git colors is a perfect opportunity to recycle this old post of mine on how to make git diff look more like quilt diff and vim.

For good mesure I'll also throw in this snippet (stolen here) which adds a git rlog alias, very handy when you just want to grab the short hash of a recent commit:
[alias]
rlog = log --pretty=format:\"%h %Cblue%cr%Creset %cn %Cgreen%s%Creset\"
It looks like this:

Matthew Palmer: ETOOMUCHMAGIC

I'm a fairly big fan of the Rails web development framework; it uses a programming language I quite enjoy using, and deals with the "bureaucratic" overhead of writing a web application with minimal fuss, leaving me to think about the things that matter -- my application's functionality. To achieve this wonderous feat[1], Rails has a healthy injection of magic in the codebase, to do all sorts of interesting things, like autoload missing constants, and make intelligent guesses about what I want to happen in various situations. The problem comes when you want to reuse this magical code for something else. I'm working on a project at the moment where a bunch of the utility functions that are in the ActiveSupport gemlibrary would come in real handy. Well, that's OK, it's a separate gemlibrary from the rest of Rails, I'll just load it into my app, and I'm away. Or... not. The problem is that it would appear that a lot of the magic in the library is mandatory. Regardless of whether I want your constant autoloading magic, I've got it. I also can't just easily pick-and-mix the parts of the ActiveSupport library that I want, because there's all sorts of dependencies between the different chunks of the code that aren't expressed the "right way" -- everything gets loaded in the top-level active_support.rb, rather than being depended on by the files that need the classes. This is arguably a bug in ActiveSupport, but it's not something that's likely to be real high on anyone's annoyance list (since in practice ActiveSupport is a part of Rails, and when you use it in Rails it works Just Fine). So, to all programmers: magic is great, but be careful about excessive magic. In particular, don't make magic happen in places that the user didn't ask for, and allow people to turn off your magic when it's counter-productive to their purposes.
[1] This feat becomes more and more wonderous to me every time I look at the other available web development frameworks out there, especially ones in other languages. Despite having Rails to rip offtake inspiration from, they still seem to require a lot of boilerplate to achieve their goals. While there's a limited amount of boilerplate stripping you could do for a C program, Python people keep telling me that their language is just as powerful as Ruby -- and yet all the Python web framework usage I see is chock full of unnecessary cruft.

15 November 2008

Stefano Zacchiroli: from Vim to Emacs - part 2

One month with Emacs and counting - Part 2
Other posts in the from Vim to Emacs series: part 1
A while ago I've blogged about my switch from Vim to Emacs, promising a blog post series, quite a mouthful :-) nevertheless, it's time to continue the series. The first part was about why I think that nowadays Emacs is ready to be switching to. This second part is about flawed Vim design choices which substantially contributed to my choice. (Of course all this post is under a IMO-/rant-disclaimer, it can't be otherwise, so take it cum grano salis) Flawed Vim design choices Vim started as a wonderful editor, following the path of Vi, which in turn has got right a good deal of design choices. One is the often debated modality. In spite of being a HCI PITA in general, modality is not a problem at all for software you are using every single day (and the editor is the 2nd program I use the most, with the terminal being the 1st), because you learn it as a habit. In the case of Vim, modality is good because it let you use powerful yet simple motions in command mode, which can be easily combined with operator-pending commands. This can be considered yet another incarnation of the UNIX philosophy, casted inside the editor itself. ... which brings us to the good old joke which describes Emacs as a great operating system, lacking only a decent editor. In fact, Vim is no longer the nice Unix philosophy player which it used to be, and Emacs plays much more nicely with external tools than Vim. As arguments, let's consider a few (not so) recent Vim evolutions: Well, I acknowledge that Emacs got this choice right, and that it's an important one: Emacs supports interaction with external processes, and plugin authors have been happy to exploit it to create really cool stuff (sticking to the UNIX philosophy). Please welcome: Flyspell, M-x grep (shameless smartass plug: same number of keystroke of :grep), Grand Unified Debugger, a sampling of language-specific major modes with top-level support. (But I recommend having a look at least once at the coolness of other stuff built-on top of external process support, like Flymake, mentioned by dancer not a long ago.) Even in this respect, I acknowledge that Emacs got this right. It has chosen a single, now full-fledged, programming language (Elisp), which is offered both to the final user (fact: the average Emacs user knows much better how to program her own editor than the average Vim user) and to extensions developer. The standard library of the language is organized with a consistent naming (even though not always intuitive) and documented in an organized manner. You might not like the language, but at least is has been taken seriously and managed as such. Finally, being a Lisp dialect, you might need what you learn with Elisp elsewhere. Vim script is too committing: it is useful only inside Vim. I believe that contributed significantly in its scarce diffusion among Vim users. The fact that Elisp was born together with Emacs and that it is also used internally for the editor implementation is not relevant here: I do care about what is offered to me as an user and as an extension developer. What I see on the Emacs side in this respect is much better that what I see on the Vim side. Moreover, from the point of view of the users, is the difference between what is inside the editor and what is outside (i.e., the extensions) that relevant? I think it is not, and that brings me to the final Vim choice which I consider flawed and which has the potential of seriously limit its future evolutions: Where to from here in this blog post series? For sure some tips on how to migrate for hard-core Vim users, then we'll see ... If you did enjoy the read please let me know commenting in the discussion page (as you did in the last post, thanks!).

11 November 2008

Daniel Burrows: aptitude 0.5.0 released

I've released version 0.5.0 of the aptitude package manager (release notes). Once the mirrors have synced, you should be able to download it from Debian's experimental distribution, or manually from the aptitude package page.
[Edit] This release was uploaded to experimental because it is not a final release. aptitude follows the Linux version numbering scheme in which an odd second digit indicates an unstable development version. DO NOT INSTALL THIS VERSION IF YOU WANT STABLE SOFTWARE; IT IS INCOMPLETE, INADEQUATE, AND PROBABLY INCORRECT. To reply to some questions that several people have asked me:
  1. The final release of aptitude 0.6.0 will be split into two packages, one containing only the traditional text interface and named aptitude-curses, and one containing the GUI binary named aptitude-gtk, with both of them providing the aptitude binary through Debian's alternatives mechanism. This release wasn't split because the code to drop GTK+ support was buggy and I discovered this fact halfway through assembling the release. It's fixed now.
  2. To run the traditional curses interface, pass the --no-gui command-line parameter or set the option Aptitude::Start-Gui to false in /etc/apt/apt.conf. Unless you want to test that the curses frontend isn't broken, though, there won't be much for you in this release: the only change affecting it is Xapian support, and that currently breaks incremental search. (see the note above about this being an unstable release)
Also, another feature that I suspect might be bothersome is the behavior of updating the package lists and downloading changelogs on startup. There's no switch for changelogs yet, but you can disable the package list update by setting Aptitude::Update-On-Startup to false.
The main change in this release is the new GTK+ frontend, designed and implemented by Obey Arthur Liu with funding from the 2008 edition of Google's Summer of Code. aptitude 0.5.0 screenshot The new frontend is is an effort to bring some of the design principles of the curses frontend to a GUI environment, while also exploiting the unique features a GUI gives us and exploring ways to deal with changes in the environment in the nine years since aptitude was first designed. For instance, it is no longer reasonable for the user to actually read the entire package list (when I first installed Debian, you could read through the whole package list in a single sitting). So instead of basing the interface around a list of all the packages, we based it around the ability to search for the packages you're interested in. This version of aptitude also introduces Xapian searching:
daniel@emurlahn:~$ aptitude search "apt package manager"
i   apt                                  - Advanced front-end for dpkg
p   apt-dater                            - terminal-based remote package update manager
p   apt-dater-dbg                        - terminal-based remote package update manager (d
i   aptitude                             - terminal-based package manager
i   aptitude-dbg                         - Debug symbols for the aptitude package manager
p   createrepo                           - generates the metadata necessary for a RPM pack
p   gnome-apt                            - graphical package manager
p   smartpm                              - An alternative package manager that works with
p   smartpm-core                         - An alternative package manager that works with
i   synaptic                             - Graphical package manager
i A update-manager-core                  - APT update manager core functionality
You might ask why I didn't search for just package manager. The reason is simple: aptitude doesn't yet sort by relevance, and that second search gave me screenfuls of packages whose description contains both package and manager, including addressmanager.app (a PIM for GNUstep), compiz-gtk (a piece of eye candy), and wterm (an X terminal emulator). However, it is worth noting that Xapian searches are fully integrated into the aptitude search language, so they can be combined with non-Xapian search terms in just the way you would expect:
daniel@emurlahn:~$ aptitude search "?installed apt package manager"
i   apt                                  - Advanced front-end for dpkg
i   aptitude                             - terminal-based package manager
i   aptitude-dbg                         - Debug symbols for the aptitude package manager
i   synaptic                             - Graphical package manager
i A update-manager-core                  - APT update manager core functionality
So, all the basic functionality that the GUI version needs is in place; the next step is to start polishing it and filling in the gaps that are left. And, of course, suggestions and bug reports are welcome, so we know where the rough spots and the gaps are. Please send your comments to aptitude-devel@lists.alioth.debian.org so that they are part of the public record and so that people besides me can read them. :-) Happy package managing!

10 November 2008

Matthew Garrett: Android

As a brief introduction to this - I first read through the Android code when interviewing with Google for an opening with the Android kernel team. I didn't get the job, and while I don't think anything that follows here is as a result of residual bitterness you might want to take some of it with a pinch of salt.

Anyway. Android is a Linux kernel with a heavily customised user layer that bears little resemblance to any traditional Linux system. I write in C because using pointer arithmetic lets people know that you're virile so this Java-like thing is of little interest to me and I'm going to ignore it and just look at the kernel, because after all that's what I'm paid to be good at.

The short summary of the rest of this post is that I'm not planning on giving up my iphone yet.

The Android kernel source lives in a git tree here. It can pretty much be logically split into two parts - the port to Qualcomm's MSM7xxx series chips and the special Android customisations. A bunch of the MSM7xxx port code has been merged through the ARM tree and is now upstream, and Brian Swetland seems to have been fairly active in looking after that. Full marks to Google there. This code is handy outside the Android world and benefits anyone wanting to run Linux on similar devices.

The Android-specific code is more... interesting.

As I mentioned, the Android application layer isn't Unix in any real sense. The kernel reflects this. It ranges from pragmatic (if hacky) approaches like encoding security policy and capabilities in group IDs that are hardcoded into the kernel through to implementing an in-kernel IPC mechanism (apparently related to the OpenBinder implementation from Palm, but judging by the copyrights a complete rewrite). To an extent, I'm fine with this. Something like Binder is pretty clearly not going upstream, so the fact that it engages in bizarre design decisions like sticking chunks of its interface in /proc is pretty irrelevant. What's more interesting is the code that should be generalisable.

I work on power management, so I'm always interested in what kind of power management functionality and interfaces people want. Plumbers included a nice discussion with someone from an embedded company I can't remember, culminating in us deciding that the existing cpufreq interface did what they wanted and so no new interfaces needed to be defined. Google was going to be an interesting case of a large company hiring people both from the embedded world and also the existing Linux development community and then producing an embedded device that was intended to compete with the very best existing platforms. I had high hopes that this combination of factors would result in the Linux community as a whole having a better idea what the constraints and requirements for high-quality power management in the embedded world were, rather than us ending up with another pile of vendor code sitting on an FTP site somewhere in Taiwan that implements its power management by passing tokenised dead mice through a wormhole.

To a certain extent, my hopes were fulfilled. We got a git server in California.

Android contains something called the android_power driver (ignore the references to CSMI, which is a piece of OMAP-specific hardware for communicating with the baseband - I'm not sure what they're doing in there). As far as I can tell, this is an interface that handles the device being locked and unlocked, and associated powering down of certain bits of hardware. Except it's shit. Devices register device handlers and a level where they wish to be suspended. There's no direct concept of intra-device dependencies so you end up with stuff like:
android_early_suspend_t early_suspend;
android_early_suspend_t slightly_earlier_suspend;
to deal with the fact that the MSM framebuffer driver depends on the MDDI driver having brought the link bank up and so needs its suspend method called before the MDDI driver but its resume method to be called after, and the only way to handle that is to register two methods - the "slightly earlier" one which has a suspend method but no resume, and the "early" one which has a resume method but no suspend one.

Of course, this also means that all of your device runtime power management policy ends up in the kernel. Userspace indicates what state it wants to go to and the kernel decides what's going to get powered down. This kind of coarse grained approach means that as your hardware setup becomes more complex you hit combinatorial explosion. Expressing all the useful combinations of hardware state simply becomes impractical if all you're exposing is a single variable. What would be more useful is the ability for userland to interact with individual pieces of hardware.

The amusing thing is that in many cases Linux already has this. Take a look at the backlight and LCD class drivers, for instance. They provide a trivial mechanism for userspace to indicate its desires and then modify the device power state. It's true that there are other pieces of hardware that don't currently have interfaces to provide this kind of information. And that's where cooperation with the existing community comes in. We've already successfully fleshed out interfaces for runtime power management for several hardware classes, with the main thing blocking us being a lack of awareness of what the use cases for the remaining classes are. But linux-pm has seen nobody from the Android team, and so we end up with a lump of code solving a problem that shouldn't exist.

When Robert Love gave his presentation on Android at Lugradio Live in SF back in April, he talked about how one of the reasons that Google weren't releasing the source for their userland stack until they shipped phones was to prevent it being seen as throwing unfinished code over the wall and then ignoring the community. It's unfortunate that this is almost exactly what's happened with their kernel. Right now the fact that Android is based on Linux is doing almost nothing to benefit the larger Linux community. What could have been a valuable opportunity for us to gain understanding of an interesting problem has instead ended up as yet another embedded vendor kernel, despite all the assurances I got from various people at Google.

Disappointing.

9 November 2008

Simon McVittie: A magical xrandr incantation

Here's a handy incantation I use with the Intel X.org graphics driver on my laptop.

Put this script somewhere convenient:

#!/bin/sh
if xrandr   grep '^VGA connected' >/dev/null
then
    #echo "VGA connected"
    xrandr --output VGA --above LVDS --auto
    xrandr --output LVDS --auto
else
    #echo "VGA not connected"
    xrandr --auto
fi 2>&1   logger -t xrandr-hotkey

and bind it to your "switch video mode" key, e.g. Fn+F7 on my Thinkpad X60s. For instance, I run xbindkeys, so I saved it as autoxrandr and put this in ~/xbindkeysrc:

"exec /home/smcv/bin/autoxrandr"
    XF86Display

Now if you press the "switch video mode" key with a monitor plugged in, you'll get the external monitor appearing above the laptop panel (my preferred configuration - I've balanced my monitor on an N800 box to get the bottom of the screen level with the top of my laptop's screen). If you press that key again after unplugging the VGA cable, the laptop will turn off the VGA output and pull all the windows onto the built-in screen.

Next.

Previous.