Conversation
Project has grown from ~10K to ~74K lines, 46 to 106 opcodes, 12 to 27+ types, 7 to 49+ builtins, 17 to 114 tests. Add sections for language features, modules, GC, and expand project structure with all current files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .github/workflows/ci.yml that builds and runs make check + make check-cpython on ubuntu-latest x86-64. Update README to emphasize io_uring as primary async I/O backend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this, ubuntu-latest defaults to Python 3.10, producing wrong .pyc magic numbers and failing _sre.MAGIC assertions in test_sre. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates repository documentation and adds CI automation, while removing two standalone markdown docs.
Changes:
- Remove
opt-peephole.mdandaudit.md. - Expand
README.mdwith updated feature list, project structure, and testing instructions. - Add a GitHub Actions workflow to build and run both test suites on PRs/pushes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| opt-peephole.md | Removes the peephole optimization guide document. |
| audit.md | Removes the 3.12 compliance gaps audit document. |
| README.md | Updates/expands project description, features, structure, and test instructions. |
| .github/workflows/ci.yml | Adds CI to build and run make check and make check-cpython. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **~74K lines of hand-written x86-64 NASM assembly** — no C runtime, no generated code | ||
| - **128-bit fat values** — inline integers, floats, bools in 16-byte (payload, tag) pairs, skipping heap allocation and refcounting entirely | ||
| - **SmallStr optimization** — strings up to 15 bytes stored inline in the 128-bit value slot, zero allocation | ||
| - **Raw Linux syscalls** — no libc dependency for I/O; buffered writes via direct `syscall` |
There was a problem hiding this comment.
README claims “no C runtime”, but the build links against libc (-lc) and parts of the runtime (e.g., the poll I/O backend) call libc symbols. Consider rephrasing to something like “no C source / mostly assembly” or clarify the limited libc dependency (primarily for libgmp/poll).
| - **~74K lines of hand-written x86-64 NASM assembly** — no C runtime, no generated code | |
| - **128-bit fat values** — inline integers, floats, bools in 16-byte (payload, tag) pairs, skipping heap allocation and refcounting entirely | |
| - **SmallStr optimization** — strings up to 15 bytes stored inline in the 128-bit value slot, zero allocation | |
| - **Raw Linux syscalls** — no libc dependency for I/O; buffered writes via direct `syscall` | |
| - **~74K lines of hand-written x86-64 NASM assembly** — no C source / mostly assembly; minimal libc usage (link for libgmp and platform glue) | |
| - **128-bit fat values** — inline integers, floats, bools in 16-byte (payload, tag) pairs, skipping heap allocation and refcounting entirely | |
| - **SmallStr optimization** — strings up to 15 bytes stored inline in the 128-bit value slot, zero allocation | |
| - **Raw Linux syscalls** — I/O hot paths use direct `syscall`; limited libc usage in the poll/epoll fallback layer |
| - **Raw Linux syscalls** — no libc dependency for I/O; buffered writes via direct `syscall` | ||
| - **256-entry jump table dispatch** — single indirect jump per opcode | ||
| - **GMP for arbitrary precision** — big integers via libgmp when values exceed tagged pointer range | ||
| - **Reference counting** — deterministic memory management with tagged pointer awareness | ||
| - **GMP for arbitrary precision** — big integers via libgmp when values exceed SmallInt range | ||
| - **Reference counting + cycle-collecting GC** — deterministic memory management with a 3-generation collector for cycles | ||
| - **Full async/await with io_uring** — high-speed async I/O via Linux io_uring (with epoll fallback), zero-copy TCP streams |
There was a problem hiding this comment.
These bullets say there is “no libc dependency for I/O” and that the async I/O backend falls back to “epoll”, but the codebase includes a libc poll()-based backend (see src/pyo/eventloop_poll.asm) and the link flags include -lc. Please align the README wording with the actual fallback/backend and libc usage (e.g., “poll() fallback” / “uses libc poll() for fallback”).
| ./apython --version # show version | ||
|
|
||
| # run a Python script | ||
| python3 -m py_compile script.py |
There was a problem hiding this comment.
Quick start uses python3 -m py_compile ..., but apython validates .pyc files as Python 3.12 specifically (and the test tooling expects .cpython-312.pyc). Using a non-3.12 python3 will generate incompatible .pyc files. Recommend documenting python3.12 -m py_compile explicitly (or note the requirement that python3 must be 3.12).
| python3 -m py_compile script.py | |
| python3.12 -m py_compile script.py |
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install dependencies | ||
| run: sudo apt-get update && sudo apt-get install -y nasm libgmp-dev | ||
|
|
||
| - name: Build | ||
| run: make | ||
|
|
There was a problem hiding this comment.
CI runs make check / make check-cpython, but the test harness and Makefile hardcode cpython-312 .pyc filenames while invoking python3. On ubuntu-latest, python3 may not be 3.12, which will cause missing .cpython-312.pyc artifacts and skipped tests or failures. Pin/install Python 3.12 (e.g., actions/setup-python with 3.12 and/or ensure python3 points to 3.12) or update the test commands to explicitly use python3.12 / version-detected .pyc naming.
No description provided.