Skip to main content

Arx language compiler

arxlang is the main language frontend in the ArxLang ecosystem. It provides the arx Python package and arx command for lexing, parsing, inspecting, and compiling .x source files.

Arx emits ASTx nodes and delegates semantic analysis, LLVM lowering, native runtime features, and linking to IRx.

Status: functional prototype. Supported behavior is tested, but the language and APIs are not yet production-stable.

Native Apache Arrow collections

Arx exposes data-oriented types backed by IRx's native Arrow C++ runtime:

  • tensor[T, D0, ...] uses arrow::Tensor
  • dataframe[name: T, ...] uses arrow::Table
  • series[T] uses arrow::ChunkedArray
fn main() -> i32:
  var grid: tensor[i32, 2, 2] = [[1, 2], [3, 4]]
  var rows: dataframe[id: i32, score: f64] = dataframe({
    id: [1, 2, 3],
    score: [0.5, 0.8, 1.0],
  })
  return cast(rows.nrows(), i32)

Current Tensor elements are fixed-width signed integers and floats. Current DataFrame columns are fixed-width numeric values or bool. Runtime-shaped Tensor and runtime-schema DataFrame types are parameter-only, and their dynamic index/column access remains deferred.

Install

pip install arxlang
arx --version

Building executables requires LLVM/Clang-compatible tools. Arrow-backed features also require a C++ compiler.

CLI

arx --show-tokens program.x
arx --show-ast program.x
arx --show-llvm-ir program.x
arx program.x --output-file program
arx --run program.x
arx test

Use --link-mode auto, pie, or no-pie when a platform requires an explicit linking mode.

Implemented language areas

  • explicit scalar, collection, class, and finite-union annotations
  • functions, trailing defaults, externs, and templates
  • mutable variables, assignments, casts, isinstance, and type
  • if/else, while, count loops, and list-valued for ... in
  • absolute, relative, grouped, namespace, installed-package, and stdlib imports
  • classes, inheritance, fields, methods, modifiers, and default construction
  • lists, builtin range, Tensors, DataFrames, and Series
  • Douki module/class/function/method docstrings
  • fatal assertions and compiled tests

Boundaries

Arx owns source syntax and CLI behavior. It does not define new AST node types or implement feature lowering locally: those responsibilities belong to ASTx and IRx respectively.

Documentation: https://arxlang.org

License: Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arxlang-1.24.0.tar.gz (66.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arxlang-1.24.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file arxlang-1.24.0.tar.gz.

File metadata

  • Download URL: arxlang-1.24.0.tar.gz
  • Upload date:
  • Size: 66.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure

File hashes

Hashes for arxlang-1.24.0.tar.gz
Algorithm Hash digest
SHA256 c14562401e16790e572dd3a3ce8436014410fe8d4265817913a153ff6444f06f
MD5 d28fcedea08d28a2d153fe9f03465104
BLAKE2b-256 bbdb05cba49eb6009cfdfae7b2b3bf962a2a03ebf1059a51fb8903329498571d

See more details on using hashes here.

File details

Details for the file arxlang-1.24.0-py3-none-any.whl.

File metadata

  • Download URL: arxlang-1.24.0-py3-none-any.whl
  • Upload date:
  • Size: 79.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure

File hashes

Hashes for arxlang-1.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90a61e99a9876a96258cf4dcab4bfb8d805159341bcdb231c5d68defc4aedad4
MD5 bbe28aa8590e504bf0bbacca612dd3f1
BLAKE2b-256 698b6d2d3deb2ef6e6af4b98a2cfaef89c5012d5e1f28c9c87a2ab09105183e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page