Archived

This is an archived copy of a site I used between 2007 and 2013 to talk about a few of my projects.

Better diffs in gerrit code review

Code review is critical for quality code. There are many ways to do it and many tools to help with the process, such as gerrit, phabricator, reviewboard and github code review.

We use gerrit, which is nice. But there’s one annoying problem: when a change author rebases a change and pushes the rebased patch for review the patch set diff is nearly useless. That either makes the reviewer’s job much harder or leads to people avoiding rebases. Unfortunately the existing ticket about the issue is four years old.

I spent some time on fixing it: Our gerrit shows a hunk in the diff from A to B only if it isn’t in the diff between their parent commits, or if there is a conflict. This reliably hides unrelated changes, like those from rebases, while erring on the side of showing too much in case of conflicting edits or large hunks.

Unfortunately the patch isn’t ready for upstream: It doesn’t work with unified diff view or with gerrit’s new change screen (the new side-by-side view can’t have the left and right side be different without highlighting the change). Also it’s not configurable.

Feel free to contact me if you’re interested in the details or want to pick this up!

Improving REQ sockets in ZMQ 4

I contributed two new socket options to libzmq 4.0: ZMQ_REQ_CORRELATE and ZMQ_REQ_RELAXED. They simplify usage of REQ sockets in situations where you would have had to reset the whole socket or switch to a DEALER socket with earlier versions. More specifically, you can now send a new request on a REQ socket when you’ve given up on getting a response for the preceding request.
Continue Reading »

Getting more out of the range-based for statement in C++11

Among the most useful features added to C++11 is the range-based for statement. It is defined to be equivalent to the usual iterator-based loop from begin() to end() and makes standard iteration look way more appealing.

Keeping the noise out of a large fraction of iterator-based loops is great, but other common for loops are missing out! They have not received a convenient shorthand. Luckily, you can make some yourself by feeding the right containers to the range-based for statement.
Continue Reading »

Recent activity

Over the last year I’ve been focusing on Qt Creator and have done several posts on the Qt Labs blog:

Star Guard level editor

I spent the last few evenings working on a fun side project which is now complete: a level editor for Loren Schmidt’s Star Guard.
Continue Reading »

LDC 0.9.2 released

A new version of LDC, the LLVM based compiler for the D programming language has been released. It is built with DMDFE version 1.057 and LLVM 2.6. The runtime library has been upgraded to Tango 0.99.9.

In addition to up-to-date dependencies, this release incorporates a wealth of fixes and improvements by Benjamin Kramer, Frits van Bommel, Kelly Wilson, Leandro Lucarella, Matti Niemenmaa, Moritz Warning, Robert Clipsham, Tomas Lindquist Olsen and me.

Linux x86-64 download

LDC 0.9.1 released

The release 0.9.1 of LDC, the LLVM based compiler for the D programming language, contains the following major improvements:
Continue Reading »

LDC presentation video, Tango Conference 2008

Peter Modzelewski, member of the illustrious team0xf and an organizer of the Tango Conference 2008, has posted the video and slides of the talk on LDC Tomas Lindquist Olsen and I gave in September.

The original summary was:

The new D1 compiler based on the strong fundament of LLVM, the DMD frontend and the Tango runtime is maturing rapidly. We’ll take a brief look at LLVM, report on LLVMDC’s status and discuss the future of the project.

Have fun watching the video and thanks again to the organizers for an excellent conference.
Continue Reading »

LDC 0.9 released

The first version of LDC, the LLVM based compiler for version one of the D programming language has been released for x86-32 Linux. Get it here!
Continue Reading »