<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[pdjs: JavaScript for PD]]></title><description><![CDATA[<p>Hey, I've made <a href="https://github.com/mganss/pdjs" rel="nofollow">pdjs</a>, an external that executes JavaScript using <a href="https://v8.dev/" rel="nofollow">V8</a> and tries to emulate Max's <a href="https://docs.cycling74.com/max8/refpages/js" rel="nofollow">js</a> object.</p>
<p>It lives at <a href="https://github.com/mganss/pdjs" rel="nofollow">https://github.com/mganss/pdjs</a> and is available through deken for x64-windows, x64-linux, and arm64-linux currently (x64-macos planned).</p>
<p>Most core functionality is there so a lot of code written for Max js that doesn't use any extra objects (like LiveAPI, Buffer, Dict, etc.) should run unchanged.</p>
<p>Please report any issues or missing features at GitHub.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 03:34:23 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13131.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Nov 2020 18:31:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Thu, 12 Nov 2020 18:31:43 GMT]]></title><description><![CDATA[<p>Hey, I've made <a href="https://github.com/mganss/pdjs" rel="nofollow">pdjs</a>, an external that executes JavaScript using <a href="https://v8.dev/" rel="nofollow">V8</a> and tries to emulate Max's <a href="https://docs.cycling74.com/max8/refpages/js" rel="nofollow">js</a> object.</p>
<p>It lives at <a href="https://github.com/mganss/pdjs" rel="nofollow">https://github.com/mganss/pdjs</a> and is available through deken for x64-windows, x64-linux, and arm64-linux currently (x64-macos planned).</p>
<p>Most core functionality is there so a lot of code written for Max js that doesn't use any extra objects (like LiveAPI, Buffer, Dict, etc.) should run unchanged.</p>
<p>Please report any issues or missing features at GitHub.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Thu, 12 Nov 2020 18:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sun, 15 Nov 2020 10:09:43 GMT]]></title><description><![CDATA[<p>That's great!<br />
Will try it as soon as the OSX binaries are available.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/2</guid><dc:creator><![CDATA[dom1817]]></dc:creator><pubDate>Sun, 15 Nov 2020 10:09:43 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 13 Nov 2020 15:37:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jancsika">@jancsika</a><img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/point_up_2.png" title="point_up_2" alt=":point_up_2:" /></p>
<p>Nice! Very nice.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/3</guid><dc:creator><![CDATA[EEight]]></dc:creator><pubDate>Fri, 13 Nov 2020 15:37:50 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sat, 14 Nov 2020 22:39:03 GMT]]></title><description><![CDATA[<p>What's missing for compile pdjs for OSx?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/4</guid><dc:creator><![CDATA[emviveros]]></dc:creator><pubDate>Sat, 14 Nov 2020 22:39:03 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sun, 15 Nov 2020 12:02:51 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/emviveros">@emviveros</a> Not much, hopefully. If all goes well I just need to set up a development environment on a Mac and build V8 and pdjs. I'll try to get this done early next week.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/5</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Sun, 15 Nov 2020 12:02:51 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sun, 15 Nov 2020 15:36:43 GMT]]></title><description><![CDATA[<p>Great! Thanks a lot for your work! If you need a mac machine to compile pdjs stuff I'm at your disposal.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/6</guid><dc:creator><![CDATA[emviveros]]></dc:creator><pubDate>Sun, 15 Nov 2020 15:36:43 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Mon, 16 Nov 2020 19:00:53 GMT]]></title><description><![CDATA[<p>The macOS version has been released on deken <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/apple.png" title="apple" alt=":apple:" /> <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/rocket.png" title="rocket" alt=":rocket:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/7</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Mon, 16 Nov 2020 19:00:53 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Mon, 21 Dec 2020 05:10:27 GMT]]></title><description><![CDATA[<p>I'm just starting out with Pure Data, but this thing it looks really interesting to me.<br />
I would love to see some patches with pdjs.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/8</guid><dc:creator><![CDATA[tabache]]></dc:creator><pubDate>Mon, 21 Dec 2020 05:10:27 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Mon, 21 Dec 2020 10:46:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/tabache">@tabache</a> You can find a few patches in the <code>test-*</code>  directories of the pdjs repo here: <a href="https://github.com/mganss/pdjs/tree/master/test" rel="nofollow">https://github.com/mganss/pdjs/tree/master/test</a><br />
These are part of the automated tests for pdjs so don't reflect real use cases but might be helpful to get a feel for how pdjs can be used. You'll probably need to add <code>[declare -path pdjs]</code> if pdjs isn't in PD's default search paths.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/9</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Mon, 21 Dec 2020 10:46:24 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 12 Feb 2021 00:27:09 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/mganss">@mganss</a> said:</p>
<blockquote>
<p>an external that executes JavaScript using <a href="https://v8.dev/" rel="nofollow">V8</a></p>
</blockquote>
<p>Really nice work!</p>
<p>Could you please give a brief summary of how to implement such an engine or library in PD?<br />
What have been the steps to embed it in PD?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/10</guid><dc:creator><![CDATA[lacuna]]></dc:creator><pubDate>Fri, 12 Feb 2021 00:27:09 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 12 Feb 2021 12:32:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lacuna">@lacuna</a> Thanks. Here's a nice HOWTO about writing externals for PD: <a href="https://github.com/pure-data/externals-howto" rel="nofollow">https://github.com/pure-data/externals-howto</a><br />
Documentation about embedding V8 can be found here: <a href="https://v8.dev/docs/embed" rel="nofollow">https://v8.dev/docs/embed</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/11</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Fri, 12 Feb 2021 12:32:15 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 05 Mar 2021 02:51:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/mganss">@mganss</a> <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jancsika">@jancsika</a> Following some ideas from <a href="https://forum.pdpatchrepo.info/topic/13267/paradigms-useful-for-teaching-pd/32" rel="nofollow">this thread</a>, i made a simple wrapper for pdjs, with which you can write javascript code directly into objects. It is not very pretty and you have to use [] instead of {}, but it is some fun:</p>
<p><a href="/uploads/files/1614911918859-javascript.zip">javascript.zip</a> <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p><img src="/uploads/files/1614911930636-bildschirmfoto-vom-2021-03-05-03-33-47.png" alt="Bildschirmfoto vom 2021-03-05 03-33-47.png" class="img-responsive img-markdown" /></p>
<p>As the script file is rewritten and the code compiled each time the wrapper is called, this could also work as an extension, where javascript.pd and script are within an extension folder and can be called from everywhere. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
<p>This is just experimental and an early idea. No idea if this could go somewhere. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/12</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Fri, 05 Mar 2021 02:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 05 Mar 2021 10:32:27 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> Very nice! Perhaps pdjs could be extended by allowing script to be provided in the <code>[js]</code> object's arguments, thereby circumventing the requirement for a script file.</p>
<p>Max has the ability to edit the script using an internal editor. Is there a way to provide something similar in PD? Perhaps using a separate editor object and passing the text to pdjs via a message?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/13</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Fri, 05 Mar 2021 10:32:27 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 05 Mar 2021 14:01:52 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/mganss">@mganss</a> It would be possible to open a [text] from click. Problem is that Pd freezes if curly brackets are inserted into [text] and saved. The impulse would be to copy/paste Javascript code into the [text] and that would be dangerous... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":(" alt=":(" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/14</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Fri, 05 Mar 2021 14:01:52 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 05 Mar 2021 14:31:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> it is possible to use curly brackets in the &quot;textwindow&quot; from ofelia, but no idea how to implement that in another external...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/15</guid><dc:creator><![CDATA[Jona]]></dc:creator><pubDate>Fri, 05 Mar 2021 14:31:42 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Fri, 05 Mar 2021 19:02:06 GMT]]></title><description><![CDATA[<p>That's great!<br />
For characters limitation in GUI, like curly braces, there was a PR on the road<br />
<a href="https://github.com/pure-data/pure-data/pull/953" rel="nofollow">https://github.com/pure-data/pure-data/pull/953</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/16</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/16</guid><dc:creator><![CDATA[60hz]]></dc:creator><pubDate>Fri, 05 Mar 2021 19:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sun, 20 Jun 2021 07:46:43 GMT]]></title><description><![CDATA[<p>Fantastic work! I've been working with pyext and pdlua before, but still most proficient with js <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Regarding having an editor inside PD - perhaps the underused Tcl/Tk GUI plugins could come in help with this, will look into this!</p>
<p>will try to add maybe simple REPLish input first, some examples of the possibilities:<br />
<a href="https://puredata.info/docs/guiplugins/GUIPlugins/" rel="nofollow">https://puredata.info/docs/guiplugins/GUIPlugins/</a><br />
<a href="https://github.com/pd-externals/tclprompt-plugin" rel="nofollow">https://github.com/pd-externals/tclprompt-plugin</a><br />
<a href="https://forum.pdpatchrepo.info/topic/9960/tcl-for-a-rainy-day" rel="nofollow">https://forum.pdpatchrepo.info/topic/9960/tcl-for-a-rainy-day</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/17</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/17</guid><dc:creator><![CDATA[eeropic]]></dc:creator><pubDate>Sun, 20 Jun 2021 07:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Sun, 20 Jun 2021 09:30:47 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/eeropic">@eeropic</a> FWIW here are two more things I'd love to have:</p>
<ul>
<li>
<p>Autowatch. Here's a small cross platform solution: <a href="https://github.com/FigBug/Gin/blob/master/modules/gin/utilities/gin_filesystemwatcher.cpp" rel="nofollow">https://github.com/FigBug/Gin/blob/master/modules/gin/utilities/gin_filesystemwatcher.cpp</a></p>
</li>
<li>
<p>Chrome Developer Tools integration (debugging): <a href="https://hyperandroid.com/2020/02/12/v8-inspector-from-an-embedder-standpoint/" rel="nofollow">https://hyperandroid.com/2020/02/12/v8-inspector-from-an-embedder-standpoint/</a><br />
Not sure if this would allow debugging from VS Code as well.</p>
</li>
</ul>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/18</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/18</guid><dc:creator><![CDATA[mganss]]></dc:creator><pubDate>Sun, 20 Jun 2021 09:30:47 GMT</pubDate></item><item><title><![CDATA[Reply to pdjs: JavaScript for PD on Mon, 21 Jun 2021 18:43:07 GMT]]></title><description><![CDATA[<p>I wrote a patch to document a little pdjs external in:<br />
<a href="https://forum.pdpatchrepo.info/topic/13510/modules-in-pdjs/4" rel="nofollow">https://forum.pdpatchrepo.info/topic/13510/modules-in-pdjs/4</a></p>
<p>Open to contributions.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/19</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13131/pdjs-javascript-for-pd/19</guid><dc:creator><![CDATA[emviveros]]></dc:creator><pubDate>Mon, 21 Jun 2021 18:43:07 GMT</pubDate></item></channel></rss>