diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..8b3c12c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +{ + "name": "Common Lisp (SBCL)", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true + } + }, + "onCreateCommand": "sudo apt-get update && sudo apt-get install -y sbcl curl", + "postCreateCommand": ".devcontainer/setup.sh", + "customizations": { + "vscode": { + "extensions": [ + "rheller.alive" + ], + "settings": { + "alive.lsp.startCommand": ["sbcl", "--dynamic-space-size", "2048"], + "editor.formatOnSave": false, + "files.associations": { + "*.lisp": "lisp", + "*.asd": "lisp" + } + } + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 0000000..e7b3220 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Post-creation setup script for GitHub Codespaces +# Installs Quicklisp and required Common Lisp libraries + +set -e + +QUICKLISP_DIR="$HOME/quicklisp" + +# Install Quicklisp if not already present +if [ ! -d "$QUICKLISP_DIR" ]; then + echo "Installing Quicklisp..." + tmpdir=$(mktemp -d) + curl -o "$tmpdir/quicklisp.lisp" https://beta.quicklisp.org/quicklisp.lisp + sbcl --load "$tmpdir/quicklisp.lisp" \ + --eval '(quicklisp-quickstart:install)' \ + --eval '(quit)' + rm -rf "$tmpdir" + echo "Quicklisp installed." +else + echo "Quicklisp already installed, skipping." +fi + +# Load Quicklisp and install required libraries +# These match the ql:quickload calls in the .lisp source files. +# Update this list if new libraries are added to the project. +echo "Installing required Common Lisp libraries..." +sbcl --load "$QUICKLISP_DIR/setup.lisp" \ + --eval "(ql:quickload '(:with-user-abort :adopt :str :parse-float :cl-charms :fuzzy-match :cl-csv :cl-ppcre) :silent t)" \ + --eval '(quit)' + +echo "Setup complete. SBCL and Common Lisp libraries are ready." diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6db8c80 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Build artifacts from lisp/Makefile +lisp/bin/ +lisp/man/