random complexes over fields or the integers