Contributions to other projects


As mentioned, I haven't participated regularly in an open source community, except for various bug reports, bug fixes, and some participation in mailing list discussions.

I started my career implementing actual systems (websites) when the Open Source movement was rather new, and was concentrating on delivering actual products to end user right away, hence taking what I could find in existing Open Source software and writing the rest myself, i.e. do what the projects at hand needed, without time to participate in any existing projects. I do find that's a bit of a pity.

So, recently I decided to contribute to the Redshift project by starting with the documentation. After doing the small doc improvements, I wished the different kinds of docs could be produced from one source, avoiding duplication (duplication is generally bad since if something has to be updated, there's a risk forgetting to update the duplicates). Hence, generating the different kinds of documentation from the same source. Once kind of documentation is compiled into the main program binary, a C program. Hence, my idea was, or still is, to write the docs in a ASCII file with CPP macros for the markup, then include it into the C program and have it expanded to the in-program help docs by the C compiler. And also transform the same file to man pages (maybe more).

I even wrote patches with that markup, but the C preprocessor isn't powerful enough to generate any kind of output, so except for compilation into the program binary, this needs a step of postprocessing. I wrote to the mailing list mentioning that I'll look into writing that postprocessor.

I wrote that postprocessor as a functional program in Perl, using lazy streams; Perl since that's usually installed everywhere, functional program since that's where I'm headed, and it was actually a rather clean and fully correct program, and tracked source code location for precise error reporting, too.

Sadly, there were two issues with the Perl program, for one it was pretty slow (like 10 seconds for a small document), and it leaked memory, since Perl still has corners where even with the best efforts it seems impossible to write tail-recursive code (which is possible thanks to Perl's goto $coderef) without leaking memory.

Thus I decided to write a tiny implementation of a functional programming language in C, small enough that it could be included directly with the postprocessor project so that no dependency needs to be downloaded. This still isn't ready, but I intend to finish this. This may seem silly, since with C parser frameworks the same thing could be achieved, too, but I want to see whether I *can* do this.

Thus, nothing to see here yet, but I'm intent to fix my history of missing contributions to existing opensource projects by providing this. Whether it will be accepted, is another question of course. Anyway, this is what I want to try, for learning it shall be if for nothing else.


Sun, 25 Nov 2012 13:57:40 +0000