<br><br><div class="gmail_quote">On Thu, Jul 2, 2009 at 1:19 AM, Dave Gurnell <span dir="ltr"><<a href="mailto:d.j.gurnell@gmail.com">d.j.gurnell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div>Hi YC,</div><div><br></div>There are two current, well documented ways of generating Javascript source using Scheme code:<div><br></div><div><span style="white-space: pre;">        <a href="http://planet.plt-scheme.org/package-source/dherman/javascript.plt/9/2/planet-docs/javascript/index.html" target="_blank">http://planet.plt-scheme.org/package-source/dherman/javascript.plt/9/2/planet-docs/javascript/index.html</a></span></div>
<div><span style="white-space: pre;"></span><span style="white-space: pre;">        <a href="http://planet.plt-scheme.org/package-source/untyped/mirrors.plt/2/2/planet-docs/mirrors/index.html" target="_blank">http://planet.plt-scheme.org/package-source/untyped/mirrors.plt/2/2/planet-docs/mirrors/index.html</a></span><br>
<div><br></div><div>To my knowledge, neither of these libraries compile actual Scheme into Javascript, but they both have a parenthetic syntax for writing Javascript code. So, for example, in Mirrors you can do stuff like this:</div>
<div><br></div><div><font face="Monaco" size="3"><span style="font-size: 13px;"> (js (alert ,(string-append "Hello " "world"))</span></font></div><div><br></div><div>I use Mirrors with jQuery quite a lot;</div>
<div><br></div><div><font face="Monaco" size="3"><span style="font-size: 13px;"> (js (!dot ($ "#mybutton")</span></font></div><div><font face="Monaco" size="3"><span style="font-size: 13px;"> (click (function () (alert "Hi")))))</span></font></div>
<div></div></div></div></blockquote><div><br>Cool - this approach seems simple and effective - are you able to write more complicated code structures such as if/while/case? I envision for those you currently write in javascript? (javascript is not bad, of course).<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div><br></div><div>As a user of PLT in a commercial environment, I'd be more than happy to talk ideas/code/etc. </div>
<div></div></div></div></blockquote><div><br>Great! <br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div><br></div>
<div>Last note... AJAX and web frameworks... we *do* have a working framework, but it's basically undocumented. I'd welcome feedback/comment/collaboration if you want to take a look (let me know if you have versioning problems when you compile it):</div>
<div><br></div><div> $ svn co <a href="http://svn.untyped.com/smoke/trunk/src" target="_blank">http://svn.untyped.com/smoke/trunk/src</a> <somewhere></div><div> $ cd <somewhere></div><div> $ mzc run-tests.ss && mzscheme run-tests.ss</div>
<div> Open <a href="http://localhost:8765" target="_blank">http://localhost:8765</a> in your browser.</div><div></div></div></div></blockquote><div><br>Thanks for the information Dave - I'll download and play with it over the weekend and followup with you then.<br>
</div></div><br>Cheers,<br>yc<br><br><br>