{"id":13661681,"url":"https://github.com/ZaneDubya/LoxScript","last_synced_at":"2025-04-25T03:30:51.815Z","repository":{"id":79186941,"uuid":"257412749","full_name":"ZaneDubya/LoxScript","owner":"ZaneDubya","description":"A bytecode compiler and virtual machine for the Lox language, in C#. Includes a C# / Lox object interface generator and bytecode serialization.","archived":false,"fork":false,"pushed_at":"2025-03-02T21:27:24.000Z","size":454,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-25T00:53:16.304Z","etag":null,"topics":["bytecode","compiler","lox","lox-language","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"C#","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/ZaneDubya.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":"2020-04-20T21:54:14.000Z","updated_at":"2025-03-02T21:27:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"70520a63-a803-4652-bd05-e42263723daf","html_url":"https://github.com/ZaneDubya/LoxScript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaneDubya%2FLoxScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaneDubya%2FLoxScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaneDubya%2FLoxScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaneDubya%2FLoxScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZaneDubya","download_url":"https://codeload.github.com/ZaneDubya/LoxScript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250747689,"owners_count":21480693,"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":["bytecode","compiler","lox","lox-language","virtual-machine"],"created_at":"2024-08-02T05:01:39.415Z","updated_at":"2025-04-25T03:30:50.264Z","avatar_url":"https://github.com/ZaneDubya.png","language":"C#","readme":"# LoxScript\r\n\r\nLoxScript is a bytecode compiler and virtual machine (\"Gears\") for Bob Nystrom's [Lox language](http://craftinginterpreters.com/the-lox-language.html), both written in C#.\r\n\r\nThe LoxScript bytecode virtual machine is called [Gears](https://github.com/ZaneDubya/LoxScript/tree/master/XptScriptLib/Core/Scripting/LoxScript/VirtualMachine). Gears executes bytecode created by the LoxScript compiler. The output of Gears matches the reference \"clox\" virtual machine described in Chapters 14-30 of Bob's book [Crafting Interpreters](http://craftinginterpreters.com). However, the internal implementation of the virtual machine is different, and the bytecode generated by the Gears compiler will not run on clox.\r\n\r\nImprovements over Lox/clox:\r\n\r\n- Compiler can write bytecode to a binary file and load/run this at runtime.\r\n- Native interfaces allow Lox files to interact with native C# functions and objects.\r\n- Support for switch statement! This only took hours, and the code is horrifying.\r\n\r\nPerformance:\r\n\r\n- Gears runs the reference 'fibonnaci' benchmark roughly 69x slower than native c# code.\r\n","funding_links":[],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZaneDubya%2FLoxScript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZaneDubya%2FLoxScript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZaneDubya%2FLoxScript/lists"}