4 ms·
I don't get it, I thought this was a port of Processing to Python, but then the installation instruction says: > If you have Java 17 installed on your computer
by p4bl0 2y ago
I don't get it, I thought this was a port of Processing to Python, but then the installation instruction says:
> If you have Java 17 installed on your computer, you can install py5 using pip:
So it still depends on Java? Is this like a Python wrapper for Processing?
UPDATE: Got the explanation. From another page on the website:
> Py5 is a creative coding framework for Python 3.9+. Its use and functionality is analogous to the widely used Processing framework. It is a Python version of Processing.
> Internally py5 uses Processing’s core libraries, which are written in Java, while providing the end user with a (mostly) seamless Python programming experience.
Emphasis is mine. The wording in the first paragraph (which is the same as on the project's home page) seems ambiguous to me. Reading it I would really not expect a Java dependency.
- animal_spirits 2y agoYep. In case you don’t want to write Java you can do it in Python. But it uses the same engine
- jszymborski 2y agoI suppose jython would be particularly useful in such cases
- stuaxo 2y agoPeople have got Processing working Jython (I played with it myself a very long time ago). Jython itself is making it's way to a python 3.x implementation but it doesn't seem to be quite there for general consumption, though maybe for some creative coding things this isn't a problem, for myself I'd need to wait until it's ready. If you are able, I'd recommend contributing to the Jython 3 work.
- gbear605 2y agoCheck out GraalPy, part of the GraalVM project. My company has switched from Jython to GraalPy with relatively little work.
- make3 2y agousing Jython prevents you from using the regular Python ecosystem though
- animal_spirits 2y agoI've also worked with a python->javascript transpiler and hooked it into p5.js if your more into that
- kdlafan 2y agoIt seems like an axiom that no Python package can be written that does not depend on C/C++/Java doing the real work.
- noitpmeder 2y agoWhy would you rewrite something that already exists? It'd be a different story if the library evolved naturally starting with python, which it very much might if it was created today.
- nomel 2y agoPython is successful because everyone is aware that it has relatively terrible performance. As a result, anything remotely heavy is put into performant libraries that use not-python, leaving a nice glue language with fast libraries. If you have something CPU bound, and it's python code hitting that ceiling, you're probably throwing away 10x performance [1]. That's ok, because anyone that cares about performance doesn't do that (or quickly learns). [1] https://programming-language-benchmarks.vercel.app/cpp-vs-python https://programming-language-benchmarks.vercel.app/cpp-vs-py...