top | item 41267412

Py5, a Python version of Processing for your creative coding projects

90 points| hx2a | 1 year ago |py5coding.org

31 comments

order

p4bl0|1 year 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|1 year ago

Yep. In case you don’t want to write Java you can do it in Python. But it uses the same engine

kdlafan|1 year ago

It seems like an axiom that no Python package can be written that does not depend on C/C++/Java doing the real work.

acbart|1 year ago

Why must every educational python library insist on teaching kids with global variables? I know parameters aren't easy for novices, but it feels like it's missing a lot of the value when we don't attempt to teach them...

bongodongobob|1 year ago

Because it's perfectly fine for 100 line programs. Beginners don't need to write extensible code that will be maintained for 30 years on business critical systems. You start by learning what a fuckin for loop does.

bityard|1 year ago

Because the concept of variables must be learned before the concept of scope.

nnnnico|1 year ago

True, but having a single scope is more intuitive at first for people who don't have a good grasp of what a function is and are still trying to understand programming. Also processing/p5 kind of focuses on the speed and accessibility of getting an idea going, for which a game-loop and a single func scope are quite powerful!

Aerroon|1 year ago

I can foresee the name of this causing issues in a decade or two when python releases version 5.

linsomniac|1 year ago

I think everyone who has gone through the 2->3 transition will have to be dead before 3->4 will have a chance of even being considered. :-)

knighthack|1 year ago

As someone who heavily uses Manim with Python, I like the idea. But I really don't want to use 'Py5' if it then has a Java dependency.

skywhopper|1 year ago

I see the Processing folks have not lost their touch for unnecessarily confusing names. Why on earth would they call this “py5”?

animal_spirits|1 year ago

the javascript version of processing is called p5js. According to the creator the 5 comes from "the original domain of processing was proce55ing.net, so people used to sometimes refer to processing as proce55ing or P5 or p5 for short. they still do sometimes. p5.js is a reference to that."

https://github.com/processing/p5.js/issues/2443

rorytbyrne|1 year ago

"X is a new version of Y" is a really uninformative way to introduce a project.

It's especially annoying when I click the link to Y and it just says "This repository contains the source code for Y".

bongodongobob|1 year ago

Is this any faster than Processing? I like playing with it for random art projects but always end up in optimization hell trying to speed things up.

senkora|1 year ago

I would assume that drawing performance is slower because it’s doing FFI from CPython to the JVM, but that you may be able to get speedup if your bottleneck is something that can leverage numpy.

gdevenyi|1 year ago

It took way too many clicks for me to figure out what this project is. And I'm still not entirely sure.

dotancohen|1 year ago

It's a Python wrapper for a popular Java tool.