index.org (1181B)
1 #+title: lisp4web 2 #+description: 3 #+keywords: 4 5 * lisp4web 6 7 The first/original code was developed as part of OnDoc (nopdf) to 8 allow sexp based communication between the client and the server. 9 10 #+html: <div id="wl" style="display:none"> 11 #+include "wl.wl" src text 12 #+html: </div> 13 14 #+html: <div id="test" style="display:none"> 15 #+include "test.wl" src text 16 #+html: </div> 17 18 #+begin_html 19 <script type="text/javascript" src="wl.js"></script> 20 <style>canvas {width:12em;height:12em;border:1px dashed black}</style> 21 <script type="text/javascript" src="wps.js"></script> 22 <script> 23 function $(Id) {return document.getElementById(Id);} 24 function $$(Id) {return $(Id).textContent;} 25 </script> 26 <div id="out"></div> 27 <p>Sandbox:</p> 28 <p> 29 <textarea id="sandbox" style="width:100%" rows="18"> 30 </textarea> 31 </p> 32 <script> 33 function sandbox() { 34 var l = new wl; 35 alert(l.str(l.parse("one \"hi \\\"George\\\" go\" (12 3 (a b) 456) 7.8"))); 36 alert(l.str(l.parse("one \"hi \\\"George\\\" go\" (12 3 (a . b) . 456) 7.8"))); 37 alert(l.str(l.parse("(. (1 . 2))"))); 38 } 39 </script> 40 <button onclick="javascript:sandbox();">Run</button> code from sandbox. 41 #+end_html 42 43 ** Links 44 45 - http://joeganley.com/code/jslisp.html