Archive for the ‘Programming’ Category

Don’t write your own build system

April 13, 2013

The title might be a bit controversial but at least it is catchy one. Recently I’ve seen a few posts about Shake, a make replacement with several improvements (such as more flexible dependency specification). There are also examples how to use it with say Vala.

The problem is that the Make and Shake are both rather quite low-level tools and while improvement in them is beneficial shake, at least currently, is not a replacement for autotools or CMake.

(more…)

Statically typed red-black trees

April 10, 2013

I have met with claims that the static typing is useless as it is not mathematical proof (OK – for those knowing the discussion – I exaggerated a lot). However to large extend the static typing is prove of some sort and depending on the code it might be a prove of even quite strong properties.

As chosen field I tried to use LLRB trees – I have implemented them quite long time ago and I’ve run into problems that violated the pre and post conditions. Even when problem was discovered it took some time to find out the underlaying problems (my inexperience didn’t helped probably either)

I’ve tried to reimplement the code in GHC Haskell with following rules:

  • Using only ‘safe’ extensions
  • Making all functions total and without use of undefined or error
  • Ensuring that all properties of tree are preserved

Unfortunately this was my first time I used some of the concepts (like Zipper) so the implementation and description might be not the best (comments and corrections welcome).

(more…)

C++ – circular dependencies

June 5, 2009

Since the down of time mankind seek the solution to the circular dependencies in C++. Well – may be ot exactly since the “down of time” and definitly not the whole of the mankind – but it have been “always” a problem.

(more…)


Follow

Get every new post delivered to your Inbox.