Better diffs in gerrit code review

Code review is critical for quality code.
There are many ways to do it,
many tools were made to help.

We use gerrit which is nice.

But when a change author rebases
the patch set diff is nearly useless.
That is sad – the ticket four years old.

I fixed it in an ad hoc minimal-effort way.
Continue Reading »

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 »

Exception handling in LDC using LLVM

Exception handling is an integral part of the D programming language. Naturally LDC, aiming to be a complying compiler, needs to provide it. Here I describe how exactly user code, generated LLVM IR, the unwinding library and the LDC runtime interact to make it all work – at least on x86 Linux.
Continue Reading »