TongaLang / Interactive playground
Programming,
closer to home.
TongaLang is an educational programming language that brings programming concepts into the familiar language of Tonga. Explore an example, change the code, and see your ideas run.
Behind the language ↗Ctrl / ⌘ + Enter to run. Tab moves to the next control.
Program output
Your output will appear here.
Ready. Python loads on your first run.
First run downloads about 14 MB of Python runtime from this site. Code stays in this tab. Supply input before running; missing values produce a clear error. Stop cancels loading or execution.
A small starting point
Read the language.
Tonga-derived keywords, familiar programming concepts. Every program starts with mulimo matalikilo().
zina- Declare a variable
amba()- Print a value
bala()- Read the next input line
kuti / nakunyina- If / otherwise
mulimo / pilula- Function / return
induluka- Repeat over a range
Engine source and playground limits
The unchanged lexer, PLY parser, AST and interpreter are bundled from TongaLang v0.2.0, revision 956909b ↗. Python runs in a separate worker using Pyodide 0.27.7.
Limits: 20,000 source characters, 10,000 input characters, 64,000 output characters, 1,000 iterations per loop, 50 function calls deep, and a five-second execution deadline. Each run has fresh variables. This browser playground does not include the desktop IDE’s visual AST explorer or guided editing tools.
Full language reference ↗