{"id":45084668,"url":"https://github.com/eddmann/santa-lang-comet","last_synced_at":"2026-06-06T11:31:32.897Z","repository":{"id":155239667,"uuid":"614581429","full_name":"eddmann/santa-lang-comet","owner":"eddmann","description":"Comet - Rust tree-walking interpreter for santa-lang with CLI, WASM, Lambda, PHP, and Jupyter runtimes","archived":false,"fork":false,"pushed_at":"2026-01-15T01:12:29.000Z","size":2427,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T17:38:45.407Z","etag":null,"topics":["advent-of-code","aws-lambda","cli","comet","interpreter","jupyter-kernel","php-extension","rust","santa-lang","tree-walking-interpreter","wasm"],"latest_commit_sha":null,"homepage":"https://eddmann.com/santa-lang/reindeer/comet/","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-03-15T22:11:28.000Z","updated_at":"2026-02-05T04:40:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f09eafa-63c2-4c7d-bdac-95f84ddc42a9","html_url":"https://github.com/eddmann/santa-lang-comet","commit_stats":null,"previous_names":["eddmann/santa-lang-comet"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/eddmann/santa-lang-comet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fsanta-lang-comet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fsanta-lang-comet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fsanta-lang-comet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fsanta-lang-comet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddmann","download_url":"https://codeload.github.com/eddmann/santa-lang-comet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fsanta-lang-comet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33981122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","aws-lambda","cli","comet","interpreter","jupyter-kernel","php-extension","rust","santa-lang","tree-walking-interpreter","wasm"],"created_at":"2026-02-19T15:36:05.732Z","updated_at":"2026-06-06T11:31:32.858Z","avatar_url":"https://github.com/eddmann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://eddmann.com/santa-lang/\"\u003e\u003cimg src=\"./docs/logo.png\" alt=\"santa-lang\" width=\"400px\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\n# santa-lang Comet\n\nTree-walking interpreter implementation of [santa-lang](https://eddmann.com/santa-lang/), written in Rust.\n\n## Overview\n\nsanta-lang is a functional, expression-oriented programming language designed for solving Advent of Code puzzles. This Rust implementation provides a tree-walking interpreter.\n\nKey language features:\n\n- First-class functions and closures with tail-call optimization\n- Pipeline and composition operators for expressive data flow\n- Persistent immutable data structures\n- Lazy sequences and infinite ranges\n- Pattern matching with guards\n- [Rich built-in function library](https://eddmann.com/santa-lang/builtins/)\n- AoC runner with automatic input fetching\n\nMultiple runtime targets are available: CLI, WebAssembly, AWS Lambda, PHP extension, and Jupyter kernel.\n\n## Architecture\n\n```\nSource Code → Lexer → Parser → Evaluator → Result\n                                   ↓\n                           Environment (Scopes)\n```\n\n| Component       | Description                                          |\n| --------------- | ---------------------------------------------------- |\n| **Lexer**       | Tokenizes source into keywords, operators, literals  |\n| **Parser**      | Builds an Abstract Syntax Tree (AST)                 |\n| **Evaluator**   | Tree-walking interpreter that executes the AST       |\n| **Environment** | Manages variable bindings and closures across scopes |\n\nFor detailed implementation internals, see [ARCHITECTURE.md](docs/ARCHITECTURE.md).\n\n## Installation\n\n### Docker\n\n```bash\n# Implementation-specific image\ndocker pull ghcr.io/eddmann/santa-lang-comet:cli-latest\n\n# Generic CLI image (also published by this project)\ndocker pull ghcr.io/eddmann/santa-lang-cli:latest\n```\n\n### npm (WebAssembly)\n\n```bash\nnpm install @eddmann/santa-lang-wasm\n```\n\n### Release Binaries\n\nDownload pre-built binaries from [GitHub Releases](https://github.com/eddmann/santa-lang-comet/releases):\n\n| Platform              | Artifact                                     |\n| --------------------- | -------------------------------------------- |\n| Linux (x86_64)        | `santa-lang-comet-cli-{version}-linux-amd64` |\n| Linux (ARM64)         | `santa-lang-comet-cli-{version}-linux-arm64` |\n| macOS (Intel)         | `santa-lang-comet-cli-{version}-macos-amd64` |\n| macOS (Apple Silicon) | `santa-lang-comet-cli-{version}-macos-arm64` |\n\n### Other Artifacts\n\n| Artifact                                        | Description             |\n| ----------------------------------------------- | ----------------------- |\n| `santa-lang-comet-wasm-{version}.tgz`           | WebAssembly npm package |\n| `santa-lang-comet-lambda-{version}.zip`         | AWS Lambda layer        |\n| `santa-lang-comet-php-{version}-linux-amd64.so` | PHP extension           |\n| `santa-lang-comet-jupyter-{version}-{platform}` | Jupyter kernel          |\n\n## Usage\n\n```bash\n# Run a solution\nsanta-cli solution.santa\n\n# Run tests defined in a solution\nsanta-cli -t solution.santa\n\n# Evaluate inline code\nsanta-cli -e '1 + 2'\n\n# Interactive REPL\nsanta-cli -r\n\n# Format source code\nsanta-cli -f solution.santa       # format to stdout\nsanta-cli --fmt-write solution.santa  # format in place\nsanta-cli --fmt-check solution.santa  # check if formatted (for CI)\n```\n\n## Example\n\nHere's a complete Advent of Code solution (2015 Day 1):\n\n```santa\ninput: read(\"aoc://2015/1\")\n\npart_one: {\n  input |\u003e fold(0) |floor, direction| {\n    if direction == \"(\" { floor + 1 } else { floor - 1 };\n  }\n}\n\npart_two: {\n  zip(1.., input) |\u003e fold(0) |floor, [index, direction]| {\n    let next_floor = if direction == \"(\" { floor + 1 } else { floor - 1 };\n    if next_floor \u003c 0 { break index } else { next_floor };\n  }\n}\n\ntest: {\n  input: \"()())\"\n  part_one: -1\n  part_two: 5\n}\n```\n\nKey language features shown:\n\n- **`input:`** / **`part_one:`** / **`part_two:`** - AoC runner sections\n- **`|\u003e`** - Pipeline operator (thread value through functions)\n- **`fold`** - Reduce with early exit support via `break`\n- **`test:`** - Inline test cases with expected values\n\n## Building\n\nRequires Rust 1.85+ or use Docker:\n\n```bash\n# Build CLI (debug)\nmake build\n\n# Build CLI (release)\nmake release\n\n# Run tests\nmake test\n\n# Run linting\nmake lint\n```\n\n## Development\n\nRun `make help` to see all available targets:\n\n```bash\nmake help          # Show all targets\nmake shell         # Interactive shell in Docker build environment\nmake can-release   # Run all CI checks (lint + test)\nmake lint          # Run rustfmt and clippy checks\nmake test          # Run all tests (lang, CLI, WASM)\nmake fmt           # Format code\n```\n\n### Runtime Targets\n\n```bash\n# Lambda runtime\nmake lambda/build\nmake lambda/serve   # Serve locally\n\n# PHP extension\nmake php-ext/build\nmake php-ext/test\n\n# Jupyter kernel\nmake jupyter/build\nmake jupyter/run    # Start notebook server\n\n# Benchmarking\nmake bench/build    # Build benchmark Docker image\nmake bench/run      # Run hyperfine benchmarks\nmake bench/compare V1=main V2=HEAD  # Compare versions\n```\n\n## Project Structure\n\n```\n├── lang/                  # Core language library\n│   └── src/\n│       ├── lexer/         # Tokenization\n│       ├── parser/        # AST construction\n│       ├── evaluator/     # Tree-walking interpreter\n│       ├── formatter/     # Code formatting\n│       └── runner/        # AoC runner support\n├── runtime/\n│   ├── cli/               # Command-line interface\n│   ├── wasm/              # WebAssembly target\n│   ├── lambda/            # AWS Lambda runtime\n│   ├── php-ext/           # PHP extension\n│   └── jupyter/           # Jupyter kernel\n└── benchmarks/            # Performance benchmarks\n```\n\n## Other Reindeer\n\nThe language has been implemented multiple times to explore different execution models and technologies.\n\n| Codename                                                 | Type                     | Language   |\n| -------------------------------------------------------- | ------------------------ | ---------- |\n| [Comet](https://github.com/eddmann/santa-lang-comet)     | Tree-walking interpreter | Rust       |\n| [Blitzen](https://github.com/eddmann/santa-lang-blitzen) | Bytecode VM              | Rust       |\n| [Dasher](https://github.com/eddmann/santa-lang-dasher)   | LLVM native compiler     | Rust       |\n| [Donner](https://github.com/eddmann/santa-lang-donner)   | JVM bytecode compiler    | Kotlin     |\n| [Vixen](https://github.com/eddmann/santa-lang-vixen)     | Embedded bytecode VM     | C          |\n| [Prancer](https://github.com/eddmann/santa-lang-prancer) | Tree-walking interpreter | TypeScript |\n\n## Tooling\n\n| Name                                                         | Description    | Language    |\n| ------------------------------------------------------------ | -------------- | ----------- |\n| [Workbench](https://github.com/eddmann/santa-lang-workbench) | Desktop IDE    | Tauri/React |\n| [Tinsel](https://github.com/eddmann/santa-lang-tinsel)       | Code formatter | Zig         |\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fsanta-lang-comet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddmann%2Fsanta-lang-comet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fsanta-lang-comet/lists"}