From: Maurice D. <Mau...@en...> - 2007-06-12 09:36:10
|
Le 6 juin 07 =E0 14:10, Sciss a =E9crit : > last, i'm interested to know if anyone is using choco in a scripting > environment on top of java, like groovy or jython. > how senseful do you judge an effort to port the choco library to > other languages like supercollider3? > thanks, -sciss- Don't know about supercollider3 I tested choco with groovy, a nice language. But Groovy only works with java. Ruby is another nice language (true object, ...) from witch groovy is derived. But ruby (as a C interpreter) come with much more libraries and is strongly supported by sun in its JRuby version (JRuby-1.0.0 has just come out (10 june !) You can get it at : http://dist.codehaus.org/jruby/ Here is a verbose sample of a MagiScare un JRuby (It works on - Mac-osx and linux - with jruby-1.0 - with choco-cvs-20070125.jar The following example show how Ruby can add a method to an existing choco class. Operator overloading could also be usefull for specifing constraint, but choco design seems not be very adapded for this purpose (if IntExp interface provide IntExp eq(IntExp), ... Then ruby would just had to add "=3D=3D" method to the IntExp class, or somethong like that...) |