<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-304267073920548108</id><updated>2011-09-30T16:27:22.325+03:00</updated><category term='mccabe'/><category term='gtest'/><category term='maemo'/><category term='gtd'/><category term='emacs'/><category term='lastfm'/><category term='git'/><category term='debugging'/><category term='modest'/><category term='rss'/><category term='maths'/><category term='sqlite'/><category term='optimization'/><category term='glib'/><category term='email'/><category term='magit'/><category term='xapian'/><category term='testing'/><category term='fosdem'/><category term='complexity'/><category term='mu'/><category term='c'/><title type='text'>flux</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-4559980394734629447</id><published>2008-12-24T17:12:00.004+02:00</published><updated>2008-12-24T18:14:31.817+02:00</updated><title type='text'>spitfall</title><content type='html'>Implementing GTK+-widgets and other &lt;a href="http://en.wikipedia.org/wiki/Gobject" &gt;GObjects&lt;/a&gt; in C requires quite a bit of boilerplate code - that's hardly news. One obvious way to deal with that is to use a different programming language. If you're into C++, I can recommend the excellent &lt;a href="http://www.gtkmm.org/" &gt;GtkMM&lt;/a&gt; C++-bindings for GTK+. Programming GtkMM feels very natural and follows the C++-idioms; it's easy to integrate with &lt;tt&gt;std::&lt;/tt&gt; and &lt;a href="http://www.boost.org" &gt;friends&lt;/a&gt;. Also, it's LGPL and pure C++.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Another option is &lt;a href="http://live.gnome.org/Vala" &gt;Vala&lt;/a&gt;. If you haven't heard about it, Vala is a programming language in its own right, with similarities to &lt;a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)" &gt;C#&lt;/a&gt;, but specifically designed for use with GObject. One very interesting thing about Vala is that it compiles to plain C-with-GObjects (as an intermediate step). Thus, you write in Vala, with no '&lt;tt&gt;libvala&lt;/tt&gt;' needed, with code which is just as fast as handwritten C. Vala also supports many other libraries, which can make them easier to use, compared with plain C. Using Vala, writing GObject/GTK+-based applications becomes a lot easier. &lt;a href="http://www.linux.com/feature/154784" &gt;Vala Overview&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;Finally, my truly &lt;em&gt;low-tech&lt;/em&gt; solution is &lt;tt&gt;spuug&lt;/tt&gt;. &lt;a href="http://www.djcbsoftware.nl/code/spuug/" &gt;Spuug&lt;/a&gt; is a little &lt;a href="http://en.wikipedia.org/wiki/Gobject" &gt;GObject&lt;/a&gt; code-generator that I wrote in 2006 to learn some &lt;a href="http://en.wikipedia.org/wiki/Ruby_(programming_language)" &gt;Ruby&lt;/a&gt;, and to save myself some time. And boy, has it saved me some time! Now, finally a new version. The credit for this go mostly to &lt;em&gt;Viktor Nagy&lt;/em&gt; (many thanks!), who submitted some patches.&lt;br /&gt;&lt;p&gt;&lt;tt&gt;spuug&lt;/tt&gt; usage is quite easy; for example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    $ spuug --class=FunkyFooBar --namespace=Funky --parent=GtkWidget&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;will generate &lt;tt&gt;funky-foobar.c&lt;/tt&gt; and &lt;tt&gt;funky-foobar.h&lt;/tt&gt; with 150 lines of boilerplate code, as a starting point for some &lt;tt&gt;FunkyFooBar&lt;/tt&gt;-widget.&lt;br /&gt;&lt;p&gt;Of course, spuug works well for Maemo-code, and I know of a number of programs that are using it.&lt;br /&gt;&lt;p&gt;There are of course some disadvantages to using code-generators. But the advantage of &lt;tt&gt;spuug&lt;/tt&gt; is that it doesn't require you to learn any new language. Also, after using it, you're not depending on &lt;tt&gt;spuug&lt;/tt&gt; - the output is perfectly readable C code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-4559980394734629447?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/4559980394734629447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=4559980394734629447' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4559980394734629447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4559980394734629447'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/12/spitfall.html' title='spitfall'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-1256013965682342246</id><published>2008-12-02T22:04:00.003+02:00</published><updated>2008-12-02T22:21:19.823+02:00</updated><title type='text'>the song remains the same</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kGFGcbwevHE/STWYV0KJj1I/AAAAAAAAAWU/oyT0ANHiFO0/s1600-h/ttb101.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 352px;" src="http://4.bp.blogspot.com/_kGFGcbwevHE/STWYV0KJj1I/AAAAAAAAAWU/oyT0ANHiFO0/s400/ttb101.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5275290039080292178" /&gt;&lt;/a&gt;&lt;br /&gt;So, after three years I finally made a new version &lt;a href="http://www.djcbsoftware.nl/code/ttb" &gt;ttb&lt;/a&gt;, my teletekst viewer, which is especially interesting for Dutch-speakers and linguisticly-inclined people studying West-Germanic languages. The new version brings user-help and some cosmetic updates. &lt;br /&gt;&lt;p&gt;The program is listed as the 'official' client for Linux by the NOS (state television), and I'm getting quite some mails -- but interestingly, not one single bug in three years. To be honest, there &lt;strong&gt;is&lt;/strong&gt; a bug remaining: there is &lt;em&gt;too much bad news&lt;/em&gt; in the news section. I am working on that one, but it might take a while.&lt;br /&gt;&lt;p&gt;I am also preparing a &lt;a href="http://maemo.org" &gt;Maemo&lt;/a&gt;-version. Interestingly, I had a version running on an 770 in early 2005 at &lt;em&gt;LinuxTag&lt;/em&gt;, but I never got to packaging it. Anyway, the work has to wait until after my trip to a friend's wedding in the Eternal City of &lt;a href="http://en.wikipedia.org/wiki/Rome" &gt;Rome&lt;/a&gt;, where I'll be flying.&lt;br /&gt;&lt;p&gt;As if all of that were not enough, I started a blog with tips for &lt;a href="http://en.wikipedia.org/wiki/Emacs" &gt;emacs&lt;/a&gt;-users; the idea is to have frequent small posts that show one useful trick: &lt;a href="http://emacs-fu.blogspot.com" &gt;Emacs-Fu&lt;/a&gt;. Let's see if I succeed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-1256013965682342246?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/1256013965682342246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=1256013965682342246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1256013965682342246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1256013965682342246'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/12/song-remains-same.html' title='the song remains the same'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kGFGcbwevHE/STWYV0KJj1I/AAAAAAAAAWU/oyT0ANHiFO0/s72-c/ttb101.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-3888888310487382935</id><published>2008-11-26T21:55:00.003+02:00</published><updated>2008-11-26T22:43:41.248+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>it's so easy</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/SS2p9e1B4QI/AAAAAAAAASg/eBOFKPywzs4/s1600-h/screenshot01.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 240px;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/SS2p9e1B4QI/AAAAAAAAASg/eBOFKPywzs4/s400/screenshot01.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5273057612433318146" /&gt;&lt;/a&gt;&lt;br /&gt;Sometimes, I like to use mathematical notation in webpages, either to impress people or simply for decoration. One way to do that is &lt;a href="http://en.wikipedia.org/wiki/Mathml"&gt;MathML&lt;/a&gt;, which is an XML-based markup language for mathematical notation. However, many browsers do not support MathML at all, or require you to download plugins and/or special fonts. Another problem with MathML is that XML is a &lt;em&gt;really&lt;/em&gt; inconvenient format to edit by hand. Practically, you'll need some kind of formula editor.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;tex vs mathml&lt;/h3&gt;&lt;br /&gt;As an old-schooler, I prefer to use the math-notation invented for &lt;a href="http://en.wikipedia.org/wiki/TeX" &gt;TeX&lt;/a&gt; instead - it is short and sweet and powerful. &lt;a href="http://en.wikipedia.org/wiki/Donald_Knuth" &gt;Donald Knuth&lt;/a&gt;  invented the whole TeX language because he was unhappy with the quality of typesetting of mathematic, and it is widely used in both computer science and mathematics. Anyway, I'm sure many people remember the '&lt;em&gt;abc-formula&lt;/em&gt;' to calculate the roots of a quadratic function &lt;img src="http://www.djcbsoftware.nl/image/quadratic.png" title="quadratic" class="texdrive-formula" name="ax^2 + bx + c" border="0"&gt;:&lt;br /&gt;&lt;blockquote&gt;&lt;img src="http://www.djcbsoftware.nl/image/abc-formula.png" title="abc-formula" class="texdrive-formula" name="$-b \pm \sqrt{b^2 - 4ac} \over 2a$" border="0"&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;In the TeX-sublanguage for math, one can specify the formula as follows:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; -b \pm \sqrt{b^2 - 4ac} \over 2a&lt;/pre&gt;&lt;br /&gt;The corresponding MathML is no fewer than 20 lines; see the &lt;a href="http://en.wikipedia.org/wiki/Mathml#Example" &gt;example&lt;/a&gt; in Wikipedia. Clearly, MathML is not designed for hand-editing. There are are some editors available, but hand-editing TeX is much faster (at least for me); and, as mentioned, even if you have the MathML, many browser will not show it correctly.&lt;br /&gt;&lt;p&gt;So what I'd like is a way to use (i) TeX-notation and (ii) have it display correctly in any (graphical) browser. One way to that is to use LaTeX to process and render the formulae, and convert that to a PNG-image. In 2004, I wrote a little tool called &lt;em&gt;WebTeX&lt;/em&gt; to create small images from TeX-formulae. It was nothing too fancy; you enter a &lt;tt&gt;&amp;lt;img ...&amp;gt;&lt;/tt&gt;-element with some decription of some formula, and the little tool would turn it into an image, using &lt;a href="http://en.wikipedia.org/wiki/LaTeX" &gt;LaTeX&lt;/a&gt; and &lt;a href="http://www.imagemagick.org/script/index.php" &gt;ImageMagick&lt;/a&gt;. I don't maintain that old tool anymore - it was time for something new. Therefore...&lt;br /&gt;&lt;h3&gt;texdrive&lt;/h3&gt;&lt;br /&gt;This weekend, I wrote a new maths-in-webpages tool using &lt;a href="http://en.wikipedia.org/wiki/Emacs_lisp" &gt;emacs-lisp&lt;/a&gt;. The emacs-integration makes adding formulae to html-pages really easy. For example, if I want to include the famous &lt;em&gt;Bayes' Theorem&lt;/em&gt;, I simply type:&lt;pre&gt;&lt;br /&gt;  M-x texdrive-insert-formula&lt;br /&gt;  Formula: $P(A|B) = \frac{P(B|A)P(A)}{P(B|A)P(A) + P(B|\overline{A})P(\overline{A})}$&lt;br /&gt;  Title: bayes-theorem&lt;/pre&gt;&lt;br /&gt;Et voil&amp;agrave;; the following is inserted:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  &amp;lt;img src="bayes-theorem.png" title="bayes-theorem"&lt;br /&gt;        class="texdrive-formula" name="$P(A|B) = \frac{P(B|A)P(A)}{P(B|A)P(A) + P(B|\overline{A})P(\overline{A})}$"&lt;br /&gt;        border="0"&amp;gt;&lt;/pre&gt; &lt;br /&gt;Now, all we need to do is &lt;tt&gt;texdrive-generate-images-from-html&lt;/tt&gt;, and the corresponding image will be generated:&lt;br /&gt;&lt;p align="center"&gt; &lt;img src="http://www.djcbsoftware.nl/image/bayes-theorem.png" title="bayes-theorem" class="texdrive-formula" name="$P(A|B) = {P(B|A)P(A)\over{P(B|A)P(A) + P(B|\overline{A})P(\overline{A})}}$" border="0"&gt;&lt;br /&gt;&lt;p&gt;So, for immediate download: &lt;a href="http://www.djcbsoftware.nl/code/texdrive" &gt;texdrive.el&lt;/a&gt;. It works pretty well for me; please let me know if you have any problems or are missing something. In some cases, the formulae are not as sharp as they could be; I hope I'll be able to improve it with some tweaking. Anyway, it's nice to see how one can solve problems by glueing together some existing open-source tools. Standing on the shoulders of giants...&lt;br /&gt;&lt;P&gt;Note that some wiki-software, notably Wikipedia's MediaWiki, use a &lt;a href="http://en.wikipedia.org/wiki/Help:Formula" &gt;similar approach&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-3888888310487382935?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/3888888310487382935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=3888888310487382935' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3888888310487382935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3888888310487382935'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/11/its-so-easy.html' title='it&apos;s so easy'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kGFGcbwevHE/SS2p9e1B4QI/AAAAAAAAASg/eBOFKPywzs4/s72-c/screenshot01.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-1610864353738041481</id><published>2008-11-11T19:26:00.003+02:00</published><updated>2008-11-11T19:32:07.973+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='glib'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='gtest'/><title type='text'>the test that stumped them all</title><content type='html'>Most of us are not &lt;a href="http://en.wikipedia.org/wiki/Donald_knuth" &gt;Donald Knuth&lt;/a&gt;, and indeed need to &lt;em&gt;test&lt;/em&gt; our software. That is even true for my hobby projects - when I offer software for use by others, it's a matter of craftmanship to deliver the best software possible. It's very hard to foresee all the possible environments (architecture, compiler, library version, ...) where my software might be run. But at least, I can minimize the number of programming errors by testing things as much as possible.&lt;br /&gt;&lt;p&gt;The trouble with testing, however, is that it is &lt;em&gt;dead boring&lt;/em&gt;. I hate doing boring things -- life is just too short. So, I want to do my testing in the least boring way possible --  I'd like to be able to simply run:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;$ make test&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;and have that go through all my test cases, and report any failures. The idea is that if it is so easy to run tests, you might actually &lt;strong&gt;do&lt;/strong&gt; so, and make sure your software is working according to plan. When doing a release, it is &lt;em&gt;so&lt;/em&gt; easy to forget something &lt;em&gt;really obvious&lt;/em&gt;, for which you get embarrasing bug reports... Running some automated tests gives some peace of mind when doing a release.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;gtest&lt;/h3&gt;Since 2.16, the &lt;a href="http://en.wikipedia.org/wiki/Glib" &gt;GLib library&lt;/a&gt; offers a unit-testing framework called &lt;a href="http://library.gnome.org/devel/glib/stable/glib-Testing.html" &gt;GTest&lt;/a&gt; (note, this is not to be confused with &lt;em&gt;Google Test&lt;/em&gt;, sometimes also called GTest). GTest is not much different from, say, &lt;a href="http://check.sourceforge.net/" &gt;check&lt;/a&gt;, but it's part of GLib and integrates nicely with it. I have started to use it for mu, and I am quite happy with it. Here, I will not go into the details of actually &lt;em&gt;writing test cases&lt;/em&gt;, but talk about how to integrate GTest with your code. For the best results, you'd probably want to integrate it with your build system. I am using autotools.&lt;br /&gt;&lt;p&gt;The overall setup is that for all my directories with code, there is a subdirectory &lt;tt&gt;tests/&lt;/tt&gt; which contains the test code. Those test cases are &lt;strong&gt;unit-tests&lt;/strong&gt;, which test one function or a couple of them combined. Now, of course it's a lot easier when your code is written in such a way that makes this easy[1]. In addition to the per-directery &lt;tt&gt;tests/&lt;/tt&gt;, there is also a top-level &lt;tt&gt;tests/&lt;/tt&gt;, which tests the whole software workflow. In the case of &lt;a href="http://www.djcbsoftware.nl/code/mu"&gt;mu&lt;/a&gt;, this means that the tests will index some test messages, fill a database with that, and then run some test queries against this database. When all of that works correctly, I am quite confident that my software is not &lt;em&gt;totally&lt;/em&gt; broken.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;autotools&lt;/h3&gt;Now, let's discuss how you can integrate GTest with your code; this is inspired by the way GTK+ does it these days. First, here is &lt;tt&gt;gtest.mk&lt;/tt&gt;, a file in the top of my source tree, that I include in all &lt;tt&gt;Makefile.am&lt;/tt&gt;s that require GTest support:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;TEST_PROGS=&lt;br /&gt;&lt;br /&gt;test: all $(TEST_PROGS)&lt;br /&gt;        @ test -z "$(TEST_PROGS)" || gtester -l --verbose $(TEST_PROGS); \&lt;br /&gt;        test -z "$(SUBDIRS)" || \&lt;br /&gt;                for subdir in $(SUBDIRS); do \&lt;br /&gt;                        test "$$subdir" = "." || \&lt;br /&gt;                (cd $$subdir &amp;&amp; $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \&lt;br /&gt;                done&lt;br /&gt;&lt;br /&gt;.PHONY: test&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;This blob adds a &lt;tt&gt;test&lt;/tt&gt; target to various &lt;tt&gt;Makefile&lt;/tt&gt;s, which will run the &lt;tt&gt;gtester&lt;/tt&gt; program (part of GTest) with your test programs. &lt;br /&gt;In my &lt;tt&gt;configure.ac&lt;/tt&gt; I have:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# g_test was introduced in glib 2.16&lt;br /&gt;PKG_CHECK_MODULES(g_test,glib-2.0 &gt;= 2.16,&lt;br /&gt;                  [have_gtest=yes],[have_gtest=no])&lt;br /&gt;AM_CONDITIONAL(MU_HAVE_GTEST, test "x$have_gtest" = "xyes")&lt;br /&gt;if test "x$have_gtest" = "xno"; then&lt;br /&gt;   AC_MSG_WARN([You need GLIB version &gt;= 2.16 to build the unit tests])&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With this, I make sure that my code also works with older versions of GLib; the unit tests will only work with newer versions, of course. With this, you'll have a symbol &lt;tt&gt;MU_HAVE_GTEST&lt;/tt&gt; that you can use in your &lt;tt&gt;Makefile.am&lt;/tt&gt;; for example, in &lt;tt&gt;index/Makefile.am&lt;/tt&gt;, I have:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;include $(top_srcdir)/gtest.mk&lt;br /&gt;&lt;br /&gt;SUBDIRS= .&lt;br /&gt;&lt;br /&gt;if MU_HAVE_GTEST&lt;br /&gt;SUBDIRS += tests&lt;br /&gt;endif&lt;br /&gt;[....]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see, it includes &lt;tt&gt;gtest.mk&lt;/tt&gt; mentioned above, and (conditionally) add &lt;tt&gt;tests/&lt;/tt&gt; as a subdirectory to visit.The unit tests are in this subdirectory. Note that by explicitly setting &lt;tt&gt;SUBDIRS&lt;/tt&gt; to '.' first, we ensure that first we build the code in index, before we go to &lt;tt&gt;tests/&lt;/tt&gt;.&lt;br /&gt;&lt;h3&gt;unit tests&lt;/h3&gt;Below is a simple example unit test program; it only uses a small subset of GTest. You can further organize your test cases (see &lt;a href="http://library.gnome.org/devel/glib/stable/glib-Testing.html#GTestSuite" &gt;GTestSuite&lt;/a&gt; and &lt;a href="http://library.gnome.org/devel/glib/stable/glib-Testing.html#GTestCase" &gt;GTestCase&lt;/a&gt;) and see &lt;em&gt;Fixtures&lt;/em&gt;, which setup the testing environment. I don't use those, but they might be useful for others. In general, I am only using a small subset; check out the GTest-documentation to find out more. Anyway, here are some simple test cases:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#include &amp;lt;glib.h&amp;gt;&lt;br /&gt;#include "my-code-to-test.h"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;static void&lt;br /&gt;test_num_str (void)&lt;br /&gt;{&lt;br /&gt;        char *str;&lt;br /&gt;&lt;br /&gt; g_assert_cmpstr (str = my_num_str(1001),==,"one thousand and one");&lt;br /&gt; g_free (str);&lt;br /&gt;&lt;br /&gt; g_assert_cmpstr (str = my_num_str(-1),==,"minus one");&lt;br /&gt; g_free (str);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;static void&lt;br /&gt;test_warning (void)&lt;br /&gt;{&lt;br /&gt; /*  no complex roots: my_sqrt(-1) should&lt;br /&gt;         *  return MY_SQRT_ERROR and issue a g_warning; the &lt;br /&gt;         *  g_warning will trigger the process to fail,&lt;br /&gt;         *  which is what we're expecting */&lt;br /&gt; if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))  &lt;br /&gt;  g_assert (my_sqrt (-1) == MY_SQRT_ERROR);&lt;br /&gt; &lt;br /&gt; g_test_trap_assert_failed ();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int&lt;br /&gt;main (int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt; g_test_init (&amp;argc, &amp;argv, NULL);&lt;br /&gt;&lt;br /&gt; g_test_add_func ("/mytests/test-add",     test_add);&lt;br /&gt; g_test_add_func ("/mytests/test-warning", test_warning);&lt;br /&gt;&lt;br /&gt; return g_test_run ();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, we can run our tests with:&lt;br /&gt;&lt;pre&gt;$ make test&lt;/pre&gt;&lt;br /&gt;(Note that the test cases are &lt;tt&gt;fork()&lt;/tt&gt;ed, and you can actually write a test case where it &lt;em&gt;passes&lt;/em&gt; if an &lt;tt&gt;abort&lt;/tt&gt; or even a segfault occurs.)&lt;br /&gt;&lt;p&gt;For mu-0.4 I get the following output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[...]&lt;br /&gt;make[1]: Entering directory `/home/djcb/src/mu-0.4/tests'&lt;br /&gt;TEST: test-index-search... (pid=15553)&lt;br /&gt;  /all/test-query01:                                                   OK&lt;br /&gt;  /all/test-query02:                                                   OK&lt;br /&gt;  /all/test-query03:                                                   OK&lt;br /&gt;  /all/test-query04:                                                   OK&lt;br /&gt;  /all/test-query05:                                                   OK&lt;br /&gt;  /all/test-query06:                                                   OK&lt;br /&gt;  /all/test-query07:                                                   OK&lt;br /&gt;  /all/test-stats01:                                                   OK&lt;br /&gt;PASS: test-index-search&lt;br /&gt;make[1]: Leaving directory `/home/djcb/src/mu-0.4/tests'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Nice and easy; if you're less lucky, you might get something like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;make[1]: Entering directory `/home/djcb/src/mu-0.4/tests'&lt;br /&gt;TEST: test-index-search... (pid=16024)&lt;br /&gt;  /all/test-query01:                                                   **&lt;br /&gt;ERROR:test-index-search.c:117:query_01: assertion failed (mu_msg_sqlite_get_subject(row) == "this can't be right"): ("Re: What does 'run' do in cperl-mode?" == "this can't be right")&lt;br /&gt;FAIL&lt;br /&gt;GTester: last random seed: R02S2d24e3907b0c62e6a008e891f401fedf&lt;br /&gt;/bin/bash: line 5: 16023 Terminated              gtester --verbose test-index-search&lt;br /&gt;make[1]: Leaving directory `/home/djcb/src/mu-0.4/tests'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With that, all we need to do is fix the bug and test again... rinse-lather-repeat. Using GTest, it's really easy to run test cases. In general I try to keep my software pass the tests at the end of every programming session. Now, this does not work when I do &lt;em&gt;big&lt;/em&gt; changes, but after stabilizing things again, I make sure all test cases pass, both old and new. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;parting thoughts&lt;/h3&gt;One thing still missing from GTest is some way to see the &lt;a href="http://en.wikipedia.org/wiki/Code_coverage" &gt;code coverage&lt;/a&gt;, i.e. to see which part of the code are covered by tests. I think it should be possible to do this using &lt;a href="http://gcc.gnu.org/onlinedocs/gcc/Gcov.html" &gt;gcov&lt;/a&gt;, but it'd be nice if someone automated that a bit. Another issue is that for effective use, you will need something like the setup described here. One can hardly expect someone new to Unix-development to figure this out by themselves... but of course, we cannot really blame GTest for that.&lt;br /&gt;&lt;p&gt;Hopefully my setup helps a bit to setup non-boring testing (even though it might be a bit boring in itself...). There are real-life examples of this in both &lt;a href="http://www.djcbsoftware.nl/code/mu"&gt;mu&lt;/a&gt; and &lt;a href="http://www.gtk.org/"&gt;GTK+&lt;/a&gt;. And finally, if you find any inaccuracies, please let me know -- there are no unit tests for blog entries to save me from mistakes...&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;small&gt;[1] Now, a discussion of how to write easily testable functions deserves its own blog entry, but there are some general things to keep in mind. Keep your functions short, limit the number of parameters, avoid global variables, limit side-effects to only a few functions, etc. In other words, use the lessons learnt from &lt;a href="http://en.wikipedia.org/wiki/Functional_programming_language"&gt;functional programming languages&lt;/a&gt;. And as a nice side-effect (ha!), such functions tend to be much less error-prone in the first place.&lt;br /&gt;&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-1610864353738041481?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/1610864353738041481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=1610864353738041481' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1610864353738041481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1610864353738041481'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/11/test-that-stumped-them-all.html' title='the test that stumped them all'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-2732137093089118494</id><published>2008-11-01T12:03:00.006+02:00</published><updated>2008-11-01T14:18:51.478+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mccabe'/><category scheme='http://www.blogger.com/atom/ns#' term='mu'/><category scheme='http://www.blogger.com/atom/ns#' term='complexity'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>i dream in infra red</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/SQwpiGRcFtI/AAAAAAAAASY/q1trOy6hS24/s1600-h/athdolls.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/SQwpiGRcFtI/AAAAAAAAASY/q1trOy6hS24/s400/athdolls.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5263627730265315026" /&gt;&lt;/a&gt;&lt;br /&gt;I released &lt;a href="http://www.djcbsoftware.nl/code/mu" &gt;mu 0.4&lt;/a&gt; (my e-mail indexing/search tool), and as always, I try to &lt;em&gt;learn&lt;/em&gt; things from it.&lt;br /&gt;&lt;br /&gt;One of the main problems with writing correct and maintainable software is &lt;strong&gt;complexity&lt;/strong&gt;. I am not talking about &lt;a href="http://en.wikipedia.org/wiki/Computational_complexity_theory" &gt;&lt;em&gt;computational&lt;/em&gt;&lt;/a&gt; (big-O) complexity here - I am talking about code complexity, as a subjective measure for readability. Some people write very elegant and readable code, while others write code that is &lt;strong&gt;very hard&lt;/strong&gt; to understand. It would be nice to have some objective measure.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;cyclomatic complexity&lt;/h3&gt;While certainly not perfect, I found McCabe's &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity" &gt;&lt;em&gt;Cyclomatic Complexity&lt;/em&gt;&lt;/a&gt; a useful tool for this. Thomas J. McCabe describes his method in his &lt;a href="http://www.literateprogramming.com/mccabe.pdf" &gt;classic paper&lt;/a&gt; from 1976 as a metric of the flow graph of the program. I won't go into the details of the exact calculation here (it's straightforward though, read the paper) -- the bottom line is that the higher the complexity, the harder the code is to understand and to test. Indeed, it's not just about readability for humans: the complexity has a &lt;em&gt;direct&lt;/em&gt; relation with the amount of code paths, and consequently, the testability of the function. If complexity is high, you'll have an unholy number of code paths, which are impossible to fully test, and software quality will suffer.&lt;br /&gt;&lt;p&gt;Making sure your code is not too complex (according to this measure) means simply assuring that there are not too many code-paths (really: &lt;em&gt;decisions&lt;/em&gt;); ie. split your code in to short functions that do one thing, and do it well.&lt;br /&gt;&lt;h3&gt;pmccabe&lt;/h3&gt;Now, how do we get the numbers to identify overly complex functions? Thankfully, we don't need to calculate anything by hand. There is the &lt;tt&gt;pccmcabe&lt;/tt&gt;-package (debian/ubuntu) which does the work for us, for example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ pmccabe -fv prime.c &lt;br /&gt;Modified McCabe Cyclomatic Complexity&lt;br /&gt;|   Traditional McCabe Cyclomatic Complexity&lt;br /&gt;|       |    # Statements in function&lt;br /&gt;|       |        |   First line of function&lt;br /&gt;|       |        |       |   # lines in function&lt;br /&gt;|       |        |       |       |  filename(definition line number):function&lt;br /&gt;|       |        |       |       |           |&lt;br /&gt;6 6 18 4 26 prime.c(5): main&lt;br /&gt;6 6 19 1 30 prime.c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;An interesting example of complexity is the &lt;tt&gt;__strptime_internal&lt;/tt&gt; in &lt;a href="http://svn.gnome.org/viewvc/evolution-data-server/trunk/libedataserver/e-time-utils.c?view=markup" &gt;evolution-data-server/trunk/libedataserver/e-time-utils.c&lt;/a&gt;, which has complexity of &lt;strong&gt;196&lt;/strong&gt;(!). I am glad I do not have to maintain that one...&lt;br /&gt;&lt;h3&gt;recommendation&lt;/h3&gt;What should be the maximum &lt;em&gt;recommended&lt;/em&gt; cyclomatic complexity for a function is debatable - but many coding guidelines suggest a value of &lt;strong&gt;10&lt;/strong&gt;. If you go much beyond that, it's easy to see that the function gets very complex.&lt;br /&gt;&lt;p&gt;As always we should use guidelines with care. I can imagine some inherently complex algorithms that you nevertheless wouldn't like to split precisely *because* you want to keep things as understandable as possible. But those will be rare exceptions.&lt;br /&gt;&lt;h3&gt;practical&lt;/h3&gt;Obviously, limiting cyclomatic complexity is not sufficient to create maintainable software; there are still many other opportunities for making your code hard to understand. Still, it does not hurt to at least keep this one aspect under control, especially as experience suggests there is a high correlation between function complexity and error density. Fortunately, it's usually not too hard to reduce the complexity: split big functions (carefully!) into smaller ones; logical units that do one thing, and do one thing well.&lt;br /&gt;&lt;p&gt;I made sure the new &lt;a href="http://www.djcbsoftware.nl/code/mu" &gt;mu&lt;/a&gt; follows the &lt;em&gt;&amp;lt;=10&lt;/em&gt;-rule. I found some extra targets for Makefiles quite useful for that:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cc10:&lt;br /&gt; @pmccabe `find -name '*.c'` | sort -nr | awk '($$1 &gt; 10)'&lt;br /&gt;&lt;br /&gt;cc20:&lt;br /&gt; @pmccabe `find -name '*.c'` | sort -nr | awk '($$1 &gt; 20)'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, I can simply type &lt;tt&gt;make cc10&lt;/tt&gt; or &lt;tt&gt;make cc20&lt;/tt&gt; to get all the functions that violate the rule &lt;em&gt;CC &amp;lt;= 10&lt;/em&gt;, resp &lt;em&gt;CC &amp;lt;= 20&lt;/em&gt;. Mu version 0.3 still contained a handful of function that broke the rule, but I have now simplified them - splitting big functions up. In my projects, I have usually followed the rule to some extent, intuitively, but I definitely could have written better code if I'd pay attention to the number before. There is of course a risk in changing working code just because of 'some number'; but in the long run I think it will really pay off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-2732137093089118494?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/2732137093089118494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=2732137093089118494' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2732137093089118494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2732137093089118494'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/11/i-dream-in-infra-red.html' title='i dream in infra red'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/SQwpiGRcFtI/AAAAAAAAASY/q1trOy6hS24/s72-c/athdolls.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-8079968286175075454</id><published>2008-10-29T21:43:00.004+02:00</published><updated>2008-10-29T23:34:00.431+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='magit'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>a kind of magic</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/SQi-rxH8JJI/AAAAAAAAASQ/d3nga0ggo9M/s1600-h/magit.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 221px;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/SQi-rxH8JJI/AAAAAAAAASQ/d3nga0ggo9M/s400/magit.png" alt="" id="BLOGGER_PHOTO_ID_5262665823712715922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Today just a short tip: if you are using &lt;a href="http://en.wikipedia.org/wiki/Emacs"&gt;emacs&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Git_%28software%29"&gt;git&lt;/a&gt;, I can recommend &lt;a href="http://zagadka.vm.bytemark.co.uk/magit/"&gt;magit&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;Magit is a git-mode for &lt;tt&gt;emacs&lt;/tt&gt;, which makes using &lt;tt&gt;git&lt;/tt&gt; convenient and easy to use. Magit was created by &lt;span style="font-style: italic;"&gt;running mate &lt;/span&gt;&lt;a href="http://maemo.org/profile/view/mvo/"&gt;Marius&lt;/a&gt;. It's under heavy development, but I have been a happy user for while. There is even a &lt;a href="http://zagadka.vm.bytemark.co.uk/magit/magit.html"&gt;user manual&lt;/a&gt;, which you actually don't need very much, as things work very much as you would expect.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you are &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; using emacs, this might be a good reason to start.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-8079968286175075454?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/8079968286175075454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=8079968286175075454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8079968286175075454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8079968286175075454'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/10/kind-of-magic.html' title='a kind of magic'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kGFGcbwevHE/SQi-rxH8JJI/AAAAAAAAASQ/d3nga0ggo9M/s72-c/magit.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-8156449964507686557</id><published>2008-10-22T21:31:00.005+03:00</published><updated>2008-10-24T17:46:47.506+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mu'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><title type='text'>seek &amp; destroy</title><content type='html'>In my &lt;a href="http://djcbflux.blogspot.com/2008/10/chasing-time.html" &gt;last entry&lt;/a&gt; I wrote a bit about optimizing &lt;a href="http://www.djcbsoftware.nl/code/mu" &gt;my little project&lt;/a&gt;. One other significant optimization I found was &lt;strong&gt;inode-sorting&lt;/strong&gt;, from an idea I got from some old postings on the &lt;a href="http://www.mutt.org" &gt;mutt&lt;/a&gt; mailing list.&lt;br /&gt;&lt;br /&gt;The idea is as follows: some file systems, in particular &lt;a href="http://en.wikipedia.org/wiki/Ext3" &gt;ext3&lt;/a&gt;, support &lt;em&gt;hashed b-trees&lt;/em&gt; to speed-up lookups in large directories (&lt;a href="http://www.usenix.org/publications/library/proceedings/als01/full_papers/phillips/phillips_html/index.html" &gt;paper&lt;/a&gt;). That's nice for finding particular files. However, as a side-effect, when you scan full directories (as &lt;a href="http://www.djcbsoftware.nl/code/mu" &gt;mu&lt;/a&gt; does when indexing), you might get the entries back in a rather chaotic order. If you then try to &lt;em&gt;open&lt;/em&gt; the files in that order, you suffer from long seek times, and consequently, bad performance.&lt;br /&gt;&lt;br /&gt;The solution is to sort the dir entries by their &lt;a href="http://en.wikipedia.org/wiki/Inode" &gt;inode&lt;/a&gt; (in ascending order), and then open the corresponding files in that order. This is what &lt;tt&gt;mu&lt;/tt&gt; (&lt;tt&gt;mu-index&lt;/tt&gt;) does by default, starting with version 0.3. You can turn it off with &lt;tt&gt;--tune-sort-inodes=0&lt;/tt&gt;, but there is usually little need for that, as the overhead of sorting is negligible.&lt;br /&gt;&lt;br /&gt;So, what difference does it make? Answer: it depends on how the files are laid out; if you already get your files back in their 'natural order', there won't be much difference - this is what happens on my main machine. But, on another (old) machine where the files are &lt;em&gt;not&lt;/em&gt; in that order, the improvements are substantial: I found that indexing 1500 message in &lt;strong&gt;25&lt;/strong&gt; seconds without inode-sorting, goes down to &lt;strong&gt;15&lt;/strong&gt; seconds with inode-sorting; a nice &lt;strong&gt;40%&lt;/strong&gt; improvement.&lt;br /&gt;&lt;br /&gt;Note(1): this works for ext3 directories with &lt;tt&gt;dir_index&lt;/tt&gt; enabled; there's a &lt;a href="http://ubuntuforums.org/showthread.php?t=37806" &gt;HOWTO&lt;/a&gt;. There are other file systems that have similar features, but I haven't tested those. Note(2): This optimization is not very useful for flash-based file systems, as they don't really care in what order you open files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-8156449964507686557?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/8156449964507686557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=8156449964507686557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8156449964507686557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8156449964507686557'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/10/seek-destroy.html' title='seek &amp; destroy'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-2772592045019408508</id><published>2008-10-18T17:06:00.007+03:00</published><updated>2008-10-19T19:39:41.584+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mu'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlite'/><category scheme='http://www.blogger.com/atom/ns#' term='xapian'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><title type='text'>chasing time</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/SPnt3tPxLjI/AAAAAAAAASE/kob4paC922M/s1600-h/waydown.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/SPnt3tPxLjI/AAAAAAAAASE/kob4paC922M/s400/waydown.jpg" alt="" id="BLOGGER_PHOTO_ID_5258495581226085938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As discussed &lt;a href="http://djcbflux.blogspot.com/2008/09/its-all-greek-to-me.html"&gt;before&lt;/a&gt;, I am working on a little hobby project called &lt;a href="http://www.djcbsoftware.nl/code/mu/"&gt;mu&lt;/a&gt;, for indexing/searching e-mail messages in maildirs. As a true hobby project, it's about finding things out. I'll take notes as I go along.&lt;br /&gt;&lt;h3&gt;indexing&lt;/h3&gt;One important part of indexing and searching is.... &lt;strong&gt;indexing&lt;/strong&gt;. Indexing (in this context) is the operation of recursively going through a &lt;a href="http://en.wikipedia.org/wiki/Maildir"&gt;maildir&lt;/a&gt;, analyzing each message file, and storing the results in a database. In mu's case, there are actually two databases, one &lt;a href="http://sqlite.org/"&gt;SQLite&lt;/a&gt;-database and one &lt;a href="http://www.xapian.org/"&gt;Xapian&lt;/a&gt;-database (a really interesting tool - to be discussed later).&lt;br /&gt;&lt;p&gt;Indexing may take a considerable amount of time; mu version 0.1 took 192 seconds (on average) to index 10000 messages in my testing corpus. And this version did not even support the Xapian database. Indexing involves reading from disk, querying the database to see if the message is already there, and if not, storing the message metadata. Because of this scheme, &lt;strong&gt;re&lt;/strong&gt;-indexing of the same 10000 messages only takes about 5 seconds (with re-indexing, only modified/new messages need to be indexed).&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The full indexing operation probably does not happen very often, for most people. Still, I think it's very worthwhile to try and make it faster. Nobody likes to wait for 192 seconds, even once - and during development, I need to do a full index rather often. Another important reason is that optimizing software is simply &lt;strong&gt;interesting&lt;/strong&gt; - which is a main motivator for a hobby project.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So, let's see how we can make this a bit faster; here I'll only discuss some of the database-related optimizations.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;transactions&lt;/h3&gt;As mentioned, &lt;tt&gt;mu&lt;/tt&gt; stores the indexing data in two databases; one &lt;a href="http://sqlite.org/"&gt;SQLite&lt;/a&gt;-database and one &lt;a href="http://www.xapian.org/"&gt;Xapian&lt;/a&gt;-database. Both of these databases know the concept of a &lt;a href="http://en.wikipedia.org/wiki/Database_transaction"&gt;transaction&lt;/a&gt;. By default, SQLite puts every query in a separate transaction. This is very safe, but also quite expensive. When indexing messages, there is no risk of data loss, so it's quite reasonable to increase the transaction size. And this makes things a &lt;strong&gt;lot&lt;/strong&gt; faster. Between &lt;tt&gt;mu&lt;/tt&gt; version 0.1 to 0.2, I increased the default from one transaction per message (3 queries) to one transaction per 100 messages. This made indexing more than &lt;strong&gt;2.5&lt;/strong&gt; times faster -- see the table below. This improvement is even more impressive when considering that I also added full-text search, indexing message bodies as well (this is what Xapian is for).&lt;br /&gt;&lt;p&gt;For Xapian transactions, the default value I chose is 1000 transactions -- but the performance effects are much smaller. So, my 'optimal' values, are 100 and 1000, respectively. I found that transactions bigger than that don't improve the performance very much, but of course still affect memory usage. You can tune these with &lt;tt&gt;--tune-sqlite-transaction-size&lt;/tt&gt; and &lt;tt&gt;--tune-xapian-transaction-size&lt;/tt&gt;. The defaults should be just fine for the normal desktop use case - still, if you need a less memory-hungry but slower version, that is possible too. See the &lt;tt&gt;&lt;a href="http://www.djcbsoftware.nl/code/mu/man1/mu-index.1.html"&gt;mu-index(1)&lt;/a&gt;&lt;/tt&gt; man page for details.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;pragmatic&lt;/h3&gt;Another area for performance are SQLite's &lt;a href="http://www.sqlite.org/pragma.html"&gt;&lt;tt&gt;PRAGMA&lt;/tt&gt;-statements&lt;/a&gt;. Some useful ones are &lt;tt&gt;PRAGMA synchronous=&lt;/tt&gt; (which you can influence with &lt;tt&gt;--tune-synchronous&lt;/tt&gt; and &lt;tt&gt;PRAGMA temp_store=&lt;/tt&gt;, which you can tune with &lt;tt&gt;--tune-temp-store&lt;/tt&gt;. Again, see the &lt;tt&gt;&lt;a href="http://www.djcbsoftware.nl/code/mu/man1/mu-index.1.html"&gt;mu-index(1)&lt;/a&gt;&lt;/tt&gt; man page for details.&lt;br /&gt;&lt;p&gt;It turns out that &lt;tt&gt;PRAGMA synchronous&lt;/tt&gt; allows for some improvement. This setting determines whether SQLite does it writes in a synchronous way. It's faster (and slightly less safe, but the notes at the end of this blog entry). From the table below, it seems that &lt;tt&gt;PRAGMA temp_store&lt;/tt&gt; does not make much difference in this case. This PRAGMA determines where we store temporary (non-committed) results. Some testing suggests this is because, when we do not enable synchronous writing (above), even the 'file' temp_store never physically hits the disk, due to caching by the kernel.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;results&lt;/h3&gt;Having optimization options tunable through command line options is really useful. Software optimization, especially from what your read online, seems to be a field full of myths, outdated 'facts' and placebo-effects. And even if the information is correct, it may not apply to your use case. The only thing you can do is measure it. And with command line-options I can easily do that, as well as see how various combinations of optimizations perform.&lt;br /&gt;&lt;p&gt;Here's a table with the results for indexing 10000 messages with version 0.3. Between all the runs, I used&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;# sync &amp;amp;&amp;amp; echo 3 &gt; /proc/sys/vm/drop_caches&lt;br /&gt;&lt;/pre&gt;to flush the caches. That's a critical step - the kernel caches a lot of data, which makes subsequent runs much faster if you don't flush the caches. And that is not what I wanted to measure.&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;strong&gt;msg/sqlite tx&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;msg/xapian tx&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;synchronous sqlite&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;temp store sqlite&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;time (s)&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;notes&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;&lt;/td&gt;&lt;td&gt;full&lt;br /&gt;&lt;/td&gt;&lt;td&gt;file&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1536&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;&lt;/td&gt;&lt;td&gt;normal&lt;br /&gt;&lt;/td&gt;&lt;td&gt;default&lt;br /&gt;&lt;/td&gt;&lt;td&gt;182&lt;br /&gt;&lt;/td&gt;&lt;td&gt;similar to defaults for mu 0.1, but faster&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;100&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1000&lt;br /&gt;&lt;/td&gt;&lt;td&gt;full&lt;br /&gt;&lt;/td&gt;&lt;td&gt;file&lt;br /&gt;&lt;/td&gt;&lt;td&gt;73&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;100&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1000&lt;br /&gt;&lt;/td&gt;&lt;td&gt;no&lt;br /&gt;&lt;/td&gt;&lt;td&gt;file&lt;br /&gt;&lt;/td&gt;&lt;td&gt;68&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;100&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1000&lt;br /&gt;&lt;/td&gt;&lt;td&gt;no&lt;br /&gt;&lt;/td&gt;&lt;td&gt;memory&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;68&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;default for mu 0.3&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10000&lt;br /&gt;&lt;/td&gt;&lt;td&gt;10000&lt;br /&gt;&lt;/td&gt;&lt;td&gt;no&lt;br /&gt;&lt;/td&gt;&lt;td&gt;memory&lt;br /&gt;&lt;/td&gt;&lt;td&gt;67&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;As an example, the default for mu version 0.3 is equivalent to:&lt;br /&gt;&lt;pre&gt;./mu-index --tune-sqlite-transaction-size=100 --tune-xapian-transaction-size=1000  --tune-synchronous=0 --tune-temp-store=2 ~/data/testmaildir&lt;br /&gt;&lt;/pre&gt;Again, see the &lt;tt&gt;mu-index(1)&lt;/tt&gt; manpage for details.&lt;br /&gt;&lt;p&gt;Note, these optimizations are a good strategy for indexing data, that is, generating data from data that is already safely stored somewhere else. If anything goes wrong, we can always restart the indexing later. However, if your database stores data that cannot easily be retrieved again afterwards (say, that one occurrence of the &lt;a href="http://en.wikipedia.org/wiki/Higgs_boson"&gt;Higg's Boson&lt;/a&gt; in your particle accelerator), you would want to be a bit more careful.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;There are some more optimizations possible; some I have even implemented, such as &lt;em&gt;inode-sorting&lt;/em&gt;, which is documented in the &lt;tt&gt;&lt;a href="http://www.djcbsoftware.nl/code/mu/man1/mu-index.1.html"&gt;mu-index(1)&lt;/a&gt;&lt;/tt&gt; man page. To be discussed some other time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-2772592045019408508?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/2772592045019408508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=2772592045019408508' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2772592045019408508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2772592045019408508'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/10/chasing-time.html' title='chasing time'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/SPnt3tPxLjI/AAAAAAAAASE/kob4paC922M/s72-c/waydown.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-1946132925597752331</id><published>2008-09-28T11:45:00.003+03:00</published><updated>2008-09-28T12:30:02.887+03:00</updated><title type='text'>it's all greek to me</title><content type='html'>It's been a while since my last blog entry... I haven't done much work on &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt; lately, but it is in &lt;a href="http://blogs.igalia.com/svillar/" &gt;safe&lt;/a&gt; &lt;a href="http://blogs.igalia.com/dape/" &gt;hands&lt;/a&gt;. I did start a new little hobby project though; it's called &lt;a href="http://www.djcbsoftware.nl/code/mu/" &gt;mu&lt;/a&gt;, and it's a collection of command line tools to index / search e-mails stored in Maildirs. It doesn't run on N8x0 (yet), but I guess it wouldn't be very hard to port it. Of course, this kind of software has been written before - but for a hobby project, that does not really matter. It's all about trying things out.&lt;br /&gt;&lt;p&gt;I am taking notes about the things I learn as I go along... there's a lot of optimization stuff to discuss but unfortunately, it's too much to fit into this blog entry... will write about that later. I am off to Greece now -- to corrupt the youth of Athens. I hope I can understand the people; I taught myself a little bit, but rumours have it that the language has changed quite a bit in the last 2500 years...&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And not to forget: &lt;a href="http://ubuntu.media.mit.edu/gnu/"&gt;happy birthday, GNU&lt;/a&gt;. 25 years... I may not &lt;i&gt;always&lt;/i&gt; agree with &lt;a href="http://en.wikipedia.org/wiki/Richard_Stallman"&gt;RMS&lt;/a&gt;, but he deserves the greatest respect for his accomplishments. A George Bernard Shaw quote comes to mind:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; "Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the world to themselves. All progress, therefore, depends on unreasonable people.".&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-1946132925597752331?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/1946132925597752331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=1946132925597752331' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1946132925597752331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/1946132925597752331'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/09/its-all-greek-to-me.html' title='it&apos;s all greek to me'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-5204587838378822465</id><published>2008-05-18T13:13:00.001+03:00</published><updated>2008-05-18T13:57:41.802+03:00</updated><title type='text'>my name is nobody</title><content type='html'>It's great to see the improvements in the &lt;a href="http://modest.garage.maemo.org" &gt;modest e-mail client&lt;/a&gt;. For most people, there should be little reason still to use the old email client. Great thanks to all involved -- my friends from &lt;a href="http://www.igalia.com" &gt;Spain&lt;/a&gt;, &lt;a href="http://pvanhoof.be" &gt;Belgium&lt;/a&gt;, &lt;a href="http://www.openismus.com" &gt;Germany&lt;/a&gt; and elsewhere; Vivek, Mox, and all users, contributors etc. It's good to mention contributors sometimes; I found the &lt;a href="http://money.cnn.com/galleries/2008/fortune/0805/gallery.An_international_affair.fortune/index.html" &gt;CNN Money-article&lt;/a&gt; about the N810 development team a bit off-balance in that respect - it would have been nice to include some people who write the software, too. &lt;br /&gt;&lt;p&gt;Anyway, back to modest. I'm sure that &lt;em&gt;someone&lt;/em&gt;, &lt;em&gt;somewhere&lt;/em&gt; is missing some feature that is essential to them. While usability and feature-richness are not &lt;em&gt;necessarily&lt;/em&gt; conflicting, in practice they often are (I know, I'm a &lt;a href="http://www.mutt.org" &gt;mutt&lt;/a&gt;-user!) But, no excuses -- in my (slightly biased) opinion, it's a nice little e-mail client and a great improvement. And with the code being open and free, there is nothing stopping people from firing up their &lt;a href="http://www.djcbsoftware.nl/dot-emacs.html" &gt;favorite text editor&lt;/a&gt; and start hacking on their missing pet feature.&lt;br /&gt;&lt;p&gt;My personal role in the modest-project will diminish a bit. I'll be slaying some new dragons - still Nokia, open source, yadayada; I'll write a bit more about that in the near future. I feel that modest will continue its life in trusted hands, and of course I'll keep an eye on that ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-5204587838378822465?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/5204587838378822465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=5204587838378822465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/5204587838378822465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/5204587838378822465'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/05/my-name-is-nobody.html' title='my name is nobody'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-2031205363276666572</id><published>2008-04-18T16:53:00.002+03:00</published><updated>2008-04-18T17:04:49.440+03:00</updated><title type='text'>the thing that should not be</title><content type='html'>Just a short note: due to an unfortunate regression, &lt;a href="http://modest.garage.maemo.org" &gt;Modest&lt;/a&gt; (version: W16 release) does not work with SSL/TLS, breaking providers such as Gmail. See &lt;a href="https://bugs.maemo.org/show_bug.cgi?id=3084" &gt;bug 3084&lt;/a&gt;. The reason was that what we tested with, differs slightly with the Chinook environment, and so this one fell through the cracks. Mea culpa... Anyhow, the problem has been fixed. If you build things yourself, get the latest (tinymail and modest) and all will work fine. If you don't want to do that, you'll have to wait until Monday; unfortunately, we can't do anything before that.&lt;br /&gt;&lt;p&gt;Once more, apologies from the Modest team for the inconvenience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-2031205363276666572?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/2031205363276666572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=2031205363276666572' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2031205363276666572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2031205363276666572'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/04/thing-that-should-not-be.html' title='the thing that should not be'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-9171957026615419002</id><published>2008-04-01T00:31:00.004+03:00</published><updated>2008-04-01T23:06:59.925+03:00</updated><title type='text'>images and words</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R_FYVRFS5bI/AAAAAAAAAPs/My1GWT9hDR8/s1600-h/Screenshot-Mail+Trends+-+Mozilla+Firefox+3+Beta+4.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R_FYVRFS5bI/AAAAAAAAAPs/My1GWT9hDR8/s400/Screenshot-Mail+Trends+-+Mozilla+Firefox+3+Beta+4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5184021768466261426" /&gt;&lt;/a&gt;&lt;br /&gt;These are interesting times... I just found out that the next revision of our internet tablet will have &lt;a href="http://www.nokia.com/A4136001?newsid=1205374" &gt;WiMAX&lt;/a&gt;-support. Rest assured - &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt; will support that as well.&lt;br /&gt;&lt;p&gt;Also, recently I have been studying the (very much recommended!) work of &lt;a href="http://en.wikipedia.org/wiki/Edward_tufte" &gt;Edward Tufte&lt;/a&gt;, on the visualization of data, and how modern technology is great at obfuscating real meaning behind snappy graphs. Still people are trying to generate meaningful (or sometimes just pretty) pictures out of masses of data. One of the masses of data being email messages. Check these great &lt;a href="http://flowingdata.com/2008/03/19/21-ways-to-visualize-and-explore-your-email-inbox/" &gt;post on FlowingData&lt;/a&gt; which show many different visualization of email data. For a more practical example, look at &lt;a href="http://code.google.com/p/mail-trends/" &gt;MailTrends&lt;/a&gt;, which analyzes the emails in your Gmail account for your.&lt;br /&gt;&lt;h2&gt;et tu, emacs?&lt;/h2&gt; &lt;br /&gt;I was very happy to see &lt;a href="http://danielsz.freeshell.org/code/mine/emacs-for-maemo/index.shtml" &gt;prebuild Emacs packages&lt;/a&gt; for Maemo. I wonder if &lt;a href="http://djcbflux.blogspot.com/2008/02/waiting-for-22.html" &gt;my instructions&lt;/a&gt; are still valid, especially regarding key-bindings on the N810. Anyway, I'd be interested in the next steps in integration Emacs with the platform. I'd like to connect the HW-zoom buttons to zooming the fonts in Emacs, and maybe marry the emacs-server setup with the application menu -- ie., don't use new emacs instances for new files, but instead use new buffers in the existing instance. Now all I need is a little time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-9171957026615419002?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/9171957026615419002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=9171957026615419002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/9171957026615419002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/9171957026615419002'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/04/images-and-words.html' title='images and words'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R_FYVRFS5bI/AAAAAAAAAPs/My1GWT9hDR8/s72-c/Screenshot-Mail+Trends+-+Mozilla+Firefox+3+Beta+4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-6079317751282637589</id><published>2008-03-21T16:37:00.004+02:00</published><updated>2008-03-21T19:18:58.559+02:00</updated><title type='text'>recreation day</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R-PJV0iO3II/AAAAAAAAAPk/U1fTPK7pZmU/s1600-h/P1130836.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R-PJV0iO3II/AAAAAAAAAPk/U1fTPK7pZmU/s400/P1130836.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5180205373122862210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;Photo from &lt;a href="http://www.evergrey.net/" &gt;Evergrey&lt;/a&gt;-concert, yesterday 20.03. Excellent &lt;a href="http://www.myspace.com/officialevergrey" &gt;music&lt;/a&gt; from the Swedish rockers; I've known them for years, but this was the first time I saw them live. Great concert, very talented band, and they were nice enough to do an autograph session afterwards; I even got into a picture with the guys -- slightly embarrassing...&lt;/em&gt;&lt;br /&gt;&lt;p&gt;Time for an update... Our beloved &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt; e-mail client is humming along happily. We're putting a lot of energy of testing all kinds of use cases, as well as weird error conditions. Modest/tinymail contain quite some code (in total around 240K lines), so there are a &lt;em&gt;lot&lt;/em&gt; of things to test. Anyway, I was already quite happy with our first b&amp;egrave;ta release, back in December. And &lt;tt&gt;modest&lt;/tt&gt; has seen solid and consistent improvement since, every single week (with a few regressions thrown in to keep things interesting...).&lt;br /&gt;&lt;p&gt;Also, I have been quite happy with my &lt;a href="http://djcbflux.blogspot.com/2008/02/waiting-for-22.html" &gt;emacs-on-N810&lt;/a&gt;. It has turned my N810 is a versatile PDA. I'm slowly capturing the power of &lt;a href="http://orgmode.org/" &gt;&lt;tt&gt;org-mode&lt;/tt&gt;&lt;/a&gt;  in Emacs (see the &lt;a href="http://jaderholm.com/screencasts.html" &gt;25 minute video&lt;/a&gt;), which is an amazing way to handle todo-lists, &lt;a href="http://djcbflux.blogspot.com/2008/01/battle-against-time.html" &gt;GTD&lt;/a&gt; and so on.&lt;br /&gt;&lt;p&gt;Then, there is so much happening in free software land, it's hard to keep track of it, even if just looking at the level of fundamental tools. Some things that I found quite interesting:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href="http://wiki.mozilla.org/Dehydra_GCC" &gt;Dehydra/GCC&lt;/a&gt; is a plugin for &lt;tt&gt;gcc&lt;/tt&gt; (Javascript!) built within the context of the Mozilla project. Mozilla uses an object system called &lt;a href="http://en.wikipedia.org/wiki/Xpcom" &gt;XPCOM&lt;/a&gt;, which is 'inspired' by Microsoft's &lt;a href="http://en.wikipedia.org/wiki/Component_Object_Model" &gt;COM&lt;/a&gt;. However, times have changed, and in many place in the huge Mozilla codebase, this XPCom is seen unnecessary bloat and complexity. For example, in COM-style, one uses the return value of a method for error checking; the 'real' return value comes as an outparam. However, in many cases (see &lt;a href="http://wiki.mozilla.org/Gecko:DeCOMtamination" &gt;DeCOMtamination&lt;/a&gt;), it's much better to use a normal return value, and use e.g. exceptions for error handling. Now, try to do that &lt;em&gt;automatically&lt;/em&gt;, taking into account possibly misuse of outparams -- sometimes, &lt;tt&gt;sed&lt;/tt&gt;/&lt;tt&gt;awk&lt;/tt&gt;/&lt;tt&gt;perl&lt;/tt&gt; are just not enough. And that is where &lt;a href="http://wiki.mozilla.org/DeHydra" &gt;DeHydra&lt;/a&gt; comes in. &lt;br /&gt;  &lt;li&gt;&lt;a href="http://www.airs.com/blog/archives/138" &gt;gold&lt;/a&gt;, the new &amp;amp; improved GNU linker. It's good to see that even classic tools like &lt;tt&gt;ld&lt;/tt&gt; are still being improved -- and quite significantly in this case, esp. for speed. What we're still waiting for is &lt;a href="http://www.airs.com/blog/archives/100" &gt;&lt;em&gt;link-time optimization&lt;/em&gt;&lt;/a&gt;, which can significantly speed-up programs, e.g. by making sure the most used functions are in the same memory page.&lt;br /&gt;  &lt;li&gt;&lt;a href="http://code.google.com/p/quagmire/wiki/QuagmireHome" &gt;quagmire&lt;/a&gt; (giggedigig!), finally an autotools-replacement projects that seems actually capable of doing so. The initial goals is to replace &lt;tt&gt;automake&lt;/tt&gt; and &lt;tt&gt;libtool&lt;/tt&gt; with a bunch of GNU &lt;tt&gt;make&lt;/tt&gt; macros. By simply requiring &lt;em&gt;GNU make&lt;/em&gt; instead of a 'normal' &lt;tt&gt;make&lt;/tt&gt;, a lot of the hackery autotools disappears. Another nice thing is that it understands &lt;tt&gt;pkg-config&lt;/tt&gt;, which simplifies another set of problems. Apparently, the longer term goal is to replace &lt;tt&gt;autoconf&lt;/tt&gt; as well. And, given designer Tom Tromey's track record, the future looks bright.&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-6079317751282637589?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/6079317751282637589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=6079317751282637589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6079317751282637589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6079317751282637589'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/03/photo-from-evergrey-concert-yesterday.html' title='recreation day'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R-PJV0iO3II/AAAAAAAAAPk/U1fTPK7pZmU/s72-c/P1130836.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-9186791328939220754</id><published>2008-02-25T22:34:00.004+02:00</published><updated>2008-02-25T22:44:10.104+02:00</updated><title type='text'>come together</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kGFGcbwevHE/R8Mmj55frhI/AAAAAAAAAPE/cAY8OMIWQt4/s1600-h/modest-gnome-1.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_kGFGcbwevHE/R8Mmj55frhI/AAAAAAAAAPE/cAY8OMIWQt4/s400/modest-gnome-1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5171019195430710802" /&gt;&lt;/a&gt;&lt;br /&gt;I've returned to Helsinki after visiting the &lt;a href="http://www.fosdem.org" &gt;FOSDEM&lt;/a&gt;-conference in Brussels. Before anything else, I'd like to thank and compliment the organizers for creating a great conference. And not just the organizers, all the volunteers that made it another great FOSDEM. The amount of work that goes into something like this cannot be overestimated, and it all went very smooth. If anything, it was &lt;em&gt;too&lt;/em&gt; succesful, so many people...&lt;br /&gt;&lt;p&gt;Anyway, I had the chance to meet a great many old friends, as well make new ones. It's fantastic to see all the free software projects that improve things all over the software stack. Kernel, console, X, web services, funky UI bling, end-user applications, embedded software,... So much combined brain power, pushing the envelope of free software.&lt;br /&gt;&lt;p&gt;I did a presentation (should be available soon) of our own little addition to that, the &lt;a href="http://modest.garage.maemo.org" &gt;modest e-mail client&lt;/a&gt;. Although there was some delay (Murphy!), I was quite happy with my &lt;a href="http://fosdem.org/2008/schedule/events/embedded_modest" &gt;talk&lt;/a&gt;. And it was particularly interesting to talk to modest users - what do they like, what do they miss, and so on. Overall, we've been blessed with very helpful users, and with there assistance, we were able to kill quite a number of bugs which would have very hard to fix otherwise. See our resolved buglist in &lt;a href="https://bugs.maemo.org" &gt;our bugzilla&lt;/a&gt; for some great examples of that.&lt;br /&gt;&lt;p&gt;Anyway, overall FOSDEM made me quite happy -- such a gathering of smart people and great software, promising a lot of good things for the free software future.&lt;br /&gt;&lt;p&gt;&lt;em&gt;Note, screenshot is of the unstable, proof-of-concept GNOME desktop-version of modest, courtesy of &lt;a href="http://blogs.igalia.com/dape/" &gt;dape&lt;/a&gt;&lt;/em&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-9186791328939220754?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/9186791328939220754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=9186791328939220754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/9186791328939220754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/9186791328939220754'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/02/come-together.html' title='come together'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kGFGcbwevHE/R8Mmj55frhI/AAAAAAAAAPE/cAY8OMIWQt4/s72-c/modest-gnome-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-6759721439809621538</id><published>2008-02-21T18:16:00.001+02:00</published><updated>2008-02-21T18:16:40.286+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='fosdem'/><title type='text'>heeding the call</title><content type='html'>This coming weekend, a big part of our multinational &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;-team (Sergio, Berto, Philip and Dirk) will be at the &lt;a href="http://fosdem.org" &gt;FOSDEM conference&lt;/a&gt; in Brussels. There will even be a &lt;a href="http://www.fosdem.org/2008/schedule/tracks/embedded" &gt;presentation about the modest e-mail client&lt;/a&gt;. So, if you have any questions, suggestions or even some constructive(!) criticism, this is your chance! You can use IM if you're looking for me (diggler[at]gmail.com).&lt;br /&gt;&lt;p&gt;Last year, I had a great time at FOSDEM, with many, many interesting people as well as the nice atmosphere (food and drinks) in Brussels. Hope to see many of you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-6759721439809621538?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/6759721439809621538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=6759721439809621538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6759721439809621538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6759721439809621538'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/02/heeding-call.html' title='heeding the call'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-3271535658315859315</id><published>2008-02-18T23:01:00.006+02:00</published><updated>2008-02-18T23:40:45.898+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>waiting for 22</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/R7nzj55frfI/AAAAAAAAAO0/hY9DGcuasx0/s1600-h/screenshot-2008-02-18-22-37-52.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/R7nzj55frfI/AAAAAAAAAO0/hY9DGcuasx0/s400/screenshot-2008-02-18-22-37-52.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5168429845547298290" /&gt;&lt;/a&gt;&lt;br /&gt;Achilles had Patroclus. Don Quixote had Sancho Panza. Michael Jackson has Bubbles. And I have &lt;a href="http://en.wikipedia.org/wiki/Emacs" &gt;emacs&lt;/a&gt;. On my N810. A &lt;a href="http://djcbflux.blogspot.com/2007/12/maemacs.html" &gt;while ago&lt;/a&gt;, I already wrote about it. I even showed some screenshot of emacs running in scratchbox. But, I didn't take the final step - getting it to run on an actual N810. Recently, I tried to get that to work. Well, that was frustrating... Some hackish instructions follow. They may or may not work for you -- try at your own risk :)&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;First I tried to simply rebuild the &lt;a href="http://peadrop.com/blog/2007/09/17/pretty-emacs-reloaded/" &gt;Emacs23-packages&lt;/a&gt; in scratchbox; that failed, because the compilation somehow crashes &lt;a href="http://en.wikipedia.org/wiki/Qemu" &gt;QEMU&lt;/a&gt;;&lt;br /&gt;  &lt;li&gt;Then I tried Emacs 22 instead... but the problem remained;&lt;br /&gt;  &lt;li&gt;So, I decided that maybe I should try to compile the package it on the N810 itself. Again, that failed. One of many problems: package building requires a real &lt;tt&gt;grep&lt;/tt&gt;, and if you try to install it, it wants to remove the whole &lt;tt&gt;busybox&lt;/tt&gt; environment; sigh. I fought the system - the system won...&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;But, all was not lost. There are prebuilt Debian packages of Emacs22 &lt;a href="http://ftp.fi.debian.org/debian/pool/main/e/emacs22/" &gt;available&lt;/a&gt;; I took the &lt;tt&gt;armel&lt;/tt&gt;-packages from there, and tried to install them. That &lt;em&gt;almost&lt;/em&gt; worked. Almost, because the size of emacs is almost legendary. It did not fit on my root file system on the N810.&lt;br /&gt;&lt;p&gt;We're nearing the solution though; I copied the contents of the &lt;tt&gt;.deb&lt;/tt&gt;s to a directory &lt;tt&gt;emacs810&lt;/tt&gt; (with &lt;tt&gt;mc&lt;/tt&gt;); then I copied this directory to the MMC-card of the N810 (&lt;tt&gt;/media/mmc2/&lt;/tt&gt;). I set some symlinks, ie.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  # ln -s /media/mmc2/emacs810/usr/share/emacs /usr/share/emacs&lt;br /&gt;  # ln -s /media/mmc2/emacs810/usr/share/emacs22 /usr/share/emacs22&lt;br /&gt;  # ln -s /media/mmc2/emacs810/usr/bin/emacs22-gtk /usr/bin/emacs22&lt;br /&gt;  # ln -s /media/mmc2/emacs810/usr/share/applications/emacs22.desktop /usr/share/applications/hildon/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/R7nzp55frgI/AAAAAAAAAO8/dOpAxeLHXwo/s1600-h/screenshot-2008-02-18-22-41-32.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/R7nzp55frgI/AAAAAAAAAO8/dOpAxeLHXwo/s400/screenshot-2008-02-18-22-41-32.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5168429948626513410" /&gt;&lt;/a&gt;Also, you'll need to install &lt;tt&gt;libungif4g&lt;/tt&gt;. That should do the trick, and emacs should show up in your &lt;tt&gt;Extras&lt;/tt&gt;-menu. And we can run emacs! Victory is mine!&lt;br /&gt;&lt;p&gt;Well, almost. In emacs, a very useful key is the Meta-key, usually mapped to the &lt;tt&gt;Alt&lt;/tt&gt;-key of your keyboard. But of course, there's no alt-key on the N810-keyboard. Instead, I decided to remap the &lt;tt&gt;Chr&lt;/tt&gt;-key. I'd like to remap it in my &lt;a href="http://www.djcbsoftware.nl/dot-emacs.html" &gt;&lt;tt&gt;.emacs&lt;/tt&gt;&lt;/a&gt;, but I haven't been able to do so.&lt;br /&gt;&lt;p&gt;Anyway, as a first start, I added these to &lt;tt&gt;/usr/share/X11/xkb/symbols/nokia_vndr/rx-44&lt;/tt&gt; (the xkb keyboard mapping):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   key &amp;lt;SPCE&amp;gt; {  [ space, space, Tab, space ] };&lt;br /&gt;   key &amp;lt;COMP&amp;gt; {  [ Meta_L, Meta_L, Multi_key, Meta_L ] };&lt;br /&gt;   &lt;br /&gt;   modifier_map Mod1 { Meta_L };&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first one will turn &lt;tt&gt;Fn-Spc&lt;/tt&gt; into &lt;tt&gt;Tab&lt;/tt&gt;, which is very useful for completion (for some reason, I couldn't get &lt;tt&gt;M-i&lt;/tt&gt; working in the minibuffer). The second one will turn the &lt;tt&gt;Chr&lt;/tt&gt; key into the &lt;tt&gt;M-&lt;/tt&gt;key (obviously, you can't run emacs without that), with &lt;tt&gt;Fn-Chr&lt;/tt&gt; giving the old &lt;tt&gt;Chr&lt;/tt&gt; key. Not sure what it will &lt;em&gt;break&lt;/em&gt; - it's black magic.&lt;br /&gt;&lt;p&gt;Ok, that's it. These steps should be cleaned-up, pre-packaged and made single-click-available. Anyway, the steps above should hopefully get you a working hand held &lt;tt&gt;emacs&lt;/tt&gt;. Happy hacking!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-3271535658315859315?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/3271535658315859315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=3271535658315859315' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3271535658315859315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3271535658315859315'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/02/waiting-for-22.html' title='waiting for 22'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kGFGcbwevHE/R7nzj55frfI/AAAAAAAAAO0/hY9DGcuasx0/s72-c/screenshot-2008-02-18-22-37-52.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-8174272123499734592</id><published>2008-02-17T13:04:00.004+02:00</published><updated>2008-02-17T23:59:39.442+02:00</updated><title type='text'>be quick or be dead</title><content type='html'>&lt;em&gt;Note, image has not much to do with this post, it's emacs22 running on my N810. More about that in my next post&lt;/em&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kGFGcbwevHE/R7gU_55freI/AAAAAAAAAOs/hH_3vF72560/s1600-h/screenshot-2008-02-17-13-04-51.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_kGFGcbwevHE/R7gU_55freI/AAAAAAAAAOs/hH_3vF72560/s400/screenshot-2008-02-17-13-04-51.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5167903660513930722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For a while, we've been doing semi-weekly updates to &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;, usually on Friday's. And every week, we're fixing many issues, big and small. Modest has grown quite a bit, and modest + &lt;a href="http://tinymail.org" &gt;tinymail&lt;/a&gt;/camel has about 240K lines of code. That's quite a haystack for bugs to hide, but I'm quite happy with the speed at which we've been able to squash them. The big fix of last week was adding support for &lt;tt&gt;maemo-launcher&lt;/tt&gt;, due to heroic hacking efforts by &lt;a href="http://blogs.igalia.com/dape/" &gt;dape&lt;/a&gt;. Maemo-launcher significantly improves startup speed. How does it do that? To answer that, let's look at what happens at application startup time.&lt;br /&gt;&lt;h3&gt;still haven't found what i'm looking for&lt;/h3&gt;&lt;br /&gt;Few people have the time to write a UI-toolkit, or even &lt;tt&gt;printf&lt;/tt&gt;(3), for every piece of software they develop. Thankfully, we can reuse libraries to do such things for us. The most common form ar &lt;em&gt;dynamic libraries&lt;/em&gt;. With the &lt;tt&gt;ldd&lt;/tt&gt;(1) utility, you case see which ones your application uses. For example, for &lt;tt&gt;modest&lt;/tt&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[sbox-CHINOOK_X86: ~] &gt; ldd /usr/local/bin/modest &lt;br /&gt; linux-gate.so.1 =&gt;  (0xffffe000)&lt;br /&gt; libgtkhtml-3.8.so.15 =&gt; /usr/lib/libgtkhtml-3.8.so.15 (0xf7ef9000)&lt;br /&gt; libtinymail-gnomevfs-1.0.so.0 =&gt; /usr/local/lib/libtinymail-gnomevfs-1.0.so.0 (0xf7ef6000)&lt;br /&gt; libtinymail-maemo-1.0.so.0 =&gt; /usr/local/lib/libtinymail-maemo-1.0.so.0&lt;br /&gt;.... (69 others) ....&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, when we start modest, we must load these libraries. Suppose, somewhere in the code, we have:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    magic_check = gtk_check_button_new_with_label ("Enable magic"); &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When starting the program, the &lt;a href="http://en.wikipedia.org/wiki/Dynamic_linker" &gt;dynamic linker&lt;/a&gt; will now have to figure out at what memory location &lt;tt&gt;gtk_check_button_new_with_label&lt;/tt&gt;, is to be found. And not just that function... if we look at &lt;tt&gt;modest&lt;/tt&gt;, we can find the number of external function (or more general, &lt;em&gt;symbols&lt;/em&gt;), with the &lt;tt&gt;nm&lt;/tt&gt;(1) utility:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[sbox-CHINOOK_X86: ~] &gt; nm -u /usr/local/bin/modest &lt;br /&gt;(...)&lt;br /&gt;         U gtk_check_button_new_with_label&lt;br /&gt;         U gtk_check_menu_item_get_active&lt;br /&gt;         U gtk_check_menu_item_get_type&lt;br /&gt;         U gtk_check_menu_item_set_active&lt;br /&gt;         U gtk_clipboard_get&lt;br /&gt;(...)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In total, there are are almost 1300 external symbols in just &lt;tt&gt;modest&lt;/tt&gt;; and this is only a fraction of the total, as GTK+ will have a lot of external symbols as well (think Glib, Pango, ...). In total, there will be many thousands. Without going into the details, it takes a significant amount of time to do the symbol lookup. Even on a fast desktop machine it can cause noticeable delays (esp. for C++), and more so on 770/N8x0.&lt;br /&gt;&lt;p&gt;Another factor that affects application startup significantly is &lt;em&gt;initialization&lt;/em&gt;: in GTK+-based applications, e.g. &lt;tt&gt;gtk_init&lt;/tt&gt; takes quite some time. In particular, applying the GTK-theme is slow on 770/N8x0, because the default theme file (&lt;tt&gt;gtkrc&lt;/tt&gt;) is &lt;strong&gt;huge&lt;/strong&gt;: the default theme on Ubuntu ("&lt;em&gt;Human&lt;/em&gt;") contains &lt;strong&gt;242 lines&lt;/strong&gt;, but on my N810 default theme has &lt;strong&gt;7046 lines&lt;/strong&gt;, on much slower hardware. And note that the theme is very picture-heavy, and many little images must be loaded. To get an idea of how much work must be done you can use &lt;tt&gt;strace&lt;/tt&gt;(1) when starting an application... scary stuff.&lt;br /&gt;&lt;p&gt;And finally, another slowdown is the physical loading of all these libraries into memory. This will typically only happen the first time, as Linux will keep the data around as long as there is enough memory &lt;small&gt;(note, for testing, you can &lt;a href="http://linux-mm.org/Drop_Caches" &gt;force a flush&lt;/a&gt; with &lt;tt&gt;echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/tt&gt;)&lt;/small&gt;. &lt;br /&gt;&lt;h3&gt;i remember now, i remember how it started&lt;/h3&gt;&lt;br /&gt;What can we do about all this slowness? Enter &lt;tt&gt;maemo-launcher&lt;/tt&gt;.&lt;br /&gt;&lt;p&gt;Maemo-launcher is a daemon that loads common libraries at startup, does a &lt;tt&gt;gtk_init&lt;/tt&gt; for you, and as such, the price for doing all this work (as explained above) is only paid once. Your actual application is compiled as a dynamic library. When your application is started, maemo-launcher forks, this dynamic library is loaded, and we jump to straight to its &lt;em&gt;main&lt;/em&gt;-function. This totally gets rid of the initializations, theme loading and such mentioned above, and saves quite some startup time. &lt;br /&gt;&lt;p&gt;How much are the improvements you can expect? &lt;a href="http://blogs.gnome.org/johannes/2007/03/09/maemo-launcher-performance-test/" &gt;Johannes Schmid did some testing&lt;/a&gt;, and found improvements of about &lt;strong&gt;25%&lt;/strong&gt; for small programs. Some non-scientific testing for modest shows that the startup-time is 1-2 seconds faster. Does that matter? Well, let's look at our 10 million ;-)  modest users, all of them starting modest once a day. With a 1 second improvement, &lt;strong&gt;every day&lt;/strong&gt; we save almost &lt;strong&gt;4 months&lt;/strong&gt; of time! Jokes aside, application startup times are very visible to users, and really determine whether they consider your software fast and snappy, or huge and slow; it's time well spent trying to improve that.&lt;br /&gt;&lt;h3&gt;parting thoughts&lt;/h3&gt;&lt;br /&gt;For a very practical way of how to get maemo-launcher working with your program, see the &lt;a href="http://maemomm.garage.maemo.org/docs/tutorial/html/ch07.html" &gt;Appendix of the MaemoMM-tutorial&lt;/a&gt;. It also shows how to add additional libraries to the set loaded and initialized by maemo-launcher. Recommended reading. &lt;br /&gt;&lt;p&gt;Note; &lt;tt&gt;nm&lt;/tt&gt; as shown above does not work with &lt;em&gt;stripped&lt;/em&gt; binaries (i.e. the binaries of which the symbol got removed). And unless you compile everything yourself, most of the binaries on your system will be stripped. However, you can still get much of the information with &lt;tt&gt;objdump -R&lt;/tt&gt;; however, it it's not equivalent to &lt;tt&gt;nm -u&lt;/tt&gt;, and will contain some non-external symbols.&lt;br /&gt;&lt;p&gt;Finally, this is the kind of post that could contain embarrassing factual errors :-) please check the comments for updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-8174272123499734592?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/8174272123499734592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=8174272123499734592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8174272123499734592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8174272123499734592'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/02/be-quick-or-be-dead.html' title='be quick or be dead'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_kGFGcbwevHE/R7gU_55freI/AAAAAAAAAOs/hH_3vF72560/s72-c/screenshot-2008-02-17-13-04-51.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-4623212176133877148</id><published>2008-01-26T14:34:00.001+02:00</published><updated>2008-01-26T16:26:14.585+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtd'/><title type='text'>battle against time</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R5so-OEtyTI/AAAAAAAAAOM/3KpUD_aK61g/s1600-h/emaildrown.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R5so-OEtyTI/AAAAAAAAAOM/3KpUD_aK61g/s400/emaildrown.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5159762847477909810" /&gt;&lt;/a&gt;&lt;br /&gt;Like many people, I get &lt;em&gt;a lot&lt;/em&gt; of e-mail every day, and I spend a very substantial part of my time processing them. In order to keep things under control, I'm following a number of practices, which I'll describe in the following. As with most good ideas, it's not my own idea -- it's inspired by a time-management method called &lt;em&gt;Getting Things Done&lt;/em&gt; (GTD). More about that later.&lt;br /&gt;&lt;h3&gt;inbox zero&lt;/h3&gt;&lt;br /&gt;So how to become in control of our e-mail again (instead of the other way around)?&lt;br /&gt;&lt;p&gt;The most important rule here is that we should always &lt;em&gt;end the  working day with an &lt;strong&gt;empty inbox&lt;/strong&gt;&lt;/em&gt;. Fantastic as that may sound, it's really the key here. So, how do we do that?&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;At least &lt;strong&gt;once a day&lt;/strong&gt; (and before leaving the office), review the messages in your inbox. For each message, decide what to do with it:&lt;br /&gt;  &lt;ol&gt;&lt;br /&gt;    &lt;li&gt;If it requires some action:&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;if it takes less than two minutes: &lt;strong&gt;do it now&lt;/strong&gt;;&lt;br /&gt;      &lt;li&gt;If someone else can better handle it: &lt;strong&gt;delegate&lt;/strong&gt; (forward) &lt;strong&gt;it&lt;/strong&gt;;&lt;br /&gt;      &lt;li&gt;otherwise, &lt;strong&gt;move it&lt;/strong&gt; to a folder &lt;em&gt;NextActions&lt;/em&gt;;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;    &lt;li&gt;If might be interesting or important later, &lt;strong&gt;archive it&lt;/strong&gt;&lt;br /&gt;    &lt;li&gt;Otherwise, it's just crap -  &lt;strong&gt;delete it&lt;/strong&gt;.&lt;br /&gt;  &lt;/ol&gt;&lt;br /&gt;  &lt;li&gt;After this review round, your inbox will be &lt;strong&gt;empty&lt;/strong&gt;. No message stays behind - look at them, and  decide where to move them.&lt;br /&gt;  &lt;li&gt;Now, periodically check your &lt;em&gt;NextActions&lt;/em&gt;, take the necessary actions, and move messages to your archive after completing them. &lt;small&gt;(I've found that maybe only one-third of my incoming e-mail end up in &lt;em&gt;NextActions&lt;/em&gt;)&lt;/small&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;That's all there's to it. Following these simple rules, it will be much easier to deal with lots of e-mail. If you have 250 e-mails in your inbox, some of which are weeks old, it's really hard &lt;em&gt;not&lt;/em&gt; to forget something important; also, it costs a lot of time to scan those same messages again and again &lt;small&gt;(I'd say handling a mailbox with &lt;em&gt;n&lt;/em&gt; mails has at least &lt;em&gt;O(n&lt;sup&gt;2&lt;/sup&gt;)&lt;/em&gt; complexity :-)&lt;/small&gt;.&lt;br /&gt;&lt;p&gt;Of course, this is just a starting point; you could add &lt;em&gt;WaitingFor&lt;/em&gt;-folder with a copy of mails you delegated (forwarded) for tracking. You could somehow add the calendar. You can add other to-do items. You could think of some smart way to manage those items in &lt;em&gt;NextActions&lt;/em&gt;. And so on... All of those things are discussed in &lt;em&gt;GTD&lt;/em&gt;.&lt;br /&gt;&lt;h3&gt;gtd&lt;/h3&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Getting_Things_Done" &gt;&lt;em&gt;Getting Things Done&lt;/em&gt;&lt;/a&gt; (GTD) is David Allen's method of time management, which deals with much more than just e-mail. The steps above are a sort-of &lt;em&gt;GTD-light&lt;/em&gt; that works very well for my e-mail. Anyway, I can really recommend the &lt;a href="http://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity/dp/0142000280/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1200763434&amp;sr=8-1" &gt;GTD-book&lt;/a&gt; for anyone interested in time-management. It's a rare gem in the sea of 'personal-productivity' books. Read an overview on the &lt;a href="http://www.43folders.com/2004/09/08/getting-started-with-getting-things-done" &gt;43 Folders&lt;/a&gt;-website, or their excellent article on &lt;a href="http://inboxzero.com" &gt;inboxzero&lt;/a&gt;, which has lots of additional tips.&lt;br /&gt;&lt;p&gt;I've been using GTD (and especially these e-mail handling practices) for quite a while now, and it has really saved me &lt;em&gt;a lot&lt;/em&gt; of time and frustration. I'm quite sure this will work for a lot of people; but of course, the only way to really find out is to try it out yourself. On the internet, GTD enjoys an almost cult-like following on the web - don't let that scare you away. Just be skeptical, and use what works for you.&lt;br /&gt;&lt;h3&gt;epilogue: gtd on n8x0&lt;/h3&gt;&lt;br /&gt;You could implement quite a bit of this on your N8x0 and (surprise) &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;, and I have done so quite succesfully. What's still missing is some calendar integration, and an easy way to handle (search through) huge archives of messages. Anyway, being so mobile, the N810 with modest has become a great productivity tool for me.&lt;br /&gt;&lt;p&gt;One geeky alternative would be to use &lt;a href="http://emacswiki.org" &gt;Emacs&lt;/a&gt;; people like &lt;a href="http://sachachua.com/wp/2007/12/28/emacs-getting-things-done-with-org-basic/" &gt;Sacha Chua&lt;/a&gt; and &lt;a href="http://pigpog.com/node/1974" &gt;others&lt;/a&gt; have written a lot about using Emacs for &lt;em&gt;Getting Things Done&lt;/em&gt;. Now all we need is to &lt;a href="http://djcbflux.blogspot.com/2007/12/maemacs.html" &gt;port emacs to the N810&lt;/a&gt; -- project &lt;a href="https://garage.maemo.org/projects/maemacs" &gt;maemacs&lt;/a&gt; to the rescue! Or maybe someone could make an N8x0 version of &lt;a href="http://chandlerproject.org/" &gt;&lt;em&gt;Chandler&lt;/em&gt;&lt;/a&gt;? (unfortunately, &lt;a href="http://www.dreamingincode.com/" &gt;the book&lt;/a&gt; is still better than the program).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-4623212176133877148?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/4623212176133877148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=4623212176133877148' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4623212176133877148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4623212176133877148'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/01/battle-against-time.html' title='battle against time'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R5so-OEtyTI/AAAAAAAAAOM/3KpUD_aK61g/s72-c/emaildrown.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-7105187973302486174</id><published>2008-01-19T14:16:00.000+02:00</published><updated>2008-01-26T16:26:44.480+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>kill 'em all</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R5HqcdnmBuI/AAAAAAAAAOE/BtckWbC0U-M/s1600-h/rupertn810.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R5HqcdnmBuI/AAAAAAAAAOE/BtckWbC0U-M/s400/rupertn810.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5157160823023863522" /&gt;&lt;/a&gt;&lt;br /&gt;The last few weeks, we were suffering some instability in our beloved &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt; e-mail client. At specific time as well as randomly, &lt;tt&gt;modest&lt;/tt&gt; would decide to call it a day, and prematurely return its &lt;tt&gt;pid&lt;/tt&gt; to the rightful owner. Bug reports are not always enough to pinpoint the problem (which might be outside modest) and it's easy to be misled in some direction. We spent quite some time with the various tools at our disposal. All have their specific strengths and weaknesses, so we tend to use them combined. Let's discuss some of them.&lt;br /&gt;&lt;h3&gt;gdb&lt;/h3&gt;First, there is the venerable &lt;tt&gt;&lt;a href="http://en.wikipedia.org/wiki/Gdb"&gt;gdb&lt;/a&gt;&lt;/tt&gt;. Although armchair computer scientists snuff at the use of debuggers, down here in the trenches, it's often our last hope. Using &lt;tt&gt;gdb&lt;/tt&gt; effectively takes time, and various extra difficulties (scratchbox, the ARM architecture) can make it a frustrating activity. And for people used to graphical debuggers (like the one in &lt;em&gt;Visual Studio&lt;/em&gt;), &lt;tt&gt;gdb&lt;/tt&gt; might seem a bit spartan, even when using something like &lt;a href="http://www.emacswiki.org/cgi-bin/wiki/GdbMode" &gt;GdbMode in Emacs&lt;/a&gt;. But once you've become friends with gdb, it's an incredible powerful tool, which even works on your N8x0.&lt;br /&gt;&lt;p&gt;As a small tip, in OS2008/Chinook provides the &lt;tt&gt;maemo-debug-scripts&lt;/tt&gt; package, which (among others) offers &lt;tt&gt;native-gdb&lt;/tt&gt;. I'm not sure what's so 'native' about it, but it provides gdb 6.6, which works &lt;strong&gt;much&lt;/strong&gt; better than the apparently 'non-native' gdb 6.4, especially with threaded code. It's not clear to me why the ancient 6.4 is shipped in the first place, but there's probably a good reason. Read more about it &lt;a href="http://maemo.org/development/documentation/how-tos/4-x/maemo_debugging_guide.html" &gt;here&lt;/a&gt;, which has a lot of very practical tips.&lt;br /&gt;&lt;h3&gt;valgrind&lt;/h3&gt;Then we have &lt;a href="http://en.wikipedia.org/wiki/Valgrind" &gt;valgrind&lt;/a&gt; (pronounced &lt;em&gt;vel-grinned&lt;/em&gt;). Compared to &lt;tt&gt;gdb&lt;/tt&gt;, which is like a brain surgeon, &lt;tt&gt;valgrind&lt;/tt&gt; resembles a tax auditor (hurray!), with bytes in your RAM as the currency. Valgrind runs your program in a virtual machine, which offers replacements for the normal memory-management functions (&lt;tt&gt;malloc&lt;/tt&gt;, &lt;tt&gt;free&lt;/tt&gt; and friends). When running with valgrind, the application uses valgrind's replacements. And unlike the normal ones, valgrind's versions carefully checks where you get your memory from and what you do with it, and whether you free it when you're done with it.&lt;br /&gt;&lt;p&gt;It's an extremely useful tool for finding memory errors that occur during runtime. One weak point of valgrind is that it doesn't run on ARM; but still, it's a great way to find memory corruptions, leaks and so on, which will show up on X86 as well. Any kind of memory error found on X86 corresponds quite likely to a crash on ARM.&lt;br /&gt;&lt;p&gt;Note that I've only talked about the 'memcheck' tool inside valgrind; there are many more, such as &lt;em&gt;cachegrind&lt;/em&gt;, &lt;em&gt;massif&lt;/em&gt; and the new &lt;em&gt;&lt;a href="http://live.gnome.org/iogrind" &gt;iogrind&lt;/a&gt;&lt;/em&gt;, which are great for profiling your code.&lt;br /&gt;&lt;p&gt;A &lt;em&gt;relatively recent&lt;/em&gt; version of &lt;tt&gt;valgrind&lt;/tt&gt; is available in the OS2008/Chinook repositories. &lt;br /&gt;&lt;h3&gt;static checking&lt;/h3&gt;Except from these runtime tools, there are some other ones, which work at the static, source-code level. There are things like Coverity and &lt;tt&gt;lint&lt;/tt&gt;, but in my (limited) experience, they only catch a small number of problems much that weren't also caught by &lt;tt&gt;gcc&lt;/tt&gt; with &lt;tt&gt;-Wall -Werror&lt;/tt&gt; + valgrind/gdb. Still, it's quite attractive to use any kind of bug prevention you can get your hands on. And let's not forget one of the most important tools: careful code review. Finding some critical part of code, and then simply reading it, letting the statements play out in your mind, and imagining the interactions. The human mind is the greatest debugging tool of all &lt;small&gt;(and a pretty good bug-introduction tool too... )&lt;/small&gt;&lt;br /&gt;&lt;p&gt;Now, I hope you can find a bright mind somewhere yourself... Regarding &lt;tt&gt;gcc&lt;/tt&gt;, version 3.4.4 is available in OS2008/Chinook, but modest can be compiled as well (outside scratchbox) with gcc 4.2, using &lt;a href="https://wiki.ubuntu.com/EmbeddedUbuntu" &gt;Ubuntu Embedded&lt;/a&gt;, or the rudimentary gnome-frontend. Compiling there, and on a 64-bit architecture, helped to fix some issues as well. And the newer gcc is much better at detecting with &lt;tt&gt;-Wall&lt;/tt&gt;. &lt;br /&gt;&lt;h3&gt;so far, so good... so what&lt;/h3&gt;Now, even with all these tools, I can promise that there are still some bugs left in modest. But also that there are quite a few less. So please get your latest update at the usual place (the application manager). If you find any kind of instability, please file bugs at the &lt;a href="http://bugs.maemo.org" &gt;usual place&lt;/a&gt;, and please describe as detailed as possible what you were doing -- thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-7105187973302486174?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/7105187973302486174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=7105187973302486174' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7105187973302486174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7105187973302486174'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/01/kill-em-all.html' title='kill &apos;em all'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R5HqcdnmBuI/AAAAAAAAAOE/BtckWbC0U-M/s72-c/rupertn810.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-2761907085429758355</id><published>2008-01-06T16:21:00.000+02:00</published><updated>2008-01-06T21:44:54.559+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>keep on rockin' in the free world</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R4DtgtnmBtI/AAAAAAAAAN8/pqRUSSlA2Fk/s1600-h/screenshot-2008-01-06-17-00-54.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R4DtgtnmBtI/AAAAAAAAAN8/pqRUSSlA2Fk/s400/screenshot-2008-01-06-17-00-54.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5152379119969109714" /&gt;&lt;/a&gt;&lt;br /&gt;Ok, I guess it's still in time to wish people a happy new year. Apart from the obligatory sessions of eating, drinking and reconnecting with my inner-child, Christmas has been a great time to enrich the internal uranium, and I feel full of &lt;sup&gt;235&lt;/sup&gt;U again. I'm sure I'll need plenty of it in the new year. So, once more, &lt;strong&gt;best wishes to all&lt;/strong&gt;, at let's make the world a better place in 2008.&lt;br /&gt;&lt;p&gt;One thing to get there is of course is to polish that raw diamond that we call &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;. I've been quite happy with the progress we've made since our b&amp;egrave;ta less than &lt;a href="http://djcbflux.blogspot.com/2007/12/automatic-for-people.html" &gt;one month ago&lt;/a&gt;. We've closed quite a number of bugs, and made steady improvements in performance and the handling of specific emails and mail servers. And we've been making frequent releases, roughly every week. If you're using these weekly updates, you might not necessarily see so much difference between versions, depending  of course on your particular use case. But believe me when I say that we are not sitting still :)&lt;br /&gt;&lt;p&gt;Anyhow, there are a couple of problems we're looking into now:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;first, performance problems with &lt;em&gt;really big&lt;/em&gt; folders (ie., many thousands of mails). We're trying to come up with a solution, but it's not easy (as is the case with most interesting things in life). Please bear with us;&lt;br /&gt;  &lt;li&gt;second, problems with specific servers. Here you can help us! We're testing modest with different &lt;tt&gt;POP&lt;/tt&gt;/&lt;tt&gt;IMAP&lt;/tt&gt;/&lt;tt&gt;SMTP&lt;/tt&gt; servers. But, there are &lt;strong&gt;many more&lt;/strong&gt; different ones in the world, with a wide variety of versions, configurations - a combinatorial explosion.  If your server doesn't play nice with modest, please file &lt;a href="http://bugs.maemo.org" &gt;bugs&lt;/a&gt; with all the details (server, version, configuration,...). Also, &lt;strong&gt;protocol traces&lt;/strong&gt; or PCAP-files (tcpdump/wireshark) are very useful, as are &lt;strong&gt;test accounts&lt;/strong&gt;. Remember, if we cannot reproduce it, we probably can't fix it. If there's information you don't want to share with &lt;a href="http://bugs.maemo.org" &gt;bugs.maemo.org&lt;/a&gt;, you may also &lt;a href="mailto:dirk-jan.binnema-at-nokia.com" &gt;mail me directly&lt;/a&gt;. That does require you to trust me, though.&lt;br /&gt;  &lt;li&gt;finally, we've seen some problems with rare emails not being shown correctly. Again, if you get such an email, please file a bug, and attach the email (after stripping it of any privacy-sensitive information of course).&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Anyhow, for the large majority of users, modest seems to be working quite nicely; if you haven't tried it yet, I invite you to give modest &lt;a href="http://modest.garage.maemo.org/repos/modest-chinook.install" &gt;a try&lt;/a&gt;, and tell us what you think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-2761907085429758355?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/2761907085429758355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=2761907085429758355' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2761907085429758355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/2761907085429758355'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2008/01/keep-on-rockin-in-free-world.html' title='keep on rockin&apos; in the free world'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R4DtgtnmBtI/AAAAAAAAAN8/pqRUSSlA2Fk/s72-c/screenshot-2008-01-06-17-00-54.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-7228228504833542884</id><published>2007-12-21T22:35:00.000+02:00</published><updated>2008-01-26T16:27:08.054+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><title type='text'>it was a very good year</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kGFGcbwevHE/R2wj79nmBsI/AAAAAAAAAN0/Y9B1V5Gjrtc/s1600-h/roadtonowhere.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_kGFGcbwevHE/R2wj79nmBsI/AAAAAAAAAN0/Y9B1V5Gjrtc/s400/roadtonowhere.jpg" alt="" id="BLOGGER_PHOTO_ID_5146527987237521090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(and it's not even over yet)&lt;p&gt;&lt;br /&gt;The end is nigh - the shortest day of the year. Next week, I'll be spending some time in the lovely city of &lt;a href="http://en.wikipedia.org/wiki/Amsterdam"&gt;Amsterdam&lt;/a&gt;, enjoying various Christmas-related &lt;a href="http://www.bmj.com/cgi/content/full/330/7482/85"&gt;festivities&lt;/a&gt;. No matter how nice it is here, it will be good to leave Helsinki behind for a couple of days, and do something &lt;em&gt;different&lt;/em&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;At last, the &lt;a href="http://tablets-dev.nokia.com/nokia_N810.php"&gt;OS2008-images&lt;/a&gt; have been published. A &lt;strong&gt;big&lt;/strong&gt; improvement, I should say, and there should be little reason &lt;strong&gt;not&lt;/strong&gt; to upgrade... &lt;strong&gt;One more reason&lt;/strong&gt; to upgrade, is that you can then install modest :-) Just this afternoon, we've published updated packages. I also look forward to play with &lt;a href="http://openbossa.indt.org.br/canola2/"&gt;Canola2&lt;/a&gt;, created by those talented Brazilians. It would be even better if they could release it under the GPL, as has been &lt;a href="http://www.maemoapps.com/2007/12/02/canola2-teaser/"&gt;suggested&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Yes¸&lt;a href="http://modest.garage.maemo.org/"&gt;modest&lt;/a&gt;... Even though our public &lt;a href="http://djcbflux.blogspot.com/2007/12/automatic-for-people.html"&gt;public bèta&lt;/a&gt; is not even &lt;em&gt;two weeks&lt;/em&gt; old, we have a &lt;em&gt;lot&lt;/em&gt; to look back on. It's been an incredible year, even just looking at the modest-microcosmos. I am very proud of the the team, a group of truly amazing individuals. Nevertheless, we won't rest on our laurels, and look &lt;strong&gt;forward&lt;/strong&gt;. The latest release (Friday 21.12) should be the &lt;strong&gt;best so far&lt;/strong&gt;, and will also be the &lt;strong&gt;last of 2007&lt;/strong&gt;. As I said before, if you find bugs, or feel something is missing: please visit &lt;a href="https://bugs.maemo.org/"&gt;bugs.maemo.org&lt;/a&gt; (component: &lt;tt&gt;Communication/Modest&lt;/tt&gt;). We've already cleared up quite some of the issues that were reported - your voices &lt;strong&gt;are&lt;/strong&gt; being heard! In 2008 we will return with our batteries fully recharged...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Merry Christmas to All!&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-7228228504833542884?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/7228228504833542884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=7228228504833542884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7228228504833542884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7228228504833542884'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/it-was-very-good-year.html' title='it was a very good year'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kGFGcbwevHE/R2wj79nmBsI/AAAAAAAAAN0/Y9B1V5Gjrtc/s72-c/roadtonowhere.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-6143884648699123550</id><published>2007-12-17T21:49:00.000+02:00</published><updated>2008-01-26T16:27:28.968+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='rss'/><title type='text'>feed the world</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/R2bTM9nmBqI/AAAAAAAAANk/b1KOhT7itv0/s1600-h/modestfeed.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/R2bTM9nmBqI/AAAAAAAAANk/b1KOhT7itv0/s400/modestfeed.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5145031843969894050" /&gt;&lt;/a&gt;Yet another &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;-post. We received a lot of feature requests and a handful of bugs after our &lt;a href="http://blogs.igalia.com/dape/2007/12/17/modest-time-for-feedback/" &gt;repeated&lt;/a&gt; &lt;a href="http://djcbflux.blogspot.com/2007/12/take-chance-on-me.html" &gt;requests&lt;/a&gt;. We're working hard on fixing the bugs, and let's see what we can do with the feature requests. It's not easy to find the right balance between keeping things simple and, on the other hand, adding features that people ask for. Being a long-time &lt;a href="http://www.mutt.org" &gt;mutt&lt;/a&gt; and &lt;a href="http://www.emacswiki.org" &gt;emacs&lt;/a&gt; user, I have some troubles keeping things simple &amp; easy. But hey, nobody said it was easy.  &lt;br /&gt;&lt;p&gt;Let's discuss something that I found quite useful: reading feeds with &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt;.&lt;br /&gt;&lt;p&gt; I like reading &lt;a href="http://en.wikipedia.org/wiki/Web_feed"&gt;feeds&lt;/a&gt;; whenever I need to wait for something (e.g. waiting for the food during a romantic dinner), I like to read something interesting - software, science, culture, whatever. Now, while there is a feedreader on my N810, &lt;em&gt;obviously&lt;/em&gt; I'd prefer to use &lt;a href="http://modest.garage.maemo.org" &gt;modest&lt;/a&gt; for that.&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R2bTsNnmBrI/AAAAAAAAANs/C8-2IFoROnQ/s1600-h/modestfeed2.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R2bTsNnmBrI/AAAAAAAAANs/C8-2IFoROnQ/s400/modestfeed2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5145032380840806066" /&gt;&lt;/a&gt;Well, that's perfectly possible using &lt;a href="http://home.gna.org/feed2imap/" &gt;feed2imap&lt;/a&gt;. I am assuming a Ubuntu/Debian system here, but it should work for other systems as well, &lt;em&gt;mutatis mutandis&lt;/em&gt;.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;install &lt;tt&gt;feed2imap&lt;/tt&gt; and &lt;tt&gt;libopenssl-ruby&lt;/tt&gt; on your system;&lt;br /&gt;  &lt;li&gt;create a &lt;tt&gt;~/.feed2imaprc&lt;/tt&gt; file, it should look something like this (assuming you're using Gmail/IMAP):&lt;br /&gt;  &lt;pre&gt;&lt;br /&gt;feeds: &lt;br /&gt;- name: Planet Maemo&lt;br /&gt;  url: http://maemo.org/news/planet-maemo/rss.xml&lt;br /&gt;  target: imaps://someuser%40gmail.com:somepassword@imap.gmail.com/feeds/software&lt;br /&gt;- name: Ririan Project&lt;br /&gt;  url: http://ririanproject.com/feed/&lt;br /&gt;  target: imaps://someuser%40gmail.com:somepassword@imap.gmail.com/feeds/misc&lt;br /&gt;- name: Boing Boing&lt;br /&gt;  url: http://www.boingboing.net/atom.xml&lt;br /&gt;  target: imaps://someuser%40gmail.com:somepassword@imap.gmail.com/feeds/misc&lt;br /&gt;- name: ScienceDaily Headlines&lt;br /&gt;  url: http://www.sciencedaily.com/newsfeed.xml&lt;br /&gt;  target: imaps://someuser%40gmail.com:somepassword@imap.gmail.com/feeds/science&lt;br /&gt;  &lt;/pre&gt;&lt;br /&gt;  Obviously, you'll have to change the username/password;&lt;br /&gt;  &lt;li&gt;&lt;strong&gt;Note&lt;/strong&gt;: if your are already using a different feedreader (such as Liferea), you can export your existing feedlist to an &lt;tt&gt;.opml&lt;/tt&gt;-file. You can then convert this to a config file for &lt;tt&gt;feed2imap&lt;/tt&gt;: &lt;br /&gt;  &lt;pre&gt;$ feed2imap-opmlimport ~/feedlist.opml &gt; ~/.feed2imaprc&lt;/pre&gt;&lt;br /&gt;  (you'll have to hand-edit it a bit as above)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;That's it! Now you can periodically run &lt;tt&gt;feed2imap&lt;/tt&gt;, and you'll always have something interesting in your mailbox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-6143884648699123550?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/6143884648699123550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=6143884648699123550' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6143884648699123550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/6143884648699123550'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/feed-world.html' title='feed the world'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kGFGcbwevHE/R2bTM9nmBqI/AAAAAAAAANk/b1KOhT7itv0/s72-c/modestfeed.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-3546880882660284588</id><published>2007-12-15T00:40:00.000+02:00</published><updated>2007-12-16T16:09:53.652+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>take a chance on me</title><content type='html'>First, thanks for all the very positive feedback we got about our &lt;a href="http://djcbflux.blogspot.com/2007/12/automatic-for-people.html" &gt;initial  modest release&lt;/a&gt;. This was only the start, we'll be making frequent updates - the first one was already &lt;strong&gt;today&lt;/strong&gt;. If you face any particular problem, please let us know.&lt;br /&gt;&lt;p&gt;Some questions I saw in various places:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;&lt;em&gt;can I get it to work on OS2007?&lt;/em&gt; Well - in principle that should be possible, as we tried to keep the code backwards-compatible with the old API. In fact, some people claim to be happy users. However, we haven't tested that recently, and there might be some missing dependencies, so YMMV. But we'll be looking into this issue.&lt;br /&gt;  &lt;li&gt;&lt;em&gt;I'd really like modest to do &lt;em&gt;$FEATURE&lt;/em&gt;&lt;/em&gt;, but it doesn't do &lt;em&gt;$FEATURE&lt;/em&gt;. What can I do? Well, patches/suggestions are welcome; please discuss them on our &lt;a href="https://garage.maemo.org/mail/?group_id=9" &gt;mailing list&lt;/a&gt; first, or put them in &lt;a href="https://bugs.maemo.org/" &gt;Maemo Bugzilla&lt;/a&gt;;&lt;br /&gt;  &lt;li&gt;&lt;em&gt;how can I replace the official client with modest?&lt;/em&gt; There are some adventurous people out there... Modest might replace the current client at some stage, but right now, it's not really easy to do that.&lt;br /&gt;  &lt;li&gt;&lt;em&gt;where can I report bugs/feature requests?&lt;/em&gt; Please report them in &lt;a href="https://bugs.maemo.org/" &gt;Maemo Bugzilla&lt;/a&gt;, and make sure you use &lt;strong&gt;Communication/Modest&lt;/strong&gt; &lt;small&gt;(don't use Communications/Email, that's for the stock email client)&lt;/small&gt;. Please specificy as clearly as possible the problem, and how we could reproduce it. Some people already filed bugs there, and even better, some where &lt;strong&gt;already fixed&lt;/strong&gt;!&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;We're working very hard on fixing bugs and making other improvements. Modest is not perfect and there are bugs. But already, I am a quite happy modest-user myself. And feel inspired by &lt;a href="http://blogs.igalia.com/berto/2007/12/14/its-been-a-hard-days-night/" &gt;modest and Vagalume-hacker Berto&lt;/a&gt;, for the incredibly flattering words, especially on my birthday!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-3546880882660284588?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/3546880882660284588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=3546880882660284588' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3546880882660284588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3546880882660284588'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/take-chance-on-me.html' title='take a chance on me'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-3918879357388955132</id><published>2007-12-11T20:44:00.000+02:00</published><updated>2007-12-12T22:54:22.503+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>automatic for the people</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kGFGcbwevHE/R17ml0q0h-I/AAAAAAAAANc/Un7hrgXHslc/s1600-h/modestedit.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_kGFGcbwevHE/R17ml0q0h-I/AAAAAAAAANc/Un7hrgXHslc/s400/modestedit.png" alt="" id="BLOGGER_PHOTO_ID_5142801361971480546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Ok... the &lt;a href="http://modest.garage.maemo.org/"&gt;modest email&lt;br /&gt;client&lt;/a&gt; has been available for months, but finally today we're making downloadable packages available for OS2008/Chinook: &lt;a href="http://modest.garage.maemo.org/repos/modest-chinook.install"&gt;click here&lt;/a&gt;, or visit our website which has instructions.&lt;br /&gt;&lt;p&gt;That means that you don't have to compile things yourself anymore¸ but simply click &amp;amp; install - hurray!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Some important notes:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;this is an early &lt;strong&gt;bèta&lt;/strong&gt; which contains bugs; this is not production quality yet; we will be making frequent updates though;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;tt&gt;modest&lt;/tt&gt; will &lt;strong&gt;not&lt;/strong&gt; replace the official email client, and many things (like &lt;em&gt;search&lt;/em&gt; and &lt;em&gt;send-as-mail&lt;/em&gt;) use the official email client; new-mail notifications should work though;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;in the menus, &lt;tt&gt;modest&lt;/tt&gt; is called &lt;em&gt;'E-mail'&lt;/em&gt; and uses the same icon as the official email client does... be careful not to confuse the two;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;tt&gt;modest&lt;/tt&gt; works nicely with GMail (both IMAP and POP), just make sure you enable POP/IMAP in your GMail settings on the web, and use &lt;tt&gt;user@gmail.com&lt;/tt&gt; and not just &lt;tt&gt;user&lt;/tt&gt; as your user name.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_kGFGcbwevHE/R17cA0q0h9I/AAAAAAAAANU/TynEOxfVi5U/s1600-h/modest3000.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_kGFGcbwevHE/R17cA0q0h9I/AAAAAAAAANU/TynEOxfVi5U/s400/modest3000.png" alt="" id="BLOGGER_PHOTO_ID_5142789731200042962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Having said that, I feel very good about what we've accomplished so far. I'd like to &lt;strong&gt;thank&lt;/strong&gt; the talented hackers at &lt;a href="http://www.igalia.com/"&gt;Igalia&lt;/a&gt; for all their inspiration and perspiration (&lt;a href="http://www.igalia.com/news/modest"&gt;read the Igalia/modest news)&lt;/a&gt;, the inimitable &lt;a href="http://pvanhoof.be/blog"&gt;Philip Van Hoof&lt;/a&gt; for his work on &lt;a href="http://tinymail.org/"&gt;Tinymail&lt;/a&gt;. Also, the fine people at &lt;a href="http://www.openismus.com/"&gt;Openismus&lt;/a&gt; made important contributions, as did Vivek, Mox and many of my colleagues at Nokia in different areas.&lt;br /&gt;&lt;p&gt;In a &lt;a href="http://djcbflux.blogspot.com/2007/12/modest.html"&gt;previous blog entry&lt;/a&gt;, I already discussed some of the features &lt;tt&gt;modest&lt;/tt&gt; offers. I think it's pretty cool. Maybe not as cool as &lt;a href="http://openbossa.indt.org.br/canola2/"&gt;Canola2&lt;/a&gt;, but definitely a lot better for reading/writing email :-)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Remember, &lt;tt&gt;modest&lt;/tt&gt; is 100% open source software, released under a BSD-like license. It's not perfect, but we're working hard to make it the &lt;strong&gt;best&lt;/strong&gt; mobile e-mail client. Patches are welcome, as are suggestions -- post them  on the &lt;a href="https://garage.maemo.org/tracker/?atid=112&amp;amp;group_id=9&amp;amp;func=browse"&gt;feature request tracker&lt;/a&gt;. Even bugs are welcome in &lt;a href="https://bugs.maemo.org/" &gt;Maemo Bugzilla&lt;/a&gt;, and make sure you use &lt;strong&gt;Communication/Modest&lt;/strong&gt; (don't use Communications/Email, that's for the stock email client). Specificy as clearly as possible the problem, and how we could reproduce it, thanks.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In some future blog entries I will discuss various cool features in Modest, but try it out yourself, and let us know what you think!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-3918879357388955132?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/3918879357388955132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=3918879357388955132' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3918879357388955132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/3918879357388955132'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/automatic-for-people.html' title='automatic for the people'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_kGFGcbwevHE/R17ml0q0h-I/AAAAAAAAANc/Un7hrgXHslc/s72-c/modestedit.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-8987385367546866225</id><published>2007-12-08T01:46:00.000+02:00</published><updated>2007-12-08T23:58:11.100+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lastfm'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>beyond the dark sun</title><content type='html'>Friday -- another week has flown by. Winter has not really entered Finland yet, there's just ultragray autumn weather, a lots rain, few hours of daylight, not even some Finnish &lt;a href="http://www.wintermadness.net/Media/Wintersun%20Medley%201.mp3"&gt;wintersun&lt;/a&gt;... But thankfully, my moods are not very dependent on the weather, and I am happily hacking away still.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Googler &lt;a href="http://steve-yegge.blogspot.com/"&gt;Steve Yegge&lt;/a&gt; is blogging about combining &lt;a href="http://steve-yegge.blogspot.com/2007/12/boring-stevey-status-update.html"&gt;Javascript and Emacs&lt;/a&gt;. Naturally, I am interested in just about &lt;em&gt;anything&lt;/em&gt; combined with &lt;a href="http://en.wikipedia.org/wiki/Emacs"&gt;emacs&lt;/a&gt;, but this sounds quite interesting; not only about fully supporting &lt;a href="http://en.wikipedia.org/wiki/JavaScript"&gt;javascript&lt;/a&gt; in emacs, but actually being able to write extensions in javascript (instead of elisp). Apparently, he already implemented a full javascript interpreter in elisp. Very cool... but show us the code!&lt;br /&gt; &lt;/li&gt;&lt;li&gt;I've been playing with Alberto Garcia's LastFM-client &lt;a href="http://blogs.igalia.com/berto/2007/11/21/vagalume-03-now-with-some-images-too/"&gt;Vagalume&lt;/a&gt;; it works very nice on my N810 (versions for 770, N800 are available). &lt;a href="http://last.fm/"&gt;last.fm&lt;/a&gt; is pretty cool anyways, but the &lt;tt&gt;vagalume&lt;/tt&gt; makes it work very smoothly. Obviously, I am &lt;tt&gt;hdbngr&lt;/tt&gt; there :-)&lt;br /&gt; &lt;/li&gt;&lt;li&gt;We've been working on the downloadable packages for the &lt;a href="http://modest.garage.maemo.org/"&gt;modest&lt;/a&gt; email client, it's almost done, stay tuned.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Said goodbye to my friend &lt;a href="http://andreambro.blogspot.com/"&gt;Andrea&lt;/a&gt;, who's going back to Italy. I'll miss him as a person and as a great host for Italian food... At least he will be in good hands there. &lt;em&gt;Arrivederci&lt;/em&gt;!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-8987385367546866225?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/8987385367546866225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=8987385367546866225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8987385367546866225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/8987385367546866225'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/friday-blues.html' title='beyond the dark sun'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-7730427751031709096</id><published>2007-12-04T23:11:00.000+02:00</published><updated>2007-12-12T12:22:02.717+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='maemo'/><title type='text'>NM156</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_kGFGcbwevHE/R1XDRkq0h5I/AAAAAAAAAMw/7KsX0TKo-3U/s1600-h/sbemacs23.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_kGFGcbwevHE/R1XDRkq0h5I/AAAAAAAAAMw/7KsX0TKo-3U/s400/sbemacs23.png" alt="" id="BLOGGER_PHOTO_ID_5140229256381761426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's unwise to discuss politics or religion with strangers -- or even worse, discuss favourite &lt;a href="http://en.wikipedia.org/wiki/Text_editors"&gt;text editors&lt;/a&gt;... My personal favourite is &lt;a href="http://en.wikipedia.org/wiki/Emacs"&gt;GNU/Emacs&lt;/a&gt;. It took me some time to get familiar with this &lt;a href="http://artlung.com/smorgasborg/C_R_Y_P_T_O_N_O_M_I_C_O_N.shtml"&gt;thermonuclear word processor&lt;/a&gt;, but after that I found it a wonderful tool. You can actually run Emacs on your N8x0 - see the screenshot of &lt;a href="http://emacswiki.org/cgi-bin/wiki/XftGnuEmacs"&gt;Emacs 23&lt;/a&gt; from CVS. But that's not what I'd like to discuss here.&lt;br /&gt;&lt;p&gt;For &lt;a href="http://maemo.org/"&gt;maemo&lt;/a&gt; software development, many people seem to use a bunch of terminal windows inside and outside &lt;a href="http://www.scratchbox.org/"&gt;Scratchbox&lt;/a&gt;. Some alternatives exist, such as &lt;a href="http://www.cs.tut.fi/%7Elaika/"&gt;Laika, the Maemo-plugin for Eclipse&lt;/a&gt;, and work is apparently underway for &lt;a href="http://anjuta.sourceforge.net/"&gt;Anjuta&lt;/a&gt; as well.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Anyway, I've been coding using Emacs for almost a decade, so obviously I'd like to integrate it with the Maemo/Scratchbox-environment as well - and yes, it is possible to do the following:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Run Emacs &lt;strong&gt;outside&lt;/strong&gt; Scratchbox;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Compile &lt;strong&gt;inside&lt;/strong&gt; Scratchbox;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Jump to the right place in the source with one click from any compiler errors/warnings.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;How to get that to work? It's embarrasingly easy (once I figured it out):&lt;br /&gt;&lt;p&gt;First, make sure the same source code can be reached using the &lt;strong&gt;same path&lt;/strong&gt; both inside and outside Scratchbox, by using symlinks, for example:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;$ ln -s /scratchbox/users/djcb/home/djcb/src/my-app /home/djcb/src/my-app&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Having done that, it's easy to add some trivial Elisp to your &lt;tt&gt;.emacs&lt;/tt&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;;; compile inside scratchbox&lt;br /&gt;(defun scratchbox-c-mode-compile ()&lt;br /&gt;(interactive)&lt;br /&gt;(compile (concat "scratchbox make -C "&lt;br /&gt;               default-directory)))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's all. You can now edit your source code in your normal Linux environment, open a file in &lt;tt&gt;~/src/my-app/...&lt;/tt&gt;, and compile it with &lt;tt&gt;M-x scratchbox-c-mode-compile&lt;/tt&gt;. Or even better, use a keyboard macro (add to your &lt;tt&gt;.emacs)&lt;/tt&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(define-key c-mode-base-map (kbd "&amp;lt;f8&amp;gt;")  'scratchbox-c-mode-compile)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And pressing F8 is now enough to start compiling...&lt;br /&gt;&lt;p&gt;Now, what's a blog entry without some screenshot? Here's one, running Emacs 23 (from CVS) &lt;em&gt;inside&lt;/em&gt; Scratchbox - unrelated to what discussed above, but a nice picture anyway :)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Obligatory &lt;a href="http://www.djcbsoftware.nl/dot-emacs.html"&gt;dot-emacs&lt;/a&gt; link. Happy hacking!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-7730427751031709096?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/7730427751031709096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=7730427751031709096' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7730427751031709096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/7730427751031709096'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/maemacs.html' title='NM156'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_kGFGcbwevHE/R1XDRkq0h5I/AAAAAAAAAMw/7KsX0TKo-3U/s72-c/sbemacs23.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-304267073920548108.post-4770167667634195987</id><published>2007-12-03T17:00:00.000+02:00</published><updated>2007-12-08T23:49:51.562+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modest'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><title type='text'>revolution calling</title><content type='html'>After more than five years of &lt;a href="http://www.djcbsoftware.nl/ChangeLog"&gt;blogging in dutch&lt;/a&gt;, I'm expanding my blogging into anglo-saxon territories. Here, I won't go into my private life (the wild rock &amp;amp; roll lifestyle) so much, but instead discuss technology, productivity and so on. Not sure how interesting that is, but let's try...&lt;br /&gt;&lt;h2&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kGFGcbwevHE/R1KmVkq0h0I/AAAAAAAAAMM/hoR1hUGkows/s1600-R/gconv1.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_kGFGcbwevHE/R1KmVkq0h0I/AAAAAAAAAMM/bTb9RjngRA4/s400/gconv1.png" alt="" id="BLOGGER_PHOTO_ID_5139353014333900610" border="0" /&gt;&lt;/a&gt;modest&lt;/h2&gt;&lt;br /&gt;To start with something rather technical, I working on an email-program called &lt;a href="http://modest.garage.maemo.org/"&gt;modest&lt;/a&gt;. It's been in an experimental state for a long time -- but finally it's about ready for the &lt;em&gt;real world&lt;/em&gt;. It's a program designed specifically for &lt;a href="http://nokia.com/"&gt;Nokia&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/N800"&gt;N800&lt;/a&gt;/&lt;a href="http://en.wikipedia.org/wiki/N810"&gt;N810&lt;/a&gt; devices. Some people have &lt;a href="http://slashdot.org/article.pl?sid=07/11/17/2125206"&gt;already called&lt;/a&gt; e-mail 'obsolete' or 'something for old people', but I think that's a bit of an exaggeration - there is a whole universe of communication for which there is no better medium than email. Try applying for a job using IM or reading the monthly report in an SMS... &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Some information here; you might also be interested in the &lt;a href="http://www.slideshare.net/djcb/guadec2007-a-modest-email-client"&gt;GUADEC Presentation&lt;/a&gt; I did about Modest in Birmingham.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;mobile email improvements&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Now, there are a couple of problems with e-mail, in particular with &lt;em&gt;mobile&lt;/em&gt; email, but there's nothing we can't solve (I'm a born optimist!). Let's list some of the common problems and what to do about them:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Setting up accounts is #@&amp;amp;^%&amp;amp; hard&lt;/strong&gt; - modest makes this almost brainlessly easy, by including data for big email providers; setting up modest for, say, &lt;a href="http://gmail.com/"&gt;Gmail&lt;/a&gt; is trivial with the easy-setup wizard;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Using your fingers is hard&lt;/strong&gt; - why have that expensive touch-screen if you cannot even open mails with your greasy fingers? Modest provides big fingerable headers, so you can open that message from your boss, even as you're running for the meeting;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;I need that fancy stuff&lt;/strong&gt; - many mobile email clients only provide the bare minimum - what about having mailboxes with thousands of mails, push-email, IMAP-folders, rich-text reading/writing of mails, etc.?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Show me the code&lt;/strong&gt; - what kind of person would want to use an email-client if they cannot even read the source? :) Modest is fully open-source, and released under a BSD-like license.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;technical background&lt;/h3&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kGFGcbwevHE/R1Kl3Eq0hzI/AAAAAAAAAME/AITxfI5hBzQ/s1600-R/screenshot00.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_kGFGcbwevHE/R1Kl3Eq0hzI/AAAAAAAAAME/wweJYO7IaRk/s400/screenshot00.png" alt="" id="BLOGGER_PHOTO_ID_5139352490347890482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To achieve all this, &lt;tt&gt;modest&lt;/tt&gt; uses an email framework called &lt;a href="http://www.tinymail.org/"&gt;tinymail&lt;/a&gt;, which is the brainchild of &lt;a href="http://pvanhoof.be/blog"&gt;Philip Van Hoof&lt;/a&gt;.&lt;br /&gt;Tinymail provides a version of the &lt;a href="http://www.go-evolution.org/Camel"&gt;libcamel&lt;/a&gt; protocol library that is also used for the &lt;a href="http://www.go-evolution.org/"&gt;Evolution&lt;/a&gt; e-mail program. The tinymail-version is optimized for low-memory situations, and improves the protocol handling especially for the needs of mobile applications. I will discuss that in more detail in some future entry.&lt;br /&gt;Tinymail provides a nice object-oriented layer on top of all this, which allows for a lot of flexibility. I already wrote a bit about that last year in &lt;em&gt;Gnome Journal&lt;/em&gt;: &lt;a href="http://www.gnomejournal.org/article/49/tinymail-evolution-and-intelligent-design"&gt;&lt;em&gt;Tinymail: Evolution and Intelligent Design&lt;/em&gt;&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;So -- my first post. Stay tuned!&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/304267073920548108-4770167667634195987?l=djcbflux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://djcbflux.blogspot.com/feeds/4770167667634195987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=304267073920548108&amp;postID=4770167667634195987' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4770167667634195987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/304267073920548108/posts/default/4770167667634195987'/><link rel='alternate' type='text/html' href='http://djcbflux.blogspot.com/2007/12/modest.html' title='revolution calling'/><author><name>djcb</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_kGFGcbwevHE/R1Rgjkq0h3I/AAAAAAAAAMg/KLj-i9qWXGg/S220/rupert.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kGFGcbwevHE/R1KmVkq0h0I/AAAAAAAAAMM/bTb9RjngRA4/s72-c/gconv1.png' height='72' width='72'/><thr:total>10</thr:total></entry></feed>
