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.
IndexDiscussionGeneral Discussion,  Status › Ruby-Processing
Pages: 1 2 
Ruby-Processing (Read 7736 times)
Re: Ruby-Processing
Reply #15 - Apr 20th, 2008, 4:21pm
 
Sorry, Seltar — I haven't seen any Ruby-Processing-specific applet crashes yet, just the same ones that affect all Processing sketches (like opening more than one OpenGL applet on a Mac). I'd like to chase this down. If you wouldn't mind sending me the Java Console log of the crash, that would be wonderful. jashkenas at gmail dot com
Re: Ruby-Processing
Reply #16 - May 3rd, 2008, 11:33pm
 
Okay, Processing Crew.

Ruby-Processing 0.9 is out, which brings some needed bug-fixing, along with goodies:

Inspired by NodeBox, Ruby-Processing now sports the ability to have sliders control numeric variables in your sketches. If you're using an instance variable, say, @speed, to control the speed of your sketch.
   
   has_slider :speed
   
Will bring up a panel alongside with a slider that controls the speed. It can take a range of values as an optional parameter. Check out and run jwishy.rb for an example.
 
 Multi-platform app export! Exporting your Ruby-Processing apps will now create executable applications for Mac/Windows/Linux.
   
 Live coding support. Now you can do script/live path/to/sketch.rb to open up an interactive session with your sketch available as @app.

Re: Ruby-Processing
Reply #17 - May 18th, 2008, 6:10pm
 
Hi Jash,

Sorry, I completely forgot I asked a question in this thread.

What I was wondering was this;

Would it be possible to have a normal application made in processing, which could then load ruby files into at run time?

So say in your main program you'd have something like

Code:

class Plugin{
string File$;
Plugin(string f){
File$=f;
}

void draw(){
runRuby(File$); //obviously wouldn't be that simple
}
}


and then whatever you had written in your ruby file would be run inside the current app?

Is that possible? Would it be possible for the ruby code to be able to grab variables from within the parent app? Am I barking up the wrong tree? Is it possible, but not in the way I've described?


Thanks
Martin
Re: Ruby-Processing
Reply #18 - May 18th, 2008, 9:33pm
 
Sure, Manic, it's possible ... But that's not what Ruby-Processing will help you do. If you'd like to run arbitrary Ruby code inside of your Java, then grab the JRuby jar, and run with that. You can create an instance of a Ruby interpreter, and hand it objects and evaluate scripts and whatever. Check out the JRuby wiki for the full details.

In unrelated news (for anyone who's still keeping an eye on this thread) Ruby-Processing just learned a cool new trick. In the latest revision, alongside the usual script/open (which runs a Ruby-Processing sketch), and script/live (which runs an interactive session alongside the sketch), you've now also got script/watch, which keeps an eye on your source file, and will reload the sketch whenever you save a change to it. No more pressing stop and start and waiting for Processing to reload. You can continually hit save and keep an eye on how things are going.

http://github.com/jashkenas/ruby-processing/tarball/master
Re: Ruby-Processing
Reply #19 - May 18th, 2008, 11:48pm
 
Aah, thanks for telling me about JRuby, I'll take a good look at that.

Thanks for a quick reply.

Martin
Re: Ruby-Processing
Reply #20 - May 28th, 2008, 8:33pm
 
We just added a new forum category to talk about the exciting Ruby-Processing project:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=implementations
Pages: 1 2