L5 independet crowd-funded series trailer

January 15th, 2012

Check out http://www.l5-series.com/ an independent crowd-funded mini-series. Crowd-funded entertainment is here!

L5 Release Trailer from Studio Hemogoblin on Vimeo.

A trip to North Korea by Scott Fisher

January 3rd, 2012

http://www.1stopkorea.com/Journey-into-Kimland/Journey%20into%20Kimland%20-%20by%20Scott%20Fisher.pdf

Concurrent programming is hard

January 2nd, 2012

C++03: what’s the problem with a static variable inside a function like:

class A;

void f()
{
    static A;
    [...]
}


?

Apparently nothing, but unfortunately seems that the initialization is not thread safe (it is with gcc apparently). Fortunately this behaviour is corrected in C++11, where the standard clearly says that initialization is done in a thread safe manner.

This was smartly point out by a coworker, here’s some more information in stackoverflow

It’s funny because I introduced an static tbb::mutex to address a concurrency problem we were having with libjpeg: while using libjpeg concurrently we were observing that the generated jpg were perfectly correct when compared every RGB point, but the encoding was changing and producing different bytestreams. There must be some multithread unsafe code inside libjpeg that we have not yet identified.

By the way, the fix I proposed consisting on enclosing the libjpeg calling code was working fine and the produced jpgs went back to be deterministic, but certainly is suprising to find that with the standard in hand, the fix just introduced another concurrency bug!

Happy 2012 programming!

Going back to ext4 in the work latop from Btrfs.

December 28th, 2011

Reinstalled Debian in my laptop, somehow Btrfs was doing strange things like reporting disk full with several GB of free space. Also for some workloads with smaller files felt a little slow despite the intel 320 ssd drive. In all, several months with Btrfs, not a bad experience, didn’t loose any data, and Btrfs seems very powerful and promising. Currently I’m back to ext4 for some time :)

Find all references to a C++ function

December 28th, 2011

For daily C++ I use vim + ctags + cscope, sometimes I also use the nice diagrams generated by doxygen to visualize class interactions, and call graphs. Yesterday I was just trying to find all references to some Class:insert method, oh, good luck with that with a codebase full of std::map etc. I thought, oh well, cscope can’t do such a level of C++ parsing, next time I boot Windows I’ll try Visual Studio, probably they do some more detailed C++ parsing. I’m not super familiar with VS. but when I tried right click-> find all references to this particular Class::insert function it gives me all kinds of std::map::inserts and the like. I guess it’s time we build some smart C++ code navigator, probably the C++ parser of the llvm project could be a nice start for this, cscope is unable to help in this kind of problems since it doesn’t know which type is the variable that is calling insert. But I was surprised that VS is not any better.

Danke Deutschland!

December 25th, 2011

Everybody is working:
http://t.co/gMIIwZpu

boost::python::object from PyObject*

December 25th, 2011

When you want a boost::python::object to manage a pointer to PyObject* pyobj one does:

boost::python::object o(boost::python::handle<>(pyobj));

In this case, the o object, manages the pyobj, it won’t increase the reference count on construction.

Otherwise, to use a borrowed reference:

boost::python::object o(boost::python::handle<>(boost::python::borrowed(pyobj)));

In this case, Py_INCREF is called, so pyobj is not destructed when object o goes out of scope.

Thirst

December 20th, 2011

Great stuff, I specially enjoyed the asian humor touches and the sexual tension.
http://www.imdb.com/title/tt0762073/

Released Mycelium, the high performance asynchronous web crawler

November 22nd, 2011

I’ve just released the source code of the high performance asynchronous web crawler ‘Mycelium’ in github.

Las mentiras de los medios: “El coste del despido en España es el más caro de Europa”

November 19th, 2011

pinocho
Es curioso ver como se miente descaradamente a la población en los medios para allanar el camino al recorte de derechos, por ejemplo he oido ya varias veces en la televisión, por ejemplo en el programa del Follonero en la sexta, de boca del ex ministro Pimentel que España tiene el despido mas caro de Europa. Desconozco como es en otros paises de Europa. Pero en Alemania, yo puedo hablar en carnes propias, tengo contrato indefinido y el despido no es que sea caro, es que es muy difícil. Solo pueden despedirte si hacen un despido masivo o cometes varias faltas graves, como espionaje industrial o insultar a un superior. Los resultados de un despido tan difícil los podéis consultar en las tasas de paro históricas en Alemania por ejemplo. Lo siento mucho por los compatriotas que estais en España y os están recortando los derechos, los salarios y encima vendiendo la moto de que un despido más barato es la solución.

Un saludo desde Berlín.

Aquí el artículo de la Wikipedia sobre despido en Alemán.
Serie de paro en Alemania vs España.
Sobre el despido en Alemania [EN]