個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗PurePy in MoonBit: a tokenizer and parser for Python 3.12 producing a CPython-shaped abstract syntax tree, a sieve that rejects the Python PurePy excludes, a well-formedness checker, an interpreter, a printer, a command-line tool and an embedding interface.
PurePy is a pure functional subset of Python with a small-step operational
semantics and a static well-formedness judgement, specified in
pure-py/pure-py-spec. This is a
port of that specification. The reference checker is the specification for
what check decides; CPython is the oracle for what run prints.
Playground: https://marianoguerra.github.io/pure-py-mb/ — the whole
library in a browser tab, with 27 examples. The page is a real embedder: the
host module its examples import is supplied through the embedding
interface.
lib/ | marianoguerra/pure-py | the library — readme |
cli/ | marianoguerra/pure-py-cli | the pure-py command |
docs/ | embedding guide, examples compiled as tests | |
playground/ | the page, built to wasm-gc | |
test/ | the conformance suite, the goldens, the corpora | |
tools/ | the differential harness and the generators |
The repository root is a development module that is never published. It exists so that the harness, the corpora, the documentation and the playground reach the two real modules through their public API only, which is what keeps that API honest — and so that publishing the library does not publish half a megabyte of test fixtures.
moon add marianoguerra/pure-py # the library
moon add marianoguerra/pure-py-cli # the command
Eight oracles, every one compared against something outside this port, over the conformance suite of specification v0.23.0.
| oracle | compared with | result |
|---|---|---|
| tokens | CPython's tokenize | 1005/1005 |
| trees, no positions | CPython's ast | 1005/1005 |
| trees, with positions | CPython's ast | 1005/1005 |
| printer round trip | this parser and CPython's | 1004/1004 |
parse | the reference checker | 982/982 |
check | the reference checker | 982/982 |
check-program | the reference checker | 93/93 |
run | CPython's output | 321/321 |
The conformance suite under test/conformance/ is the reference's own,
copied verbatim, and the expected answers under test/golden/ are the
reference's answers. Both are committed, so the suite runs with nothing but
MoonBit and Python 3.
just lists every task, grouped. The ones that matter:
just quick type-check, format, unit tests, layering, conformance
just conform every oracle, held to its ratchet
just one PATTERN the tests whose name contains PATTERN, in full
just diffrun generated programs, compared against CPython
just playground build the page and serve it on :8000
just publish-dry what would go to mooncakes, without sending it
Regenerating the goldens needs the reference checkout: just reference-fetch,
then just goldens. Neither runs in CI.
Apache-2.0.