Skip to main content
added 10 characters in body
Source Link
97.100.97.109
  • 7.1k
  • 12
  • 46

The challenge is simple: write a program which takes in some non-empty string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some non-empty string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

Post Reopened by pajonk code-golf
Post Closed as "Duplicate" by corvus_192, G B code-golf
deleted 5 characters in body
Source Link
The Fifth Marshal
  • 6.3k
  • 1
  • 25
  • 44

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not have contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not have contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

Became Hot Network Question
Clarified ASCII (see comments)
Source Link
emanresu A
  • 44.2k
  • 5
  • 100
  • 240

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not have contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not have contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

The challenge is simple: write a program which takes in some string \$n\$ consisting of only uppercase and lowercase ASCII letters, and outputs the code for a program (in the same language) which takes in no input and outputs \$n\$. However, the code your program generates must not have contain \$n\$ as a substring. For example, if your program was in Python, if the input was "rin", your output could not be print("rin"), because that contains the string rin (twice). One valid output would be, for example, x=lambda:'r\151n'.

Some notes:

  • Uppercase and lowercase characters are treated as distinct -- e.g. if the input string contains A, your generated code can still contain the character a.
  • Your generated code follows the same restrictions as a standard code golf answer -- e.g. it can be code which defines an anonymous function returning the string, but it cannot work by saving the string into a variable.
  • Your submission is scored by the length of the generating code, not the generated code. In addition, there are no restrictions on the source of the generating program, only the generated.

Standard loopholes are forbidden. As this is , shortest program wins.

Source Link
97.100.97.109
  • 7.1k
  • 12
  • 46
Loading