Skip to content

KaushalBarhate/Ecoscript

Repository files navigation

EcoScript Programming Language

EcoScript (.ecs) is a pioneering programming language designed with sustainability in mind. As AI and other computational technologies continue to grow, so does the demand for energy, particularly from GPUs. EcoScript is a step towards a future where code is not only functional but also energy-efficient. It's an initiative that aligns with the global goals of sustainable growth.

Vision

The EcoScript project recognizes the impending challenges of energy consumption in the rapidly advancing field of artificial intelligence and computational technologies. This language serves as a foundational step towards understanding and optimizing the energy efficiency of code, contributing to a more sustainable future.

Features

  • Arithmetic Operations: Supports basic arithmetic operations like addition, subtraction, multiplication, and division.
  • Control Flow: Includes conditional statements like if, else, and loops like while.
  • Energy Consumption: Calculates the energy consumed during code execution.
  • Carbon Footprint: Estimates the carbon footprint associated with running the code.

Syntax

Variables Declare and assign variables using the := operator:

x := 10;
y := 20;

Arithmetic

Perform arithmetic operations:

z := x + y;

Print Function

Print values to the console:

PRINT(z);

Control Flow (work in progress)

Use if, else, and while statements:

if (z > 10) {
    PRINT(z);
} else {
    PRINT(x);
}

Local Installation

  • Clone the repository.
  • Install the required dependencies.
  • Run the interpreter with your EcoScript file.
python run_ecoscript.py example.ecs

Releases

No releases published

Packages

No packages published

Languages