Battle of the Languages II

A few years back (back around the year 86 or 87 to those who really care) when I worked at Digital Equipment Corporation, I caused a bit of a stir by entering a new "Note" in the Languages notesfile (which was one of many VAXNotes notesfiles paving the corporate intranet of DEC back in the days before the internet really existed to any meaningful extent).

The note was entitled "Battle of the Languages" and the idea was that people would have the opportunity to prove the superiority of their particular favorite language by posting the source code for the now somewhat famous computer simulation called "Life" which was invented by the Cambridge mathematician John Conway, and which consisted of the following rules:

For a space that is 'populated':
Each cell with one or no neighbors dies, as if by loneliness.
Each cell with four or more neighbors dies, as if by overpopulation.
Each cell with two or three neighbors survives.
For a space that is 'empty' or 'unpopulated'
Each cell with three neighbors becomes populated.

In an matter of days, there were upwards of twenty different languages represented as replies to the intitial posting (note). I think the language "C" was the first to post a solution followed by Pascal (my current language of choice), as well as many others (sans Java and a few other more recent languages for obvious reasons).

I think I may still even have a backup tape of this and other notesfiles which was made on a VAXstation 2000 back around 1990 or so if anyone is interested, but I digress...

My main point in posting this is to state that I always enjoyed conducting that little experiment and I am not real sure what was really proven (other than the fact that people can certainly be passionate about their favorite computer programming languages).

I am half tempted to conduct the same experiment today, although I imagine that, due to the wonders of Google and other search engines, that the source code listings of some of the more popular languages would appear within minutes rather than hours or days. This would especially be true for a common mathematical simulation like Life, which has already been posted to death many times over.

It might be interesting to see what were to happen if the same contest were conducted using a different simulation candidate however... any takers on what to use for such an experiment and what parameters to set as rules (graphics or text output only, etc.)?

Thanks

-dav0 (aka David McLure - DEC employee from 1984 to 1992)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Modularization exercise

what parameters to set as rules (graphics or text output only, etc.)?
I would leave that for the authors, as each language has its own ideas of interactivity and evaluation strategies. E.g., some authors might use a lazy approach, when the API accepts coordinates and the number of generation, and returns a single boolean. And the authors may design the API in a way that maximizes sharing of calculations for multiple such calls. I actually see the design of this API as the most important part of the experiment - it would show the features of PLs that are usually not exposed in traditional programming contests. And yes, this specific problem (Life) seems quite good for that.

Of course, for the purpose of demonstration, some clients of API could be provided as well, and these clients could be GUI, CLI, or mere unit tests.

The Great Computer Language Shootout

Battle of Languages reminds me vehimently of the Great Computer Language Shootout, http://shootout.alioth.debian.org/.

CU, Bernhard

Also see GP4

A slightly different selection of languages (and implementation versions) is being measured on Gentoo Linux (rather than Debian) and Intel Pentium 4 (rather than AMD Sempron)


GP4 Computer Language Shootout Benchmarks


So when the Clean install is broken on The Computer Language Shootout, there might be a good install on GP4 hint hint :-)

A Virtual Twist to the game of Life

I propose another version of the Life game programming contest, only this time with a slight twist to the rules of the game; the main one being that the new game is a three-dimensional version of the original. Given the new twist, the rules may need a little tweaking...

Rules (assume a 3d grid with (9*3)-1 = 26 potential neighbors) :

For a space that is 'populated':
Each cell with two or fewer neighbors dies.
Each cell with thirteen or more neighbors dies.
Each cell with three to twelve neighbors survives.
For a space that is 'empty' or 'unpopulated'
Each cell with three to five neighbors becomes populated.

Beating myself to the punch...

I guess I didn't try hard enough on Google - it looks like some versions of 3d Life have already been done :

http://www.geocities.com/robisais/3dca.html

I haven't had time to look at these yet, and from the page comments, many of these programs appear to be broken or sufficiently different from each other as to disqualify themselves. Nevertheless, this news could be enough to burst this contest balloon before it is even inflated.

In any case, let me know if there is any interest in a 3d Life programming language contest. I can provide a website to house the thing, but I can't offer much in the way of prizes other than fleeting fame and glory.

I like Andris's suggestion of focusing on the API.

Also, I took a look a the Great Computer Language Shootout, but it seems a little too diffused. I think the success of the original Battle of the Languages at DEC was the fact that it focussed on one specific programming task. The beauty was watching the same basic algorithm appear in so many different languages - it was a great learning tool.

Any other suggestions?