Older blog entries for GJF (starting at number 21)

It's up and running!

My mod_virgule based site is officially launched. We had a launch celebration yesterday which went pretty well. Please feel free to take a look at the site - www.kaitiaki.org.nz but please remember that accounts on the site are intended for Kaitiaki Maori rather than free software authors.

The source for my version of mod_virgule is
Please check out the rtf-converter too.

Some of the modifications I made to mod_virgule are:

  • using rtf-converter and ApacheRequest to upload rtf documents as articles
  • Some e-mail integration to export user data as mailing lists for Majordomo).
  • Require opt-in (check-box on user options) for higher certification levels - so that we can use trust metrics to manage membership of an incorporated society.
  • A simple web links database.

I realise that my version of mod_virgule ended up with lots more embedded html - so probably it is at the end of an evolutionary code branch. I am still impressed with raph's code, and the power of the apache api for add-in modules. I'm also keeping my eye on the xvl project for future development.

2 May 2001 (updated 30 May 2001 at 03:00 UTC) »

For my reference:

I've found libapreq a library for uploading files to Apache, I can use to accept uploaded RTF files in mod_virgule.

I also found the apache API listing on dev.apache.org.

Also found *NIX programming guide. Which I needed for the system call I need in order to launch the converter.

I've been Win32 API programming too long...

By the way, I sniffed out the error that was causing the the RTF converter to seg-fault... It had the smell of a stack overrun - and sure enough there it was a printf writing a number into a locally declared string (char str[64]) which was big enough until the number exceeds 9... result stack gets overwritten and program crashes when the function returns. It only seemed to affect the Linux version, not the Windows one. Probably would crash either/or at random if you tried converting enough documents...

It turns out we need HTTPS, so tinyproxy is on its way out. I've installed squid (on a 486!) and it seems to be working (I'm using it now).

On the mod_virgule front

I'm writing a mod_virgule module for my advogato clone site that will write alias files based on the trust metric levels. The idea is to have mailing lists consisting of all members above a given trust level and have these maintained entirely by mod_virgule. I'm hoping to manage posting restrictions with the majordomo list management functions.

I'm also still trying to weed out some bugs in my rtf to html converter application. Then I want to integrate that with mod_virgule too...so users can upload rtf instead of typing into the form.

We had a hard drive crash on our web/e-mail/proxy server on Monday. There was a backup (albeit old) but it still took forever to restore the system. We have a saying in the NT world:

You moved the mouse. Please wait while your system restarts in order to make these changes take effect.

In the mean time - I put up a temporary web page on one of my 486 Linux testbeds. It took a bit of figuring, but I could add and remove ip addresses with a couple of commands on the console.

Even after several days work - it turns out we still can't get Humpty together again. The reinstall for some reason required upgrading to MS proxy 2 - but it turns out that proxy 2 can't live on the same machine as

In the end I installed tinyproxy on another Linux 486 and in about an hour and a half had it up and running. Now I just need an FTP proxy.

Why not just use Squid? The documentation suggests a 300MHz Pentium and a fast disk array. Oh well...

My free software projects

I'm about to start working again on my modified mod_virgule setup. I'm thinking of adding a News/Calendar application and maybe a voting application. I've almost finished my rtf-to-html converter. I'm just having a little difficulty with rtf tables and fields...

I have finally begun work on my RTF to "styled-html" converter application. I have been trying to use Paul DuBois' rtftools package, but I had lots of trouble trying to get imake to build the make files on Linux. I hacked a semi working version together using Visual C++.

Having got this far I fear the rtftools package is badly out-of date, it complains about lots of RTF tags and doesn't know to ignore /*/ groups - so it ends up dumping garbage into the text stream...

I downloaded and installed wvware which is used in AbiWord and it works really well with Word 8 files, but doesn't appear to support RTF. What is the best RTF reader package out there?

Re: mod_virgule
I must admit I'm kind of impressed by badvogato. I'm still working on my own version. I want to add Topics to the articles and maybe do event notices (in place of diaries).

Re: the recent article on window managers by angelsun.

I quite like to use icewm on my 486 farm - we have quite a few old 486 machines I have turned into linux development/learning/testbed machines. Gnome and KDE are both dead slow on a 486, but icewm seems to go OK. I usually run icewm over the network using a VNC client (in place of an X Server) on a Windows workstation. VNC is fairly slow too so it is quite a good performance match.

Talking about small independent apps assembled into an operating system. I have to admit, I am constantly surprised how fast those apps are. I compare it to a Windows command line - it seems you can pipe data through a series of *NIX apps faster than you can launch an app in an NT command shell - what key element of *NIX design is responsible for this? Or is it just my imagination?

Re: mod_virgule

By the way, Next month I get to start my new community web site application - which will be based on mod_virgule. I've managed to get a general idea of how it goes now - I couldn't get lkcl's version to go so I am currently working on a variant of raph's original. Is anyone else out there currently working on mod_virgule variants?

Re: The Perfect User Interface

I'm afraid I quite like the alt-key approach to selecting menu items used in Windows, as the underlines on the menu items prompt you which keystrokes are required. I prefer this interface to the direct "hot key" approach. For example, I would be more likely to use alt-F,P to open the print dialog than the alternative ctrl-P - even though the ctrl-P command is more direct - it just isn't consistently available in all the apps I use.

But, number one on my wish list for X Windows is to have ^x, ^c, ^v, the cut, copy and paste commands to work in all possible X applications, more or less like they do on Windows even if only for text transfer between apps. N.B. Windows had to abandon an earlier choice of key bindings (ctrl-Insert and some other keys I can't remember) and take on the ^x, ^c etc which is (I think) the IBM Presentation Manager Standard.

I like the facade idea, it is similar to the concept for Language Manager (an old commercial product of the company I work with). Language manager internationalises the menus of an application at run time. That means - if you don't like it you can change it - relatively easily and without recompiling - and the one application allows you to translate any other (Windows 3.1 only) application. It seems to me that it should be possible to place a layer between the Widget set and the application that would translate menu items and widget text, (or change the key bindings). The problem being that X has so many different widget sets - you would have to integrate with all of them. I've never programmed X Windows, so please tell me if I'm on the right track?

By the way, I have got the go ahead (funding) to build my community web site, so I am definitely looking at doing some work on mod_virgule and on an RTF to HTML converter (with style sheets) application.

Re: C Programming language.

apgarcia recently revisited the idea of an improved C. I have become resigned to using C or C++ over the last few years - it has such momentum. My main criticism of C is readability -
for( int i=0;i<j; i++ ) printf("unreadable\n");
I much prefer the Pascal syntax, but I acknowledge the criticisms in Why Pascal is Not My Favorite Programming Language. Some years ago, I worked mainly in Modula II, which is still my favorite language syntax. The main drawbacks must be the lack of libraries (and maybe their design) and lack of objects. But it did have some features I think of as highly desirable:

  • Explicit termination (END) for all IF statements
  • No macros
  • VAR parameters rather than explicit pointers
  • The HIGH function for determining the dimension of an array passed as a parameter to a function
  • Good control of name spaces and interfaces by the use of declarations in .DEF files (rather than extern and/or #include)

The Modula II compiler I was using had some extensions to allow low level programming. I think language extensions should be discouraged,but they did allow me to write a simple VGA graphics library - and that taught me a lot. In particular I learnt that a good optimising compiler can produce faster code than the assembly code I found published in a book!

After abandoning Modula II for C, I went through a brief phase of working with Delphi, which I quite liked. Delphi encourages much more readable code than C++, but of course it is proprietary. The name space system is a bit more primative than Modula II as well.

The company I work with has been doing a lot of Java work, and I guess Java tidies up some of the worst excesses of C and C++, I think it is unfortunate they kept some of the ugly syntax features (for loop, {} braces etc). Maybe with minor modifications to the compiler, we could plug-in a new tokeniser and make the language truly readable?

Early Java virtual machines were pretty slow and unstable, but the new ones can be pretty good. I still prefer native compilers/languages.

So these days my preference is C++, but there seems to still be compatibility problems with libraries on Linux, so I guess I'm stuck with C.

OK so I had to go off to www.extremeprogramming.org and find out what it is all about.

On pair programming

Oddly, we have done a lot of pair programming in the past. It has been quite successful, particularly for debugging. It is a little problematic for contract work done on an hourly rate - as your client needs to be comfortable with it. It not only improves code quality, but must diminish the problem of adding more programmers to a project too. It also gives insurance against losing indispensable programmers. I imagine OSS projects tend to be more stable than companies, as you may change employers, but continue will probably continue working on your OSS project. Personally I quite like the idea of pair programming. I guess the OSS development (in the Bazaar) doesn't need pair programming as much, because additional "eyes on the code" are essentially free - so OSS projects are already achieving a proven high quality of code.

On minimising design/intermediate products

Someone suggested that many OSS programmers would have problems with this as they prefer the "Big Design Up Front" model. Surely even an XP project is based on someone's architectural overview/conceptual model of the problem space. I haven't that much experience with open source code, but I have found very little in the way of business analysis documents, requirements specifications, use case or class structure diagrams. Maybe the XP people are just following common practice (or OSS practice) here? I imagine XP developers may well draw class diagrams for those parts of a project which are complicated, or just in the process of coding a specific module, or negotiating an interface with another pair. But quality working code should always be the goal.

Had a party on Saturday, it was for my partner and her friend - they hired a (rock 'n' roll) band who were really quite good.

Family turned up in force, both my brothers, my sister and my dad. My partner's mum came down as well as her friend's parents. Dad who is now 70 was one of the last to leave (unfortunately the band finished at mid-night so we couldn't party all night).

Have not made much progress trying to get my head around the mod_virgule code. Actually the problem seems to be with getting the right library versions as well as the right versions of mod_virgule. I think I've ended up with a new sample site and old code. Now that I've got the party lights back to the hire people, I hope to actually make some progress on this...

12 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!