Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

CONTEST - Paragraph Print

Name: Anonymous 2010-01-19 1:00

Write the smallest possible program that can print the following paragraph (sans quotes):

"Educators, generals, dieticians, psychologists, and parents program. Armies, students, and some societies are programmed. An assault on large problems employs a succession of programs, most of which spring into existence en route. These programs are rife with issues that appear to be particular to the problem at hand. To appreciate programming as an intellectual activity in its own right you must turn to computer programming; you must read and write computer programs -- many of them. It doesn't matter much what the programs are about or what applications they serve. What does matter is how well they perform and how smoothly they fit with other programs in the creation of still greater programs. The programmer must seek both perfection of part and adequacy of collection. In this book the use of ``program'' is focused on the creation, execution, and study of programs written in a dialect of Lisp for execution on a digital computer. Using Lisp we restrict or limit not what we may program, but only the notation for our program descriptions."

The quote must be printed in verbatim. Any language may be used. Programs are rated on the size of their compiled executable form, not the lines of code. Record holder has to draw an ASCII medal for whoever surpasses him.

The following is my entry. It's uncompressed, unoptimized C code, and it compiles to 18475 bytes using the standard GCC settings on Win32. I hope that it will be surpassed shortly.

#include <stdio.h>

int main (void)
{
    printf("Educators, generals, dieticians, psychologists, and parents program. Armies, students, and some societies are programmed. An assault on large problems employs a succession of programs, most of which spring into existence en route. These programs are rife with issues that appear to be particular to the problem at hand. To appreciate programming as an intellectual activity in its own right you must turn to computer programming; you must read and write computer programs -- many of them. It doesn't matter much what the programs are about or what applications they serve. What does matter is how well they perform and how smoothly they fit with other programs in the creation of still greater programs. The programmer must seek both perfection of part and adequacy of collection. In this book the use of ``program'' is focused on the creation, execution, and study of programs written in a dialect of Lisp for execution on a digital computer. Using Lisp we restrict or limit not what we may program, but only the notation for our program descriptions.");
    return 0;
}


Your move, /prog/.

Name: Anonymous 2010-01-19 15:55

>>22
You can get shorter than "quote the text and have it printed" in any interpreted language worth using - Python, Perl, Lua, even Ruby.


k = " program"
print(string.format("Educators, generals, dieticians, psychologists, and parents%s. Armies, students, and some
societies are%smed. An assault on large problems employs a
succession of%ss, most of which spring into existence en route.
These%ss are rife with issues that appear to be particular to
the problem at hand. To appreciate%sming as an intellectual
activity in its own right you must turn to computer%sming; you
must read and write computer%ss -- many of them. It doesn't
matter much what the%ss are about or what applications they
serve. What does matter is how well they perform and how
smoothly they fit with other%ss in the creation of still greater
%ss. The%smer must seek both perfection of part and adequacy of
collection. In this book the use of ``program'' is focused on
the creation, execution, and study of%ss written in a dialect
of Lisp for execution on a digital computer. Using Lisp we
restrict or limit not what we may%s, but only the notation for
our%s descriptions.",k,k,k,k,k,k,k,k,k,k,k,k,k,k))

Newlines added for readability; it won't run with them, but you get the idea.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List