Older blog entries for djcb (starting at number 138)

NM156


It's unwise to discuss politics or religion with strangers -- or even worse, discuss favourite text editors... My personal favourite is GNU/Emacs. It took me some time to get familiar with this thermonuclear word processor, but after that I found it a wonderful tool. You can actually run Emacs on your N8x0 - see the screenshot of Emacs 23 from CVS. But that's not what I'd like to discuss here.

For maemo software development, many people seem to use a bunch of terminal windows inside and outside Scratchbox. Some alternatives exist, such as Laika, the Maemo-plugin for Eclipse, and work is apparently underway for Anjuta as well.

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:


  • Run Emacs outside Scratchbox;
  • Compile inside Scratchbox;
  • Jump to the right place in the source with one click from any compiler errors/warnings.

How to get that to work? It's embarrasingly easy (once I figured it out):

First, make sure the same source code can be reached using the same path both inside and outside Scratchbox, by using symlinks, for example:


$ ln -s /scratchbox/users/djcb/home/djcb/src/my-app /home/djcb/src/my-app

Having done that, it's easy to add some trivial Elisp to your .emacs:

;; compile inside scratchbox
(defun scratchbox-c-mode-compile ()
(interactive)
(compile (concat "scratchbox make -C "
default-directory)))

That's all. You can now edit your source code in your normal Linux environment, open a file in ~/src/my-app/..., and compile it with M-x scratchbox-c-mode-compile. Or even better, use a keyboard macro (add to your .emacs):

(define-key c-mode-base-map (kbd "<f8>") 'scratchbox-c-mode-compile)

And pressing F8 is now enough to start compiling...

Now, what's a blog entry without some screenshot? Here's one, running Emacs 23 (from CVS) inside Scratchbox - unrelated to what discussed above, but a nice picture anyway :)

Obligatory dot-emacs link. Happy hacking!

Syndicated 2007-12-04 21:11:00 (Updated 2007-12-12 10:22:02) from djcb

revolution calling

After more than five years of blogging in dutch, I'm expanding my blogging into anglo-saxon territories. Here, I won't go into my private life (the wild rock & roll lifestyle) so much, but instead discuss technology, productivity and so on. Not sure how interesting that is, but let's try...

modest


To start with something rather technical, I working on an email-program called modest. It's been in an experimental state for a long time -- but finally it's about ready for the real world. It's a program designed specifically for Nokia N800/N810 devices. Some people have already called 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...

Some information here; you might also be interested in the GUADEC Presentation I did about Modest in Birmingham.

mobile email improvements


Now, there are a couple of problems with e-mail, in particular with mobile 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:


  • Setting up accounts is #@&^%& hard - modest makes this almost brainlessly easy, by including data for big email providers; setting up modest for, say, Gmail is trivial with the easy-setup wizard;
  • Using your fingers is hard - 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;
  • I need that fancy stuff - 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.?
  • Show me the code - 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.

technical background



To achieve all this, modest uses an email framework called tinymail, which is the brainchild of Philip Van Hoof.
Tinymail provides a version of the libcamel protocol library that is also used for the Evolution 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.
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 Gnome Journal: Tinymail: Evolution and Intelligent Design .

So -- my first post. Stay tuned!

Syndicated 2007-12-03 15:00:00 (Updated 2007-12-08 21:49:51) from djcb

Wow - after days of fruitless trying, ap-get up(date|grade) finally gets me some new stuff on my Ubuntu box. The successor to Hoary is called Breezy. And for some unknown reason I do apt-get update several times a day. I am *so* bleeding edge.

Oh, regarding my previous post, it seems that the analog clock in gdesklets is burning insane amounts of cpu cycles. Remove that and I am grand.

Wrote a perl script to conjugate Finnish verbs; it works nicely and my Finnish colleagues couldn't even find a misbehaving verb; well he probably did not try hard enough (well, there are few irregularities in Finnish verbs. How nice). Now if only I had a perl interpreter in my head...

Last year I wrote a similar program for *Dutch* verbs; and I used Haskell that time. I find perl easier to program, but maybe that is this low iq thing people keep on telling me about.

As a proud AMD64/3400+ (note the '+') owner, I am happy that I can now use more of the abundance of processing power on candy for the eye. So, I run xcompmgr -cCfF -r8 -o.63 -l-10 -t-8 -D7, enabled the nvidia cursor-shadow feature, and now everything is all-singing, all-dancing and all-shadowy. Beautiful. There seems to be a new focus on getting all kinds of eyecandy features on our Free desktops, and it is good. We have of course the work of Seth and friends, but never forget Rasterman and friends.

Still, I hope they can speed it up a bit; virtual desktop switching will make Xorg jump to 90% or more (in top). And there seems to be some bad interaction with gdesklets, which causes both to eat *a lot* of CPU-cycles when run together, even while not switching virtual desktops.

I am also interested in ear candy. Since I bought a sound card somewhere in 1993 or so (they were not a standard part of PCs in those days), I wanted to have auditive feedback for my interactions with the computer. But, apart from the occasional beep and ploink, current desktops don't seem to fully exploit the possibilities, to put it mildly. But of course I have to admit that I don't have a Plan in this area, on the fine line between useful feedback and annoying beeps. Has any research been done on this?

My AMD64 is a really nice machine, but unfortunately, I keep on running into incompatibilities. jhbuild is a problem (already in gettext. And today I wanted to try the new übercool Enlightenment (well, I loved it in 1999, and the avi looks cool). But of course imlib2 broke down on the assembly code; there might be ways to solve that, but apt-get (which I could not use for E17) has made me lazy.

I released a new version of ttb. I am slowly learning Python while coding; and slowly using more and more Python idioms. I got Learning Python and Python Cookbook from the company library. I am trying the the time-based releases, weekly at the moment.

Wow, I am looking at Ubuntu's March Desktop Background, a yummy blond girl lying naked on top of my taskbar :-) Not bad.

Weekend. I'm working on integrating some patches in ttb teletekst browser; I was lucky enough to have found a major contributor, who has been feeding me a lot of patches this week. In the open-source world, there are various ways to deal with incoming patches... people like Linus might loudly reject patches, even if people spent a month or longer working on them. In other projects patches may be ignored, or spend their life in Bugzilla (Firefox, Gnome), like the Ark in the Raiders of the Lost Ark.

Of course, in my tiny project, everything is different. I try to encourage contributors by at least tell them I have received the patch and I am reviewing it. And, luckily, the patches are pretty good so far. That does not mean I will apply them blindly - I prefer to type them by hand, looking at the patch and the exising code. Thus, I get the advantages of still understanding my code afterwards, and also of reimplementation, which usually gives better quality. Well, I assume a lot of people like to do it that way, which may explain why many big projects cannot seem to digest the patches that are submitted.

I also saved some webserver from impending death - the website was mentioned in some magazine, and suddenly 600k people are trying to access it. The database got pounded *really hard*, and I got a desperate call for help... Well I did some ugly hacks to help it a little, but then discovered the mysql query cache... that did the trick.

So, finally got the teletekst thingie working for python 2.2, 2.3 and 2.4. Hurrah. The weird thing is that I don't actually understand what caused it suddenly to work... hmmm...

Of course I am writing way to much about such a pathetic litle program. But I like it anyway, and so do the users. And while having little available time, for me it's still providing me with the free software feeling - that is, getting suggestions, bug reports, thank-yous and flames from users, and even patches! So I try to keep momentum and enthusiasm by quickly respoding, and thanking people for their contributions.

I have to admit that I prefer the little-work-high-visibility projects; but those are important too :-) And I try to make my program attractive to normal users, to Just Work. It's hard for hackers to think like that, because we are not normal users. At least not of our own programs.

Example: last weekend, I wanted to make a little video with Kino, a nice video editor, surprisingly (considering the name!) a GNOME app. Well, it *can't* load MPG-files; I first need to convert my homemade pr0n to 'dv' files using ffmpeg by hand. Now, for every time your GUI program requires the command-line, you loose about 75% of the audience. [And yes, I am sure the CVS-version does this automagically...]. I must say, apart from this - Kino is really nice, and the best of breed on Linux AFAIK.

24 Feb 2005 (updated 24 Feb 2005 at 20:36 UTC) »

Yesterday, I released my little teletekst browser thingie, and today I was confronted with the Python's Dark Side - the difference between versions. My old version did not run on Python 2.4 anymore, or on 2.2. Well, I fixed that, and did a little hack so 2.2 will work now as well. But based on the reports I received:

  • Ubuntu/Hoary, Python 2.4.1a: does not work
  • RH/FC1, Python-2.2.3-7: does not work
  • RH/FC2, Python-2.3.3-6: works
  • RH/FC3, Python-2.3.4-13.1: works
And now the new version:
  • Ubuntu/Hoary, Python 2.4.1a: works (my machine)
  • RH/FC2, Python-2.3.3: does not work
  • RH/FC3, Python-2.3.4: does not work
  • RHEL3, Python 2.2.3: works
Arrhghhhh...

I did however find out that the official teletekst website now points to my website. Very nice, but put's some extra pressure on my late hacking sessions to get these version problems fixed quickly.

23 Feb 2005 (updated 23 Feb 2005 at 21:27 UTC) »

Today, after three months or so, I finally sat down and fixed ttb, my teletekst browser, of interest mainly to the 21 million Dutch speaking inhabitants of this planet. I was able to remove some ugly work-arounds for HTTP1.1 that are apparently not needed anymore. Hurray. I actually borrowed the Python Cookbook from the company library, but I didn't need it. But I'll read it anyway, it might be interesting.

My current job does not involve really that much coding - but still after working long hours I don't have too much energy left to do some heavy coding. However, still there are these times when I reach 'deep hack mode'. When food no longer matters, when you don't realize that you've been listening to the same song for the last two hours, when you and your editor get into some symbiotic relationship. Well, I did not reach that magical state with the little lightweight Python coding I did tonight :-)

Anyway, I've uploaded my code, announced the release worldwide, and now I am enjoying a Koff beer.

22 Feb 2005 (updated 23 Feb 2005 at 06:24 UTC) »

I like writing programs and releasing them as free software. I do like the thought of helping others with my software, but also I write them for selfish reasons . I want to find out something, play a bit with technology, do some experiment. Most of these experiments never leave my harddisk, but sometimes they could be useful to others. Even while 'only' experiments, I do try as much as I can to make the programs easy to install, easy to use etc., in short, they should Just Work(tm).

Too often I see programs announced with remarks like 'I know it's buggy and unstable, but here it is!'. Well - who would be enthousiastic to use such a program! So I try to do a bit better; it's almost unavoidable that there will be problems anyway, because people's environments differ from mine. But I'll do my best. (And still then, I found out the hard way that there are significant difference between Python 2.2/2.3/2.4, and PyGTK... Arghh.)

I said I like writing programs. Well... writing programs for me is a bit like running - it's a masochistic joy. It's especially nice afterwards.

Actually, there is another reason I write free software - I like to see other people using my stuff and writing about it (to feed my arrogance of course). Now, it's really easy to find a thousand links to your software in google. If you're in debian and freshmeat, mirrors and feeds will quickly make your program pop up in a million places. But with a little better searching I can find reviews for my program in Russian or German, or my Bonobo-Tutorial in Korean. That is just cool.

So I always try to give my programs a name that's not too generic and easily googable - don't call it, say, reader or eyeball or... LaTeX [actually, searching for latex gives you pretty good results]. Just don't call your uptime-improver v1a9ra.

And my final word of wisdom for today: there's no need to check for the return value of g_new and friends - they will never return NULL.

129 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!