A useful program

Marc van Woerkom <>
Wed Aug 11 17:47:30 CEST 2004

Am Wed, 11 Aug 2004 16:41:37 +0200 (CEST) hat
Joe Armstrong <> geschrieben:

     Here (attached) is a very useful program

The classical ones write themselves to stdout!

First I stumbled over such self producing programs, when I 
had a look into a source distribution of gcc.

Only much later, when I took a course on theoretical 
computer science (theory of computation, recursion theory) 
I got a hint, why folks write such programs.

There is a selfproduction lemma, derived from the 
recursion theorem.

    It exists a number n from |N such that phi_n(x) = n,
    where phi is the standard enumeration of the 
    functions (of one argument)

       phi : |N -> P^1


More information about the erlang-questions mailing list