Open Source Adventures

Profoss — A new approach to licensing

Last week we had another Profoss-event in
Brussels. As always, it was a high-quality event, with very interesting
speakers and a nice group discussion at the end. It’s really a pity there’s
never more than 20 people showing up. A topic such as the legal matters
concerning Open Source software definitely should interest more people. Profoss has a lot more potential!

The first speaker, Ywein Van den
Brande
showed his expertise again by explaining the most important
elements of GPLv3 compliancy. Isn’t it great there are lawyers out there
knowing the difference between static and dynamic linking? :-)

I also very much enjoyed the talk of Philippe
Laurent
about the EUPL. The
most important thing to remember here is the political value of this license:
Europe is really going for Open Source here! Never forget the GPL was crafted
for the American jurisdiction. It’s translations are always unofficial, which
forms an additional problem for countries as France, where companies have to,
by law, have all their legal documents interrelating them with other French
companies in the French language. Also, terms as “distribution” have
different meanings in the US and Europe, not to mention the various
interpretations of the individual European member states.

I’m very happy I finally could attend a talk by Bruno Lowagie. I found him a very gifted
speaker; he knew how to entertain and greatly inform the audience at the same
time. Since he once called me “probably the
youngest one on my list of favourite Flemish entrepreneurs”
, I’m a big fan
of his. ;-) In the context of this Profoss-event, the sharing of his experiences
with the iText IP
review
were invaluable!

The other speakers, unfortunately, weren’t all that interesting to me. I was
especially bothered by their lack of fluency in English (I
blogged about this before
). I really appreciate speakers coming over from
as far as France and Luxembourg, but everyone should feel free to present in
their native tongue. I’m sure they had a very nice message for the audience,
and feel sorry that so much got lost in translation.

Anyway, it was a great afternoon spent in Brussels again. Congratulations to
Raphaël
Bauduin
for the organisation. I’m looking forward to the next edition
again, and feel proud Zeropoint.IT is an
official partner of the Profoss-event!

Posted in Business, Life, the Universe, and Everything, Open Source Adventures   No Comments »

Passing Command Line Arguments to a LaTeX Document

Some time ago, someone asked me if I knew a way to pass command line arguments to LaTeX documents. My first response was that this ought to be impossible; being a compiler, LaTeX cannot in any way alter it’s input files. But command line parameters can alter the output without touching the input of course.

This has kept me thinking for a while, and at the end I came up with some kind of a solution.

Let’s take a simple LaTeX file:

\documentclass{article}
\begin{document}
\someinput{}
\end{document}

and call it test.tex.

We will define the output of \someinput{} as a command line parameter at LaTeX invocation, as follows:

echo '\\newcommand{\\someinput}{hello world} \\input test' | latex

Result: test.dvi containing the text “hello world”. Admitted, it’s not the easiest solution, but it does make LaTeX useful inside simple batch jobs!

For more advanced LaTeX templating, I advise using Perl and Text::Template.

Posted in Open Source Adventures, scripting   No Comments »

Explaining Open Source to computer illiterates

Yesterday I was invited as a guest speaker at Foras (Forum voor Academici uit
Schoten). Foras is a monthly meetup of academics somehow related to Schoten. Every month, a speaker is invited to
talk about a general topic of interest. Overseeing the list of the past 25
years, I found a lot of interesting topic and speakers. Being part of this
list now honestly humbles me. A big thanks to Foras for inviting me.

I have been giving talks about Open Source (and other topics) here and there
for quite some time now, but this was the first time my audience had an
average age of over 50, was mainly computer illiterate, but highly educated.

Here are the slides I used for the presentation. I usually present without
slides, or with only very few. This time I opted for a fully slide-supported
presentation:

However unacquainted the audience with the topic, the questions and discussion afterwards were very much in line with what one would expect:

  • What about the quality assurance of Open Source software?
  • If it was all so straightforward, then why isn’t the world convinced yet?
  • Can one use Open Source software together with proprietary software?

In the future I should address these elements in the presentation itself. Frametitle could be “Open Source Myths” or so. :-)

One thing surprised me a lot. In my presentation I never mention Microsoft. Still, people afterwards were constantly asking my opinion about their practices. Interesting how clear it was for them Microsoft does not have a place in the picture I hung up about Open Source.

I can recommend everyone giving a presentation about their favourite topic to an audience with no prejudices or even knowledge about your subject. It’s an eye-opener!

Posted in Open Source Adventures   No Comments »

Preparing the WIFI setup for Barcamp Antwerp

A while ago, I accepted the challenge of providing a bunch of 150 geeks at a
Barcamp with reliable WIFI connectivity. Today, I spent some time preparing
the setup.

The hardware will consist out of 5 different wireless access points, all
flashed with the Open Source OpenWRT firmware
(2.4 kernel, X-WRT interface). The access points are
different models form different vendors, but that shouldn’t matter. (Thanks to
Amedee for helping me out here!)

What I’m conceiving is a Star WDS-network setup. Depending on which rooms we will have
available, this might turn into a Daisy Chain setup next week.

I have some networking experience, but never had to prepare a WIFI setup for
150+ heavy users. This leaves me with some questions:

  • Do I enable encryption of some sort? Will the low-end CPU’s of the
    el-cheapo routers be able to hand that amount of work?
  • What about bandwidth control? Can I trust that no-one will clog the whole
    pipe with an out-of-control bittorrent session?
  • I figure most of the traffic will be going to a handful of domains
    (twitter.com, wordpress.com, flickr.com, vimeo.com, …); Would a (transparent) caching
    proxy help us out? Or would it be counter-productive, as most barcamp
    attendants demand real-time data from the Internet?
  • What data could I/am I allowed to gather? I’d love to post some
    (anonymous) statistics afterwards with domain, speed and other trends…

Anyway, lot’s to find out still. Maybe, as this is the first time, I’ll just
concentrate on having the network up and running in time and keeping it stable
throughout the day.

For those who can’t wait: the ESSID will be bca. :-)

Posted in Life, the Universe, and Everything, Open Source Adventures   No Comments »

Interview with Microsoft about openness, intellectual property and innovation

Some time ago, I was asked by Koen Vervloesem, a great IT
journalist
for a comment on an interview he held with Dirk
Tombeur, Platform Strategy Manager at Microsoft Belgium
. Reason for that
was my
post about the definition of success
back in November 2008.

Meanwhile, the interview (Dutch and French only) has been published in
IT professional
, but due to space restrictions, many of my comments were
summarised or stripped out (understandably). For those interested, I’d like to
share my whole reply on the interview (it’s only available in Dutch however):

“Openheid en bescherming intellectuele eigendom zijn belangrijk voor innovatie”

Interview met Dirk Tombeur van Microsoft

Koen Vervloesem

De conferentie Profoss heeft elk jaar verschillende thema-edities over het
gebruik van open source software in de bedrijfswereld. De sprekers en andere
aanwezigen komen vooral uit de open source-hoek, maar er is telkens één
opvallende verschijning: Dirk Tombeur, Platform Strategy Manager bij
Microsoft Belgium & Luxemburg. Hoe komt hij daar terecht?

“Zo’n twee tot drie jaar geleden ontmoette ik Raphaël Bauduin, een jonge
gedreven IT’-er met een hart voor open source, die iets daarna met Profoss
op de proppen kwam. Wat mij opviel was dat hij heel genuanceerd was. In die
tijd was er echt een grote clash tussen Microsoft en open source, ik heb
toen aan debatten deelgenomen waar het er vaak heftig aan toe ging. Raphaël
is anders, en met Profoss mikt hij ook op de commerciële invulling van open
source, wat voor Microsoft natuurlijk interessant is. Daarom zijn we ook
Gold Sponsor van Profoss geworden. Wat mij overigens het meeste bijgebleven
is van mijn bezoekjes aan Profoss is de ‘entrepreneurial spirit’ van open
source mensen. Ze zoeken ook aansluiting bij de propriëtaire wereld.”

Open source

Over de levensvatbaarheid van open source bedrijven is Tombeur echter
kritisch: “Red Hat is één van de weinige grote open source bedrijven die nog
onafhankelijk zijn. SUSE bijvoorbeeld is opgekocht door Novell. Vroeger
dacht men: we geven onze intellectuele eigendom gratis weg en verdienen ons
geld wel met diensten. Als je kijkt naar de markt, gaat dat toch niet op: op
dit moment is het heel moeilijk om een zuiver service-bedrijf te zijn.
Landen zoals de Verenigde Staten blijven dan ook hameren op het belang van
intellectuele eigendomsrechten.”

SuSE is dan wel opgekocht door Novell, maar de inkomsten rond het product
blijven gegenereerd door diensten. De GPL maakt dit ook niet anders mogelijk,
en toch heeft Novell hiervoor gekozen. Het toont alleen maar aan dat ook grote
softwaremultinationals resoluut de kaart van de diensten beginnen te trekken.
Een ander zo’n voorbeeld is Sun met Virtualbox, MySQL en Java.

Interessant is dat in deze uitspraak het woord “software” vervangen wordt
door “intellectuele eigendom”. Wat is de waarde nog van software als
eigendom vandaag de dag? Software is allang geen kapitaalsintensieve
industrie meer.

Traditioneel waren de kosten geassocieerd met softwareontwikkeling afkomstig
van arbeid, licenties, huur en computers. Op alle vlakken is de kost
ongelofelijk gedrukt. Niet in het minst de arbeidskosten zijn gecontroleerd
door het succes van het offshore model en bovendien zijn programmeurs vandaag
productiever dan ooit. Met de gratise beschikbaarheid van welke soort van
softwarebibliotheek dan ook, met miljarden pre-built cut-n-paste
codevoorbeelden, met een online collectie van how-tos die met de secode groter
wordt en de enorme vooruitang van de ontwikkelingsomgevingen als IDE’s kan één
enkele persoon vandaag een succesvolle online applicatie ontwikkelen die door
miljoenen gebruikers geconsumeerd zal worden.

De meerwaarde en “intellectuele eigendom” verschuift vandaag steeds meer van
het product zelf, naar de kennis van het product en de daaraangekoppelde
kwaliteitsdienstverlening.

Microsoft is zelf ook geen services-bedrijf en verdient geld met zijn
licenties. Je kan dus niet zomaar verwachten dat het bedrijf bijvoorbeeld
Windows open-sourcet, zoals men wel eens oppert. “Dat zou betekenen dat we
onze inkomstenstroom en investeringen volledig omslaan. Stel dat we onze
broncode aan de community zouden geven, hoe moet dat dan economisch werken?”
vraagt Tombeur zich af.

Dat zal inderdaad niet lukken, maar wat is dan wel hun plan om hun
businessmodel aan te passen aan de 21ste eeuw?

“Eén van de misvattingen is overigens dat men onze broncode niet kan inzien:
Microsoft heeft source code licenties voor partners. Maar we merken wel dat
er heel weinig partners zijn die effectief in onze broncode duiken. Het
vereist natuurlijk heel wat kennis. De meeste ontwikkelaars gebruiken liever
een open API naar onze software dan dat ze zelf in onze software moeten
kijken.”

De waarde van Open Source zit hem niet zozeer in de beschikbaarheid van de
code, maar in de openheid van het ontwikkelingsproces enerzijds en de 4
vrijheden die een Open Source licentie garandeert anderzijds: freedom to use,
study, redistribute and improve.

Het is een onmogelijke taak om jezelf in de code te verdiepen van het
resultaat van meer dan 15 jaar gesloten ontwikkeling.

Voor studenten is dat anders, merkt Tombeur op: open source geeft hen een
unieke kijk onder de motorkap. “Toen ik mijn master in de informatica deed,
was ik al blij als we toegang kregen tot een computer. Andrew Tanenbaum
zorgde voor een revolutie toen hij MINIX schreef als illustratie bij zijn
handboek ‘Operating Systems Design and Implementation’: hierdoor kon elke
student de broncode van een besturingssysteem zien.”

Toen Linus Torvalds zijn op MINIX geïnspireerde Linux-kernel maakte en deze
gekoppeld werd met de GNU-software van Richard Stallman, was er plots een
alternatief besturingssysteem dat vrij was. “Tot dan hadden we enkel met
commerciële concurrenten te maken. Vanaf toen zijn we echter beleidsmatig
naar GNU/Linux gaan kijken,” aldus Tombeur. Ondertussen ondersteunt
Microsoft ook heel wat open source software. Zo heeft het bedrijf een
samenwerking met Zend: een team van Microsoft legt zich toe op een optimale
implementatie van de PHP-taal in Windows.

Waarom heeft Zend initieel niet gekozen voor de optimalisatie van PHP op
Windows, maar wel op GNU/Linux?

Volgens Tombeur is het overigens ontzettend moeilijk om een
gebruikerscommunity lang gemotiveerd te houden. “Als je dan de ontwikkeling
van software gaat schragen op een community van vrijwilligers, dan is het
voortbestaan van dat project onzeker. Je hebt echt een stichting nodig die
de ontwikeling garandeert, zoals bijvoorbeeld de Apache Foundation.” Hij
verwijst naar het voorbeeld van OpenOffice.org, dat de laatste jaren heel
wat minder actieve ontwikkelaars heeft. Michael Meeks,
OpenOffice.org-ontwikkelaar en werknemer van Novell, pleitte daarom onlangs
voor de oprichting van een stichting om de ontwikkeling van het
kantoorpakket te garanderen.

Het voortbestaan van projecten is altijd onzeker, zowel die binnen een bedrijf
als die op basis van vrijwilligers. Maar het voortbestaan van software is
nooit onzeker bij Open Source projecten.

Neem het slechtste geval dat de ontwikkeling van OpenOffice.org gestaakt wordt
door het huidige team. Dan is het slechts een kwestie van tijd en voldoende
interesse voor een ander team om het werk terug op te pikken. Stopt Microsoft
met de ontwikkeling van Microsoft Office worden alle klanten in hun blootje
gezet.

Open standaarden

Microsoft heeft in het verleden niet altijd de kar van standaarden
gespannen, maar volgens Tombeur heeft het bedrijf in 1998 een omslagmoment
gehad: “Er werd toen een belangrijke corporate beslissing genomen voor de
Platform Strategy Group: we moeten alle productlijnen architecturaal op
elkaar aansluiten. Bill Gates was hier de drijvende kracht achter, met XML.
Vanaf toen hebben we er aan gewerkt om al onze Office-bestandsformaten op
een open XML-standaard te baseren. De maatschappij accepteert immers geen
geslotenheid meer.”

Even duidelijk maken hier dat Bill Gates niets met de onwikkeling van XML te
maken gehad heeft.

Microsoft trekt nu volgens Tombeur volop de kaart van open standaarden.
“OpenXML is nu een ISO-standaard, en ook voor onze oudere protocols geven we
via het MSDN-netwerk informatie vrij als gevolg van ons initiatief Open
Specification Promise. Door het open maken van deze protocols gebeurt er nu
ook veel community-werk op projecten zoals SharePoint. Ook in de open source
wereld is er bijvoorbeeld interesse in de integratie met het Live-platform
via open API’s.”

De standaard waarover sprake heet niet OpenXML (alsof traditionele XML
gesloten zou zijn), maar Office Open XML.

De vraag kan gesteld worden waarom Microsoft zijn eigen open standaard heeft
willen doorduwen in plaats van de reeds veel langer beschikbare Open Document
Format standaard aan te nemen. De geschiedenis leert immers dat twee
concurrerende (open) standaarden een bedreiging van het concept standaard zelf
vormen.

Bovendien is het standaardisatieproces van Office Open XML op zijn minst zeer
omstreden te noemen. Het implementeert immers andere, gesloten standaarden als
DrawingML en VML (versus SVG dat wel open is), Office Math ML (versus MathML
dat wel open is), etc…

Tenslotte telt de Office Open XML standaard 6546 paginas (het Open Document
Format telt er 867), wat het praktisch gezien onmogelijk maakt om
vendor-neutraal te zijn.

Dit alles toont aan dat Microsoft nog steeds ofwel niet doorheeft wat Open
Standaarden precies inhouden of helemaal die kaart niet aan het spelen is.
Integendeel zelfs.

Tombeur illustreert het belang van open standaarden met de
elektriciteitsvoorziening: “Op het ogenblik dat men in Europa gekozen heeft
voor een netspanning van 220 V, is er een gigantische schaalvergroting
gebeurd en zijn er allerlei satellietindustrieën onstaan, zoals
consumentenelektronica en huishoudtoestellen. Dat kon maar omwille van één
zekerheid: dat de netspanning 220 V wisselspanning bedraagt op 60 Hz. Als er
onzekerheid is over een standaard, wordt er veel minder geïnvesteerd.” De
les die we uit deze geschiedenis moeten trekken is volgens Tombeur: open
standaarden geven op termijn belangrijke schaalvoordelen.

Standaardisatie is overigens in alle industrieën gegroeid, alleen gaat het
niet overal even snel. “Het eerste bedrijf in een industrie kiest natuurlijk
zijn eigen form factor, en concurrenten doen dat vaak ook met hun eigen
incompatibele form factor om marktaandeel naar zich toe te trekken. Naarmate
deze industrie volwassener wordt, wordt de economische druk echter zo groot
dat het voor alle partijen een meerwaarde biedt dat ze compatibel met elkaar
zijn.”

Ook in de IT-sector is deze standaardisatiegolf begonnen, aldus Tombeur: “In
het verleden had elke fabrikant zijn eigen standaarden: DEC, IBM, Microsoft,
… Als je je eigen protocols ontwikkeld hebt, vergroot de ontwikkelkost van
je software echter in elke nieuwe generatie: je moet immers telkens
compatibiliteit met X andere producten invoeren. Dan is het veel goedkoper
om open standaarden te volgen. Een concreet voorbeeld hiervan bij ons is dat
het OpenDocument Format (ODF) native ondersteund zal worden in Microsoft
Office. De IT-sector volgt gewoon wat later dan andere industrieën.”

Intellectuele eigendom en innovatie

Volgens Patrick Slaets, economisch adviseur bij Agoria-ICT, moeten we in
deze evolutie naar openheid toch niet vergeten om de intellectuele
eigendommen van softwarebouwers in Europa te beschermen. “Er zijn veel
Europese bedrijven die in de Verenigde Staten een octrooi aanvragen, maar in
Europa niet. Een voorbeeld hiervan is het Duitse SAP. We moeten wel goed
nadenken over de termijn van softwareoctrooien: door software-uitvindingen
niet te beschermen, rem je bedrijven af; als je het octrooi te lang laat
bestaan, rem je bedrijven eveneens af. Er is dus wel een discussie hierover
nodig, want software verschilt van fysieke uitvindingen.”

Software verschilt niet zo zeer van fysieke uitvindingen: het zijn
implementaties van ideeën. Net als in de fysieke wereld is het zinvol om
de implementaties te beschermen, maar niet de idee zelf.

Slaets neemt de gelegenheid aan om te onderstrepen dat ook de overheid en
het onderwijs een belangrijke rol te spelen hebben in de bewustmaking van en
de stimulatie van innovatie. “België levert heel goede informatici af, zowel
de hogescholen als de universiteiten. De afgestudeerden hebben een goede
methodologie aangeleerd, maar ze hebben te weinig kennis van de business en
te weinig communicatievaardigheden. Waarvoor dient deze software? Hoe
achterhaal ik de functionele noden? Wat kost het om een aanvaardbare
kwaliteit te bereiken? Hoe communiceer ik mijn ideeën met andere
ontwikkelteams? Dat zijn allemaal vragen die men zich te weinig stelt. Ze
beseffen ook te weinig dat immateriële zaken ook waarde creëren en dat
ideeën beschermd moeten worden. Software is een ongelooflijke groeimarkt, of
het nu open source of propriëtair is, en we hebben daarvoor veel en goed
opgeleide mensen nodig.”

Volgens Tombeur is de GSM-standaard het beste voorbeeld van hoe je tot
innovatie kan komen in Europa: “De GSM-standaard is een enorm succes,
begonnen eind jaren 1980 door een kartel van de 12 stichtende leden. Hun
standpunt was: er moet één standaard komen voor mobiele telefonie, een open
standaard, maar niet royalty-free. Het is een kapitaalintensieve industrie,
maar je hebt door het succes van de standaard wel de garantie op een grote
afname. Europese beleidsmakers zouden veel kunnen leren door naar dit model
te kijken.”

De GSM-standaard is precies een voorbeeld van hoe het niet moet. Een
vergelijking met een ander populair communicatieprotocol gaat hier op: TCP.
TCP is een werkelijk open standaard. 10 jaar na zijn ontstaan was het zo
alomtegenwoordig en had het zo ongelooflijk veel innovatie teweeggebracht, dat
de meeste mensen het dagelijks gebruiken, maar zelfs niet meer weten waar het
voor staat. GSM daarentegen heeft in België selchts een handvol bedrijven
grootgemaakt en 10 jaar later kunnen we nog steeds niets anders dan bellen en
wat berichtjes van 160 karakters sturen. Ironisch genoeg hebben we net moeten
wachten op de komst van TCP naar onze mobiele toestellen om er eindelijk
innovatieve toepassingen op te kunnen draaien.

Technologische en commerciële neutraliteit

Volgens Tombeur zal cloud computing aan de hele discussie een nieuwe
dimensie geven: “Mensen gaan zich niet afvragen of Azure met een open source
of propriëtair model ontwikkeld is. Wat ze zich wel gaan afvragen: is de
dienst er als ik ze nodig heb, kan ik van dienst veranderen, kan ik twee
diensten combineren, … Vrije-softwareverdedigers zoals Richard Stallman
zijn volledig tegen de cloud omwille van lock-in. Maar de cloud zal ook
leiden tot nieuwe businessopportuniteiten zoals brokers die je kunnen
garanderen dat je binnen een bepaalde tijd je applicatie van het ene naar
het andere cloud-platform kan migreren.”

Net als het Internet kan het cloudconcept enkel en alleen maar slagen als het
op vrije fundamenten gebouwd is. Mensen vragen zich inderdaad niet af of
pakweg GMail de e-mail RFCs correct implementeert, maar het is van belang voor
alle partijen dat dit wél zo is. Ik geloof niet in een succesvolle cloud als
we toestaan dat deze op een propriëtaire leest geschoeid wordt.

Slaets benadrukt nog dat we niet moeten focussen op één businessmodel: “We
moeten open staan voor alle businessmodellen: open source, propriëtair,
software-as-a-service, maatsoftware, … Openbare aanbestedingen moeten
technologisch en commercieel neutraal zijn. Als men bijvoorbeeld zou eisen
dat men enkel open source software bij de overheid gebruikt, of apparaat X
of softwarepakket Y gebruikt, dan is men niet neutraal meer. Ook in het
onderwijs zou dit zo moeten zijn.”

Naar mijn mening Open Source is geen businessmodel maar een distributiemodel.
De eis om enkel Open Source software te gebruiken bij overheden is perfect
verdedigbaar, om dezelfde reden dat met eist dat er in de officiële landstalen
gewerkt wordt. Enkel zo kan neutraliteit en beschikbaarheid immers gewaarborgd
zijn op lange termijn. Het onderwijs vormt een mooi voorbeeld van een
instelling die zich niet mag laten verleiden tot een vendor lock-in, wat men
met propriëtaire oplossingen bijna altijd heeft. Want *dan* is men niet
neutraal meer.

Posted in Open Source Adventures   No Comments »

gettext management

Anybody remember gettext?
A couple of years ago I investigated the localisation system for a project and actually came to like it pretty much.
Managing your .po and .mo files can be a hassle though.
That’s why I created these two scripts to help me handle them:


#!/usr/local/bin/bash

function createpot {
# create new .po templates (.pot)
local POT=$1
touch ./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot

xgettext --default-domain=${DOMAIN} \
--output-dir="./locale/${locale}.UTF-8/LC_MESSAGES/" --language PHP \
--force-po --indent --strict --no-wrap \
--copyright-holder='inGen cvba' \
--msgid-bugs-address='bart@inGen.be' --output=${POT}.pot \
--add-location ${phpfile}

chmod -f g+rw ./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot
}

function updatepo {
# update the original with the new potfile
local PO=$1
touch ./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po
touch ./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.pot

msgmerge --update --backup=simple --force-po --indent --strict \
--no-wrap --quiet --add-location \
./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po \
./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.pot

chmod -f g+rw ./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po
}

function mergepot {
# merge the original po with the new pot
local PO=$1
local POT=$2
touch ./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po
touch ./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot

msgcat --output-file=./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot \
--to-code=UTF-8 --use-first --force-po --indent --add-location \
--strict --sort-output \
./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po \
./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot

rm -f ./locale/${locale}.UTF-8/LC_MESSAGES/${PO}.po
chmod -f g+rw ./locale/${locale}.UTF-8/LC_MESSAGES/${POT}.pot
}

function backuppo {
# do a real backup of the existing pofiles
cp ./locale/${locale}.UTF-8/LC_MESSAGES/${DOMAIN}.po \
./locale/${locale}.UTF-8/LC_MESSAGES/pobackup/
}

for locale in nl_BE fr_BE en_GB
do
# generate .po messages
for phpfile in index.php
do
# the domain is the basename of the file
DOMAIN=`basename $phpfile .php`

backuppo
createpot ${DOMAIN}
updatepo ${DOMAIN}
done
done

and


#!/usr/local/bin/bash

# generate .mo messages of al .po files
for lang in nl_BE fr_BE en_GB
do
for pofile in ./locale/${lang}.UTF-8/LC_MESSAGES/*.po
do
rm -f ${profile/po/mo}
msgfmt ${pofile} -o ${pofile/po/mo} --strict --check --use-fuzzy
chmod -f g+r ${pofile/po/mo}
done
done

These scripts will not setup the working environment nor generate full headers for new .po files.
You will have to do this manually.
A corresponding working environment for the scripts in their posted configuration looks like this:

.
|-- images
|   `-- favicon.ico
|-- includes
|   `-- accept-to-gettext.inc
|-- index.php
|-- locale
|   |-- en_GB.UTF-8
|   |   `-- LC_MESSAGES
|   |       |-- index.mo
|   |       |-- index.po
|   |       |-- index.pot
|   |       |-- index.po~
|   |       `-- pobackup
|   |           `-- index.po
|   |-- fr_BE.UTF-8
|   |   `-- LC_MESSAGES
|   |       |-- index.mo
|   |       |-- index.po
|   |       |-- index.pot
|   |       |-- index.po~
|   |       `-- pobackup
|   |           `-- index.po
|   `-- nl_BE.UTF-8
|       `-- LC_MESSAGES
|           |-- index.mo
|           |-- index.po
|           |-- index.pot
|           |-- index.po~
|           `-- pobackup
|               `-- index.po
|-- makemo
|-- makepo
`-- styles
    `-- index.css

Mind the accept-to-gettext.inc file, a great script written by Wouter Verhelst to convert information in HTTP ‘Accept-*’ headers to gettext language identifiers.

Posted in Open Source Adventures, scripting   No Comments »

Open Source ERP Profoss, part I and the definition of success.

Yesterday was probably the best Profoss session up to now.
Too bad, only 30-ish people showed up, but the quality of the discussions was pretty high.
It was also one of the first Profoss’es where business models and market promises of Open Source software vendors stood central.
Too bad, however, that all four speakers (OpenBravo, OpenERP, Compiere and Adampiere) were not very proficient in English.
You could tell after 5 words where they came from (The Netherlands, Belgium, France and Germany). :-)

One thing which got stuck in my head was a remark form the Microsoft representative in the audience.
He mentioned that all the industries in Europe where we’ve been doing very well and are successful with worldwide, are in sectors where Intellectual Property rights are very well protected and laws are in place to do so.
He gave the pharmaceutical industry and the GSM communication standard as examples.

Now, he might be right for certain definitions of “success”.
They are the industries where venture capitalists like to live.
They are the sectors with the so called money-printing companies.
But, as someone in the audience gave as a remark, haven’t they stretched the limits of profitability too far?
Isn’t the financial crisis we are in right now a symptom of that?

The Microsoft guy went on to express his fear that by adopting the Open Source idea so quickly, Europe is putting itself in a more vulnerable position as compared to the rest of the world where huge companies are still being formed around (software) patents.
And that’s where I strongly disagree.

I believe, and not only for the software industry, that the Open Source philosophy forms the best sustainable business models, as a whole and in the long-term.
Janssen Pharmaceutica might never have been so huge without it’s patents on the medicines they “invented”, but now it appears that for the last 25 years the whole company just survived on those few patents.
Now that they have expired, all of a sudden Janssen is in trouble and recently had to lay down some thousands of people.
However… now that alternatives for those medicines are allowed, they all of a sudden become far cheaper as the factor of choice appears.
So which Europe (or Belgium, for that matter) is the most “successful”: the one where huge companies can get monopolies and allow some to get astonishly rich, or the one where medicines are affordable by anyone (without the need of too much medical insurance intervention)?

Isn’t the reason that Europe became what it is right now because of the rapid and free expansion of science and exact knowledge?
(
As a matter of fact, I agree with Michael H. Hart that Isaac Newton has had a greater influence on our every day life than Jesus Christ.
But that’s a different discussion.
)

But… doesn’t Janssen deserve to be paid back and generate revenue to support further research and development of other, great medicines?
Well, of course they do.
But why didn’t they do it then?
Why are they now, after 25 years of artificially stretching the time constraints of their patents, getting in so much trouble?
Haven’t they had the time to invent something else profitable?
(
One could also argue that for matters as health and hygiene, research should be left to public entities as universities.
Again, that’s another discussion.
)

The other example I want to tackle is the GSM one.
GSM is, in my eyes, one of the great failures of humanity.
Compare it to, say, TCP/IP.
Both are communication protocols.
One is proprietary and heavily regulated.
The other is open and free.
A couple of years after it’s existence, TCP/IP shaped the Internet, changed our entire world and allowed millions of business and even completely new business models to flourish on top of it.
On the other hand, with these stupid mobile phones, after 10 years we still can’t do anything but calling and sending crappy text messages.
MMS was supposed to be a big innovation.
Ironically, we had to wait for TCP/IP to arrive on our mobile devices, before we could start doing useful stuff with them.
Before we could do fun stuff that we didn’t have to ask permission for.
Before we could be free.

Why is the iPhone such a success?
Surely not because it supports GSM.

Just like Janssen, the great mobile operators might get in trouble when everybody starts using VoIP on their mobile phones.
Sitting on top of their governmentally protected industries, they have done nothing to protect themselves.

Yes, GSM regulation has made it possible for huge companies to form where, in Belgium, Mobistar, Proximus and Base are offsprings off.
But it has killed all innovation around it.

So again, what’s the most successful Europe?

Those Open Source ERP vendors might not get the big venture capitalists backing them.
And none of their CEO’s will be the next Bill Gates.
But they are forming the shape of the software business of tomorrow.

Posted in Business, Life, the Universe, and Everything, Open Source Adventures   No Comments »

What is Open Source?

What is the definition of Open Source?

I find this a very hard question to answer. Thrown at the crowd at CloudCamp last week by Raphaël, most seemed to have trouble coming up with an answer too.
Notably, only one guy raised his hand.

Apparently, there is such a thing as an “Open Source Definition”.
It’s used by the Open Source Initiative to determine whether or not a software license can be considered Open Source.
Hmmm… I’m doubting this is what Raphaël was looking for.

Even after many years of being active in the Open Source community as a (little) developer, (big) evangelist, (sporadic) documenter, (furious) discusser and (big time) user, I still won’t know how to define Open Source.
I’m not even sure if I should categorise it as a technology, a movement, a software distribution model, a software license category or whatever else.

Kris, I really wonder what your definition would be?
Or anybody else’s, for that matter.

Posted in Open Source Adventures   No Comments »

First Brussels CloudCamp

Yesterday, I attended the first CloudCamp in Belgium, which was
held in Brussels. It was at a very
nice venue
, and the attending and presenting crowd was of very high
quality.

There was much to be seen and more to be learnt. However… it wasn’t an
unconference at all. Yes, at the end of the schedule there was a piece
left “unscheduled”, but that time was wholly consumed at the bar.

Oh, wait… so maybe it was an unconference after all then… :-)

I especially enjoyed the talk of Raphaël in which he stressed the need
for openness in the cloud, as that is exactly what made the Internet such a
success. If the “cloud” is willing to turn into this next layer on top of the
Internet, it indeed will have to make sure that it’s as open as can be.
Otherwise, all we’ll get is another useless network like we have today with the
mobile phone network and it’s few übermasters.

By the way… MyOwnDB is as open as can be! ;-)

Posted in Business, Life, the Universe, and Everything, Open Source Adventures   No Comments »

pyfconfig — how to get ifconfig data without regular expressions

After reading this post
about ifconfig output parsing by Kris
, I remembered I once needed a
cross-platform way to get the IP address of an interface in Python.

Of course I could just parse the output of `ifconfig`, but I really don’t like
such ugly hacks. I guess I’ve got too many (bad) experiences with libwww-perl scripts I wrote
for web harvesting various stuff. Basically, this is output parsing too, as
HTML is generally the result of some server side script. Each time the webpage
changed the way it looked (non-CSS changes) or worked, my scripts started to
fail.

That’s when I decided I’ll always try to avoid such clumsy dependencies on
third party software.

So, back to the Python question. I set out for a
short adventure on comp.lang.python
and came up with a solution
after some fiddling: pyfconfig, a cross platform Python module to query for the
IP address of an interface. Tested on FreeBSD x86, GNU/Linux x86 and GNU/Linux
x86_64, with Python 2.4 and Python 2.5. Works just fine.


#include "Python.h"

#include
#include
#include
#include
#include
#include
#include
#include
#include

// parameters: string (interface name)
// output: string (ip address of interface in decimal notation)
PyObject * ipaddr(PyObject *self, PyObject *args) {

char ip[ 200 ];
char *itf;

if (! PyArg_ParseTuple(args, "s", &itf)) {
PyErr_SetString(PyExc_Exception, "no interface given!");
return NULL;
}

struct ifaddrs *ifa = NULL, *ifp = NULL;

if (getifaddrs (&ifp) < 0) {
perror ("getifaddrs");
return NULL;
}

for (ifa = ifp; ifa; ifa = ifa->ifa_next) {
socklen_t salen;

if (ifa->ifa_addr->sa_family == AF_INET)
salen = sizeof (struct sockaddr_in);
else if (ifa->ifa_addr->sa_family == AF_INET6)
salen = sizeof (struct sockaddr_in6);
else
continue;

if (strncmp(ifa->ifa_name, itf, sizeof(itf))) {
continue;
}

if (getnameinfo (ifa->ifa_addr, salen, ip, sizeof (ip), NULL, 0, NI_NUMERICHOST) < 0) {
perror ("getnameinfo");
continue;
}
break;
}

freeifaddrs (ifp);

return Py_BuildValue("s", ip);
}

static PyMethodDef pyfconfig_methods[] = {
{"ipaddr", (PyCFunction)ipaddr, METH_VARARGS, "ipaddr(string)\n"},
{NULL, NULL, 0, NULL}
};

DL_EXPORT(void) initpyfconfig(void) {
Py_InitModule3("pyfconfig", pyfconfig_methods, "Provides a function to get an ip address of a certain interface.\n");
}

Compile with gcc -fPIC -shared -Wl -soname pyfconfig.so -o pyfconfig.so -I/usr/include/python2.5/ pyfconfig.c (for Python 2.5) and after an
import pyfconfig, pyfconfig.ipaddr('lo') should return '127.0.0.1' (YMMV).

No dependency on the output formatting of ifconfig. Less bugs.

Posted in Open Source Adventures, scripting   No Comments »