<div class="gmail_quote">Hi James,</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Mon, Mar 22, 2010 at 8:30 PM, James Long <span dir="ltr"><<a href="mailto:longster@gmail.com">longster@gmail.com</a>></span> wrote:</div>

<div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is anyone else interested in working on this?</blockquote><div><br></div><div>I've kicking a similar idea around for a while; I'd like to help.</div>

<div><br></div><div>What I've been thinking of is basically a parser for a nearly-JS syntax that generated s-expressions targeting some lightweight macro layer.  Where JS and Scheme semantics or runtime environments diverged, it'd be fine to use Scheme's.  Instead of implementing a JS interpreter, it'd be a JS-like syntax for the Scheme interpreter.</div>

<div><br></div><div>For example:</div><div><br></div><div>function adder(n) {</div><div>    return function(a) {</div><div>        return n + a;</div><div>    }</div><div>}</div><div><br></div><div>Could be parsed into something like:</div>

<div><br></div><div>(function adder (n)</div><div>  (function #f (a)</div><div>    (+ n a)))</div><div><br></div><div>And with the aid of something like:</div><div><br></div><div><div>(define-macro (function name params . body)</div>

<div>  (if name</div><div>      `(define ,name (function #f ,params ,@body))</div><div>      `(lambda ,params ,@body)))</div><div><br></div></div><div>Get something like:</div><div><br></div><div><div>(define adder</div>
<div>
  (lambda (n)</div><div>    (lambda (a)</div><div>      (+ n a ))))</div><div><br></div><div>If you've got something different in mind, I'd be up for helping anyway.  I think a JS syntax for Scheme is a great way to introduce people to Scheme that wouldn't be interested otherwise.</div>

<div><br></div><div>Thanks,</div><div><br></div><div>-Ben</div></div></div>