Published on 07:54 PM, January 20, 2024

Meet 'Mama Lang': The Bangla 'toy' programming language

Mama Lang is a JavaScript-based esoteric language, where .mama files are converted to .js and executed using Node.js. Illustration: Tech & Startup Desk

Learning programming can be a challenging endeavour, often requiring a solid understanding of complex concepts and syntax. For enthusiastic learners, the initial hurdles can be especially overwhelming. However, there is a solution: toy programming languages - the training wheels of coding that can simplify fundamental concepts so beginners can grasp them more easily. 

For a new learner, a toy programming language can be a great tool to help build confidence and experiment with coding ideas. Even then, for a beginner, programming languages such as JavaScript, Python, and C++ might deter them as they are very different from traditional languages. Thus, comes Mama Lang, a Bangla-based toy programming language intended to be an easy entryway to coding for Bangla speakers.

What is Mama Lang?

"I would describe 'Mama Lang' as a fun, unique, and esoteric programming language deeply rooted in the cultural context of Dhaka, Bangladesh," says Ahnaf Prio, creator of Mama Lang, who explains that 'Mama Lang' is derived from the Bangla word 'mama', a blanket term of amiable association in casual Bangla conversations.

Ahnaf was inspired to write a Bangla-based toy programming language after seeing 'Bhai Lang', a Typescript-based toy programming language based on the Hindi word 'bhai', made by two Indian engineers. Ahnaf opted to base Mama Lang on JavaScript, which he feels will help beginners get into coding more easily as JavaScript is currently the most common programming language in the world. "Mama Lang will help people open up to the JavaScript language and other JavaScript projects and jobs," Ahnaf adds.

How does it work?

"Mama Lang is designed not just as a programming language, but as a cultural expression and a playful tool for both beginners and experienced programmers," says Ahnaf. Mama Lang is a JavaScript-based esoteric language, where .mama files are converted to .js and executed using Node.js. As such, anything you can write in JavaScript can be written using Mama Lang as well.

Ahnaf explains that Mama Lang features familiar programming constructs like variables, types, built-ins for output, conditionals, and loops, but with a "distinct local twist". For example, variables are declared using 'mama aida hoilo', and the boolean values are 'haw mama (yes)' and 'nah mama (no)'. This essentially means that instead of learning complex terms associated with programming, a native Bangla speaker can use these everyday conversational terms to execute their codes. 

When asked about the potential impact of a Bangla-based programming language, Ahnaf says, "The playful syntax of Mama Lang, inspired by everyday conversations in Dhaka, invites users to engage with programming in a more relaxed and enjoyable way which I think most of us Bangalis don't get exposed to." 

Background

Ahnaf, a graduate of Computer Science at the University of Minnesota, shares that he didn't know how to write code until his sophomore year. Initially, he had found it very difficult to get into programming but soon grew an interest in it after seeing how most of his peers had experience with programming since high school. "Most of them were learning new languages with me, but they already knew how variables are defined, how logic works, and what a boolean is."

Relating his initial hurdle of getting into programming, Ahnaf feels that a toy programming language based on a casual Bangla word will help Banglalis learn these key concepts in a more light-hearted way. "As a beginner, I didn't find coding fun - but I enjoy it a lot now. I hope Mama Lang can help other Bangalis get over the same hurdles I had."

When talking about other Bangladeshi programming languages, Ahnaf mentioned 'Chascript', which, according to its GitHub page, is a Bangla scripting language built with ECMAScript grammar and parsed using JISON JavaScript. "If anything, I would support Chascript over my creation, or even the creation of a new programming language written in Bangla." Mama Lang is an open-source community project, and anyone can contribute to it. 

Ahnaf currently has his own software consulting company named Halicon where he consults Fortune 500 companies in Minnesota. He is also involved as a software architecture consultant at BestBuy, a multinational consumer electronics retailer. He previously co-founded a restaurant marketing startup called Tavolo in Minnesota and currently has a life insurance startup called Invive.

To try out Mama Lang, check out the 'official playground' here. To learn more, check out Ahnaf's Github page here.