Finite fields and rings in Ruby.