The inspiration for the movie Hugo is actually a true story of a master Swiss watchmaker who make an actually writing doll which could actually be programmed to choose which and which sequence of letters to write.
This doll still works today.
http://www.chonday.com/Videos/the-writer-automaton
https://www.youtube.com/watch?v=ux2KW20nqHU
https://mymodernmet.com/jaquet-droz-automata/
https://en.wikipedia.org/wiki/Jaquet-Droz_automata
https://www.chonday.com/15454/the-writer-automaton/
There's also a 2019 indie horror movie which apparently riffs on the theme, "The Devil's Machine".
https://www.imdb.com/title/tt8339704/reviews
----- Forwarded message from Gil May -----
From: Gil May
To: reader@gmail.com
Date: Sun, 26 Apr 2020 08:25:01 +1000
Subject: Fwd: 240 year old doll from Switzerland...
*Brilliantly ingenious *
*Subject:* *240 year old doll from Switzerland...*
Greetings All,
Especially those of you who like to tinker with computers. It amazes me
the doll was built 240 years ago when computers as we know them today had
not been thought of.
A 240 - year - old doll that can write, a clockwork creation by Pierre
Jaquet-Droz. Yes, it’s 240 years old.
This clip will fascinate just about all the engineers, artists, clock
makers, doll makers, computer programmers, want - to- be inventors or
basically anyone out there that likes to tinker. This is more than
tinkering. When you view this, think computers.
Enjoy. It is truly amazing.
Remember, this was built in the 1770'
http://www.chonday.com/Videos/the-writer-automaton
Regards
Gil
----- End forwarded message -----