ICFP 2001 Contest Results
Phil Bewig writes: "Results of the 2001
ICFP
Programming Contest (previously mentioned at SlashDot
here and
here) have been
announced.
First place is to a program in
Haskell,
second place is to a program in
Dylan,
and the judges' prize is to a
program
in Erlang.
The judges also named
third place
(ocaml)
and fourth place (C) entries that were not awarded prizes.
ICFP Programming Contest pages for prior years are available:
2000,
1999, and
1998."
For those who don't want to click on all the links, the task was to produce a program that would optimise a HTML-like markup language called SML/NG. The programs had to remove excess whitespace, redundant and overlapping tags, and perform other simplifications.
It's hard to be religious when certain people are never incinerated by bolts of lightning.
I've always wanted to get time to sit down and play with languages like Haskell, but never seem to get around to it. I think part of my hesitance (i.e. finding other things to do), is that I'm not confident that it's a commercially useful language.
The same goes for Erlang as well, which just seems to be an Ericsson R&D effort. In fact the only application I've seen written in the outside world in Erlang was Eddie and even that was an in-house Ericsson creation.
But then, the increase in languages has always confused me. When I was browsing through a bookstore one day I was amazed to see a book entitled 'REBOL for Dummies' - who, in their right mind, uses REBOL????
Before everyone runs out and says "Haskell is the best programming language", as seemed to happen with things like OCaml in the past, please bear in mind that the ICFP tasks are somewhat biased toward functional languages. It is principally a contest for functional programmers, after all. This year's task, in particular, seems to be particularly suited to the built-in features of many such languages -- more so, perhaps, than things like the ray tracer task in the past.
It's to the credit of the coders that they produce such impressive results so fast, and it'll certainly be interesting reading when the full details are out. But let's not try to read too much into it this time, OK? Haskell is not suddenly a million times better than OCaml was last year, just because OCaml doesn't feature in the top list this time around. Functional programming still may not be the best approach for writing low-level instrument control code or operating systems.
So, before the millions of posts start arriving, I make a small plea: don't treat this as an objective (no pun intended) programming language comparison!
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
More about the Dylan Hackers' entry; they use (and maintain) Gwydion Dylan.
Functional Objects, Inc. sells Functional Developer, their Dylan implementation, for Windows and soon for Linux.
Whilst looking through the winner's personal info, I came across this page which has quite a photo of ... something bloody attached to his arm ... and a god of vampires link.
It's often said that genius and eccentricity often go hand-in-hand, I'm just not sure what's in the photo. Dare I say it's a vampire bat feeding off the 2001 ICFP Contest Winner's arm? Anyone else know?
Someone has got to get an interview with this guy for slashdot!
Treatment, not tyranny. End the drug war and free our American POWs.
See my user info for links.
I believe that some of the URL resolvers in Slashcode are Turing complete, and by typing in the correct URL you can make Slashcode perform arbitrary calculations (albeit in a very inefficient manner). I'd love to see an entry that worked by taking advantage of that!
Even Slashdot wants to hide some things
Just found this interesting analysis by the captain of the highly-placed Dylan Hackers entry. He uses his own sensible-sounding criteria for rating the entries, obviously somewhat different from the real judges', but not so far off in final results. It makes for an interesting alternative perspective.
BTW, after I earlier posted that this shouldn't be taken as a fair comparison between programming languages, this information shows exactly why. The top entry is written in C++, and didn't figure in the "big five" mentioned by the judges of the real contest. In other words, the languages coming out on top change significantly, based on two different, but both reasonable, methods of ranking the entries.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
For example, Dylan's syntax is based on whitespace; so identifiers are permitted to contain most characters except whitespace and punctuation. (The downside, of course, is that you must type spaces around most operators. However, any character can be escaped with \, and you can even reuse reserved words this way.)
This flexibility gives you a lot of freedom. For example, the official convention uses dashes to separate words; methods/functions that return a boolean value ends with ?; globals are surrounded by asterisks; and types are surrounded by angle brackets. So a method may be named is-camera-on?(), a global may named *game-clients*, and a class may be named <socket-server>.
Dylan provides other small, but distinctive, features. For example, it supports per-file metadata: Any source file can start with an RFC 822-like header, which you'd typically use for version, author, copyright, license and documentation data.
Of course, I haven't even started on the language features. Dylan has an interesting, elegant object model. It has explicit support for "slots", analogous to Delphi's class properties: data members whose access is delegated to accessor methods. It has explicit support for singletons and generic programming. It has multiple inheritance. It has garbage collection, type safety, a modern module system, etc. Dylan is usually compiled, but can be interpreted. Its extremely dynamic nature means that method dispatching and "smart linking" can be a complex affair; this is a weak link, and at least for Functional Developer (formerly Harlequin Dylan), program efficiency is dependent on the compiler being able to do "whole program" analysis.
However, I would hesitate to call it a functional programming language. According to the Dylan reference manual, "Dylan is a general-purpose high-level programming language, designed for use both in application and systems programming". It is a structured programming language belonging to the same paradigm as C++ and Java. There are clear signs of having been influenced by functional programming, though.
The name "Dylan" does not come from Bob or Thomas, but from the phrase "dynamic language".
For more information, I recommend the Functional Objects site. They provide a Windows/Linux-based IDE and compiler for Dylan. The "Basic Edition" is free as in beer.
> a strong object-oriented type system which
> ensures that the vast majority of coding errors
> result in a type error (although it can take a
> little while to get used to Haskell's type system);
Yes, Haskell has a strong type system that finds many errors at compile-time. This is IMHO one of THE arguments why YOU(yes you) should use Haskell. It will make your programs better. But the type-system is not object-oriented. It uses type-classes to provide a way for overloading in the type-system. See this paper, for example.
BTW. Did you know that, because of this type system, Haskell programs cannot segfault.?
Good point. There is no langauge that "best for everything". If Perl can claim superiority at anything though, it would have to be for its unbeatable code obfuscation possibilities :-)
I think the important areas for a langauge:
-Readability
-Development speed
-Run time performance
-Correctness (i.e. encouraging bug-free code)
-Popularity (availability of skilled coders)
-Portability (availability of platforms)
-Libraries (availability of ready-made toolkits)
-Conceptual fit with problem
Work out what you want for your project, prioritise the above and make your langauge selection on that basis.
I do often use Haskell (the winning language) myself, because it is pretty near the top in all except run-time performance (it's more than fast enough) and popularity (I'm a hobbyist, so don't care what anyone else uses)
Every year I see this contest and every year the results are impressive. But I still rarely, rarely see any open source programs of significance written in OCaml, Haskell, etc. Okay, there's a really nice webserver written in Erlang ("eddie"). But with all the frothing about how great these languages are, you'd expect to see the next great program written using one.
..Who don't know what ICFP is (I didn't) and the site's a bit slashdotted, the google cache is Here.
Editors, would it hurt to expand uncommon acronyms in stories?
Send lawyers, guns, and money!
Being slightly more objective, I agree that for a 0% bug rate, C and C++ are not the solution
This reminds me of how things were in tech support. Everybody thought USRobotics modems were bad. So did I until I heard that USR had a *huge* chunk of the modem market. Then I realized that the only reason we dealt with so many crappy USR modems is simply that there were so *many* USR modems.
Same thing applies here. There is a lot of crappy C and C++ because there is so much of it. Let Haskell, OCaml or any of these functional languages become dominant in the industry, and we will see just how crappy they can be.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
That's true of the 99 competition, and maybe to a lesser degree this last competition. But they ray-tracer really was not geared towards functional languages at all. The language was totally trivial to parse and easy to evaluate; the real test was to see how much you could code without making mistakes in just the one weekend.
Almost all of the C/C++ entries were disqualified for crashing or being buggy!
At least for last year's task, I believe this was a fair language comparison in terms of developer productivity.
(Of course, I am biased. 9th place, woo hoo!)
9th place baby!!!
SML rulez!!!!!@!!!
BTW. Did you know that, because of this type system, Haskell programs cannot segfault.?
Perl, Python, TCL, Scheme, REBOL, and Lisp can't "segfault" either, but they don't have such a type system. Haskell is a fine language, but much of its advocacy is misguided (as is much Linux advocacy).
You missed the point. Obviously, C or C++ cannot segfault when run in an interpreter.
And compiled Lisp and Scheme can't segfault either. What's your point?