Thursday 20 December 2007

Redesigning a famous webpage

I came across this page which offers a rethink of a very well-known webpage. I like it - what do you think?

Wednesday 19 December 2007

Noble number

Whilst chatting with the lovely Nadyne at OOPSLA, she came up with the notion of a "Noble number", much like the Erdos number or Bacon number. So, I'm happy to announce that I have a Noble number of 1 as we have just submitted a paper on upgrading in Java (co-authored with Matthew Parkinson and (the) James Noble)!!

Thursday 6 December 2007

Volta is Live

Want to write cool multi-tier Web apps? Don't want to write them in Javascript but prefer VB/C#? Want the compiler to do the tier-splitting for you? Want it to run in any browser (at least any one with a Javascript VM)?

You're in luck! My friend Erik Meijer has been running an elite team in Redmond building exactly this system! A technology preview of Volta is now available from Live Labs:

http://labs.live.com/volta/

Check it out! (And congratulations to Erik and his team.)

Wednesday 5 December 2007

Interview

There's an interview with me in the Slovene press today. For the first time, the topic is my wife! It's her turn in the spotlight as part of the Slovene Woman of the Year competition.

SML/CAML/F# differences

It's all Nick Benton's fault! I just spent a whole day trying to get some of his cool "embedded interpreters" code through F#. Ug. It was very hard to pin this down, but it turned out to be a difference between SML (the language I know and Nick's code is written in) and CAML/F#.

Here's the offending function:

let mypair args =
match args with
((e,p),(e',p')) -> (function (x,y) -> (e x)@(e' y), function [x;y] -> (p x, p' y))

Type this into F# you get the following type:

val mypair : (('a -> 'b list) * ('c -> 'd)) * (('e -> 'b list) * ('c -> 'f)) -> ('a * 'e -> 'b list * ('c list -> 'd * 'f))

Type the similar code into SML/NJ you get the following type:

val it = fn : (('a -> 'b list) * ('c -> 'd)) * (('e -> 'b list) * ('c -> 'f)) -> ('a * 'e -> 'b list) * ('c list -> 'd * 'f)

Looks the same, right? But no. I'd forgotten that CAML treats pairs differently (as you can drop the brackets). What I had meant to write was this:

let mypair args =
match args with
((e,p),(e',p')) -> ((function (x,y) -> (e x)@(e' y)), (function [x;y] -> (p x, p' y)))

[Spot the new pair of brackets!]. Interesting F# claims the type is:

val mypair : (('a -> 'b list) * ('c -> 'd)) * (('e -> 'b list) * ('c -> 'f)) -> ('a * 'e -> 'b list) * ('c list -> 'd * 'f)

Look carefully you'll see the different bracketting. Clearly I still have more SML to forget!

MSR/C#/Functional Programming

I gave a lecture yesterday at the University of Warwick as part of one of the Department of Computer Science's undergraduate courses.

I spoke about two things: Firstly, the way Microsoft Research operates within Microsoft. People are always surprised about how we operate - we're not told what to do by the product groups. What's interesting is to look at other research labs to see how they operate. There's a surprising amount of variation. I was very happy to point the students to Roy Levin's recent paper.

The second thing I spoke about was (surprise, surprise) C# 3.0. More specifically I wanted to emphasize the very strong influence of functional programming on the new features that appear in C# 3.0. [Particularly pertinent as it appears that Warwick was dropped functional programming from its degree course - which is a real shame.] I also wanted to show how formal techniques can and are used in commercial language design.

Overall it was great fun. I'm always impressed by the quality of students at Warwick.