2010-11-10 I have written nothing for one week. Not because I didn't do anything, in fact I did a lot, but rather because it hadn't been special or I hadn't been in the mood to write. My crawling though nmh's code base goes well. I really can say that my current knowledge of nmh is a magnitude better than it had been just a month ago. I wrote several mails to the nmh-workers mailing list, some in- cluded small patches. To my delight two are already applied by Peter Maydell. Although I don't mind too much, it would be nice to read my name in the ChangeLog or in the commit messages for stuff I brought up. I mean, although these improvements were small, I am pretty proud that I could discover or initiate them. These are my first real contributions to nmh. Some work I do on Free Software is for my own needs, some is for the community only (like improving the man page of slocal(8) which I don't use myself). Much of the motivation in Free Software comes from acknowledging any work. Acknowledgement fuels the Free Software community. I asked Peter Maydell, who's a nice guy btw, about tasks I might go for and he told me some. Someone who has the overview is a good advisor for planing ones steps, when you have a very limited view. Understanding (most parts) of send(1) and post(8) was a mayor im- provement for understanding nmh. Sendfiles(1) and viamail(8) were nice discoveries. The more I think about the implementation of MIME in nmh, the more do I believe Jon's attachment approach (via headers that get processed in send(1)) is the way to go. It at least can cover comp(1) and forw(1). For repl(1) a ``give me all (or the first) text parts, decoded please'' facility needs to be set up. That's if on the sending side. For displaying, show(1)/mhshow(1) need probably be redesigned anew. Besides nmh, I had a nice meeting with awk(1). I came across this trim function: awk '{gsub(/^ +| +$/, "")}1' It removes spaces (should probably tabs too) from the beginning and end of the line. But what does the `1' at the end? I know awk pretty well but still had been confused. In fact it's a language abuse. It's easier to understand it if the program is formated nicely: awk ' { gsub(/^ +| +$/, "") } 1 ' The program consists of two blocks. The first has no condition and thus runs on every line, trimming the leading and trailing spaces. The second block, and that's the point, consists of only a condition (`1') but no actions. `1' simply gets evaluated as true and for missing actions the default action `{print}' is used. I can't decide if I find this abuse of awk wonderful or terrible. ;-) Anyway, it would have been clearer, and thus better, to write: awk '{gsub(/^ +| +$/, "");print}' or take sed(1): sed 's,^ *,,;s, *$,,' Sometimes a goto is the better choice. (I really do believe so.) Like we have these unstructurated break and continue statements and early return, we also have the goto. All these are valuable at the right time. For some (e.g. the early return) this is often the case, for others (e.g. the goto) it's seldom, but there are cases. Goto gives great power to the programmer, it's on him to use it wisely. But not at all should goto be a no-go. http://marmaro.de/lue/ markus schnalke