You are currently browsing the Jeethu's Blog weblog archives for April, 2009.

Posted on April 21, 2009 at 7:13 pm

Counting bloom filters in python and javascript

Continuing the theme of implementing simple datastructures in python and javascript, here’s a simple counting bloom filter implementation in python and javascript which I’d written for Tagz. I’d almost forgotten about this, until a thread today on compsci.reddit reminded me of it. With this implementation, you can build a bloom filter in python and add/remove/lookup elements. You [...]

Posted on April 13, 2009 at 3:58 pm

A Mochikit style Dombuilder for YUI

Before moving to YUI about a year ago, I was using Mochikit as my primary JS library. As advertised, Mochikit happens to be one of the most pythonic javascript libraries ever. One of the sweetest parts of Mochikit IMO has been Mochikit.DOM. This is something which I’ve always missed with YUI. innerHTML is fast, but icky [...]

Posted on April 11, 2009 at 9:07 am

Tries and Ternary Search Trees in Python and Javascript

There are a couple of places in which Tagz, where I needed efficient prefix matching. The most obvious way to do this is to use a Trie or a Ternary Search Tree. So, I ended up implementing both in Python. I’ve had this stuff lying around in my mercurial repo for Tagz for quite some [...]

Posted on April 6, 2009 at 5:04 pm

Using redis

I’ve been using memcached for all the caching on Tagz. Redis is a relatively new key value database which covers a superset of memcached’s functionality. One of the biggest problems I’ve had with memcached (actually it has nothing to do with memcached) is that whenever I store a large datastructure on memcached, deserializing (unpickling) it takes [...]

Posted on April 1, 2009 at 11:24 am

A change in direction for Tagz

Tagz has come a long way since I launched it last September. Something which began as a clean room django application has been accumulating a lot of cruft. One patch at a time, its turned itself into an unmaintainable mess of a codebase. In retrospect, I feel Python and Postgres weren’t really the best choices [...]