{"id":29785615,"url":"https://github.com/weezy20/loxz","last_synced_at":"2025-07-27T17:13:25.130Z","repository":{"id":306732149,"uuid":"976310780","full_name":"weezy20/loxz","owner":"weezy20","description":"Lox programming language bytecode VM implementation in Zig.","archived":false,"fork":false,"pushed_at":"2025-07-27T09:21:44.000Z","size":166,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"compiler","last_synced_at":"2025-07-27T09:32:35.783Z","etag":null,"topics":["bytecode","lox","vm","zig"],"latest_commit_sha":null,"homepage":"https://craftinginterpreters.com/appendix-i.html","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weezy20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-05-01T22:03:32.000Z","updated_at":"2025-07-27T09:21:47.000Z","dependencies_parsed_at":"2025-07-27T09:32:39.373Z","dependency_job_id":"36a06514-2956-40a7-a845-a05a71d43d2e","html_url":"https://github.com/weezy20/loxz","commit_stats":null,"previous_names":["weezy20/loxz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/weezy20/loxz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weezy20%2Floxz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weezy20%2Floxz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weezy20%2Floxz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weezy20%2Floxz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weezy20","download_url":"https://codeload.github.com/weezy20/loxz/tar.gz/refs/heads/compiler","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weezy20%2Floxz/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267392562,"owners_count":24079919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["bytecode","lox","vm","zig"],"created_at":"2025-07-27T17:13:13.531Z","updated_at":"2025-07-27T17:13:25.103Z","avatar_url":"https://github.com/weezy20.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A bytecode VM interpreter for Lox\n\n### Usage\n\nInterpret a lox file. A lox file must have `.lox` extension.\nSome sample programs are provided in the `programs` folder.\n```sh\nloxz \u003cOPTIONS\u003e \u003cfile.lox\u003e\n```\n\nRun in REPL mode\n\n```sh\nloxz \u003cOPTIONS\u003e\n```\n\nFlags:\n\n| Flag         | Description                |\n|--------------|----------------------------|\n| `-h`, `--help` | Show help message          |\n| `-t`, `--stack-tracing` | Enable VM stack tracing   |\n| `-d`, `--debug`   | Enable debug output, set debug level  |\n\n## Additional features in loxz over the standard implementation: \n\n- Flexible constant pool upto 16_777_216 (u24) constants enabled by `OP_CONSTANT_LONG`. This instruction is emitted only after 8-bit space for constants have been exhausted.\npool have been exhausted.\n- 65536 Global variables supported over 256 in clox, with a global cache to speed up lookups.\n- Expanded Local variables limit to 65536 (u16), no 256 local variable limit, this means we use (u16::max + 1024)*sizeof(Value) [16 bytes] for stack\n- String interning for strings are performed at comptime so zero cost runtime ObjString comparisons. They are only a pointer comparison. It's as fast as it gets.\n- Supports `%` modulo operation.\n- Add support for `switch/case`. Check out [switch-case.lox](programs/switch-case.lox) example. Supports upto 64 nested switch blocks. No `break` keyword required, only one switch case executes.\n\n## Native Functions\n\nThe interpreter includes several built-in native functions with runtime error reporting:\n\n- **`clock()`** - Returns the current timestamp in seconds since epoch\n- **`sqrt(number)`** - Returns the square root of a number (requires non-negative input)\n- **`abs(number)`** - Returns the absolute value of a number\n- **`pow(base, exponent)`** - Returns base raised to the power of exponent\n\nAll native functions perform argument validation and provide descriptive error messages for invalid inputs. See [test_native.lox](programs/test_native.lox) for usage examples.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweezy20%2Floxz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweezy20%2Floxz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweezy20%2Floxz/lists"}