Given a file named hello_world that contains 2-100 bytes of printable ASCII, create a Turing-complete language in which hello_world is a valid program that prints "Hello World!". The output should be two files: a compiler or interpreter, and a text file with the language spec.
Rules
- Shortest code wins. Length of (any of the) output doesn't matter.
- The generated compiler/interpreter must tokenize
hello_worldinto at least two tokens, neither of which are ignored, and can't care about the filename. - Your program can't use external resources (no cloning its own compiler).
- The generated code can be in any language, and can compile to any language.
hello_worldcan be 2 bytes, any solution pretty much has to bake"Hello World!"into the language definition (or be unnecessarily long to choose not to in the greater-than-that case). How about requiring that the input has at least 13 (string length + 1) distinct characters? (I think this is an interesting problem regardless of whether that change is made.) – Kevin Reid Nov 18 '12 at 21:11