Skip to content
Martin Prout edited this page Jan 26, 2020 · 66 revisions

The past

Ruby processing was developed by Jeremy Ashkenas (jashkenas), in the original versions both jruby-complete and processing needed to be doctored for use in ruby-processing. At that time java was available on all platforms, and java processing applets could be easily be exported to run in web-browsers. You could even export ruby-processing applets to run in web-browsers, but it wasn't too practical since jruby-complete needed to be included in the Applets (11 Mb). The original version of processing was not too demanding of a computers graphics card, with software based P2D and P3D. Support for OPENGL was an optional extra, but even that was supported by quite cheap graphics cards. Guillaume Pierronnet (moumar) also did a fair bit of work toward the last rubygem releases of ruby-processing (processing-1.5.1) (including library loader) see CHANGELOG, by this time ruby-processing was using un-modified jruby-complete and processing jars (so they did not need to be included in the github repository). I am pretty sure it was moumar that developed the autobuild/test scripts, however since ruby-processing was still hosted at rubygems this was not important to the average user.

A period of transition

Starting in November 2012, Martin Prout (monkstone) began work on updating ruby-processing to work with processing-2.0 ( when it was still at the beta stage, processing-2.0.0 was eventually released June 2013 ) and jruby-1.7.0. It was in June 2013 that monkstone started commiting code to ruby-processing master at github, with the mistaken assumption that the revised gem would be hosted at rubygems. For that reason initial changes were quite conservative, just doing what was necessary get ruby-processing to work with processing. Once it became apparent that following a policy change at rubygems the current rubygem was too big to be hosted there, more drastic changes were considered. These included "clobbering" the git archive to remove uneeded binary files (mainly legacy versions of jruby-complete), this drastically reduced the size of the github repository (and it was hoped this may pave the way for vanilla processing to do the same, their repository is insane at over 1.3 Gb, consisting of mainly unused/unusable binary blobs). A major change for processing-2.0, is that the previous P2D and P3D are now implemented using OPENGL, and require a half decent graphics card/driver combination (hint NVIDIA has always been most compliant).

Last implementation

To facilitate the use of other gems with ruby-processing, the default is to start sketches using a system installed jruby. Using the 'vendored' jruby complete can be selected with the --nojruby flag. To make the ruby-processing gem smaller the "processing" and "jruby-complete" jars and examples were completely removed from the gem (this gem was otherwise too big for rubygems distribution). The processing jars are now provided from an installed version of vanilla processing, whereas the jruby-complete jar, and example sketches are downloaded and installed as a post-install operation. Since ruby-processing-2.5.0 the jruby-complete is installed using rp5 setup install (this requires wget, however an alternative is to manually to copy the correct version to the installed gems vendors jar). Similary rp5 setup unpack_samples to unpack samples. Ruby-processing returned as a rubygem release on 22 December 2013. The changes to vanilla processing-2.1 were very significant for ruby-processing since default version of java is now java 7 (this means we can use java 7 and java 8 for performance improvements). The latest released version of processing-2.2.1 is supported (though processing-3.0a5 also seems to work). For the ruby-processing-2.5.0 release a dead dead simple ArcBall, DegLut cos and sin functions and Vec2D and Vec3D have been added as jruby-extensions. The preferred way of adding/using java libraries is to create a gem, see pbox2d as an exemplar, but you should be able to use most libraries installed by vanilla processing. The probable final release of ruby-processing is version 2.7.1 installs jruby-complete-1.7.27, will not work with toxiclibs > 0.4.0 or pbox2 > 0.4.2, but it was not possible to constrain dependency versions (see also propane a standalone version of ruby-processing).

Current

JRubyArt is an updated version of ruby-processing, which works with processing-3.2.1+ and has been developed to work with jruby-9.1.5.0+. Performance improvements are coming since jruby-9.0.5.0+ (performance may be as fast as jruby-1.7.** and it is mainly ruby-2.3 compatible and hence the future...). current and future versions of toxiclibs, pbox2d and the new geomerative gems require JRubyArt and do not work with ruby-processing. There is also an even simpler alternative propane, which provides a standalone alternative to ruby-processing (includes the processing-3.2.6 core.jar, relies on an external jruby, but is hence scriptable). For people allergic to vim / terminals check out the atom-k9 package for the atom editor. JRuby and JRubyArt have been fixed to work with jdk11+.