GSoc 2017: Application for processing.py

edited March 2017 in Summer of Code 2017

Hi there!

I'm a second-year Softwear Engineering student from Dalian University of Technology in China,familiar with Java and Python,and have some experience about visul programing.

I read over the Project List page from github,then I downloaded Processing and used couple of days but I found that Processing.py functions are not enough for me. I'd like to expend the processing.py so that the users can use processing in python mode more esier and more efficient.

Here are some of my ideas about extending processing.py:

  1. Data Type:I found the references of processing.py shows less data types than I thought,maybe we can provide more types like long,tuple_or_complex.
  2. Methods:maybe we ciould provide more Dictionary(.clear(),.copy()...),List(.count()) or String(endwith(),capitalize()...) methods to user to make proccesing more esier to get someting done.
  3. Date&Time:should we add some methods like format() or sleep()
  4. 3D Primitives:rotate(angle, x, y, z)_sometimes is not enough ,we could provide _frame or other stuff.
  5. Math: to fit with the 3D Primaitives we could provide some linear algebra methods to deal with the matrix
  6. ...

Anyway,these are just some of my ideas,I 'd like to know weher I can apply the project Processing.py.If the answer is positive,could you give me some more details about "what proccesing.py exactly need for the New features“?That would be of great help to my application for Processing.py!

Thank your for your help!

Best wishes!

Tagged:

Comments

  • Processing.py is based on Jython and you can easily access most of the Python standard library through it. In light of that, couple of comments on your suggestions list:

    1. Data Types: Python is dynamically typed language i.e., you don't have to define data types for your variables explicitly. So the lack of data types isn't a feature of Processing.py, rather, it's something that is built into the Python language itself! And as far as introducing data types in Python is concerned, it's a controversial issue even in the Python community. (You might want to look up the ctypes Python library and new Python features like type-hints and the like if you are interested in how static typing might be used in Python)
    2. Methods: Since you have access to the standard python library you can pretty much do all the things that you have listed. For instance, if d is some dictionary in python, you can copy it using d.copy(), you can check if a certain string s ends with the substring "py" using s.endswith("py"), etc. You should definitely take a look at the python standard library documentation to see what's possible.
    3. Date and Time: The python libraries like datetime and time provide a range of functions you can use through Python (and, by extension, through Processing.py)
    4. 3D Primitives: Is this something that you can do in "normal" Processing but not in Processing.py? If yes, then you can sure extend the Processing.py codebase to include cover this!
    5. Math: Python does have libraries like numpy that help you perform linear algebra operations (and a range of other numerical computing operations). Unfortunately, we can't call numpy through Processing.py. I'm not sure of Jython's limitations, but it would be interesting if you could find a hack that lets us call numpy and the like through Processing.py.
  • Regarding:

    Python does have libraries like numpy that help you perform linear algebra operations (and a range of other numerical computing operations). Unfortunately, we can't call numpy through Processing.py. I'm not sure of Jython's limitations, but it would be interesting if you could find a hack that lets us call numpy and the like through Processing.py.

    ...this might be worth investigating:

    JyNI is a compatibility layer with the goal to enable Jython to use native CPython extensions like NumPy or SciPy. This way we aim to enable scientific Python code to run on Jython.

  • Thank for the tips,perhaps I misunderstand the references on the processing.py website. I'm wondering if we can use the Java extensions for Jython to perform linear algebra operations instead of NumPy?

  • Python Mode is implemented in Java, and is designed to be compatible with the existing ecosystem of Processing libraries. (from the Processing.py readme)

    @cagetian, so you could consider writing a Processing library, I guess?

  • That's a good idea!I should give it a shot,thanks for your advice!@theabhikpal

Sign In or Register to comment.