Explicit non-null pointers in C

Browsing this thread on Stack Overflow, I learnt about a lesser known feature of C which allows you to explicitly declare that a particular array must contain at least some number of elements. Consider the following piece of unsafe code:

Short string optimisation trick

While reading a particular issue in lwan, a blog post caught my interest. It describes a way to store short ascii strings in the same area as their header data. Suppose the struct describing a heap allocated string looks like this:

Installing libssh2 for Haskell on Windows

Although the thought of setting up and actually getting two major open source frameworks linking on Windows seems daunting, the process of building and installing libssh2 for Haskell is relatively easy. To start off, you'll need to make sure that you have some kind of Haskell installation (preferably the latest Haskell Platform) and an installation of MSYS2.

Floating point order and optimisation

When refactoring a particular piece of C++ code that converted radians to degrees, it was suggested by a friend that I swap the order of the operations in the function as it would increase performance. I thought it would be interesting to actually see if this was the case, consider;