25.1.06

PiDuce

Merging ideas from Pi Calculus, Join Calculus, Xduce, and Cduce. An interesting blend of theory with practice, as they try to build on using XML for communication and WSDL to link to web services. An early paper on the system was coauthored by Greg Meredith, one of the driving forces behind BizTalk.

19.1.06

MapReduce

As David B. Wildgoose put it on Lambda the Ultimate

Tired of talking about Erlang and Telephone Switches? Next time someone asks for an example of functional programming techniques in the "real" world, suggest Google Labs to them.

(Thanks to Will Partain for suggesting this entry!)

18.1.06

Penn, PADL, POPL, and Plan-X

I spent 5-15 January visiting U Penn and attending PADL, POPL, and Plan-X in Charleston, SC.

At U Penn I served on the thesis committee for Vladimir Gapayev, a student of Benjamin Pierce, on the design and implementation of Xtatic, an extension of C# to support XML processing in the style of Xduce. This is one of the few doctoral examinations I have been involved with where the committee agreed to tick off the very first box on the form: absolutely no substantial revisions required. Well done, Vladimir! I also had many interesting discussions, notably with Benjami, Geoffrey Washburn, and Steve Zdancewic, and a great dinner at Django.

At PADL I delivered an invited talk on Links. The audience had scores of useful suggestions afterward; notably Zoltan Somogyi and Manuel Hermengildo suggested I look at updatable predicates in the logic programming community as an approach to integrating database update with a declarative language. My favorite presentations included Steve Kollmansberger on Modeling Genome Evolution with a DSEL for Probabilistic Programming, Kris De Volder on A Generic Code Browser with a Declarative Configuration Language, Zoltan Somogyi on several new twists in the implementation of Mercury, and Erik Meijer's invited talk on LINQ.

Then it was on to POPL. Tim Sweeney, founder of Epic Games, gave a fascinating talk on "The next mainstream programming language: a game developer's perspective". Matthias Felleisen categorized it as "an advertisement for Haskell". This talk reiterated a point I head John Hennessy make when he picked up an honorary degree at Edinburgh: the advent of multicore hardware has made concurrency (and hence functional programming) immensely more important. Sweeney noted that most of the processing in a game is rendering, which can be viewed as purely functional. But there are also about 10,000 objects interacting, which are best treated imperatively. What I found most surprising is that communicating processes (as in, say, Erlang) would not work well for objects in a game: one needs transactions to ensure that when one character transfers hit points or momentum to another that nothing is lost (just as one needs transactions to ensure that when one bank account transfers money to another that nothing is lost).

My other favorite talks were Yitzhak Mandelbaum (with Kathleen Fisher and David Walker) on The Next 700 Data Description Languages; Nils Anders Danielsson (with Jeremy Gibbons, John Hughes, and Patrik Jansson) on why Fast and Loose Reasoning is Morally Correct; and Cormac Flanagan on Hybrid Typechecking.

Erik Meijer posed me the problem of how to integrate groupBy neatly into a list comprehension. I think I found a neat answer based on "Theorems for Free". Watch this space!

Charleston is a lovely city, and I did not see enough of it. It has some fine restaurants: Fig is very good, and Cordavi is superb.

Finally, there was Plan-X. My favorite talk was Alain Frisch on "Ocaml+Xduce", a clever way to integrate Xduce typing into the Ocaml compiler with minimal changes. Other favorites were Mary Fernandez (with Kathleen Fisher, Robert Gruber and Yitzhak Mandelbaum) on PADX (a follow up to the "Next 700" paper) amd Vladimir Gapeyev, François Garillot and Benjamin Pierce on "An Xtatic Experience", a practical example based on Michael Kay's XMLSpec example program for XSLT. This paper covers some of the most interesting results in Vladimir's thesis, taking this entry full circle!

Bikeshed coloring

My experience on the Haskell committee caused me to formulate 'Wadler's Law': time spent in debating a feature doubles as one moves down the following list:

  • Semantics
  • Syntax
  • Lexical syntax
  • Lexical syntax of comments

Ezra Cooper spotted a blog entry that explains the same point, more generally and more eloquently.

8.1.06

Javascript WYSIWYG editor

One application for Links might be a WYSIWYG editor that runs on the client, as a step toward building an IDE for Links in Links, that runs in your browser. Turns out there is already a free WYSIWYG editor available in Javascript aimed at AJAX.

30.12.05

The Perils of JavaSchools, by Joel Spolsky

Maurice Naftalin and Peter Buneman both sent me pointers to this blog entry on the same day. (Peter claims to be the faculty member described in the entry as having almost killed the writer.)

My favorite quote:

I have never met anyone who can do Scheme, Haskell, and C pointers who can't pick up Java in two days, and create better Java code than people with five years of experience in Java, but try explaining that to the average HR drone.


And another favorite quote:

Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable. The very fact that Google invented MapReduce, and Microsoft didn't, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet, the world's largest massively parallel supercomputer.

7.12.05

LINQ: Microsoft goes functional

I finally had a chance to properly look at LINQ.

This is competitive with the DB end of Links. One can write (typed) expressions in the programming language that compile into SQL access. I would say that Links integrates this in a slightly smoother way than LINQ, but the difference between the two is small. So if Links is to establish itself, it will need to focus on client-server integration rather than server-db integration.

What's most interesting about LINQ is the number of ideas from functional programming and programming languages that it incorporates. Functional programmers will see many old friends here, including lists (masquerading as IEnumerable), lambda expressions (with compact syntax: v => e), fold, and the old idea that syntax in the language is just sugar for a sequence of function calls. They have also brought in the important idea of open classes (where one organization can add methods to a class defined by another, without altering the source code). So a lot of good, basic programming languages stuff is sneaking in under the LINQ banner.

I presume Eric Meijer had a lot to do with this. Well done, Erik!

23.11.05

Ontology is overrated

Recommended by Jeremy Yallop.

Hugh and Dave's Wine Store

Example Web site to implement in Links, and to evaluate (recommended by Rodney Topor):

Hugh and Dave's Wine Store, from Hugh Williams and David Lane, Web Database Applications with PHP and MySQL, Second Edition (O'Reilly, 2004).