Is it time for Lisp in DevOps?
By DevOps on Tue 02 January 2018in
We have been working on a project migrating a big Rails app from physical hardware to AWS, and I have been doing a lot of automation work.
It strikes me how we are doing the same thing over and over with different tools: reading variables, templating files and running semi-declarative logic. All with more or less broken syntax, including:
- Terraform / Terragrunt
- Shell scripts
- Packer JSON
- CodeDeploy appspec.yml lifecycle scripts
- Cron specs
- Endless different config file syntaxes
During the dotcom days we would laugh at the guys with title "HTML Programmer". Now we are "YAML Programmers".
This makes me think about replacing it all with a Lisp (probably Scheme), following the "code is data" and "data is code" mantra. We would have lots of parentheses, but we would have real variables with sane scoping rules, real functions, proper syntax for function calls, and macros. Maybe we need the YAML/JSON equivalent of SXML
Lisp is very powerful, but has not been able to break out. I learned it after hearing smart people say, "learn Lisp, not because it's practical, but because it will expand your brain and change the way you think about programming". I have certainly found that to be true. It has minimal syntax, which is one of its biggest strengths, but tends to turn off newcomers.
I think that part of the lack of success bad timing. When Lisp was at its peak, we didn't have open source, compilers cost $5000/seat. Lisp was very powerful, and faced competition from people selling FORTRAN for defense contracts who played the game better.
Another part was the "smug Lisp weenies". Lisp traditionally attracted smart but antisocial people who loved to argue and were condescending to newbies. They made it impossible to make progress on the legitimate improvements needed to the language.
Now we have open source tools and communities. There is a lot of interesting stuff going on in Clojure and Racket, and people are a lot more welcoming.
The pendulum is swinging away from dynamic scripting languages. Go is popular in ops, but I find it too low level, and it doesn't take advantage of recent advantages in programming languages. I mainly program in Elixir, which has the power of Lisp-style macros, approachable syntax and a great community.
Maybe it's time to give Lisp another try. I could write a Scheme syntax for Terraform. Or maybe I will take a swing at a Terraform clone in Elixir...