We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Groovy Processing (Read 2547 times)
Groovy Processing
Sep 24th, 2008, 10:30am
 
I have whipped up a quick and dirty method of using groovy in Processing. I did it just to see how/if it works and to see what I can and can't do with groovy.

http://fluid-forms.com/FluidLibs/releases/Groocessing/0-1/loadAndExecute-080924a.zip

Notably, I can using it in an applet. There is a project called grapplet which is concerned with using groovy in applets however the code needs to be signed.

Performance is not as good as pure java/processing however it enables you to use some of the nice features in groovy.

Re: Groovy Processing
Reply #1 - Sep 24th, 2008, 1:35pm
 
Thank you for this example with groovy integration.
This is nice!

You have an idea how it could be integrated into a webpage?
I like the way you could change the code on the fly.
Re: Groovy Processing
Reply #2 - Sep 24th, 2008, 2:27pm
 
I am curious. I just started to look at Groovy, nice language, and I found in an embeddable folder a groovy-all-1.5.6.jar
I thought it was needed to run a Groovy applet.
This file is quite large: 3MB, that's a lot compared to the 350KB (more or less) of a small Processing sketch in jar form.
Do we need this big file to run a Groovy applet? It is not enormous (some Flash applets can be bigger!) but still a lot.
Re: Groovy Processing
Reply #3 - Sep 24th, 2008, 2:57pm
 
Getting it to run in the browser is not easy.

http://groovy.codehaus.org/Grapplet

The problem is that groovy uses a special ClassLoader which causes sandbox problems. This means that you need to sign the applet so that people can trust it. Otherwise it will not work.

It is a shame but it doesn't look like there is an easy way to get groovy running in an applet.


Re: Groovy Processing
Reply #4 - Sep 24th, 2008, 3:06pm
 
Hi PhiLho

The large file is basically the groovy interpreter. This is needed to interpret groovy code. I guess with compiled groovy code and a jar optimiser you could decrease the size. However I think groovy applets are not an option until they can be run without signing them.

I think groovy would be great for processing because it simplifies the java syntax and makes it more powerful at the same time. However there are trade offs like performance and difficulty with applets.

Page Index Toggle Pages: 1