GithubHelp home page GithubHelp logo

samiranghosh04 / crapscript Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 12 KB

CrapScript is a pathetic excuse of an esoteric, interpreted programming language written in TS and Deno for fun.

TypeScript 100.00%

crapscript's Introduction

CrapScript - A Minimalistic Interpreted Esoteric Programming Language

Introduction

Welcome to CrapScript, a distinctive, minimalistic, interpreted esoteric programming language, written in TypeScript and Deno, and designed to provide a unique coding experience. This language embraces unconventional syntax and features while incorporating familiar elements such as let and const declarations, functions, and versatile binary expressions. As of now the language isn't turing complete yet but I am working on it.

Features

Variable Declaration

let

The let keyword allows you to declare mutable variables, enabling dynamic storage for various data types.

[identifier] = [expression] ;

const

Use const to declare constants, ensuring that a variable's value remains unchanged once assigned.

const [identifier] = [expression] ;

Please note that variable declarations absolutely need to end with semicolons, however no semicolons are required for assignment or operations.

Functions

Define modular code blocks with the func keyword, supporting parameterized functions for enhanced code organization and reusability.

fn [functionName]([parameter1], [parameter2], ...) { [functionBody] }

Binary Expressions

Harness the power of binary expressions for arithmetic operations, including addition +, subtraction -, multiplication *, division /, and modulus %.

[result] = [operand1] [operator] [operand2]

Examples

Variable Declaration

let x = 10;
const pi = 3.14;

Variable Assignment

x = x + 1
y = y / x
z = y

Functions

fn add(a, b) {
    let sum = 0;
    sum = a + b
    print(sum)
}

Binary Expressions

let result = add(5, 7) * 2;

Print

let x = 5;
print(x)

Usage

To run a program written in CrapScript, simply modify the test.txt file and save it and then use the following command to run the main.ts file:

deno run -A main.ts

Getting Started

  1. Make sure that you have Deno installed.
  2. Fork and clone the repo.
  3. Navigate to the src folder
  4. Write your CrapScript program by modifying the test.txt file.
  5. Run the main.ts file.

Upcoming Features

The following is a list of planned features that will be implemented in the near future :

  • Objects
  • Loops
  • Function to read user input
  • Time
  • Conditional Logic

crapscript's People

Contributors

samiranghosh04 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.