npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hindilang

v1.0.4

Published

A Hindi-inspired scripting language

Downloads

14

Readme

hindilang: A Hindi-Inspired Programming Language 🚀

🔗 Full Blog: Building my own Programming Language

hindilang is a Hindi-inspired scripting language that transpiles to JavaScript, built as an academic exercise to understand compilers and programming languages.

Features 🌟

✅ Print Statements – Display output using CHAPO. ✅ Variables & Assignment – Declare variables with MANLO. ✅ User Input – Take input using PUCHO. ✅ Arithmetic Expressions – Perform calculations with +, -, *, /. ✅ Conditional Statements – Use AGAR (if) with {} blocks. ✅ Loops – Use JABTAK (while) for iterations. ✅ Comments – Use # for comments.

A Quick Taste of hindilang

Here are some examples

  1. Variables and Printing
MANLO x = 5;
CHAPO x;

// Output
// 5
  1. Taking User Input
PUCHO y;
CHAPO y;

// (If user enters 10)
// Output is 10
  1. Conditional Statements (if)
MANLO x = 5;

AGAR (x > 3) {
    CHAPO "X bada hai!";
}

// Output
// X bada hai
  1. Loops (while)
MANLO x = 5;

JABTAK (x < 10) {
    CHAPO x;
    MANLO x = x + 1;
}

// Output
// 5
// 6
// 7
// 8
// 9
// 10
  1. Comments
# Yeh ek comment hai

//(Comments are ignored during execution)

How to Install & Run

  1. Install Globally Hindilang must be installed globally to work as a CLI tool:
npm install -g hindilang
  1. Run your Script
hindic myscript.hindi

Note: Ensure that your npm global bin directory is in your system's PATH if hindic is not recognized.


Troubleshooting: "hindic not recognized" Problem

If after installing you see an error like:

'hindic' is not recognized as an internal or external command

follow these steps:

Check your global npm bin directory: Run the following command to find where npm installs global executables:

npm prefix -g

Typically, on Windows, this will be something like:

C:\Users\<YourUsername>\AppData\Roaming\npm

Add the directory to your PATH (if it's missing):

  • Temporary fix (only for the current terminal session):
    $env:Path += ";C:\Users\<YourUsername>\AppData\Roaming\npm"
  • Permanent fix (persists across restarts): In PowerShell, run:
    [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Users\<YourUsername>\AppData\Roaming\npm", "User")

Restart your terminal after making changes !


How It Works 🔧

Code Flow 🚀

📌 package.json – Defines the project and dependencies. 📌 bin/hindic – Reads .hindi files, compiles, and executes them. 📌 Lexer – Converts source code into tokens. 📌 Emitter – Stores and writes transpiled JavaScript. 📌 Parser – Matches tokens to grammar and generates JavaScript output.

Parser Characteristics

✔️ Top-Down Parsing – Starts from the highest-level structure (program) and drills down into finer details like expressions and numbers. ✔️ Recursive Descent – The parser calls itself recursively to process different statements and expressions. ✔️ LL(1) Parsing – Uses one token lookahead to determine the next action without backtracking.

Beyond Transpiling

🛣️ Use LLVM to generate optimized machine code. 🛣️ Emit x86 assembly and compile using an assembler (nasm). 🛣️ Convert code to WebAssembly (WASM) for execution in browsers.


Other Info 🤝

  • Inspired by TeenyTinyCompiler
  • Feel free to open issues or submit PRs.
  • Future plans: A Playground for it to see it run in the browser.

🚀 Made with ❤️ by Arjit Sharma