From an Idea to TongaLang: My Journey Building a Programming Language in Zambia

How a simple question during my final year at university led me into the world of programming language design, research, and engineering.

In January 2026, as I was preparing to undertake my final-year project, I knew I wanted to work on something related to ICT for Education (ICT4ED).

I wanted to build something meaningful, something that would challenge me technically while exploring how technology could contribute to education.

At some point, a question came to mind:

How are programming languages actually created?

Throughout our studies, we had been introduced to the theory behind programming languages, compilers, interpreters, and related concepts. But I wanted to go beyond the classroom explanations. I wanted to understand the process by actually building one myself.

That curiosity became the starting point of what is now TongaLang.

Finding a direction

Initially, my goal was simply to develop my own programming language.

But as I started researching existing programming languages and their implementations, I became interested in another question: why weren't more programming languages being developed around the indigenous languages spoken in my country, Zambia?

There are many languages spoken across Zambia, yet the programming tools we commonly encounter in education are largely based on English terminology.

I began exploring the possibility of building a programming language that used vocabulary from a local language.

That is how the idea for TongaLang was born.

I took the concept to my project supervisor, explained what I wanted to achieve, and received his support.

At that point, I had an approved direction, but I was still far from understanding the full amount of work ahead of me.

I was stepping into a field I had never explored at this depth before.

I knew it would be difficult. I also knew that if I was going to pursue it, I needed to start early.

Researching what I had signed up for

I spent a considerable amount of time researching programming language implementation.

I studied existing attempts at indigenous-language programming languages, explored different implementation approaches, and tried to understand how the major components of a language fit together.

I looked into lexical analysis, parsing, grammar design, abstract syntax trees, interpreters, and runtime environments.

I wanted to understand the process rather than simply take an existing language and replace its keywords.

Eventually, I settled on developing my own language implementation using Python and PLY (Python Lex-Yacc).

PLY would provide tools for lexical analysis and parsing, but I still had to design the language grammar, build its interpreter, implement its runtime behaviour, and decide how programs would be executed.

The more I researched, the more I understood why building a programming language was not a small undertaking.

But by then, I had made my decision.

February 18: Defending the idea

After completing my research and preparing my project proposal, I received approval from my supervisor.

On 18 February 2026, I faced the next challenge: presenting and defending the proposal before a panel of lecturers.

The format was straightforward but demanding: five minutes to present the project, followed by five minutes of technical examination and defence.

I'll admit something here.

Public speaking has never been one of my strongest areas.

I was nervous. My presentation wasn't perfect. I stammered at certain points, and I knew I could have delivered it better.

But I delivered it.

Then came the technical questions.

The panel questioned the feasibility of the project, the complexity of what I was proposing, and whether I fully understood what I was getting myself into.

It was a tough examination.

However, I had spent time researching the topic, studying different implementations, and understanding the technical requirements.

Even though my presentation had been shaky, I was confident in my research and able to defend the engineering decisions behind the proposal.

I stood my ground.

By the time I walked out of that room, the panel had approved my project.

One lecturer in particular had taken a strong interest in what I was proposing.

I still remember his words:

"This is a complex system you're working on. You seem confident in what you've decided to do. I'm looking forward to seeing this project. Hope you deliver."

Those words stayed with me.

I knew that one of the toughest examiners had his eyes on my project, and I had given myself something serious to deliver.

There was no time to waste.

From research to a working interpreter

After the proposal defence, I moved straight into development.

My first priority was getting the foundations of the language working.

I started with the lexer, which breaks source code into tokens, and the parser, which checks whether those tokens follow the grammar of the language.

From there, I worked on the abstract syntax tree (AST), runtime environments, and the interpreter responsible for executing programs.

Each component introduced its own challenges.

A change to the grammar could affect the parser. A new language feature could expose weaknesses in how the interpreter handled variables, functions, or execution flow.

By April 2026, I had developed a basic working prototype.

That was an important milestone because I could finally begin seeing the results of the research in something executable.

But I was nowhere near finished.

I continued expanding the language, adding programming constructs and improving how the different components interacted.

I also began giving more attention to the experience of someone learning to program.

It wasn't enough for TongaLang to execute code correctly. I wanted it to provide useful feedback when something went wrong.

That led me to work on clearer error messages, source locations, and explanations that could help beginners identify mistakes.

By late June, I had a fully working prototype that I considered TongaLang version 0.1.

Why testing became one of the most important parts

As TongaLang grew, I encountered another engineering challenge.

Every time I introduced a new feature or modified the interpreter, I needed to confirm that existing functionality still worked.

Initially, I could manually run example programs and inspect their output.

But as the language became more complex, manually testing everything after every change was no longer efficient.

I needed a more reliable approach.

That pushed me into developing automated test suites covering different parts of the language.

I also built the TongaLang Test Lab, which became part of the development environment.

The Test Lab helped me identify failures more quickly and examine how changes affected the language.

It became particularly useful as I continued refining the grammar, interpreter, error handling, and other features.

This was one of the biggest lessons I took from the project.

Building a feature is one part of engineering. Making sure that feature continues to work as the system evolves is another.

The automated tests and Test Lab became essential tools in improving the reliability of TongaLang.

Building the TongaLang IDE

With continued development and guidance from my supervisor, the language had become much more polished by early August.

I also developed a graphical integrated development environment (IDE) for TongaLang.

I wanted people to interact with the language through something more accessible than a command-line interface alone.

The IDE, built using Python's Tkinter library, brought together source editing, syntax highlighting, program execution, input and output, and other developer tools.

One feature I particularly value is the AST explorer.

When learning about programming languages, abstract syntax trees can feel like concepts that exist only in diagrams and textbooks.

The AST explorer makes it possible to see how TongaLang represents a program internally.

Over time, the IDE also gained improved diagnostics, guided error handling, visual settings, and a Test Lab for examining the system's behaviour.

What had started as a question about how programming languages were created had become a language with its own interpreter and development environment.

The final project defence

Eventually, the day of our final-year project presentations and demonstrations arrived.

It was also my last day at university.

When the list of examiners was released, I checked who had been assigned to evaluate my work.

And there it was.

Dr George Mufungulwa.

The same lecturer whose words had stayed with me since the proposal presentation.

I had a feeling our paths would cross again during the final examination, and now it was confirmed.

I remembered his challenge: he was looking forward to seeing the project, and he hoped I would deliver.

This time, I had a working system to demonstrate.

The presentations and project demonstrations went smoothly with my examiners.

I was able to show the language, explain its architecture, demonstrate its functionality, and defend the engineering work behind it.

After months of research, development, debugging, testing, and improvement, it was rewarding to see everything come together.

My academic project received an A grade in the Project Seminars course.

That meant a great deal to me, not simply because of the grade, but because I knew how much work had gone into building the system.

I had challenged myself to explore something unfamiliar, dealt with the uncertainty of developing a complex system, and followed the idea through to a working implementation.

TongaLang beyond university

Although TongaLang began as my final-year project, I don't want the journey to end with an academic submission.

I want to take the work further.

The language currently uses Tonga-derived programming keywords and includes support for variables, conditional statements, loops, functions, expressions, input, and output.

It has its own lexer, parser, abstract syntax tree, and interpreter, implemented in Python using PLY.

The project has also grown to include a desktop IDE, automated testing, technical documentation, and executable example programs.

In September 2026, I documented further improvements, including the Windows installation package and a test suite reporting 179 passing tests.

There is still more to explore, particularly around language design, accessibility, educational evaluation, and making the software easier for others to use.

I don't consider TongaLang a finished answer to programming education. I see it as a foundation that can be studied, tested, improved, and built upon.

Bringing TongaLang to the world

I'm now making TongaLang available beyond the university environment.

Anyone interested in exploring the project can access its public GitHub repository, review the source code, examine the language documentation, and try the available examples.

A Windows installer is available through the project's GitHub Releases page. The project has also been tested on Linux, with source installation and build instructions provided in the documentation.

Further distribution and improvements are ongoing.

I welcome contributions from software developers, programming-language enthusiasts, educators, researchers, and anyone interested in exploring how local languages can be represented in programming tools.

Whether it's testing the language, reporting bugs, contributing code, reviewing the grammar, or sharing ideas about educational applications, there is room for collaboration.

Explore TongaLang:

Looking back, the journey started with a simple question:

How are programming languages created?

I didn't fully understand what I was signing up for when I decided to answer that question by building one.

But I knew I wanted to learn, and I was willing to put in the work.

From that first idea in January, through a nervous proposal defence in February, to a working interpreter in April, version 0.1 in June, and a polished project by August, TongaLang has been one of the most demanding and rewarding engineering experiences I've undertaken.

I am proud of how far the project has come, and I'm looking forward to seeing what it can become.

This is TongaLang. And the journey continues.

— Leo Mabuku