Peregrine Rewrite - The python-like language that's as fast as C
Tags: c, programming, opensource, showdev
Published: 2021-10-09 17:31:42

Hey guys!
My name is Ethan, and I'm one of 12 Peregrine developers. Some of you may already know what Peregrine is, some of you don't, but this article is going to explain the current state at where Peregrine is at.

## What is Peregrine
If you know Python, you know how easy it is. However, it also comes with a big downgrade. Python is slow, and I'm pretty sure every python developer knows this by now. This is kind of annoying. That's where Peregrine comes in. Me and 12 other friends have been working on Peregrine for the past few months, starting as a hobby project. Peregine's syntax is very similar to Python's, and it gets trans-compiled to C, thus making it as fast as C.

## Update on Peregrine's current status
### Name
Peregrine's name has been getting more popular ever since I posted [my last article](https://dev.to/ethanolchik/the-swallow-programming-language-a-python-like-language-that-s-as-fast-as-c-43j7), and a lot of things has been changed. The most noticeable thing that has changed is the name. A lot of people recommended a name change from Swallow, so it is now called Peregrine which we think suits the language more.

### Rewrite
You probably already know this from the title - Peregrine is getting a rewrite. We are writing this in Python. The Lexer is already complete. We are going to rebuild the parser and codegen so it will be more efficient, and hopefully faster. This is all being done on [a different branch](https://github.com/peregrine-lang/Peregrine/tree/rewrite).

### Peregrine as a scripting language
Peregrine uses [tcc](bellard.org/tcc) as a secondary backend to allow it to be used as a scripting language. It uses [vlibtcc](https://github.com/peregrine-lang/Peregrine/blob/rewrite/Peregrine/vlibtcc/vlibtcc.v) which is a V wrapper for libtcc. It was implemented yesterday and is still at a very early stage. Some features do not work with it, so it is not recommended to use it at this stage, however it will be updated and fixed in the rewrite.

## FAQ
### Q: Is Peregrine a hobby project?
### A: As of 9/10/2021, Peregrine is no longer a hobby project.

### Q: Can I join the developer team?
### A: Peregrine is not in need of new Developers at the moment, however you can always contribute to the repository.

### Q: Is there a discord server?
### A: Yes, you can join it by [clicking here](https://discord.gg/J8yvySvCRx)

### Q: Why not contribute to Nim or Julia?
### A: Peregrine has different goals than Nim and Julia. They also achieve different things in different ways.

### Q: Will all python modules be compatible with Peregrine?
### A: Yes, that's the plan. It will take a long time to implement as it is a difficult task, however it will be there.

## Got any more questions that you would like to be answered?
You can open a [new discussion](https://github.com/peregrine-lang/Peregrine/discussions) that discusses your questions. You can also email saptakbhoumik@gmail.com, or [join our discord server](https://discord.gg/J8yvySvCRx)

## Conclusion
Peregrine is planned to release version 0.0.1 sometime in March, so make sure to show some support by starring the [repo](https://github.com/peregrine-lang/peregrine) and make sure to press on the "Watch" button so you don't miss any updates.

We would greatly appreciate any contributions, so if you find something that you can improve, open a pull-request! You can also check out our open issues. Please make sure you contribute to the [rewrite branch](https://github.com/peregrine-lang/peregrine/tree/rewrite), as we are going to replace the main branch with the rewrite.

Thanks so much for reading <3!