On rifles and railguns