{"id":26611062,"url":"https://github.com/sahilverse/nepdai","last_synced_at":"2026-05-01T10:32:35.307Z","repository":{"id":284013237,"uuid":"953554040","full_name":"sahilverse/NepDai","owner":"sahilverse","description":"NepDai is a fun Nepali programming language inspired by bhailang. This project is currently under development.","archived":false,"fork":false,"pushed_at":"2025-03-23T16:38:05.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T17:31:21.060Z","etag":null,"topics":["abstract-syntax-tree","interpreter","javascript","lexer-parser","nepdai","programming-language","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sahilverse.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,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T16:25:10.000Z","updated_at":"2025-03-23T16:41:13.000Z","dependencies_parsed_at":"2025-03-23T17:42:25.497Z","dependency_job_id":null,"html_url":"https://github.com/sahilverse/NepDai","commit_stats":null,"previous_names":["sahilverse/nepdai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FNepDai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FNepDai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FNepDai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FNepDai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahilverse","download_url":"https://codeload.github.com/sahilverse/NepDai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245197074,"owners_count":20576124,"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":["abstract-syntax-tree","interpreter","javascript","lexer-parser","nepdai","programming-language","typescript"],"created_at":"2025-03-24T02:25:22.273Z","updated_at":"2026-05-01T10:32:35.283Z","avatar_url":"https://github.com/sahilverse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🇳🇵 NepDai Programming Language\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \n  # नेपदाइ\n  ### A Programming Language with Nepali Keywords\n  \n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n  [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n  [![Node.js](https://img.shields.io/badge/Node.js-43853D?logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n  [![pnpm](https://img.shields.io/badge/pnpm-F69220?logo=pnpm\u0026logoColor=white)](https://pnpm.io/)\n\u003c/div\u003e\n\n---\n\n## About NepDai\n\nNepDai is a fun Nepali programming language inspired by Bhailang and adds a unique Nepali twist to the playful coding experience. The language combines familiar programming concepts with Nepali terminology, creating a unique and culturally relevant coding experience.\n\n**\"Namaste Dai\"** - Every NepDai program begins with this traditional Nepali greeting!\n\n\u003ch2 align=\"center\"\u003eInstallation\u003c/h2\u003e\n\n```\nnpm i -g nepdai\n```\n\n## 📖 Language Keywords\n\n| NepDai | English | Description |\n|--------|---------|-------------|\n| `solti` | `let/var` | Variable declaration |\n| `yadi (condition) bhane` | `if` | Conditional statement |\n| `natra` | `else` | Else clause |\n| `jaba samma` | `while` | While loop |\n| `vai vayo rokki` | `break` | Break statement |\n| `aghi badh vai` | `continue` | Continue statement |\n| `lekh` | `print` | Print to console |\n| `thik` | `true` | Boolean true |\n| `galat` | `false` | Boolean false |\n| `khali` | `null` | Null value |\n\n\n\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n\u003ch4 align=\"left\"\u003eCreate a new file (\u003ccode\u003etest.nepdai\u003c/code\u003e)\u003c/h4\u003e\n\n\n\u003ch4 align=\"left\"\u003eEdit the file with a text editor.\u003c/h4\u003e\n\n```\nNamaste Dai\n  lekh \"Namaste Dai\";\n```\n\n\u003ch4 align=\"left\"\u003eRun\u003c/h4\u003e\n\n```\nnepdai test.nepdai\n```\n\n\u003ch4 align=\"left\"\u003eOutput\u003c/h4\u003e\n\n```\n Namaste Dai\n```\n\n\u003ch4 align=\"left\"\u003eOther Commands\u003c/h4\u003e\n\n```\n tokens \u003cfile\u003e         Show tokens for a Nepdai program\n ast \u003cfile\u003e            Show AST for a Nepdai program\n repl                  Start Nepdai REPL\n```\n\n\u003ch2 align=\"center\"\u003eDocumentation\u003c/h2\u003e\n\n\u003ch3 align=\"center\"\u003eGeneral\u003c/h3\u003e\n\u003cp align=\"center\"\u003eEvery NepDai program must start with \u003ccode\u003eNamaste Dai\u003c/code\u003e as the first line. This traditional greeting serves as the program's entry point and is mandatory for all \u003ccode\u003e.nepdai\u003c/code\u003e files. Any code written before this greeting will result in a compilation error, emphasizing the cultural significance of proper greetings in Nepali tradition.\u003c/p\u003e\n\n```\n// Error: If anything is present here, greeting above all\nNamaste Dai\n  // code here, and no semicolon after greeting\n```\n\n\u003cp align=\"center\"\u003eNepdai uses \u003ccode\u003elekh\u003c/code\u003e keyword to print in console.\u003c/p\u003e\n\n```\nNamaste Dai\n\n  lekh \"Hello, World!\";\n\n  solti name = \"Nepal\";\n  lekh \"Country:\", name;\n\n  solti a = 5;\n  solti b = 10;\n  lekh \"Sum:\", a + b;\n```\n\n\n\u003ch3 align=\"center\"\u003eVariables\u003c/h3\u003e\n\u003cp align=\"center\"\u003eVariables can be declared using \u003ccode\u003esolti\u003c/code\u003e keyword.\u003c/p\u003e\n\n```\nNamaste Dai\n  solti a = 1;\n  solti b = \"sahil\";\n  a = a++;\n  b = \"sahilverse\";\n  c = a + 10;\n```\n\n\u003ch3 align=\"center\"\u003eTypes\u003c/h3\u003e\n\u003cp align=\"center\"\u003eNepdai supports various data types just like other programming languages. The special value \u003ccode\u003ekhali\u003c/code\u003e represents null, while boolean logic uses \u003ccode\u003ethik\u003c/code\u003e for true conditions and \u003ccode\u003egalat\u003c/code\u003e for false conditions.\u003c/p\u003e\n\n```\nNamaste Dai\n  solti string = \"string\";\n  solti number = 10;\n  solti float = 10.2; // Also a number\n  solti true = thik; \n  solti false = galat;\n  solti null = khali; \n```\n\n\u003ch3 align=\"center\"\u003eArrays\u003c/h3\u003e\n\u003cp align=\"center\"\u003eNepdai have support for \u003cstrong\u003eArray\u003c/strong\u003e as well.  To create an array, simply assign a list of values inside square brackets ([]) to a variable declared with solti. \u003cstrong\u003eArray operations are very limited right now.\u003c/strong\u003e.\u003c/p\u003e\n\n```\nNamaste Dai\n\n  // Array examples in Nepdai\n  solti numbers = [1, 2, 3, 4, 5];\n  solti names = [\"Ram\", \"Shyam\", \"Gita\"];\n  solti mixed = [1, \"hello\", thik, khali];\n\n  lekh \"Numbers:\", numbers;\n  lekh \"Names:\", names;\n  lekh \"Mixed array:\", mixed;\n\n  // Empty array\n  solti empty = [];\n  lekh \"Empty array:\", empty;\n\n  // Other Operations on Arrays are not supported right now\n \n```\n\n\u003ch3 align=\"center\"\u003eOperators\u003c/h3\u003e\n\n\u003ch4 align=\"center\"\u003eArithmetic Operators\u003c/h4\u003e\n\u003cp align=\"center\"\u003eNepDai supports standard mathematical operations for numeric calculations.\u003c/p\u003e\n\n| Operator | Description | Example | Result |\n|----------|-------------|---------|--------|\n| `+` | Addition | `5 + 3` | `8` |\n| `-` | Subtraction | `5 - 3` | `2` |\n| `*` | Multiplication | `5 * 3` | `15` |\n| `/` | Division | `6 / 3` | `2` |\n| `%` | Modulo (Remainder) | `7 % 3` | `1` |\n| `**` | Exponentiation | `2 ** 3` | `8` |\n\n```\nNamaste Dai\n  solti a = 10;\n  solti b = 3;\n  \n  lekh \"Addition:\", a + b;        // 13\n  lekh \"Subtraction:\", a - b;     // 7\n  lekh \"Multiplication:\", a * b;  // 30\n  lekh \"Division:\", a / b;        // 3.333...\n  lekh \"Modulo:\", a % b;          // 1\n  lekh \"Power:\", a ** b;          // 1000\n```\n\n\u003ch4 align=\"center\"\u003eComparison Operators\u003c/h4\u003e\n\u003cp align=\"center\"\u003eThese operators compare values and return boolean results (\u003ccode\u003ethik\u003c/code\u003e or \u003ccode\u003egalat\u003c/code\u003e).\u003c/p\u003e\n\n| Operator | Description | Example | Result |\n|----------|-------------|---------|--------|\n| `==` | Equal to | `5 == 5` | `thik` |\n| `!=` | Not equal to | `5 != 3` | `thik` |\n| `\u003e` | Greater than | `5 \u003e 3` | `thik` |\n| `\u003c` | Less than | `3 \u003c 5` | `thik` |\n| `\u003e=` | Greater than or equal | `5 \u003e= 5` | `thik` |\n| `\u003c=` | Less than or equal | `3 \u003c= 5` | `thik` |\n\n```\nNamaste Dai\n  solti age = 25;\n  \n  lekh \"Is adult:\", age \u003e= 18;     // thik\n  lekh \"Is teenager:\", age \u003c 20;   // galat\n  lekh \"Exact age:\", age == 25;    // thik\n```\n\n\u003ch4 align=\"center\"\u003eLogical Operators\u003c/h4\u003e\n\u003cp align=\"center\"\u003eLogical operators work with boolean values and conditions.\u003c/p\u003e\n\n| Operator | Description | Example | Result |\n|----------|-------------|---------|--------|\n| `\u0026\u0026` | Logical AND | `thik \u0026\u0026 galat` | `galat` |\n| `\\|\\|` | Logical OR | `thik \\|\\| galat` | `thik` |\n| `!` | Logical NOT | `!thik` | `galat` |\n\n```\nNamaste Dai\n  solti age = 25;\n  solti hasLicense = thik;\n  \n  yadi (age \u003e= 18 \u0026\u0026 hasLicense) bhane {\n      lekh \"Can drive!\";\n  }\n  \n  yadi (age \u003c 16 || !hasLicense) bhane {\n      lekh \"Cannot drive!\";\n  }\n```\n\n\u003ch4 align=\"center\"\u003eAssignment Operators\u003c/h4\u003e\n\u003cp align=\"center\"\u003eAssignment operators are used to assign and modify variable values.\u003c/p\u003e\n\n| Operator | Description | Example | Equivalent |\n|----------|-------------|---------|------------|\n| `=` | Simple assignment | `a = 5` | `a = 5` |\n| `+=` | Add and assign | `a += 3` | `a = a + 3` |\n| `-=` | Subtract and assign | `a -= 2` | `a = a - 2` |\n| `*=` | Multiply and assign | `a *= 2` | `a = a * 2` |\n| `/=` | Divide and assign | `a /= 2` | `a = a / 2` |\n\n```\nNamaste Dai\n  solti score = 100;\n  \n  score += 50;    // score is now 150\n  score -= 25;    // score is now 125\n  score *= 2;     // score is now 250\n  score /= 5;     // score is now 50\n  \n  lekh \"Final score:\", score;\n```\n\n\u003ch4 align=\"center\"\u003eIncrement/Decrement Operators\u003c/h4\u003e\n\u003cp align=\"center\"\u003eThese operators increase or decrease a variable's value by 1.\u003c/p\u003e\n\n| Operator | Description | Example | Effect |\n|----------|-------------|---------|--------|\n| `++` | Increment (postfix) | `a++` | Increase `a` by 1 |\n| `--` | Decrement (postfix) | `a--` | Decrease `a` by 1 |\n\n```\nNamaste Dai\n  solti counter = 0;\n  \n  lekh \"Initial:\", counter;  // 0\n  counter++;\n  lekh \"After increment:\", counter;  // 1\n  counter--;\n  lekh \"After decrement:\", counter;  // 0\n```\n\n\u003ch4 align=\"center\"\u003eString Concatenation\u003c/h4\u003e\n\u003cp align=\"center\"\u003eThe \u003ccode\u003e+\u003c/code\u003e operator can also be used to join strings together.\u003c/p\u003e\n\n```\nNamaste Dai\n  solti firstName = \"Ram\";\n  solti lastName = \"Sharma\";\n  solti fullName = firstName + \" \" + lastName;\n  \n  lekh \"Full name:\", fullName;  // Ram Sharma\n  \n  // Mixing strings and numbers\n  solti age = 25;\n  solti message = \"I am \" + age + \" years old\";\n  lekh message;  // I am 25 years old\n```\n\n\u003ch4 align=\"center\"\u003eOperator Precedence\u003c/h4\u003e\n\u003cp align=\"center\"\u003eOperators are evaluated in the following order (highest to lowest precedence):\u003c/p\u003e\n\n1. `!` (Logical NOT), `-` (Unary minus)\n2. `**` (Exponentiation)\n3. `*`, `/`, `%` (Multiplication, Division, Modulo)\n4. `+`, `-` (Addition, Subtraction)\n5. `\u003c`, `\u003c=`, `\u003e`, `\u003e=` (Comparison)\n6. `==`, `!=` (Equality)\n7. `\u0026\u0026` (Logical AND)\n8. `||` (Logical OR)\n9. `=`, `+=`, `-=`, `*=`, `/=` (Assignment)\n\n```\nNamaste Dai\n  solti result = 2 + 3 * 4;     // 14 (not 20)\n  solti result2 = (2 + 3) * 4;  // 20 (parentheses change order)\n  \n  lekh \"Result 1:\", result;   // 14\n  lekh \"Result 2:\", result2;  // 20\n```\n\n\n\u003ch3 align=\"center\"\u003eConditionals\u003c/h3\u003e\n\u003cp align=\"center\"\u003eNepdai supports conditional statements using \u003ccode\u003eyadi (condition) bhane\u003c/code\u003e for \"if\", \u003ccode\u003enatra yadi (condition) bhane\u003c/code\u003e for \"else if\", and \u003ccode\u003enatra\u003c/code\u003e for the final \"else\". If a \u003ccode\u003eyadi\u003c/code\u003e condition is \u003ccode\u003ethik\u003c/code\u003e, its block runs. If not, the next \u003ccode\u003enatra yadi\u003c/code\u003e (if any) is checked. If all fail, the \u003ccode\u003enatra\u003c/code\u003e block runs. Parentheses around conditions are optional!\u003c/p\u003e\n\n```\nNamaste Dai\n\n// Conditional statements in Nepdai\nsolti age = 25;\nsolti name = \"Ram\";\n\nlekh \"Name:\", name;\nlekh \"Age:\", age;\n\nyadi (age \u003e= 18) bhane {\n    lekh name, \"is an adult\";\n} natra {\n    lekh name, \"is a minor\";\n}\n\n// Nested conditionals\nsolti score = 85;\n\nyadi (score \u003e= 90) bhane {\n    lekh \"Grade: A\";\n} natra yadi (score \u003e= 80) bhane {\n    lekh \"Grade: B\";\n} natra yadi (score \u003e= 70) bhane {\n    lekh \"Grade: C\";\n} natra {\n    lekh \"Grade: F\";\n}\n\n```\n\n\u003ch3 align=\"center\"\u003eLoops\u003c/h3\u003e\n\u003cp align=\"center\"\u003eTo create loops, use \u003ccode\u003ejaba samma\u003c/code\u003e. This repeats code as long as the condition remains \u003ccode\u003ethik\u003c/code\u003e. Use \u003ccode\u003evai vayo rokki\u003c/code\u003e to break out of the loop early, and \u003ccode\u003eaghi badh vai\u003c/code\u003e to skip to the next iteration.\u003c/p\u003e\n\n\n```\nNamaste Dai\n\n// While loop with break and continue\nsolti i = 1;\n\nlekh \"Counting with break and continue:\";\n\njaba samma (i \u003c= 10) {\n    yadi (i == 5) bhane {\n        lekh \"Skipping\", i;\n        i++;\n        aghi badh vai;\n    }\n    \n    yadi (i == 8) bhane {\n        lekh \"Breaking at\", i;\n        vai vayo rokki;\n    }\n    \n    lekh \"Number:\", i;\n    i++;\n}\n\nlekh \"Loop finished!\";\n\n```\n\n\u003cdiv align=\"center\"\u003e\n\n**Crafted in Sahilverse for the Nepali programming community**\n\n### धन्यवाद (Thank you) for using NepDai! 🙏\n\n\u003c/div\u003e\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahilverse%2Fnepdai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahilverse%2Fnepdai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahilverse%2Fnepdai/lists"}