个人 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.