S Technologies's Logo
Shunno
Shunno

Color

Indigo
Red
Green
Teal
Blue
Purple
Rose

Mode

Light
বাং
A programming language in Bengali

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.

hello.shnoShunno
// প্রথম প্রোগ্রামলেখা নাম = 'শুন্য';সংখ্যা সাল = ২০২৪;দেখাও('হ্যালো, ' + নাম + '!');যদি (সাল > ২০২০) {	দেখাও('বাংলায় প্রোগ্রামিং');}
Output
  • হ্যালো, শুন্য!
  • বাংলায় প্রোগ্রামিং
Why Shunno

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.

The name

শুন্য 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.

Vocabulary

The entire language, in one screen

Every reserved word Shunno has. Point at a card to see what it looks like in use.

  • চলকvar
    Declarationচলক ক = ৫;
  • ধ্রুবকconst
    Declarationধ্রুবক পাই = ৩.১৪;
  • সংখ্যাint
    Typeসংখ্যা বয়স = ২৫;
  • ভগ্নাংশfloat
    Typeভগ্নাংশ দাম = ৯.৫;
  • লেখাstring
    Typeলেখা নাম = 'রফিক';
  • বুলbool
    Typeবুল সত্যি = সত্য;
  • সারিarray
    Typeসারি নামগুলো;
  • সত্যtrue
    Literalবুল ক = সত্য;
  • মিথ্যাfalse
    Literalবুল খ = মিথ্যা;
  • যদিif
    Control flowযদি (ক > ৫) { }
  • নাহলেelse
    Control flowনাহলে { }
  • নাহলে_যদিelse if
    Control flowনাহলে_যদি (ক < ০) { }
  • যখনwhile
    Control flowযখন (ক < ১০) { }
  • চক্রfor
    Control flowচক্র (ক) { }
  • থামাওbreak
    Control flowথামাও;
  • চালাওcontinue
    Control flowচালাও;
  • এবংand
    Operatorযদি (ক এবং খ) { }
  • অথবাor
    Operatorযদি (ক অথবা খ) { }
  • নয়not
    Operatorযদি (নয় ক) { }
  • ফাংশনfunction
    Functionফাংশন যোগ() { }
  • পাঠাওreturn
    Functionপাঠাও ফল;
  • দেখাওprint
    Built-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.

Numerals

Numbers are written ০ to ৯

Not converted for display — this is what the lexer reads and what the program prints.

What you knowWhat Shunno reads
  • 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.

numeral.shnoShunno
সংখ্যা  = ;সংখ্যা  = ;দেখাও( * );দেখাও( + );
Output
  • ৪২
  • ১৩
Programs

Real programs, and what they print

Every output below was produced by running that exact program while this page was built.

hello.shnoShunno
দেখাও('হ্যালো, আমি শুন্য!');
Output
  • হ্যালো, আমি শুন্য!

The example from Shunno’s own documentation, unchanged. দেখাও prints its argument.

Step one

Your line becomes tokens

The first thing the compiler does is cut the text into the smallest pieces that mean something.

Source
সংখ্যা মোট =  + ;
Tokens
  • সংখ্যাtype
  • মোটname
  • =operator
  • number
  • +operator
  • number
  • ;symbol

Each chip is one token, labelled with its class

Step two

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.

Parsed statement
ফল+*সংখ্যা

The syntax tree for this statement, as the parser builds it

Step three

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.

Does not compile
main.shnoShunno
সংখ্যা বয়স = ২৫;লেখা নাম = 'রফিক';দেখাও(নাম + বয়স);

$ shunno build main.shno

  • main.shno:4 ‘+’ cannot join লেখা and সংখ্যা
  • 1 error — no executable produced
Compiles
main.shnoShunno
সংখ্যা বয়স = ২৫;লেখা নাম = 'রফিক';দেখাও(নাম);দেখাও(বয়স);

$ 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.

End to end

From your text to an executable

Six passes, and the program is a different kind of thing after each one.

Your sourceA program you can run
  1. Sourceদেখাও('হ্যালো');The text you typed.
  2. Lexer[দেখাও] [(] ['হ্যালো'] [)] [;]Cut into tokens.
  3. Parserদেখাও └ 'হ্যালো'Arranged into a tree.
  4. Type checkলেখা ✓Every value matched to its slot.
  5. Code generationmov rdi, msg call printLowered to instructions.
  6. Executable48 89 F8 E8 00Machine code, ready to run.
Functions

A function that calls itself

Each call waits on the one below it, and the answers come back in the opposite order.

Source
stack.shnoShunno
ফাংশন ক্রমগুণ(সংখ্যা ) {	যদি ( <= ) {		পাঠাও ;	}	পাঠাও  * ক্রমগুণ( - );}দেখাও(ক্রমগুণ());
Call stack
  1. ক্রমগুণ(৫)returns১২০
  2. ক্রমগুণ(৪)returns২৪
  3. ক্রমগুণ(৩)returns
  4. ক্রমগুণ(২)returns
  5. ক্রমগুণ(১)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.

By the numbers

Small enough to learn in an evening

There is not very much of it, and that is the design.

0

Reserved words

The complete vocabulary

0

Built-in types

Number, fraction, text, boolean, array

0

Editor integrations

VS Code, JetBrains

0

Cost, forever

Free under the STechBD License

Built with

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
Tooling

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.

Where it is going

Shipped, and next

Shunno is a small project with a short list. This is the honest version of it.

  1. v1.0.0Shipped

    The first public release

    Version 1.0.0 — the language, the compiler, and the documentation, released together.

  2. WindowsShipped

    The Windows compiler

    A Lex/Yacc front end with a C++ driver, producing native executables.

  3. EditorsIn progress

    Editor support

    The VS Code extension is published. The JetBrains plugin has a repository and is not finished.

  4. Linux · macOSPlanned

    More platforms

    Linux and macOS builds. Not started, and not promised for a date.

Try it

Write Shunno right here

No install, no account. Edit the program, press run, and read the output.

Editor
Samples
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.

Ecosystem

Shunno and everything around it

The language sits inside a wider set of things S Technologies builds and maintains.

Shunno
ShunnoThe compiler, the tooling, and the company behind them
শুন্যShunnoবাংলায় প্রোগ্রামিংstatically typedcompiledopen sourceশুন্যShunnoবাংলায় প্রোগ্রামিংstatically typedcompiledopen sourceশুন্যShunnoবাংলায় প্রোগ্রামিংstatically typedcompiledopen sourceশুন্যShunnoবাংলায় প্রোগ্রামিংstatically typedcompiledopen source
People

Who builds it

A small project, told accurately.

Start here

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.