Sources & Credits
Lex draws on declarative build languages, typed shells, compact bytecode virtual machines, and content-addressed storage. Each entry below records what influenced Lex or why an alternative was refused.
Language and declaration lineages
-
Nix — Eelco Dolstra.
Lazy attribute-set evaluation for declarative builds and content-addressed derivation inputs. Lex keeps lazy record thunks and input overrides, while refusing ambient channels, registries, string-basedfollows, implicitrecself-binding, and unconstrained dynamic key merging inwith. -
Nickel and Dhall.
Typed configuration and pure termination-bounded evaluation. Lex adopts strict override checks and total pure declaration borders while keeping syntax minimal and shared with an interactive console mode. -
Nushell — Structured table pipelines.
Typed tables and structured|>pipelines replacing ad-hoc text parsing between commands. Lex enforces that text always stops at the evaluator border. -
Modus.
The originating operating system where Lex serves both the interactive console and sandboxed declaration evaluation, extracted here as a standalone reusable language and CLI.
Parser, bytecode VM, and data structures
-
Compact structure-of-arrays syntax trees — Inspired by Zig (
Ast.zig) and Carbon.
Every syntax node inlex:parseris a fixed 16-byte record indexed byu32handles with side arrays for variable-length child lists and interned symbol IDs. -
Register bytecode VM and sorted record shapes — Informed by Lua 5.x register VMs and V8 hidden classes.
Flat 32-bit register instructions, caller-supplied arena-backed frames, O(1) tail-call frame reuse, explicit three-state thunks (Unforced -> Computing -> Forced), and sortedRecord_Shapetables so record composition checks field shapes without forcing values. -
SwissTable-style open-addressed hashing — Abseil SwissTable control-byte probing.
Used bylex:hash_tablefor string interning, record shape deduplication, and incremental query caching with zero ambient heap allocation. -
srcmd.
Intent-first design notes kept insrc/md/beside the source code.
Cryptography, metadata standards, and serialization
-
BLAKE3 — Jack O’Connor, Jean-Philippe Aumasson, Samuel Neves, and Zooko Wilcox-O’Hearn.
Domain-separated content hashing for trees, declaration references, and recipes, implemented freestanding insrc/blake3/. -
SPDX License List — Linux Foundation SPDX project.
Pinned license and exception identifiers validated offline bysrc/metadata/. -
RFC 8259 (JSON, Section 6).
Defines the±(253 - 1)exact integer range governing native numbers versus tagged{"$integer":"..."}values inlex eval --json.
Typography, icons, and tooling
-
Odin — Ginger Bill.
Implementation language for the freestanding Lex packages, standalone CLI, andtools/lextool. -
Latin Modern — GUST.
Serif typeface used for the Lex wordmark and site typography (GUST Font License). -
IBM Plex Mono — IBM.
Monospace typeface used for code blocks and CLI reference tables (SIL Open Font License 1.1). -
Lucide.
Minimal 24×24 stroke SVG icons used on the site (ISC License).