The Banu Musa's Book of Ingenious Devices
Ninth-century Baghdad automata, programmed by a drum

Three scholar brothers of Baghdad's House of Wisdom described about a hundred mechanisms: self-refilling vessels, fountains that changed shape, and an automatic flute player whose tune was set by a pinned rotating drum — often called one of the first programmable machines.
Wikipedia (English) · 9th century
Meanwhile around the world (±25 years)
Europe
- 843 Treaty of Verdun — 7 years earlier
Eastern Europe & Russia
- c. 862 Calling of the Varangians — 12 years later
Africa
- 859 Fatima al-Fihri founds al-Qarawiyyin — 9 years later
Asia
- c. 850 Prambanan — same year
- 868 The Diamond Sutra is printed — 18 years later
Alive at the time
- Al-Khwarizmi (aged 70)
- Charles the Bald (aged 27)
- Rurik (aged 20)
- Oleg the Wise (aged 5)
- Alfred the Great (aged 1)