Tharun++(Tharunpp) is a programming language based on the famous comedy dialogues of Tamil cinema industry.
Project description
Tharunpp 🎬
A programming language powered by Tamil cinema comedy dialogues.
Installation
pip install tharunpp
Requires Python >= 3.8.1
Usage
tharunpp run-file program.tpp # run a program
tharunpp shell # interactive REPL
tharunpp tokenize program.tpp # show tokens
tharunpp version # show version
Program Structure
Every program must start with VANAKKAM DA MAPLA and end with NANDRI VANNAKAM.
VANAKKAM DA MAPLA
SOLLU "Vanakkam da mapla!" ;
NANDRI VANNAKAM
Keyword Reference
Program
| Purpose | Keyword |
|---|---|
| Program start | VANAKKAM DA MAPLA |
| Program end | NANDRI VANNAKAM |
| Comment | COMMENT PANDRAN |
Variables & Values
| Purpose | Keyword | Example |
|---|---|---|
| Declare variable | VAA |
VAA x = 10 ; |
| True | SARI |
VAA flag = SARI ; |
| False | THAPPU |
VAA flag = THAPPU ; |
| Null | ONNUMEY ILLA |
VAA x = ONNUMEY ILLA ; |
Output & Input
| Purpose | Keyword | Example |
|---|---|---|
SOLLU |
SOLLU "dei!" ; |
|
| Debug print | KALAAI |
KALAAI x ; |
| Warning print | IRUNGH BHAII |
IRUNGH BHAII "careful da!" ; |
Operators
| Purpose | Symbol |
|---|---|
| Arithmetic | + - * / % |
| Comparison | == != > < >= <= |
| AND | MATUM |
| OR | ILLA |
| NOT | VENDAM |
Control Flow
| Purpose | Keyword | Example |
|---|---|---|
| If | ADHAVUDHU |
ADHAVUDHU x > 5 : |
| Else if | ILLA ADHAVUDHU |
ILLA ADHAVUDHU x == 5 : |
| Else | ILLAATI |
ILLAATI : |
| End block | DA |
DA |
| While loop | TICKTOCK TICKTOCK |
TICKTOCK TICKTOCK x < 10 : |
| For loop | FIRST_LA |
FIRST_LA i IRUNDHU 0 VARAI 5 : |
| Break | EZHUNDHIRI |
EZHUNDHIRI ; |
| Continue | ADUTHADUTHU |
ADUTHADUTHU ; |
Functions
| Purpose | Keyword | Example |
|---|---|---|
| Define function | ENDRA SHANMUGHAM |
ENDRA SHANMUGHAM add(a, b) : |
| End function | VELI JOWW |
VELI JOWW |
| Call function | VAA MA MINNAL |
VAA MA MINNAL add(1, 2) ; |
| Return | INDHAA LEY PATHUKO |
INDHAA LEY PATHUKO x + y ; |
Error Handling
| Purpose | Keyword | Example |
|---|---|---|
| Try | PAAKALAM |
PAAKALAM : |
| Catch | PUDRA IVANA |
PUDRA IVANA err : |
| Throw | AIYAYO |
AIYAYO "something broke!" ; |
| Assert | NIL GAVANI SEL |
NIL GAVANI SEL x > 0 ; |
Lists
| Purpose | Keyword | Example |
|---|---|---|
| Create list | PATTI POTTU |
VAA nums = PATTI POTTU [1, 2, 3] ; |
| Append | ULLAYE POD |
ULLAYE POD nums 4 ; |
| Get by index | EDUTHU KO |
VAA x = EDUTHU KO nums [0] ; |
| Length | YEVLO IRUKU |
SOLLU YEVLO IRUKU nums ; |
Other
| Purpose | Keyword | Example |
|---|---|---|
| Import module | MASS |
MASS "math" ; |
| Pass / no-op | THALA_OK |
THALA_OK ; |
Examples
Hello World
VANAKKAM DA MAPLA
SOLLU "Vanakkam da mapla!" ;
NANDRI VANNAKAM
Variables and Arithmetic
VANAKKAM DA MAPLA
VAA x = 10 ;
VAA y = 3 ;
SOLLU x + y ;
SOLLU x * y ;
SOLLU x - y ;
NANDRI VANNAKAM
If / Else if / Else
VANAKKAM DA MAPLA
VAA score = 85 ;
ADHAVUDHU score >= 90 :
SOLLU "Grade A da!" ;
ILLA ADHAVUDHU score >= 80 :
SOLLU "Grade B da!" ;
ILLA ADHAVUDHU score >= 70 :
SOLLU "Grade C da!" ;
ILLAATI :
SOLLU "Fail aagitanga da..." ;
DA
NANDRI VANNAKAM
While Loop
VANAKKAM DA MAPLA
VAA i = 0 ;
TICKTOCK TICKTOCK i < 5 :
SOLLU i ;
VAA i = i + 1 ;
DA
NANDRI VANNAKAM
For Loop
VANAKKAM DA MAPLA
FIRST_LA i IRUNDHU 0 VARAI 5 :
SOLLU i ;
DA
NANDRI VANNAKAM
Functions
VANAKKAM DA MAPLA
ENDRA SHANMUGHAM add(a, b) :
INDHAA LEY PATHUKO a + b ;
VELI JOWW
VAA result = VAA MA MINNAL add(10, 20) ;
SOLLU result ;
NANDRI VANNAKAM
Error Handling
VANAKKAM DA MAPLA
PAAKALAM :
AIYAYO "something went wrong da!" ;
PUDRA IVANA err :
SOLLU err ;
DA
NANDRI VANNAKAM
Lists
VANAKKAM DA MAPLA
VAA nums = PATTI POTTU [1, 2, 3] ;
ULLAYE POD nums 4 ;
SOLLU YEVLO IRUKU nums ;
VAA first = EDUTHU KO nums [0] ;
SOLLU first ;
NANDRI VANNAKAM
Error Messages
Tharunpp gives Tamil-flavoured error messages:
| Error | Message |
|---|---|
| Type error | Aiyayo! list venum da, int koduthutta |
| Undefined variable | Dei! 'x' yaaruda avan? Declare pannada |
| Division by zero | SUPERSTAR kooda zero-a divide panna maatan bro |
| Syntax error | BHAI enna da idhu? Syntax puriyalai |
License
MIT — see LICENSE for details.
Made with ❤️ in Tamil Nadu 🎬
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 tharunpp-1.0.2.tar.gz.
File metadata
- Download URL: tharunpp-1.0.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a83874d85d2ba589b9c0fa8c553eee400e9fb27741f6f11b7c22efac6f17c39c
|
|
| MD5 |
65981667809dcec65f2f0ecb49c40a53
|
|
| BLAKE2b-256 |
3b5cdb22b79ced06f2917a2d44b524605e98296664a89fd958491347e98f29c4
|
Provenance
The following attestation bundles were made for tharunpp-1.0.2.tar.gz:
Publisher:
release.yml on Tharun007-TK/Tharunpp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tharunpp-1.0.2.tar.gz -
Subject digest:
a83874d85d2ba589b9c0fa8c553eee400e9fb27741f6f11b7c22efac6f17c39c - Sigstore transparency entry: 1193867988
- Sigstore integration time:
-
Permalink:
Tharun007-TK/Tharunpp@c4e2964a24bdf36530ebd0bbc55f297583866dc1 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/Tharun007-TK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c4e2964a24bdf36530ebd0bbc55f297583866dc1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tharunpp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: tharunpp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f40b96a36b305417d7737a91a2e892b04d1ed52015d3b4f23d6f707e543fd458
|
|
| MD5 |
ce31743b9eb93d8cb4f1690c1303649f
|
|
| BLAKE2b-256 |
6278b3ac6a796b433db520a4f47bd4171a2b746ff5c2d97b941054e5878173f7
|
Provenance
The following attestation bundles were made for tharunpp-1.0.2-py3-none-any.whl:
Publisher:
release.yml on Tharun007-TK/Tharunpp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tharunpp-1.0.2-py3-none-any.whl -
Subject digest:
f40b96a36b305417d7737a91a2e892b04d1ed52015d3b4f23d6f707e543fd458 - Sigstore transparency entry: 1193868019
- Sigstore integration time:
-
Permalink:
Tharun007-TK/Tharunpp@c4e2964a24bdf36530ebd0bbc55f297583866dc1 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/Tharun007-TK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c4e2964a24bdf36530ebd0bbc55f297583866dc1 -
Trigger Event:
push
-
Statement type: