<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(Both papers are available for download via tha papers page.)<br></blockquote><div><br></div><div>Awesome!   The links on the Developer Documentation page did not work, but I was able to download at least the first paper.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
For generating Javascript an alternative to adding a new backend may be<br>
to use Emscripten to compile the C code generated by the Mercury<br>
compiler.<br>
<br></blockquote><br></div><div class="gmail_quote">I'm already setting up to do the Emscripten thing with mercury's output C.  It doesn't quite consume raw C, but  is a fun project and I intend to look at how they are interacting with asmjs.   However, my immediate goal is to get the Mercury language into Code Combat ( <a href="https://codecombat.com/">https://codecombat.com/</a> ) which requires outputting a JavaScript/JSON/AST sort of thing ( <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API">https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API</a> ).   And instead of writing a mercury compiler in JavaScript (which is what they do for Python and Clojure) I figured it would be easier to write a JavaScript backend for the existing Mercury Compiler.   I figure I can output the AST along side the JavaScript.<br><br></div><div class="gmail_quote">Also, I get enough of a "Glue these two projects together with a build script" at work and want something a bit more challenging at home.<br><br><br></div><div class="gmail_quote">Thanks!<br><br></div><div class="gmail_quote">Charles<br></div></div></div>