Commit graph

4 commits

Author SHA1 Message Date
f584ad76f2 Add auto-compile, VM optimization, disassemble, call/cc compilation
- auto-compile! parameter: compile defines on the fly for zero-effort speedup
- VM optimization: local aliases, inlined truthiness checks (~15% faster)
- disassemble builtin: human-readable bytecode listing
- call/cc compiled natively in VM (escape-only, no longer falls back to eval)
- Makefile: add lint, bench-verbose, clean targets
- 518 tests green
2026-04-13 14:49:32 -04:00
a7ca8e9f89 Add bytecode compiler and stack-based VM with 3-25x speedup
Stack-based VM with 17 opcodes, TCO via in-place frame reset,
compile-time macro expansion, and seamless interop between
compiled and interpreted code. 514 tests green.
2026-04-13 14:39:15 -04:00
d0247b2729 Add syntax-rules, SRFI-1, stdlib, benchmarks, README
- syntax-rules: full ellipsis support with hygienic bindings (_EllBind)
- define-syntax / let-syntax / letrec-syntax wired up
- cond => arrow form is now TCO (Proc path loops, builtin returns)
- SRFI-1: take-right, drop-right, last, first-fifth, concatenate,
  list-tabulate, unfold, reduce-right, lset-union/intersection/difference,
  proper-list?, dotted-list?, alist-cons, alist-copy, delete, delete-duplicates
- Fix _Nil/_Void/_EOF singletons (is None check vs __bool__)
- Fix flat-map: pass Pair results to _append, not Python lists
- Fix number->string duplicate definition
- stdlib.lsp: 60+ utility functions (string/list/numeric/hash/tree/OOP/coroutines)
- bench.py: 11 benchmarks vs CPython (all correct, ratios 15–1800x)
- README.md: full feature list, examples, usage
- Makefile: add bench target
2026-04-13 11:05:37 -04:00
f72190d2dc Initial implementation of uncommonlisp
Single-file Scheme-like Lisp interpreter in Python with:
- TCO via explicit while loop (no Python stack overflow at any depth)
- syntax-rules with ellipsis for hygienic macros
- define-macro for procedural macros
- Full numeric tower, strings, chars, vectors, hash tables
- SRFI-1 list library
- call/cc (escape continuations), values, dynamic-wind, guard
- Python interop (py-eval, py-import, py-call, py-attr)
- 396 passing unit/integration/functional tests
- stdlib.lsp with 60+ utility functions
- Benchmark suite vs CPython baseline
2026-04-13 11:01:04 -04:00