{"id":19854389,"url":"https://github.com/folyd/lox-lang","last_synced_at":"2025-05-02T01:30:32.105Z","repository":{"id":259253072,"uuid":"862183830","full_name":"Folyd/lox-lang","owner":"Folyd","description":"Lox language interpreter written in Rust","archived":false,"fork":false,"pushed_at":"2024-10-24T04:20:24.000Z","size":307,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T06:35:22.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Folyd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-09-24T07:18:18.000Z","updated_at":"2025-03-14T05:10:28.000Z","dependencies_parsed_at":"2024-10-30T22:47:05.967Z","dependency_job_id":null,"html_url":"https://github.com/Folyd/lox-lang","commit_stats":null,"previous_names":["folyd/lox-lang"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Flox-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Flox-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Flox-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Flox-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Folyd","download_url":"https://codeload.github.com/Folyd/lox-lang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969239,"owners_count":21673180,"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","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":[],"created_at":"2024-11-12T14:09:21.952Z","updated_at":"2025-05-02T01:30:30.793Z","avatar_url":"https://github.com/Folyd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lox-lang\n\nLox language interpreter written in Rust\n\n## Run\n\n```kt\nfun main() {\n    print \"hello world!\"\n}\n\nmain();\n```\n\n`cargo run example.lox`\n\n## Test\n\n`cargo test`\n\n\u003e Most of the test and benchmark files are copied from [Crafting Interpreters](https://github.com/munificent/craftinginterpreters) repository. The copyright for these belongs to Bob Nystrom and are copied here because their license allows it (MIT).\n\n## Benchmark\n\n![](./benchmark.svg)\n\n### Rust (this interpreter)\n\n```\n$ python3 run_lox_benchmarks.py lox \nRunning benchmarks for lox... tests/benchmarks/lox\narithmetic.lox: 2.8146\nbinary_trees.lox: 6.4399\nequality.lox: 3.6683\nfib.lox: 2.1664\ninstantiation.lox: 2.7269\ninvocation.lox: 0.8192\nmethod_call.lox: 0.5381\nproperties.lox: 1.1997\ntrees.lox: 9.0106\nzoo.lox: 0.927\n```\n\n### Python v3.12.3\n\n```\n$ python3 run_lox_benchmarks.py python\nRunning benchmarks for python... tests/benchmarks/python\narithmetic.py: 2.617\nbinary_trees.py: 2.5121\nequality.py: 2.6572\nfib.py: 1.3623\ninstantiation.py: 2.4031\ninvocation.py: 0.5649\nmethod_call.py: 0.2729\nproperties.py: 0.9565\ntrees.py: 2.5539\nzoo.py: 0.7307\n```\n\n### Perl v5.34.1\n\n```\n$ python3 run_lox_benchmarks.py perl  \nRunning benchmarks for perl... tests/benchmarks/perl\narithmetic.pl: 1.2259\nbinary_trees.pl: 7.158\nequality.pl: 1.5235\nfib.pl: 4.7082\ninstantiation.pl: 4.24\ninvocation.pl: 0.9832\nmethod_call.pl: 1.11\nproperties.pl: 1.574\ntrees.pl: 12.1001\nzoo.pl: 1.2363\n```\n\n### Clox (Crafting Interpreters)\n```\n$ python3 run_lox_benchmarks.py clox\nRunning benchmarks for clox... tests/benchmarks/lox\narithmetic.lox: 0.749\nbinary_trees.lox: 3.8906\nequality.lox: 2.0149\nfib.lox: 1.0654\ninstantiation.lox: 1.8701\ninvocation.lox: 0.2706\nmethod_call.lox: 0.1883\nproperties.lox: 0.4145\ntrees.lox: 2.6955\nzoo.lox: 0.3104\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolyd%2Flox-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolyd%2Flox-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolyd%2Flox-lang/lists"}