A Tamil programming language - Code in your native language!
Project description
Arivu (அறிவு) - Tamil Programming Language
"அறிவே ஆற்றல்" (Knowledge is Power)
A dynamically-typed, interpreted programming language with easy Tamil words. Write code in your native language! Perfect for Tamil-speaking students learning programming.
🎬 Features
- Easy Tamil Keywords: Simple Tamil words anyone can understand
- Movie-Style Syntax: Fun and intuitive like Tamil cinema dialogues
- Dynamic Typing: Variables can hold any type of value
- First-Class Functions: Define and pass functions with ease
- Recursive Functions: Full support for recursion
- Control Flow: Simple if-else (
na_sonna/illa_na_sonna/illana) and loops - Interactive REPL: Test code snippets interactively
- Clean Syntax: Simple, readable, and powerful
🚀 Getting Started
Prerequisites
- Python 3.7 or higher
Installation
Install via pip (recommended):
pip install arivu
Or install from source:
git clone https://github.com/Akash-srm861/-Arivu.git
cd -Arivu
pip install -e .
Running Programs
Run an Arivu file:
arivu examples/vanakkam.rj
Execute code directly:
arivu -c "sollu_da('Vanakkam!');"
Start the interactive REPL:
arivu
📖 Language Guide
Keywords (Easy Tamil!)
| Tamil Keyword | English Meaning | Usage |
|---|---|---|
sollu |
say/tell | Define a function |
thirupi_kudu |
give back | Return value from function |
vachuko |
keep/store | Declare a variable |
aarambam |
start/beginning | Main program entry point |
sollu_da |
say it! | Print/output |
na_sonna |
if I say | If condition |
illa_na_sonna |
or if I say | Else if condition |
illana |
otherwise | Else |
varaikkum |
until | While loop |
ellathukum |
for all | For loop |
aama |
yes | Boolean true |
illa |
no | Boolean false |
onnum_illa |
nothing | Null value |
Operators
Arithmetic: + - * / %
Comparison: == != > < >= <=
Logical: && || !
Data Types
- Numbers:
42,3.14 - Strings:
"Vanakkam da!" - Booleans:
aama(yes/true),illa(no/false) - Null:
onnum_illa(nothing)
Comments
// Single line comment
/* Multi-line
comment */
💡 Examples
Vanakkam (Hello World)
aarambam {
sollu_da("Vanakkam da mapla!");
sollu_da("Nalla irukiya?");
}
Variables and Arithmetic
aarambam {
vachuko x = 10;
vachuko y = 20;
vachuko sum = x + y;
sollu_da("Sum is: ");
sollu_da(sum);
}
Functions
sollu kuttu(a, b) {
thirupi_kudu a + b;
}
sollu vanakkam(name) {
sollu_da("Vanakkam, ");
sollu_da(name);
sollu_da("!");
}
aarambam {
vachuko result = kuttu(5, 10);
sollu_da(result);
vanakkam("Rajini");
}
Conditionals
aarambam {
vachuko vayasu = 25;
na_sonna (vayasu >= 18) {
sollu_da("You are an adult!");
} illana {
sollu_da("You are a minor!");
}
}
With else-if:
aarambam {
vachuko mark = 85;
na_sonna (mark >= 90) {
sollu_da("Grade: A");
} illa_na_sonna (mark >= 80) {
sollu_da("Grade: B");
} illa_na_sonna (mark >= 70) {
sollu_da("Grade: C");
} illana {
sollu_da("Grade: F");
}
}
Loops
While Loop (varaikkum = until):
aarambam {
vachuko i = 1;
varaikkum (i <= 5) {
sollu_da(i);
vachuko i = i + 1;
}
}
For Loop (ellathukum = for all):
aarambam {
ellathukum (i = 1; i <= 5; i = i + 1) {
sollu_da(i);
}
}
Factorial (Recursive)
sollu factorial(n) {
na_sonna (n <= 1) {
thirupi_kudu 1;
}
thirupi_kudu n * factorial(n - 1);
}
aarambam {
vachuko result = factorial(5);
sollu_da("Factorial of 5 is: ");
sollu_da(result);
}
FizzBuzz
aarambam {
ellathukum (i = 1; i <= 30; i = i + 1) {
vachuko div3 = i % 3;
vachuko div5 = i % 5;
na_sonna (div3 == 0 && div5 == 0) {
sollu_da("FizzBuzz");
} illa_na_sonna (div3 == 0) {
sollu_da("Fizz");
} illa_na_sonna (div5 == 0) {
sollu_da("Buzz");
} illana {
sollu_da(i);
}
}
}
📂 Project Structure
vijay++/
├── rajini.py # Main interpreter CLI
├── lexer.py # Lexical analyzer (tokenizer)
├── parser.py # Syntax analyzer (AST builder)
├── interpreter.py # Runtime interpreter
├── LANGUAGE_SPEC.md # Complete language specification
├── README.md # This file
└── examples/ # Sample programs
├── vanakkam.rj # Hello World in Tamil
├── factorial_tamil.rj # Factorial with Tamil syntax
├── marks_tamil.rj # Grading system
├── loops_tamil.rj # Loop examples
├── calculator_tamil.rj # Calculator
├── hello_world.rj # (Old English syntax)
├── factorial.rj
├── fibonacci.rj
├── loops.rj
├── functions.rj
├── fizzbuzz.rj
└── primes.rj
🎯 Built-in Functions
len(value)- Get length of stringstr(value)- Convert to stringint(value)- Convert to integerfloat(value)- Convert to floattype(value)- Get type name
🎮 Interactive REPL
Start the REPL by running python rajini.py without arguments:
$ python rajini.py
╔════════════════════════════════════════╗
║ rajini++ Interactive Shell ║
║ 'Namma style-la code potturlam!' ║
║ Type 'exit' to quit ║
╚════════════════════════════════════════╝
rajini++ > vachuko x = 42;
rajini++ > sollu_da(x);
42
rajini++ > vachuko y = x * 2;
rajini++ > sollu_da(y);
84
rajini++ > exit
Vanakkam! (Goodbye!)
🎨 Philosophy
rajini++ embraces these principles:
- Easy Tamil words - Everyone should understand the code
- Movie-style fun - Programming should be enjoyable like watching a movie
- Simple but powerful - Easy to learn, powerful to use
- Namma style - Code in our own Tamil style!
🔧 Implementation Details
rajini++ is implemented in pure Python with three main components:
- Lexer (
lexer.py) - Tokenizes source code - Parser (
parser.py) - Builds Abstract Syntax Tree (AST) - Interpreter (
interpreter.py) - Executes the AST
The language supports:
- Lexical scoping with closures
- Dynamic typing
- Recursive function calls
- Expression evaluation with proper operator precedence
📝 File Extension
rajini++ programs use the .rj file extension (short for "Rajini").
🎭 Examples Gallery
Check out the examples/ directory for sample programs:
Tamil Syntax (Easy to understand!):
- vanakkam.rj - Hello World in Tamil
- factorial_tamil.rj - Factorial with Tamil keywords
- marks_tamil.rj - Grading system in Tamil
- loops_tamil.rj - Loop demonstrations in Tamil
- calculator_tamil.rj - Calculator with Tamil function names
Original Examples (English keywords):
- hello_world.rj - Classic Hello World
- factorial.rj - Recursive factorial
- fibonacci.rj - Fibonacci sequence
- loops.rj - Loop examples
- functions.rj - Advanced functions
- fizzbuzz.rj - FizzBuzz challenge
- primes.rj - Prime number finder
Run any example:
python rajini.py examples/vanakkam.rj
python rajini.py examples/marks_tamil.rj
🚧 Future Enhancements
Potential features for future versions:
- Arrays/Lists support
- Dictionary/Map data structures
- File I/O operations
- Import/Module system
- Exception handling
- More built-in functions
- Bytecode compilation for better performance
🤝 Contributing
Contributions are welcome! Feel free to:
- Add new features
- Improve error messages
- Create more example programs
- Optimize the interpreter
- Fix bugs
📜 License
This project is open source. Use it with style!
🎬 Credits
Made for Tamil speakers who want to code in their own style! Programming should be fun and accessible to everyone.
"Namma style-la code potturlam da!"
(Let's code in our style!)
Made with ❤️ for Tamil Cinema Fans!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arivu-1.0.0.tar.gz.
File metadata
- Download URL: arivu-1.0.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f65f37566591cbbb3a49e7050baa3096336e706fb9490d221f59e5446a698a12
|
|
| MD5 |
dd5beff7bdd36f9ab9f9018cd354d64e
|
|
| BLAKE2b-256 |
df8afc9f4134a5d4b5748bfa775935b9217116c2780ce60cf062e83bf1dc4ffb
|
File details
Details for the file arivu-1.0.0-py3-none-any.whl.
File metadata
- Download URL: arivu-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bef3fa54811d4a3280b37409447f5c3f9734a48ad558197eee84a4b287acf42d
|
|
| MD5 |
599e21c7adbb908d05d47053d375a6fa
|
|
| BLAKE2b-256 |
878455bad377efe1eb2d94c7c6c87b15b9be3b4880c8a813fbd55742ca0f3c9d
|