TaiScript is a satirical, programming language insiperd by day-to-day life of a citizen of a country that mirrors real-life inefficiencies, taxation burdens, corruptions and bribery. From mandatory bribes for program execution to random power cuts halting loops, TaiScript offers an unparalleled programming experience rooted in dark humor.
- Mandatory Bribes: Execute code only after
ghoos lo. No bribes, no progress! (Well exceptions are always there :)) - Infrastructure Failures: Use
bijli chali gayito break loops (power cuts in action!). - Structured Programming: Define and use structures with
dhacha bano. - Privilege System (
parichay): Your role affects how much bribe is required:Janta: Maximum bribes, there is some delay in viewing the output of the compilation.Student: 50% discount on bribes, there is some delay in viewing the output of the compilation..Chacha Vidhayak Hai: No bribe needed, instant compilationBabu Saheb: No bribe needed, but equivalent black money will be credited.Neta Ji: No bribe needed, but output is printed only after Neta Ji's praise - "Ye sab Neta Ji ke ashirwad se hua hai!"
- Human-Readable Syntax: Declare variables with
likho, output results withghoshna, and more. Like natural language—write programs that even babus understand!
yojna shuru "TaxCompute"
parichay Janta # Ordinary citizen, heavy bribes required
ghoos lo 1000 # Basic chai-paani for program execution
# Variable Declaration
likho salary 500000
likho tax_rate 30
# Tax Calculation
ghoos lo 3000 # Bribe required for tax calculation
likho tax salary me guna karo (tax_rate ka bhag karo 100)
likho net_salary salary se ghatao tax
# Output
ghoos lo 500 # Printing requires chai-paani
ghoshna "Final salary after tax is: " me jodo net_salary
yojna band
git clone https://github.com/kamal-dev/taiscript.git
cd taiscriptpip install -r requirements.txtchmod +x ./scripts/run_taiscript.py
./scripts/run_taiscript.py examples/basic_syntax.tai
TaiScript/
│── src/ # Source code
│ │── utils # Utility code
│ │ │── token_utils.py # Utility to help the parser
| │ │── helper.py # General helper functions
| │ │── logger.py # Logs execution details
| │ │── time_utils.py # Handles time-related functions (corruption inflation)
| │
│ │── __init__.py # Marks this as a package
│ │── main.py # Entry point of TaiScript compiler/interpreter
│ │── lexer.py # Tokenizer to break code into tokens
│ │── parser.py # Parses tokens into Abstract Syntax Tree
│ │── interpreter.py # Executes the parsed code (Interpreter)
│ │── compiler.py # (Future) Convert TaiScript code into bytecode or machine code
│ │── evaluator.py # Handles expressions & operations (arithmetic, conditions)
│ │── environment.py # Stores variables & their values
│ │── error_handler.py # Handles syntax/runtime errors in TaiScript
│ │── stdlib.py # Built-in functions like `ghoshna`, `file kholo`
│ │── config.py # Configuration values like base corruption amount
│
│── tests/ # Unit tests
│ │── test_lexer.py # Tests for lexer
│ │── test_parser.py # Tests for parser
│ │── test_interpreter.py # Tests for interpreter
│
│── examples/ # Example TaiScript programs
| |── basic_syntax.py # Example code demonstrating basic syntax of TaiScript
| |── basic_syntax.py # Example code to print the pattern using nested loop.
│
│── docs/ # Documentation
│ │── DOCUMENTATION.md # Documentation for TaiScript
│ │── ROADMAP.md # RoadMap for this project
│
│── scripts/ # Utility scripts
│ │── run_taiscript.sh # Shell script to run TaiScript
│
│── setup.py # Setup script for packaging TaiScript as a module
|── requirements.txt # Requirement libraries for the project to run
│── README.md # Project Overview
│── .gitignore # Files to ignore in Git
│── LICENSE # License for open-source usage
- Tired of clean, modern programming? Welcome to the chaos.
- Need a fun, satirical way to teach programming concepts? TaiScript is your answer.
- Want to understand the frustration of Governance? Just try debugging a TaiScript program.
We welcome contributions! Feel free to:
- Submit feature requests: Have an idea for a hilarious new feature? Raise an issue!
- Fix bugs: Found a bug? Fork the repo, fix it, and open a pull request.
- Add examples: Help expand our collection of satirical TaiScript programs.
This project is licensed under the MIT License. See the LICENSE file for details.
If you like the project, don’t forget to ⭐ star this repository on GitHub!