Write code in your own language
Shunno is a general-purpose programming language with Bengali keywords, Bengali identifiers and Bengali numerals. It is high-level, statically typed, and compiles to machine code.
// প্রথম প্রোগ্রামলেখা নাম = 'শুন্য';সংখ্যা সাল = ২০২৪;দেখাও('হ্যালো, ' + নাম + '!');যদি (সাল > ২০২০) { দেখাও('বাংলায় প্রোগ্রামিং');}- হ্যালো, শুন্য!
- বাংলায় প্রোগ্রামিং
A language that reads the way you think
Three decisions shape everything else about it.
Bengali all the way down
The keywords are Bengali words, the variable names are Bengali words, and the numbers are written ০ to ৯. Nothing is transliterated and nothing is a wrapper over an English language underneath.
Statically typed
Every variable has a type the compiler knows before the program runs. A value that does not fit its slot is a build error, not a surprise in front of a user.
Compiled to machine code
Shunno is not interpreted at run time. The compiler turns your source into an executable, so a finished program is a file you can hand to somebody.
শুন্য means zero
The language is named after the digit, and the digit is where the argument starts.
Bengali has its own numerals, and Shunno uses them: ৫ is a five to the compiler, not a character to be converted.
Zero is also the honest starting point. Shunno assumes no English, no prior language, and no imported vocabulary.
It is the first digit a Bengali child learns to write, and now the first thing they can compute with.
The entire language, in one screen
Every reserved word Shunno has. Point at a card to see what it looks like in use.
- চলকvarDeclarationচলক ক = ৫;
- ধ্রুবকconstDeclarationধ্রুবক পাই = ৩.১৪;
- সংখ্যাintTypeসংখ্যা বয়স = ২৫;
- ভগ্নাংশfloatTypeভগ্নাংশ দাম = ৯.৫;
- লেখাstringTypeলেখা নাম = 'রফিক';
- বুলboolTypeবুল সত্যি = সত্য;
- সারিarrayTypeসারি নামগুলো;
- সত্যtrueLiteralবুল ক = সত্য;
- মিথ্যাfalseLiteralবুল খ = মিথ্যা;
- যদিifControl flowযদি (ক > ৫) { }
- নাহলেelseControl flowনাহলে { }
- নাহলে_যদিelse ifControl flowনাহলে_যদি (ক < ০) { }
- যখনwhileControl flowযখন (ক < ১০) { }
- চক্রforControl flowচক্র (ক) { }
- থামাওbreakControl flowথামাও;
- চালাওcontinueControl flowচালাও;
- এবংandOperatorযদি (ক এবং খ) { }
- অথবাorOperatorযদি (ক অথবা খ) { }
- নয়notOperatorযদি (নয় ক) { }
- ফাংশনfunctionFunctionফাংশন যোগ() { }
- পাঠাওreturnFunctionপাঠাও ফল;
- দেখাওprintBuilt-inদেখাও('হ্যালো');
That is the whole vocabulary — there is no second page. A language you can hold in your head is a language you can start using this evening.
Numbers are written ০ to ৯
Not converted for display — this is what the lexer reads and what the program prints.
- 0০
- 1১
- 2২
- 3৩
- 4৪
- 5৫
- 6৬
- 7৭
- 8৮
- 9৯
A numeric literal in Shunno is matched as [০-৯], with an optional fractional part in the same digits. Arithmetic goes in as Bengali numerals and comes out as Bengali numerals, with nothing translated in between.
সংখ্যা ক = ৭;সংখ্যা খ = ৬;দেখাও(ক * খ);দেখাও(ক + খ);- ৪২
- ১৩
Real programs, and what they print
Every output below was produced by running that exact program while this page was built.
দেখাও('হ্যালো, আমি শুন্য!');- হ্যালো, আমি শুন্য!
The example from Shunno’s own documentation, unchanged. দেখাও prints its argument.
সংখ্যা বয়স = ২৫;ভগ্নাংশ উচ্চতা = ৫.৮;লেখা নাম = 'রফিক';বুল ছাত্র = সত্য;দেখাও(নাম);দেখাও(বয়স);দেখাও(উচ্চতা);দেখাও(ছাত্র);- রফিক
- ২৫
- ৫.৮
- সত্য
Four built-in types. The type name opens the declaration, the way it does in C.
সংখ্যা নম্বর = ৮৫;যদি (নম্বর >= ৮০) { দেখাও('এ প্লাস');} নাহলে_যদি (নম্বর >= ৭০) { দেখাও('এ');} নাহলে { দেখাও('আরও চেষ্টা করো');}- এ প্লাস
যদি, নাহলে_যদি and নাহলে. The comparison operators are the symbols you already know.
চলক গণনা = ১;চলক যোগফল = ০;যখন (গণনা <= ১০) { যোগফল = যোগফল + গণনা; গণনা = গণনা + ১;}দেখাও('এক থেকে দশ পর্যন্ত যোগফল');দেখাও(যোগফল);- এক থেকে দশ পর্যন্ত যোগফল
- ৫৫
যখন repeats while its condition holds. চলক declares a variable whose type is inferred.
সংখ্যা সংখ্যাটি = ২৯;চলক ভাজক = ২;বুল মৌলিক = সত্য;যখন (ভাজক < সংখ্যাটি) { যদি (সংখ্যাটি % ভাজক == ০) { মৌলিক = মিথ্যা; থামাও; } ভাজক = ভাজক + ১;}যদি (মৌলিক) { দেখাও('মৌলিক সংখ্যা');} নাহলে { দেখাও('মৌলিক নয়');}- মৌলিক সংখ্যা
Trial division, with থামাও leaving the loop early. Twenty-nine lines up as prime.
Your line becomes tokens
The first thing the compiler does is cut the text into the smallest pieces that mean something.
সংখ্যা মোট = ৫ + ৩;
- সংখ্যাtype
- মোটname
- =operator
- ৫number
- +operator
- ৩number
- ;symbol
Each chip is one token, labelled with its class
Tokens become a tree
The parser works out what belongs to what — which is where the brackets in your arithmetic stop being punctuation and start being structure.
The syntax tree for this statement, as the parser builds it
The compiler refuses to build a broken program
This is what statically typed actually buys you: the mistake is found now, by a machine, and not later, by a user.
সংখ্যা বয়স = ২৫;লেখা নাম = 'রফিক';দেখাও(নাম + বয়স);$ shunno build main.shno
- main.shno:4 ‘+’ cannot join লেখা and সংখ্যা
- 1 error — no executable produced
সংখ্যা বয়স = ২৫;লেখা নাম = 'রফিক';দেখাও(নাম);দেখাও(বয়স);$ shunno build main.shno
built successfully
Nothing ran. There is no half-finished output and no partly written file — the program was rejected before a single line of it executed.
From your text to an executable
Six passes, and the program is a different kind of thing after each one.
- Sourceদেখাও('হ্যালো');The text you typed.
- Lexer[দেখাও] [(] ['হ্যালো'] [)] [;]Cut into tokens.
- Parserদেখাও └ 'হ্যালো'Arranged into a tree.
- Type checkলেখা ✓Every value matched to its slot.
- Code generationmov rdi, msg call printLowered to instructions.
- Executable48 89 F8 E8 00Machine code, ready to run.
A function that calls itself
Each call waits on the one below it, and the answers come back in the opposite order.
ফাংশন ক্রমগুণ(সংখ্যা ন) { যদি (ন <= ১) { পাঠাও ১; } পাঠাও ন * ক্রমগুণ(ন - ১);}দেখাও(ক্রমগুণ(৫));- ক্রমগুণ(৫)returns১২০
- ক্রমগুণ(৪)returns২৪
- ক্রমগুণ(৩)returns৬
- ক্রমগুণ(২)returns২
- ক্রমগুণ(১)returns১
The trace beside this listing is written out rather than measured — the in-browser interpreter that runs the other samples on this site does not evaluate function declarations yet.
Small enough to learn in an evening
There is not very much of it, and that is the design.
Reserved words
The complete vocabulary
Built-in types
Number, fraction, text, boolean, array
Editor integrations
VS Code, JetBrains
Cost, forever
Free under the STechBD License
A conventional compiler, in the open
A Lex and Yacc front end with a C++ driver, targeting x86-64. Nothing exotic, and all of it readable.
Toolchain and targets
- Lex
- Yacc
- Flex
- Bison
- C++
- GCC
- Make
- CMake
- Windows
- x86-64
- Machine code
- Static typing
- Unicode
- UTF-8
- Bengali numerals
- CLI
- VS Code
- JetBrains
- TextMate grammar
- GitHub
- STechBD License
- Free
- Open source
- STechBD
What you get around the language
A compiler on its own is a research project. These are what make it something to start a project in.
The compiler
The Lex/Yacc front end and its C++ driver, on GitHub. Clone it, build it, read it.
Available nowVS Code extension
Syntax highlighting for every keyword, both comment styles and Bengali numeric literals.
Available nowDocumentation
The language reference and tutorials, at docs.stechbd.net.
Available nowJetBrains plugin
The same highlighting for IntelliJ-family editors. The repository exists; the plugin is not published yet.
In progress
Shipped, and next
Shunno is a small project with a short list. This is the honest version of it.
- v1.0.0Shipped
The first public release
Version 1.0.0 — the language, the compiler, and the documentation, released together.
- WindowsShipped
The Windows compiler
A Lex/Yacc front end with a C++ driver, producing native executables.
- EditorsIn progress
Editor support
The VS Code extension is published. The JetBrains plugin has a repository and is not finished.
- Linux · macOSPlanned
More platforms
Linux and macOS builds. Not started, and not promised for a date.
Write Shunno right here
No install, no account. Edit the program, press run, and read the output.
Press Run to compile and execute this program.
This runs an in-browser interpreter for a subset of Shunno, not the real compiler. Declarations, দেখাও, যদি, যখন, থামাও and চালাও work; ফাংশন, চক্র and সারি are recognised but not executed.
Shunno and everything around it
The language sits inside a wider set of things S Technologies builds and maintains.
Who builds it
A small project, told accurately.
Your first Shunno program is one line long
Install the compiler, or skip that entirely and write something in the browser. Either way you will have run a program in Bengali in the next few minutes.
Free under the STechBD License. Source on GitHub.

