Code Monkey home page Code Monkey logo

shivamxsurya / slirik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrmystery10-del/slirik

0.0 0.0 0.0 4.05 MB

Slirik is a modern programming language designed to offer the best of both worlds: the simplicity and ease of use of a scripting language, as well as the power and performance of a deep language. Slirik has a unique mix of a compiler and interpreter, making it flexible and efficient.

License: Apache License 2.0

Java 67.74% Rust 32.26%

slirik's Introduction

Slirik

Slirik is a modern programming language designed to offer the best of both worlds: the simplicity and ease of use of a scripting language, as well as the power and performance of a deep language. Slirik has a unique mix of a compiler and interpreter, making it flexible and efficient.

IMPORTANT

Slirik is under developement, not all features on that readme are already implemented Read this for more information on current progress https://github.com/MrMystery10-del/Slirik/blob/main/CURRENT_STATE.md

Features

Slirik has a simple and intuitive syntax, making it easy for beginners to learn and use. It is a compiled language, which means that code written in Slirik can be executed faster than interpreted languages like Python. Slirik supports dynamic typing, making it easy to write and debug code. It also supports static typing, allowing for increased code optimization and error detection. Slirik is a strongly typed language, which ensures type safety and helps catch errors early in the development process. It has built-in memory management, which makes it easier to avoid memory leaks and other common programming errors. Getting Started To get started with Slirik, you will need to install the compiler and interpreter. You can find the latest version of the compiler and interpreter on our GitHub page. Once you have installed Slirik, you can start writing code using your favorite text editor. Slirik files have the extension .sk

Examples

Here is an example of x to the power of y function written in Slirik:

function main(args | String[]) {
  int x = 5;
  int y = 3;
  
  println!("The result of {} to the power of {} is: {}!", x, y, pow(x, y));
}

function pow(x, y | int) &int {
  result = x;
  for ..y {
    result *= x;
  }
  return result;
}

You can also use methods inside of your functions, here is the same example but with using methods:

function main(args | String[]) {
  int x = 5;
  int y = 3;
  
  println!("The result of {} to the power of {} is: {}!", x, y, pow());
  
  pow() &int {
    result = x;
    for ..y {
      result *= x;
    }
    return result;
  }
}

Output of both examples

The result of 5 to the power of 3 is: 125!

Structure

Slirik's structure stands out from other languages in several ways. Firstly, its source code is compiled using Java into custom bytecode which is then executed by the Rust VM. Secondly, the bytecode is unique in that it is in text form rather than binary format. This allows developers to optimize the code to its fullest potential, making it an excellent tool for those interested in learning Assembly. The bytecode is designed to be both simple and readable, making it easy to learn and a great starting point for those taking their first steps into Assembly programming.

Contributing

I founded Slirik and have been responsible for its development. However, I've discovered that maintaining an efficient structure and optimal performance on my own can be challenging. Therefore, I would greatly appreciate any contributions from others, whether they are in the form of code for the Java compiler or the Rust VM, or simply additional documentation.

To fully test and debug the program, it's essential to have both languages installed, and it's recommended to use Intellij IDEA with a Rust plugin. Remember to set the working directory to the Slirik directory to facilitate debugging.

When creating a pull request, please provide a descriptive name and explanation of the changes you've made.

License

Slirik is released under the Apache 2.0 License.

slirik's People

Contributors

mrmystery10-del avatar david-k448 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.