binary, alnum, symbol

The size of non printable characters is disclosed by default. And you can choose to disclose the size of alnum ([0-9A-Za-z]) and symbols. When you want to appeal that you challenged exotic golf such as symbolic golf, disclose your code statistics and change your name like "shinh(symbol)".

You will see Binary / Alnum / Symbol in statistics column.

Binary is 0-8 or 11-31 or 127-255.

Alnum is [0-9A-Za-z].

Symbol is [!\"\#$%&'()*+,-./:;<=>?@[\\]^_`{|}~].

Note whitespaces ([ \t\n]) does not belong to any classes.

The following code is used for this system.

  def get_statistics(s)
    a=[0,0,0,0]
    an=/[a-zA-Z0-9]/
    ws=/[ \t\n]/
    s.each_byte{|x|
      s=x.chr
      a[an=~s ?2:ws=~s ?1: x<127&&x>32?3:0]+=1
    }
    a
  end