. elsewhere . . letters from the inaccessible .


20 May 2001

be a winner at the game of life

the game of life courtesy of Dr. Raven Jones

You should stop by and see Raven's latest JavaScript excursion. Having seen and even tinkered with The Game of Life in my shadowy academic history, I was quite caught by surprise by the fact that not only did Raven think of it recently (as it had crossed my mind just a few days ago... a little synchronicity rivaling the Cristiane Amanpour/Lynne Russell issue), but that he went to the trouble to code the entire thing in JavaScript. Looking at the code, I think he could convince me that it's not just a client-side scripting language, but that, given a little time, he could personally rewrite any Windows machine's registry in assembly. I've not heard the words gliders, loaves, ships, blocks, traffic signals, spaceships, and beehives in the same context in quite a long while. Raven's comments in the code of the page, I think, speak for themselves, quoted below.

// 2001.19.V. Raven Jones <raven@ashurbanipal.net>
// A JavaScript implementation of John Horton Conway's "The Game of Life".
// In stark contrast to other things I've been doing lately, the source is NOT obfuscated.
// Feel free to examine, embellish, steal, and reuse this code, but I'd be pleased if you would notify me.

// You probably know the rules of this game, but here they are for the uninitiated:
// The game is played on a grid, and some of the squares of the grids are occupied by cells.
// The term "cell" is meant in the biological sense, for reasons that will soon become apparent.
// Any cell with less than two neighbors dies off from isolation, and does not persist to the next generation.
// Any cell with more than three neighbors dies off from overcrowding, and does not persist to the next generation.
// Furthermore, any empty grid-square neighbored by three cells will, in the next generation, be populated by a new cell.
// By "neighbors" of a grid-square is meant any of the eight surrounding grid-squares.

// Sorry that the simulation is so slow; that's largely because the cells are portrayed with <img>s updated by fnRender()
// and there is a _very_ high cost to access the HTML DOM to update the images src property. It would run about five
// hundred times faster using a downloadable fontset and innerHTML calls, and I tried to let Netscape sing along on this
// one.


This last week, I undertook an exercise regimen consisting of running 3 days a week and bicycling 3 days, and resting on the seventh. I'm not even going to ask the question of how long this will last, because I've decided that it will. I've set my mind to it. I'm 26, haven't exercised regularly for the better part of 10 years, and it's time I got in shape.

musings of señor prod.

The Revolution is not immune from ugliness. But now people are praying in earnest for wisdom, and I think that's good.


©2001 Timothy A. Clark -|-