Technology

Rajini++: a programming language where "Hello, World" is written in Rajinikanth dialogue

A Python-based language by programmer Aditya Sankar turns the superstar's punchlines into keywords. A joke, but a useful one for anyone learning what a language really is.

Rajini++: a programming language where "Hello, World" is written in Rajinikanth dialogue

Rajinikanth's fans have built temples, cut-outs six storeys tall and now a programming language. Rajini++, pronounced "rajini plus plus" and installed as rajinipp, was written by programmer Aditya Sankar and turns the Tamil superstar's most quoted lines into the keywords of a working language. It went viral among Indian developers in late May 2022 and, inevitably, in Bangladesh, where his films play on cable every week.

What the code looks like

Every program opens with LAKSHMI START and closes with MAGIZHCHI, the word ("happiness") with which Rajini ends his speeches. DOT prints, so the traditional first program is:

LAKSHMI START
DOT "Hello, World!";
MAGIZHCHI

Conditions and loops are dialogues too. An if block begins with EN VAZHI THANI VAZHI ("my way is a unique way"), else with ENAKKU INNURU PER IRUKKU ("I have another name"), and the block ends with KATHAM KATHAM. The language covers variables and data types, arithmetic and logical operators, if/else, for and while loops, and functions with arguments and return values, which is enough to write real, if silly, programs.

How it runs

Rajini++ is not a compiler from scratch. It is a translator written in Python: you save a file with the .rpp extension, and the rajinipp package, which anyone can install with pip install rajinipp on Python 3.8 or later, converts it to Python and runs it. That makes it a good teaching example. A programming language is, at bottom, a set of words with agreed meanings and rules for combining them; swap the words and the machine does not care. Sankar's own warning stands: do not write enterprise software in it. Fans are already building an interactive shell that accepts commands as dialogues.

The serious side of a joke

"Esoteric" languages have a long history in computing, from Brainfuck to LOLCODE to Bhailang, a Hindi one that went viral in India in February. They are jokes that teach: writing one forces you to understand tokenising, parsing and evaluation, the same machinery inside Python or C. Bangladesh has had its own attempts, including Potaka, a language with Bangla keywords built so that school students could code in their own script. If Rajini++ gets one more teenager in Chattogram to ask how DOT becomes print, it has done more than most tutorials.

Source: Prothom Alo

Written by

Tech BD

Editorial team of Tech BD.