fjsc: moving resources around and added some help
parent
1cdeb8c343
commit
7ae65d7fc3
|
@ -70,7 +70,7 @@ USING: kernel html furnace xml io httpd sequences
|
||||||
! the 'fjsc' responder.
|
! the 'fjsc' responder.
|
||||||
"fjsc-resources" [
|
"fjsc-resources" [
|
||||||
[
|
[
|
||||||
"apps/furnace-fjsc/resources/" resource-path "doc-root" set
|
"libs/fjsc/resources/" resource-path "doc-root" set
|
||||||
file-responder
|
file-responder
|
||||||
] with-scope
|
] with-scope
|
||||||
] add-simple-responder
|
] add-simple-responder
|
||||||
|
|
|
@ -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">
|
<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 name="code" id="code" cols="64" rows="10">
|
||||||
</textarea>
|
</textarea>
|
||||||
<input type="submit"/>
|
<input type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
<div id="compiled">
|
<textarea id="compiled" cols="64" row="5">
|
||||||
</div>
|
</textarea>
|
||||||
<div id="stack">
|
<div id="stack">
|
||||||
</div>
|
</div>
|
||||||
<div id="playground">
|
<div id="playground">
|
||||||
</div>
|
</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>
|
||||||
|
|
|
@ -120,7 +120,7 @@ Factor.prototype.make_quotation = function(source, func) {
|
||||||
Factor.prototype.server_eval = function(text, next) {
|
Factor.prototype.server_eval = function(text, next) {
|
||||||
var self = this;
|
var self = this;
|
||||||
$.post("/responder/fjsc/compile", { code: text }, function(result) {
|
$.post("/responder/fjsc/compile", { code: text }, function(result) {
|
||||||
document.getElementById('compiled').innerHTML="<pre>" + result + "</pre>";
|
document.getElementById('compiled').value=result;
|
||||||
document.getElementById('code').value="";
|
document.getElementById('code').value="";
|
||||||
var func = eval(result);
|
var func = eval(result);
|
||||||
factor.cont.next = function() { self.display_datastack(); }
|
factor.cont.next = function() { self.display_datastack(); }
|
Loading…
Reference in New Issue