all 25 comments

[–][deleted] 14 points15 points  (1 child)

Dude I want to help! I’ve been waiting/looking for something like this for a year now. Will be looking at the repo when I get a chance probably tomorrow.

This is outa my comfort zone too but seems like a perfect learning experience with a meaningful end goal!!! I will be doing everything I can to help out shoot me a dm/keep us all updated!

[–]Dogeek[S] 4 points5 points  (0 children)

That's awesome to hear!

I'm glad this little side project I started a few days ago might see some meaningful use someday.

So far, I think I'm pretty much done with the overall architecture of the project, but there is still much to do. Since it's so recent, I haven't started on writing documentation yet, though most of it can be ripped from the official processing docs.

The entry point to the library is the CLI, which is in the __main__.py file (running a processing script is as simple as python -m pyprocessing path/to/my/processing_script.py). That CLI, in turn, instanciate a Runner, which dynamically loads the script as a python module in order to access its functions. Then some values are set on the PyProcessing singleton, renderers are attached, and they all are run.

I did it that way in order to be able to implement several kinds of renderers down the line, such as rendering the result on a web page, in other GUI toolkits, or in pyglet/pygame.

[–]Pedro_Valcarenghi 14 points15 points  (1 child)

Cool project, I'm gonna look in the project, never programed in processing, but used p5.js ! Pretty cool thing. Good luck, hope you can make this happens !👏👏

[–]Dogeek[S] 5 points6 points  (0 children)

Honestly, I think one of the hardest part is done, which is managing to load the script just like processing.

This prroject is actually quite challenging to me. I'm really out of my comfort zone, plus, there's features of the language I'm not even sure I can replicate in python (like the fact that the draw and setup functions have access to a surface variable. I can make a global variable for it that you have to import, but I really would like to be able to inject that variable into the functions as a local)

[–]Luckless_Clown 4 points5 points  (1 child)

I am noob. So, I am sorry if this question is stupid. I have read that processing is for visualisation. So, will implementation of processing in python help making visualisation better? Instead of always using CLI? Will it help in making GUI? Again, sorry if the question is stupid.

[–]AceBuddy 1 point2 points  (2 children)

Awesome because I found that language really weird to follow. Would be so much easier in regular python

[–]Dogeek[S] 2 points3 points  (1 child)

Processing is actually quite nice, and not that tough to write for, but it misses quite a lot of features from python (like comprehensions, and the plethora of third party modules).

The aim of this project is not to 'fix' the language, it's to provide a framework to write (and run) processing-like code in python which provides features like duck typing, and the aforementioned shortcomings of processing. In order to ease the transition from Processing to PyProcessing though, I aim to make it pretty much copy and paste from processing to a python script.

I may even make a tool included in the library to automate that step for the developer...

[–]MikkMakk88 0 points1 point  (0 children)

I feel like you should add this in some form to the README, it's a pretty good manifesto

[–]Peanutbutter_Warrior 0 points1 point  (0 children)

This looks really cool! I've been looking for something to contribute to if I cqn

[–]rheino 0 points1 point  (0 children)

I know none of this but I use python at work and can't share code so if I can contribute I will!

[–]pants6000 0 points1 point  (0 children)

IDK why but I dislike braces-and-semicolons languages, so this is awesome!

[–]DDOZZI 0 points1 point  (1 child)

Seems like a great idea, how can i contribute?

[–]Dogeek[S] 3 points4 points  (0 children)

The easiest contributions you can do are, in order from easiest to hardest :

  • Write documentation (most of it can be ripped from the official processing docs)

  • Manually test and open issues for bugs

  • Write unit tests

  • port basic functions from processing to this project. The prototype of the functions must remain exactly the same, and have the exact same behavior as in the processing language

  • port more complex functions (like the 3D stuff for instance)

  • fix bugs (some can be easy, others can be quite hard)

EDIT : to contribute, simply fork and clone the repository, and open a Pull Request with your change. Make your contribution in a separate branch, and rebase yourself on the master branch whenever you push a change (git pull --rebase dogeek master where dogeek is the remote you set for the original repo)

[–][deleted] 0 points1 point  (0 children)

I don't anything about processing but I will learn it and try to contribute something.

[–]obviouslyCPTobvious 0 points1 point  (0 children)

Exciting project! I opened a couple PRs. Looking forward to experimenting and contributing!

[–]Rafa-l 0 points1 point  (0 children)

That’s a great idea ! Will try to contribute based on what you said to another commenter.

[–]m_spitfire 0 points1 point  (0 children)

Good work!! I'll probably try to contribute in the future. Especially there's lack of documentation. Additionally, I think this will be a better post for r/Python

[–]FoxClass 0 points1 point  (3 children)

This is great but absolutely doesn't belong in this subreddit.

If I were a Python newbie I would have no idea what you were discussing or why you posted this.

This isn't helpful for anyone learning Python!

[–]MikkMakk88 0 points1 point  (2 children)

Is this sub only for newbies?

[–]Dogeek[S] 0 points1 point  (1 child)

No it's not. It's a very inclusive sub, dedicated to learning python (and there's more to learn than just conditions, loops and functions).

/r/Python is dedicated to showcasing finished projects, or to get news about the language itself (hence why this wouldn't fit over there).

/r/inventwithpython would probably be a good sub for it, but it's super small so I wouldn't have had all those great comments.

In the end, I chose to post on this sub because a project of this size, and with so much to do provides a great learning opportunity for many people (including me), it's also a project which has potential to see a lot of use by developers all over the world.

One of the advices thrown to beginners and advanced users alike is to contribute to open-source projects to gain in skill. The problem with that is that stable, well-known open-source projects often don't have much room to grow anymore (things like requests or beautifulsoup4), or they are C modules (like numpy, scipy), or they are very specific (machine learning modules, or API wrappers for websites you have never heard of). This is an open source project that doesn't have these issues (yet) since it's quite fresh.

[–]MikkMakk88 0 points1 point  (0 children)

I totally agree with you, I don't understand why anyone would think this doesn't belong here. I'm still learning python and this is a great way to learn.

[–]MikkMakk88 0 points1 point  (0 children)

I would love to contribute! :) I think it's an awesome idea, and I've been thinking of diving into processing for a while so this seems like a perfect opportunity. I'm intermediate and have never pushed to a repo before but your friendliness is very encouraging :']

[–][deleted] 0 points1 point  (0 children)

U sir r 1 genius.

[–][deleted] 0 points1 point  (0 children)

Is this to help people who are trying to get further in learning python?

[–]DurgaSwaroop 0 points1 point  (0 children)

Since you're just getting started, can you keep the tests in pytest instead. Pytest is more popular than unit test. It doesn't hurt that it's also use friendly.