Loading...
Logo
Processing Forum
I (as a research engineer) have been following Processing for years and years, waiting for the right project to come along. I consider Processing to be legendary, but it's still restricted to an environment having Java, which are only environments that can license Java.

This makes it cruelly unavailable for some distributions of Linux. In addition, because of the strict recommendations to use only Sun Java, it's basically disqualified from ever being used in alternate implementations on platforms having alternate purposes.

I have a real-time platform in development, and I'd like to use Processing for the display interface. However, that doesn't seem to be possible, given the above.

Now, I realize Processing is geared more towards designers, but, hey, who doesn't love what can be done with Processing? So, I'm foolishly considering whether someone has done a C/C++ implementation of it, or whether I should consider doing one myself.

In addition to wondering about C/C++, I have the questions, below, and I'd be appreciative of whatever information can be given to save me time in investigation. Also, I do not want to use Android. I'm more curious about the answers to my questions than I am about a/the single alternative.

> What features break down when using a non-Sun Java, like OpenJDK, and is the reason known, yet? Is there a particular flavor of a non-Sun Java that seems to work well enough?
> Is there something specifically special about Java that is depended-on by Processing (other than basic system calls), that can't be readily rewired to GTK/etc..? What about with Android's Java, which obviously seems to works fine.
> Are there any known successful projects that put Processing on embedded platforms (like ARM)? 


Dustin


Replies(11)

There is also pyprocessing which is completely free of jvm (however only a partial implementation of processing), it is based on the pyglet graphics engine.
@amnon.owed: UCF got me excited, but it's incomplete and hasn't been worked-on in years. Even then, it says that he was focused on camera capture. It's too bad. Thank you.
@monkstone: Thank you. It's most certainly a solution for an entire class of problems. Even though it uses Pyglet/OpenGL to render, I'd be concerned about motion fluidity, however. The entire project is pure Python.
It can be bit slow but can be compiled with pypy for a bit of a speedup.
I am working on further developing cprocessing; it isn't feature complete and only compiles on linux atm (but shouldn't be hard to port- just haven't been using windows for a while). You can find the project at www.github.com/whackashoe/cprocessing - it is gpl/bsd and I'm trying to get er up to speed

you can mail me @ whackashoe@gmail.com if you'd like to discuss it as well 
The reply of whackashoe just brought this question to the fore again, and I thought it worth updating my response. I have since done a clean install of Archlinux, and installed openjdk1.7.0_09. It may be completely heretical but you can run processing-1.5.1 and processing-2.0 (including latest svn version)  perfectly satisfactorily with this java. The only thing you get is a dialog box popping up to warn you off using this version of java, but I have no problem resizing the ide etc. However my setup is not not completely open source as my NVIDIA graphics needs the closed source driver (3d acceleration is completely crap with open source drivers, so you probably need a radeon graphics card). Easiest way of replacing jre+tools provided with the processing distribution is to remove the java folder, and replace it with a symbolic link to the jdk. Which will probably be:-
Copy code
  1. /usr/lib/jvm/java-7-openjdk
Experience with a different distro may completely different, but I had no difficulties with sound (pulse-audio) or 3D graphics, indeed with following options in your .bashrc the ide can be made to look a bit nicer on linux.

Copy code
  1. export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' 
  2. export JAVA_FONTS=/usr/share/fonts/TTF
  3. export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=setting'
PS I have also compiled and run the latest processing.py with this setup, and that also works fine. The performance knocks the shit out of pyprocessing (owing to jvm) and you get all the cool new processing-2.0 features such as access to shaders etc.
I had the same basic experience with Ubuntu, only I don't remember seeing a dialog box. OpenJDK seemed to not only work, but it seemed to work identically, at least under my cursory (read: non-serious and hasty) tests.

Obviously, I (and many people) would prefer to get away from Java, but at least, there's a workable, semi-universal option across systems with OpenJDK.

Still... I was seriously tempted to start my own port before I thought about the magnitude of the ensuing tangent. That being said.. Stay tuned to CProcessing (mentioned above). It seems to be the only alternative with activity, right now.

If anyone on a current or new C-based processing project needs help, just ask.


Dustin Oprea
Well, OpenJDK might work, I suppose it improves over time, of course.
Now, perhaps some corner cases can remain, like issue when using the Net library, the Serial one, some OpenGL sketches perhaps, and so on. Hypothetically speaking, of course.

I'm really only interested in video display. I assume that any Net issues you're referring to are those of processing, and that, if I invoked the networking library from Java code which is invoked from Processing, it should be fine.

Dustin

On Nov 24, 2012 10:08 AM, "Processing Forum" < noreply@zohodiscussions.com> wrote: