$ show jcubic/lips
LIPS is a Scheme (R7RS/R5RS) interpreter written in JavaScript, designed to run in browsers, Node.js, and Web Workers. The core interpreter (lexer, parser, evaluator, environments, types, serialization) lives in a monolithic `src/lips.js` (~10k+ lines), while roughly half the standard library is written in Scheme itself (`lib/`), including R7RS base procedures, SRFI implementations, and a bootstrap library. The system is self-hosting: the standard library is compiled to a binary CBOR+LZJB format (`dist/std.xcb`) for fast loading. The interpreter features both unhygienic macros (`define-macro`) and hygienic macros (`syntax-rules` with `free-identifier=?`), first-class continuations with tail-call optimization, a full numeric tower (complex numbers, exact rationals), and deep JavaScript interop (dot access, `new`, Promises, ES modules, `require`). It ships with a REPL (terminal and browser), a CLI (`bin/lips.js`), and a Docusaurus documentation site with an interactive interpreter. The codebase is actively maintained (last commit Sept 2026) with a comprehensive test suite including R7RS conformance tests, snapshot tests for parser output, and Scheme-level test files. Known limitations include some failing tests (marked `test.failing`), a monolithic core that is hard to navigate, and dual macro systems that can confuse contributors. The project is in beta with frequent breaking changes (documented in CHANGELOG.md).
The LLM identified 4 files worth highlighting for reuse:
Scheme bootstrap library implementing fundamental macros (cond, and, or, define-syntax, let-syntax), a JavaScript-compatible object system (define-class, class), and functional helpers (curry, compose, pipe, fold, unfold). Self-contained Scheme code that could be extracted into any R7RS Scheme implementation.
R7RS standard library implementation covering I/O ports, bytevectors, strings, numbers (exact-integer-sqrt, floor/, log), dynamic-wind, guard, define-values, let-values, cond-expand, and vector/string operations. Portable Scheme code implementing the R7RS specification.
Full SRFI-1 list library (fold, unfold, filter, partition, lset operations, etc.). Demonstrates portable Scheme library implementation with proper SRFI semantics.
Comprehensive macro test suite covering hygiene, ellipsis patterns, nested syntax-rules, SRFI-46/149/147, and literal matching. Demonstrates a rigorous testing pattern for Scheme macro systems.