HeadlinesBriefing favicon HeadlinesBriefing.com

Docker Lisp: A Lisp Where Every Function Runs in Its Own Container

Hacker News •
×

A new Lisp implementation, Docker Lisp, takes a novel approach to function execution by running each function call within its own isolated Docker container. This project, hosted on GitHub, provides a unique solution for managing dependencies and state during Lisp evaluation. The core concept involves building base images (`docker-lisp/base-racket`, `docker-lisp/base-call`) and builtin images, then executing expressions via `./scripts/run eval`. Users can also trace calls using `--trace` and build standalone programs as Docker images, which can then be run with `./scripts/run name`. The project emphasizes dependency isolation and reproducible execution environments for Lisp code.

Docker Lisp requires Docker to be installed and uses a series of scripts for building and testing. The setup involves building base images and builtins, followed by running comprehensive tests. The `run` script allows for evaluating expressions directly, passing arguments to the Lisp image. For complex programs, users can define a Dockerfile within their Lisp code, specifying the evaluation command, and build it using `./scripts/build program path [name]`. This approach simplifies deployment and testing by encapsulating each Lisp function's execution within a containerized environment.

The technical innovation lies in treating every Lisp function as a self-contained unit that executes within a Docker container. This offers significant benefits for dependency management and state isolation during evaluation. While still experimental, Docker Lisp presents a compelling framework for creating reproducible and isolated Lisp execution environments, potentially simplifying the deployment of complex Lisp-based applications by leveraging Docker's containerization capabilities.