Codes, arithmetic and manifolds