• C++
  • C++17: let’s have a look at the constexpr if

    There was a long discussion in the C++ community about when and how to implement the static if, the original proposal from Bright, Sutter and Alexandrescu which was aiming to define a possible implementation of this feature was resurrected after a quite long silence, just to be included in the upcoming C++17. The actual implementation of the […]

  • blog
  • Slippers

    We all have our weak sides, areas of knowledge that are way too far from an acceptable level. What is an acceptable level then, is all a matter of what you do and what’s the purpose of your knowledge. Changing job or project is going to greatly influence what will be your skill set in […]

  • blog
  • Moving on my own!

    I was thinking about moving on a dedicate hosting since a while, the free wordpress hosting from wordpress.com is good for the first few months, afterwards when you start wanting something more the free account is not good anymore, there are plenty of limitations: You cannot setup any custom theme nor modify the existing theme in […]

  • assembler
  • Unexpected stuff!

    Let’s have a look at this code:

    And let’s compile it with g++ using the flag -O3, what’s going to happen? Before answering, let’s have a look at the assembly, shall we?

    This is actually only a portion of the whole assembly, what I care to show you is the main loop and what’s […]

  • Algorithms
  • Segment tree

    What is the best thing you may possible do when having a eight hours train trip? Writing a blog post of course! That’s actually an interesting story by itself: Where I was and why it take that long to come back home! Anyway! Let’s say you’ve an array of integers, as usual from index 0 to […]

  • assembler
  • Almost useless knowledge

    Is almost useless because nobody is going to raise yours salary for that! Or maybe someone will?!? Let’s say we ignore all the benefits of all the optimizations our benevolent compiler is going to made on our code, and have a look at what happen when we execute some hundreds of thousands of times two very […]

  • Algorithms
  • Solution space.

    Certain problems required us to try all the possible solutions to find the one that best fit the given constraint, a very popular brute force way is to perform a complete search of the solution space by iterating over and over the data and changing each time the input variables. If the problem require to […]

  • blog
  • Lulu

    Sometime you really want a book, but you cannot find the damn book anywhere! This is the case of Competitive Programming 3, which friends of mine referred to me many times, so I decide to give him a try. First place where normally I look for books is A., but no luck there. Then I […]

  • Algorithms
  • Suffix trees.

    An entire post covering both the theoretical part and the implementation is going to take too long, for this reason I’m splitting the material in two parts: A post with some theory introduction, and one post which will be focused on implementation details. The algorithm I would like to show you is the Ukkonen method for […]