pybind11
py2many
Our great sponsors
pybind11 | py2many | |
---|---|---|
35 | 27 | |
12,116 | 487 | |
1.9% | 5.5% | |
9.6 | 8.2 | |
9 days ago | about 22 hours ago | |
C++ | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pybind11
-
Using pybind11 with minGW to cross compile pyhton module for Windows
I have a python module for which the logic is written in C++ and I use pybind11 to expose the objects and functions to Python.
-
IPC communication between rust, c++, and python
Reading from Python requires a wrapper, using pybind11 this is fairly done.
-
Is Pycharm an okay IDE to use?
That said, if you need to write a Python module in a compiled language, it's much easier and more fun these days to write in C++. pybind11 is extremely mature and even fun system to write Python objects in C++.
-
Roast my resume
There will be specific technologies you used in your data pipelining: Parquet? Did you use Pandas to manipulate your data? Did you optimise some aspects with C++? If so did you use PyBind11 to integrate it?
-
Pybind11 error | Compatibility and/or Linker issue | Mac M1 (But running X86_64 using Rosetta 2)
git clone https://github.com/pybind/pybind11.git
-
How to make C++ communicate with Python?
I would say that pybind11 is precisely what you want here. If you don’t want to write the bindings yourself, you could try Tolc.
Pybind11 https://github.com/pybind/pybind11 is an easy way to expose c++ functions in python.
-
All you should know about Flutter development
I think they should give up on Flutter for Web and just focus on mobile and desktop (and maybe extend use on Smart Watches, Smart TV, embedded instead). Too many people still remember Java Applets, google's GWT, Flash/Flex and how it ended. They are out of focus trying to support Web as well.
I had also higher expectation regarding Dart FFI - I think with their ffigen we are still only in ctypes like python bindings territory. Nowhere near something like pybind11 [0] for c++ bindings yet.
-
How do you set up C++ to call python functions?
And how to do this in the best modern way instead of dealing with Pythons native and annoying 30 year old C API: https://github.com/pybind/pybind11
-
What to use to develop GUIs in C++?
Some work on the C++ side will be required. There's https://github.com/pybind/pybind11 for example.
py2many
-
Why I'm still using Python
https://github.com/py2many/py2many/blob/main/doc/langspec.md
Reimplement a large enough, commonly used subset of python stdlib using this dialect and we may be in the business of writing cross platform apps (perhaps start with android and Ubuntu/Gnome)
-
Codon: A high-performance Python compiler
For py2many, there is an informal specification here:
https://github.com/py2many/py2many/blob/main/doc/langspec.md
Would be great if all the authors of "python-like" languages get together and come up with a couple of specs.
I say a couple, because there are ones that support the python runtime (such as cython) and the ones which don't (like py2many).
-
A Python-compatible statically typed language erg-lang/erg
It'd not fully solve your issue, but have you ever seen https://github.com/py2many/py2many ?
-
Omyyyy/pycom: A Python compiler, down to native code, using C++
Cython doesn't consume python3 type hints and needs special type hints of its own. But it's certainly more mature than other players in the field.
What we need is a rpython suitable for app programming and a stdlib written in that dialect.
https://github.com/py2many/py2many/blob/main/doc/langspec.md
- I made a Python compiler, that can compile Python source down to fast, standalone executables.
- PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
-
Show HN: prometeo – a Python-to-C transpiler for high-performance computing
No intermediate AST. To understand the various stages of transpilation and separation of language specific and independent rewriters, this file is a good starting point:
https://github.com/adsharma/py2many/blob/main/py2many/cli.py...
This is awesome! The direction of using a subset of python, while leveraging the user base and static typing to accomplish some other everyday task in a different language is very legit IMO.
I took a cursory look at:
https://github.com/zanellia/prometeo/blob/master/prometeo/cg...
It seems quite similar in spirit to
https://github.com/adsharma/py2many/blob/main/pyrs/transpile...
I'm not spending much time on py2many last few months (started a new job). Let me know if any of it sounds useful - especially the ability to transpile to 7-8 languages including Julia, C++ and Rust.
-
Implicit Overflow Considered Harmful (and how to fix it)
Link to the test that's relevant for this discussion:
https://github.com/adsharma/py2many/blob/main/tests/cases/in...
This is an explicit deviation from python's bigint, which doesn't map very well to systemsey languages. The next logical step is to build on this to have dependent and refinement types.
Work in progress here:
-
Structural pattern matching in Python 3.10
If you stick to this subset of python
https://github.com/adsharma/py2many/blob/main/doc/langspec.m...
The tool can convert your code to C++/Rust/Go and give you a native binary which like you observe will run faster without the python runtime.
There are many open tasks that could use help.
What are some alternatives?
PyO3 - Rust bindings for the Python interpreter
Optional Argument in C++ - Named Optional Arguments in C++17
setuptools-rust - Setuptools plugin for Rust support
PEGTL - Parsing Expression Grammar Template Library
sparsehash - C++ associative containers
sol2 - Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
dynamic_bitset - Simple Useful Libraries: C++17/20 header-only dynamic bitset
LSHBOX - A c++ toolbox of locality-sensitive hashing (LSH), provides several popular LSH algorithms, also support python and matlab.
sparsehash-c11 - Experimental C++11 version of sparsehash
Hashmaps - Various open addressing hashmap algorithms in C++
wasmtime - A fast and secure runtime for WebAssembly