{"id":23764474,"url":"https://github.com/chaqchase/artemis","last_synced_at":"2025-09-05T08:33:31.048Z","repository":{"id":197030025,"uuid":"697826281","full_name":"chaqchase/artemis","owner":"chaqchase","description":"Artemis: the fun-sized ts-powered programming language","archived":false,"fork":false,"pushed_at":"2024-07-25T01:14:01.000Z","size":790,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T00:24:37.764Z","etag":null,"topics":["artemis","extensible","laguage","programming-language","script","scripting-language","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@artemis-lang/cli","language":"TypeScript","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/chaqchase.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":"2023-09-28T14:54:24.000Z","updated_at":"2024-12-13T20:55:50.000Z","dependencies_parsed_at":"2024-02-03T11:28:51.102Z","dependency_job_id":"f62d2392-9bf8-4550-b95a-331a4ab6b2c7","html_url":"https://github.com/chaqchase/artemis","commit_stats":null,"previous_names":["triyanox/artemis","chaqchase/artemis"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaqchase%2Fartemis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaqchase%2Fartemis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaqchase%2Fartemis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaqchase%2Fartemis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaqchase","download_url":"https://codeload.github.com/chaqchase/artemis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232032235,"owners_count":18462987,"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":["artemis","extensible","laguage","programming-language","script","scripting-language","typescript"],"created_at":"2024-12-31T22:18:17.553Z","updated_at":"2024-12-31T22:18:18.660Z","avatar_url":"https://github.com/chaqchase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Artemis`: the fun-sized ts-powered script machine\n\n## what's in the box?\n- easy to learn (we promise)\n- general purpose (like a swiss army knife)\n- built on typescript (because why not?)\n\n## how to get it\n```bash\nnpm install -g @artemis-lang/cli\n```\n\n## how to play\n\n```bash\n _____     _             _\n|  _  |___| |_ ___ _____|_|___\n|     |  _|  _| -_|     | |_ -|\n|__|__|_| |_| |___|_|_|_|_|___|\n\nhttps://github.com/triyanox/artemis\n\n\u003e  artemis \u003ccommand\u003e [options]\n\ntoys in the box:\n  artemis run \u003cfile\u003e             make it go\n  artemis ast \u003cfile\u003e             peek inside\n  artemis lex \u003cfile\u003e             see the building blocks\n  artemis save-ast \u003cfile\u003e \u003cout\u003e  keep the insides for later\n  artemis save-lex \u003cfile\u003e \u003cout\u003e  save the blocks for later\n\nextras:\n  --version  what version are we on?\n  --help     help me, i'm lost\n```\n\n## the fun stuff\n\n### talking to yourself\n```rs\n/* psst... secret message */\n/* this one's\n   really long */\n```\n\n### making things\n```rs\n(def b \"ohai\")           /* words */\n(def c 1)                /* counting */\n(def d true)             /* yes/no */\n(def f [1, 2, 3])        /* lists */\n(def g {a: 1, b: 2})     /* treasure maps */\n(def h #[1, 2, 3])       /* unique lists */\n(def bin 0b1010)         /* robot talk */\n(def hex 0x12F)          /* wizard numbers */\n```\n\n### doing things\n```rs\n(fn add [a b] ((+ a b)))\n(fn wrapper [] ((add 1 2)))\n(def a (wrapper))\n(println a)\n\n(fn addTwo [a]((def sum (+ a 2))(return sum)))\n(println (addTwo 1))\n```\n\n### making decisions\n```rs\n(if true ((println \"yay!\"))) \n(if true ((println \"yay!\")) (println \"aww...\"))\n```\n\n### going in circles\n```rs\n(def a 0)\n(while ((\u003c a 10)) ((println a)(def a (+ a 1))))\n\n(for [i 10 20] ((println i)))\n(for [i 20 30 2] ((println i)))\n```\n\n### playing matchmaker\n```rs\n(def a [])\n(match a {\n  1 : (println \"one!\"),\n  2 : (for [i 0 10] ((println i))),\n  3 : (for [i 0 10] (( def mul ( * (+ i 4 ) 3 ) ) (println mul) )),\n  _ : (for [i 0 2] (\n        (for [j 0 3] (\n          (push a 69)\n          (println \"inner\" j)\n          (pop a)\n        ))\n        (push a 69)\n        (println \"outer\" i)\n        (pop a)\n      ))\n})\n```\n\n### math and logic toys\n```rs\n(\u0026\u0026 true false)\n(|| true false)\n(! true)\n(== 1 2)\n(!= 1 2)\n\n(+ 1 2)\n(- 1 2)\n(* 1 2)\n(/ 1 2)\n(% 1 2)\n(^ 1 2)\n\n(~ 1)\n(\u003c\u003c 1 2)\n(\u003e\u003e 1 2)\n(\u003e\u003e\u003e 1 2)\n```\n\n### built-in goodies\n```rs\n(def a [1, 2, 3])\n(print \"hi!\")\n(println \"bye!\")\n(push a 1)\n(pop a)\n(def l (length a))\n(log l)\n(fn add [l] ((+ l 1)))\n(def m (map a add))\n(log a)\n(def hi \"hi\")\n(def hi (toUpperCase hi))\n(log hi)\n(println (repeat hi 2))\n\n(def fileContent (readFile \"README.md\"))\n(println fileContent)\n(writeFile \"bambo.md\" \"ohai!\")\n```\n\n### playing with js\n```rs\n(js $\n  const a = 12;\n  const b = 23;\n  const c = a + b;\n  console.log(c);\n  const d = \"ohai\";\n  console.log(d);\n$)\n\n(def a (js $ 12 $))\n(println a)\n```\n\n### grabbing things\n```rs\n(def random (get Math \"random\"))\n(def random (get global \"Math.random\"))\n\n(fn rand [n] ((* n (random))))\n(def a (rand 100))\n(println a)\n\n(def now (get global \"Date.now\"))\n(println (now))\n\n(def env (get global \"process.env\"))\n(println (get env \"HOME\"))\n\n(def a {a: 1})\n(set a \"b\" 2)\n(println (get a \"b\"))\n```\n\n## show me more!\ncheck out the [playgrounds](https://github.com/triyanox/artemis/blob/main/examples/)\n\n## the boring stuff\n[MIT](https://github.com/triyanox/artemis/blob/main/LICENSE) (but you can still have fun with it)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaqchase%2Fartemis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaqchase%2Fartemis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaqchase%2Fartemis/lists"}