Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ClientCrash committed Oct 9, 2021
1 parent c9706f9 commit 31cdbea
Showing 1 changed file with 55 additions and 16 deletions.
71 changes: 55 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Note - We are rewriting the entire thing so please check the [rewrite branch](https://github.com/peregrine-lang/Peregrine/tree/rewrite)


<img id="banner" src="./graphics/banner.png" style="width: 800px; align: center;"/>

# Peregrine
Expand Down Expand Up @@ -37,41 +36,77 @@ You can consider it to be a superset of C which compiles to clean C. So valid C

## Building/compiling Peregrine

### Linux (with apt)

On debian based linux you can just run

- Install vlang

- ```bash
bash build-linux-full.sh
```

### Other Linux

- Install libtcc
- Install vlang
- ```bash
v peregrine.v -o peregrine
```

### Other (Example: Windows or nothing else works)

**NOT WORKING - CURRENTLY THIS DOESNT WORK**
**WORKAROUND => USE THE LINUX SUB SYSTEM**

- Download : http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win64-bin.zip
- Extract it
- ```
cd tcc-0.9.27
./make.bat
sh ./configure
```

````
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
### Requirements to build from source
- [GCC compiler](https://gcc.gnu.org/)
- [libtcc](https://bellard.org/tcc/tcc-doc.html#Libtcc)
- [V compiler](https://vlang.io)
- [GCC compiler](https://gcc.gnu.org/)
- [libtcc](https://bellard.org/tcc/tcc-doc.html#Libtcc)
- [V compiler](https://vlang.io)
# Compilation instructions
1. Clone this repository using the following command: `git clone https://github.com/Peregrine-lang/Peregrine.git`
2. Run `cd Peregrine/Peregrine`
3. To build it, run `v peregrine.v`
4. That's it. It's that simple

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## Primary implementation language
It is [written in V](https://vlang.io)
It is [written in V](https://vlang.io)
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## Progress
Currently we are working on the codegen and some Peregrine programs are working
Currently we are working on the codegen and some Peregrine programs are working
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## Example
Here is a small example for you to understand:
```py
def main():
print("Hello, World!")
```
````

The `main` function is the entry point for the program.

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
Expand All @@ -80,31 +115,35 @@ The `main` function is the entry point for the program.

Cool, you can contact me via mail.
<br> Email: saptakbhoumik@gmail.com
<br> Discord : https://discord.gg/CAMgzwDJDM
<br> Discord : <https://discord.gg/CAMgzwDJDM>

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

## Want to contribute?

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

Take a look at the [open issues](https://github.com/Peregrine-lang/Peregrine/issues) to find a mission that resonates with you.

Please check [CONTRIBUTING.md](https://github.com/Peregrine-lang/Peregrine/blob/main/CONTRIBUTING.md) to learn how you can contribute.

If you create any new file make sure to comment your name in the file as shown `Original author: Your name`
If you create any new file make sure to comment your name in the file as shown `Original author: Your name`

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

## Testing
The project has automatic tests which will run on pull requests and pushes to the project.
## Testing

The project has automatic tests which will run on pull requests and pushes to the project.
Tests which require user input won't run but the code will still be compiled.
If you add new functionality to the project please run the appropriate tests for it, and create tests for your functionality if possible.

#### It is recommended to only use input when absolutely necessary (example: you test the `input()` function)

This is the case because tests which require user input will only be compiled and can only be checked for syntax errors, and not issues with the functionality of the given test subject.
#### [`/Peregrine/tests/ci`](./Peregrine/tests/ci) - Tests which require no user input.
#### [`/Peregrine/tests/manual`](./Peregrine/tests/manual) - Tests which require user input and also include the tests you write for CI

#### [`/Peregrine/tests/ci`](./Peregrine/tests/ci) - Tests which require no user input

#### [`/Peregrine/tests/manual`](./Peregrine/tests/manual) - Tests which require user input and also include the tests you write for CI

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

Expand Down

0 comments on commit 31cdbea

Please sign in to comment.