When UNIX came along people immediately started to do splendid things with it. The philosophy is great: provide a system of useful small, reusable components. Actually, it's the same philosophy that is essentially driving the slow takeover of functional programming languages and the progression of the internet of things.
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:
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:
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.
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;