Giter VIP home page Giter VIP logo

peregrine-1's Introduction


A Blazing-Fast Language for the Blazing-Fast world.




The Peregrine Programming Language

Peregrine is a Compiled, Systems Programming Language, currently under development.

Purpose and intent

Why am I creating this language?

I am creating it to have the simplicity of Python with the efficiency of C.

Goals

  • Ease of use
  • Fast
  • Highly modular
  • Occupies less memory
  • Compiled

How does it work?

You can consider it to be a dialect of python which compiles to clean C++. It will have no garbage collector because it is a system programming language.

Building/compiling Peregrine

Requirements to build from source

Compilation instructions

1) Clone the rewrite branch of https://github.com/peregrine-lang/Peregrine.git

git clone https://github.com/peregrine-lang/Peregrine.git

2) Cd into the directory

cd Peregrine

3) Build it

meson builddir
cd builddir
ninja

This will create the binary of the compiler named ./peregrine.elf in the builddir folder

C++ backend To compile it using the c++ backing just run ./peregrine.elf compile path_to_file.pe .It will create the executable named ./path_to_file. Run it to see the result. Check the can_comp.pe file in the root directory to know what you can do with the c++ backend at this point

JS Backend To use the javascript backend use the following command ./peregrine.elf compile path_to_file.js.pe -js. It will create the javascript file named path_to_file.js. Run the generated javascript using node path_to_file.js. Check the can_comp.js.pe file in the root directory to know what you can do with the js backend at this point

Progress

Currently we are working on the codegen and some Peregrine programs are working

Example

Here is a small example for you to understand:

def fib(n:int) -> int :
    if n <= 0:
        return 1
    return fib(n-1) + fib(n-2)

def main():
    count:int = 0
    res:int = 0

    while count < 40:
        res = fib(count)
        count++

The main function is the entry point for the program.

Have questions?

Cool, you can contact me via mail.
Email: [email protected]
Discord : https://discord.gg/CAMgzwDJDM

Want to contribute?

Great, go ahead and make the changes you want, then submit a new pull request

Take a look at the open issues to find a mission that resonates with you.

Please check CONTRIBUTING.md to learn how you can contribute.

License

The Peregrine compiler is licensed under the Mozilla Public License, which is attached in this repository

peregrine-1's People

Contributors

1moita avatar anirudhgray avatar ccode-lang avatar clientcrash avatar code-xed avatar cyberflamego avatar dheck17 avatar dv8081 avatar ethanolchik avatar g0g05arui avatar gabriel-milan avatar heremanuel avatar insaneminer avatar jammincoder avatar krishyadav007 avatar lainq avatar mdgaziur avatar mmvanheusden avatar mosacode avatar nachiket18 avatar rechiekho avatar robotboyfriend avatar saptakbhoumik avatar sesam avatar shashankx86 avatar shravan-1908 avatar tembocs 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.