Skip to content

pyalt 0.1.0

Latest

Choose a tag to compare

@nabaalghad nabaalghad released this 29 Jul 18:06

First release of pyalt — a small compiled language with Python-like syntax.
It compiles .pya source files to standalone native executables, or to
extension modules importable from Python. There is no GIL: parallel for
distributes a loop across CPU cores, and writes to shared state inside a
parallel loop are rejected at compile time.

Highlights

  • Types, classes, exceptions, modules, dict/set/list, f-strings;
    function parameters are annotated, everything else is inferred
  • parallel for with compile-time race detection
  • Conservative mark-sweep garbage collector
  • Compiled executables are ~200 KB and run without Python installed
  • 216 tests, CI green on Windows and Linux
  • Benchmarks (Monte Carlo backtest, 10M iterations, outputs verified
    byte-identical to CPython): 62x serial, 347x with parallel for;
    Numba comparison included in the README — it wins by 15–25% at steady
    state on that workload

Installation (Windows x64)

  1. Download pyalt-0.1.0-windows-x64.zip below and unzip anywhere,
    e.g. C:\pyalt
  2. Run powershell -ExecutionPolicy Bypass -File .\install.ps1 to add
    bin\ to your user PATH (or call bin\pyalt.exe directly), then open
    a new terminal
  3. Building programs requires a C compiler on the machine: MSVC Build
    Tools, gcc, or clang — detected automatically

See GETTING_STARTED.md inside the zip. Linux/macOS: run from source
(python3 pyalt.py run prog.pya); the test suite passes on Ubuntu in CI,
but it is less field-tested than Windows.

Known limitations

No class inheritance, tuples, closures, or None/Optional yet. int is
64-bit (not arbitrary precision) and strings are UTF-8 bytes — see
"Semantic differences from Python" in the README before porting code.

SHA256 (pyalt-0.1.0-windows-x64.zip):
A889628D820D0D84E8584FE792F56524C6F3A8EE13A8DA62D943B95560BDC60B