From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 51D3C4196F4 for ; Mon, 5 Apr 2010 05:49:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.8 X-Spam-Level: X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U5oSj6wmgpIH for ; Mon, 5 Apr 2010 05:49:28 -0700 (PDT) Received: from homiemail-a22.g.dreamhost.com (caiajhbdcaid.dreamhost.com [208.97.132.83]) by olra.theworths.org (Postfix) with ESMTP id 64F524196F0 for ; Mon, 5 Apr 2010 05:49:28 -0700 (PDT) Received: from sspaeth.de (unknown [195.190.188.219]) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPA id 62F531A8061 for ; Mon, 5 Apr 2010 05:49:26 -0700 (PDT) Received: by sspaeth.de (sSMTP sendmail emulation); Mon, 05 Apr 2010 14:49:23 +0200 From: "Sebastian Spaeth" To: Notmuch development list Date: Mon, 05 Apr 2010 14:49:23 +0200 Message-ID: <874ojq5ajw.fsf@SSpaeth.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: vala, this is notmuch. notmuch, this is vala X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 12:49:29 -0000 I really want to replace my address book with dynamic notmuch searches and while python gives me those in 0.3 seconds or so, I wanted better. So I bound notmuch.so to vala (at least what I needed) and played with the code a bit. The resulting 100 lines of vala code are here: http://github.com/spaetz/vala-notmuch/tree/master/src For those without vala, this is the generated C file which can be compiled with './make' in the same directory: http://github.com/spaetz/vala-notmuch/blob/static-sources/src/notmuch.c Usage: "./vnotmuch Seb" will output all 'to:' addresses according to frequency for all messages where to, cc, or bcc matches "Seb*". It also filters with AND "from:yourprimarymailaddress". Just "./vnotmuch" outputs all addresses that you ever sent mails to. It never writes/modifies your db. The only output you get are the lowercased email addresses and the frequency, no names are preserved/output. It is fast. This is my "./vnotmuch Seb" search over 14.5k mails with 857 mails from my primary account: real 0m0.026s user 0m0.000s sys 0m0.020s Just a teaser to make you interested in vala :). Sebastian