Darcs logo To review darcs 2, I reviewed hundreds of bugs entries in the darcs bug tracker, checking to see whether the bugs were fixed are still present. Through this process I became as intimate as the developers with what had been improved in darcs and what remained to address.

What I found was that darcs 2 closed over half the bugs in the bug tracker, literally hundreds of bugs. This was possible because it addressed not just specific bugs, but whole categories of bugs were closed by major architecture and design improvements.

Major bug fixes

  • Darcs 1 was unfortunately famous for "hanging" at times as it calculated the resolution of complex patch conflict cases. This was a tough issue to solve, but is largely solved with darcs 2.
  • Darcs 2 no longer considers identical patches or patch "hunks" a conflict.
  • Darcs 2 has important safety improvements. With new repo formats available to use, darcs 2 is more resistent to repository corruption caused by third parties, like a stray recursive find-and-replace function that gets into the repo directory. It will also create backup files in cases where it did not before.
  • Darcs 2 replaces the concept of "partial" repositories with "lazy" ones. There has always been a desire to allow "lightweight" checkouts that don't include the complete repo history. The darcs 1 solution to this was "partial" repositories that only checked out history up to a point. This approach worked to some extent, but didn't play with well with darcs commands that expected the whole history to be present. The new "lazy" concept offers similar benefits, and will pull down older remote patches on demand if some command needs them. Lazy repositories are a great comprise between features and performance.
  • Darcs 2 fixes some broken darcs 1 repositories. In some cases a darcs 1 repo could get a bad state so some commands didn't work. Often these repos could be converted into the darcs 2 format, and would be "fixed" when used with darcs 2.

While darcs 1 was and is a useful tool, darcs 2 fixes some significant bugs that restricted some kinds of uses in the past.

New Features

To summarize the feature improvements: darcs 2 provides a more polished user experience. Here are highlights of the new features:

  • Better progress reporting. In places where the user may need to wait more than a second or two for a response (Say, pulling over HTTP or SSH), darcs 2 is able to give live progress updates. There's often an option to turn up the detail level with '--debug' and '--verbose' flags.
  • Performance improvements. Darcs 2 has an option to use a new "global cache" system which speeds up some kinds of operations. Performance when operating over SSH is improved as well. There does remain room for improvement here. Very large projects may not be satisfied with the performance, and "darcs whatsnew --look-for-adds" remains noticeably slow when compared to competing tools.
  • Better error messages. Users who run into exceptional cases are more likely to discover error messages that make it clear what to next, without consulting a reference or mailing list.
  • Better integration with external tools. Darcs has improved the "post commit hook", allowing better automation for tools would operate on every patch that is pushed to a central repo. The darcs project made direct use of this feature, allowing it to close a bug tracking ticket simply by including the right phrasing in the name of a patch.
  • Better handling of binary files. With darcs 2, you can make all the files in particular directory as being binary, rather than just using pattern matching on the file names.

Under the hood

There a few important details to know about what's under the hood of darcs 2.

First, backwards compatibility is in there. There is a strong set of automated tests that insure that darcs 2 works as well as possible with repos in darcs 1 format. You can upgrade to darcs 2 now even if some of the repos you need to access will remain in the darcs 1 format.

Quality Assurance tools have been been improved. While end users won't notice directly, they benefit from the improved quality assurance practices of the darcs project. The large automated test suite is now better organized and more portable. Further, a new "Buildbot" system automates builds of darcs on various platforms, allowing the team to catch portability issues faster.

Deep math? still in there. darcs has always excelled at cherry picking patches from a branch due the patch algebra originally implemented by physicist David Roundy. this unique foundation of the source control system remains and was updated for the new release to support the features described above.

In the community

Between Darcs 1 and Darcs 2, the community continued to release and update related tools that work with Darcs. Some darcs projects worth highlighting include:

Adopting Darcs 2

Darcs 2 is an easy upgrade decision for darcs 1 users. Darcs 2 deserves serious consideration for anyone evaluating source code control tools. Be careful reading comparisions of darcs to other options. Most published at the moment still measure against darcs 1, and some cite the now-fixed weaknesses of darcs 1 as reasons not to adopt it. The darcs project is now up front about it's significant limitation: It isn't recommended for very large projects.

The reality is that while some of the weaknesses of Darcs 1.0 were dealbreakers for some users, Darcs 2 is a solid, mature, usable release that deserves a second look.

Darcs 2 binaries for Ubuntu Linux are available on Iain Lane's PPA page. Binaries for many other platforms are available.

Thanks for reading! This post is discussed on reddit.

Today I made progress on making a self-contained distribution of the Titanium web framework.

The goal is to have a single archive file you can unpack and have a complete web framework to work with-- no more CPAN dependencies to install! You can play with it on your desktop or laptop with the built-in web server, and upload a directory to your web server when you read to go live.

After I patched the great local::lib module, I can now use this simple command to create a "Titanium" directory, into which Titanium and all of it's non-core dependencies will be installed.

perl -MCPAN -Mlocal::lib=--self-contained,Titanium -e 'install Titanium'

The next step is to hopefully eliminate required dependencies on XS code. The following modules need to be address:

  • Compress::Raw::Zlib
  • HTML::Parser
  • Params::Validate

Params::Validate should be easy to handle, since it has a Pure Perl alternative. I haven't decided now to deal with the other two yet.

I can post an archive of what I have so far if it's of interest. The XS modules above are compiled for 'i486-linux-gnu-thread-multi'.

With the increasing popularity of laptops, getting the most out of small screen sizes has become a priority for computer users.

Ubuntu Linux helps with this by providing a consistent keyboard shortcut for a "Full Screen" mode. Pressing "F11" in many standard Ubuntu applications allows you to to toggle the application in and out of a full screen mode. Today I tested that the following key applications support this:

  • Firefox
  • Gimp Image Editor
  • Eye of Gnome Image Viewer
  • Evince Document Viewer
  • Totem Movie Player
  • Rhythmbox Music Player
  • Terminal

Now that I realize the shortcut exists and is widely supported I use it regularly to get the most out of my 14" laptop screen. I did find one key application had a full screen model and used a different shortcut. Open Office mysteriously uses "Ctrl-Shift-J". I have filed a bug to suggest that Ubuntu make this consistent as well.

I’ve been known to accidentally leave a stream of music running all night when I’m not there to listen to it anymore. That wastes bandwidth and energy.

Here’s a quick tip to prevent from happening, by causing any music playing to be turned off at 7:00 pm each night.

On Ubuntu Linux, add these lines to

. You can edit this file with
gksudo gedit /etc/crontab

Note that “rhythmbox” is the name of the music players I use. Change as needed.

# stop streams from playing all night.
0 19 * * Mon-Fri killall --quiet rhythmbox

If you need to adjust the time, the first two columns of numbers are the minutes and hour columns.

Have fun!

Thinkpad T23 inverter replacement A small hard drive is a like a small house. Less to clean. Yesterday I got a visual alert that my drive was 99% full (Thanks for the hint, Ubuntu!).

I responded immediately in two ways. First, I immediately searched Ebay for hard drives that were are least 60 GB in size. That would upgrade my current one by about 50 Gigs.

Second, I started looking for junk to get rid of.

A short time later I'd found 800 megs of stuff I was happy to be living without, and I canceled the E-bay search.

A bigger drive may allow me to store more, but it also allows me to make a larger mess, lose more in a crash, and anything that involves looking at the whole disk will take longer, like a search, backup, or restore procedure.