Flow-based sampling for lattice field theories