fjsc: moving resources around and added some help

chris.double 2006-12-17 05:58:42 +00:00
parent 1cdeb8c343
commit 7ae65d7fc3
5 changed files with 30 additions and 5 deletions

View File

@ -70,7 +70,7 @@ USING: kernel html furnace xml io httpd sequences
! the 'fjsc' responder.
"fjsc-resources" [
[
"apps/furnace-fjsc/resources/" resource-path "doc-root" set
"libs/fjsc/resources/" resource-path "doc-root" set
file-responder
] with-scope
] add-simple-responder

View File

@ -1,11 +1,36 @@
<h1>Factor to Javascript Compiler</h1>
<table border="0">
<tr><td valign="top">
<form id="toeval" onsubmit="factor.server_eval($('#code').get(0).value);return false;" method="post">
<textarea name="code" id="code" cols="64" rows="10">
</textarea>
<input type="submit"/>
</form>
<div id="compiled">
</div>
<textarea id="compiled" cols="64" row="5">
</textarea>
<div id="stack">
</div>
<div id="playground">
</div>
</td>
<td valign="top">
<p>More information on the Factor to Javascript compiler can be found at these blog posts:"
<ul>
<li><a href="http://www.bluishcoder.co.nz/2006/12/compiling-factor-to-javascript.html">Factor to Javascript Compiler</a></li>
<li><a href="http://www.bluishcoder.co.nz/2006/12/factor-to-javascript-compiler-updates.html">Factor to Javascript Compiler Updates</a></li>
</ul>
</p>
<p>Some useful words:
<dl>
<dt>vocabs ( -- seq )</dt>
<dd>Return a sequence of available vocabularies</dd>
<dt>words ( string -- seq )</dt>
<dd>Return a sequence of words in the given vocabulary</dd>
<dt>all-words ( -- seq )</dt>
<dd>Return a sequence of all words</dd>
</dl>
</p>
<p>The contents of <a href="/responder/fjsc-resources/bootstrap.factor">bootstrap.factor</a> have been loaded on startup.</p>
</td>
</tr>
</table>

View File

@ -120,7 +120,7 @@ Factor.prototype.make_quotation = function(source, func) {
Factor.prototype.server_eval = function(text, next) {
var self = this;
$.post("/responder/fjsc/compile", { code: text }, function(result) {
document.getElementById('compiled').innerHTML="<pre>" + result + "</pre>";
document.getElementById('compiled').value=result;
document.getElementById('code').value="";
var func = eval(result);
factor.cont.next = function() { self.display_datastack(); }