For fair comparison of codegolf solutions in languages with different source alphabets, there should be a common unit of information.
Most sizes here are expressed in "characters" or "bytes", but not all characters are created equal. A brainfuck character can only have 8 values.
The standard measure of information in information theory is a bit. A brainfuck character is better counted as 3 bits.
Syntactic constraints may further reduce the entropy of program source.
In brainfuck not all 3^n length n programs are valid, because brackets must balance. A fancier measure of information content per character would be the limit for n->infinity of
log (# valid programs of n charcters) / n
but that is generally hard to compute.
For your favorite language, what is the number of possible values of a character? And what is the best known upper bound on the source entropy?
0
and1
, every {0
,1
}-string being a valid program). \$\endgroup\$