2002 ICFP Programming Contest
Phil Bewig writes "The 2002 ICFP Programming Contest begins today. The programming task will be posted at 12:00 noon Pacific Time." Which should be... just about... now.
← Back to Stories (view on slashdot.org)
Actually, in this case it's a great idea. The game world is bounded by walls, so you can put the walls in the 0 index (and the width+1 index) of your array and not have to explicitly test for the array bounds. Treat them like any other wall.
My question is... could I train one of them carnival chickens to play and submit him?
Yes, people often do that. But what they often neglect to tell you, is that it depends upon the task at hand. Still, SML is a nice language, but I wouldn't use it for everything (neither would I use C++ for everything).
If you like functional programming, like static checking (there are no ways around SML's typesystem, you are really, really safe), like strictness (as opposed to lazy functional languages), and like to be able to do some imperative hacking for the last bit of performance, then SML may be for you. If you are into compilers, theorem-provers, computer algebra or anything similar, then SML is definitely for you.
For tasks that are very low-level (i.e. require lot's of bit-fidling), needs to run in small memory-space, needs access to lot's of C or C++ libraries, etc, C++ is definitely more suited.
though it has no/little support for variables
Yes, that's the whole point of functional programming. But SML allows you to declare ref-cells which behave just like variables in normal languages. The downside is that using them makes your code incredibly ugly (something most SML'ers think is good, because it encourages good functional programming style).
A good implementation of SML would run with more or less the same speed as C++, and could also run the same algorithms (since it allows you to use imperative constructs), but it would be better if you used functional algorithms except when you really need to tune for the last clock-cycles. Unfortunately, the "standard" implementation, smlnj, runs more like at half speed of g++. There is another dialect of ML, called Ocaml, which has much more impressive native-code compilers. It is also somewhat more geared towards other programming-styles then the functional one (i.e it supports object-oriented programming really well).
I just red the contest problems; It seems as though it can be easily done in C++ -- anyone have insight on this?
Yes, to avoid being blamed for being biased towards functional programming, the ICFP doesn't usually have problems that are much better suited for functional languages. And there has certainly been contestants using C++ before. The main reason C++ may not fare too well in this contest, is probably because (1) usually the biggest C++ gurus are busy doing other things, while the biggest Ocaml, SML, Haskell, etc, gurus are competing, and (2) Functional languages are often more suitable for rapid prototyping than C++, and development speed is certainly an important ingredient in this competition. But it is definitely not impossible that either C++ or Perl comes out a winner some year.
"If you think education is expensive, try ignorance" - Derek Bok
We were
From the FAQ:
Q1: Will a test server be available?
A: Yes, stay tuned...
I think that the protocol needs to be updated a little. How do we know when the end of the list of robots is reached?
It's all sent on one line, so the newline character marks the end of the list. See the examples.
Corewars was a great game that I used to play. It has been greatly updated now, but essentially you write a program in a simple assembler that moves around in memory and hopes to crash another program that is moving around trying to crash yours.
Kevin
"It's not the cough that carries you off, it's the coffin they carry you off in" O. Nash
In C and C++, the line "#include 'filename'" tells the compiler to act like the contents of 'filename' are inserted at that location.
/dev/tty refers to the keyboard (teletype). You can therefore type anything you want into the file at compile time.
Since Unix treats all devices as files (keyboard, CDROM, hard drive, etc)
It works in Windows/DOS, too, with the filename 'con', i.e., #include "con" .
0x0D 0x0A
It's RoboRally, published by WOTC. See here for an explanation of the rules, and compare to the ICFP rules here. Personally, I think RoboRally is more fun.
This post expresses my opinion, not that of my employer. And yes, IAAL.
Sure been a lot of progress in the last 20 years...
The downloadable test server appears to be written in Haskell and compiled with GHC:
Backups are for wimps. Real men post their data in comments and have slashdot mirror it