Hints for the Challenge:

Below, you can find another hint for the Challenge.

You should only get here after reading, digesting, and applying the .

Hint

Let us start with the easy things, one at a time. First, introduce a function transcribe() for the main program.

Making such a change sounds easy but actually involves a bit of extra work, because a change in the program must also be reflected in the blueprint.

However, there is a more clever way to accomplish such a change. We change the blueprint only, and then run the program. Its output is a new program constructed from the new blueprint, also incorporating the new blueprint.

Here is the old program with a new blueprint:

The output () is a new program with a new blueprint:

This new program outputs itself ().

Can you improve this solution further? On the wish list we still have:

  1. Use parameters in the functions, instead of the global variable S.
  2. Rename the global variable to something more meaningful than S.
  3. Get rid of the awkward literals, such as , etc.
  4. Allow the use of any character in the program, including quotes and vertical bars (these are now forbidden, because transcribe() misinterprets them).

Try your program in the machine, and see if you can extend it to an improved solution.

Apply the Hint

It is your turn ...

Need Another Hint?

If you tried this hint, or do not see how it helps, then you are ready for the .


Valid HTML 4.01 Transitional

Copyright ©2009, Tom Verhoeff, T.Verhoeff@TUE.NL