ciberlandia.pt é um dos muitos servidores Mastodon independentes que podes utilizar para participar no fediverso.
Uma instância 🇵🇹 dedicada à tecnopolítica e também a tudo o resto. Regras e termos em ciberlandia.pt ❤️ 🏳️‍🌈

Estatísticas do servidor:

116
utilizadores activos

Let's talk about tips for those coming from to in !
github.com/py5coding/py5genera

  • The slightly different snake_case names
  • How about the P-Classes?
    • PImage, PVector
  • About the libraries
  • More tips for porting Processing Java code to py5
    • Getting started on quick code conversions!
    • A table with some equivalences for conversion
    • Looping with for
    • Global variables
    • Strings & chars
    • OO differences (and similarities)
    • Data structures
GitHubDocumenting py5 tips for those coming from Processing Java · py5coding/py5generator · Discussion #389I have started this markdown document, I'd love to have more ideas and suggestions! https://github.com/villares/processing-python/blob/main/migration-help/coming-from-Processing-Java.md This starte...
Público

@villares rather than telling folks to throw away their static types from Java, it may help to convert them to type hints, docs.python.org/3/library/typi since they can be helpful, even if they aren't necessary

Python documentationtyping — Support for type hintsSource code: Lib/typing.py This module provides runtime support for type hints. Consider the function below: The function surface_area_of_cube takes an argument expected to be an instance of float,...
Não listado

@TomLarrow yeah, I thought a bit about that... But for beginners, and for exploratory creative coding, I don't feel like they are a good fit.

But then I could at least mention them, right?

Público

@TomLarrow @villares also, observe that #py5 has proper typehints builtin to all methods and functions. This makes it easier to code with py5 in IDEs that support them, like VSCode.

Público

@villares why would you want to load Jars from Python?

Java would load C/C++ code through the JNI but this was often fragile and a lot of technical debt. You did it because you needed the 10% performance bump from C/C++ or you wanted to use a UI library.

Scala, Groovy, etc.. make use of Jars because they run on the JVM and so you don't have the fragility issues. The key headache is the technical debt of multiple languages in one project

This project seems the worst of both worlds

Não listado

Cheers @stevecrox!

Processing Java has a great vocabulary/API for graphics and interaction that has been fine tuned for more than 20 years by artists and for artists, so it feels very comfortable for those of us how grew used to it. It even includes a great OpenGL 3D canvas. Processing is really cool for teaching, also, there is insight from a huge Processing creative coding community to "tap from" (books, meetups, the Processing Foundation).

But then I like Python's dynamic typing and high level data structures best, I also really love the Python community, so py5 (Python reaching the Processing infrastructure via JPype, which seems pretty robust, I've been using it for the last few years) is my dream tool for creative coding.

There are other nice options if you prefer other languages, like C++ (OpenFrameworks) or Kotlin (OpenRNDR), and p5js.org if you like JavaScript.

Reading you message again, it kind of sounded rude. If you don't like my tools and you are curious of why I would like them, you should ask in a more tactful manner.

Não listado

@villares Why the preference for Python data structures?

Both support constructors, inheritance, composition, etc.. I can't see an obvious advantage.

Python does support extending from multiple classes and as someone who started as a C++ dev, that is a horrible feature that must be purged!