{"id":18745427,"url":"https://github.com/yassinebenaid/nishimia","last_synced_at":"2025-11-23T10:30:16.659Z","repository":{"id":193759779,"uuid":"689317718","full_name":"yassinebenaid/nishimia","owner":"yassinebenaid","description":"An interpreted dynamically typed programming language","archived":false,"fork":false,"pushed_at":"2024-02-13T17:01:30.000Z","size":142,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-28T20:24:00.642Z","etag":null,"topics":["go","interpreter","lexer","parser","programming-language","repl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yassinebenaid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-09-09T12:32:34.000Z","updated_at":"2024-03-06T21:03:28.000Z","dependencies_parsed_at":"2023-09-09T21:22:21.361Z","dependency_job_id":"8d33cdf5-8a7c-4a83-a9f9-e31ea3e77a46","html_url":"https://github.com/yassinebenaid/nishimia","commit_stats":null,"previous_names":["yassinebenaid/nishimia"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinebenaid%2Fnishimia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinebenaid%2Fnishimia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinebenaid%2Fnishimia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinebenaid%2Fnishimia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yassinebenaid","download_url":"https://codeload.github.com/yassinebenaid/nishimia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239627235,"owners_count":19670844,"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":["go","interpreter","lexer","parser","programming-language","repl"],"created_at":"2024-11-07T16:18:04.222Z","updated_at":"2025-11-23T10:30:16.595Z","avatar_url":"https://github.com/yassinebenaid.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nishimia\n\nA fully functional interpreter for a custom language called `nishimia`, weird name I know. However, its real and does interpret the language below with support for:\n- variables and bindings\n- data types :\n  - integers\n  - booleans\n  - arrays\n  - hash tables\n  - null\n- functions\n- built in functions\n- if-conditions\n- Closures\n- functions are first-class citizens, this means you can pass them as arguments or return them as values,\n- error handling out of the box\n\nhere is a sinppet of the syntax with all the available features :\n\n```go\nvar five = 5;\nvar ten = 10;\n\nvar add = func(x, y) {\n\treturn x + y;\n};\n\nvar added = add(five,ten);\n\nvar multiply = func(x, y) {\n\treturn x * y;\n};\n\nvar value = 10 * 15 + 8 / 7 - 3 * ( 7 + 8); // evaluated as (10 * 15) + (8 / 7) - (3 * (7 + 8))\n\nvar multiplied = multiply(five, add(ten,10));\n\nvar devide = func(x, y) {\n\tif y \u003e 0 {\n\t\treturn x / y;\n\t} else {\n\t\treturn 0;\n\t}\n};\n\nvar isPositive = func(x) {\n\tif x \u003e= 0 {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nvar positive = isPositive(-10);\n\nvar isZero = func(x) {\n\treturn x == 0;\n};\n\nvar isNotZero = func(x) {\n\treturn x != 0;\n};\n\nvar isNegativeOrZero = func(x) {\n\treturn x \u003c= 0;\n};\n\nvar max = func(x, y) {\n\tif x \u003e y {\n\t\treturn x ;\n\t}\n\n\tif x \u003c y {\n\t\treturn y ;\n\t}\n\n\treturn x;\n};\n\n\nvar name = \"yassine benaid\";\nlen(name); // len is built in here , and this comment is not supported by the way\n\nvar getAdditionClosure = func(x) {\n\treturn func(i) { return x + i;};\n};\n\n\nvar additionClosure = getAdditionClosure(2);\nadditionClosure(5);\n\nvar AcceptClosure = func(closure,value){\n\treturn closure(value);\n};\n\nAcceptClosure(func(v){\n\treturn v * 15;\n},10)\n\nvar myArr = [1,2,3,\"yassinebenaid\"]\nmyArr[0];\nmyArr[2+2-1];\n\n\nvar myHash = {\n\t\"name\": \"yassinebenaid\",\n\t\"age\": 21,\n\t\"role\": func() {\n\t\treturn \"web developer\";\n\t}\n};\n\nmyHash[\"name\"];\nmyHash[\"age\"];\nmyHash[\"role\"]();\n```\n\n\n## Installation \u0026\u0026 Testing\n\nTo get started , clone this repository , then in the project directory run : `go build -o nishimia` , this will build an executable file named `nishimia`, \n\nThe interpreter comes with a `repl` out of the box ,  run `./nishimia` with no arguments to get started\n\n![image](https://github.com/yassinebenaid/nishimia/assets/101285507/c4902ca9-e6e0-4a4d-b3b3-5886bdd2a018)\n\nTo run a source code from a file pass the path as first argument , run `./nishimia path/to/file.ns`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassinebenaid%2Fnishimia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyassinebenaid%2Fnishimia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassinebenaid%2Fnishimia/lists"}