Ethics and the materialist conception of history