Output one random character for each character of source code (as illustrated below). The probability of each character is its frequency in the original source code. Thus the output will be fake source code resembling a quine.
Specification
- Restrictions
- Standard quine constrains apply. No empty programs or functions. Also no reading your own source.
- Output
- The number of characters output should be exactly the number of characters in the source code
- Each output character should be randomly choosen
- The probability of choosing any character is equal to
(occurrences in source) / (length of source)
- This means that even a unary solution needs to 'randomly' choose 1 with probability
1
. Which is to say that the output can't be hard coded.
- Winning
- This is code golf, so fewest bytes wins
Example
Program Frequency Probability Possible Output
------- --------- ----------- ---------------
a@!@ a - 1 a - 25% @@a@
! - 1 ! - 25%
@ - 2 @ - 50%
Program Frequency Probability Possible Output
------- --------- ----------- ---------------
caBaDBcDaBDB a - 3 a - 25% aaaBBBBccDDD
B - 4 B - 33%
c - 2 c - 17%
D - 3 D - 25%