Keeping stuff: How to preserve course papers despite technological change

Front door ... Previous page ... Next page ... Executive summary


Success with SNOBOL4

In that same course in computer science, we also learned a second programming language, which the instructor touted as the wave of the future: SNOBOL4. Unfortunately, his expectations were not realized; SNOBOL4 has always been an extremely marginal programming language, and today there are probably fewer than a dozen professional programmers in the world who regularly use it.

Here is the first SNOBOL4 program that I submitted, along with the output it generated. The objective of the program was to compile a list of all the words in a given paragraph that consist of exactly four letters, after punctuation has been removed, along with the number of occurrences of each one.

Unlike BASIC and FORTRAN, SNOBOL4 has never had a formal public standard, and as usual implementations of SNOBOL4 vary. However, the original designers of the language at Bell Laboratories did a very clever thing: They made their translator for SNOBOL4 -- both the executable version and, more importantly, the source code for the translator itself -- available to anyone who was interested in it, so that people could see how it worked, make improvements in it, get it running on machines with different processors, and so on. Eventually, most people started working with an implementation that served as a kind of de facto standard for the language, in the sense that if you wanted to know exactly what a SNOBOL4 implementation ``should'' do in some tricky case, you could inspect the source code and try out the standard translator to see what it would do.

As a result of the free distribution of this de facto standard, programmers like me gradually began to feel confident that the source code for a SNOBOL4 program that used only the common features of the standard implementation could be moved from one system to another and would produce the same output under any implementation. And this confidence turns out to be justified. Once again, in preparing for this talk back in 2001, I typed in an exact copy of the 1972 SNOBOL4 program. We didn't have a SNOBOL4 translator around, but it turns out that the few remaining enthusiasts for the language are still supporting a free distribution over the Internet. I downloaded and installed it and ran my program; here is the output. Although SNOBOL4 adds a different collection of statistics at the end of the run, the actual program output is identical. Success at last!

Again, I am happy to report that, both in 2005 and again in 2009, I was able to download and install the free distribution of SNOBOL4 without difficulty. The only difference in the output that the current version yields is that the version number in the header is ``(CSNOBOL4) Version 1.2'' of ``December 9, 2008'' rather than ``(C-MAINBOL) Version 0.99.4'' of ``August 11, 1997.''


Front door ... Previous page ... Next page ... Executive summary


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~stone/essays/keeping-stuff/snobol4.xhtml


created March 19, 2001
last revised February 10, 2009

John David Stone (stone@cs.grinnell.edu)