Back to work

Final-year Computer Science project

TongaLang

A programming language for beginners, built on words from Tonga, with a desktop app that explains each mistake instead of only flagging it.

Run TongaLang in your browser ↗
Completed 2025–2026 3 project links
TongaLang educational IDE showing a Tonga-language source program
From the current build.
Role
Developer & Researcher
Status
Completed
Year
2025–2026
Stack
Python · PLY · Tkinter · Pytest · PyInstaller · .tg files

Latest project update

Completed TongaLang 0.2.0 and published its new visual identity, per-user Windows installer, bundled examples and documented Linux setup, alongside guided diagnostics and the shared Problems/Program Input workflow.

01 · Context

The problem

Beginner programmers may need to learn programming concepts and interpret unfamiliar English syntax at the same time, adding linguistic and cognitive load.

The response

TongaLang combines Tonga-derived vocabulary with a small interpreted language and a guided desktop workspace. Learners see concepts in context, receive a plain-language recovery step when code is wrong, and stay in control of every suggested edit. Version 0.2.0 can be installed directly on Windows, while documented source and native bundle paths support Linux. It remains an educational language rather than a replacement for mainstream production tools.

02 · Contribution

What I built

  • 01

    Researched minimal languages and interpreter construction, then mapped core programming concepts into Tonga-derived vocabulary through linguistic research and native-speaker consultation.

  • 02

    Built the lexer, parser, abstract syntax tree, interpreter, runtime environment and native functions before separating the language engine from its Tkinter IDE.

  • 03

    Designed a pure diagnostics model with stable codes, exact source spans, bilingual explanations and guarded edits that never execute or silently rewrite learner code.

  • 04

    Added debounced live analysis and a collapsible Problems workflow with precise highlighting, Go to Code, Copy Details and undoable Apply Fix actions.

  • 05

    Reworked graphical input around one thread-safe shared dock so bala() pauses only the interpreter, keeps the interface responsive and echoes submitted values into Output.

  • 06

    Created the TongaLang visual identity and applied it consistently to the IDE window, executable, desktop shortcut and setup experience.

  • 07

    Built a reproducible Windows installer that installs per user, includes 17 examples and supports clean uninstallation without requiring administrator access.

  • 08

    Documented Linux source installation and native bundle creation, then published the checksum-verified v0.2.0 release with privacy-reviewed product evidence.

03 · What it does

What it does
today.

Custom lexer, parser, AST and interpreter
Variables, arithmetic, Boolean logic, conditions, loops, functions and scope
Side-effect-free lexical, syntax and semantic diagnostics
Bilingual error codes, exact source highlighting and guarded Apply Fix actions
Shared Problems/Program Input dock across Editor and Output
Responsive bala() pause and resume with a visible input transcript
Semantic colours for eight reserved-word groups in dark and light themes
Back and Forward history plus a collapsible navigation menu
Scrollable grouped Settings and structured About guide
AST explorer, Grammar reference, internal console and execution safety limits
Windows installer, Start menu entry, desktop shortcut and uninstaller
Linux source installer and documented native bundle build
17 example .tg programs included with source and desktop installations
179 automated regression, adversarial and GUI integration tests

04 · Screens

See it
working.

Screenshots and recordings from the real build, with the notes that belong to them.

A silent, captioned walkthrough from semantic editing and Apply Fix through bala() input, scrolling and the structured About guide.
TongaLang Setup selecting a per-user Windows installation folder
The Windows installer uses the TongaLang name throughout, installs without administrator rights and puts the example programs in the application folder.
TongaLang Problems dock explaining an unnecessary semicolon and offering a guarded Apply Fix action
Problems explains a source error in English and Tonga, and only offers a fix when the correction is certain.
TongaLang Output view with the shared Program Input dock waiting for a bala value
When bala() needs a value, Output stays visible so you can see what the program already printed.
TongaLang Output showing a completed program and the value entered through Program Input
Submitted values are echoed into the authoritative Output transcript before execution continues, making interactive programs easier to follow and explain.
Scrollable TongaLang Settings showing grouped execution controls and semantic syntax colours
Scrollable, collapsible settings expose safety limits, language tools and accessible colours without clipping at smaller window sizes.
Structured TongaLang About screen with author, academic and project information
The project guide explains the author, academic context, purpose, architecture, quick start, features and current safety scope.
TongaLang source editor using the light theme and semantic reserved-word colours
Dark and light editor themes give each reserved-word family a consistent semantic colour while preserving string and comment precedence.
TongaLang graphical abstract syntax tree with source-linked nodes
The AST explorer connects executable structure back to the learner's source code.
TongaLang internal console showing project and runtime information
The Console is where IDE messages and interpreter details appear, kept out of the editor.
TongaLang Grammar reference showing language rules and keyword examples
The built-in Grammar reference keeps language rules and examples close to the editor for learners who need a quick reminder.
TongaLang Test Lab showing all checks passing
The Test Lab turns regression results, weakness probes and coverage into visible evidence.

05 · Engineering

Hard parts,
clear decisions.

Helpful fixes without unsafe guessing

The IDE had to give broad advice while only editing mistakes it could be certain about. A suggested fix carries the exact text it expects to replace, refuses to apply to source that has changed, and leaves ambiguous cases for the learner to decide.

Input without freezing the IDE

bala() must pause execution, not navigation or scrolling. A worker-thread input provider and single-use queue handoff keep Tkinter responsive and prevent repeated submissions.

One dock across changing views

Problems and Program Input share state, expansion and sash size while Editor and Output change underneath them. Runtime failures, successful runs, pending input and manual inspection each require a distinct transition.

Growing without regressions

Diagnostics, tokens, grammar, runtime behaviour, highlighting and existing programs affect one another, so changes are protected by error-contract, adversarial and GUI integration tests.

Packaging a complete learning environment

The desktop release needed more than a frozen executable. The build now carries the logo, runtime assets and examples into a per-user installer, documents reproducible builds and publishes a checksum for independent verification.

Execution pipeline

From source to
feedback.

  1. Source .tg program
  2. Lexer tokens
  3. Parser grammar
  4. AST structure
  5. Interpreter runtime
  6. Output or guided problem

07 · Reflection

What I learned

Compiler and interpreter fundamentalsGrammar and AST designBeginner-centred diagnostic writingGuarded source-edit designThread-safe GUI executionStateful Tkinter workspace architectureWindows and Linux desktop packagingRelease checksums and reproducible buildsAutomated and adversarial testingAccessible educational language design

Planned or still in development

  • Add progressive beginner lessons, expected output and resettable examples
  • Add keyword and native-function autocomplete with short contextual help
  • Add a variable inspector and simple step-through execution
  • Persist settings, dock sizes, recent files and safe session recovery
  • Arrange a Tonga educator review and formal Narrator or NVDA accessibility testing
  • Add release CI, Windows code signing and distribution packages for major Linux formats

Where it stands

TongaLang 0.2.0 is public on GitHub. It ships with 17 example programs and passes all 179 automated tests. The Windows installer is published with a SHA-256 checksum, and the captioned walkthrough below runs just under a minute.

Open to opportunities

Let’s discuss your role,
product or technical challenge.

Open to graduate software roles, internships, freelance builds, hackathons and collaborations, in Zambia or remotely.

Start a conversation

Navigate the system

Where should we go?