Julien Danjou: awesome 1.2: guided tour
Today I finally released awesome 1.2. I also wrote a guided tour which presents some of the functionalities of awesome.
Today I finally released awesome 1.2. I also wrote a guided tour which presents some of the functionalities of awesome.
I'm constantly amazed how much useful information about Debian is published
daily (on web sites, blogs and mailing lists.) I'm also amazed about how
much time I spend searching web pages I've seen in the past but haven't
bookmarked. So bookmarks.debian.net
is an attempt to improve this situation, and having all the links organised in
a way so that I actually find what I'm searching for. There are only 14 links
right now, and of course lots of standard “places to start” links
missing (like pages from debian.org), but
I'll add stuff as I use the pages and as submissions come
in. I'll think about suggestions on how to organise the categories, but all in
all, it's my bookmark collection, not yours, so the final decision is mine.
Oh, and: please be patient if I'm not adding your submission immediately.
(Btw, the number one piece of information I never remember is the name of
that script to sort a list of packages by maintainer. I know it's on lists.d.o
somewhere... :-)
Like any sensible software developer, I have a close relationship with revision control systems. In my previous job, I was an SCM Engineer (see Software configuration management) which meant I had an even closer relationship than most, since we were running the CVS servers and actively using them to track changes and deployments.
We all know, deep down, that revision control systems shouldn’t exist. This kind of thing should be inherent in the design of the operating system, through standard file and filesystem formats. The OLPC interface is making some headway towards that, but for the rest of us, it means using a revision control tool throughout the development process.
Unfortunately, even though the tool is expected to be the most-used command on your system, very few of them are particularly easy to use. Thus there’s a large learning curve, and people become religious about their choice since they have invested significant time in using it.
Just to spice the mix up, not only will people religiously defend their choice of revision control system, but they’ll do so while actively hating it.
In the beginning there was CVS and we all thought that it was pretty good. It was based on the simpler RCS and shared a file-format with it, but introduced control of directory trees and remote operation.
Actually, in reality, CVS wasn’t that good. Its command set could be a little strange and inconsistent (e.g. it’s not possible to diff between two dates on a branch); the support for branching assumed that all branches would be merged into the mainline, and only once; and nobody ever really knew how to create a new project in a repository (tip. cvs import is wrong).
But we all used it anyway, and we muddled through. It did have some good features; it was simple, fast and pretty reliable–when it did break, you could usually fix the repository yourself. And most importantly of all, we understood how to drive it.
And so it was for many years, until Subversion (SVN) came along. Subversion intended to be “a better CVS”, perhaps this goal should have made us suspicious at the time since CVS was already being a pretty good CVS by itself; unfortunately we hated CVS so much we flocked to the new system in hope.
In hindsight, Subversion didn’t really improve on CVS much at all. In fact, arguably, the only real improvement was the addition of atomic commits (in CVS, each commit is per-file, so it’s manual labour to work out which change was made to two files at the same time).
(Its support for branching, tagging, copying, renaming, etc. were no better than CVS’s when done in the repository by hand.)
The cost of this single new feature was a much more complicated interface (with two separate commands), a backend that tended to break down weekly and a lethargic slowness to its operation.
Most people I know now justify their use of Subversion instead of CVS by “Subversion is maintained, CVS isn’t” which is a somewhat self-fulfilling justification.
While the mass conversion to Subversion, and ensuing disappointment and frustration, was going on; something new appeared on the horizon: Arch.
Arch was different, it broke one of the core assumptions of revision control, that of the repository as a cathedral. In CVS, and Subversion like it, if somebody wants to modify your code (even if on a branch) you need to give them access to your own repository. In some cases (especially with CVS), vast access control and permission structures would be in place to ensure proper behaviour.
With Arch, you don’t; all you need to give to anyone is read access. Anybody can make their own branch by copying yours and committing to their own copy.
This model also necessitated fixing a long standing problem that CVS had; Arch has repeatable (smart) merging. If you merge from a branch, you can merge again later, and again, and again.
Arch made this possible through each commit (changeset) having a globally unique identifier; made from the branch’s own globally unique identifier and the changeset number in the branch.
Unfortunately while this was a massive step in a new direction, Arch had an absolutely terrible user interface. Its command list was terrifying with over 100 commands, many of which had multiple word names (tla set-tree-version). It exposed too many of its own innards, and expected you to learn them. It also forced baroque file naming semantics on its users and strange policy (though shalt not commit without first running “make clean”).
Efforts were made to improve Arch’s user interface through projects such as baz, but they were always to be doomed from the start.
We’ve since seen an explosion of new revision control systems; Monotone, Darcs, Git and Bazaar.
What’s especially interesting is the commonality between these systems. They are all “distributed” like Arch, though they also all discard the strange “unique branch identifier” convention and instead simply assign a unique identifier to each file or commit.
This means that they all support personal branches, and by necessity all support repeatable (smart) merging.
So how do they differ, what are their killer features and killer problems?
Monotone is all about repository integrity, ensuring that every commit is both authorised and intact. It pays for this with a severe lack of speed.
Darcs is based around a “theory of patches”, a branch is not made up of its history but by the collection of patches in it. Unfortunately this often breaks down, and darcs frequently gets stuck calculating even trial and commonplace branch models.
Git is very strange to me; its killer feature appears to be the speed at which it can handle very large trees, but the interface is as insane as Arch’s was. It is heavily optimised for the “I only apply patches” development model, at the expense of ordinary development models (it shares an issue with Arch where calculating annotations on an individual file is an expensive operation).
What about Bazaar? Its killer feature is that it is designed to work the way you do. The command set is relatively small, and each of them works in the most obvious manner. It also supports plugins so that you can always implement your own workflow.
Of all the revision control systems, it’s the only one (that I’m aware of) that supports both distributed and centralised workflows (and lets you go distributed when you need to, e.g. when you’re on a plane).
Here’s a few examples of how Bazaar’s command set works the way you do. To start managing some code in bzr:
$ cd myproject
$ bzr init
To add the files, copy in your usual .bzrignore file and just add everything:
$ cp ~/bzrignore .bzrignore
$ bzr add
added foo.c
added bar.c
Check the output for mistakenly added files, adjust .bzrignore and remove the file with bzr rm.
A common operation is realising that the commit you’re about to make should really go on a new branch for now:
$ cd ..
$ cp -a myproject myproject-foo
$ cd myproject-foo
$ bzr commit
A copy of a Bazaar branch is a different branch, you can commit to it separately. There’s a bzr branch command for it too (which deals with issues such as bound branches, checkouts, etc.) but it’s nice to demonstrate that Bazaar does what you’d expect even when you don’t use its own commands.
Pulling changes from another branch (where you haven’t made any modifications yet) is easy:
$ bzr pull ../myproject
As is merging (when your branches have diverged):
$ bzr merge ../myproject
One particularly nice feature is that after a merge, you see the merge as a single commit and it can be treated as such; but it also has the set of merged commits indented under it–you can examine these as individual commits as well!
What’s the downside of Bazaar? Well, it’s not the fastest system (but by no means the slowest), for small to medium sized projects this is never an issue but may be for extremely large projects–fortunately the developers are improving its performance all the time!
But that doesn’t matter; it is, honestly, the first revision control system that I don’t hate.
Sunday was a quiet day for the top teams. Neither Australia nor New Zealand
were in danger against Fidji (55-12) or Scotland (44-0).
I'm still impressed by the australian team. They didn't show much weaknesses
against Fidji, despite the strong physical contest bringed by the Fidjian
forward players. The australian rear lanes were impressive, particularly
Matt Giteau, scoring 27 points and designed as MVP for Australia-Fidji.
The All Blacks crushed a B team from Scotland. The scottish staff decided
that winning against New Zealand is nearly impossible and therefore they
choosed to have their key players resting, which is a wise choice, but not a
gift for the Murrayfield supporters. As a consequence, New Zealand quitely
won the match and therefore qualifies for 1/4th finals (and they'll win
their pool unless Romania plays with 30 players against them....).
No match for yesterday and two matches today. Unfortunately, Canada-Japan
(12-12) in Bordeaux was broadcasted too early for me and I haven't seen it.
For Japan, this is the end of 13 consecutively lost matches in RWC for
Japan, so kind of victory.
I've seen parts of Romania-Portugal. I wished Portugal wins that one as
they're clearly the most courageous team in the RWC and certainly, among
the non top teams, the most promising one. The Portuguese lost 10-14 even
though they lead 10-7 for a while. Quite a deception for me but surely these
players will never forget the support of the French crowd (most of these
being the strong portuguese community we have in our country).
Tomorrow will feature Georgia-Namibia and Samoa-USA. I'll try to watch the
latter, which is played in St-Etienne, my welcoming home town (ask the Scots
supporter and team!).
I'm pretty sure someone in one of
my syndicators was looking for software
to send emails in the future from anywhere,
but I'm damned if I can find the message.
At the time, I was using a homebrew system
involving shell scripts and mailx, so
I wasn't much help.
I'll upload a proper release soon, but
I'm happy to upload a second hack of
maildelayline
here. It requires recent bash, sed, at
and a sendmail-like executable.
I've deliberately kept it simple to try to
make it easier to debug and I dislike
needing to install too much for such a simple
task.
Make a temporary directory, edit the top of
the script, then
install it on a pipe mail alias (I'd keep the
address secret and improbable, like RUbAHy8961: " /path/to/maildelayline" and then save the address in my address book) and send it an email.
At the start of the email body, write a
pseudo-header with the time, like
"X-Send-At: now + 7 hours"and follow it with the To:, Cc:, Bcc: and any other headers. Some headers (like from, message-id and threading ones) are kept from the original message, but the Date and Received headers are among those removed. Don't put the X-Send-At in the email header unless you know what you're doing - usually, put it in the body. The X-Send-At field can be any time that your at program understands. If you confuse it, or forget to give it a time, then you should get a bounce message that says something like "garbled time" among other errors. maildelayline is similar to Leave A Message or FutureMe but it sends mail to anyone, autonomously on your own server, from emails instead of a web form. I think it will resend MIME attachments as long as the pseudo-header is in a plain text/plain part and not quoted-printable or base64 or something. It is named after delay lines, which I believe are mostly used in audio effects to repeat a sound after a time delay. Please leave a comment if you find this useful, or if you have an improvement.
Over the weekend I spent some time hacking on Poky, integrating Network Manager.
Because I'm hardcore I went for NM from trunk, instead of 0.6, as
apparently its approaching stability and feature completeness. This
afternoon I finally fixed enough stupid problems (/sbin/ip wasn't
executable for instance, thanks install -s) that it connected to
the office wireless and let me browse to Google.
Thanks to Dan Williams for answering my stupid questions about Network
Manager.
My lack of posts lately left Planet readers without yet another yay,
GNOME 2.20 released post. I'm sure nobody missed it. However, I can report
what's going on in Debian regarding its packaging.
The executive summary is: the GNOME team rocks, and having much of GNOME
2.20 available in sid on the very same day it was officially announced was
possible thanks to the incredible work done by lool, Np237, slomo and other
restless team members, who spent the summer tracking GNOME 2.19 releases and
packaging them in experimental.
To get a better view on what's left to do, you can use the
2.20 status page,
which you'll see shows lots of green at this point. Some of the outstanding
blockers are gtksourceview and the new
epiphany-webkit binary stuck in
NEW, which block
gedit and epiphany, and of course, the initial mess
that the buildds need to sort out to get the dependencies installed. The rest
of red bits will continue trickling in unstable in the next few days.
Beware of the new behaviour in control-center, which will by
default use the DPI value provided by X. Some X drivers are still buggy and
can provide bad values, which will cause bad font displays. If you're hit by
this, you can force a DPI value in control-center, which should fix the issue.
Also, you can read the
relevant thread
in our mailing list.
Enjoy 2.20!
Update: yeah, ftpmasters rock too, and epiphany hit
incoming just a few hours after posting this entry. Yay ephy-webkit!
Last week I had to use Vicky's laptop briefly, which sadly runs Windows
XP. I was greated with this monstrosity:
The baby Jesus is beyond crying. For the curious, from left to right
there is battery charge, wireless network status, InstallShield Update
Manager, Java Updates, Windows Updates, Lastfm Scrobbler, Lenovo Client
Security Password Manager, Bluetooth network connection (never used),
Wired LAN network connection (never used), volume, ThinkVantage Access
Connections wireless status, IBM Message Centre, Epson printer status,
ThinkVantage Access Connections, Adobe Photo Downloader, GoogleTalk,
Bluetooth status, QuickTime, Windows Security Alerts. After 30 minutes of
removing software and disabling some more, I finally got this down to
seven icons. I wish there was a way to disable Windows from showing the
status of every network connection though.
NP: Sketches of Spain, Miles Davis

I have a number of friends who are finishing PhDs and then I have those “special” friends who are wrapping up their dissertation and manage to do something else quite extraordinary right at the same time. Shay David is one such friend who is currently wrapping up a fascinating dissertation on the social implications of openness and collaboration in various contexts (software, biology) but is also pushing the boundaries of what we mean by collaboration by helping to create a new vision, platform, medium, tool, and site, Kaltura.
As you can read about more on their about page, Kaltura basically lowers the technical bar for video editing bringing the power of editing to anyone, at least anyone who registers for an account. Kaltura provides an easy-to-use tool kit that allows you and others to hack away to create, edit, & mashup videos. In lowering the bar, they are significantly expanding the mind (and actual space) for video collaboration.
Some more good news is that Kaltura is soon going to GPL its technology, and they are looking for developers who want to contribute to this exciting project. The project is in PHP and Flex/ActionScript3, if anyone is interested, they should email developers@kaltura.com!
Happy (video) hacking…
* Even it was short notice, I got ticket (last ticket in Bhavanagar Express) luckily! Thanks to our receptionist Rochelle! Reached early in the morning on Friday and again it was headache to get rickshaw with meter working properly! I have to pay 50 Rs (Standard rate for any place for stranger ;)). We have got nice guest home at Ahmedabad. With warm welcome, my all usual weakness from traveling went away in seconds. Took some pictures from 8th floor. Buildings, Houses, Peacocks!
* Day started with meeting, thank God, it was really good meeting than our imagination from previous experiences. Fixed some technical issues. And then we went to our new office. Awesome furniture, spacious area and yes, very good connectivity
After the stunning match between RSA and Tonga, we watched an also very good
England-Samoa (44-22). Even if their play was still far from perfect (lack of
imagintation, mostly), the English players succeeded quite easily against
Samoa who never gave up. Johny Wilkinson's come back is a success, imho, and
England will then play against Tonga for qualification on Thursday. The
winner of that match will end up 2nd of that pool (assuming that RSA wins
over USA) and should logically play against Australia (while RSA will play
against Wales or Fidji, this assuming that Australia wins over Fidji today).
Argentina had to win against Namibia with the bonus point. They easily made
it (63-3). As usual in such situations, Namibia resisted about 30 minutes
(and were even leading 3-0 for a few minutes). However, the imprecision of
their game (a disastrous kick play) left dozens of balls to the Argentinians
who then could easily score lots of tries. The Argentinian were, at the end,
obviously sparing their energy for the upcoming fight against Ireland next
Sunday. In this pool everything can happen (even Argentina being eliminated,
which is however not very probable). From what they showed, the Argentinians
can definitely win over Ireland, which would then give them the first rank
and an easier 1.4th final against Scotland or Italy.
Two matches today: Australia-Fidji and Scotland-New Zealand. Australia and
New Zealand have a strong advantage and I don't really expect any surprise
here.
If you hadn't the occasion to see RSA-TON, just look around for it, find if
it is broadcasted at a later time and watch it.
The Tonga team just had 10 minutes of weakness, with South-Africa scoring
three tries. But they never gave up, scored two tries and finally ended up
25-30, winning the defensive bonus point and really worrying South-Africa.
For sure, the repeated failures of RSA on penalties also helped for this
scenario, but Tonga became the stars of this pool and Finau Maka is the star
of Tonga..:-)
The Bollaert stadium in Lens is more used to the fights of the local soccer
team than high level rugby but they supported the Tonga team the very same
way they support the "Sang et Or". I think that the Tonga players will
remember that one.
England can *really* worry.
Thursday featured Wales-Japan which we briefly watched. Easy win for the
Welsh who begin to secure down their qualification for the 1/4th finals.
They'll just need a victory over Fidji on Sept 29th to do so (but Fidji
would qualify by winning so that match will be one of those to watch during
last round). Nothing really interesting
to say about WAL-JPN (72-10). The difference in the front lines was too
obvious for Japan to get any chance to win. However, at least during the
first half of the first half-time, the were even leading after scoring one
of the best tries as of now in the tournament.
Yesterday was a key day for the French team. Victory against Ireland was
mandatory. They made it (25-3, two tries) which is by far the most important.
That wasn't definitely an easy match but noone was hoping it to be one. The
french game is still far from being perfect (sometimes strange kick play and
weird decisions by the rear players, sometimes slow assistance to players in
rucks and sometimes stupid fouls giving their opponents opportunities to
kick penalties (or expelled players as Traille was at the end of the game).
On the other hand, some parts of the game were good quality: scrums (two
balls won), line-outs (4 or 5 balls won on opponents' throw: great Julien
Bonnaire there) and the magic inspiration of Elissalde and Michalak on the
two tries as well as Clerc scoring these tries.
There is still room for progress for the French, definitely (the same play
against New Zealand, Australia or South Africa would be a loss). They're
however on a good way. Next step is winning over Georgia, hopefully scoring
a bonus point (that may be harder than expected as Georgia showed good
defense) and hope that the Irish team will win over Argentina.
Again, this week-end will be busy:
Error in process <0.29.0> with exit value:
undef,[ shell_default,sfdsf,[] , erl_eval,do_apply,5 , shell,exprs,6 , shell,eval_loop,3 ]
In English, that means that I tried to execute the function sfdsf(), which doesn't exist. It seems that there ought to be a way to keep the nice, computer parseable error messages, and add in something that humans would find just a bit easier.
Other people have already covered the problems with Erlang's strings, so I won't belabor the point. Suffice it to say that, in my opinion, is_list([foo, bar, baz]) and is_list("hello") should probably not both be true.
Which brings us to another issue. Erlang is a language used in big, reliable systems like telephony switches. That's not the sort of environment where you want to break things, so I doubt that Erlang will ever see big changes that introduce incompatibilities, like Python has recently done. This one is a tradeoff - stable, reliable and backwards compatible is simply not compatible with rapid development of the language - it's a zero-sum game, you want more of one, you get less of the other.
Related, is the "open sourceness" of the language. It is open source, which for me is very nearly a prerequisite for dedicating my time to a language, but Ericsson appears to maintain firm control over it. This is another thing that's both good and bad. Having the backing of a large corporation means that developers are paid to work on and enhance Erlang, which is beneficial to everyone. On the other hand, as some people say, open source is just the start, open development is important too. Random thought: I bet Erlang would make a nice Apache project, but I'm sure the bureaucracy involved would be a nightmare.
In terms of the language itself, beyond the syntax, it feels a little bit too verbose. Perhaps not as much as Java (that would be difficult, wouldn't it)... maybe I'm just used to Ruby, which is about as concise as I'm comfortable with while still being readable. Sometimes, though, there is a little bit more 'repeat yourself' than I would like to see. For instance, in this implementation of string_join (something else that ought to be in the standard library, but still isn't), it's necessary to create the same function, with different arity, simply to work around the fact that it's not possible to say the default separator should be " ":
string_join(Items) ->
string_join(Items, " ").
string_join(Items, Sep) ->
lists:flatten(lists:reverse(string_join1(Items, Sep, []))).
Which is a lot more typing than string_join(Items, Sep=" "). This is pure opinion, and very subjective, but Erlang to me feels like it falls more in the "systems programming language" category than "scripting language". It's a bit more verbose, it needs to be compiled to run it, modules need to have an entry point... it's not as suitable to quick throwaways as Ruby, Tcl or Python. Of course, it is certainly higher level than C, and leaner than Java, but still falls an the other side of an admittedly fuzzy line in my head. Its command line options reinforce that. Whereas "scripting" languages do the obvious thing first:
ruby foo/bar.rb
Erlang is a little bit more complex:
erl -noshell -pa foo/ -run bar
A minor detail, once you get used to it, but still, I prefer the "do the obvious thing first, and let the user have some say in the matter if they want to do something else" approach to systems design.
One of the wonderful things about Ruby on Rails, is that it uses Ruby throughout, templates included. Without getting into the merits of using templates vs other systems, my own opinion is that Rails gets them right, and demonstrates the flexibility of Ruby by using it as the language for the templates, rather than inventing some other solution. I don't see the same flexibility in Erlang, which is unfortunate, as it blows Ruby out of the water in terms of being a very solid solution to deploy on a server (no fiddling with proxies and load balancers and single threaded mini-servers + hot code replacement = nice).
Of course, there are lots of good things about Erlang, as mentioned at the beginning of this article - concurrency and distribution, but also language features like pattern matching that are a lot of fun to use, a pleasant syntax for dealing with binary data, list comprehensions, first class functions, tail recursion, and lots of other goodies. However, if I had to try and predict the future, I could easily imagine another language grabbing some of Erlang's good ideas and running with them, perhaps being more "conventional" in other respects - this isn't uncommon in the languages field, as we've seen with things like Lisp and Smalltalk. On the other hand, one of the reasons I *am* quite happy with Erlang is that it is most certainly not a proof of concept - it is a very practical language that excels at solving certain classes of problem, and does so in many commercial settings. If you're the kind of person who enjoys new things, check it out!
Next.