I have a love/hate relationship against the hello messages shown in all the world languages on flickr. That’s why this morning I was talking with a friend on IRC about this and a bad idea jumped in my mind: do an IRC bot that says hello in many languages when someone joins a channel.
It’s from several years that I don’t do anything IRC related, but this time I had two special weapons in my backpack: python and twisted. The final bot is ~90 lines of code, half of the which are for the hello list and the entire coding process took less than 20 minutes.
When I’m working on a project, the only thing I hate more than a segfault is to work into a directory where source files are mixed with other files that doesn’t have anything to do with the project itself.
These days I gave a look at cmake since I hate autotools and I wanted to try some alternative. It’s nice (apart from its windows-like names), but it has a little problem: it generates a lot of files.
So I googled for some way to clean the directory from its files but I haven’t found none. So I wrote my own simple script that cleans a directory (and its subdirectory) from the cmake files. Here it is:
I just done a video of how bcmanager works. Its development is now stopped from… too much, but I plan to begin once again as soon as I free myself from some urgent stuff. Here is the video:
One feature of django is worth to note is that it supports signals. In fact, under its skin it implements PyDispatcher, a python library that allows to emit signals and to dispatch them.
If at first glance this couldn’t look so useful to you, well, this hasn’t been true for me since it was exactly that kind of stuff I was looking for. What I was trying to do was to implement some kind of auto-installer for an application that I’m writing, and in order to do so I had to run the set up after that the syncdb command is issued. So the main problem was: how do I know when a user does the syncdb in a non-intrusive way?
After some googling, I found that in django exists the semi-hidden feature of signals, so I began exploring them. The only thing you can look at on the official site is a page on their wiki, and additionally there are somecoolarticles over the net. Anyway, if you want to know a fast way to catch the syncdb command just follow up the reading.
Funny thing: yesterday night I had an idea about a good blog post I could make. But now I completely forgot what that idea was about. 12 hours ago#
I think pownce has a little issue with caching since if I delete a message and I write a new one, it doesn't appear in my homepage. Nov 16, 6:34pm#
I didn't know that something like [(x,y) for x in range(10) for y in range(x)] was possible in Python. Nov 16, 3:45pm#
I'm about to go to the local LUG dinner: pizza for everyone. Nov 14, 9:15pm#
Lately I've been very interested in fast data structures with minimum memory usage. Just surprised to find out that list comprehension in Python are sometimes slower for large quantities of data than classic for loops. Still trying to understand why (if someone has a clue, please let me know). Nov 12, 12:44pm#
So wordpress was silently modifying HTTP request headers and I was getting a 400 when fetching Pownce RSS. Now everything works as expected on my blog, shame on WP. Nov 9, 3:58pm#
Experimenting with document language identification. Nov 6, 10:23pm#
So looks like I finally found an interesting topic apart from web development: information retrieval. Nov 3, 5:13pm#
Planning a trip to Bologna in December Nov 1, 5:24pm#
After today, I want to go as far as I can from Italy. Oct 29, 11:49am#