It was a kind of surprise to discover that there’s no straightforward way to render text using OpenGL, for people new to graphics programming like me drawing a text looks like a very primitive functionality which I expect to be available by default as functions like glDrawText(some context,const char*). But that’s not the case, and rendering text […]
Author: Filip Janiszewski
- 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 […]
Disjoint-set or Union-find?..

I wasn’t planning any post this week, I don’t have that much free time to write posts. But I was forced to write down my own implementation of a disjoint set data structure for the purpose of one of the projects I’m working on, so I thought why not share this piece of code with […]
- 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 […]
Unexpected stuff!

Let’s have a look at this code: int main() { for(int i{0};i<500;i++) { std::cout<<“This is a big number: “<<i*20000000<<std::endl; } } 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? L16: movsbl 39(%ebx), %eax L6: movl %esi, %ecx movl […]
- 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 […]
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 […]