<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: js.Processing with Rhino</title>
	<atom:link href="http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/</link>
	<description>mon qui si, mon qui d'où</description>
	<lastBuildDate>Mon, 08 Mar 2010 12:57:17 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jzzz</title>
		<link>http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/comment-page-1/#comment-55251</link>
		<dc:creator>jzzz</dc:creator>
		<pubDate>Fri, 26 Jun 2009 19:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cricketschirping.com/weblog/?p=1341#comment-55251</guid>
		<description>Still working on it, hope to write it up soon. The Evaluate-tool simply picks selected text from current sketch and sends it to localhost on a fixed port. Following the above code that text is read with Server and evaluated on a js context. Thus you can execute new processing java code as well while the sketch is running.. it does add to the sketching factor.

Here&#039;s the Evaluate-tool:
http://pinktwins.com/disk/p5/Evaluate.zip

And I&#039;m sorry to say that it calls a function that only exists in my version of processing, editor.clearConsole();. Remove this line from run() and recompile before trying to use it.

Processing sketch for the Java host, modified from sketch on this page:

http://pinktwins.com/disk/p5/PSJavascript.zip

Processing sketch with javascript to try it out:

http://pinktwins.com/disk/p5/js_code.zip

So, install Evaluate-tool, open the sketches, run java host, select all text on js_code, and do &quot;Tools -&gt; Evaluate Selection&quot;.
(and fix the image path from js_code first).

Apologies for lack of polish, this is what I could manage with the time I have now. And js_code makes no sense visually, it just shows that Processing calls can be made, and drawing can be built up dynamically.

(Evaluate goes to Processing.app/Contents/Resources/Java/tools on a mac)</description>
		<content:encoded><![CDATA[<p>Still working on it, hope to write it up soon. The Evaluate-tool simply picks selected text from current sketch and sends it to localhost on a fixed port. Following the above code that text is read with Server and evaluated on a js context. Thus you can execute new processing java code as well while the sketch is running.. it does add to the sketching factor.</p>
<p>Here&#8217;s the Evaluate-tool:<br />
<a href="http://pinktwins.com/disk/p5/Evaluate.zip" rel="nofollow">http://pinktwins.com/disk/p5/Evaluate.zip</a></p>
<p>And I&#8217;m sorry to say that it calls a function that only exists in my version of processing, editor.clearConsole();. Remove this line from run() and recompile before trying to use it.</p>
<p>Processing sketch for the Java host, modified from sketch on this page:</p>
<p><a href="http://pinktwins.com/disk/p5/PSJavascript.zip" rel="nofollow">http://pinktwins.com/disk/p5/PSJavascript.zip</a></p>
<p>Processing sketch with javascript to try it out:</p>
<p><a href="http://pinktwins.com/disk/p5/js_code.zip" rel="nofollow">http://pinktwins.com/disk/p5/js_code.zip</a></p>
<p>So, install Evaluate-tool, open the sketches, run java host, select all text on js_code, and do &#8220;Tools -&gt; Evaluate Selection&#8221;.<br />
(and fix the image path from js_code first).</p>
<p>Apologies for lack of polish, this is what I could manage with the time I have now. And js_code makes no sense visually, it just shows that Processing calls can be made, and drawing can be built up dynamically.</p>
<p>(Evaluate goes to Processing.app/Contents/Resources/Java/tools on a mac)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: banksean</title>
		<link>http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/comment-page-1/#comment-54751</link>
		<dc:creator>banksean</dc:creator>
		<pubDate>Wed, 17 Jun 2009 23:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.cricketschirping.com/weblog/?p=1341#comment-54751</guid>
		<description>Got a link to more info on this project?  It sounds pretty interesting.

to get rid of &#039;p5&#039; you can just use the Javascript &#039;with&#039; keyword:


with(p5) {
  background(255);
  stroke(getColor(0, 0, 0, 64));
  line(0, 0, 100, 100);
}
</description>
		<content:encoded><![CDATA[<p>Got a link to more info on this project?  It sounds pretty interesting.</p>
<p>to get rid of &#8216;p5&#8217; you can just use the Javascript &#8216;with&#8217; keyword:</p>
<p>with(p5) {<br />
  background(255);<br />
  stroke(getColor(0, 0, 0, 64));<br />
  line(0, 0, 100, 100);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jzzz</title>
		<link>http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/comment-page-1/#comment-54748</link>
		<dc:creator>jzzz</dc:creator>
		<pubDate>Wed, 17 Jun 2009 22:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.cricketschirping.com/weblog/?p=1341#comment-54748</guid>
		<description>Here is the fix so far, enjoy:
(it would be really nice to get rid of the &quot;p5&quot; prefix in js!)

----- clip -----

Server serv;
Client cl;

void draw() {
  callIfNotNull(jsDraw);

  cl = serv.available();
  if(cl != null) {
    jsinput = cl.readString();
    try {
      cx.evaluateString(scope, jsinput, &quot;&quot;, 1, null);
    } 
    catch(Exception e) {
      System.out.println(&quot;Eval exception.&quot;);
    }
  }  
}

----- clip -----

Then just send new js code to Server with Client. I made a Tool for this to select js code in a sketch, and hit cmd-. to evaluate it, SuperCollider style.

best,
j</description>
		<content:encoded><![CDATA[<p>Here is the fix so far, enjoy:<br />
(it would be really nice to get rid of the &#8220;p5&#8221; prefix in js!)</p>
<p>&#8212;&#8212;- clip &#8212;&#8212;-</p>
<p>Server serv;<br />
Client cl;</p>
<p>void draw() {<br />
  callIfNotNull(jsDraw);</p>
<p>  cl = serv.available();<br />
  if(cl != null) {<br />
    jsinput = cl.readString();<br />
    try {<br />
      cx.evaluateString(scope, jsinput, &#8220;&#8221;, 1, null);<br />
    }<br />
    catch(Exception e) {<br />
      System.out.println(&#8220;Eval exception.&#8221;);<br />
    }<br />
  }<br />
}</p>
<p>&#8212;&#8212;- clip &#8212;&#8212;-</p>
<p>Then just send new js code to Server with Client. I made a Tool for this to select js code in a sketch, and hit cmd-. to evaluate it, SuperCollider style.</p>
<p>best,<br />
j</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jzzz</title>
		<link>http://www.cricketschirping.com/weblog/2008/12/07/jsprocessing-with-rhino/comment-page-1/#comment-54747</link>
		<dc:creator>jzzz</dc:creator>
		<pubDate>Wed, 17 Jun 2009 22:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.cricketschirping.com/weblog/?p=1341#comment-54747</guid>
		<description>Good stuff. I&#039;m using this to evaluate new Processing code while the sketch is running. Nice.</description>
		<content:encoded><![CDATA[<p>Good stuff. I&#8217;m using this to evaluate new Processing code while the sketch is running. Nice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
