Matthew Walton’s Blog

Friday, 22nd October 2004

If architects had to work like web designers…

Filed under: Programming — Matt Walton @ 8:01

Got this from UFies.org — it’s titled about web designers, but I think it’s true of commercial software development in general. Oh, how it’s true.

Come to think of it, it also applies to Free Software development, and it’s mostly down to people not knowing what they want. In the commercial world, that’s because the sales people don’t know what the customers want, because the customers haven’t thought it through properly, so the sales people figure out what they think the customers are going to buy, and pass that on to the developers with the air of ‘do this and the company will be rich’.

If I sound cynical right now, it’s because I am. Don’t you like nice, simple reasons?

Monday, 23rd August 2004

Of Parrot, Haskell, Triangle and Final-Year Projects

Filed under: Programming — Matt Walton @ 20:54

The last few days I’ve been reading ‘Perl 6 and Parrot Essentials’, 2nd Edition, in order to get a better handle on this whole Perl 6 design issue. A lot of the language design I kind of knew, but bits of it have changed since I last looked at them, and it’s nice to have everything set out in a book, although I know for a fact that some of the bits of the book have now changed as well, because Larry Wall was talking about them on perl6-language the other day. But that’s life when you’re following an under-development language.

Anyway, I mostly got the book to get a decent introduction to Parrot, the Perl 6 runtime, and such it is. Such a good introduction in fact that I’ve decided that, just for fun and to do something different and because I’m pining to write code in a functional language, I’d pick up my final-year project (a compiler for a toy language called Triangle, written in Haskell), rip out the code generator (which doesn’t work very well anyway), and replace it with one which produces Parrot assembly.

Remarkably, this is turning out surprisingly well. I suspect I’m going to have to delve into Parrot’s object definition system in order to simulate records accurately, but most of the rest of it is quite easy — easier than generating C was. Wish I’d done this to start with, I might have actually finished the generator in time for hand-in. I couldn’t have got more than a first for the project of course, but I could have got a higher grade anyway. I like playing with languages, and I like high grades too.

Forgotten how much fun it can be. I know I should really be working on Towel or Westlands, but neither of those really enthuse me at the moment. Towel’s in C++, which I do a lot at work, and Westlands is in PHP, which after doing Perl so much at work is just confusing. Programming professionally has its drawbacks.

If I get all the Triangle compiler up and running to target Parrot, I think I’ll send it over to Graham Hutton, who was my dissertation supervisor. Just to prove I’m still doing things. Maybe I should do that PhD after all…

Thursday, 20th May 2004

The whole GNOME and Mono and Java thing

Filed under: Programming — Matt Walton @ 23:00

Well it’s unlikely anybody involved in the whole thing will ever read this, but I have to write it now because it’s getting on my nerves.

Currently in the GNOME world there is a debate going on, and I don’t think it’s ever going to be resolved to the satisfaction of the participants. The main cause of this debate is the Mono project. As many people who read this blog will know, Mono is an open-source effort to implement a clone of Microsoft’s .NET platform, complete with common language runtime, class libraries and C#, Visual Basic and JScript compilers (at the very least). There’s an ASP.NET container, GTK+ bindings and all that stuff too. Now this is all very fine and dandy and I actually quite like C#. It’s like Java done right.

Now, Mono was developed by Ximian who are now part of Novell, so Novell (which also owns SuSE) is now pushing Mono. Evolution, GNOME’s mail/PIM client, is also developed primarily by Ximian. People there want to start extending it in Mono/C#.

Red Hat have decided that Mono is not suitable for shipping in their products. They believe the patent issues are too problematic. Seth Nickell, being a Red Hat person, agrees with them in a most articulate fashion, as does Havoc Pennington. Who is also a Red Hat person.

I, personally, find the patents issue rather alarming. While it wouldn’t actually be all that beneficial to Microsoft to do it (well, it might be in their muddy world view, but it’s not in mine), they could potentially decide that the RAND grant on their patents on the standardised parts of .NET doesn’t cover open source implementations under the GPL. Bam. Instant court case. And actually one they have a chance of winning. This we do not want.

Imagine that happening if GNOME’s core was by that point partially written using Mono.

Okay, now you’ve recovered from that, let’s look at the alternative most people are punting: Java.

The truth is that Java is at least as bad a choice as Mono. For one thing, it’s a disgusting language, although I admit I’m not necessarily representing the entire world’s opinion on that. Some people actually like it.

For another thing, the licence for Java implementations has some really rather nasty clauses in it, making projects like gcj and GNU Classpath, which are currently the only way we’re going to get Free Software Java, a little bit potentially dodgy. Sun have control over Java and they want to keep it. Microsoft, as is entirely probable, want to keep control over .NET. Fair enough to both of them.

So what can we do? The whole debate assumes of course that GNOME needs a high-level programming language to be used in the core. This is probably true – at least for the applications. I don’t really think it’s appropriate at the moment to write the core libraries in anything other than C, for the sake of the language bindings if nothing else, but…

The main attraction to .NET is not just the C# language, but the CLR. This allows applications to be written in many different languages, which can all, through the CLR, access each others’ objects. C# may create a subclass of a class defined originally in Managed C++, and that class might contain an instance of another class which was defined in JScript, or Python (yes there is a Python implementation on .NET now, and it’s very quick too).

So that’s great. Makes multilingual development pretty good. You can even use Java with it these days (why would you want to though? Still, the choice is there).

But there’s the patents thing, and there’s the fact that the patents are held by Microsoft. Do we trust Microsoft? Of course not.

So. What do we do?

I think everyone should go have a look at Parrot. People may dismiss it, because it’s not ready yet and because it’s being designed as the Perl 6 runtime engine. Which it is, but it’s also a multilanguage runtime which can give us multilingual object access and other such things much like .NET’s CLR does. And guess what – Free Software.

Plus Perl 6 rocks, of course. If GNOME is going to move to anything higher level, I’d really like to see Parrot considered as a runtime, with Perl 6, Perl 5 (Ponie), Python (implementation for Parrot under development) and anything else that runs on Parrot as initial implementation languages. I know they probably won’t run as fast as C# on .NET, being dynamically typed languages and all, but something tells me Parrot has the potential to make a significant impact on GNOME’s advancement.

The question is, do we want this impact to come from the Free Software community, or from Redmond?

Friday, 30th April 2004

My name in lights

Filed under: Programming — Matt Walton @ 10:13

I’m in this week’s Perl 6 Summary — in the perl6-language section, under ‘Hyper mutating methods’.

This pointless blog entry was brought to you by my ego.

Sunday, 7th December 2003

The Towel lives!

Filed under: Programming — Matt Walton @ 21:01

This weekend seems to have mostly consisted of games of Worms 3D, periods of excessive Towel hacking (for which I must be grateful to Jonathan, who’s appearance on MSN the other day helped me get going on it even after a week of C++ programming at work), and periods of inexplicable lethargy and tiredness.

As it turns out, the best way to get over the latter is to spend a while going for the gold cup in Super Sheep Challenge 2, then to spend a while drinking wine and hacking Towel. Fixed a bug in the random track selection code today, did lots of work yesterday, and overall it’s becoming increasingly more useful. In fact, there’s not much more stuff on the list to go in before 0.2.0 can be released!

Woohooo!

Powered by WordPress