Compact rings