संस्कृत Programming Language
Write beautiful code in देवनागरी (Devanagari) script with the simplicity of JavaScript.
About Sanskrit Programming Language
Sanskrit is a modern programming language that combines the elegance and precision of the Sanskrit language with the ease of modern programming. It allows you to write code using Devanagari script while leveraging the power and simplicity of JavaScript.
Key Features
- Sanskrit-Based Syntax: Write code using Sanskrit words and grammar
- Devanagari Support: Native support for Devanagari script and numerals
- JavaScript-Based: Easy to install and run with Node.js
- Interpreter: Fast development with immediate feedback
- Cross-Platform: Runs anywhere Node.js is available
Quick Example
// नमस्ते विश्व
कार्य नमस्ते() {
मुद्रण("नमस्ते विश्व!");
}
नमस्ते();
Getting Started
- Install Node.js (v14 or higher)
- Install the Sanskrit language package:
npm install -g sanskrit-lang
- Create your first program:
कार्य योग(क, ख) { मुद्रण(क + ख); } योग(१०, २०); // Outputs: ३०
- Run your program:
sanskrit run program.sns
Current Features
- Function declarations and calls
- String literals and concatenation
- Basic arithmetic operations
- Built-in
मुद्रण
(print) function - Full Devanagari script support
Coming Soon
- Variables and assignments
- Control flow (if/else, loops)
- Arrays and objects
- More built-in functions
- REPL environment
Why Sanskrit?
- Cultural Heritage: Connect with India’s rich mathematical and computational heritage
- Precision: Sanskrit’s precise grammar maps well to programming concepts
- Accessibility: Make programming more approachable for Sanskrit speakers
- Educational: Learn programming concepts through a familiar linguistic framework
Contributing
We welcome contributions from the community! Whether you’re fixing bugs, adding features, or improving documentation, please check out our contributing guide.
Community
Join our growing community of Sanskrit programmers:
- GitHub: https://github.com/sh20raj/sanskrit
- Documentation: https://sh20raj.github.io/sanskrit/docs
License
Sanskrit is open source and available under the MIT License. See LICENSE for more information.