{"id":27636238,"url":"https://github.com/omdxp/ez","last_synced_at":"2025-04-23T20:33:48.451Z","repository":{"id":51912119,"uuid":"520608343","full_name":"omdxp/ez","owner":"omdxp","description":"ez programming language","archived":false,"fork":false,"pushed_at":"2023-10-02T02:55:01.000Z","size":58,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-31T15:30:03.389Z","etag":null,"topics":["hacktoberfest","interpreter","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Go","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/omdxp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T18:28:24.000Z","updated_at":"2024-01-04T03:06:59.000Z","dependencies_parsed_at":"2022-08-13T01:11:00.109Z","dependency_job_id":null,"html_url":"https://github.com/omdxp/ez","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/omdxp%2Fez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omdxp%2Fez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omdxp","download_url":"https://codeload.github.com/omdxp/ez/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250510392,"owners_count":21442602,"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":["hacktoberfest","interpreter","programming-language"],"created_at":"2025-04-23T20:33:47.883Z","updated_at":"2025-04-23T20:33:48.445Z","avatar_url":"https://github.com/omdxp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/48713070/183254053-616803e8-37e3-42d6-94c7-a7e8813851fa.png\" alt=\"ez\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eez\u003c/h1\u003e\n\u003cp align=\"center\"\u003einterpreted programming language\u003c/p\u003e\n\n\u003e pronounced as it's spelled because it's easy 😅\n\na functional programming language, with first class functions and closures support.\n\n## features\n\n- support the usual data types like strings, booleans, integers, hashes, arrays, and nil\n\n- support the usual operators like `+`, `-`, `*`, `/`, `==`, `!=`, `\u003c`, `\u003e`, and `!`\n\n  - `!` is the logical negation operator\n  - `==` is the equality operator\n  - `!=` is the inequality operator\n  - `\u003c` is the less than operator\n  - `\u003e` is the greater than operator\n  - `+` is the addition operator\n  - `-` is the subtraction operator (unary minus)\n  - `*` is the multiplication operator\n  - `/` is the division operator\n\n- support the usual flow control operators like `if`, `else`, `let` and `ret`\n\n  - `if` is the conditional operator\n  - `else` is the else operator\n  - `let` is the let operator\n  - `ret` is the return operator (can be omitted)\n\n- semi-colons are optional\n- for syntax highlighting, use the `ez-language-support` [extension](https://marketplace.visualstudio.com/items?itemName=OmarBelghaouti.ez-language-support)\n\n## syntax\n\n- print a value: `print(value)`\n- print a value and a newline: `println(value)\n- print a newline: `println()`\n- `let` is used to declare a variable: `let variable = value`\n- `if` is used to declare a conditional: `if (condition) { // do something }`\n- `else` is used to declare an else block: `else { // do something }`\n- `ret` is used to return a value: `ret value`\n- `f` is used to declare a function: `f(name) { // do something }`\n- arrays are declared with `[]`: `[1, 2, 3]`\n- hashes are declared with `{}`: `{ \"key\": \"value\" }`\n- `nil` is used when a value is not present: `nil`\n\nsample code:\n\n```\nprintln(\"hello world\")\n\nlet x = 1;\nlet y = 2\nlet z = x + y;\nprint(z);\n\nlet a = \"hello\";\nlet b = \"world\";\nlet c = a + b;\nprint(c);\n\nif (x == y) {\n    print(\"x is equal to y\");\n} else {\n    print(\"x is not equal to y\");\n}\n\nlet d = if (x == y) {\n    \"x is equal to y\"\n} else {\n    \"x is not equal to y\"\n};\nprint(d);\n\nlet add = f(x, y) {\n    ret x + y;\n};\nprint(add(x, y));\n\nlet mul = f(x, y) {\n    x * y;\n};\nprint(mul(x, y));\n\nlet subResult = f(x, y) {\n    x - y;\n}(x, y);\nprint(subResult);\n\nlet mulByFn = f(x, otherFn) {\n  ret x * otherFn(x)\n};\nlet res = mulByFn(2, f(x) {\n  x + 2;\n});\nprint(res);\n\nlet arr = [1, 2, 3, add(x, y), true];\nprint(arr[0]);\n\nlet hash = {\n    \"key\": \"value\",\n    \"key2\": \"value2\"\n};\nprint(hash[\"key\"]);\n```\n\n- there are some useful bultin functions for arrays:\n\n```\nlet a = [1, 2, 3, 4, 5];\n\nlet b = push(a, 6); // [1, 2, 3, 4, 5, 6]\n\nlet c = tail(a); // [2, 3, 4, 5]\n\nlet d = first(a); // 1\n\nlet e = last(a); // 5\n\nprint(len(a)); // 5\n\n```\n\n- `len` is used to get the length of an array or a string: `len(a)`\n\n## run the interpreter\n\n```sh\ngo run main.go\n```\n\nand start typing in the console 💛\n\n- you can run it on a file: `go run main.go -file test.ez`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomdxp%2Fez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomdxp%2Fez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomdxp%2Fez/lists"}