Inspiration

I saw it as a huge loss that current python is a language that interpreted but cannot produce natively executable binary file output, and performs very slowly compared to such languages. Considering my admiration for compiler architectures, I thought why not convert a language like python with powerful libraries and simple syntax into a static compile language like c/c++.

What it does

This takes your python code with type annotations just like a c compiler, generating an assembly output that can be assembled on a 64-bit processor. Thus, python has great speed and power.

How I built it

Based on the topics I worked on, I succeeded in making a compiler to the extent that I could create during the hackathon, which works with splitting a new line and tab characters and adapt the syntax tree, compiles from type-based syntax.

Challenges I ran into

At many stages it has been extremely difficult to break down a python-like syntax to make it truly compile like languages that produce standard machine code output.

Accomplishments that I'm proud of

During the Hackathon, I am proud that I was able to put this wonderful and incredible idea as beautiful as I could. I want to grow itself in the continuation of the project and add more and more pieces to it.

What I learned

In addition to the frequently encountered errors that make me unable to get the correct output or segmentation errors on memory and some kind of error that will be difficult to understand from debuggers ; Although I am a student who has only been a student for a few years since starting university, I have seen how much I can apply what I have researched and learned with the additions I want and what I can add to it.

What's next for static.py

I intend to add more advanced python syntax contents, the standard library of basic functions transferred to static.py over asm, and other literally all the features that will make this everyone can use in their projects and move the project forward.

Built With

Share this project:

Updates