Slashdot Mirror


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."

100 comments

  1. The task by damiam · · Score: 4, Informative

    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.
  2. Haskell, eh? by PRobinson · · Score: 3, Interesting

    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????

    1. Re:Haskell, eh? by Anonymous Coward · · Score: 1, Interesting

      Erlang is used extensively throughout ericsson - it's not just R&D, it's "mission critical".

      Lots of people use rebol - it's actually quite a nice language, and the network-transparent desktop environment thing is cool, though it's probably destined to be a proof-of-concept footnote to mainstream history.

    2. Re:Haskell, eh? by cthugha · · Score: 5, Informative

      I really recommend that you do sit down with Haskell. IMO, the judges were correct in naming it language of choice for "discriminating hackers". It has:

      • clean, simple syntax (parentheses are used only to override default infix operator precedences, nothing more), including excellent list construction and comprehension;
      • 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);
      • lazy evaluation of expressions: only the parts of your program needed to produce a result are evaluated, which allows you to write programs that left to run would produce infinite computations (e.g. programs to calculate the Fibonnaci series or the sequence of primes) and only evaluate them for the subset of data you need; and
      • partially applied (or curried) functions: you really need to see these in practice, particularly in conjunction with the standard list-processing functions (e.g. map, scan, and fold) to understand their true power (the ability to create lists of partially-applied functions is very cool, although I have no idea how such things might be used).

      With regard to your qualms about lack of use, I understand Ericsson have created their own functional language for in-house use (the name escapes me). Arguably, since we've all got oodles of processor power to spare, there's no reason not to use functional languages in the general applications sector, given their greater reliability.

      If you want more info on Haskell, check out the official website (especially the Ode to Haskell on the humour page, which should give you an idea as to the language's feature set ;)). There you will find interpreters, compilers and other tools for a variety of platforms (incl. Windows and Linux) as well as complete documentation.

    3. Re:Haskell, eh? by gnalre · · Score: 1
      With regard to your qualms about lack of use, I understand Ericsson have created their own functional language for in-house use(the name escapes me).


      Err, that would'nt be erlang by any chance
      --
      Choose your allies carefully, it is highly unlikely you will be held accountable for the actions of your enemies
    4. Re:Haskell, eh? by gnalre · · Score: 1

      Erlang escaped from Ericsson R+D a long time ago, and is used a lot outside Ericsson, especially in
      robustness applications. Theres a tough learning curve, but once you are there its difficult to go back to procedural programming

      --
      Choose your allies carefully, it is highly unlikely you will be held accountable for the actions of your enemies
    5. Re:Haskell, eh? by Theodore+Logan · · Score: 1

      perhaps you already knew this, but in case not (and besides, there may be others who don't): part of the prize in this contest is to have the judge proclaim the language you used to be the "language of choice for discriminating hackers". If the winning entry had been written in VB, they'd have to say it too.

      --

      "If you think education is expensive, try ignorance" - Derek Bok

    6. Re:Haskell, eh? by snarkus · · Score: 1

      don't dismiss erlang so quickly. while not widely used, it is a wonderful language for building distributed systems. among FP types, it is considered one of the more "real world" languages.

  3. ICFP not a programming language comparison by Anonymous+Brave+Guy · · Score: 5, Insightful

    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.
    1. Re:ICFP not a programming language comparison by mikera · · Score: 2

      Not an expert, but isn't Forth used for a lot of embedded and instrument control code?

      Forth certainly has a lot in common with functional langauges.

      Functional/declarative langauges are great where bug-free precision is required because you specify what the results *are* rather than the steps required to produce the result. I'd feel much more comfortable with my mission-critical stuff written in Haskell than C/C++.

    2. Re:ICFP not a programming language comparison by OCatenac · · Score: 1

      I wonder when people will get the notion that there is no "best" programming language. Discussing the suitability (or lack thereof) of a programming language without discussing what sorts of tasks the programming language is supposed to do is just plain dumb.

      --
      Onorio Catenacci

      --

      --
      "And that's the world in a nutshell -- an appropriate receptacle."
      -- Stan Dunn

    3. Re:ICFP not a programming language comparison by Anonymous+Brave+Guy · · Score: 5, Interesting
      Functional/declarative langauges are great where bug-free precision is required because you specify what the results *are* rather than the steps required to produce the result. I'd feel much more comfortable with my mission-critical stuff written in Haskell than C/C++.

      That's a fair point. Playing devil's advocate somewhat, I'll contend that a purely functional paradigm can be more awkward for certain types of job than a procedural language such as C. Note the number of "functional" languages that now offer heavyweight extensions beyond strict lambda calculus style functionality as a result. In those extensions is found extra power, but also some of the risks present in the other languages.

      Being slightly more objective, I agree that for a 0% bug rate, C and C++ are not the solution (and I am a professional C++ programmer, so I have no axe to grind here). The catch is that most (not quite all) real-world programs can tolerate a 0.01% bug rate instead, and that can be reasonably achieved by a competent programmer in non-functional languages as well. At that point, the correctness argument loses a lot of its weight, and you have to consider many other factors as well. Like I said before, which language is most useful often depends deeply on the context in which it will be used.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    4. Re:ICFP not a programming language comparison by Blackheart2 · · Score: 3, Insightful

      Boy, you sound nervous! If this were the "Object-oriented programming language contest," and C++ and Python and Eiffel won, I wonder if you wouldn't be saying just the opposite.

      No one (at least, no one associated with the contest) is saying this is an objective comparison of programming languages or that the winners are the best programming languages for any and all purposes. Indeed, the prize-winners' appelations ("language for discriminating hackers") are so laughable, no one in his right mind would take it seriously.

      This contest is about having fun, taking pride in your favorite language, giving a few kudos where they are deserved, and a little bit of advocacy for a class of programming languages that are overlooked by the programmer community at large. It's not a pissing contest.

      BTW, what is an "objective" language comparison anyway? I am a programming language researcher, and I can think of a few theoretical ways to compare programming languages, but I would think that most programmers-in-the-trenches would be more satisfied with tests that compare languages on real life problems, and these contest problems are not far off from that. So what are you so unhappy about?

      --

      BH
      Fools! They laughed at me at the Sorbonne...!

    5. Re:ICFP not a programming language comparison by Anonymous Coward · · Score: 0

      "most (not quite all) real-world programs can tolerate a 0.01% bug rate instead"

      My experience is that the project needs to be completed as soon as possible. When did you last hear someone say `Its done...the project is finished, the code works perfectly`, and receive the reply `ah, but is the code elegant?`

    6. Re:ICFP not a programming language comparison by lfourrier · · Score: 1

      not often enough

    7. Re:ICFP not a programming language comparison by Anonymous Coward · · Score: 0
      I am a programming language researcher, and I can think of a few theoretical ways to compare programming languages, but I would think that most programmers-in-the-trenches would be more satisfied with tests that compare languages on real life problems, and these contest problems are not far off from that. So what are you so unhappy about?


      Hey slow down cowboy, the parent post suggested people remember that the story isn't about a language shootout...not really related to your outburst.
    8. Re:ICFP not a programming language comparison by crealf · · Score: 1
      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!

      I don't think many are running out shouting "Haskell is the best programming language". Or that functional languages are great for everything ... However for the 4th time in a row, they did extremely well, on a fun and non-obvious programming task. Usually, *some* people claim functional languages are slow or hard to program with, or only useful for toy programs: to some extent the contests proved the contrary.

      I don't agree that the contest favored functional languages at all : the first one (1998) clearly didn't (how many chess or go programs are written in functional languages ?). This one didn't ; it was actually a document/optimization processing contest: it actually favored intelligence, and clever algorithms. Maybe such algorithms can be better be expressed in functional languages ?

      Don't treat this as an objective (no pun intended) programming language comparison!

      It isn't, but do you have more objective programming language comparisons ?

    9. Re:ICFP not a programming language comparison by Unknown+Bovine+Group · · Score: 1
      I wonder when people will get the notion that there is no "best" programming language.


      People will never get this. It's much like fat people getting exercise machines: if every time they watched an infomercial they'd just get on the floor and do sit ups and push ups for a half hour they'd be good to go. (ok maybe some aerobic too).

      --
      m00.
    10. Re:ICFP not a programming language comparison by mikera · · Score: 3, Interesting

      Yeah, I totally agree that you should pick your langauge based on the context. I know enough different languages not to really care which one I use, so it usually comes down to who else will need to maintain the code (Java often wins in this regard....). I can live with 99.999% success rate, though some might regard that as heresy :-)

      Interestingly, I *used* to think that pure functional languges were inconvenient, particularly for stuff like IO and user interfaces.

      I have now changed my opinion after investigating a concept called "Monads". These are seriously cool, they are an abstract data type that effectively descibes an "operation". They basically allow you to capture procedural/OOP type concepts of state, communication etc. in a purely functional manner.

      Techniques like this may be the key to achieving the best of both functional and procedural/OOP worlds. You get all the accuracy and development speed advantages of functional languages, but gain the ability to manipulate state and interact with the world in a procedural style.

      Extremely cool, though it's a tricky concept probably best left to computer scientists and the more hardcore coders....

    11. Re:ICFP not a programming language comparison by Lathi- · · Score: 1
      I agree that for a 0% bug rate, C and C++ are not the solution (and I am a professional C++ programmer, so I have no axe to grind here). The catch is that most (not quite all) real-world programs can tolerate a 0.01% bug rate instead, and that can be reasonably achieved by a competent programmer in non-functional languages as well.

      If only this were true. We've all seen here on /. the complaints about crappy programs with high defect rates. Are we to assume that all of these programs were written by un-competent programmers? I would guess that the average bug rate for C/C++ programs is quite a bit higher than 0.01%. I would also suggest that this kind of "This bug rate is low enough" attitude is why we have such crappy software.
    12. Re:ICFP not a programming language comparison by Junks+Jerzey · · Score: 2

      Note, for example, that some of the top OCaml entries in the past were from the designers and implementers of the OCaml language and compiler. This year, the Judge's Prize, for a program written in Erlang, went to a team including the original architect of Erlang, plus the author of the Erlang compiler. So the poster is correct in that this is not a battle of languages, but rather a battle of top notch programmers, each using his or her pet language.

      A serious C++ entry, for example, would be from a team headed by Bjarne Strousrup.

    13. Re:ICFP not a programming language comparison by ralphbecket · · Score: 1

      It would be smashing if the results of the last four ICFP contests (the declarative languages generally left the imperative ones standing) at least encouraged more hackers to try functional programming and see what all the fuss is about.

      For the record, the ICFP problems can hardly be said to be tailored to FPLs, although there probably is some truth in the suggestion that you get a higher proportion of docs/post-docs using them (lo! another hint!)

    14. Re:ICFP not a programming language comparison by gmarceau · · Score: 1

      There should be a c++ lab somewhere to run the dual constest of the ICFP. Same format, same rules, but have the challenge be similarly tinted towards imperative and OO programming.

      I'm sure it would inject great vigor in 4th generation language research. They need all the help they can to bring them away from traditionnaly functional problems.

      And it would make me happy. I hate waiting the whole year to see my favorite constest come back.

      --
      This post was compiled with `% gec -O`. email me if you need the sources
    15. Re:ICFP not a programming language comparison by Anonymous Coward · · Score: 0

      Another thing to consider is, supposing you have an 0.01% "bug rate", what happens when a bug case triggers?

      There's a big difference between one out of every 10,000 cases making your program segfault, compared to it just causing an isolated error, logging it, and carrying on.

      If your program was a webserver and you had an obscure bug that segfaulted it, then you're broken - denial of service attacks can kill you, and we'll be reading all about it on slashdot. If it just caused a "500 Internal server error" and continued, it's not such a big deal.

      Imagine the difference if Microsoft's famous "winnuke" bug had just caused packets with out-of-band data to be dropped or terminate the connection, instead of crashing the operating system.

      Erlang does a great job of tackling programming errors "head on": it starts with the assumption that any part of the system _could_ fail, and has good ways of isolating failures and recovering from them. Then you can say "OK, I probably have some bugs, but I'm Pretty Sure that they can't break the system as a whole."

      And that's particularly good when you're writing new programs and want to put them "out into battle" as soon as possible.

    16. Re:ICFP not a programming language comparison by YoJ · · Score: 2

      People should also consider that the Camls R Us team (who have won the competition using OCaml) were the ones running the competition, so they didn't have an entry!

    17. Re:ICFP not a programming language comparison by Anonymous+Brave+Guy · · Score: 1
      We've all seen here on /. the complaints about crappy programs with high defect rates. Are we to assume that all of these programs were written by un-competent programmers?

      Yes.

      That was a serious comment.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    18. Re:ICFP not a programming language comparison by Anonymous+Brave+Guy · · Score: 1
      Boy, you sound nervous! If this were the "Object-oriented programming language contest," and C++ and Python and Eiffel won, I wonder if you wouldn't be saying just the opposite.

      No, I wouldn't.

      No one (at least, no one associated with the contest) is saying this is an objective comparison of programming languages or that the winners are the best programming languages for any and all purposes. Indeed, the prize-winners' appelations ("language for discriminating hackers") are so laughable, no one in his right mind would take it seriously.

      Sadly, numerous people on /. do take these things as if they were a sudden divine indication of The Way To Go. Just look at any of the past threads on the subject; try OCaml as a keyword in a search. They are absolutely littered with silly language advocacy. I hoped that by getting this comment in early on this thread, we could avoid that this time around and stick to the interesting, factual discussion.

      BTW, what is an "objective" language comparison anyway?

      In real terms, there's probably no such thing.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    19. Re:ICFP not a programming language comparison by brucehoult · · Score: 2
      Before everyone runs out and says "Haskell is the best programming language", as seemed to happen with things like OCaml in the past


      OCaml didn't happen to win this year, but there were a number of OCaml programs in the top 20 or 30 (out of 170) entries. It's still a great language and one that I admire a lot (but I still prefer Dylan...)


      please bear in mind that the ICFP tasks are somewhat biased toward functional languages


      In what way? I don't think that's true. With this year's task, for example, with a suitable amount of brains and understanding of the problem it turns out that you could write an *extremely* good entry quite simply in C -- using a technique called "Dynamic Programming" you could read the input and find its length (call it N), create an NxN array, and write a fairly simple 3-deep loop to iterate over the table to fill it in. I guggest you go and look at Tom Rokicki's excellent page to see how. If he'd got it finished in the 72 hours then he would have won the contest.


      Of course that's the thing. He didn't get finished in time, which is the whole point of the contest. Tom was prototyping in Perl and then rewriting into C for speed. With Dylan we didn't need to do that. We could prototype in Dylan without worrying about declarations and types and fiddly things, and then when we found some part was too slow we could stay within Dylan and add a few declarations where they were most needed, rather than having to totally rewrite the program. That's the strength (by design) of Dylan.

    20. Re:ICFP not a programming language comparison by brucehoult · · Score: 2

      Note, for example, that some of the top OCaml entries in the past were from the designers and implementers of the OCaml language and compiler. This year, the Judge's Prize, for a program written in Erlang, went to a team including the original architect of Erlang, plus the author of the Erlang compiler. So the poster is correct in that this is not a battle of languages, but rather a battle of top notch programmers, each using his or her pet language.

      A serious C++ entry, for example, would be from a team headed by Bjarne Strousrup.


      There is probably a little validity to this, but I don't think it's the whole story.

      First, there are a lot more entries (171 this year) than there are languages used, so not *everyone* can be the designer of their language.

      It probably is a slight advantage to be the designer or implementor of the language just because that means that you're probably pretty familar with it. You also get to be able to fix any compiler or library bugs that you find during the contest, but that applies to anyone using an Open Source compiler, not just the original author. We didn't make any changes to the Dylan compiler during this contest but we did note a couple of performance problems in the standard library when it was abused with huge inputs, and we'll be fixing those soon.

      It's obviously not *necessary* to be the implementor of the language. The winning team (Haskell Carrots) didn't invent Haskell. The guy who wrote "Beamer" (which looked as if it might win until it failed on some later test files) certainly didn't design C++. And none of the Dylan Hackers invented Dylan. We weren't even the brilliant people at CMU who wrote the compiler we're using -- we're just running as hard as we can to prevent bitrot and make a few small enhancements to it.

      For myself, I'm probably far more expert in C++ and Java than I am in Dylan (my current job is taking a 400,000 line Windows program written in C++ by a couple of Russian guys and figuring out how to port it to Mac and Linux) but I know enough Dylan to know that it's the far better language. It's far faster to write in, far simpler than C++ while still offering all the power, and it can generate extremely fast programs.

      Some languages do have a reputation for requiring a PhD in order to understand them. I've tried writing programs in OCaml and Haskell and something about them just doesn't sit well with me. And I read the Haskell Carrots' scientific-paper writeup and my head spins about twice per paragraph. Did they really think about all that stuff during the 72 hours? We Dylan Hackers couldn't think of any "literature" to consult for algorithms, and didn't write any proofs -- I guess we were too busy hacking :-)

      Another factor is that with a language that doesn't yet have many users it's far more likely that it will be the language designer using it. Who else is there? Languages such as Dylan, Erlang and OCaml are virtually unknown among the general programming community, not because they are bad languages but just because they are new and they don't have Sun's or Microsoft's billions of $$ behind them -- and those companies design and use programming languages as political weapons rather than as the best programming languages they can be.

      Even if you still believe that this is really "a battle of top notch programmers" rather than a contest of languages, I think it's still pretty interesting to see what languages top programmers choose to use. Aren't they likely to choose pretty good languages?

    21. Re:ICFP not a programming language comparison by ccshan · · Score: 1

      I would very much like to see a programming contest that is somehow tinted towards imperative and object-oriented programming. I am curious though -- what kinds of challenge tasks would you consider so tinted? It can be difficult to come up with programming problems that admit reasonably objective judging criteria, and for which submissions can be expected to span a spectrum of quality from good to bad.

    22. Re:ICFP not a programming language comparison by ralphbecket · · Score: 1

      FOR THE LAST TIME, THE ICFP CHALLENGES ARE NOT TAILORED FOR DECLARATIVE LANGUAGES!

      Do you think language researchers sit around thinking, "Hmm, today I will add yet another obscure and utility-free aspect to my carefully-constructed-to-be-useless language"?

      These languages are designed for universal utility and/or to do research into better ways to solve problems faced by contemporary programmers working with C/C++/Java/... They are not niche languages.

      It would be so nice if people would go and try these things out for real before spouting this sort of utility-divide crap.

    23. Re:ICFP not a programming language comparison by gmarceau · · Score: 1

      Hard to say. Hard to say since any such judment of mine, if based on the values of the particular problem, would be subject to the bias of my own education.

      I would attempt maybe the acm programming constest were more imperative. Of particular notice, the problems where the best pure-functional code is provably less efficient (in the big-O sence, and they exists). Those problem will tend to have massive non-local garbage collecting going on and/or degenerative lazy-hunks allocations patterns.

      --
      This post was compiled with `% gec -O`. email me if you need the sources
    24. Re:ICFP not a programming language comparison by gmarceau · · Score: 1

      >FOR THE LAST TIME, THE ICFP CHALLENGES ARE NOT
      >TAILORED FOR DECLARATIVE LANGUAGES!

      I refused to judge of the declarativeness of the challenges for fear of exposing my own bias. I would say though the orginizers are doing a might good job at comming up with cool challenges.

      >Do you think language researchers sit around
      >thinking, "Hmm, today I will add yet another
      >obscure and utility-free aspect to my carefully
      >constructed-to-be-useless language"?

      >These languages are designed for universal
      >utility and/or to do research into better ways to
      >solve problems faced by contemporary programmers
      >working with C/C++/Java/... They are not niche
      >languages.

      Well, I've seen alot of mislead language-design going on. I saw many preaching : "computers are getting faster so we can affort our language to be slow". It's sad to see how many languages failed because of this premise; Java is certainly surfering from it everyday.

      This, along with other pervasive misconceptions, the need to create niche languages to explore particular aspect of languages design, and just the raw fact that's it's pretty hard to grow a languages to full general usefulness; With all that, alot of languages don't make it, sadly enough.

      Anyway, do you have more examples of non-niche aspiring 4th generations languages? I'm somewhat familliar with the efforts of Ocaml and Haskell. Their aspiration as non-niche multi-paradims languages is fresh, difficult and brave.

      --
      This post was compiled with `% gec -O`. email me if you need the sources
  4. Dylan links by menozero · · Score: 2, Informative

    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.

    1. Re:Dylan links by TangoCharlie · · Score: 1

      I clicked on the Dylan link in the main post and got to the PCAI Dylan site. The first thing I saw was: "Overview: Dylan is a new object-oriented dynamic language (OODL) being developed by Apple. " Then I had a lok around and found out that Apple pulled the plug on Dylan in late 1995. Aparently, it had been being developed at Apple's Cambridge labs. (Don't bother trying to follow that link... it's DEAD!) A better link is http://dylanpro.com/DylanExchange.html. Does anyone know if the Dylan language is being actively developed by anyone? Or do they have any other resources?

      --
      return 0; }
    2. Re:Dylan links by andreas · · Score: 1

      See the posting you're referring to, both the Gwydion Dylan compiler (open source) and the Functional Developer (closed source) are being actively maintained.

    3. Re:Dylan links by brucehoult · · Score: 2
      I clicked on the Dylan link [pcai.com] in the main post and got to the PCAI Dylan site. The first thing I saw was: "Overview: Dylan is a new object-oriented dynamic language (OODL) being developed by Apple. " Then I had a lok around and found out that Apple pulled the plug on Dylan in late 1995.

      I don't know why that particular link was used by whoever submitted the story. There are certainly more appropriate ones.

      Dylan started out around 1990 at Apple's Advanced Technology Group, which wanted a single language that would meet all the needs of different groups then using Common Lisp, Smalltalk and C++. Apple worked closely with people at Harlequin (who were selling Lisp and ML development systems and consulting services as well as a popular PostScript RIP) and Carnegie Mellon University (who do major programming language research, and produced the Open Source CMUCL compiler for Lisp).

      The three groups agreed on a spec and started implementing compilers for Windows (Harlequin), Macintosh (Apple) and Un*x (CMU).

      The subsequent history is sad.

      Apple started making big losses in its core business and cancelled projects and products all over: Dylan, Newton, OpenDoc... The Dylan group managed to get out an alpha-quality version and Apple sold it very cheaply ($30) for a while. Very very cool stuff, but still buggy :-( No doubt the source code for it all still exists somewhere within Apple. Maybe it will someday see the light of day.

      The CMU "Gwydion" project lost some funding and changed direction a little, and stopped Dylan development. Fortunately, they released their work to the public domain and we "Dylan Hackers" have been able to pick it up and (too slowly :-( ) polish it towards finished form.

      Harlequin hit some financial problems and were acquired by someone who wanted their PostScript technology. The language implementations were I think mostly closed down, but the Dylan team managed to get the rights to their work and formed a new company, Functional Objects, to continue it.

      Does anyone know if the Dylan language is being actively developed by anyone?

      Functional Objects has a very nice Windows IDE. Since getting the rights from Harlequin they have put out a 2.0 (and 2.01) version on Windows and just this month they have started an alpha test program for a Linux command-line compiler.

      The open-source Gwydion Dylan is being actively improved, with a significant new release being issued roughly every six months over the last three years (hmm ... I'm not even sure it that's deliberate ... we tend to do a release shortly after someone checks in some major improvement rather than to a time schedule...). We've taken the original CMU implementation which ran mainly on HPUX and extended it in a number of ways.
      • It now runs on Linux, LinuxPPC, MacOS 9, MacOS X, BeOS, FreeBSD, Windows and goodness knows what other versions of Unix -- I believe it may have been running on Itanic for quite some time, somewhere deep inside Intel and/or HP...
      • Improved language conformance. We're just about 100% DRM-compliant now. We work closely with Functional Objects on language extensions and library issues, so that source code is portable.
      • Performance improvements. The guys at CMU did a wonderful job, but sometimes they just wanted to make things work rather than make them work fast. The generated code is mostly excellent, but the compiler itself takes too long. We've made big advances in this but there's still a way to go.
      • Interfaces to the real world. We're working on automatically generating interfaces to C code. It's always been possible to write interface functions manually, and people have done it for the Mac toolbox, GTK, OpenGL and other such large libraries of code but it's rather tedious to do it manually. Automatically divining the intent of C header files is not however all that easy a problem :-(


      We're very pleased that Gwydion Dylan has recently become a standard package in the FreeBSD and Debian GNU/Linux distributions.

      So, in summary: Yes, Dylan is being actively developed, by more than one group.
  5. KenShan and Vampires? by small_dick · · Score: 2

    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.
    1. Re:KenShan and Vampires? by mirko · · Score: 1

      Could be some ritual thing, but he doesn't seem that harmful, except to himself...

      Anyway, it seems that KenShan is also the writer of a superb multiplexing output Perl module.

      --
      Trolling using another account since 2005.
  6. Re:Slashcode? by Proud+Geek · · Score: 2

    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

  7. Different ways of scoring by Anonymous+Brave+Guy · · Score: 3, Informative

    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.
    1. Re:Different ways of scoring by Blackheart2 · · Score: 2, Insightful

      You neglect to mention the significant fact that the ranking on that page only takes into account the first round results.

      --

      BH
      Fools! They laughed at me at the Sorbonne...!

    2. Re:Different ways of scoring by Anonymous Coward · · Score: 0

      In addition to Blackheart2's comment, note that that methods of ranking should be determined blind: ie., by someone who has seen the problem but none of the solutions. Ideally this is done before the contest is run. That is the only way to ensure impartiality.

    3. Re:Different ways of scoring by wocky · · Score: 2, Informative

      As the author of Beamer (the C++ program mentioned), I'll add one comment. The program uses a beam search and produces excellent results for all the tests on the machine I used for development. Unfortunately, that machine has 512MB of RAM, and the contest machine has 256MB. I discovered after the deadline that the priority queue used for generating the set of next candidates in the beam search can grow unreasonably large in some cases. For the last two test cases used, this is enough to start the thing thrashing in 256MB, and then it never finishes. A hard limit on the queue size wouldn't have affected the quality of the results, but hindsight is 20/20. Given the oversight, Beamer clearly didn't deserve to win. Lesson: set a reasonable data size limit when developing :-).

      --
      David
    4. Re:Different ways of scoring by ccshan · · Score: 1

      Please post a write-up! (:

    5. Re:Different ways of scoring by wocky · · Score: 1

      Here's a link to the tarball I submitted, with the source and a README that describes the program in a little more detail.

      --
      David
    6. Re:Different ways of scoring by brucehoult · · Score: 2

      Just found this interesting analysis [hoult.org] 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.

      Thanks for that.

      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.

      I'd been wondering what happened to "Beamer" myself, but it seems that it crashed&burned on several later input files by using too much VM and going into swapping and never terminating. A pity, because it was obviously a great effort, but it's those little correctness details that make or break an entry in a contest like this.

      On the correctness topic, it's interesting that both our programs and the winning Haskell Carrots entry failed on the empty input file and the <PL></PL;> test. In the case of the Haskell program they had a shell script to catch the crash and output a fallback solution (the original input). I refuse to do such things as a matter of principle -- I think you should be able to handle it within your program itself. Both Dylan and Haskell (and OCaml, and others...) are supposed to be "safe" languages that can never segfault. Do we believe our own propaganda, or not?

      So, these inputs caused an "array index out of bounds" exception in some part of our code that was making unwarranted assumptions about the input (that it actually contained at least one printable character!), and this exception was safely caught by a handler in the main program.

    7. Re:Different ways of scoring by ccshan · · Score: 1

      As you may already know, it is perfectly possible to do with Haskell what did with shell scripting, but we found shell scripting easier. I don't see Haskell as a hammer for every nail, even though you can hit a lot of things with it. (:

  8. eh? by Anonymous Coward · · Score: 0

    "and the judges' prize is to a program in Erlang."

    what does that mean?

  9. Dylan by Earlybird · · Score: 4, Informative
    Dylan is a lovely, lovely language. At times awfully verbose in a way that reminds me of Ada, but its syntax and design is different. Its design is consistent and thoughtful, and the language is blissfully free of the cruft we see in C++ and Java.

    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.

    1. Re:Dylan by andreas · · Score: 2, Informative

      Well, according to the definition, a functional language is one where functions are first-class objects. In mathematics, the term "functional" means "a function that can be applied to other functions".

      By this definition, Dylan is a functional langugage, it even supports currying, function composition and closures.

      But Dylan isn't a purely functional language, like Haskell is, but supports a mixture of other paradigms. Also, Dylan has no parametric polymorphism. In this sense, it's close to Scheme.

      And "Dylan" does come from Bob and Thomas, but Apple could never admit that, otherwise they would have lost quite some law suits.

    2. Re:Dylan by HughG · · Score: 1

      Well, it depends on which "the definition" you choose :-) Some people take "functional" to mean "like a mathematical function", that is, without any side effects. I usually just say "a language with higher-order functions" (or don't say anything, and just keep out of the discussion ;-).

      BTW, I used to work at Harlequin and heard once that (back at Apple) Dylan used to be called "Ralph", after some guy on the project, until he left the project. Could be a complete fallacy, though -- can anyone confirm that former name?

    3. Re:Dylan by andreas · · Score: 1

      A former Apple developer confirmed that Dylan was called Ralph initially, back when it was used for the Newton.

      They even had a prototype operating system for the Newton written in Dylan, but management decided against that.

  10. Re:Haskell, eh?-correction by affenmann · · Score: 2, Informative

    > 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.?

  11. Best language? by chris.bitmead · · Score: 1

    There are always plenty of people on Slashdot
    willing to point out that there is no best language, only the best language for certain use. While there is certainly truth in that, it's usualy used as a poor excuse to excuse using perl or some other monstrosity, and the people saying it would have no idea whether Haskell or Scheme or Eiffel or whatever would be much better than their use of C or perl on the theory "I think this is the best language for this use", when likely it is not at all.

    1. Re:Best language? by mikera · · Score: 2

      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)

  12. Haskell? yuck. by Anonymous Coward · · Score: 1, Interesting
    We all get forced to use Haskell in our first & second years at Uni. and 95% of us hate it, especially those of us with previous programming experience.

    It is completely alien to those people who are used to C/Perl/Java/Basic type languages, it is obsessively recursive (which scares a lot of people).

    It also by default uses whitespace to determine nesting, and HUGS (the compiler we use) gives error messages that look like garbage: complaining about unexpected brackets when there are no brackets in the whole program (the brackets are implied by the whitespace).

    The combination of an eccentric compiler and the fact that Functional languages are 'alien' makes most of us hate Haskel and most 'Hackers' would rather shoot themselves or use Visual Basic than use Haskel.

    BUT if you can cope with recursion (which you should) and are willing to forget a lot about 'normal languages' and learn functional languages, (HUGS is fine too once you get used to it and is free so its unfair to complain), then Haskel can produce beautiful simple concise programs and 5% of the course love it (those that know how to use it - you might even call them software engineers [not hackers]).

    -I should be working but I doubt my license is valid.

    1. Re:Haskell? yuck. by Anonymous Coward · · Score: 0

      Every time a good programming language is discussed on slashdot some idiot always gets moderated up for being too stupid to understand it.

  13. Anybody active in both Dylan and Scheme? by brlewis · · Score: 1

    Reading through some of the example code on the Dylan team's page, much of the style seems similar to Scheme, but without the paren notation. I find the paren notation easier to scan, but then I use Scheme a lot and no Dylan. Can someone who works actively with both Dylan and Scheme make a comparison?

    I understand Scheme was a big influence in the design of Dylan.

    1. Re:Anybody active in both Dylan and Scheme? by dadams · · Score: 1

      Dylan used to be a lot closer to scheme, using prefix notation complete with large numbers of paren's. Descriptive variable and function names are important in both Scheme and Dylan, things like 'full?' and 'set!.' A lot of early Dylan compiler work was done in Scheme & Lisp. Thomas, the Dylan-like compiler was written in Scheme, Apple's Dylan was written in MacLisp. The biggest difference is that everything in Dylan is an object, including functions, classes. Also, Dylan has a much stronger module system, some really interesting stuff in terms of sealing, and a flexible type system.

      --
      --"In dreams begin responsibilities" - Delmore Schwartz
  14. judging criteria? by Tilps · · Score: 0

    I look ... and wonder how the judging criteria worked ... since I would have to agree with the guy from the dylan team about who should have won. Based on the results I can see that is...

    Admitedly the algorithm of the winning team sounds kinda cool...

    *wont possibly consider anti-c++ bias...*

    --
    Sigs are for wimps. I am proud to be one.
    1. Re:judging criteria? by damas · · Score: 1

      The elimination round results were posted shortly after the contest. Beamer was clearly the winner...

      Maybe they couldn't take it?

      The horror... the horror :)))

  15. Haskell: the weasely friend language by Unknown+Bovine+Group · · Score: 1

    "That's a lovely function you've got there, Mrs. Cleaver."
    -Eddie 'Lambda' Haskell

    --
    m00.
    1. Re:Haskell: the weasely friend language by Anonymous Coward · · Score: 0

      hask-el not hask-ul

      Slashdot is retarded because the first time
      I posted this, it gave me some retarded message compression error.

  16. What happened to Beamer in C++? by damas · · Score: 1

    This is the program that got the best results (if I can read the score table). Where is it?

    1. Re:What happened to Beamer in C++? by Anonymous Coward · · Score: 0

      Dangerous speculation: They tested a lot of other inputs in later rounds, perhaps Beamer failed on one of them.

      It would be rather pleasing to FP'ers if Beamer had the best algorithm, but failed due to a pointer or memory managing bug!

    2. Re:What happened to Beamer in C++? by andreas · · Score: 1

      The judges used different ranking criteria than Bruce Hoult did. The judges didn't consider speed except as a tie-breaker, whereas Bruce always gave scores for speed.

      It could also be that Beamer was eliminated due to bugs not turning up with the first few files. We will see when the judges publish the complete results.

    3. Re:What happened to Beamer in C++? by wocky · · Score: 1

      I wrote Beamer; for an explanation of what went wrong, see here.

      --
      David
    4. Re:What happened to Beamer in C++? by Tom7 · · Score: 1


      I know it didn't get best results in all of the tests; our program was the best for one of them. =)

      Maybe it was disqualified for crashing or producing incorrect results?

  17. Scheme was a huge influence... by Anonymous Coward · · Score: 1

    Yes, Dylan was very much influenced by Scheme, and a number of very big wheel Lisp-hackers (like Moon) were involved in its design.

    You can map Dylan's constructs pretty much one-for-one to Scheme. The big difference between Scheme and Dylan is that Dylan is completely OO in design, and has an object system that is reminiscent of CLOS or Cecil's -- multimethods and generic functions. Perhaps as a result, Dylan also has a vastly larger standard library than Scheme does, though the SRFI process will with luck eventually alleviate this somewhat for Scheme.

    Dylan also limits continuations compared to Scheme, so that they have a dynamic lifetime and can be only called once, so that code can be compiled to use a stack efficiently. (You can't code coroutines with Dylan's block() statement, so there's a separate threading standard to cope with this.) Like Scheme, Dylan also has a hygienic macro system, and this is used to implement most of Dylan's control structures, like loops, case, and select statements.

  18. Love to see these languages outside of contests by Junks+Jerzey · · Score: 2

    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.

    1. Re:Love to see these languages outside of contests by Anonymous Coward · · Score: 0

      It's mostly a problem of chicken and egg, at least in the comercial software world. You know; employers want to use languages they know lots of people know, and programmers learn languages so they can geta job.

      Now in the free/open source software world, there should be less resistance to using the right tool for the job. Haskell is just beginning to be used for non-accademic projects. Check out the GTK+/GNOME bindings for Haskell www.cse.unsw.edu.au/~chak/haskell/gtk/

      We could really get some extra leverage over comercial software by using better languages, especially for things like proto-typing where performance is less important.

    2. Re:Love to see these languages outside of contests by andreas · · Score: 1

      Just for completeness: There's a GTK+ binding for Dylan as well.

      And Dylan was designed with performance in mind, and it is able to compete with C in terms of speed.

    3. Re:Love to see these languages outside of contests by ccshan · · Score: 1

      http://www.fftw.org generates pretty damn good Fast Fourier Transform code using an OCaml engine.

    4. Re:Love to see these languages outside of contests by brucehoult · · Score: 2

      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.

      While designers of better languages like to spread the word far and wide, it seems that people actually using them often regard their choice of language as a competitive advantage and try to keep it a secret.

      An excellent example is described by Paul Graham who got rich by writing what is now Yahoo! Store in Lisp but deliberately kept very quiet about that fact.

      So if you notice that I'm suddenly not mentioning Dylan any more then you'll know what is happening :-)

  19. Sampling by Anonymous Coward · · Score: 0

    it actually favored intelligence, and clever algorithms. Maybe such algorithms can be better be expressed in functional languages ?


    Maybe clever programmers tend to use more challenging, less commonly used languages. The programmer may be more important than the language.

    (Myself, my favorites are, in order, Scheme and Haskell.)

    1. Re:Sampling by ralphbecket · · Score: 1

      Clever programmers choose sharp tools, not ones that make the problem harder.

  20. For those of us too late... by G-funk · · Score: 2

    ..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!
  21. The USRobtoics Effect by istartedi · · Score: 2

    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"?
    1. Re:The USRobtoics Effect by mikera · · Score: 1

      Hmmmm.... you might be surprised how hard it is to write a buggy program in Haskell.

      There are no pointers. No segfaults, no pointer arithmetic, no array out of bounds.

      It's strongly typed, so most bugs just don't compile in the first place.

      It's a pure functional language with no side effects, which means that functions are nicely compartmentalised and can't mess with global variables, or indeed affect anything else in the program other than their return value. This is also great for testing.

      There are no mutable variables (though you can simulate them with Monads if you like). This avoids a lot of bugs since it encourages you to write in a style where you're not trying to keep track of a load of changing variables.

      You implement looping and control constructs with lists and/or recursion, which tends to avoid bugs with boundary conditions. Also leads to some impressively compact code.

      You get lots of reusability through polymorphism and first-class functions, which means you're not endlessly rewriting similar code (and invariably forgetting to update one instance...).

      Haskell uses Lazy evaluation, which means that things don't get calculated until they are needed. This allows amusing tricks like using infinite sized data structures:

      ones = 1 : ones

      (defines an infinite list of ones)

      or:

      numsfrom x = x : numsfrom (x+1)

      positiveintegers = numsfrom 0
      naturals = numsfrom 1

      (all positive integers and naturals)

      Numbers are arbitrary length integers, so no problem with data type size.

      Programs are written as declarations, so it is usually easier to spot logic errors. Check out the Haskell and C implementations of Quicksort for example.

      Basically, I reckon that if everyone coded in Haskell or some other functional language, there genuinely would be less coding errors, for quite a lot of concrete reasons as listed above. This goes quite a long way to explaining why the functional languages do so well in contests like the ICFP.

  22. Erlang - in real use by Anonymous Coward · · Score: 0

    * Ericssons AXD301 ATM switching system
    http://www.ericsson.com/review/1998_01/

    * Alteon WebSystems iSD (Integrated Service Director) SSL Accelerator
    see review at:
    http://www.networkcomputing.com/1212/1212f46.html

    Enough?

    /RogerL

    1. Re:Erlang - in real use by DozePih · · Score: 1

      Another good paper is Mr.Wiger's Four-Fold Increase in Productivity and Quality which can be found http://ais.gmd.de/~ap/femsys/wiger.pdf

  23. The Ray-Tracer was, I think. by Tom7 · · Score: 2

    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!)

  24. 9th place!! by Tom7 · · Score: 2

    9th place baby!!!

    SML rulez!!!!!@!!!

  25. Re:Haskell, eh?-correction by Junks+Jerzey · · Score: 2

    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).

  26. Re:Haskell, eh?-correction by affenmann · · Score: 1

    > Perl, Python, TCL, Scheme, REBOL, and Lisp can't > "segfault" either
    You missed the point. Obviously, C or C++ cannot segfault when run in an interpreter.

  27. Re:yuck. by Anonymous Coward · · Score: 0
    The above post was based on discussions involving members of 4 yrs (400 students) of a Computer Science course (at "Probably the best university in the world TM"), where given the choice only about 5 people per year voluntarily choose Haskell over Java. We get set assignments - some quite similar to this one and have to answer them either in Haskell or Java and we almost always choose Java.*

    The post explains the reasons behind the dislike of Haskell amongst most students and other programmers. You cannot dispute that Haskell and functional languages are wierd to most people, who've been brought up on 'normal' languages (ranging from Assembler to C/Java/Perl/etc). Recursion is your friend, but unfortunately it scares a lot of people (who should neither be called discerning Hackers nor Software engineers). Any quirks with the compiler will only add to the state of FUD when trying to introduce new people to Functional Programing.

    Haskell in the right hands is obviously effective but right now it's still alien to most people. This is a pity because Haskell is beautiful and useful, but it is still true.

    *It's worth noting that the Haskell programs are always a fraction of the size of the Java, look very pretty and tend to work as required.

    -Don't flame the messenger, flame the content.

  28. Re:Haskell, eh?-correction by Junks+Jerzey · · Score: 2

    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?

  29. Re:Haskell, eh?-correction... not! by Anonymous Coward · · Score: 0

    You are right in that the type classes provide a form of overloading. However, the argument that Haskell is not object-oriented is a sticky one at best. The most fundamental problem is that OO does not have a universal definition. Even languages such as Progress and Perl claim to be OO, when they are not OO by any reasonable definition.

    Haskell provides all the features usually included in definitions of OO, however, it doesn't lump all the functionality together in a single megaconstruct as most traditional OO languages do. Instead, it breaks up the functionality among many relatively simple language constructs. These constructs can be used together so that your code is virtually identical to object-oriented languages. However, you could also use the features together in different ways to come up with something completely different.

    The definition for OO that is most commonly accepted as reasonable is that objects are a language feature that provide encapsulation, inheritance, and some kind of polymorphism.

    Encapsulation is performed by Haskell's module system. Type classes don't really have that much to do with encapsulation.

    Essentially, type classes enhances Haskell's polymorphism, which is a feature claimed by OO programming. Type classes compliment the parametric polymorphism already inherent in haskell's type system with a controlled variant of ad-hoc polymorphism. Essentially, it enhances Haskell's polymorphism, which is a feature claimed by OO programming.

    Type classes also provide much more flexible form of interface inheritance through class extensions. For example, multiple inheritance is clean and not at all problematic in Haskell. Furthermore, multiparameter type classes provide functionality that is very difficult to describe in OO jargon. (Roughly, think multiple objects that together instanstiate a class, and if you change just one object, they together instanstiate an entirely different class.)

    Type classes provide a limited form of implementation inheritance through the generality of Haskells "instance" construct.

    Sometimes OO definitions require a form of dynamic dispatch, where the particular function to actually use is selected at run-time. This can be accomplished by using existential typing, which is a language extension offered by Hugs, GHC, and HBC.

    Sometimes OO definitions require that objects must have mutable state. This is can be accomplished, among other things, by the use of monads.

    Monads are commonly misunderstood by those that haven't used them. One of the most common misconceptions is that monads are a language feature. Rather they are a specific programming idiom that can be used in any language that provides higher-order functions, such as Lisp or SML. Haskell simply adopted this idiom as a standard way to do a variety of things, including I/O. Haskell eases the use of monads by the addition of the "do-notation". Other than this optional alternative syntax to writing monads, there is nothing special about them in the language itself.

  30. Re:Haskell, eh?-correction by Albert+Y.C.+Lai · · Score: 1

    Although Python, Scheme, Lisp, and Erlang do not perform static (compile-time) type checking, they perform dynamic (run-time) type checking that is equally stringent. This is why these languages can be considered almost as reliable as statically typed ones such as Haskell and ML. A program written in such languages do not crash; or they crash at the very first sign of trouble, which is the next best thing.

    The same cannot be said about Perl, TCL, and C. They intentionally allow you to confuse strings with numbers with window handles with file descriptors with pointers. This is just asking for confusions and mistakes that are hard to trouble-shoot. A program written in such languages usually goes nuts and corrupts data without crashing; or by the time it crashes, it is no longer possible to identify the problem by looking at core dumps. This happens to many a student: the C program segfaults at malloc, and it is because of a memory corruption in a function that has returned several hundred steps ago. And this is just a 200-line toy program for a school assignment.

    My take at the issue is not whether the program crashes or not, but how much damage it has done before it crashes and how quickly I can identify the problem. It is from the perspectives of damage control and diagnosis.

    I personally prefer static typing, though I accept dynamic typing as equally useful and possibly easier to work with. But I reject weak typing. If your Perl script doesn't crash, you'd better pray that it isn't pulling your leg.

  31. New page up by Vinc · · Score: 1

    I have recently put a page up about our entry which came fourth (and now equal third due to the judges being nice...) written in C. Find more about it here

  32. Dynamic programming by ccshan · · Score: 1
    I'd like to clarify on the role of dynamic programming in this
    contest.


    More than one entry implemented dynamic programming: Rokicki's,
    Sawicki's, and our winning entry. (We call dynamic programming "CYK
    parsing", but as we explain in section 3.2 of our write-up, they are
    the same thing.) Dynamic programming by itself is not enough, because
    the algorithm takes time cubic in the input length, and with large
    inputs it takes too long. Some "end-game" approximation technique is
    therefore necessary. Rokicki didn't finish in time with his coding,
    but Sawicki did put together dynamic programming with a simple
    end-game technique. His entry placed 15th in your unofficial rankings
    and did not officially qualify for the final round.


    What made the difference between our entry and Sawicki's entry seems
    to be the approximation techniques our entries used. Our technique
    simplifies of techniques known to work in the parsing literature. We
    couldn't have thought of what we implemented without the help of this
    literature.


    The bottom line: The programming language may matter (the essence of
    dynamic programming is 10 lines of beautiful Haskell), but what is
    more important is understanding the problem, relating it to existing
    research, and taking advantage of previous work.

    1. Re:Dynamic programming by andreas · · Score: 1

      Congratulations from a member of the team that won the second prize.

      I thought about using dynamic programming for solving the problem, but rejected it quickly because I saw the cubic growth, and wasn't aware of the literature on solving the problem. Hats off to you.

      Still, our code runs five times faster than yours :).