All the more reason to like FOSDEM

So it seems that my half-attendance at FOSDEM paid off more than I could have hoped, as I won a year’s subscription to GNU/Linux magazine. The publication is francophonic, so this will be a good chance to improve my command of la langue des grenouilles ;-).

Posted in FOSDEM | 3 Comments

Summer of code

GNUstep has been approved for this year’s Google Summer of Code. The title link goes to the GNUstep wiki page outlining possible projects, but I’m sure that if a student had another idea you’d be welcome to talk about it on the gnustep-discuss mailing list, and probably get a mentor!

Posted in gnustep, Google, SoC | Leave a comment

Mail::Box++

When most perl developers (I believe there still are one or two in existence) talk of the "cool one-liner" that they wrote, what they actually mean is that they grabbed a crapload of packages from CPAN, invoked a few use directives and then, finally, could write one line of their own code which happens to invoke a few hundred lines of someone else’s code, which they have neither read nor tested.

Modulo testing, my short script (below) to convert mbox mailboxes to maildirs is exactly like that. While it has three lines of meat, these call upon the (from what I can tell, fantastic) Mail::Box module to do the heavy lifting. That package itself is less svelte, with 775 lines of perl. Which is the interface to a C bundle, which is (single-arch) 92k. But never mind, I still wrote a three-liner ;-)

#!/usr/bin/perl -w

use strict;

use Mail::Box::Manager;

@ARGV = ("~/mail", "~/Maildir") unless @ARGV;


# open the existing (mbox) folders
my $mgr = new Mail::Box::Manager;
my ($srcPath, $dstPath) = @ARGV;
# expand tildes and stuff
$srcPath = glob $srcPath;
$dstPath = glob $dstPath;

opendir MBOXDIR, $srcPath or die "couldn't open source path: $!";

foreach my $file (grep !/^./, readdir MBOXDIR)
{
my $mbox = $mgr->open(folder => "$srcPath/$file",
folderdir => "$srcPath");
# open a maildir to store the result
my $maildir = $mgr->open(folder => "$dstPath/$file",
type => "Mail::Box::Maildir",
access => 'rw',
folderdir => "$dstPath",
create => 1);

$mgr->copyMessage($maildir, $mbox->messages);
}
Posted in perl, sysadmin | Leave a comment

FOSDEM / GNUstep photos

Just came in on . Many photos of the GNUstep booth, dev room and of course the famous GNUstep dinner.

Posted in brussels, FOSDEM, gnustep, pictures | Leave a comment

Apres ca, le FOSDEM

It appears that I’m sat in Terminal B of L’Aeroporte Nationale de Bruxelles, waiting for my flight to board. While there are wirelesses around, the ones to which I can connect seem not to be offering much in the way of DHCP so this update will come in later than it was written (which was at 13:35), as I will probably post it while I’m on the bus between Heathrow and Oxford. [Update: actually not until I got home]

Irrelevancies such as that aside, I had a great FOSDEM! In fact, a great half-FOSDEM, as I did my tourism today. I met a load of people (of which more below), went to some inspiring talks and discussed many exciting and interesting projects (in multiple languages – I spoke to one person in English, Dutch and French sometimes in the same sentence). It was a good exercise to see who wasn’t present as much as who was – for instance RedHat didn’t have an official presence although the Fedora Project had a booth (next to the CentOS one ;-), similarly Novell (one of the big sponsors) was absent but the OpenSUSE project had Yet Another Small Table. Sun were conspicuously present in that the OpenSolaris and OpenJDK table was being manned seemingly by Sun’s salespeople rather than user group members…although maybe that’s just my interpretation.

The overriding feeling I got was that the conference was running on l’espirit d’anarchie and that the resulting adrenaline and enthusiasm drove the conference on. The keynote speeches were really the only regimented aspect of FOSDEM – a necessity given the size of the auditorium and that was packed to the rafters with FLOSSers. I didn’t go to the final keynote on open-sourcing Java as I was manning the GNUstep booth, but learned a lot on software patents and Free Software and Jim Gettys’ description of the technical challenges in creating OLPC was very insightful.

So, GNUstep. GNUstep, GNUstep, Etoile [I’ll add the accents in in a later update…this keyboard doesn’t have dead keys :-(]. For a start it was great to meet all the other GNUsteppers, and have some good discussions and debates (as well as some good moule frites and Kwak beer). For anyone who doubts that GNUstep is still alive, the dev room at FOSDEM is one place to allay such suspicions with many developers, designers, users and supporters presenting their ideas to each other, asking each other questions and generally contributing to the GNUstep camaraderie. Even an improptu troll by Miguel de Icaza at the GNUstep booth wasn’t enough to make us all throw Project Center away and buy a book on C# ;-). Presentations on GNUstep-make v2 (which I’ve described here before…), the Cairo graphics back-end (which I don’t think Fred Kiefer was expecting to present, but made a very fine job of it anyway) and third-party use of GNUstep were all very useful and well-received…I expect today’s presentations were too but I didn’t get to go to them :-(. [Instead, I was significantly underwhelmed by the sight of the Mannekin Pis.]

Posted in Etoile, FLOSS, FOSDEM, gnustep, linux | 1 Comment

Fairly cool update to GNUstep

GNUstep-make now supports arbitrary(-ish) filesystem layouts. While the default is still the /usr/GNUstep layout with the various domains, one of the bundled alternatives is to put everything in FHS-compliant locations. Once that hits a release (which I believe will be called gnustep-make 2.0), that should make newbie users and distributors much more comfortable with GNUstep. I also provided a NeXT-ish layout which doesn’t clone the NeXT directory hierarchy, but rather mimics it sensitively.

My work laptop just earned itself a reinstall (I’d been uncomfortable with CentOS for a while, but the facts that hotplug isn’t configured properly and every time I ‘yum update’ I have to fix a handful of drivers drove me over the edge), so when I re-create my GNUstep installation I’ll do it with the new-style make. I’m currently wavering on the side of installing Midnight BSD, but I might wimp out and dual-boot Ubuntu ;-)

Posted in gnustep, linux, midnightbsd | Leave a comment

Where are we going?

Recently, XML seems to have been playing an important role for me…I’ve been working with various XML-RPC frameworks, reviewing a book on XHTML (actually, a book on HTML 4 which occasionally reminds you to close elements) and also dealing with DocBook. For some reason, this means when I read something like Ten predictions for XML in 2007 I feel like I’m in a position to comment. Don’t worry, I don’t want to cover all ten points…

If I had to choose one big story for next year, it would be the Atom Publishing Protocol (APP). […] APP is the first major protocol to be based on Representational State Transfer (REST), the architecture of the Web. Most systems to date have only used a subset of HTTP, usually GET and POST but not PUT or DELETE. Many systems like SOAP and Web-based Distributed Authoring and Versioning (WebDAV) have been actively contradictory to the design of HTTP. APP, by contrast, is working with HTTP rather than against it.

Well, this suits me…a complete bi-directional implementation of HTTP would certainly be pleasant to use. But the point is that you already can do bi-directional transactions with these ugly hack interfaces, which importantly are already in use. This isn’t like moving from rcp to HTTP to do your file uploads, this is like moving from HTTP to a version of HTTP which IE doesn’t recognise for doing your content publication. WebDAV might be ugly but it already allows people to run their Subversion or calendar (yes, I know…) servers over "the web". APP is good but the activation energy may be too high.

2007 is the make-or-break year for the Semantic Web.

s/make-or-//, I believe. I’ve talked to two people who considered themselves important in the world of the semantic web, and have attended a talk by Sir Tim on the subject. I still have yet to see anything beyond so-called blue skies proposals and views on how much better the web will be once everyone embraces semantics, which none of them appeared to have done. At least, there’s nothing yet which has convinced me that Semantic Web is some kind of killer app, and that what it can do can’t already be done with a bit of XML/XSLT and some good schemas. Maybe that’s the point, that traditional web will just slide into Semanticism by dint of XQuery, XProc and the rest of the X* bunch. I don’t think so.

2007 will be the first year in which almost every significant browser fully supports XSLT 1.0 […] I predict that this will render many of the debates about HTML 5 and XHTML 2 moot. Sites will publish content in whatever XML vocabulary they like, and provide stylesheets that convert it to HTML for browser display.

Yup, this couldn’t come too soon. I sorely hope that HTML 5 will be still-born; redundant as soon as it becomes available. I also hope that document-generating frameworks will become better at generating valid markup in the future (which is at least easier to do with XML than SGML)…of course if browsers really do make a good job of supporting XSLT then they won’t really be able to generate invalid markup as they’ll be doing it in their own format.

Apple will release Safari 3 along with Leopard. Although it will focus mostly on Apple proprietary extensions, Safari 3 will add support for Scalable Vector Graphics (SVG) for the first time.

That’s not much of a prediction, unless predicting things means reading the WebKit changelog. What would be good is for a couple of the more popular also-ran browsers to support MathML (I think Firefox already does in some fashion, WebKit is at the "we’re thinking about it" stage, and I really don’t know about any others) so that it has a chance of being adopted. I speak here as an ex-physicist who was annoyed at seeing academics putting DVI or PostScript files on the web, or (and this is just as bad if not worse) HTML with graphics of the equations. If LaTeX could be transformed into HTML+MathML and published on the web then we’d be somewhere approaching the original goal of the Nexus.

Posted in html, xml | Leave a comment

FAQ update

Just a warning about @defs not necessarily being a good idea, some code from Mike Ash to add polish to the forwarding example and…um…I’m sure I added something else. Oh yes, the fact that _cmd is the name of the SEL argument in method definitions.

I’m quite inclined to refactor the FAQ (because the source is basically the XHTML), as something like a DocBook FAQ Article, which might explain any (further) hiatus in updates. I haven’t started working on this yet but it seems more attractive, as I look at the horrendous car crash of formatting produced by a combination of different text editors I’ve been using.

Posted in objc faq docbook | Leave a comment

Why Java is so damned lame, part exp(I*M_PI)

Gah. Back when I used to work for Oxford University, I had to do the occasional bit of Java programming for a WebObjects app. Being quite a bit more familiar with ObjC than with Java, I always found this a bit of a headache…partly the way Java Foundation is semi-bridged with the "real" Java API meant I was constantly referring to my Tiger book (Java in a Nutshell, not Mac OS X Tiger), and partly because ironically Java required a lot more mystical casting voodoo than ObjC…seriously, if I never see the phrase Session session=(Session)session() again, I’ll be a happy man.

Today’s "gah, why can’t Java be as easy as ObjC" moment came courtesy of an algorithmic problem I was attacking at TopCoder, just for the hell of it. Problem is, to get to their problem definitions you have to use their applet thingy, and while I’m there I decided that I may as well type the code into their thingy after all Java’s not that bad is it? [They also accept VB, C# and C++ but my recollection of the C++ class syntax is slim and my knowledge of the STL is slimmer…I do know enough to try and avoid it though] So I think their problem definitions are proprietary, but suffice to say I wanted the ability to compare two strings, returning equal if the strings could be made the same by popping any arbitrary number of characters off the front and shifting them onto the back (i.e. treating them like rings of characters).

Well, that’s simple isn’t it? In ObjC I’d subclass NSString, override isEqual: and Robert is your parent’s sibling. I even know how to do that in Java:

class CircularString extends String {
public boolean equals(Object otherObj) {
//....
}
}

Only…no. You’re not allowed to do that, because for some unfathomable reason Gosling and the boys at Oak decided to inflict on us another voodoo keyword…final. This seems to have one purpose in existence: to stop me from subclassing the String class. In the words of Points of View, Why oh why oh why oh why?

Posted in Java, objc, sucks | Leave a comment

TGD – expanding the field

Some primarily stochastic thought processes which occurred when I tried to apply Richard Dawkin’s hypotheses to the Æsir. If your default browsing font doesn’t contain a glyph for the ligature, well, tough ;-)

I suppose one of the first things to note is that whereas Xtianity is considered a religion, the Æsir and Vanir (the Norse pantheon) are thought more often as folklore or mythology.[1] In fact, upon reading the Eddas it’s easy to have the impression that the sagas of Odin, Thor, Loki and chums have the same qualities as those associated with, for instance, Siegfried (of Das Niebelungenlied fame), King Arthur or Finn MCoul. Essentially, the gods have the air of being erstwhile real blokes (and of course blokesses), who have accumulated stories, feats and powers as people seek to glorify them, in order that when they later claim to be descended from same they can hope to persuade people of the existence of said powers.[2]

What I find interesting is that the only difference between a quirky set of historically interesting tales and gospel truth is how many people believe in what’s said. For instance, it would be easy to apply the same distinction above between religion and folklore to the Roman pantheon, which equally was a major European religion relegated to providing saints and fables once Constantine got splashed in the font. Of course, to do so would be to ignore that there were multiple pre-Christian religions in the Roman Empire. Not merely in the same way that the Norse posh nobs worshipped Odin and the thains worshipped Thor, there were actually completely different mythological universes. I’m going to choose one, completely at random.

Between the second century BC and fourth (maybe fifth) century AD, a particular popular mythos in the Empire was Mithrainism.[3] If there are any modern Mithraists, I don’t know about it. Which is not surprising, considering how wacky their religion was. [Update: apparently some Zoroastrians still venerate Mithras.]

Mithras was supposed to have been born around 270BC to a virgin Mother of God (the date of the celebration of his birth was December 25th). He was worshipped as a member of a trinity, as the mediating force between the heaven and earth. In fact, heaven was not only the celestial abode of God but also the place where atoned souls would go when they died, the true believers being absolved of their earthly sins. Those less fortunate were condemned to an infernal hell. Initiates (ceremonies were closed affairs, available only to men who had performed the appropriate rites) were baptised, and Sundays were a sacred time when the Mithraists ate bread, representing the body of their God, and drank wine, representing his blood; these were symbolic of the final supper he shared with his followers before ascending to heaven in about the 64th year of his life. Along with Odin and Osiris, he is supposed to have died and been resurrected before his final ascension.

You’d never get away with that rubbish these days, which is why this is clearly a deluded heathen folk tale as opposed to, um. You can clearly see why Dawkins didn’t talk about this one in TGD

[1] Actually, there is a religion with such a pantheon, called the Ásatrú – the word is Icelandic for Æsir faith. Despite widespread confusion, none of the major organisations of this faith are actually neo-Nazis or supremacy groups.

[2] I suppose this makes Finn and Aragorn the same being.

[3] Just through etymology I am reminded that I haven’t yet covered Jainism. I need to.

Posted in TGD | 3 Comments