02 September 2013

Gonzo sed code

In the last few weeks the juxtaposition of two things has made me laugh a bit.

First, there is this quote from Neal Stephenson's REAMDE:

Like any Russian, Sokolov enjoyed a game of chess.  At some level, he was never not playing it!  Every morning he woke up and looked at the tiles on the ceiling of the office that was his bedroom and reviewed the positions of all of the pieces and thought about all of the moves that they might make today, what countermoves he would have to make to maximize his chances of survival.

Soon after I read this I encountered SedChess, which is a wickedly awesome implementation of chess implemented in sed.  This is a fabulous hack, somewhat akin to producing fine carpentry with a stapler!  I was totally unsurprised when I first saw this hack on github that all of the comments were written in Russian.

The last fabulous hack I can recall in sed was dc.sed, which was a nearly complete implementation of "dc".

I've written some gonzo code in Perl....but I bow to people who have the patience and skillz to write gonzo code in sed....

No comments: