{"id":51037212,"url":"https://github.com/ao3575911/haxor","last_synced_at":"2026-06-22T07:30:57.402Z","repository":{"id":358477207,"uuid":"1241558380","full_name":"ao3575911/haxor","owner":"ao3575911","description":"A minimal, formally-verifiable programming language for 2030","archived":false,"fork":false,"pushed_at":"2026-05-17T16:16:29.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-17T16:50:21.709Z","etag":null,"topics":["formal-verification","interpreter","programming-language","python","repl"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/hxr/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ao3575911.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T14:41:08.000Z","updated_at":"2026-05-17T16:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ao3575911/haxor","commit_stats":null,"previous_names":["ao3575911/haxor"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ao3575911/haxor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ao3575911%2Fhaxor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ao3575911%2Fhaxor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ao3575911%2Fhaxor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ao3575911%2Fhaxor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ao3575911","download_url":"https://codeload.github.com/ao3575911/haxor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ao3575911%2Fhaxor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34639701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formal-verification","interpreter","programming-language","python","repl"],"created_at":"2026-06-22T07:30:56.447Z","updated_at":"2026-06-22T07:30:57.390Z","avatar_url":"https://github.com/ao3575911.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haxor\n\n[![CI](https://github.com/ao3575911/haxor/actions/workflows/ci.yml/badge.svg)](https://github.com/ao3575911/haxor/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/hxr?cacheSeconds=300\u0026color=brightgreen)](https://pypi.org/project/hxr/)\n[![GitHub Release](https://img.shields.io/github/v/release/ao3575911/haxor)](https://github.com/ao3575911/haxor/releases/latest)\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Discussions](https://img.shields.io/github/discussions/ao3575911/haxor)](https://github.com/ao3575911/haxor/discussions)\n\n**Haxor** is a minimal, open-source programming language inspired by Python — built for 2030. It fits in under 10,000 lines, runs interactively in a REPL, and ships with a static verifier and a plugin system.\n\n```haxor\n@verify(pre=\"n \u003e= 0\", post=\"result \u003e= 0\")\nfn fibonacci(n):\n    if n \u003c= 1:\n        return n\n    return fibonacci(n - 1) + fibonacci(n - 2)\n\nlet seq = [fibonacci(i) for i in range(10)]\nprint(f\"Fibonacci: {seq}\")\n```\n\n## Highlights\n\n| | |\n|---|---|\n| **Familiar syntax** | Indentation-based blocks, Python-style operators |\n| **Static verifier** | Type inference, sign analysis, missing-return detection |\n| **Runtime contracts** | `@verify(pre=..., post=...)` checked at call time |\n| **Plugin system** | Add builtins, modules, and pipeline hooks from Python |\n| **REPL** | Multiline input, history, inline verification, `/`-commands |\n| **No dependencies** | Pure Python — just `pip install hxr` |\n\n## Installation\n\n```bash\npip install hxr\n```\n\nOptional SMT-based verification:\n\n```bash\npip install hxr z3-solver\n```\n\nTo run from source:\n\n```bash\ngit clone https://github.com/ao3575911/haxor\ncd haxor\npip install -e .\n```\n\n## Quick start\n\n```bash\nhaxor                        # start the REPL\nhaxor run examples/hello.hx  # run a file\nhaxor run file.hx --verify   # run with static analysis\nhaxor verify file.hx         # static analysis only\n```\n\n## Language overview\n\n```haxor\n# Variables with optional type annotations\nlet x: int = 42\nlet name = \"Haxor\"\n\n# Functions, lambdas, and closures\nfn add(a, b): return a + b\nfn make_adder(n):\n    return lambda x: x + n\nlet add5 = make_adder(5)\n\n# Classes and inheritance\nclass Animal:\n    fn init(self, name):\n        self.name = name\n\nclass Dog(Animal):\n    fn speak(self):\n        return f\"Woof! I'm {self.name}\"\n\nd = Dog(\"Rex\")\nprint(d.speak())\n\n# Loops and comprehensions\nlet evens = [x for x in range(10) if x % 2 == 0]\n\n# Imports\nimport math\nfrom collections import Counter\n\n# Runtime contracts\n@verify(pre=\"x \u003e 0\", post=\"result \u003e 0\")\nfn sqrt_safe(x):\n    return x ** 0.5\n```\n\n## Static verifier\n\nRun `haxor verify file.hx` to catch issues before execution:\n\n- **Type inference** — flags annotation mismatches and undefined names\n- **Sign analysis** — detects division by zero via abstract interpretation\n- **Control-flow analysis** — warns on functions with missing `return` paths\n\n```bash\n$ haxor verify examples/verified.hx\n✓ examples/verified.hx: no issues found\n```\n\n## Plugin system\n\n```python\n# my_plugin.py\nfrom haxor.plugins import Plugin\n\nclass MyPlugin(Plugin):\n    PLUGIN_NAME = \"my_plugin\"\n\n    def register(self, reg):\n        reg.register_builtin(\"greet\", lambda name: f\"Hello, {name}!\")\n        reg.on(\"post_execute\", lambda env: print(\"done\"))\n```\n\n```bash\nhaxor run file.hx --plugin my_plugin.py\n```\n\nAvailable hooks: `post_lex`, `post_parse`, `post_execute`. See [`extensions/async_plugin/`](extensions/async_plugin/) for a full example.\n\n## REPL commands\n\n| Command | Description |\n|---------|-------------|\n| `/verify` | Toggle static analysis on each input |\n| `/env` | Show all current bindings |\n| `/plugins` | List loaded plugins |\n| `/load \u003cpath\u003e` | Load a plugin at runtime |\n| `/help` | Show all commands |\n| `/exit` | Quit |\n\n## Repository layout\n\n```\nhaxor/\n├── haxor/            Language core\n│   ├── lexer.py      Indentation-aware tokenizer\n│   ├── parser.py     Recursive-descent parser\n│   ├── ast_nodes.py  AST node definitions\n│   ├── interpreter.py Tree-walking interpreter\n│   ├── verifier.py   Static analysis (type + sign + flow)\n│   ├── plugins.py    Plugin registry and hooks\n│   ├── repl.py       Interactive REPL\n│   └── stdlib/       Python-backed standard library\n├── tests/            pytest suite (179 tests)\n├── examples/         Sample programs\n├── extensions/       Plugin examples\n├── docs/             Language spec, plugin guide, verification docs\n└── haxor_cli.py      CLI entry point\n```\n\n## Contributing\n\nContributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Join the conversation in [Discussions](https://github.com/ao3575911/haxor/discussions).\n\n## License\n\nMIT © 2026 Haxor Contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fao3575911%2Fhaxor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fao3575911%2Fhaxor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fao3575911%2Fhaxor/lists"}