rajini++: The Superstar Programming Language

Aadhithya Sankar
Towards Data Science
4 min readMay 17, 2022

--

Introducing rajini++, the superstar programming language! (Source)

Introducing rajini++, an esoteric programming language based on the dialogues of superstar Rajinikanth. The syntax and keywords used in rajini++ are based on the dialogues of Superstar Rajinikanth.

The hello world program in rajini++

Who is Rajinikanth?

Before we start, you might wonder who Superstar Rajinikanth is. Well, for starters, he is one of India’s biggest and most popular actors and has been in the cinema industry for over 45 years! To know more about the legend follow the links below:

Origins of rajini++

Well, the origins of rajini++ goes back some 6 years when I first came across this esolang called ArnoldC. Right from that moment I had wanted to create such an esolang for the superstar. 6 years and a lot of learnings later, here we are, finally with a usable version of the rajini++ language.

Get rajini++

The rajinipp package interprets and executes rajini++ programs. It is completely written in python and can be easily installed using pip with the following command:

  • pip install rajinipp

Note: The rajinipp interpreter requires python ≥ 3.8. You can get python here. pip is also required to install the rajinipp package. You can get pip here.

  • Test rajinipp installation: rajinipp version

The rajini++ Language

rajini++ is based on the most iconic dialogues of Rajinikanth. The syntax and keywords used in rajini++ are based on the dialogues of Superstar Rajinikanth.

rajini++ is fairly feature rich and supports the following features:

  • Math Ops (SUM, SUB, MUL, DIV, MOD)
  • Unary Ops (SUM, SUB)
  • Printing
  • Variable declaration
  • Variable access
  • Variable manipulation and assignment
  • Datatypes(Bool, String, Number)
  • Logical ops (≥, >, ≤, <, ==, !=)
  • If statement
  • If-Else statement
  • For loop
  • While loop
  • Functions
  • Functions with return

Example Programs

  1. If-Else Program
Example 1: If-Else program

Output:

Example: If-Else Statement
x ( 5.0 ) is less than 10!

2. FizzBuzz program

Example 2: FizzBuzz programm

Output:

1.0
2.0
Fizz
4.0
Buzz
Fizz
7.0
8.0
Fizz
Buzz
11.0
Fizz
13.0
14.0
FizzBuzz

3. Function with Return

Example 3: Function with return statements.

Output:

Hi from main!
Hello from myfunc_one!
returning ix = 100.0 to main
Value returned from myfunc_one: 100.0

Running rajini++ programs

The rajini++ programs are stored in .rpp files. To run a rajini++ program one simply needs to run the following command:

rajinipp run path/to/my_program.rpp

Note: be mindful of the fact that paths use backward slashes in windows!

The rajinipp Interactive Shell

Apart from being able to run rajini++ programs, the rajinipp python package also provides an interactive shell(experimental) to try out rajini++ commands. One can enter the rajinipp shell using the following command:

rajinipp shell

The rajinipp shell.

Exit shell using ctrl+D .

Note: The rajinipp shell at its current stage only supports a limited subset of the features of the rajini++ language. Control Statements(Loops, if-else) and functions are not supported.

Embedding rajini++ code in python scripts

Because the rajinipp interpreter is written completely in python, it is possible to run rajini++ code inside python scripts (experimental)!

Example 4: running rajini++ code in python scripts!

Output:

Hello, World from python!
Hello world from rajini++!
Executing 5+5 in rajini++
5 + 5 = 10.0

Note: The rajinipp.runner.RppRunner.eval() method at its current stage only supports a limited subset of the features of the rajini++ language. Control Statements(Loops, if-else) and functions are not supported.

Learn more about rajini++

  • Learn the rajini++ Language: The rajini++ language documentation with syntax and examples can be found at the rajiniPP Wiki.
  • Example programs can be found here: Example Programs.
  • The rajini++ Language Spec: The rajini++ commands and its equivalent in python3 can be found here. The language spec is not yet complete and is a work in progress.
  • The rajinipp Interpreter Documentation: The documentation for the rajinipp interpreter can be found here.

Note: As new features are continuously added to the rajinipp repository, the language syntax and documentation are subject to change. Please refer to the official wiki to stay updated on the latest changes.

Audit the code and Contribute to rajini++

If the project has caught your interest and if you want to audit or contribute to the project head to the github repo:

rajinipp on PyPI

rajinipp is on PyPI and can be found here:

Stay tuned for the next post where I will be writing about how you can fork the rajiniPP repo and create your own esolang in a matter of few minutes!

Some Iconic Rajinikanth Dialogues

Some iconic rajinikanth dialogues!

Stay Rajinified! Katham Katham!

--

--

MSc. Informatics @ TU Munich. Specialised in Deep Learning for CV and Medical imaging.