How basilisp-lang/basilisp works
Project type and purpose
• Basilisp is an open-source Lisp dialect implementation in Python. It provides:
• A compiler/interpreter pipeline for a Clojure-like language (“basilisp”).
• A REPL and CLI interface for interactive use.
• Standard library modules (EDN, JSON, I/O, data structures).
• Extension points via contrib subpackages (bencode, nREPL server, pytest integration, Sphinx support).
File structure
• Top-level:
• docs/ – full documentation (Sphinx).
• src/basilisp/ – implementation package.
• tests/ – unit and integration tests.
• CI & packaging: pyproject.toml, GitHub workflows, Makefile, tox.ini.
• src/basilisp splits roughly into:
• cli.py & main.py – entrypoints (console_scripts).
• core.lpy & core/ – core runtime definitions and protocols.
• lang/compiler/ – the compiler pipeline (analyzer, optimizer, generator, nodes).
• lang/… – data structures, reader, runtime, macros, seq, promise, etc.
• io.lpy, json.lpy, edn.lpy, process.lpy, shell.lpy – standard library.
• contrib/ – plugins for testing, docs, nREPL.
README
• Confirms it’s a Python-based Lisp targeting Python 3.9+.
• Emphasizes REPL, compiler, standard library, extension focus.
• Mentions test coverage, docs hosted on ReadTheDocs.
• Labels for every component (e.g., “Reader”, “Optimizer”, “nREPL Server Plugin”).
– External systems (gray clouds for file system, network)