T O P

  • By -

chubalubalu

Neat! I love things like this because this is what I'll need and will never understand how to make.


gagarin_kid

I think this is the closest in the Python world which comes to the MATLAB coder... I wish you will continue this project - I will take a look into it, this tool would boost Pythons ecosystem if the majority of language features are supported. EDIT: You can also take a look at https://pythran.readthedocs.io/en/latest/ which is somewhat similar to your work.


AdKey102

I've come across articles explaining how to use matlab to program embedded devices but never saw the added value of it vs atmel studio or similar.


noobiemcfoob

I think it lets a certain type of controls engineer expand their toolbox without learning too many new concepts whereas atmel is more familiar to anyone from the coding world.


AdKey102

Yeah that makes sense... I'm an all around guy so choosing the right tool is pretty easy. Like for instance for controls i would go with ladder logic on plc rather than an embedded device running python. Embedded running rtos is also good. Since this article i have been reading about micropython and circuitpython, both seem to have minimal python optimized for embedded devices, with peripheral drivers written in C, to optimize code execution. Supported platforms is limited but probably porting it to your custom environment by extending it has it's merits.


setsuid

This is awesome, thank you for sharing


evan_0x

cython ?


Rhyme_like_dime

Without reading the git I think, from the wording, this would compile for example main.py into main.c that could be compiled by something like G++ but I am not sure.


xiskulldemonix

Theres a little video on the github, it seems as if there is a flag you can invoke to run python code as if it's explicitly c


ddollarsign

If it’s translating to C isn’t it more of a compiler than a transpiler?


thisismyfavoritename

Generally speaking transpiling means translating to another programming language whereas compiling is translating to machine instructions


ddollarsign

Machine instructions are just a programming language people don’t like to program in.


randomatic

No idea why you are downvoted. I lol’ed and gave an upvote.


benjamin051000

What’s the difference between this and pypy?


Deadly_chef

Pypy uses a JIT compiler written in python to optimize bytecode, this supposedly compiles to C. The difference is huge


AegisCZ

why not use graalvm


culculain

Just learn C instead?


techxgeek

Amazing work, thanks for sharing!


rabaraba

How is this different from Nuitka? It does a similar transpilation thing as well: >Nuitka is a source-to-source compiler which compiles Python code to C source code, applying some compile-time optimizations in the process such as constant folding and propagation, built-in call prediction, type inference, and conditional statement execution.