{"id":20576536,"url":"https://github.com/divs1210/impala","last_synced_at":"2025-04-14T18:22:43.599Z","repository":{"id":68118857,"uuid":"44004542","full_name":"divs1210/Impala","owner":"divs1210","description":"Simple, extensible bytecode interpreter","archived":false,"fork":false,"pushed_at":"2015-10-19T17:14:16.000Z","size":164,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T06:51:10.701Z","etag":null,"topics":["bytecode-interpreter","clojure","vm"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divs1210.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}},"created_at":"2015-10-10T09:38:03.000Z","updated_at":"2019-08-17T19:01:56.000Z","dependencies_parsed_at":"2023-03-11T02:49:31.211Z","dependency_job_id":null,"html_url":"https://github.com/divs1210/Impala","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/divs1210%2FImpala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2FImpala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2FImpala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2FImpala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divs1210","download_url":"https://codeload.github.com/divs1210/Impala/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933704,"owners_count":21185531,"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-interpreter","clojure","vm"],"created_at":"2024-11-16T05:46:05.429Z","updated_at":"2025-04-14T18:22:43.567Z","avatar_url":"https://github.com/divs1210.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Impala\n## Simple, extensible bytecode interpreter\n\nImpala is a simple bytecode interpreter written in Clojure.\nWritten to learn from and to teach making use of.\n\n\n## Usage\n\nLoad everything into namespace.\n\n```clojure\n(use '[impala core lib])\n```\n\nWrite a simple program in impala bytecode and execute it,\nprinting the whole lifecycle to `stdout`.\n\n```clojure\n(let [prog [[SET :a  5]\n            [SET :b  3]\n            [ADD :a :b]]]\n  (run prog true))\n```\n\nWe can even extend the instruction set by defining our own opcodes\n\n* in Clojure\n```clojure\n(defn ADD\n  \"b := b + a\"\n  [env a b]\n  (swap! env update-in [:vars b] + (-\u003e @env :vars a)))\n```\n\nor\n\n* __in Impala byte code__!\n```clojure\n;; from impala.lib\n(defop ADD\n  \"b := b + a\"\n  [a b] [Z]\n  (SUB a Z)\n  (SUB Z b))\n```\n\nAt the heart of this capability is the [SUBLEQ](https://en.wikipedia.org/wiki/One_instruction_set_computer#Subtract_and_branch_if_less_than_or_equal_to_zero) primitive, which is Turing Equivalent.\n\nIn this example, `Z` is a temporary register created (and set to 0) every time `ADD` is called, and deleted once it's done executing.\nAn opcode may use multiple temporary registers.\n\n### Standalone Interpreter\n\nAt the terminal, run\n\n```bash\nlein uberjar\n\n./impala test/impala/test.imp\n```\n\n\n## License\n\nImpala is licensed under [wtfpl](http://www.wtfpl.net/) and is effectively in the public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivs1210%2Fimpala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivs1210%2Fimpala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivs1210%2Fimpala/lists"}