Skip to main content
added 31 characters in body
Source Link
je je
  • 701
  • 4
  • 2

Non-quining infinite printer

Seems like the title could be better but I'm not sure what to do instead

I have heard that a monkey typing random keys on a typewriter, given infinite time, will eventually type out the entire works of Shakespeare, and in fact type out every possible string of characters of any length. This sounds to me like the basis for a profitable business venture in publishing. Unfortunately, however, as a result of previous failed business ventures, I am legally barred from possessing either monkeys or typewriters, so I'll instead need a program. I want this program to provably generate every possible string of characters, assuming infinite time and memory. Repetition is fine, as is overlap, as long as everything is outputted at least onceevery possible string appears somewhere in the output. There's a catch, though. I imagine once my business gets off the ground and people realize the potential profits, they might want to get their hands on my program. The trouble is that since I'm outputting every possible string of text, in theory I'll eventually end up outputting the program itself, leaving it open to be stolen. To prevent this, I want the program never to output its own source code. It should still output every other possible string, just not itself (or, obviously, any strings which it is a substring of). Because my funds are currently very tight, I can't afford to pay for more bytes than are necessary, so I'm seeking the shortest possible program that does the job (This is a code-golf challenge, shortest answer in bytes wins). Is it communicated well enough what this challenge is asking for? Should I add a TL;DR and/or a more technical explanation of what's being looked for?

Additional notes:

  • I've had enough run-ins with the law in previous ventures, I'd like this one to go smoothly. So no abusing loopholes in the program, please.
  • Given that this program is my financial plan for the next infinity years, I'd like some reassurance that it actually does what it's supposed to. Please provide at least a brief explanation of why your code works, since it can't exactly be tested.
  • Any character encoding is fine, please specify though. The exception is that your source code must be printable in the encoding you use. Is this a reasonable way to handle this that is fair to all languages?
  • No reading your own source, because that makes quine-related holes uncool, and uncoolness does not fit with my businesses' brand persona.

Non-quining infinite printer

Seems like the title could be better but I'm not sure what to do instead

I have heard that a monkey typing random keys on a typewriter, given infinite time, will eventually type out the entire works of Shakespeare, and in fact type out every possible string of characters of any length. This sounds to me like the basis for a profitable business venture in publishing. Unfortunately, however, as a result of previous failed business ventures, I am legally barred from possessing either monkeys or typewriters, so I'll instead need a program. I want this program to provably generate every possible string of characters, assuming infinite time and memory. Repetition is fine, as long as everything is outputted at least once. There's a catch, though. I imagine once my business gets off the ground and people realize the potential profits, they might want to get their hands on my program. The trouble is that since I'm outputting every possible string of text, in theory I'll eventually end up outputting the program itself, leaving it open to be stolen. To prevent this, I want the program never to output its own source code. It should still output every other possible string, just not itself (or, obviously, any strings which it is a substring of). Because my funds are currently very tight, I can't afford to pay for more bytes than are necessary, so I'm seeking the shortest possible program that does the job (This is a code-golf challenge, shortest answer in bytes wins). Is it communicated well enough what this challenge is asking for? Should I add a TL;DR and/or a more technical explanation of what's being looked for?

Additional notes:

  • I've had enough run-ins with the law in previous ventures, I'd like this one to go smoothly. So no abusing loopholes in the program, please.
  • Given that this program is my financial plan for the next infinity years, I'd like some reassurance that it actually does what it's supposed to. Please provide at least a brief explanation of why your code works, since it can't exactly be tested.
  • Any character encoding is fine, please specify though. The exception is that your source code must be printable in the encoding you use. Is this a reasonable way to handle this that is fair to all languages?
  • No reading your own source, because that makes quine-related holes uncool, and uncoolness does not fit with my businesses' brand persona.

Non-quining infinite printer

Seems like the title could be better but I'm not sure what to do instead

I have heard that a monkey typing random keys on a typewriter, given infinite time, will eventually type out the entire works of Shakespeare, and in fact type out every possible string of characters of any length. This sounds to me like the basis for a profitable business venture in publishing. Unfortunately, however, as a result of previous failed business ventures, I am legally barred from possessing either monkeys or typewriters, so I'll instead need a program. I want this program to provably generate every possible string of characters, assuming infinite time and memory. Repetition is fine, as is overlap, as long as every possible string appears somewhere in the output. There's a catch, though. I imagine once my business gets off the ground and people realize the potential profits, they might want to get their hands on my program. The trouble is that since I'm outputting every possible string of text, in theory I'll eventually end up outputting the program itself, leaving it open to be stolen. To prevent this, I want the program never to output its own source code. It should still output every other possible string, just not itself (or, obviously, any strings which it is a substring of). Because my funds are currently very tight, I can't afford to pay for more bytes than are necessary, so I'm seeking the shortest possible program that does the job (This is a code-golf challenge, shortest answer in bytes wins). Is it communicated well enough what this challenge is asking for? Should I add a TL;DR and/or a more technical explanation of what's being looked for?

Additional notes:

  • I've had enough run-ins with the law in previous ventures, I'd like this one to go smoothly. So no abusing loopholes in the program, please.
  • Given that this program is my financial plan for the next infinity years, I'd like some reassurance that it actually does what it's supposed to. Please provide at least a brief explanation of why your code works, since it can't exactly be tested.
  • Any character encoding is fine, please specify though. The exception is that your source code must be printable in the encoding you use. Is this a reasonable way to handle this that is fair to all languages?
  • No reading your own source, because that makes quine-related holes uncool, and uncoolness does not fit with my businesses' brand persona.
Source Link
je je
  • 701
  • 4
  • 2

Non-quining infinite printer

Seems like the title could be better but I'm not sure what to do instead

I have heard that a monkey typing random keys on a typewriter, given infinite time, will eventually type out the entire works of Shakespeare, and in fact type out every possible string of characters of any length. This sounds to me like the basis for a profitable business venture in publishing. Unfortunately, however, as a result of previous failed business ventures, I am legally barred from possessing either monkeys or typewriters, so I'll instead need a program. I want this program to provably generate every possible string of characters, assuming infinite time and memory. Repetition is fine, as long as everything is outputted at least once. There's a catch, though. I imagine once my business gets off the ground and people realize the potential profits, they might want to get their hands on my program. The trouble is that since I'm outputting every possible string of text, in theory I'll eventually end up outputting the program itself, leaving it open to be stolen. To prevent this, I want the program never to output its own source code. It should still output every other possible string, just not itself (or, obviously, any strings which it is a substring of). Because my funds are currently very tight, I can't afford to pay for more bytes than are necessary, so I'm seeking the shortest possible program that does the job (This is a code-golf challenge, shortest answer in bytes wins). Is it communicated well enough what this challenge is asking for? Should I add a TL;DR and/or a more technical explanation of what's being looked for?

Additional notes:

  • I've had enough run-ins with the law in previous ventures, I'd like this one to go smoothly. So no abusing loopholes in the program, please.
  • Given that this program is my financial plan for the next infinity years, I'd like some reassurance that it actually does what it's supposed to. Please provide at least a brief explanation of why your code works, since it can't exactly be tested.
  • Any character encoding is fine, please specify though. The exception is that your source code must be printable in the encoding you use. Is this a reasonable way to handle this that is fair to all languages?
  • No reading your own source, because that makes quine-related holes uncool, and uncoolness does not fit with my businesses' brand persona.