@solub â do you think upgrading processing.py to Jython 2.7.2 final would matter? can you tell if trinket is using numpy 13.3, the recommended version for maximum JyNI compatability?
I thinks it really depends on the quality of JyNIâs numpy implementation.
If it is as limited as the version that trinket is using for Python 2.7 then the upgrade is clearly not worth it. On the contrary, a more mature and stable implementation would bring a lot (a lot!) to the table.
I donât know what version of numpy is currently being used by trinket (Python 2.7) but it is far from being workable: simple matrix operations return errors, basic functions (that are available in ver. 13.3) like zeros_like() or meshgrid() are missing, slicing is deficientâŚ
I think the problem is not the version (13.3 is more than decent) but the relative exhaustiveness of the implementation.
Looks like Trinket has numpy 1.15.4 installed. Not sure if that is the same version available for Trinketâs processing.py, because numpy.__version__ and numpy.version.version donât work in its processing.py sketch window â although they do in a general python window?
â GoToLoop: I donât really like to have the code alongisde the canvas. It always feels like we only get to see half of the code and half of the output. Having the text editor above or below the canvas would make more sense in my opinion, especially when embedding in a forum post. I might prefer leaving the full width to the canvas and pasting the corresponding code beneath.
â JeremyDouglass: My intuition is that 15.4 is the version used in Python 3 Trinkets not in processing.py Trinkets. The 2 versions are like night and day.
A few questions:
Is upgrading Processing.py to Jython 2.7.2 on the roadmap ? (regardless of JyNI)
Is it âdifficultâ (time consuming, complex) to make the upgrade ? (How likely is it to happen ?)
How 15.4 numpy in Trinket would be bad news for JyNI and its numpy 13.3 support ?
Thatâs true! But then you could leave another link just for the source code.
I had to use browserâs inspection in order to find out your source codeâs link.
P.S.: Just found out the embed option âtoggleCode=trueâ which allows us to toggle display & code!
No, in the sense that it doesnât have a roadmap â it is in maintenance. If a developer got involved, upgraded it and tested it, I think jdf (Jonathan Feinberg) would probably accept the patch and make a new release â or / in the meantime the mode could just be released from someoneâs fork and manually installed.
I honestly donât know. It might be an easy drop-in replacement, or it might be a lot of work.
Well, 15.4 numpy would be bad news for JyNI, which Jython needs to load numpy. My understanding is that the latest JyNI (2.7-alpha5) is best able to load numpy 1.13.3. Later numpy breaks it Jython 2.7.2, NumPy advice ¡ Issue #37 ¡ Stewori/JyNI ¡ GitHub
This is just based on what I have read, not experience.
That said, it looks like perhaps Trinket is using a hand-crafted partial numpy replacement running on Skulpt, since their target is JS, not JVM. I canât tell. So that would have a completely different set of limits.
I just found about jni4net, a bridge between Java and the .NET ecosystem. Do you think it would be possible to use it with Processing in order to access a .NET binding for Numpy (like SciSharp) ?
Hi @solub !
The mantainer thinks itâ s not ready yet for the limelight, but py5 is the Python 3 + Processing way to go, check ou this wonderful write up by @tabreturn:
Hey @villares thank you for the poke !
Yes, I had a quick peek at it and it looks really promising ! I canât wait to have some time on my hands to try it out.
Also thank you to @tabreturn for this very comprehensive write up, and to @monkstone for the helpful examples. This small Python-oriented Processing community brings joy to my heart.