**Sanskrit **: Let’s make sanskrit a programming language 🕉️💻


The “Aha!” Moment 🤯

So there I was, staring at my screen, buried in yet another JavaScript project. You know the drill: function, console.log, return… same old stuff. And then 💡 BAM! A thought hit me:

“What if we could code in Sanskrit?

Now, before you start laughing 😂, hear me out! Sanskrit isn’t just any language – it’s like the superhero 🦸‍♂️ of languages. Logical, precise, and deeply rooted in mathematics and philosophy. Even NASA thinks Sanskrit could be used in computing! Cool, right? 😎

The idea became even funnier when I stumbled upon this meme. An auntie was saying, “Sanskrit coding language banane wale hai” (“People are making Sanskrit into a coding language”). And I thought, “Why not?” 🤔

Then I remembered our Honourable Prime Minister Narendra Modi’s famous quote:
“Aapda ko avsar mein badalna hai”
(“Turn adversity into opportunity”).

That’s when I decided to create my own programming language where the syntax is entirely in Sanskrit. Yes, only Sanskrit! 🕉️


The Research Adventure 🚀

Before diving into the code, I knew I needed to do my homework 📚. I went on a research spree, devouring every article, blog, and tutorial I could find about creating your own programming language.

Here are some of the gems that guided me on this epic journey:

If you’re ever curious about creating your own language, start here. Trust me, it’s worth it!


The “Hello World” of Sanskrit 🌏

Now, the fun part: actual coding! Instead of boring old function, we now have कार्य (kārya). And console.log? That’s मुद्रण (mudraṇ). Let me show you how it looks:

कार्य नमस्ते() {
    मुद्रण("नमस्ते विश्व!");
}

नमस्ते();

That’s right – we just said “Hello, World!” in Sanskrit 🕉️. Isn’t it cool?


Features So Far ✨

Here’s what the Sanskrit Programming Language can do right now:

  • Write Code in Sanskrit: Say goodbye to if and else, and hello to यदि and अन्यथा.
  • Devanagari Support: Whether you prefer १, २, ३ or 1, 2, 3, we’ve got you covered! 😉
  • Functions: Define and call your functions using Sanskrit syntax.

Check this out:

कार्य योग(क, ख) {
    मुद्रण(क + ख);
}

योग(१०, २०);  // Outputs: ३०
योग(10, 20);  // Also works!

It’s like adding some ancient Indian magic 🪄 to your code!


The Vision 🌟

Why create a programming language in Sanskrit? Well, why not? 😏
Here’s the big dream:

  1. Bridge the gap between ancient wisdom and modern tech. 🌉
  2. Preserve and promote Sanskrit in a fun, geeky way. 🕶️
  3. Make programming accessible to Sanskrit enthusiasts and learners. 📖

What I Learned Along the Way 🧠

Creating a programming language isn’t easy (duh! 😅), but it’s insanely rewarding. I learned how to build a lexer, parser, and compiler – all the nerdy stuff that makes coding magic happen.

One article that really helped me was The Programming Language Pipeline by freeCodeCamp. If you’re even a tiny bit curious about how languages work, go read it. Like, right now. 🔗


For Now, It’s Just for Fun 😄

I built this as a fun project, but who knows? If people love it (that’s you!), I might take it further. If you want to collaborate or just check it out, the project is on GitHub: https://github.com/sh20raj/sanskrit.

Find a bug 🐛? Got a cool idea 💡? Head to the repo and let me know!


A Big Thank You 🙏

To all the tutorials, articles, and creators who helped me along the way:

You guys are awesome. Thanks for inspiring me to create something I never thought I could! 🎉


Join the Movement 🚀

Let’s turn this into something truly epic. If you:

  1. Love Sanskrit 🕉️
  2. Are curious about programming languages 🖥️
  3. Just want to geek out with something cool 🤓

Then join us! Contribute, test it out, and spread the word.

Remember, the journey of a thousand lines of code begins with a single मुद्रण("नमस्ते विश्व!"). 😄


Copyright © 2024 Sanskrit Programming Language. Distributed under an MIT license.