Skip to content
HN On Hacker News ↗

GitHub - dotcl/dotcl

▲ 186 points 47 comments by reikonomusha 2w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

26 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 3 of 3
SEGMENTS · AI 0 of 3
WORD COUNT 513
PEAK AI % 26% · §3
Analyzed
May 2
backend: pangram/v3.3
Segments scanned
3 windows
avg 171 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 513 words · 3 segments analyzed

Human AI-generated
§1 Human · 26%

Common Lisp implementation on .NET. Lisp source is compiled to CIL (Common Intermediate Language) and runs on the .NET JIT — so the same Lisp image runs on Windows, macOS, and Linux across x86-64 and ARM64 without per-platform porting work. Broadly conforms to the ANSI Common Lisp standard — verified against the ansi-test suite. What dotcl is good for

Embedding Common Lisp in .NET applications. dotcl.runtime is a regular .NET library; you load it from any C# / F# / VB.NET project, evaluate Lisp code, and call back and forth. Writing .NET code in Lisp. The dotnet: package gives direct access to .NET types: (dotnet:new "System.Text.StringBuilder"), (dotnet:invoke sb "Append" "x"), (dotnet:static "System.Math" "Sin" 1.0). You can subclass .NET types from Lisp via dotnet:define-class — the compiler emits real .NET classes, so frameworks like MAUI, ASP.NET Core, and MonoGame just see them as ordinary subclasses. Cross-platform CL with NuGet ecosystem access. Any NuGet package is reachable from Lisp; any Quicklisp library that doesn't rely on SBCL-only internals tends to work too (asdf, alexandria, etc. are routinely loaded).

Quick start # One-time bootstrap: cross-compile dotcl's compiler with Roswell/SBCL. make cross-compile

# Install as a `dotnet tool`-style global command. make install

# REPL dotcl repl

# Evaluate a form dotcl --eval "(format t \"hello, ~a~%\" (lisp-implementation-type))"

# Run a file dotcl --load my-program.lisp After the first cross-compile, dotcl can self-host: DOTCL_LISP=dotcl make cross-compile rebuilds the compiler using dotcl itself.

§2 Human · 25%

Prerequisites

.NET SDK 10+ — see install table below Roswell (only for the initial cross-compile bootstrap — once dotcl is built it can rebuild itself)

Installing .NET SDK 10

OS Command

macOS (Homebrew) brew install --cask dotnet-sdk

Ubuntu 24.04+ sudo apt install dotnet-sdk-10.0

Debian add the Microsoft package repository, then apt install dotnet-sdk-10.0 — see official guide

Windows (winget) winget install Microsoft.DotNet.SDK.10

Windows (Scoop) scoop install dotnet-sdk

Cross-platform script dotnet-install.sh / dotnet-install.ps1

Other https://dotnet.microsoft.com/download

Samples Working integrations in samples/:

MauiLispDemo — a .NET MAUI app (Windows + Android) where Application / ContentPage / view model are all defined in Lisp via dotnet:define-class. AspNetLispDemo — ASP.NET Core controller written in Lisp, with attribute routing. MonoGameLispDemo — Game subclass in Lisp; the Draw override runs on the MonoGame frame loop and animates the background colour. McpServerDemo — Model Context Protocol server exposing a Lisp REPL to MCP clients (Claude Desktop, etc.).

Each sample's README.md walks through the boot pattern. Architecture

Compiler (compiler/, written in Lisp): transforms S-expressions into a flat list of CIL instructions (SIL). Runtime (runtime/, written in C#): object representation, reader, CIL assembler (PersistedAssemblyBuilder-based for .fasl output and Reflection.Emit for in-memory codegen), and the standard library functions that aren't expressible in pure Lisp. Bootstrap is by cross-compile: a Roswell SBCL runs compiler/cil-compile.lisp to emit compiler/cil-out.sil, which the .NET runtime loads to bring up the Lisp environment. From that point dotcl can rebuild itself.

Architectural detail and design history are in DESIGN.md.

§3 Human · 26%

Per-change rationale is recorded under docs/decisions/. Platform notes

Windows: see docs/windows.md for installation, encoding (UTF-8 stdin/stdout always), pathname conventions, and Windows-side .NET interop (Registry / WMI / WinForms / MAUI / COM).

License MIT. See LICENSE.