{"id":17696122,"url":"https://github.com/ovyerus/kamex","last_synced_at":"2025-05-13T05:02:28.962Z","repository":{"id":89119990,"uuid":"443556290","full_name":"Ovyerus/kamex","owner":"Ovyerus","description":"A basic Lisp interpreter implemented in Elixir.","archived":false,"fork":false,"pushed_at":"2022-01-23T09:52:47.000Z","size":153,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T23:32:28.284Z","etag":null,"topics":["apl","array-programming","elixir","functional","interpreter","lisp","lisp-dialect","programming-language","repl"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/Ovyerus.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":"2022-01-01T14:34:21.000Z","updated_at":"2024-07-20T18:01:36.000Z","dependencies_parsed_at":"2023-06-26T01:44:26.820Z","dependency_job_id":null,"html_url":"https://github.com/Ovyerus/kamex","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/Ovyerus%2Fkamex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fkamex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fkamex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ovyerus%2Fkamex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ovyerus","download_url":"https://codeload.github.com/Ovyerus/kamex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877508,"owners_count":21977643,"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":["apl","array-programming","elixir","functional","interpreter","lisp","lisp-dialect","programming-language","repl"],"created_at":"2024-10-24T14:43:20.285Z","updated_at":"2025-05-13T05:02:28.904Z","avatar_url":"https://github.com/Ovyerus.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kamex\n\n\u003e A basic Lisp interpreter implemented in Elixir.\n\nCurrently implements a very simple Lisp with a tiny amount of builtin functions,\nbut eventually plans to expand to be a Elixir implementation of the brilliant\n[KamilaLisp](https://github.com/kspalaiologos/kamilalisp)\n\n## Known Issues\n\n- Probably a whole ton of stuff, it's very early days for this. Please open an\n  issue if you notice weird behaviour.\n\n## Builtins\n\n**Note:** this list is out of date. I am currently working on bringing Kamex up\nto feature-parity with KamilaLisp, so I will update this once I've caught up and\ncan properly list stuff categorically.\n\n- +, -, \\*, /, ++, --, !\n- list, cons, append, head, tail\n- print, zerop\n- quote, lambda, def (global vars), defun (global func), let (locals in a\n  block), if, or, and, not\n\n## Examples\n\n```elixir\niex\u003e run(~S[\n...\u003e   (defun add (x y) (+ x y))\n...\u003e   (add 6 9)\n...\u003e ])\n{15, %{add: #Function\u003c2.88664320/2 in Kamex.Interpreter.SpecialForms.lambda/3\u003e}}\n```\n\n```elixir\niex\u003e run(~S[\n...\u003e   (let ((x (+ 2 5)) (y (- 45 12))) (* x y))\n...\u003e ])\n{231, %{}}\n```\n\n```elixir\niex\u003e run(~S[  (at $(-) $(= 0 (% _ 2)) (iota 100))  ])\n{[0, 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19,\n  -20, 21, -22, 23, -24, 25, -26, 27, -28, 29, -30, 31, -32, 33, -34, 35, -36,\n  37, -38, 39, -40, 41, -42, 43, -44, 45, -46, 47, -48, ...], %{}}\n```\n\n```elixir\niex\u003e run(~S[\n...\u003e   (defun factorial (n)\n...\u003e     (if (= 0 n) 1\n...\u003e       ($(* n)@factorial@$(- _ 1) n)))\n...\u003e\n...\u003e   (factorial 10)\n...\u003e ])\n{3628800,\n %{\n   factorial: #Function\u003c2.104658454/2 in Kamex.Interpreter.SpecialForms.lambda/3\u003e\n }}\n```\n\n## Using\n\n- Install [Elixir](https://elixir-lang.org/)\n- `iex -S mix` to launch into the Elixir REPL (Native Kamex REPL soon™️)\n- `import Kamex.Interpreter` to import the interpreter function\n- `run(~S[(code here)])` for running code.\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovyerus%2Fkamex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovyerus%2Fkamex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovyerus%2Fkamex/lists"}