<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Greg, interesting thought. It would work the other way around, but it'd be easy enough to set up a node server to run the javascript. There's no IO allowed or any other blocking operations so I can make this all automatic. Still, that's another moving part I'd just as soon not have.<div><br></div><div>Strange there's no JavaScript embedding in GHC, or there doesn't seem to be.<div><br></div><div>Cheers,</div><div>Bob</div><div><br><div><div>On 2012-09-09, at 6:24 PM, Greg Fitzgerald &lt;<a href="mailto:garious@gmail.com">garious@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Bob,<div><br></div><div>&gt; All I really need is to allow users to write some JavaScript&nbsp;</div><div>&gt; that accepts a single JSON 'file/string' from my Haskell&nbsp;</div><div>&gt; program and produces another JSON 'file/string' that my&nbsp;</div>

<div>&gt; Haskell program will accept.
</div><div><br></div><div>One option is to make your Haskell program an HTTP server, and then use Node.js to send and receive JSON files.</div><div><br></div><div><a href="http://www.happstack.com/docs/happstack-lite-7.2.0/doc/html/happstack-lite/index.html">http://www.happstack.com/docs/happstack-lite-7.2.0/doc/html/happstack-lite/index.html</a>
</div><div><br></div><div><a href="http://nodejs.org/">http://nodejs.org/</a></div><div><br></div><div>-Greg</div><div><br><br><div class="gmail_quote">On Sat, Sep 8, 2012 at 12:08 PM, Bob Hutchison <span dir="ltr">&lt;<a href="mailto:hutch-lists@recursive.ca" target="_blank">hutch-lists@recursive.ca</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I've looked around with no success… this surprises me actually. Has anyone embedded SpiderMonkey, V8, or any other relatively decent JavaScript interpreters in GHC (using the FFI)?<br>
<br>
I did find <a href="http://justinethier.github.com/husk-scheme/" target="_blank">http://justinethier.github.com/husk-scheme/</a> which is a scheme R5RS implementation (I could make this work). There's also some work done embedding Lua. I also found a number of packages that compile javascript to Haskell, or the other way around, but I don't need that kind of thing.<br>


<br>
All I really need is to allow users to write some JavaScript that accepts a single JSON 'file/string' from my Haskell program and produces another JSON 'file/string' that my Haskell program will accept.<br>


<br>
Thanks,<br>
Bob<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>
</blockquote></div><br></div></div></body></html>