Atomist is a really neat project exploring programmatic program rewriting: https://medium.com/the-composition/software-that-writes-and-evolves-software-953578a6fc36 (even aims to be multilingual!)