Cathedral, Forge, and Waterwheel: Technology and Invention in the Middle Ages