{"id":16095806,"url":"https://github.com/zeusdeux/moks","last_synced_at":"2025-04-05T20:15:27.942Z","repository":{"id":30803860,"uuid":"34360963","full_name":"zeusdeux/moks","owner":"zeusdeux","description":"An interpreted language written @recursecenter","archived":false,"fork":false,"pushed_at":"2015-08-29T23:31:21.000Z","size":363,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T14:56:41.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zeusdeux.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-04-22T01:14:17.000Z","updated_at":"2015-07-28T02:26:28.000Z","dependencies_parsed_at":"2022-08-29T06:01:21.995Z","dependency_job_id":null,"html_url":"https://github.com/zeusdeux/moks","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/zeusdeux%2Fmoks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fmoks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fmoks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeusdeux%2Fmoks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeusdeux","download_url":"https://codeload.github.com/zeusdeux/moks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393573,"owners_count":20931813,"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-10-09T17:08:58.179Z","updated_at":"2025-04-05T20:15:27.922Z","avatar_url":"https://github.com/zeusdeux.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moks\nAn interpreted language that I am writing [@recursecenter](https://github.com/recursecenter).\n\nSample program in `moks`:\n\n```moks\nlet fib n = {\n  (n \u003c 2)? {\n    1\n  } : {\n    fib (n-1) + fib (n-2)\n  }\n}\n\nprint (fib 10) // should be 89\nprint (fib 20) // should be 10946\n\nprint (map (\\x { x + 1; }) [1 2 3 4]) // should be [2 3 4 5]\n\n```\nEither semicolons *OR* newlines terminate lines. Do not use both or my parser will throw a cryptic error.\n\n## Play with it\n\n\u003e Note: `moks` needs iojs currently since it uses features from v8 that node doesn't have yet\n\n```javascript\nnpm i -g moks\n```\nThis should install the `moks` interpreter globally.\n\nYou can then run `moks \u003cpath to .mok file\u003e` or `moks -e \"\u003cexpressions in valid moks syntax\u003e\"`.\n\nFor e.g.,:\n\n```moks\nmoks ./fib.mok\nmoks -e \"let add x y = {  x + y; }; print (add 2 3);\"\n```\n\n## Future plans\n\nThings/features I plan to experiment with in the future:\n\n- ~~FFI to Javascript~~\n- ~~support arrays \u0026 maps~~\n- ~~module system~~\n- ~~lamda support~~\n- ~~add `nil`~~\n- repl\n- error handling\n- marking side effects syntactically\n- runtime optimizations\n- stack based runtime (currently uses the underlying js runtime stack)\n- macros\n- simple type system\n- pausable and rewindable code editing\n\nAlso, if you use emacs, [here's](https://github.com/zeusdeux/moks-mode) a simple emacs major mode for [moks](https://github.com/zeusdeux/moks).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeusdeux%2Fmoks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeusdeux%2Fmoks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeusdeux%2Fmoks/lists"}