BunnaScript

This article introduces a new programming language, BunnaScript with its details, features and instructional videos. BunnaScript is developed based on a US patent pending invention that enables anyone to write/learn any programming language in any natural language.

BunnaScript ML code

BunnaScript is a multilingual JavaScript and TypeScript programming language that enables you to write computer code in your native language. The computer doesn’t care what language you use when you write code. Only 0s and 1s make sense to the computer. Must all computer programs be written in English? Technically, no. One can write programs using numbers only. For example, the below code is written in hexadecimal numbers wrapped in C/C++ code. You cannot tell what it does by looking at the code, but it opens a message box on Windows if you run it. Although the computer prefers such low-level codes, it is not easy for humans to write or understand such code. That is why we use high level programming languages to simplify code writing and to make the codes more structured and understandable at design time.

Shellcode - Program with hexadecimal numbers

High level programming languages such as C++, C#, JavaScript, Python, Java, etc., provide a way for writing programs using human languages. Programs written in high level languages are converted to machine code (0s and 1s) before running in the system. Therefore, the human language we use to write the source code doesn’t matter to the computer as long as we convert it to machine code before executing.

Although there are several high-level programming languages, they are still difficult to understand and write programs with, especially for those who do not speak/write English because most of them are written in English. Some level of proficiency in English is still required to understand/write programs using these modern high-level programming languages. Having to learn English first can be a barrier to learn programming for millions of people throughout the world, especially for children and young adults.

We developed BunnaScript with the intention to enable all non-English speakers to write computer code in their native languages. Writing computer code in one’s own language will unlock the power and beauty of programming to anyone in any country.

Although the concept behind BunnaScript is not limited to a single programming language or a single natural language, the current version of BunnaScript supports JavaScript and TypeScript using Amharic. In the future we will add additional world languages. Amharic is the national language of Ethiopia that descends from the ancient language of Geez. Amharic uses its own scripting called Ethiopic. So, BunnaScript has a built-in keyboarding module for non-English scripts. The word Bunna means coffee in Ethiopia, the birthplace of coffee. So BunnaScript literally means JavaScript. The image below (current logo of BunnaScript) shows Jebena, the staple Ethiopian clay kettle for making coffee.

BunnaScript logo

How BunnaScript Works

BunnaScript relies on the fact that computers don’t care the high-level language you use when you write the source code. What matters is providing the executable machine code. Not to reinvent the engine, we used existing compilers to convert BunnaScript codes into machine codes. Therefore, BunnaScript programs run on any system that other programs run on. We demonstrated this idea using BunnaScript, JavaScript and TypeScript languages. We chose JavaScript because JavaScript is one of the most popular (perhaps the topmost) programming language in the world. The figure below shows the basic compilation process of BunnaScript codes.

BunnaScript code compilation process

Major Features of BunnaScript

BunnaScript comes with a standalone editor. It is a full-fledged editor based on the same code editor used by Microsoft Visual Studio Code. This allows BunnaScript editor to have full features and functionalities of a code editor. BunnaScript editor provides code documentations and suggestions in the target natural language. This makes the programmer learn the internals of the programming language while writing the code.

String operations in BunnaScript

BunnaScript editor provides live code transformation from the target language to the English source code during compilation so that the program written in BunnaScript can run on any device that supports JavaScript such as Windows, Mac, Linux, Mobile devices, browsers and so on. The screenshot below shows the original BunnaScript code and the converted JavaScript code that run where JavaScript runs.

BunnaScript and JavaScript

Programmers can mix languages while writing programs and get full documentation in both English and the target language. The editor compiles both language programs without error. This may be useful if programmers want to get documentation of pre-written English source codes in their native language.

Mixed programs in BunnaScript

The capability of BunnaScript is not limited to just displaying hello world. It is designed to be as capable as TypeScript/JavaScript. For example, with BunnaScript, you can write advanced programs such as object oriented and simple machine learning codes in your own language. So, it enables you get familiar with such advanced concepts very easily. Like other major program editor tools, BunnaScript editor flags any syntax or logic error in the code during compilation.

Error handling in BunnaScript

Although it was not our primary intent, the converted BunnaScript program is obfuscated to some extent- it is not easy to understand the program for those who cannot read the target natural language. The obfuscation, however, may have unintended benefit in fields such as cybersecurity, making reverse engineering of codes more difficult.

Demo Videos

The demo is divided into three parts; introduction, object oriented and simple machine learning programs in BunnaScript. Videos are presented in Amharic.

Part I - Introduction to Programming in BunnaScript

The following video demonstrates introductory programing concepts such as conditional statements, loops, functions, and string operations using BunnaScript.

Part II - Object Oriented Programming in BunnaScript

This video shows how to write object-oriented programs in BunnaScript. Classes, objects, inheritance and polymorphism are briefly explained. In this video you will see how a BunnaScript code is converted to pure JavaScript code.

Part III - Simple Machine Learning in BunnaScript

This video shows advanced capabilities of BunnaScript by developing a simple machine learning program end to end entirely in Amharic using BunnaScript. The demo program solves the well-known Iris flowers classification problem using Vector Space Model (VSM) and K-Nearest Neighbors (KNN) algorithms. Both algorithms are written from scratch in Amharic.

Summary

With BunnaScript editor, young students can start learning programming in their native language. With automatic code conversion, the code written in BunnaScript runs on any device that supports JavaScript. BunnaScript simplifies learning programming. The thinking behind BunnaScript is to enable anyone to write programs in their native language.

What is Next

We have come this far with limited resources and we plan to add more programming languages and natural languages going forward. And we plan to release the product to the public. We need your help and support to spread the word and to bring the ability to write computer code to millions of non-English speakers throughout the world. Please contact us for more information.