func entropy(s) { [0, s.chars.freq.values.map {|c| var f = c/s.len f * f.log2 }... ]«-» } say entropy(File(__FILE__).open_r.slurp)
4.27307750866434915713432109186549
Last updated 1 year ago