Slashdot Mirror


ICFP 2002 Contest Winners Announced

Georgwe Russell writes "The Winners have been announced at the official web site. Looks like OCaml and functional programming have won again, with the 3 member TAPLAS team. There is somewhat of an upset, though. Second place goes to 3-member team Radical TOO, whose entry was written in C! In the lightning round, the virtues of Python as a quick prototyping language were shown in the lightning division's winning entry by the OaSys one-man team. Does the skill of the programmer prevail over the limitations of the language and paradigm used, or is C nearly as good a language as OCaml?"

252 comments

  1. whoa... by __0Rb__ · · Score: 0

    that's excellent news...good job ;-)

    --
    ~ jon
  2. Yeah.. language is not matter much.. by WetCat · · Score: 5, Interesting

    The proficiency in writing programs means more.
    Most languages are functionally equivalent,
    you can even have something like Alma :
    a program that translate a lot languages to a lot of other languages. It's fun to play with it!

    1. Re:Yeah.. language is not matter much.. by josh+crawley · · Score: 1

      Language doesnt matter??? Then lets institute Brainfuck only programming challenges. ... then again, maybe not ^_^

    2. Re:Yeah.. language is not matter much.. by WetCat · · Score: 1

      Ok... I'll (with some effort) write UML -> Brainfuck convertor and ... problem solved by reducing task to creation common UML diagrams for the task..

    3. Re:Yeah.. language is not matter much.. by Anonymous Coward · · Score: 0, Offtopic

      You're hilarious--I keep my threshold at -1 because of this. It's almost like watching bloopers on TV. Thank you, and keep up the good work (I mean it). I don't care about anything remotely on topic anymore ;) Nothing's better than seing serious posts get replied to with this....

    4. Re:Yeah.. language is not matter much.. by Chandon+Seldon · · Score: 1

      UML -> Brainfuck would be nigh-on impossible, but I do tend to agree that the best way to program in Brainfuck is to write a Something -> Brainfuck converter.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    5. Re:Yeah.. language is not matter much.. by mtullsen · · Score: 1

      It's disheartening to see so many comments in this thread and elsewhere that "language doesn't matter." Although I would agree that the proficiency of the programmer is more important than the language,yet it does not follow that the language doesn't matter.

      Language does matter. Virtually all the languages we are talking about here are turing complete, but is anyone programming using a turing machine? No, because we can be far more productive using C. Likewise, the small number of functional programmers in the world prefer to use them because they can be far more productive.

      Language does matter just as technology matters in similar endeavors. So, for example, would you agree with these?

      The World Cup: Any old dinghy will do, because what really matters is how good a sailor you are.

      Indianapolis 500: Any old car off the lot will do, because what really matters is how good a driver you are.

      No. It's ludicrous to say the technology doesn't matter. I think this comment stems from ignorance of other language /paradigms/. The difference between most imperative languages is little more than where the semicolons go. But functional and logic programming languages are significantly different than imperative languages and until you have some experience in them, it will be hard for you to believe there is a whole 'nother way (possibly better) of thinking about programming.

    6. Re:Yeah.. language is not matter much.. by WetCat · · Score: 1

      I just want to say that in modern mainstream programming most part of programming (except OS, driver, some real-time applications, special numeric and AI tasks)
      encouraged to be done in form of UML or other
      diagrams and patterns. Those diagrams and patterns work like lingua franca between languages, Alma is a good example of
      this approach.

  3. What's wrong with C? by Anonymous Coward · · Score: 2, Informative

    I wasn't aware that C was no longer a good language...

    1. Re:What's wrong with C? by Gekko · · Score: 4, Informative

      The contest was a fast prototyping contest. You had 72 hours to complete the contest. Ocaml's strong type checking and garbage collection can make a big difference.

      Of course an excellent C programmer, with excellent tools can prototype fast, but they have to have more domain knowledge and a more intimate understanding of their language.

      From the contest web site.
      "correctness, algorithmic cleverness, and performance will matter"

      --
      I mod down any one who says "I'm sure I will get modded down for this"
    2. Re:What's wrong with C? by jasonditz · · Score: 1

      Indeed, C's strength comes form the large number of extremely experienced programmers who've been doing it for years and years.

      Better to go with what you know than waste time on the stilted syntax of some crazy moonman language that could theoretically do it with less typing.

    3. Re:What's wrong with C? by Anonymous Coward · · Score: 0

      In thoery, with proper support libraries (garbage collection, etc.), you can program just as easily in C/C++ as O'Caml. It's just the lack of good libraries that causes problems (and inventing your own takes forever).

    4. Re:What's wrong with C? by Anonymous Coward · · Score: 0
      In thoery, with proper support libraries (garbage collection, etc.), you can program just as easily in C/C++ as O'Caml.

      No. You don't have type inference, and your the code is riddled with declarations for starters. You can't create functions on the fly "f = if [something] then (fun x -> x+2) else (fun x -> x-1)", and you are severly limited for everything with is related to function passing, and the necessary closures. Generic programming in C is just completly awful (generic hash table), you have to convert every time. Etc...

      It's just the lack of good libraries that causes problems (and inventing your own takes forever).

      No. For ICFP contests, anyway STL is about all you need.

    5. Re:What's wrong with C? by Anonymous Coward · · Score: 0
      Indeed, C's strength comes form the large number of extremely experienced programmers who've been doing it for years and years.

      Indeed, you need a team extremely experienced C programmers who've been doing it for years and years to achieve the same result as a single moderatly experienced FP programmer.

    6. Re:What's wrong with C? by (insert+nick+here) · · Score: 1

      C was never a good language. It is a working language who was heavily designed to be easy to compile on a PDP10. As we don't use PDP10's anymore, there's no reason to stick with all the sacrifices made to accomplish easy compilation on that platform.

      Actually, the fact that C is so low level actually makes it harder to write good compilers for it. It is much harder to identify the scopes and side effects of optimizations in low level languages.

      I'm not sure why it still is popular. Probably a mix between "I don't need no stinking second language",
      "look at me, I can write in C, I'm l33t" and a lack of coordination between all those attempting to move to better languages.

  4. It's the Algorithm, Stupid by null-und-eins · · Score: 5, Insightful

    This year's ICFP task, as well as last years, was all about finding a good algorithm. More than anything else, knowing the domain would help. Of course, using a language that provides strong typechecking (like OCaml) or garbage collection (OCaml, Python) allows a programmer to concentrate on the main task. You should not draw too many conclusions from the language that was used for the winning entries.

    --
    At the beginning was at.
    1. Re:It's the Algorithm, Stupid by Tablizer · · Score: 1

      Of course, using a language that provides strong typechecking ... allows a programmer to concentrate on the main task.

      That is flamebait horse shit! There is no clear evidence that strong typechecking "allows programmer to focus" more.

      IMO, it is subjective. Different people work better under different language concepts. What F's Joe up may not F Jenny up, etc. I have seen many 100+ message debates on this topic, and there is no objective victory for either side of the typing debate. I just know what works better for me. I grew up on strong-typed languages, but now prefer dynamic or type-free languages.

    2. Re:It's the Algorithm, Stupid by Anonymous Coward · · Score: 0

      Ya know, the funny thing is, depending on the domain of the application, and particularly with modern systems, C has a free, cheap, linear time garbage collector built-in.

      It's called exit(3). Cleans everything up lightning quick.

      If your solution doesn't require 1GB of working space, you may be able to write in C very easily with no concerns for memory management at all, just like Python and all of the others...

  5. I guess I'm not a real geek afterall by mao+che+minh · · Score: 4, Funny

    I have no clue what the hell any of this is about.

    1. Re:I guess I'm not a real geek afterall by joyoflinux · · Score: 2, Funny

      Well, Oasis is that thing in the desert, and OCaml must be a camel on the oasis? That sounds right...

    2. Re:I guess I'm not a real geek afterall by Reece400 · · Score: 1

      So does that mean that C is a body of water, not related to an oasis, and without camels??? must be...

  6. What about #3-160? by spRed · · Score: 3, Informative

    Shamefull vanity, but I'd like to know how I did.
    Radical Too (runner-up) was kind enough to post their source (after the competition is over, there isn't much reason not to).

    But what about me (Aqua Team Hunger Farce)?

    Links to source/explanations of many entries can be found on the ICFP site Here

    My entry is listed as well. The order of listing is just when people submitted links to writeups, not the winning order.

    --
    .sig Karma out the wazoo, better to spend points elsewhere if this is above 2 or below 0
    1. Re:What about #3-160? by Anonymous Coward · · Score: 0

      Agreed. There are no write-ups or anything that I can find.

      I mean, what happened? Which teams did what? Was anything interesting learned from this? Give us an overall ranking of all entries.

      I mean, without that, what's the point of all this? I was hoping to learn something.

    2. Re:What about #3-160? by khuber · · Score: 1

      "Detailed results of the scoring process will be made available shortly."

  7. Thinking in OCaml by PourYourselfSomeTea · · Score: 1

    I learned OCaml when I had pneumonia, so I had a lot of time to play with it. It seems like languages are like keyboard layouts. Just as in any other language, the more you can "Think" in that language, the faster and better you can write programs. But for OCaml, there seems to be a higher limit to the writing proficiency than in C, a language I have worked in for many years. It's a bit like the Dvorak keyboard versus the Querty keyboard.

    1. Re:Thinking in OCaml by Tablizer · · Score: 2, Funny

      I learned OCaml when I had pneumonia

      That's about what it takes to put one in the frame of mind for it :-)

    2. Re:Thinking in OCaml by Anonymous Coward · · Score: 0

      You couldn't grasp simple aspects of Python, I know you can't comprehend OCaml.
      Keep on being a tard, it looks good on you.

    3. Re:Thinking in OCaml by Tablizer · · Score: 1

      You couldn't grasp simple aspects of Python

      What post are you talking about? IWE person?

    4. Re:Thinking in OCaml by nebenfun · · Score: 0

      well I learned C# while I had mono...

      and I learned vb when I had "The Aids"....
      nbfn

  8. Language doesn't matter, language CLASS matters by Kragg · · Score: 2

    There's always been a big divide between functional and imperatie languages.
    C is imperative, you have to tell the computer exactly what to do. OCaml is functional, you give the computer rules and then point it in the right direction. I don't believe alma will convert from one group to the other.
    People who rate functional languages always site impressive examples like the guy who wrote a submarine control program in 40 lines of ML, where previously it was 40,000 lines of C.
    The trouble is, that functional languages, while they may be more powerful, are much harder to write well in, generally taking you far longer to get to the finished state you want.
    In this time-boxed challenge, I'm not surprised to see C come in as one of the winning entries. I think that if the time constraints were relaxed, though, you'd see nothing but OCaml, Gofer, ML etc etc.

    --
    If you can't see this, click here to enable sigs.
    1. Re:Language doesn't matter, language CLASS matters by Anonymous Coward · · Score: 0

      The functionality of those 40000 lines of code must be somewhere (assuming the program was well written). If you only need 40 lines of ML, then the rest of the functionality must be in the compiler, interpreter, libraries etc.

      The majority of programmers would prefer to be able to write, test and debug their own code instead of working around obscure compiler and library bugs.

    2. Re:Language doesn't matter, language CLASS matters by WetCat · · Score: 1

      It's funny, but alma DOES that. It can convert C++ and/or Java and some other languages to C (and some other not object oriented languages).
      You can experiment with Alma here
      (Disclaimer: I am not sure that it can hold /. effect...)

    3. Re:Language doesn't matter, language CLASS matters by Anonymous Coward · · Score: 0

      I'm sure most of the shortcuts were taken using really fancy recursion.

    4. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 1

      C++ and/or Java and some other languages to C
      They're *all* imperative!

      --
      If you can't see this, click here to enable sigs.
    5. Re:Language doesn't matter, language CLASS matters by WetCat · · Score: 1

      Ok... between the possible targets is Lisp and
      Sql ... are THEY imperative?

    6. Re:Language doesn't matter, language CLASS matters by khuber · · Score: 1
      The majority of programmers would prefer to be able to write, test and debug their own code instead of working around obscure compiler and library bugs.

      I doubt it. Programmers are lazy :).

      The majority of programmers can't write decent implementations of common data structures or algorithms. Even though I can, I'd rather have a large library to use so I can focus on the stuff that's actually unique to the problem.

      C has very few standard high level functions. It's really tedious to program complex applications unless you use extra libraries.

      -Kevin

    7. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 2

      SQL is as imperative as you get. Lisp... I dunno...

      --
      If you can't see this, click here to enable sigs.
    8. Re:Language doesn't matter, language CLASS matters by Anonymous Coward · · Score: 0

      Yep that's exactly the problem with C and C++. They can be used just as easily as any higher level language (O'Caml, Python, etc.). The problem is that there is no one set of libraries that everyone uses. This is in contrast to O'Caml, Python, Java, et al, that have huge standard libraries with tons of very functional high-level, easy to use functions and objects.

      C and C++ could be used like these other languages, they just arn't very often. There are too many C/C++ libraries created "The way I want them". The "not invented here" syndrome. And most of the libraries that are written are extremely poor.

      Someone should go out and create a nice set of C++ libraries that incorporate all the great ideas from other languages. I already have a library for regular expressions that are as easy to use as native Perl.

    9. Re:Language doesn't matter, language CLASS matters by Kupek · · Score: 1

      LISP is a functional language. It was the first, I believe. (Also the first language with recursion - recursion's needed for a functional language, so there ya go.)

    10. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 2

      Which is why I'm not surprised to see LISP is actually missing from the source or target set of the page wetcat linked to.
      And SQL is missing too... If you think about it for microsecond the idea of converting a normal language to or from SQL doesn't even begin to make sense...

      --
      If you can't see this, click here to enable sigs.
    11. Re:Language doesn't matter, language CLASS matters by khuber · · Score: 1

      It's on the software's actual page, click on "here".

    12. Re:Language doesn't matter, language CLASS matters by jbrandon · · Score: 5, Informative

      OCaml is functional, you give the computer rules and then point it in the right direction.

      That's not what "functional language" means. The magic of functional programming comes from the (sometimes typed) lambda calculus, in which functions can be passed as parameters. In this vein, we also have easier polymorphism (functions can take a type as a parameter) and fewer "side effects," which could mean fewer bugs.

      See Why Functional Programming Matters. For the theoretically inclined, I enjoyed An Introduction to Polymorphic Lambda Calculus with Subtyping.

      (Both links can be found on the pages I link to; I don't link to the articles because I don't know your document format of choice.)

    13. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 2

      Oh yeah. I wonder what the hell a c program converted into SQL looks like...

      As for converting into Lisp, I guess it must be possible to convert either way at the end of the day because they all come down to machine code... but i would imagine that the code produced by converting c to lisp is pretty far from the way normal lisp looks, or the way the designers intended it to be used :)

      --
      If you can't see this, click here to enable sigs.
    14. Re:Language doesn't matter, language CLASS matters by moebius_4d · · Score: 3, Informative

      Hello? If you use C++ and don't know about Boost, you've been living in a cave. Come on out and see, it's really cool. Also check out Modern C++ Design by Alexandrescu.

    15. Re:Language doesn't matter, language CLASS matters by halightw · · Score: 1

      Yes, have you ever looked at Perl converted to C? (there is a cmd line option in perl to do this... I have forgotten what it is) It is not really possible for the average programmer to understand it, but it is techncially correct C that compiles. Just because you can conver to another language doesn't mean you should.

    16. Re:Language doesn't matter, language CLASS matters by autopr0n · · Score: 2

      If these functional languages can be compiled or even just run, then obviously they can be converted to imperative languages.

      If the programs couldn't be run on imperative machines, what would be the point in writing programs in 'em.

      --
      autopr0n is like, down and stuff.
    17. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 2

      There's a lot more to it than that. Recursive type definition and lazy evaluation are the two big-ticket items that spring to mind.
      I guess to people who know, my description sounds more like prolog than fp, but i still think it's a better way of describing to someone who's never seen a functional langauge before.

      --
      If you can't see this, click here to enable sigs.
    18. Re:Language doesn't matter, language CLASS matters by Anonymous Coward · · Score: 0

      SQL is not a turing-complete language, so there will always be programs in C that cannot be translated into SQL at all.

    19. Re:Language doesn't matter, language CLASS matters by Kragg · · Score: 2

      Yes, thank you Mr Turing. The fact that it can be done doesn't mean it'll make sense to anyone but the computer, and it definitely doesn't mean it should be done :)

      --
      If you can't see this, click here to enable sigs.
    20. Re:Language doesn't matter, language CLASS matters by PureCreditor · · Score: 1

      Agreed, since SQL is not Turing-complete. There's no point in proposing a non-Turing-complete language as the best programming language, since u can't even do everything u want.

      If I were there I would've submitted an entry using SML (the functional lang taught at Cornell), since ML has one of the most elegant syntax out there. Pattern-matching and strong typing is what makes ML such a great language. I'd wish I knew OCaml, but SML suffices for now.

      If one wants a built-in library that does everything, then Java is the way to go (just look at the number of classes offered in JDK). You can nearly do everything in C++ compared to C, so I don't see good reasons why someone should still be using C extensively (okay, low-level programming, but doesn't C++ makes it easier for the programmer?)

      I was surprised someone submitted an entry with Ruby, one person typed "Perl" as "Pearl", and so few Scheme submissions compared to LISP and ML.

    21. Re:Language doesn't matter, language CLASS matters by rplacd · · Score: 1

      The fun thing about Lisp (Common Lisp, that is) is that you're not limited to using functional programming constructs. You can also write code in imperative style, or OOP. It's not a pure functional language like, say, Haskell.
      SQL, by the way, is sometimes classified as a near-fp language.

    22. Re:Language doesn't matter, language CLASS matters by jovlinger · · Score: 3, Interesting

      actually an old colleague of mine had the opinion that functional languages weren't _inherently_ more productive, but _did_ tend to attract programmers who understood abstraction at a deep level.

      these guys can write good code in _any_ language (he was a scheme hacker who was busy optimising HAIRY C gc code), but are attracted to functional langs because such langs directly capture the abstractions these guys use.

      so, to paint with a broad brush, functional languages aren't nec. better than imperative, but the functional paradigm (abstraction, genericity, focussing on data rather than process) IS.

    23. Re:Language doesn't matter, language CLASS matters by joto · · Score: 2

      Lisp is multiparadigm. It can easily be used as an imperative language. So can ML and Ocaml. It's not usually the best idea, though...

    24. Re:Language doesn't matter, language CLASS matters by plumby · · Score: 2

      But converting to pl/sql may well do.

    25. Re:Language doesn't matter, language CLASS matters by Kupek · · Score: 1

      I am fully aware of this, but the first version of Lisp (way back in the '60s, I think) was a pure functional language. Common Lisp is not a pure functional language, but it's based on one.

    26. Re:Language doesn't matter, language CLASS matters by alienmole · · Score: 3, Insightful
      Most of the well-known functional languages don't do lazy evaluation, so that would only be a "big ticket item" for languages like Haskell, which do.

      And no, I don't think your description captured functional languages very well - as you say, it sounded more like Prolog. Besides, the "rule-based" appearance of some functional languages (notably Haskell & the ML family) is really mostly syntactic sugar. Scheme, which is much closer to the pure lambda calculus on which most functional languages are based, doesn't have such a rule-based appearance.

    27. Re:Language doesn't matter, language CLASS matters by V.P. · · Score: 1
      ... SQL is not Turing-complete

      The subset of SQL most people are using is not, but SQL is Turing complete. The latest version of the standard, SQL3, is Turing complete (Its object sublanguage also supports some features you won't find in regular OO languages, like generalized dispatch.)

      You could probably get Turing-completeness in SQL92 using triggers, if you felt like it.

  9. Egads... by Anonymous Coward · · Score: 0, Funny

    Does anyone else find it funny that this thread about whether or not language matters is rife with spelling and grammar errors?

    (And yeah, I'm sure that I have made a few erros as well)

    1. Re:Egads... by WetCat · · Score: 1

      Is Slashdot a place for English classes with marks? Should English proficiency be "news for nerds, stuff that matters"?
      Yep.. I apologize... I am NOT English native speaker. Sorry.
      When I think in Russian, and try to speak/write in chat about computer stuff, I also make a lot of mistakes...

  10. One language against the other by Anonymous Coward · · Score: 0

    I don't think it's reasonable to say that either one of C or O'CaML is better than the other! They're so different that it would be like saying "wood's better than steel"!

    Obviously it depends on the purpose...

  11. C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Anonymous Coward · · Score: 3, Interesting

    We love the way C makes you think about all those little details like strings and bufsize and pointer math. It means we get to keep 0wning you, because you can't get it right.

    Don't get me wrong; C is great for the kernel and other code that needs to be machine-layer portable. But with the gnome panel at 5 mb, apparently no one cares about writing tight code anymore. So if its not going to be small and fast, it might as well be secure and reliable.

    Which C will never be.

  12. Nope, you're just a retard. by Anonymous Coward · · Score: 1, Funny

    What do you mean by "finally"? Is there some compelling reason those stupid fucks should get press here?

  13. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by khuber · · Score: 2, Insightful
    What operating system and languages do you use? I bet they are implemented in C. If C isn't secure and reliable how can applications programmed in higher level languages built on them be secure and reliable?

    -Kevin

  14. Re:What happened to kuro5hin.org? by ylikone · · Score: 0
    Nevermind, I got into their site finally. Apparently they are just having hard drive problems (again).

    http://www.kuro5hin.org/story/2002/10/5/01620/5630

    --
    Meh.
  15. Ability, luck, and language -- in that order by tmoertel · · Score: 5, Informative
    Programming ability almost always dominates all other controllable factors, including choice of programming language, when it comes to most programming tasks.

    Simply put, programming languages are tools. Some tools make certain jobs easier than others, but tools only go so far. The rest is up to the programmer.

    In the case of this year's ICFP contest, Team Radical Too did well because they had a good strategy that ultimately fared well in judging. Their robot performs a semi-exhaustive simulation of the possible moves up to a certain degree and then chooses the best move based on the simulation results. (It's a cool approach, and the source code is worth a read.)

    It's a compute-intensive strategy, and my guess is that they selected selected C as their implementation language for this reason. They made the decision to sacrifice the high-level flexibility that other languages provide in order to have C's low-level control over how CPU cycles and memory are consumed.

    Oh, and then there's luck

    Despite how much we like to argue about programming ability and choice of programming language -- and competitions are perfect fuel for this particular fire -- we shouldn't read too much into the results of programming competitions. Luck plays as large role as any.

    I returned, and saw under the sun, that the race is not to the swift, nor the battle to the strong, neither yet bread to the wise, nor yet riches to men of understanding, nor yet favour to men of skill; but time and chance happeneth to them all.

    In the case of the 2002 ICFP Programming Contest, for example, I happen to know that several of the robots, including Team Radical Too's robot, will unwittingly commit suicide in situations where they have the opportunity to push another robot into lethal water that spans more than two board cells. In this situation, the attacking robot will push its victim into the water, killing it. The victim, although dead, appears on the game board the next turn (and is removed from the game on the turn after that). However, the attacking robot's logic fails to account for the fact that dead robots can remain on the game board for a turn before they are removed by the game server. It considers any robot on the game board to be alive -- including the now-dead victim, floating in its watery grave -- and hence fair game for attack. Seeing that there is water beyond the now-dead victim, the attacking bot will try to push it again, thus stepping into lethal water itself and effectively committing suicide. Oops.

    Luckily, the judges didn't have any wide spans of water in the map used for the final showdown.

    Indeed, chance happeneth to them all.

    1. Re:Ability, luck, and language -- in that order by Sunlighter · · Score: 1

      I think it would mean something if people with high programming ability always reliably selected certain languages to code in, and rejected others -- don't you? Maybe they pick certain languages because they are easier or better to program in.

      If they didn't, if instead they always picked the difficult language because they wanted to prove to the world that they were awesome enough to handle that language, then there is always the possibility that some dumb programmer with an ordinary language like C will come along and... wait a minute...

      --
      Sunlit World Scheme. Weird and different.
    2. Re:Ability, luck, and language -- in that order by Kupek · · Score: 1

      Or maybe they picked what they're comfortable with? And what language a programmer is comfortable with has more to do with the languages they've been taught in and exposed to than their skill as a programmer.

    3. Re:Ability, luck, and language -- in that order by Anonymous Coward · · Score: 0
      Or maybe they picked what they're comfortable with? And what language a programmer is comfortable with has more to do with the languages they've been taught in and exposed to than their skill as a programmer

      Oh yeah? You must not have learnt many languages. I challenge you to be comfortable with Assembly Language or Prolog for general purpose programming, even if it is your first language. Also the contest outcome shows most top ranker aren't using C/C++ and I doubt most of programmers start learning those languages.

    4. Re:Ability, luck, and language -- in that order by Kupek · · Score: 1

      Come on now. I was thinking of fully-functional high level langauges. Assembley is not high level. Now Prolog... you'd be surprised what it can do. Often not very fast, but it can do some interesting stuff. There are obvious extremes - Brainfuck, for one, and I'd consider a logic language is close to the extreme. Logic langauges often weren't designed for convential use.

      This, however, has little to do with my point. Few people are taught Prolog as their first language. But yes, some people are taught Scheme as their first language.

      The contest was held by the International Conference on Functional Programming - don't you think this will have some effect on what languages people choose? I think it's reasonable to assume that in general, people who use/like funcitonal languages are more likely to follow what the ICFP is doing.

  16. More lines in C, but same outcome. by wackybrit · · Score: 5, Interesting

    It's all quite an easy debate really. Some people prefer higher level languages like Python, whereas some prefer lower level languages like C.

    What's the difference? The amount of lines you need to write to get the same result.

    It therefore goes that the more lines you need to write to get the same result, the more control you get over the program and the computer on which it is running. This means that programs in C can control the computer in better ways than programs written in Perl or Python.

    A lot of programmers, like C programmers, think that C, much like Ada, a language to program, in on problems such as objective and the logical ones. An interesting example is the difference between Visual Basic and Visual C++.

    In Visual C++, to open a window takes about 104 lines of code if you estimate the number without doing any research like myself. In Visual Basic, you can open a window just by creating a new project and hitting 'Run'. It's easy, and that's why it works.

    This is primarily true in the first instance, since there is proof that indicates such, although there is no evidence of this to suggest quasi-otherwise.

    1. Re:More lines in C, but same outcome. by BCoates · · Score: 2

      What's the difference? The amount of lines you need to write to get the same result.

      I suppose Java is the highest-level language out there, since you can write your whole program on a single line.

      --
      Benjamin Coates

  17. Rewrite Linux kernel in Python! by Anonymous Coward · · Score: 0

    There's a reason why the Linux kernel is written in C. Because C is faster and more egantagious than languages like Python. You couldn't write the Linux kernel in a language other than C, it just wouldn't work and would lack power if it didn't.

    1. Re:Rewrite Linux kernel in Python! by Anonymous Coward · · Score: 0

      egantagious?

      Ex-Literature major?

    2. Re:Rewrite Linux kernel in Python! by jnana · · Score: 2

      The Oxford English Dictionary doesn't know what egantagious means. Care to enlighten us all?

    3. Re:Rewrite Linux kernel in Python! by Anonymous Coward · · Score: 0

      The word 'egantagious' is a non-illusive vertatim meaning 'of an azrological quality'.

    4. Re:Rewrite Linux kernel in Python! by jnana · · Score: 1

      laksdjf!

    5. Re:Rewrite Linux kernel in Python! by Hast · · Score: 1

      A few friends of mine enjoyed themselves by looking up strange words in an English dictionary. Their favourite was "vicerotonic" and the explaination was "like endormorphin temperament with predominantly social interests". AFAIK it's not in the dictionary now, I think they used Webster.

    6. Re:Rewrite Linux kernel in Python! by Anonymous Coward · · Score: 0
      You couldn't write the Linux kernel in a language other than C, it just wouldn't work and would lack power if it didn't.

      Of course, you can, this has already done - check on google for Lisp machine, Modula 3, Janos, for starters.

  18. Poor Planning for the contest by codepunk · · Score: 2

    I started working on a solution but due to poor planning a test game server implementation was not available until late in the contest. I dropped out and said piss on it.

    --


    Got Code?
    1. Re:Poor Planning for the contest by truth_revealed · · Score: 1

      Whine, whine, whine.
      The game server was not relevant to creating a contest entry. A clever programmer would have written his/her own server to test against (as many entrants did). In fact, writing a server would have been desirable if for no other reason than to have a graphical shell to observe the robot participants in action and to enhance your robot's algorithms.
      The contest was designed to test your ingenuity as much as your programming ability. No problem is perfectly designed. You are supposed to deal with it.

  19. From what I saw, it went like this . . . by tmoertel · · Score: 4, Informative
    I am at ICFP this week and was at the presentation of the contest results this afternoon. The judge's scoring method, iirc, went like this:
    1. All of the robots were subjected to a battery of solo games and games against reference robots provided by the judges
    2. The twenty highest-scoring robots went to the second round and played a number of games against each other.
    3. The eight highest-scoring robots went to the third round and were subjected to further games.
    4. Finally, the top two robots battled on symmetrical maps with each being allowed to start from the various starting points an equal number of times (to rule out starting-point bias).
    The judges indicated that they would be posting more information later. The conference is still going on (in fact, ICFP is part of PLI, which is going on through 8 Oct), so give the guys a chance to get home and write something up. You'll get the details in due time.
  20. A Contest proves very little. by sbaker · · Score: 2

    The limited scope of a contest tells you very little about either the proficiency of the programmer or the quality of the programming language.

    Only a task that's gonna take years and consume a few hundred thousand lines of code will really show which programmers can stand the pace over the long term, write *maintainable* code, document it well - and so on. Similarly, a program that's developed in a short period of time by a small team tells you nothing about how readable the programming language is. Some languages are easy to write in - but a bugger to understand a year later.

    Still, contests are fun - and that's enough to justify their existance.

    --
    www.sjbaker.org
    1. Re:A Contest proves very little. by jfmiller · · Score: 1

      The limited scope of a contest tells you very little about either the proficiency of the programmer or the quality of the programming language.

      One of the biggest claims of those who support Functional Programming is that one can create programs faster then by traditional methods both because the language is faster to write, and also because Languages like OCaml and Haskle are much less suceptable to errors.

      While there is some pretty intence debate about the first part. The lack of memory, type and overflow errors in most functional languages are a huge plus for rapidly developed software. Bases on previous years results, better then 2/3s the C/C++ entries will crash and be disqualifies at some point.

      So what's the point? The point is that the short length of the contest is meant to show off the very Functional Languages the contest is promoting.

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
    2. Re:A Contest proves very little. by Anonymous Coward · · Score: 1, Insightful
      The limited scope of a contest tells you very little about either the proficiency of the programmer or the quality of the programming language.

      Of course, it does. A bad programmer, or even a single average programmer, would be totally unable to finish the contest. You have to be proficient. Similarily, if you have to spent 10 hours chasing an obscure malloc or a subtle temporary variable passed on the stack reference - bang bang bang - you're out of the contest. The quality of the programming language is essential.

      Similarly, a program that's developed in a short period of time by a small team tells you nothing about how readable the programming language is. Some languages are easy to write in - but a bugger to understand a year later.

      To a large extent, it does. Because there is absolutly no time to waste to talk to each others about details. Writing unmaintenable code is possible when you have a fixed problem and plenty of time - the ICFP's top entries are often those who were enhanced in the last 10 hours of the contest - there is no room to have unmaintenable code here, you have to understand it, change it quickly, without any bug. Add a bug, and yes, you're out of the contest again. Especially since, in all ICFP contests, it is *always* possible to improve one's program.

      The only thing ICFP is not testing is large scale programming.

      Still, contests are fun - and that's enough to justify their existance.

      Try to participate, you will be enlightened.

  21. Good programmers win by gmarceau · · Score: 3, Insightful

    Winning the contest is more about being a good programmer than about the particuliar programming languages.

    But then again, you can assume a good programmer would pick a good programming language.

    --
    This post was compiled with `% gec -O`. email me if you need the sources
    1. Re:Good programmers win by God!+Awful · · Score: 2


      But then again, you can assume a good programmer would pick a good programming language.

      Unlikely... most likely they enjoy a challenge.

      -a

  22. What's this? by gmhowell · · Score: 5, Funny

    whose entry was written in C!

    I was just getting used to C#, now we are added C! ?

    How is that pronounced? 'see bang'?

    How is it different from plain C ?

    --
    Jesus was all right but his disciples were thick and ordinary. -John Lennon
    1. Re:What's this? by davidstrauss · · Score: 2, Funny

      It's pronounced with a simultaneous click of the tongue, as in "!Kung," the nomadic group indiginous to Africa.

  23. Use the right language for the Job. by jellomizer · · Score: 2

    I am seeing some post with the almost a Panic that their favorate language will die. I am still seeing Cobol and FORTRAN Codeing being used out there. So Dont worry your language will probably survive. I like to think languages are tools and I try to use the right tool for the right job. I find that I usually use Python the most for my work because I find it more efficient to use the List Class other then arrays, and my code is easier to maintain. But there are times where I switch to using C. When my code is needed to be optimised for speed. I program in JAVA when I need to be sure that my Code will run on other platforms. Ill make shell scripts when I need to do a lot of unix calls. I am sure that there are plenty of other languages out there that may do more tasks more efficiently then I am stating. But as a programmer you try to find the best tools that are available to you or that you have enough time to learn, to get the Job done. Just because someone one uped you by using another language dosent meen the language is out of date it just meen that the language my not be optimised for that particular job (Or your not as skilled programer as the other one in that area).

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:Use the right language for the Job. by Tablizer · · Score: 1

      I program in JAVA when I need to be sure that my Code will run on other platforms.

      Are you saying that Python (which you mentioned) is less platform-swappable than Java?

      Do you have evidence for this?

      BTW, I try to avoid using arrays of any type. It is best to use a collection with a relational interface. That way if the collection scales in complexity, needs to join to other data, or needs persistence, I don't have to recode everything to make the transition. (Meyerian Discontinuity.)

      Unfortunately many languages and tools don't make very nimble relational tools to replace arrays. (Older tools actually did a better job, before OOP hype ruined the technique.) MS, to their credit, are putting in more "micro-relational" functionality into their tools. (Not that I am an MS-lover, but this one thing is good.)

    2. Re:Use the right language for the Job. by Anonymous Coward · · Score: 0

      I agree. There are SO many newbies and wannabes out there.

      Python, Perl, et al, all work cross-platform.

      You know what? I use C/C++ cross-platform... *shudder* Yes, I can compile C++ on different platforms *oooo, aaaahhhh*.

    3. Re:Use the right language for the Job. by Anonymous Coward · · Score: 0
      You know what? I use C/C++ cross-platform... *shudder* Yes, I can compile C++ on different platforms *oooo, aaaahhhh*.

      LOL. And what GUI are you using?

    4. Re:Use the right language for the Job. by jellomizer · · Score: 2

      Well python is Good Cross platform but not perfect. If you check the Python Documents on the web site you will see functions labled Windows Only, Unix Only, Mac Only. Just as long as you dont use those features your OK. But it is not True Platform independant.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  24. Tom Rockicki by Anonymous Coward · · Score: 1, Informative

    Funny that the second place went to Tom Rockicki of dvips and AmigaTeX fame.

    I remember that some of his Amiga hacks were uberkool. A realy cool hack of his was a superfast "game of life" cellular automaton implemented on the Amiga's "blitter" coprocessor. Very cool.

    -- Anonycous Moward

  25. No language is intrinsicly better. by Stephen+Samuel · · Score: 2
    What language to use depends on many things -- including your experience and the way that you think about problems.

    C gives you lots of rope to hang yourself with
    OCAML, on the other hand lets you expressivly designate the contitions under which the rope will hang you.

    --
    Free Software: Like love, it grows best when given away.
    1. Re: No language is intrinsicly better. by Black+Parrot · · Score: 1


      > C gives you lots of rope to hang yourself with
      > OCAML, on the other hand lets you expressivly designate the contitions under which the rope will hang you.

      For hanging you prefer instant oblivion.

      I'm undecided as to whether that part of the analogy applies to choice of programming languages.

      --
      Sheesh, evil *and* a jerk. -- Jade
  26. Your brain has parsing problems by Anonymous Coward · · Score: 0

    If the language was "C!", you'd see an extra period: "whose entry was written in C!."

    1. Re:Your brain has parsing problems by Sri+Lumpa · · Score: 1
      If the language was "C!", you'd see an extra period: "whose entry was written in C!."

      That would assume that /. submitters are better at grammar than /. editors are good at spelling, quite a big assumption in my opinion.

      --
      "The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
  27. Are you sure you don't have it backward? by tmoertel · · Score: 5, Informative
    The trouble is, that functional languages, while they may be more powerful, are much harder to write well in, generally taking you far longer to get to the finished state you want.
    Are you sure you don't have it backward about the amount of time it takes to write software in functional languages? Most of the people I know who are good programmers of both functional and imperative languages consider the former to be considerably more efficient when it comes to programmer time. My experience with functional vs. imperative languages has certainly shown this to be the case. Likewise, industry groups that have made investments in functional programming have found significant increases in programmer productivity.

    But don't take my word for it:

    • Prototyping Real-Time Vision Systems: An Experiment in DSL Design (1998) Abstract: We describe the transformation of XVision, a large library of C++ code for real-time vision processing, into FVision (pronounced "fission"), a fully-featured domain-specific language embedded in Haskell. The resulting prototype system substantiates the claims of increased modularity, effective code reuse, and rapid prototyping that characterize the DSL approach to system design....
    • Four-fold Increase in Productivity and Quality: Industrial-Strength Functional Programming in Telecom-Class Products (PDF) Abstract: The AXD 301 ATM Switch is the flagship in Ericsson's line of Datacom products. A fault tolerant and highly scalable backbone ATM switch, AXD 301 has enabled Ericsson to take the lead in the migration of public telephony networks to becoming true multiservice networks, offering both quality voice and broadband data services on the same backbone.... This paper demonstrates how the development of such systems is supported by the Erlang/OTP technology. The Erlang [functional] programming language was developed by Ericsson specifically for the purpose of building fault tolerant, distributed and complex systems.... The paper demonstrates how Erlang supports the characteristics mentioned, while offering unusually high productivity.
    • Haskell vs. Ada vs. C++ vs. Awk vs. ... : An Experiment in Software Prototyping Productivity: Abstract: We describe the results of an experiment in which several conventional programming languages, together with the functional language Haskell, were used to prototype a Naval Surface Warfare Center (NSWC) requirement for a Geometric Region Server. The resulting programs and development metrics were reviewed by a committee chosen by the Navy. The results indicate that the Haskell prototype took significantly less time to develop and was considerably more concise and easier to understand than the corresponding prototypes written in several different imperative languages, including Ada and C++.
    • Functional languages in microcode compilers (ACM Digital Library). Abstract: This paper discusses the advantages of using high-level languages in the development of microcode. It also describes reasons functional programming languages should be considered as the source language for microcode compilers. The emergence of parallel execution in microarchitectures dictates that parallelism must be extracted from the microcode programs. This paper shows how functional languages meet the needs of microprogrammers by allowing them to express their algorithms in natural ways while allowing the microcode compiler to extract the parallelism from the program.
    You can find more such papers by tracing references and by reasonable application of Google and CiteSeer.
    1. Re:Are you sure you don't have it backward? by Kragg · · Score: 2, Informative

      Well, you point to :

      - one situation in which the language was specifically written for the task at hand. I give you the fact that you get a productivity enhancement if your language is tailored to your problem (probably regardless of whether it's functional or not).

      - one situation which doesn't mention the speed to code at all (the microcode one)

      - 2 different 'prototype' experiments.

      In case you missed it first time around,
      The trouble is, that functional languages, while they may be more powerful, are much harder to write well in, generally taking you far longer to get to the finished state you want.
      Prototype != working code. Case made.

      --
      If you can't see this, click here to enable sigs.
    2. Re:Are you sure you don't have it backward? by Anonymous Coward · · Score: 0
      one situation in which the language was specifically written for the task at hand. I give you the fact that you get a productivity enhancement if your language is tailored to your problem (probably regardless of whether it's functional or not).

      They implemented a FP language because they decided it was the way to go.

      The trouble is, that functional languages, while they may be more powerful, are much harder to write well in, generally taking you far longer to get to the finished state you want.

      No. Simply no. I don't know why you hate so much FP languages, and are just repeating all over and over the same outrageous lies, without any support. For now, we have the example of Erlang, and 2 different 'prototype' experiments quickly found on Google versus nothing.

      For the record, all the top winning entries were in "finished state" - they complied with the requirements, didn't crash, produced the correct results, etc...

      The ICFP contest aren't about explaining vague proof of concepts on a white board - it is about delivering a working program.

      Prototype != working code.

      Definitly.

      Case made.

      Definitly not.

    3. Re:Are you sure you don't have it backward? by Anonymous Coward · · Score: 0

      The real problem with functional programing, is that it takes people use to the imperative style to adapt to the state of mind needed for functional programing.

      Theory has it that it is much easier, for someone who never had a programing experience, to learn a functional language than an imperative one.

      Sven Luther

    4. Re:Are you sure you don't have it backward? by Anonymous Coward · · Score: 0

      Only if you're a mathematician/scientist kinda student/professor type person.

      For the vast majority of the population imperative languages are easier to grasp. We live in a stateful world.

    5. Re:Are you sure you don't have it backward? by dmelomed · · Score: 1

      Erlang has evolved into a _general purpose_ language. There's even a great 3D modeler and a load balancer written in Erlang. The standard libraries which ship with Erlang aren't just tailored to telecom applications anymore.

  28. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by j3110 · · Score: 2

    Yeah, most OS's are implemented in C, and that's a big portion of why they aren't secure nor reliable in most cases. C doesn't have garbage collection by default, and therefore there are buffer overflows found in virtually every C program. It doesn't show up as much in a kernel just because of the way that they work. It's not a big deal really, but remember you are trusting all your files to the programmers abilities if you install a C program more than say if you are installing a Java or python app.

    --
    Karma Clown
  29. No; C matters. by Anonymous Coward · · Score: 1, Flamebait
    99% of all code written can be written better faster (run and dev times) in a language other than C. C should only be used when an abstract model of memory cannot do the job. That is, if you need control over the way your data and code is laid out in physical memory, use C. Otherwise, use something else. One more thing: in


    int i = 1, j = 2, k;

    k = i/j;


    k does not equal 0, OK? One over two is the fraction 1/2, and not 0. If you're writing code like this, you are an idiot. Only idiots are contrained by the machine. Geniuses think like people and use languages that understand enough of math to arrange their types (strictly or no) in a tower instead of as disjoint sets of static rules that make it easier to write compilers instead of software. I do not care how hard it is for open source geeks to write compilers anymore than a user cares how hard it was to write a browser in C.
    Programmers use compilers, and compilers should allow programmers to think abstractly instead of like a machine.


    1/2 = 1/2, not 0. GET IT FUCKING STRAIGHT, YOU MORONS.

    1. Re:No; C matters. by thermostat42 · · Score: 2, Informative

      ah, in this case, k is 0. You declared i, j, and k as integers. Division is defined on integer. In integer division, 1/2 = 0. Now, if you want a compiler that easily switches between integer and floats, thats one thing, but you probably shouldn't refer to them as "int" in that case.

      --
      no comment
    2. Re:No; C matters. by phasm42 · · Score: 1

      You declared your variables to be 'int'; you should've used float or double. If _you_ declare the variables to be int, 1/2 = 0, not 1/2. GET IT FUCKING STRAIGHT, YOU MORON.

      --
      "No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
    3. Re:No; C matters. by PissedOffGuy · · Score: 0

      you sound like someone who messed up a CS101 homework assignment because of not knowing the nuances of the language.

      also, programmers DO think like machines. if you ever help out people in beginning CS classes you'll see some people just aren't cut out to be programmers no matter what the language is. they simply dont think methodically and cant come up with the intermediate steps they need to reach an end result.

      until computers can understand language and all that, the best programmers will be totally comfortable using C and similar languages.

    4. Re:No; C matters. by Anonymous Coward · · Score: 0

      Yeah, lets all use abstract data types that default as real numbers or dynamically allocated type changers so that all our math ops take 4 times longer or more to compute even when the .0-> precision isn't needed. I _really_ want my kernal programed that way. [/sarcasm]

    5. Re:No; C matters. by snorggle · · Score: 1

      99% of all code written can be written better faster (run and dev times) in a language other than C. C should only be used when an abstract model of memory cannot do the job. That is, if you need control over the way your data and code is laid out in physical memory, use C. Otherwise, use something else.

      Programmers use compilers, and compilers should allow programmers to think abstractly instead of like a machine.


      I think this last part of your comment most accurately describes your point of view. I believe if you don't know much about the machine (or do not want to know much about the machine) any language could suffice and possibly be faster than C in run and development time. However, my experience writing optomized code suggests that many optimizations that one can do by hand are only available with such a low level coding environment such as C; when you are familiar with the machine (pointer arithmatic comes to mind). The compiler/interpreter technology of the high level languages are never as good as someone willing to tune some C code, givin adequate time. How often are those very compilers and interpreters written in C? Now this is stepping around the matter of if it should be done or not. After all, computers are getting faster every day. So why bother? Most code that is written isn't required to run at peak efficiency.

      As the machines get more complex and difficult to understand what is going on. I believe what you say will be truer and truer. But only when the compilers are up to the task.

      As always... this is my opinion.

      cheers,

      snorggle

    6. Re:No; C matters. by rplacd · · Score: 1

      There are languages out there that'll take two integers and return 1/2 for that operation. Perhaps that's what the poster was after.
      In fact, with them it doesn't matter if you try to divide 1 by 2, or 10000000000 by 2000000000 -- they'll happily accept large numbers and treat them properly.
      Both 1 and 10000000000 are integers, it's just that C's 'int' and 'long' types are somewhat limited.
      But that's C for ya.

    7. Re:No; C matters. by rplacd · · Score: 1

      It is possible to write compilers for non-C languages in non-C languages, and still get performance similar or equal that of C. Yes, you can always write something up in C and tweak it such that it's the fastest code around, but if some languages give you (say) 90% of the efficiency of C with less than 20% of the effort, why would you bother with C?
      Non-C languages generally have some limitations that make them unsuitable for use in all areas where C's used. For example, their implementations might have large runtimes, or they might not have bindings for some external app (graphical toolkit, database, etc). These are valid reasons to use C. Now that you'll find socket and/or web interfaces in most libraries for non-C languages, though, that's not as big an issue as it once was.
      Examples of really fast/high quality compilers for non-C languages written in their own language: cmucl (Common Lisp), fun-o's dylan compiler (Dylan), standard ml of new jersey (ML).

      Literally decades before C dev systems got graphical debuggers and incremental compilation, other languages had those features.

    8. Re:No; C matters. by rplacd · · Score: 1
      Yeah, lets all use abstract data types that default as real numbers or dynamically allocated type changers so that all our math ops take 4 times longer or more to compute even when the .0-> precision isn't needed.

      Well, that's the thing with C. With some other languages, you get compilers that figure out this stuff as early as possible (programmer hints in the code help), and will optimize code down to C-speed levels (or close enough). You don't have that option with C -- you figure out if you need ints, long ints, or whatever -- and you're stuck with that choice.

    9. Re:No; C matters. by Anonymous Coward · · Score: 1, Informative

      If you had ever taken abstract algebra, you would understand that, although the integers are a ring, they are not a field. Therefore, they do not have division, bucause they do not have (in general) multiplicative inverses. What the operator "/" does in C (conceptually) is to apply what is called the division algorithm, guaranteed for all principal ideal domains, IIRC, which solves the equation a = bq + r (where r b) for q given a and b. Therefore there is in fact a mathematical basis for integer division.

  30. Lines it is! by phorm · · Score: 4, Insightful

    That about clinches it. A lot of people really look down upon those who use any coding language that in any way simplifies the coding. The way I've always seen it is thus:

    Visual Basic is a very nice language for coding GUI-based applications. Newer versions have increased speed and performance such that there's not really a difference (exempting the included DLL's) between a standard office-type app made in VB and one in C++. If you want to get complicated and rip into the windows API, then you're probably doing something that may require C++, but VB often even handles this nicely. It interfaces much more nicely with the C-based DLL's than it used to in the past.

    My biggest peeve is the syntactical differences in compative operators and math. There was a time when I love VB, but now I truly hate having to do a "myvar = myvar+1", or the fact that you can't do something like "var1=var2+var3" (in VB that would give a boolean).

    In arguement for VC++, the wizards can handle a lot of the windowing/GUI stuff for you. I think that if if gave you some nice understandable error messages when you screwed up things might be a lot nicer. (it sucks when you get an ambiguous error message on line 2023 caused by a mistake on line 101).

    Since I've learned C++, I prefer it when possible. I have no huge qualms about writing a GUI in VB, or even a hybrid project with C++ DLL's linked to my VB GUI's. Every coder has their place. Just because one can program C and Fortran doesn't make them any better than a VB programmer. In a timed-trial for a small GUI app, the VB programmer would likely stomp the C progammer.

    If only MS could program better error messages... Error on line 342: unknown thingamabobber executing blingconfangler - phorm

    1. Re:Lines it is! by Anonymous Coward · · Score: 0
      Just because one can program C and Fortran doesn't make them any better than a VB programmer.
      Consider that your VB code will only run on one OS, and that with the next major release of that OS, all your VB code might be rendered unusable.
      In a timed-trial for a small GUI app, the VB programmer would likely stomp the C progammer.
      GUI apps are for user interaction, so time trialling one would be moot.

      What really worries me is that a person can code VB without knowing at all how a computer works. It reminds me of that Star Trek TNG episode where nobody on their planet knew how to run any of the machinery anymore. VB programmers are slaves to Microsoft's whim. If Microsoft chooses to cut them out in favour of pushing MS-Java#, or whatever, then you're just gone. A C programmer can always download gcc and be up and running on many different types of processors.
    2. Re:Lines it is! by zorander · · Score: 1

      or even a hybrid project with C++ DLL's linked to my VB GUI's

      Yeah we did this. It turned what used to be a twenty man-year project into an eight man-month project.

      Basically there were three pieces of code on two computers--a vb interface linked to vc++ dlls that spoke through a socket to a linux backend system. This gave the users maximum comfort with in the interface (win2kpro) while letting them enjoy the backend stability of linux (twas embedded...most users probably didn't know the linux was even there)

      Brian

  31. Ha ha! by Anonymous Coward · · Score: 0
    With Boost or without, C++ is an abortion. If you cannot understand why, you have no business comparing computer languages out loud and in public. Simply put, C++ is used because everyone uses C++, and not because it is in any fucking way something other than an abortion that cannot get out of the programmer's way.


    C++ is a joke. If your problem does not allow you to use memory opaquely--that is, if you must exercise control over the way code and data is laid out in physical memory--then you should use C. That accounts for 1% of all code written.

    1. Re:Ha ha! by Anonymous Coward · · Score: 0

      Of course, your "argument" is equally valid if you replace C++ with any computer language, political leaning or anything else really.

      You don't actually say anything of substance until the second paragraph, and what you say there is just stupid. C++ makes it quite easy to use memory opaquely, it just doesn't force it upon you. Most modern C++ projects use smart pointers and opaque classes; this hides both the details of memory layout and memory allocation/deallocation.

      Frankly, having sane destructor semantics is far more useful to me than having a general garbage collector. That's why I use C++ and python, and why I hate Java.

  32. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by RadioheadKid · · Score: 2

    The language in which the compilers and interpreters for those garbage collecting, so called, secure languages are written is most likely C. Is C the best language, probably not, and which language is best depends on both the task at hand, and the programmers preferences and abilities. The same can be said for any other language. So just remember your roots before you start dissin'...

    --
    "Karma can only be portioned out by the cosmos." -Homer Simpson
  33. That's the dumbest comment EVAR! by Anonymous Coward · · Score: 0
    Of course, using a language that provides strong typechecking (like OCaml) or garbage collection (OCaml, Python) allows a programmer to concentrate on the main task.


    THAT'S THE WHOLE POINT, YOU IDIOT. IT'S THE DIFFERENCE BETWEEN THINKING ABSTRACTLY AND AND IN ASSEMBLER. CPUS THINK IN ASSEMBLER. THAT'S WHY WE NEED COMPILERS.


    You should not draw too many conclusions from the language that was used for the winning entries.


    Oh, sorry, I forgot where I was.

    1. Re:That's the dumbest comment EVAR! by Anonymous Coward · · Score: 0



      By your argument, languages that support abstraction are better suited for the contest. So why was a C entry this, as well as last year among the top 3? Just because you know OCaml doesn't mean you win the contest. Last year's winner applied an advanced algorithm from natural language parsing - that is why it won, not because it was coded in Haskell. 1337 subject, btw.

    2. Re:That's the dumbest comment EVAR! by Anonymous Coward · · Score: 0
      By your argument, languages that support abstraction are better suited for the contest. So why was a C entry this, as well as last year among the top 3? Just because you know OCaml doesn't mean you win the contest. Last year's winner applied an advanced algorithm from natural language parsing - that is why it won, not because it was coded in Haskell. 1337 subject, btw.

      This is stupid. There is not a 1-1 relationship between the language used and winning. If you want to run a 100-meter race with 6-lbs shoes in lead, you can... and if you're very good you will win, depending on the opposition. That doesn't prove that running with such heavy shoes hasn't a negative effect.

      Now you are contending that Haskell had nothing to do with the fact that they won - sorry but it's extremely unlikely. Maybe if they didn't use Haskell they won't have finished, their program would be buggy or they wouldn't have the time to experiment, test, improve and tune the algorithm. Maybe on C team was implementing the same algorithm but failed. If you had participated to even only ONE contest, you would have known that 3 days is awfully short.

      Besides, every contest is subtly different: the raytracer contest for instance wasn't an algorithm contest. The fact is, that if you take the results all over the years, C,C++ have had an appaling record, and no, it can't be "lack of luck".

  34. methodology differs, and it matters by g4dget · · Score: 2, Redundant
    The proficiency in writing programs means more. Most languages are functionally equivalent,

    Languages like C, C++, Java, C#, Ada, Eiffel, VisualBasic, etc., are indeed largely interchangeable, and you can all approach them with the same mainstream object-oriented design methodology.

    But just because you are a proficient Java or Eiffel programmer and object-oriented designer doesn't mean that you have a clue about how to write effective code in a functional programming language. You can design functional programs like object-oriented programs, and the result will work, but it will be as tedious as if you had written the code in an object-oriented language to begin with.

    To take advantage of functional languages (or, more generally, other non-object-oriented languages), you have to unlearn pretty much everything you learned about object-oriented design.

    It's quite analogous to the procedural/object-oriented transition: lots of people believed that they could write object oriented code because their procedural coding styles kind of kept working, but they were missing the point. You are missing the point, too, if you think that functional programming is just a small variation of what you are already doing.

    Furthermore, functional programming is very hard to simulate well in object-oriented languages--most attempts end up not being able to provide the invariants and encapsulation that functional programming guarantees automatically, and without the type systems of functional programming languages, many interesting usages are just too complex to type.

    1. Re:methodology differs, and it matters by WetCat · · Score: 1

      Could you (or the community) provide examples of areas of applicability where
      1) Object oriented languages are clearly better than functional?
      2) the opposite of 1)
      ?
      On my opinion, transport problem or problem of getting the optimal equipment for character in MUD problem is clearly the example of
      (2), while accounting for a large factory is probably the example of (1).
      An example of language that contains a good mix of functional and object-oriented paradigms is Oz but cumbersome and strange syntax of that language is a real problem at least for me to start using it...

    2. Re:methodology differs, and it matters by g4dget · · Score: 2
      The difference is more a question of tradeoffs: functional programming lets you write correct programs quickly and with much less testing. But it's harder to get control over resource usage and I/O in functional programming languages. Financial and accounting software would probably be one of the best applications of functional programming if the community wasn't so conservative. Parsers and compilers are also great for FP. Numerical programming in FPLs can be very efficient and convenient, but you need special compilers. User interfaces and real-time programming aren't quite there yet, although people have good ideas.

      The danger with getting to know FP through multi-paradigm languages (Lisp, Oz, etc.) is that people may stick with their familiar paradigms. But if you want a good multi-paradigm FPL, OCaml seems like the best choice right now.

    3. Re:methodology differs, and it matters by WetCat · · Score: 1

      Could you please provide a good (from your point of view) link about OCaml that is OK for novice?

    4. Re:methodology differs, and it matters by g4dget · · Score: 2
      This one has a lot of links: ocaml.org. There are some shorter papers that are good introductions.

      O'Reilly has a book available on-line, Developing Applications with O'Caml.

  35. Only be an ass if you're right by blach · · Score: 1

    You know, it's not very nice to use foul language and call people morons when it is you yourself who have made the mistake. See other replies.

    Regards
    James

  36. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Ars-Fartsica · · Score: 2
    C is used because it allows you to access system resources directly. You must do this to have a perfomant system. It doesn't matter if the language is C specifially, it just happens to be the most succesful systems language.

    One day an operating system will be implemented as a set of APIs on a VM consisting of a very small set of machine-dependent code, but not yet.

  37. why do people think garbage collection is great? by PissedOffGuy · · Score: 1, Informative

    first of all, for a programming task as small as this one, leaking is not a concern. it isn't something you'll ship to millions of people and have running all the time. if you are in fear of leaking megs of memory in a few days' worth of code and a few minutes of run time, then you have other problems.

    second, if i want to free memory, ill free it. if im dumb and forget to free memory a lot, ill use smart types that are freed when they fall out of scope. why would i want to have something freed at some unknown time AFTER it falls out of scope?

  38. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Anonymous Coward · · Score: 0

    If I recall a buffer overflow causing a security compromise typically depends on overwriting a stack pointer (stored on the stack "after" the space that we want to be written to).

    So what I find myself really curious about is just how does garbage collection come into it?

    - chad

  39. Language is almost irrelevant by Angst+Badger · · Score: 2

    Is Spanish better than English? Does Japanese trump Swahili?

    For any given language, the eloquence of the communicator far outweighs the syntax of the language. As with natural languages, it is harder to master the idioms of some languages than others, but that's all.

    --
    Proud member of the Weirdo-American community.
    1. Re:Language is almost irrelevant by Anonymous Coward · · Score: 0

      In many cases, language really does matter. Would you write an OS kernel in Perl? Or write a small, quick-and-dirty business app in assembler? Or write anything in Intercal, Befunge, brainf***, or C#? Some programming languages are better at some things than other languages are. (Try doing lambda calculus in C, for example.) That said, I agree with most people here that there is no one "best" language. Each language has its uses (except Pascal, of course :-)).

    2. Re:Language is almost irrelevant by Anonymous Coward · · Score: 0
      For any given language, the eloquence of the communicator far outweighs the syntax of the language. As with natural languages, it is harder to master the idioms of some languages than others, but that's all.

      According to your theory, we should have stick to Assembly Language. But we didn't. Because your theory is wrong. That's because English, Spanish, Japanese, Swahili are largely equivalent (like C# and Java), but computer languages aren't.

  40. new vs. old programming languages: thoughts by pmineiro · · Score: 2, Insightful

    as has been previously noted, the functional vs. non-functional distinction is only one of several, e.g., declarative vs. imperative, strongly-typed vs. weakly-typed, compiled vs. interpreted, etc.

    the promise of all newer programming languages is that they are easier to develop, understand, and maintain, because the programmer is elevated to thinking about the "big picture".

    i think it's possible to do great things in old languages like C. what it comes down to is, you need discipline. if the compiler/language design has discipline for you, great. otherwise, if you have alot of experience with alot of languages, and are anal, you'll do ok in a small group of similarly talented anal people. in a larger group or project, any not-automatically-enforced discipline will eventually be broken.

    unfortunately (?) i still do most of my programming in C/perl. that's because a) i need the solutions i'm developing to work 100%, and i can't afford to run into obscure under the hood problems in still-maturing technologies like ghc, and b) i like to leverage the huge body of existing libraries out there, and c) i have only worked on small projects (

    -- p

  41. Of course coder skill is more important then lang. by autopr0n · · Score: 2

    Does the skill of the programmer prevail over the limitations of the language and paradigm used

    Well, yeah. I mean, duh.

    Seriously though, while OCaml might have been a better language for the various problems, it should be possible to do it in C, assembly, PASCAL, whatever. It might not be a good idea but it can still be done.

    If the second team had known and used OCaml, or some other OO language... or hell even Java or C++ they would have had an easier time. But it may have been that they wanted to give themselves a challenge, to prove that they could do what some could do in OCaml in plain C.

    A while ago I was reading about how some proceduralist was complaining that these competitions weren't fair to non-functional coders. The argument made sense, but it shouldn't have been impossible to do the coding in a procedural language.

    In fact, I was thinking of doing the contest in Visual basic, just for spite :P

    --
    autopr0n is like, down and stuff.
  42. Yes, lisp is functional by autopr0n · · Score: 2

    In fact, Lisp is the orgional functional programming langauge.

    --
    autopr0n is like, down and stuff.
  43. Obviousness 101. by janda · · Score: 1

    Timothy wrote:

    Does the skill of the programmer prevail over the limitations of the language and paradigm used[...]?

    Well, duh. Skill counts more then language in everything. If the average slashdot-reading-geek got into a debate about anything with, say, Bill Clinton, who would you bet on? Conversely, if that same slashdot-reading-geek got into a debate with dubya, I ceertainly wouldn't be betting against the geek.

    To put it another way, pick a programming language you know, and look at what you wrote when you first learned the language vs. what you write today. The language hasn't changed, it's your skill in it.

    --
    Karma: Food Fight (Mostly affected by Date Plate).
  44. Re:Of course coder skill is more important then la by janda · · Score: 1

    Autopr0n wrote:

    In fact, I was thinking of doing the contest in Visual basic, just for spite

    A really good psychotherapist might be able to help you with your masochist tendencies.

    I mean, I'm all for allowing people to stick nails through their hands for religious reasons, and whatever consenting adults in the bedroom is between them, but I've gotta draw the line somewhere.

    :P

    Oh, and you have a ladybug climbing down your screen.

    :]

    --
    Karma: Food Fight (Mostly affected by Date Plate).
  45. Well, solaris is written in C++ by autopr0n · · Score: 3, Funny

    but besides that, the core of the OS dosn't need to be very big, so you really can check everything.

    A huge program in C++ will probably have tons of buffer overflows to exploit. A Large Java program will have ZERO overflows.

    It's like comparing a hand grenade to an orange. Both can be handled safely, but an orange is just not going to blow up, no matter what you do, while the hand grenade has an increasing chance of exploding the more you fiddle with it.

    --
    autopr0n is like, down and stuff.
    1. Re:Well, solaris is written in C++ by Anonymous Coward · · Score: 0

      A huge program in C++ will probably have tons of buffer overflows to exploit.

      This is the result of incorrect use of the language. C++ is not really a language, it is more a toolkit with which you build a language.

      If you go putting char bla[10] all over the source, you can be sure you will be suffering buffer overruns.

      If you use a proper string class you can write cString bla and will NEVER suffer a buffer overrun.

      The same is true for other types of errors: use an autopointer template or similar to avoid leaking resources (this also helps with resources that are not memory, such as file handles, windows, semaphores, ...). Use a dynamically-sized array template instead of all those fixed arrays, or if you really need fixed arrays build them from a template class (allowing run-time bound checking).

      C++ is an industrial-strength powertool. It can be perfectly safe, but you have to follow some simple rules.

      I have written an application consisting of some 150,000 lines of C++, and I will guarantee in writing that it has no buffer overruns _at all_. This is no idle posturing; it is a question of exercising discipline while programming.

    2. Re:Well, solaris is written in C++ by Anonymous Coward · · Score: 0
      If you use a proper string class you can write cString bla and will NEVER suffer a buffer overrun.

      And you will be unable to use third party libraries, hence you will rewrite most of them.

      The same is true for other types of errors: use an autopointer template or similar to avoid leaking resources (this also helps with resources that are not memory, such as file handles, windows, semaphores, ...). Use a dynamically-sized array template instead of all those fixed arrays, or if you really need fixed arrays build them from a template class (allowing run-time bound checking).

      And you will incompatible etc...

      C++ is an industrial-strength powertool. It can be perfectly safe, but you have to follow some simple rules.

      Yes, rewriting everything.

    3. Re:Well, solaris is written in C++ by Chandon+Seldon · · Score: 1

      No, Java will have other retarded security holes. The only programming language that you can be *sure* won't result in dumb security holes is VBScript running on Mosaic.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    4. Re:Well, solaris is written in C++ by jetlag11235 · · Score: 1

      Actually, the grenade itself may have a constant chance of blowing up at any given moment of fiddling. I think you meant to say that the longer you fiddle with it, the more likely you are to blow up.

    5. Re:Well, solaris is written in C++ by Anonymous Coward · · Score: 0

      Clearly, you have never microwaved an orange...

  46. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by khuber · · Score: 1

    What I was hinting at is that using other languages does not magically make your programs reliable or secure, though obviously it helps. There's more to it than removing pointers. No language is intelligent enough to realize what a programmer's intentions are and then carry them out with optimal efficiency. Even specification languages like NASA uses have many limitations. For starters, they run on hardware that is not 100% perfect, the bane of proving software correctness.

  47. That is so much bullshit. by autopr0n · · Score: 2

    In Visual C++, to open a window takes about 104 lines of code if you estimate the number without doing any research like myself. In Visual Basic, you can open a window just by creating a new project and hitting 'Run'. It's easy, and that's why it works.

    I remember getting into a debate with some kids about this in highschool. The next day, I'd produced a program that would bounce a ball around in a window in 30 lines of code.

    By "squishing" the code down (although, with only one semicolon per line, outside of for loops) I was able to get it down to 23 lines. Keep in mind I was in highschool.

    Anyway, if you want to see this for yourself, the source is up at http://autopr0n.com/23lines.cpp, and the complete VC5 (IIRC) is at http://autopr0n.com/23lines.zip

    Oh, and looking over the comments, I still used windows messaging. If I wrote this code today, I'd probably be able to get it done with even less code.

    --
    autopr0n is like, down and stuff.
    1. Re:That is so much bullshit. by Anonymous Coward · · Score: 0

      Eh. But you're still using MFC. I think the parent was talking about raw calls to CreateWindowEx() and the like.

      PS: Your site rules. :)

  48. Re:why do people think garbage collection is great by khuber · · Score: 2, Interesting
    why would i want to have something freed at some unknown time AFTER it falls out of scope?

    Performance, timing constraints, general efficiency... When you write data to disk it is not immediately physically written out (unless you are using unbuffered I/O on a direct I/O filesystem without hardware caching). In both cases the action is performed logically but not physically in order to increase performance.

  49. Visual basic does not *SIMPLIFY* the coding! by autopr0n · · Score: 2

    Sure, VB makes it easier to pop open windows and stick buttons on them, but that has more to do with the flaws in the win32 API that people use when writing C++ aps for windows then any strength in VB. You can do the same thing in Visual C++, but filling out a few wizards, and clicking 'compile' you get your own window. Sure, VC generates a shitload of code for you, but you still don't have to.

    In contrast with languages like Scheme, Java, etc, which really do require less code to do anything visual basically actually impedes what you do, due to the seriously lacking language features. Classes can be done Via COM, but good luck if you want to do something like polymorphism, or passing functions around or whatever.

    I've coded in VB, and trust me, the reason people don't like it is because it's weak and it sucks. I constantly found myself smashing up against the limitations of the language. Things that would be easy to do in java or even C++ were impossible from a practical standpoint in VB.

    Of course, things may have changed some in VB.net. But considering the fact that VB.net isn't even compatible with pervious VBs, I couldn't really care.

    --
    autopr0n is like, down and stuff.
    1. Re:Visual basic does not *SIMPLIFY* the coding! by vbweenie · · Score: 1

      Really the two biggest problems I've had with VB have been the following:

      • Inability to pass functions as parameters. Although VB6 has an event-handling mechanism that takes some of the pain out of not being able to write little anonymous functions as callback handlers, there's still a dull ache right there where that feature should be. Plus, right now I'm playing with Ruby and every extra minute I spend with that language's facility with iterators and blocks makes me hate VB more.
      • No threads. You can spawn ActiveX servers, get them to run off a timer pulse on a form, and pass them work to do "in the background", but it's a rediculously cumbersome way of solving a very common programming problem.

      I don't find VB's strength to be in GUI-building especially, although it does make that almost insultingly easy. For my purposes, it's best as a COM client providing glue and business logic for other components which are doing most of the real "execution". But as a language - bleh! If my place of work could be a little more open-minded about alternatives such as Python, Ruby (both of which can also work as COM clients, and even servers), I'd be a much happier bunny.

      VCC isn't an option for me simply because I find the idea of having a Wizard dump loads of boilerplate code all over an application simply offensive. I thought the point of inheritance was to remove the need for cut-and-paste duplication of this kind - isn't it supposed to clear all that crap out of the way?

      --
      Experience is a hard school, but fools will learn no other.
    2. Re:Visual basic does not *SIMPLIFY* the coding! by cardshark2001 · · Score: 1
      VCC isn't an option for me simply because I find the idea of having a Wizard dump loads of boilerplate code all over an application simply offensive. I thought the point of inheritance was to remove the need for cut-and-paste duplication of this kind - isn't it supposed to clear all that crap out of the way?



      First of all, you are confusing vc++ with MFC. Vc++ is merely the compiler, IDE, etc. MFC is the object model you are complaining about. MFC is really not that bad, once you get used to it, and wizard-generated code can come in quite handy. It's very easy to criticize, but why don't you try encapsulating the WinAPI sometime, and we'll see what you come up with.


      For the truly discriminating hackers among you, check out the WTL, or windows template library. It is a replacement for MFC that takes a more object oriented approach to the problem of encapsulating the Win32 API. It's kind of like an STL for windows. It is missing some stuff from MFC, such as CSocket, and CWinThread, but if you know anything about sockets and threads, you know that those classes are really thin wrappers anyway, and you're just as well off without them.


      The WTL was written by one guy at microsoft with a passion for OO (imagine that). Amazingly enough, it is actually available from Microsoft's own site! However, MS offers no tech support for it (don't worry, you won't need it, and it comes with source anyway). It is available here.


      I attribute the fact that they allow you to download it to the following fact: you cannot write an MFC GUI in an ATL com object without the WTL. Period. End of story. However, you CAN with the WTL. Try it out. You'll like it. I guarantee it.

      --
      WWJD? JWRTFA!
  50. Uh, computer languages are not human languages by autopr0n · · Score: 2

    The fact that computer languages are somewhat metaphorically related to human languages does not mean you can use facts about human languages to prove things about computer languages.

    The only thing they even have in common is that they are called languages.

    --
    autopr0n is like, down and stuff.
    1. Re:Uh, computer languages are not human languages by entrigant · · Score: 1

      Ever heard of this thing called humor? no? What about sarcasm?

  51. Re:Of course coder skill is more important then la by Anonymous Coward · · Score: 0
    In fact, I was thinking of doing the contest in Visual basic, just for spite :P

    Good luck getting it to produce a binary for Red Hat 7.3.

  52. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Eric+Smith · · Score: 2
    C is used because it allows you to access system resources directly.
    However, it is entirely possible to have a language that is both type-safe AND allows direct access to system resources. Modula 3 and Ada come to mind, but there are others.

    If more software were written in type-safe languages, we wouldn't have so damn many buffer overrun security holes popping up all the time. It's possible to write secure software in C, but the language doesn't help you do it. C isn't a high-level language, it's a portable assembler. Writing large pieces of software in C is madness.

  53. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by NonSequor · · Score: 2

    No, no, no. It's easier to implement a compiler or runtime environment which guarantees safety than it is to search thousands of programs for buffer overflows. I understand that every system will probably involve C, C++, or assembly at some level, but we should try to minimize the extent to which they are used in order to reduce the number of places where buffer overflows and other such problems can pop up. It wouldn't completely eliminate security problems, but if more programs were written in safer languages we could come close to eliminating the most common security problems.

    --
    My only political goal is to see to it that no political party achieves its goals.
  54. which functional language to learn? by jnana · · Score: 1

    Can anybody who is familiar with some of the functional languages recommend for someone with a few years experience with Java, Python, and XSL (yes, it is a Turing complete declarative language)? Basically, I would just like to play around with some functional language. I'm thinking about OCaml and Haskell. Any thoughts about which is better for pedagogical purposes?

    1. Re:which functional language to learn? by WWWWolf · · Score: 2, Interesting
      Any thoughts about which is better for pedagogical purposes?

      No idea about pedagogicalness, but...

      Personally, I started from LISP, and it has proven to be pretty useful. I use XEmacs, so writing stuff in elisp is kewl, and also many programs use Scheme as their scripting language, which of course made LISP skill valuable (Scheme is basically simplified LISP).

      I don't know which really is better, OCaml or Haskell; I've personally only tried a little bit of Haskell - and I tried it because it was advertised as a purely functional language, something that made it a little bit more interesting.

      But my day-to-day functional stuff is still all in LISP and Scheme =)

    2. Re:which functional language to learn? by (insert+nick+here) · · Score: 2, Informative

      There's several possibilities

      Haskell:
      Nice language, but I've never found any implementation that is complete enough to use for real programs.

      O'Caml:
      Nice language. Nice implementation. Nice library. Currently what I'm using.

      Scheme:
      Very small lisp. Often used as an extension language (for example in Gimp). It's a common discussion if this is an academic toy language or if it's fit for real programming. I'm not quite sure. Anyway, it's easy to learn (the standard is only a few pages), and there's a nice book for it (The Little Schemer (don't let the cartoons and food receipies fool you, this is one scary book)).

      Common Lisp:
      Is paradigm adaptive. That is, if you want to write functional, you can. If you want to write imperative, that's nice too. It's my favourite language, but I've had problems finding an implementation that has ok thread support and costs more than a car (no pun intended :) for a version that is not a strictly non-commercial trial version. That's why I ended up using O'Caml instead.

    3. Re:which functional language to learn? by jtdubs · · Score: 3, Interesting

      Functional programming eh?

      I'd suggest the following three languages:

      1. SML

      SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.

      SML will probably be easier to start off on, is better supported and better documented.

      Once you've got SML down, OCaml will be easy.

      SML is strongly-typed, via type-inference.

      2. Common Lisp

      This is probably the most powerful language in existance.

      Functional if you want. Side-effects if you want. Based on mathematical theory. Closure of data and code. With CLOS (builtin) you get an incredibly powerful OO system.

      Common Lisp is dynamically typed and CLOS supports dynamic multiple-dispatch for typing.

      Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.

      3. Haskell

      A very simple language to pick up the basics of. Pure functional. Lazy evaluation.

      A different idea than SML or Lisp.

      I think those three languages would expose you to pretty much all of the concepts of functional programming as well as all the different kinds of syntax you are likely to run across in functional languages.

      If you have some time to read up on lambda calculus it might be worth it.

      I also strongly recomment both of Paul Graham's Lisp books.

      Good luck,

      Justin Dubs

    4. Re:which functional language to learn? by luther · · Score: 1

      Well, i don't really know much haskell, but ocaml is used in many 1st year mathematic/CS university course in france, so there may be many pedagogical material out there (but then possibly in french).

      That said, both language come with good tutorials, so i would have a look at both to see which one suits your best.

      Ocaml is rumored to be faster, since it is using strict evaluation as oposed to the lazy evaluation of haskell.

    5. Re:which functional language to learn? by e+aubin · · Score: 3, Informative

      SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.


      From the Caml Faq

      The main reason is historical: Caml was invented before SML.

      The Caml language is issued from the original ML language, invented by Robin Milner in 1978, and developped jointly at INRIA from 1981. The first Caml compiler was written in 1984, and distributed from 1985. Standard ML was not yet invented, and Caml's syntax was similar to the syntax of ML V6.2, whose compiler was used to compile the first Caml compiler. When the syntax of Standard ML has been defined, Caml kept its own syntax, for several reasons. The first reason is questionable and subjective: we thought that SML's syntax was not a major improvement of the original ML syntax (hence of Caml's one). The second, more fundamental, reason is that we thought the language not to be mature enough at that time to be completely defined and fixed by a standard; we are still doing some progress on the understanding of some features of ML, and these progress may imply some important modifications of the language (let's cite the type checking of imperative features or the semantics and type checking of modules). In addition, we wanted to be free to add some new constructs (and indeed we did it, e.g. ``for''loops, ``try with'' and ``match with'', character constants, access to vectors and strings, ``mutable'' annotations for records, ``when'' clauses in pattern matching). This relative freedom with respect to the syntax allows the emergence of new variants of Caml: for instance the Caml Light and Objective Caml systems have their own extensions to the core syntax of Caml.

      Hence Caml has its own syntax.

      More interestingly caml has a pre-processor(camlp4)which allows to write in various other syntaxes. E.g. there is a Standard ML syntax, as well as a lisp-ish syntax.

      SML will probably be easier to start off on, is better supported and better documented.


      They both have nice documentation. They are so similiar I doubt it makes a lot of difference. The nicest new programmer ocaml documentation is The Oreilly Book Developing Applications with Objective Caml. With the exception of Ocaml's object oriented features, most ocaml documentation can be used w/ SML, and vise versa.

      Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.


      For whatever its worth, camlp4 gives you a nice macro system too. I don't know how it compares w/ common lisps, but it does give you static checking of your macros and let you work at the abstract syntax tree level.

    6. Re:which functional language to learn? by (insert+nick+here) · · Score: 2, Interesting

      SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.

      SML will probably be easier to start off on, is better supported and better documented.

      Once you've got SML down, OCaml will be easy.


      I started with SML, but thought it was impractical. I think it was limitations with the library, but when you are generally frustrated, it's pretty hard to identify the exact cause. Anyway, it turned me off ML for a while. Until I discovered O'Caml. Really opened my eyes.

      So my advice is to jump directly at O'Caml. SML might have a slightly more pedagogic or clean syntax, but an environment that makes you feel powerfull is more motivating and therefore more important in the start.
    7. Re:which functional language to learn? by jtdubs · · Score: 2

      Thank you for the corrections,

      Justin Dubs

    8. Re:which functional language to learn? by Anonymous Coward · · Score: 0

      CMUCL on x86 has okay thread support, as far as I can tell. Finding documentation for it is a little tricky - if you use the (confusingly named) "process" portability layer from CLOCC, it'll hide most of the differences with other lisps too.

  55. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Mr+Z · · Score: 1

    I believe the implications are (and this stretching a little to make sense of the original post) that, with proper GC and proper abstraction, the following would happen:

    • Automatic locals would get allocated from the system heap rather than the stack.
    • Arrays and whatnot would automatically resize. (Much easier to do once the objects are on the system heap rather than pinned on the stack.)
    • As a free bonus (unrelated to stack smashing), passing automatic locals out of scope now automagically works.

    FWIW, this happens to be how perl behaves with 'my' variables.

    --Joe
  56. Partial Challenge Task by dirvish · · Score: 2

    I don't understand how there can be an impartial "challenge task." Aren't some languages better suited to some tasks than others? I suppose if a language was truly superior the task would be irrelevant, but I don't believe such a superior language exists.

    1. Re:Partial Challenge Task by luther · · Score: 1

      That may be true for a particular contest, but if you look at the large picture, and examine the winners of the past contests, then you may see that the same progamming language come on top regularly.

      And last year was a XML parser or something such i think, and the year before, it was a raytracer, so these are rather different tasks, don't you think ?

    2. Re:Partial Challenge Task by khuber · · Score: 1
      I'm sure the ICFP Functional Programming Contest attracts a large number of functional language enthusiasts, and far above average programmers. I don't think you can draw any reasonable conclusions about languages from this contest.

      -Kevin

    3. Re:Partial Challenge Task by Anonymous Coward · · Score: 0
      I'm sure the ICFP Functional Programming Contest attracts a large number of functional language enthusiasts, and far above average programmers. I don't think you can draw any reasonable conclusions about languages from this contest.

      This is not true... Just look at the lightning division: 3 FP entries, versus 2 C/C++ entries. Same for the overall entries - there is nothing inherently functionnal in the ICFP Contest, and I guess now 90% of the people who participate knew of it because of slashdot and the like.

  57. "Functional programming wins again" by ari_j · · Score: 5, Funny

    ...functional programming wins again...

    Of course it does, you idiot. ICFP stands for International Conference on Functional Programming

  58. Do you speak Japanese...? by j3259 · · Score: 2, Interesting
    If you do speak multiple natuaral languages, you will realize that the language IS relevant.

    Especially some Asian language like Japanese that has ten ways of saying "me" depending upon the speaker's gender, age, and the context, is much different compared to English.

    To make the story short, language shapes the mind of its speaker.
    imho, gendered language like Hindi, Italian, Spanish... will always make its speakers see things in gendered manner. And Japanese language speaker will always see things in the respect level embedded in the language itself.
    And yes, C++ programmer will see problems in terms of object and its member functions, and polymorphism....etc.

    In Japan, there are probably twenty+ different ways of calling "rain," because it's a rainy country with four distinct seasons. In Mongol, there are whole bunch of ways of calling a horse, because of nomadic life.

    I am sure when you say "rain," in english, you are not going thru the thought process a Japanese will go thru when she hears "kirisame" or "tsuyu." And Mongolian nomads will see "horse" in a much different manner than you.

    --

    // only the code never lies.

    1. Re:Do you speak Japanese...? by Anonymous Coward · · Score: 1, Informative

      The idea that language determines thought to a large extent is called the Sapir-Whorf hypothesis. In its strong form it's been fairly thoroughly discredited.

      What is accepted is that it is slightly faster to think of something or to recognise something if you have a word for it already.

      If you think about it we are always coining neologisms or borrowing words or making metaphors when our language has no existing words.

      Steven Pinker gives a good account in his books.

      Fionnbar

    2. Re:Do you speak Japanese...? by khuber · · Score: 2, Insightful
      In Japan, there are probably twenty+ different ways of calling "rain,"
      April showers
      cloudburst
      deluge
      downfall
      downpour
      d renching rain
      driving rain
      drizzle
      flash flood
      freezing drizzle
      freezing rain
      heavy drizzle
      heavy rain
      heavy thunderstorm
      intermittent showers
      light drizzle
      light rain
      light shower
      moderate drizzle
      moderate rain
      occasional showers
      persistent rain
      rain
      rain belt
      rainstorm
      scattered showers
      sheet of rain
      shower
      sleet
      spate
      steady drizzle
      stream of rain
      thunderstorm
      thunder shower
      torrential downpour
      torrential rain

      That's just a few minutes of brainstorming, I'm sure there are more.

      -Kevin

    3. Re:Do you speak Japanese...? by Chandon+Seldon · · Score: 1

      Parsing that, I show 3 words for "Rain":

      Drizzle, Rain, and Downpour

      Most of the rest of what you list are just additions of common adjictives to one of those three.

      Imagine a language that had the word "Canine", but no specific word for Wolf, Dog, or any of the various breed of dogs. In a conversation about languages, someone could say "English has hundreds of words for canine" and someone could reply "So what, we have Big Canines, Little Canines, Feirce Canines, Yapping Canines, Wild Canines, etc."

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    4. Re:Do you speak Japanese...? by khuber · · Score: 1
      In a conversation about languages, someone could say "English has hundreds of words for canine" and someone could reply "So what, we have Big Canines, Little Canines, Feirce Canines, Yapping Canines, Wild Canines, etc."

      Exactly my point. How much do you want to bet some of the alleged 20 rain words in Japanese are not distinct words? Obviously I can think in terms of dozens of kinds of rain in English. The Japanese are not better rain philosophers due to their language.

      -Kevin

  59. a/a=quotient, not quotient+remainder by Istealmymusic · · Score: 2

    Nice try, but your interpretation of the division operator is wrong. Other posters have already pointed out the mistyped data, but I'd just like to say / ON INTEGERS RETURNS THE QUOTIENT, quotient being result of division without the remainder. So, yes, 1/2 = 0(quotient) + 1/2(remainder), but you only asked for the quotient, not the remainder.

    --
    "The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
  60. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Anonymous Coward · · Score: 0
    One day an operating system will be implemented as a set of APIs on a VM consisting of a very small set of machine-dependent code, but not yet.

    Haha. And one day, bold people will even implement this VM on a true microprocessor! Imagine that! Sorry, but this was created long ago, with the whole family of Lisp machines (yes no C, only Lisp used as a system language), see one of the last attempt

  61. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Anonymous Coward · · Score: 0

    No, sorry, ocaml is written in ocaml. Sure there is a minimal ocaml written in C that is used for bootstraping, but once the first ocaml compiler is compiled from C code, it is used to build the real ocaml compiler.

    Sven Luther

  62. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by j3110 · · Score: 2

    Actually, the system of which you speak is called a microkernel. People complain about context switches when you mention micro-kernels, but there are several good performing microkernels in use today. The way I see it is you had to switch context at some point anyhow :)

    It does depend on the skill of the programmer... that's my point. You are trusting more people than you realize to have written good software that could intentionally or accidentally compromise your precious data.

    Java and other GC languages aren't magical, they don't remove buffers. All they do is what any decent system should: check the buffers in system code. You're not going to break Java programs just because they are running on something that was written in C, because the checks are done and tested.

    Not many people argue that we should still be using assembler. The shift is clear. It began with C taking over the app market, then all of a sudden a bunch of freaky students decided they wanted to write an OS for gaming, and they didn't want to bother with all that low-level assembler crap. I really don't see C living much longer as a popular language. Laugh now, but it happened before, and history repeats itself, and for good reason this time. I wouldn't be suprised if cracking and terrorism speed it up.

    The most likely place where you'll start seeing Java (only because it's the most developed and easy to use of the GC languages) programs crop up are everything from shells to window managers. Then the server processes will be taken over by Java counterparts. A Java DNS server and a Java MTA will be made by someone tired of being hacked every other week through bind and sendmail. It will be easy to administrate because it will have a nice GUI. Then the hackers will pick on another C project.

    --
    Karma Clown
  63. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by j3110 · · Score: 2

    There is very little more to it than removing pointers, since a good 90%+ of exploits are buffer overflows. It will magically make your program more secure by doing so. Now all you have to do is not do something stupid like open files you shouldn't, and that should take care of the rest :).

    --
    Karma Clown
  64. Re:why do people think garbage collection is great by Anonymous Coward · · Score: 0
    first of all, for a programming task as small as this one, leaking is not a concern. it isn't something you'll ship to millions of people and have running all the time. if you are in fear of leaking megs of memory in a few days' worth of code and a few minutes of run time, then you have other problems.

    Why do you assume garbage collectors are written by complete morons? If you are using a decent language, 100% of the memory is reclaimed after a full garbage collecting cycle. Maybe it will be once every hour, or once every second, but guess what, it is extremely carefully tuned by the garbage collection programmers. Paranoid people, and people with a good reason, can still force a full garbage collection when they want, reclaiming 100% of the garbage. What's your point?

    second, if i want to free memory, ill free it. if im dumb and forget to free memory a lot, ill use smart types that are freed when they fall out of scope. why would i want to have something freed at some unknown time AFTER it falls out of scope?

    Because you don't care, and it's damn expensive to do manually what a computer could do automatically - if you make only *one* mistake your program will leak or crash. Are you manually cleaning up '/tmp' 15 minutes, for fear that a program might have left something there AFTER the file fall out of scope?

  65. bullshit by bcaulf · · Score: 1

    ...Perl converted to C? (there is a cmd line option in perl to do this... I have forgotten what it is)...

    The only way to translate Perl to C is to create a copy of the Perl interpreter (runtime system) and the Perl compiler, in C, which is what the Perl compiler option that you're thinking of does. The Perl compiler saves you your initial parse and compile stage and that's about it. It does not compile Perl in any ordinary sense of the word. Perl cannot be translated into C, because of its support for such features as runtime execution of dynamically created program text. Other highly dynamic features such as closures would be equally impossible to translate into C without a complete Perl interpreter.

    1. Re:bullshit by Kupek · · Score: 1

      Other highly dynamic features such as closures would be equally impossible to translate into C without a complete Perl interpreter.

      So? It's still C. Perl was written in C. Whatever is done in Perl can be done in C. In fact, while it's a huge simplification of what's going on, it's still accurate to think of Perl as an interface to a bunch of C routines. (With it's own syntax, grammar and semantics, but I did say it was a huge simplification.)

      Now, you'd gain nothing, really. You can do it, but there's no reason to. You can write object-oriented assembley code if you wanted to (what do you think C++ gets compiled to?), but it would be a waste of your time.

    2. Re:bullshit by bcaulf · · Score: 1

      It's true that Perl's basic set of functions expose the Unix API which is implemented in C. But then Perl adds on some additional dynamic sophistication which does not fall within the C execution model. Perl's (bizarre) scoping rules, for example, would require you to write a name-resolver (in C) to follow Perl's rules for name resolution. This goes counter to the normal meaning of compilation in languages like C, in which all names are resolved at compile time. The Perl folks might call it compilation but it doesn't meet my definition of compilation.

    3. Re:bullshit by halightw · · Score: 1

      Actually I found what I was thinking of, it's not an option of perl it's the perlcc command it it appears to create compilable C code from any perl code I have tried so far.

      perlcc -c test.pl (creates test.c) which I can compile as an executable, of course the source code went from 1K to 750K so this is not exactly efficient. Just for interest I tested the performance of the pre-compiled version of my program vs. a normal interpreted run using Perl and it came out exactly the same.

      So maybe the only useful reason for this is security... nobody could casually modify your scripts anyway, good for cgi's perhaps.

    4. Re:bullshit by Kupek · · Score: 1

      I don't know if you're getting it: perl (the executable, not the language) was implemented using C. Hence, anything that is done in Perl (the languange) can be done in C. In this way, perl (the executable) can be seen as a very sophisticated set of C routines. (This doesn't gain you much insight, but it's an interesting concept, I think.)

      Anyway, Perl is not a compiled languange. It's also not a purely interpreted langauge, it falls somewhere inbetween, leaning heavily on the interpreted side.

  66. Solomon by Effugas · · Score: 3, Insightful

    So, two parents divorce, and each gets half.

    Problem is, they've only got one kid.

    How much does each parent get?

    The story of Solomon points out that there are indeed discrete, indivisible quantities in this world that humans deal with on a regular basis. Though physically, the "type conversion" of the child into two bloody halves is possible, it's not likely what any programmer or parent wants.

    All sorts of other discretes exist for programmers. How many packets can I send, given one hour? 4/10th's of a packet is not a packet sent. How many widgets can be produced? A widget almost produced can't be sold. And so on. There is reality other than floats, good sir.

    --Dan

  67. What about me? by j3259 · · Score: 2, Informative
    "Rain" polly wasn't a good enuf example because it's hard to explain what I exactly mean by different ways of calling rain, but how about ten+ different "me"?

    I don't think English language will have equivalent translation for: watashi(formal), atashi(fem.), watakushi(formal), ore(rude m.), oi(dialect m.), boku(polite m.), sessha(polite obs.), jibun, unu(dialect), soregashi(obs.), chin(used by noble obs.), touhou(formal), onore(lit), wagahai(rude obs.)
    They all mean "me," but used in different context.
    Same applies to "you." like kimi, kisama, atana, omae, temee...

    The reason why there are so many ways of addressing one another is because Japanese human relationship is never even.
    And by using Japanese language, notion of respect level somehow slips in, and thus Japanese speaker will not have the concept of simple "you and I" even relationship. Because they lack the concept of simple "you and I," title names or names are more often used to address others instead of "you," "he," or "she" to clarify the respect level in the sentence.

    --

    // only the code never lies.

  68. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Ars-Fartsica · · Score: 2

    Good point, thats true. I have a coworker who also brings up lisp machines as a counterexample. JXTA chips (which I think are Java-on-silicon) haven't been a roarding success either...

  69. Minority programming languages by Ars-Fartsica · · Score: 2
    I think the point you are trying to make is that it is often better to be using the language most other people are using. The allows transfer/reuse of skills, tools, existing libs, etc.

    In a real world environment there is almost no reason to adopt a minority language - outside of everything else it often just creates a code-island. Now, if you can make OCAML the "majority" language of your group, you are set.

  70. Idiots. by Anonymous Coward · · Score: 0
    Integer/Integer != Integer.


    He just told you C sucks because it forces you to think at the level of the CPU instead of people or math, and here you are telling him to think like a CPU. The point is, C's type system is unsuitable for program development. What--you think you're smart because you understand the semantics of C types? You have to be smart to see why they're stupid, stupid. Any dork can understand C.

    1. Re:Idiots. by Anonymous Coward · · Score: 0

      Obviously you have not taken much math beyond high school. THE INTEGERS ARE A RING, NOT A FIELD!

      1 (real) / 2 (real) = .5 (real)

      1 (integer) / 2 (integer) does not make any sense. It would mean 1 * 2^-1, where 2^-1 is the multiplicative inverse of 2, but 2 does not have a multiplicative inverse in Z. Multiplicative inverses are only define in fields (and skew-fields).

    2. Re:Idiots. by Istealmymusic · · Score: 2

      I completely agree. 2x=1 cannot be solved without what you said.

      --
      "The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
  71. Compiler! by yerricde · · Score: 1

    but I do tend to agree that the best way to program in Brainfuck is to write a Something -> Brainfuck converter.

    Right. That's why we have compilers. Brainfuck is assembly language for Turing machines, with CBF being the bytecode.

    --
    Will I retire or break 10K?
  72. Embedded by yerricde · · Score: 1

    If your problem does not allow you to use memory opaquely--that is, if you must exercise control over the way code and data is laid out in physical memory--then you should use C. That accounts for 1% of all code written.

    That may account for 1% of the code written, but it may count for a vast majority of the cycles run on computers. Most computers are not workstations or servers; they're embedded systems in refrigerators, microwaves, toasters, telephones, and game consoles. For those restricted environments, you really do need a low-level language such as C.

    --
    Will I retire or break 10K?
  73. Language doesn't matter here by vague · · Score: 1

    This case isn't entierly language agnostic, implementing "complicated" algorithms is easier in a higher level language than in a lower level one, memory allocation can get quite hairy. But frankly, few ICFP tasks have been more language agnostic. There're simply so many completly different strategies to chose from for this problem that chosing the right one is the only thing that matters. Radical Too did one very smart thing, they knew the advantage of their language was execution speed and they went for an algorithm which uses this advantage to it's maximum, an semi exhaustive search algorithm. Instead of chosing to implement a "smarter" (in the AI sense, not in the programmer sense, their algorithm is plenty clever) and harder (more abstract) algorithm in which their language couldn't shine.

    Someone else did chose even more wisely, however. Such is life and the imperative languages have still yet to see a victory in ICFP. It's comming though, especially with more contests like this one.

    --

    -
    Listen. Strange women lying in ponds distributing swords is no basis for a system of government.

    1. Re:Language doesn't matter here by Portfolio · · Score: 1

      > Such is life and the imperative languages have still yet to see a victory in ICFP.

      Well, in the second year of the contest, the task was an abstract game player on parallel hardware. The winner was written in CILK, a C language with built-in parallelism primitives. The team had previously written a state-of-the-art parallel chess program. This demonstrated that domain expertise and language familiarity trumps any particular language paradigm.

      Ian

  74. How does a genius spell? by necro351 · · Score: 1

    I thought genius' were also supposed to be able to spell, but then someone like you probably doesn't concern "contraining" himself to the English language.

    --
    --"You are your own God"--
  75. set! by yerricde · · Score: 1

    but the first version of Lisp (way back in the '60s, I think) was a pure functional language.

    LISP was originally meant to be a Fortran replacement. Heck, its original syntax specification (M-expressions) was designed to look like Fortran; the parentheses you see on modern LISP are from the S-expressions that the first interpreter used internally. Are you sure that the first popular LISP interpreter didn't have what would become Scheme's set! instruction?

    --
    Will I retire or break 10K?
    1. Re:set! by Kupek · · Score: 1
      Time to dig out the textbook.

      From "Concepts of Programming Languages," fifth edition, by Robert W. Sebesta:
      "LISP began as a purely funcitonal language but soon aquired some important imperative features that increased its execution effeciency." A few pages later, "The original intent was to have a notation for LISP programs that would be as close to FORTRAN's as possible, with additions as necessary. This notation was called M-notation, for meta-notation."
      LISP notation was meant to mimic the notation of FORTRAN, but that does not mean it was meant to be a replacement of FORTRAN. (Analagous, I believe, to when Stroustrup created an object-oriented language, he borrowed the syntax and semantics of an already popular language, C.)

      Now, the first popular LISP interpreter probably had some imperative features, but the first one did not.
  76. My ICFP Entry - I call it "Subvertibot" by Jouster · · Score: 1

    It would probably be prohibitively complicated to create a new, privilege-separated user for each robot-controller instance. Therefore, my entry would:

    1) Contain a very, very (VERY!) basic algorithm for pick and drop of packages, sufficient to ensure only that my robot isn't killed and scores at least one point.

    2) Hijack socket connections from other robot-controllers and send arbitrary malformed commands ("j00 h4v3 b33n h4x0r3d" would be an option, of course :>).

    I see nowhere in the rules where this would not be allowed.

    And, of course, this would all be programmed in either TECO or, preferably, bash and netcat.

    Mwahaha!,
    Dan

  77. SQL as an LBA-complete language by yerricde · · Score: 2

    SQL is not a turing-complete language

    Neither is any other programming language in existence on a real machine. A Turing machine has an infinitely long memory. Real computers are called "linear bounded automata" (LBAs), which means a Turing machine with the modification that the memory is limited to a constant multiple of the size of the input, and trying to go off one end of the memory makes the head hit a brick wall. It's even possible to solve the halting problem on LBAs: just emulate two copies, one at double speed (tortoise/hare setup), and stop when the state and memory of both machines become identical, which means that the faster LBA has looped.

    PL/SQL and its free clone PL/pgSQL are imperative languages that are just as LBA-complete as C or Scheme.

    --
    Will I retire or break 10K?
  78. Windows/Linux Socket samples/instructions? by phorm · · Score: 2

    I've worked out a surprisingly functional socket class system in VB. I'm working to make a similar one in VC++ to replace it (instead of using hacky VB code to get back certain functionality issues). After that I was hoping to code something for my linux machine so that I can make apps that do basically what you just described: communicate with the linux machine from the windows machine through custom socket interfaces.
    What do you use as a reference for this? I haven't coded any C-type stuff for linux (just Perl scripts) yet but I would be most interested in getting started. I so any good reference-material would be good, particularly in reference to sockets. I suppose I could also code something like this in Perl as well?
    I've been told that sockets on linux behave in a similar way to those in windows, so perhaps it won't be too large a gap to bridge in my case, just need some samples to get me started.

    There are 11 types of people. Those who understand binary, those who do, and those laugh at those who do - phorm

    1. Re:Windows/Linux Socket samples/instructions? by Electrum · · Score: 1
  79. Economy of the language: C:Pascal::Verilog:VHDL by Theovon · · Score: 1

    I'm a software developer and a chip designer, hense the two pairings of languages I mention.

    One thing I have noticed is that some languages of the same genre take a heck of a lot more typing to achieve the same thing than others. For instance, the source code to a chip designed in VHDL would probably take on the order of twice as much space as one written in Verilog (we'll assume they result in identical logic).

    So we should use Verilog then, right? Not necessarily. VHDL is a more strict language, more strongly typed, etc. You have to do all that extra tying because you have to specify things that the synthesizer uses to check to make sure you mean what you say you mean. The result is that Verilog may require more debugging time. The VHDL synthesizer will catch far more of your errors at compile time than the Verilog synthesizer. Would you rather spend hours going over compiler warnings or days doing gate-level simulation because your design doesn't work?

    This is why Ada, as annoying as it is, is a safer language than C. C takes less up-front work, but while Ada helps you explicitly to write a bullet-proof program, it's FAR more difficult to do that in C.

    Scripting languages are another issue entirely, and I'm no expert on them. But they fall into a different class from these.

  80. Unrealistic competition: Not a good test at all. by Anonymous Coward · · Score: 0

    The real purpose behind this contest is to show that functional languages are good ways to do things. However, this goal shapes the competition in such a way as to offer strong advantages to functional languages.

    Specifically, as will be evident from the competition task description, it does not require the programmers to do the things that are really difficult in programming. Specifically, building good quality user interfaces, accessing and controlling devices, and working in an environment where the specification changes all too frequently.

    The competition would have been more realistic if it required the programmers to provide a good quality user interface for the game, including communicating with its competition over an IP network, and, half way through the contest, changing the specification to require that a human user can take over the game at any point.

    Now that would be a good competition, however, functional languages would fall on their face, and that would defeat the basic goal of this contest.

  81. GC in real-time apps? by yerricde · · Score: 2

    If you are using a decent language, 100% of the memory is reclaimed after a full garbage collecting cycle. Maybe it will be once every hour, or once every second, but guess what, it is extremely carefully tuned by the garbage collection programmers.

    Would you recommend using a garbage collector in a real-time application such as a video game? I suggested it once on a video game programmers' mailing list, and I was told that anybody who would use one should be shot.

    --
    Will I retire or break 10K?
  82. Toki Pona has 120 words by yerricde · · Score: 2

    Is Spanish better than English? Does Japanese trump Swahili?

    What about Toki Pona? It's a small spoken language with 120 words that don't inflect. Whether Toki Pona is small in a practical way or small in an impractical way is still up in the air.

    --
    Will I retire or break 10K?
  83. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! by Anonymous Coward · · Score: 0
    One day an operating system will be implemented as a set of APIs on a VM consisting of a very small set of machine-dependent code, but not yet.

    Go HURD!!! (well, at least theoretically...)

  84. Contest judging criteria is not real world by Anonymous Coward · · Score: 0

    Speed is not rated nearly high enough as a factor in the competition. One second per move is ridiculous. The C entrants rarely used more than 0.01 seconds per move, while the O'Caml and Python entries used 50X more CPU on average. The 'superior' O'Caml solution would not fly in the real world due to their slowness.

    I bet the O'Caml winner would have taken _days_ to complete a large board. I would certainly hate to be the judge in such a competition.

    Having said that, I do like their contest despite not being a fan of their judging criteria.

    1. Re:Contest judging criteria is not real world by Anonymous Coward · · Score: 0
      The C entrants rarely used more than 0.01 seconds per move, while the O'Caml and Python entries used 50X more CPU on average. The 'superior' O'Caml solution would not fly in the real world due to their slowness.

      You are a complete idiot and ignorant. O'caml is fast, very fast, very very fast. I mean it. It has nothing to do with the total crap that are the VMs/JIT implementation Java, Python, Perl or Scheme. It is nearly as fast as C, and maybe faster than C++. It compiles directly to machine code. That's why O'caml wins most of the time.

      I bet the O'Caml winner would have taken _days_ to complete a large board.

      No. You will see.

    2. Re:Contest judging criteria is not real world by Anonymous Coward · · Score: 0

      Are you joking? Have you used a modern optimizing C++ compiler? They produce much faster code than even 5 years ago. C++ will always beat O'Caml in speed by a factor of two or greater. Sorry - I have used O'Caml and it was O'Slow and O'Memory-hungry.
      Also, unlike C++, O'Caml code tends to be very verbose and long-winded. (By the way, your URL link (Slashhole?) did not work.)

    3. Re:Contest judging criteria is not real world by Anonymous Coward · · Score: 0

      I was going to use O'Caml for a server project until I read that O'Caml does not offer true SMP threading, and only runs on a single CPU. For this reason I went with C++ instead.

    4. Re:Contest judging criteria is not real world by Anonymous Coward · · Score: 0

      No. You will see.

      You were right.
      I was wrong.

      The better algorithm (not language) won.

  85. Oh yeah... by autopr0n · · Score: 2

    I forgot about the lack of threading. That one's just absolute murder.

    --
    autopr0n is like, down and stuff.
  86. Hrm... by autopr0n · · Score: 2

    Don't those usualy involve something being, you know, funny?

    Or was I mistaken?

    --
    autopr0n is like, down and stuff.
  87. uh... by autopr0n · · Score: 2

    You missed "deluge" "showers" and "storm"

    --
    autopr0n is like, down and stuff.
  88. no it dosn't by autopr0n · · Score: 2

    To make the story short, language shapes the mind of its speaker.

    *yawn*

    You're ability to say things does not make them true. When will people learn this?

    --
    autopr0n is like, down and stuff.
  89. Re:why do people think garbage collection is great by Anonymous Coward · · Score: 0
    why would i want to have something freed at some unknown time AFTER it falls out of scope?

    Because making that memory immediately reusable requires more recordkeeping. Copying collectors don't have to do work for each and every dead object--they can relocate the live objects and then make the entire region reusable in constant time.

  90. Especially by karb · · Score: 1
    Because the projects can be completed in 72 hours.

    OO languages were not designed to deal with design problems that occur in projects gestated in 72 hours.

    --

    Jack Valenti and the MPAA are to technology as the Boston strangler is to the woman home alone

  91. no it doesn't by j3259 · · Score: 1
    > You're ability to say things does not make them true. When will people learn this?

    *yawn*

    Did your ability to post "You're ability to say things does not make them true" make the statement true? When will you wake up from the never ending loop?

    Altho it is interesting, that there is Japanese superstition, kotodama(sprit of words), that they believe whatever they say will have spirit and will come true... but I don't buy that crap.
    And don't tell me you believe in "truth." It becomes a disgusting religious war if you start mentioning "truth." There is no absolute truth. Go back 1000 years, Sun goes up and down would be "true," and it does from observer's point of view.

    Then what am I saying here? Think.

    It's not the "truth" I'm talking about, I am simply sharing a story I *know* from my own experience. And sharing of knowledge will only make sense if you do it rationally with supporting arguments and evidence to back you up.
    You can agree if you wanna, and you can of course diagree, too. I am not claiming it's the truth. I am simply testing if you can see what I see. (@see paradigm)

    If you do speak several natural language, or if you can think in some object-oriented programming language, you will realize that the speaker has to adopt herself into the notions of the language she is trying to speak.
    Imagine C++ programmer who doesn't understand the notion of type. She will complain int k = 1 / 2; is not "0.5"
    So it's a loop, the culture shapes the language, and the language shapes the speakers, and the speakers form the culture. Get it?

    So, my point is that the language did matter after all.. Take some vacation, learn new language and travel outside your country. You will rediscover yourself.

    # Sorry my English sucks. but you get the story..

    --

    // only the code never lies.

  92. Re:Unrealistic competition: Not a good test at all by Anonymous Coward · · Score: 0

    and working in an environment where the specification changes all too frequently

    you obviously never entered this functional programming contest before - the spec changes by the hour!

  93. Detailed results are now posted. by Portfolio · · Score: 1

    > I mean, what happened? Which teams did what? Was anything interesting learned from this? Give us an overall ranking of all entries.

    The detailed results are now posted.

    I have a problem with the judges' scoring methodology. They simply totalled points across all the trials. However, different maps had different maximum amounts of points available, so that the results on a few maps dominated the results on the rest of the maps.

    It would have been more fair to use, say, percentages of the maximum score acheived on a particular map, so that the maps were weighted equally.

    Ian

  94. From Alma's author by Anonymous Coward · · Score: 0

    First thanx to WetCat.

    I have a few remarks on what was written here. The current release of Alma is based on a common OO model. For this reason, Alma is actually focused on OO languages. Some procedural languages (Fortran, C) can be parsed but procedures and functions are viewed as static methods of the Global class.

    I had programmed for more than 6 years in Lisp (at work). I like it but you can not make big projects with it. My Lisp project was around 120K lines (and a lot more generated) but was quite impossible to maintain. For big projects, you *need* types and static check.

    Functionnal languages are nice and powerfull but they have strong limitations for big projects (even with OO extensions). You should learn them but I'm not sure you should use them (for big projects).

    Will Alma parse them ? The main problem is that functionnal language are mainly interpreters. Most of the keywords are in fact functions (and there is more than 2000 standard ones) which can be redefined, renamed, ... In fact the syntax of lisp is () and that's all. My opinion is you can not parse lisp without executing it.

    The model of Alma could be extended to functionnal features but I think you couldn't write a parser. Anyway a parser will be written but it will parse only a few standard functions and nothing else.

    Finally, Alma can generate some Lisp code. This code is not perfect. It uses CLOS (common lisp object system) but it can already save you a lot of time.

    About SQL, you have to distinguish SQL2 and SQL3 (or equiv). SQL2 is not a programming language so Alma only generates SQL instructions to create tables. SQL3 tends to be a kind of programming language so you could translate a lot more.

    Alma is "Translate 95%". Alma is a lot more. It adds Design by Contract to all languages, it adds Litterate Programming, it adds Design Pattern. And it can generate some UML diagrams. And...

    And Alma is not finished ;-) Alma is already usefull but full of bugs. Alma will evolve and Ocaml will be parsed.

    Regards, Guillaume Desnoix

  95. CBuilder by oliverthered · · Score: 1

    You also have to write no lines of code in Borland CBuilder/Kylix. Why are you using Visual C++?

    --
    thank God the internet isn't a human right.
  96. symbolic maths by oliverthered · · Score: 1

    Hmmm, why not search on freshmeat for one of the many libraries that alow symbolic maths.

    As a simple example

    sym n;
    function = 2*n + n;
    cout function; // 3*n
    n =6;
    cout function.eval; // 18

    --
    thank God the internet isn't a human right.