A tiny door-keeper could break the second law of thermodynamics — almost
In 1867, James Clerk Maxwell imagined a tiny being that could open and shut a door between two chambers of gas, letting fast molecules through one way and slow ones the other, sorting heat from cold without spending energy, seemingly breaking the second law of thermodynamics. Physicists later showed the demon can't get something for nothing: measuring each molecule to decide whether to open the door costs at least as much entropy as the sorting saves.
— James Clerk Maxwell, Theory of Heat — 1871 (demon first described in letters, 1867)