DEV Community

Jonathan E. Magen
Jonathan E. Magen

Posted on • Edited on

Yes, Lisp is useful for DevOps and automation

I originally published a less-good version of this post here.

In this article, I will show you modern examples of Lisp which can help you with DevOps tasks and automation in general. No, I'm not joking. No, I'm not drunk.

In no uncertain terms, the power of Lisp is ideally suited for automation. This is not just because of how expressive it is. It's also because of how straightforward Lisp is for solving real-world problems.

Now, let's dive in.

1: Racket's new Zuo

Zuo is a huge step forward for both process automation as well as using Lisp for general scripting!

Since Zuo is basically just a tiny Racket wrapped around an automation-friendly core, it's ideal for scripting build systems! Zuo is new in Racket 8.6 but it's already making a splash amongst language aficionados who also need to get stuff done. Pay special attention to ways in which zuo/build can help replace make.

2: High-level automation with Bass

From building container images to automating builds, Bass has you covered! I originally found out about Bass from this Lobsters post and have been following it ever since.

Bass lang is a bespoke, "low-fidelity" Lisp which runs on top of Docker's buildkit. Unlike Zuo, it's a Lisp dialect designed and written exclusively for the purposes of making common project tasks cacheable. It does this through the enduring magic of thunks, or unevaluated functions. Make sure to check out it's growing standard library.

3: Configure your server fleet with Adams

Sure existing options are cool, but have you tried not using YAML?

While Adams might seem little more than a stylistic choice in favor of S-Expressions, this library packs a punch. Come for the efficient code-reuse, stay for the declarative nature of configs. As a bonus feature, it's written in Common Lisp and therefore has a ton of extension potential.

Now go forth and be awesome! Wishing you the best of luck as you Lisp!

Update 2024-05: Common Lisp for shell scripting

Top comments (4)

Collapse
 
ejemba profile image
Epo Jemba

Let's not forget janetsh [1] which describe itself as "a new system shell that uses the Janet programming language [2] for high level scripting while also supporting the things we love about sh."

[1] github.com/andrewchambers/janetsh
[2] janet-lang.org/

Collapse
 
fyodorio profile image
Fyodor

Cannot stop admiring devops guys, this level of boldness is just unreachable 🦾

Collapse
 
voronoipotato profile image
Alan Ball

Let's not forget Guix and Guix System!

Collapse
 
vindarel profile image
vindarel

Much more advanced than Adams, Consfigurator: github.com/spwhitton/consfigurator ( github.com/CodyReichert/awesome-cl...)