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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cuttingchai

v1.1.2

Published

A custom programming language compiler top of the javascript. known as cuttingchai☕🫖

Downloads

15

Readme

CuttingChai: A Simple, Desi-Flavored Custom Programming Language.

CuttingChai ☕🫖 is a simple programming language designed with an Indian flavor. It supports basic data types, variables, conditional logic, and arrays. It lets you write .chai files and execute them using an easy-to-use CLI interface.🍵

Prerequisites

Before installing CuttingChai, ensure you have the following setup on your system:

  • Node.js: Ensure that Node.js is installed. You can download it from here.

Installation

To install CuttingChai, use npm (Node Package Manager). Run the following command in your terminal:

npm install -g cuttingchai

This will install the cuttingchai compiler 🫖 globally on your system, making the chai command available anywhere in your terminal.

To Increase Productivity Download vs Code Extension

vscodeExtension

VS Code Extension


VsCodeExtension Source Code

--------------------------------------------------------------------------------------

Usage

After installing, you can create .chai files, which are cuttingchai scripts, and run them using the CLI.

Steps: Create a file with the extension .chai. For example, example.chai. Write your cuttingchai code in this file. (See syntax below) Run the following command in your terminal:

chai example.chai

The cuttingchai CLI will interpret the code and output the results in the terminal.

--------------------------------------------------------------------------------------

CuttingChai Features

Supported Data Types

CuttingChai supports the following data types:

  1. number: Used to store integer values.
  2. bool: Boolean values representing true or false.
  3. chaistring: String literals enclosed in double quotes.
  4. GOD: A constant value (similar to const in JavaScript).
  5. array: An array to store multiple values of the same type.

--------------------------------------------------------------------------------------

Data Types Syntax and Examples

  1. number

Range: Integer values (positive or negative).

Syntax: number <variableName> = <value>

Example:

number age = 25
chaiprint age

Output:

25

--------------------------------------------------------------------------------------

  1. bool

Values: true or false.

Syntax: bool <variableName> = <true|false>

Example:

bool isStudent = true
chaiprint isStudent

Output:

true

--------------------------------------------------------------------------------------

  1. chaistring

Description: String values enclosed in double quotes.

Syntax: chaistring <variableName> = "<value>"

Example:

chaistring name = "Kashyap"
chaiprint name

Output:

Kashyap

--------------------------------------------------------------------------------------

  1. GOD

Description: Used to define constants.

Syntax: GOD <constantName> = <value>

Example:

GOD pi = 314159
chaiprint pi

Output:

314159

--------------------------------------------------------------------------------------

  1. array

Description: Arrays to store multiple values of the same type.

Syntax: array <dataType> <arrayName> = [<value1>, <value2>, ...]

Example:

array number masala = [1, 2, 3, 4, 5]
chaiprint masala
array chaistring spices = ["pepper", "salt", "cumin"]
chaiprint spices

Output:

[1, 2, 3, 4, 5]
["pepper", "salt", "cumin"]

--------------------------------------------------------------------------------------

Conditional Statements: sahichai and galatchai

CuttingChai provides a simple if-else logic using sahichai (if) and galatchai (else).

Syntax:

sahichai <condition>
      // code to execute if condition is true
galatchai
  // code to execute if condition is false

Example:

number x = 10
sahichai x < 15
  chaiprint "x is less than 15"
galatchai
  chaiprint "x is greater than or equal to 15"

output:

x is less than 15

--------------------------------------------------------------------------------------

Example Usage

Here’s a sample .chai file demonstrating variable declarations, printing, and conditionals:

example.chai:

number x = 10
bool isTrue = true
GOD pi = 314159
chaistring name = "Kashyap"

chaiprint name
chaiprint x

array number masala = [1, 2, 3, 4, 5]
array chaistring spices = ["pepper", "salt", "cumin"]

chaiprint masala
chaiprint spices

sahichai 20 < 29
  chaiprint "20 is smaller than 29"
galatchai
  chaiprint "29 is bigger than 20"

To run the code:

1. Create the .chai file:

touch example.chai

2.Write the code inside example.chai.

3.Run it:

chai example.chai

Enjoy coding with CuttingChai! 🍵

For Devloper

--- open to accept any pull request

Refferance Link --- Resources and Articles https://www.freecodecamp.org/news/the-programming-language-pipeline-91d3f449c919/ https://hackernoon.com/building-your-own-programming-language-from-scratch