Who’s writing me?


Have you ever noticed how some applications seems to be aware of how you pass them data? Take the su program, for instance:

$ echo 'my password' | su
su: must be run from a terminal




Leave a comment


Interesting article

Leave a comment

That guy seems to be pretty much aware of what’s Erlang:

Worthy read.

Erlang make – Give priority to behaviors

Leave a comment

Erlang/OTP has a nice pattern which strictly resambles Java’s Interfaces: behaviors. I’m using a behavior (“conf“) inside my application for {enter technical details here}, so I stumbled into a little itchy issue during compile time:

The problem… I hate warnings!

The solution comes strightforward: compile src/conf.erl before anything else. How to do that? Well, I surfed the Internet, searching for solutions. It turns out that, for instance, ejabberd is using Autotools instead of the standard Erlang compile system. Autotools are a really nice piece of crap software, but I don’t have time to discover how to use it with Erlang.

Then I just reconnected my brain…

Easy huh?

Note: Place the


flag before


, otherwise the make command will not consider the output directory in the path.

Sparse matrix with Python

Leave a comment

For some applications you may have big sparse matrices, basicallly it’s filled of zeros everywhere, except for some points in which you setted some value, depending on your application logic. In this case a whole N×M matrix is a waste of memory (expecially for huge N and M) not to mention the fact you may want a matrix with more than two dimensions!

As you probably know, a good idea here would be using a mapping instead, say a Hash table, to store the elements you would put in the matrix with the coordinates as keys. In order to explain this concept to a friend of mine, I sketched an implementation of this principle in Python, and soon I realized it’s extremely easy!


The with statement

Leave a comment

I heard about Python‘s with statement, however I didn’t know about it. I suggest this link: it explains how that works in an effective and concise way.

Private Symbols

Leave a comment

The wise C programmer knows how souce code gets linked, so he or she is also aware of how symbols are managed into object code. In our module we typically want to export some symbols, like for instance a function or, if you really need to do it a global variable. Note also that types are not object symbols. More

Older Entries