{"id":28690766,"url":"https://github.com/ahnafyy/mama-lang","last_synced_at":"2025-06-14T06:07:34.876Z","repository":{"id":213895294,"uuid":"735177613","full_name":"ahnafyy/mama-lang","owner":"ahnafyy","description":"An esoteric programming language (mama aita khub e joss mama!) ","archived":false,"fork":false,"pushed_at":"2024-02-01T16:18:11.000Z","size":1240,"stargazers_count":37,"open_issues_count":5,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T07:54:28.310Z","etag":null,"topics":["bengali","interpreter","javascript","programming-language"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mama-lang","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahnafyy.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}},"created_at":"2023-12-24T00:05:04.000Z","updated_at":"2025-03-21T14:21:56.000Z","dependencies_parsed_at":"2024-01-20T21:50:12.242Z","dependency_job_id":null,"html_url":"https://github.com/ahnafyy/mama-lang","commit_stats":null,"previous_names":["ahnafyy/mama-lang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahnafyy/mama-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahnafyy%2Fmama-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahnafyy%2Fmama-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahnafyy%2Fmama-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahnafyy%2Fmama-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahnafyy","download_url":"https://codeload.github.com/ahnafyy/mama-lang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahnafyy%2Fmama-lang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768625,"owners_count":22908232,"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":["bengali","interpreter","javascript","programming-language"],"created_at":"2025-06-14T06:07:33.423Z","updated_at":"2025-06-14T06:07:34.871Z","avatar_url":"https://github.com/ahnafyy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mama Lang 🚀\n\n[Mama Lang Playground](https://ahnafyy.github.io/mama-lang/)\n[Mama Npm Package](https://www.npmjs.com/package/mama-lang)\n\nI grew up in Dhaka, Bangladesh 🇧🇩, where \"Mama\" 🗣️, which literally translates to your mom's brother, is often used by friends as a form of endearment. The closest comparison I can find is how some people would use the word \"homie\" 🤝 in the US. I spent countless days and nights ☕🌙, sipping tea in the stands of Abahani Field in Dhanmondi 4 or at Paribagh with friends when I was in high school 🏫👥. During these gatherings, if we had kept a tally, I believe collectively we must have uttered the word `mama` well over a hundred times.\n\nSo when I saw this: bhai-lang https://github.com/DulLabs/bhai-lang 💡, I was inspired to write my own implementation!\nTo start with right now we just convert `.mama` files to `.js` and then run them with `node` and so anything that you could do in javascript land you can do it in mama lang.\n\n## Future State 🚀\n\nI am however playing around with the idea of making its own lexer, interpreter and parser so it can just be its own thing!\nIf you want to work on it the code is inside `mama-lang_v2` directory!\n\nFeel free to open up PR(s) and contribute! 😄\n\n## Playground 🚀🎮\n\nCheck out the [Mama Lang Playground](https://ahnafyy.github.io/mama-lang/) to write and run your `.mama` code in a fun and interactive environment! Whether you're taking your first steps into programming or just want to have a laugh with friends, the playground makes it easy to experiment with Mama Lang right in your browser. No installation required, just code and go! 😄👨‍💻\n\n## Installation 💻\n\n```\nnpm install -g mama-lang\n```\n\n## Usage 📝\n\nCreate a new file (boltesi.mama)\n\n```\nbol toh mama (\"kire mama!\");\n```\n\n## Run 🚀\n\n```\nmama boltesi.mama\n```\n\n## Output 🖨️\n\n```\nkire mama!\n```\n\n## Documentation 📚\n\n### Variables 📊\n\nVariables can be declared using `mama aida hoilo`;\n\n```\nmama aida hoilo day = \"Sunday\";\nmama aida hoilo temperature = 25;\nmama aida hoilo isSunny = haw mama;\nmama aida hoilo counter = 0;\n```\n\n### Types 🔠\n\nNumbers and strings are like other languages. Null values can be denoted using `kisuina mama`. `haw mama` and `nah mama` are the boolean values.\n\n```\n mama aida hoilo a = 10;\n mama aida hoilo b = 10 + (15*20);\n mama aida hoilo c = \"duita\";\n mama aida hoilo d = 'acha thikasey';\n mama aida hoilo e = kisuina mama;\n mama aida hoilo f = haw mama;\n mama aida hoilo g = nah mama;\n```\n\n### Built-ins 🛠️\n\nUse `bol toh mama` to print anything to the console.\n\n```\nbol toh mama (\"Hello World\");\n```\n\n```\nmama aida hoilo manushJon = 5;\nmama aida hoilo koiGhontaKoraLagbe = 8;\nmama aida hoilo shobMilayaKotoKhonLagbe = manushJon * koiGhontaKoraLagbe;\nbol toh mama(\"Shob miliya koto ghonta kamla khatesi amra hoilo = \" + shobMilayaKotoKhonLagbe);\n```\n\n## Conditionals 🔄\n\nmama-lang supports the if-else-if ladder construct, `jodi mama` block will execute if the condition is `haw mama`, otherwise one of the subsequently added `nah hoile mama` blocks will execute if their respective condition is `haw mama`, and the `akdom e nah hoile` block will eventually execute if all of the above conditions are `nah mama`.\n\n```\njodi mama (temperature \u003e 30) {\n  bol toh mama (\"Gorom lagtese mama, AC chalao mama!\");\n} nah hoile mama (temperature \u003c 20) {\n  bol toh mama (\"Thanda lagtese mama, sweater porum mama!\");\n} akdom e nah hoile {\n  bol toh mama (\"Aajke weather besh comfortable, mama!\");\n}\n```\n\n## Loops 🔁\n\nStatements inside `jotokhon porjonto mama` blocks are executed as long as a specified condition evaluates to `haw mama`. If the condition becomes `nah mama`, the statement within the loop stops executing and control passes to the statement following the loop. Use `thamis mama` to break the loop and `tarpor er tah dekh` mama to continue within the loop.\n\n```\n  mama aida hoilo a = 0;\n  jotokhon porjonto mama (a \u003c 10) {\n   a += 1;\n   jodi mama (a == 5) {\n    bol toh mama(\"loop er bhitor theke boltesi mama \", a);\n    tarpor er tah dekh mama;\n   }\n   jodi mama (a == 6) {\n    thamis mama;\n   }\n   bol toh mama(a);\n  }\n  bol toh mama(\"done\");\n```\n\n## Functions ⚙️\n\nYou can define a function using the `mama kam da hoilo` syntax, followed by the function name and parameters in parentheses. The function body is enclosed in curly braces.\n\n```\nmama kam da hoilo jog(a,b){\n    de toh mama (a+b);\n}\n```\n\nIn this example, a function named jog is defined with two parameters, a and b. The function body adds these parameters and returns the result using de toh mama.\n\n```\nbol toh mama(jog(5,7))\n```\n\n### Function Output 🔄\n\nFunctions in Mama Lang can return values using the de toh mama statement. The returned value can be assigned to a variable or used directly in expressions.\n\n```\nmama kam da hoilo multiply(x, y) {\n    de toh mama (x * y);\n}\n\nmama aida hoilo result = multiply(3, 4);\nbol toh mama(\"The result is: \" + result);\n```\n\nIn this example, the multiply function returns the product of its parameters, and the result is assigned to the result variable and printed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahnafyy%2Fmama-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahnafyy%2Fmama-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahnafyy%2Fmama-lang/lists"}