Programming Corner from Icon Newsletter 7


August 4, 1981; Icon Version 4


The Programming Corner is short this time, since this Newsletter was produced primarily to announce Version 4. There is just this problem: Write the shortest possible self-reproducing Icon program; i.e., a program, which when run, writes its own text. If you are not familiar with this problem, see the references
below.

SNOBOL4 buffs may be interested in the shortest known self-reproducing SNOBOL4 program:
S = ' OUTPUT = " S = 0" S "0"; OUTPUT = REPLACE(S,+"","0");END'
OUTPUT = " S = '" S ""; OUTPUT = REPLACE(S,+"","'");END
Send me your Icon solutions (use the address on the attached document request form), being sure to note the applicable version of Icon. The best solutions will be published in the next Newsletter.

References

1. Wetherell, Charles. Etudes for Programmers. Prentice-Hall, Inc., Englewood Cliffs, New Jersey. 1978. pp. 34-35.

2. Bratley, Paul and Jean Millo. "Computer Recreations; Self-Reproducing Automata", Software -- Practice & Experience, Vol. 2 (1972). pp. 397-400.

3. Hofstadter, Douglas R. Godel, Escher, and Bach: an Eternal Golden Braid. Basic Books, Inc. New York, New York. pp. 498-504 (et al.).

Icon home page