This reminds me of Ted Chiang's "Tower of Babylon". You really should read it (and all of TC's works)!