All Projects → JuliaCN → Py2Jl.jl

JuliaCN / Py2Jl.jl

Licence: MIT license
Python to Julia transpiler.

Programming Languages

python
139335 projects - #7 most used programming language
julia
2034 projects

Projects that are alternatives of or similar to Py2Jl.jl

Retyped
Access 3600+ libraries from C# and let Bridge.NET compile your project into JavaScript.
Stars: ✭ 216 (+222.39%)
Mutual labels:  transpiler
cxgo
Tool for transpiling C to Go.
Stars: ✭ 234 (+249.25%)
Mutual labels:  transpiler
bfpile
Optimizing Brainfuck compiler, transpiler and interpreter
Stars: ✭ 19 (-71.64%)
Mutual labels:  transpiler
C4go
Transpiling C code to Go code
Stars: ✭ 253 (+277.61%)
Mutual labels:  transpiler
sbt-babel
An SBT plugin to perform Babel compilation.
Stars: ✭ 12 (-82.09%)
Mutual labels:  transpiler
jazzle
An Innovative, Fast Transpiler for ECMAScript 2015 and later
Stars: ✭ 65 (-2.99%)
Mutual labels:  transpiler
Transcrypt
Python 3.7 to JavaScript compiler - Lean, fast, open! -
Stars: ✭ 2,502 (+3634.33%)
Mutual labels:  transpiler
transpiler
ABAP to JS transpiler
Stars: ✭ 57 (-14.93%)
Mutual labels:  transpiler
dragon
Dragon is a universal Python translater.
Stars: ✭ 26 (-61.19%)
Mutual labels:  transpiler
phptojs
PHP-to-JavaScript transpiler
Stars: ✭ 29 (-56.72%)
Mutual labels:  transpiler
sherlock.py
Sherlock is transpiler that translate python to shell script language.
Stars: ✭ 65 (-2.99%)
Mutual labels:  transpiler
dotlin
Kotlin to Dart compiler
Stars: ✭ 212 (+216.42%)
Mutual labels:  transpiler
yahdl
A programming language for FPGAs.
Stars: ✭ 20 (-70.15%)
Mutual labels:  transpiler
Moonscript
🌙 A language that compiles to Lua
Stars: ✭ 2,694 (+3920.9%)
Mutual labels:  transpiler
CFortranTranslator
A translator from Fortran to C++. We provide statement-wise translation to improve readability.
Stars: ✭ 81 (+20.9%)
Mutual labels:  transpiler
Plus
This project is being developed privately.
Stars: ✭ 215 (+220.9%)
Mutual labels:  transpiler
clava
C/C++ Source-to-Source Tool based on Clang
Stars: ✭ 55 (-17.91%)
Mutual labels:  transpiler
cotowali
A statically typed scripting language that transpile into POSIX sh
Stars: ✭ 551 (+722.39%)
Mutual labels:  transpiler
Gloa
Glóa - a statically typed language that compiles to Lua. *UNDER DEVELOPMENT*
Stars: ✭ 19 (-71.64%)
Mutual labels:  transpiler
webfx
A JavaFX application transpiler. Write your Web Application in JavaFX and WebFX will transpile it in pure JS.
Stars: ✭ 210 (+213.43%)
Mutual labels:  transpiler

Python To Julia Transpiler

example.png

This project aims at providing a Py2Jl transpiler targeting the compatibility level 1 and 2 mentioned in the section #CPython Compatibility Level, while the methods to support libraries like numpy, scipy or pytorch will be given in the documentation.

This project is in its early stage, and now we have only partly achieved the level 1 compatibility. This means that you can already write performant Julia code using pure Python, but you might not succeed in transforming any existing Python codebase to Julia with this tool.

Usage

python -m Py2Jl input.py output.jl

To run the generated Julia code, you should add the package Py2JlRuntime to your environment (e.g., pkg> dev runtime-support/Py2JlRuntime). The package Py2JlRuntime is included in the runtime-support folder.

CPython Compatibility Level

  1. Level 1: trivial transformation for seemingly similar code correspondence. With this level, Python code transpiled to Julia usually does not work the same.

  2. Level 2: semantics-driven transformation that respects the Python languages semantics and behaviours. With this level, Pure Python code transpiled to Julia strictly works the same.

  3. Level 3: the transpiler respects the original execution model of CPython. such as some unusual functions in the inspect module, sys._getframe. This level is usually forcing the transpiler to use the same or similar object models as the original CPython, which has negative performance implications.

  4. Level 4: the transpiler respects the original object memory layout of CPython. This means the transpiler becomes a replication of the original CPython, which is too boring. This level also fully supports C-extensions, but it is not the only approach.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].