Mostly work on generating better documentation.
This commit is contained in:
parent
4c2380ca26
commit
41cecdc522
34 changed files with 1531 additions and 794 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html PUBLIC ""
|
||||
"">
|
||||
<html><head><meta charset="UTF-8" /><title>beowulf</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Beowulf</span> <span class="project-version">0.3.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="intro.html"><div class="inner"><span>beowulf</span></div></a></li><li class="depth-1 "><a href="mexpr.html"><div class="inner"><span>M-Expressions</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>beowulf</span></div></div></li><li class="depth-2 branch"><a href="beowulf.bootstrap.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bootstrap</span></div></a></li><li class="depth-2 branch"><a href="beowulf.cons-cell.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cons-cell</span></div></a></li><li class="depth-2 branch"><a href="beowulf.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="beowulf.gendoc.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gendoc</span></div></a></li><li class="depth-2 branch"><a href="beowulf.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-2 branch"><a href="beowulf.io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></a></li><li class="depth-2 branch"><a href="beowulf.oblist.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oblist</span></div></a></li><li class="depth-2 branch"><a href="beowulf.read.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>read</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></div></li><li class="depth-3 branch"><a href="beowulf.reader.char-reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>char-reader</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.generate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>generate</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.macros.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>macros</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="beowulf.reader.simplify.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplify</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#beowulf" name="beowulf"></a>beowulf</h1>
|
||||
<html><head><meta charset="UTF-8" /><title>beowulf</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Beowulf</span> <span class="project-version">0.3.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="intro.html"><div class="inner"><span>beowulf</span></div></a></li><li class="depth-1 "><a href="mexpr.html"><div class="inner"><span>M-Expressions</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>beowulf</span></div></div></li><li class="depth-2 branch"><a href="beowulf.bootstrap.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bootstrap</span></div></a></li><li class="depth-2 branch"><a href="beowulf.cons-cell.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cons-cell</span></div></a></li><li class="depth-2 branch"><a href="beowulf.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="beowulf.gendoc.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gendoc</span></div></a></li><li class="depth-2 branch"><a href="beowulf.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-2 branch"><a href="beowulf.io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></a></li><li class="depth-2 branch"><a href="beowulf.manual.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manual</span></div></a></li><li class="depth-2 branch"><a href="beowulf.oblist.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oblist</span></div></a></li><li class="depth-2 branch"><a href="beowulf.read.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>read</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></div></li><li class="depth-3 branch"><a href="beowulf.reader.char-reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>char-reader</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.generate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>generate</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.macros.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>macros</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="beowulf.reader.simplify.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplify</span></div></a></li><li class="depth-2"><a href="beowulf.scratch.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>scratch</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#beowulf" name="beowulf"></a>beowulf</h1>
|
||||
<p>LISP 1.5 is to all Lisp dialects as Beowulf is to Emglish literature.</p>
|
||||
<h2><a href="#what-this-is" name="what-this-is"></a>What this is</h2>
|
||||
<p>A work-in-progress towards an implementation of Lisp 1.5 in Clojure. The objective is to build a complete and accurate implementation of Lisp 1.5 as described in the manual, with, in so far as is possible, exactly the same bahaviour - except as documented below.</p>
|
||||
|
|
@ -30,330 +30,601 @@
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Symbol </th>
|
||||
<th>Function </th>
|
||||
<th>Type </th>
|
||||
<th>Signature </th>
|
||||
<th>Implementation </th>
|
||||
<th>Documentation </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>NIL </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>T </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>F </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ADD1 </td>
|
||||
<td>Host function </td>
|
||||
<td>([x]) </td>
|
||||
<td>(ADD1 X) </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AND </td>
|
||||
<td>Host function </td>
|
||||
<td>([& args]) </td>
|
||||
<td>(AND & ARGS) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td><code>T</code> if and only if none of my <code>args</code> evaluate to either <code>F</code> or <code>NIL</code>, else <code>F</code>. In <code>beowulf.host</code> principally because I don’t yet feel confident to define varargs functions in Lisp. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>APPEND </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>Append the the elements of <code>y</code> to the elements of <code>x</code>. All args are assumed to be <code>beowulf.cons-cell/ConsCell</code> objects. See page 11 of the Lisp 1.5 Programmers Manual. </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(APPEND X Y) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=19">11</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=69">61</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>APPLY </td>
|
||||
<td>Host function </td>
|
||||
<td>([function args environment depth]) </td>
|
||||
<td>(APPLY FUNCTION ARGS ENVIRONMENT DEPTH) </td>
|
||||
<td> </td>
|
||||
<td>Apply this <code>function</code> to these <code>arguments</code> in this <code>environment</code> and return the result. For bootstrapping, at least, a version of APPLY written in Clojure. All args are assumed to be symbols or <code>beowulf.cons-cell/ConsCell</code> objects. See page 13 of the Lisp 1.5 Programmers Manual. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ATOM </td>
|
||||
<td>Host function </td>
|
||||
<td>([x]) </td>
|
||||
<td>(ATOM X) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>Returns <code>T</code> if and only if the argument <code>x</code> is bound to an atom; else <code>F</code>. It is not clear to me from the documentation whether <code>(ATOM 7)</code> should return <code>T</code> or <code>F</code>. I’m going to assume <code>T</code>. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAR </td>
|
||||
<td>Host function </td>
|
||||
<td>(CAR X) </td>
|
||||
<td> </td>
|
||||
<td>Return the item indicated by the first pointer of a pair. NIL is treated specially: the CAR of NIL is NIL. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAAAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAAAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAAADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAAADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAADAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAADAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAADDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAADDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADDAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADDAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADDDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADDDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDAAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDAAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDAADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDAADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDADAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDADAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDADDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDADDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDAAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDAAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDADR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDADR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDDAR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDDAR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDDDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDDDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDDR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(CDDR X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDR </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>? </td>
|
||||
<td>Host function </td>
|
||||
<td>(CDR X) </td>
|
||||
<td> </td>
|
||||
<td>Return the item indicated by the second pointer of a pair. NIL is treated specially: the CDR of NIL is NIL. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CONS </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>? </td>
|
||||
<td>Host function </td>
|
||||
<td>(CONS CAR CDR) </td>
|
||||
<td> </td>
|
||||
<td>Construct a new instance of cons cell with this <code>car</code> and <code>cdr</code>. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>COPY </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X) </td>
|
||||
<td>? </td>
|
||||
<td>(COPY X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=70">62</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DEFINE </td>
|
||||
<td>Host function </td>
|
||||
<td>([args]) </td>
|
||||
<td>(DEFINE ARGS) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Bootstrap-only version of <code>DEFINE</code> which, post boostrap, can be overwritten in LISP. The single argument to <code>DEFINE</code> should be an assoc list which should be nconc’ed onto the front of the oblist. Broadly, (SETQ OBLIST (NCONC ARG1 OBLIST)) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DIFFERENCE </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(DIFFERENCE X Y) </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DIVIDE </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X Y) </td>
|
||||
<td>? </td>
|
||||
<td>(DIVIDE X Y) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=34">26</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=72">64</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ERROR </td>
|
||||
<td>Host function </td>
|
||||
<td>([& args]) </td>
|
||||
<td>(ERROR & ARGS) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Throw an error </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EQ </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(EQ X Y) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>Returns <code>T</code> if and only if both <code>x</code> and <code>y</code> are bound to the same atom, else <code>NIL</code>. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EQUAL </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(EQUAL X Y) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>This is a predicate that is true if its two arguments are identical S-expressions, and false if they are different. (The elementary predicate <code>EQ</code> is defined only for atomic arguments.) The definition of <code>EQUAL</code> is an example of a conditional expression inside a conditional expression. NOTE: returns <code>F</code> on failure, not <code>NIL</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EVAL </td>
|
||||
<td>Host function </td>
|
||||
<td>([expr] [expr env depth]) </td>
|
||||
<td>(EVAL EXPR); (EVAL EXPR ENV DEPTH) </td>
|
||||
<td> </td>
|
||||
<td>Evaluate this <code>expr</code> and return the result. If <code>environment</code> is not passed, it defaults to the current value of the global object list. The <code>depth</code> argument is part of the tracing system and should not be set by user code. All args are assumed to be numbers, symbols or <code>beowulf.cons-cell/ConsCell</code> objects. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FACTORIAL </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(FACTORIAL N) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FIXP </td>
|
||||
<td>Host function </td>
|
||||
<td>([x]) </td>
|
||||
<td>(FIXP X) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GENSYM </td>
|
||||
<td>Host function </td>
|
||||
<td>([]) </td>
|
||||
<td>(GENSYM ) </td>
|
||||
<td> </td>
|
||||
<td>Generate a unique symbol. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X Y) </td>
|
||||
<td>? </td>
|
||||
<td>(GET X Y) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=49">41</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=67">59</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GREATERP </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(GREATERP X Y) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>INTEROP </td>
|
||||
<td>Host function </td>
|
||||
<td>([fn-symbol args]) </td>
|
||||
<td>(INTEROP FN-SYMBOL ARGS) </td>
|
||||
<td>(INTEROP) </td>
|
||||
<td>Clojure (or other host environment) interoperation API. <code>fn-symbol</code> is expected to be either 1. a symbol bound in the host environment to a function; or 2. a sequence (list) of symbols forming a qualified path name bound to a function. Lower case characters cannot normally be represented in Lisp 1.5, so both the upper case and lower case variants of <code>fn-symbol</code> will be tried. If the function you’re looking for has a mixed case name, that is not currently accessible. <code>args</code> is expected to be a Lisp 1.5 list of arguments to be passed to that function. Return value must be something acceptable to Lisp 1.5, so either a symbol, a number, or a Lisp 1.5 list. If <code>fn-symbol</code> is not found (even when cast to lower case), or is not a function, or the value returned cannot be represented in Lisp 1.5, an exception is thrown with <code>:cause</code> bound to <code>:interop</code> and <code>:detail</code> set to a value representing the actual problem. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>INTERSECTION </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X Y) </td>
|
||||
<td>(INTERSECTION X Y) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LENGTH </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(L) </td>
|
||||
<td>? </td>
|
||||
<td>(LENGTH L) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=70">62</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LESSP </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(LESSP X Y) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MEMBER </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(A X) </td>
|
||||
<td>? </td>
|
||||
<td>(MEMBER A X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=19">11</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=70">62</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MINUSP </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X) </td>
|
||||
<td>? </td>
|
||||
<td>(MINUSP X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=34">26</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=72">64</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NOT </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(NOT X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=29">21</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=31">23</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=66">58</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NULL </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X) </td>
|
||||
<td>? </td>
|
||||
<td>(NULL X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=19">11</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=65">57</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NUMBERP </td>
|
||||
<td>Host function </td>
|
||||
<td>([x]) </td>
|
||||
<td>(NUMBERP X) </td>
|
||||
<td>PREDICATE </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OBLIST </td>
|
||||
<td>Host function </td>
|
||||
<td>([]) </td>
|
||||
<td>(OBLIST ) </td>
|
||||
<td> </td>
|
||||
<td>Return a list of the symbols currently bound on the object list. <strong>NOTE THAT</strong> in the Lisp 1.5 manual, footnote at the bottom of page 69, it implies that an argument can be passed but I’m not sure of the semantics of this. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ONEP </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X) </td>
|
||||
<td>? </td>
|
||||
<td>(ONEP X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=34">26</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=72">64</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PAIR </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X Y) </td>
|
||||
<td>? </td>
|
||||
<td>(PAIR X Y) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=68">60</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PLUS </td>
|
||||
<td>Host function </td>
|
||||
<td>([& args]) </td>
|
||||
<td>(PLUS & ARGS) </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PRETTY </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td>(PRETTY) </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PRINT </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PROP </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(X Y U) </td>
|
||||
<td>? </td>
|
||||
<td>(PROP X Y U) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=67">59</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QUOTIENT </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(QUOTIENT X Y) </td>
|
||||
<td> </td>
|
||||
<td>I’m not certain from the documentation whether Lisp 1.5 <code>QUOTIENT</code> returned the integer part of the quotient, or a realnum representing the whole quotient. I am for now implementing the latter. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RANGE </td>
|
||||
<td>Lisp variable </td>
|
||||
<td>? </td>
|
||||
<td>(RANGE (LAMBDA (N M) (COND ((LESSP M N) (QUOTE NIL)) ((QUOTE T) (CONS N (RANGE (ADD1 N) M)))))) </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>READ </td>
|
||||
<td>Host function </td>
|
||||
<td>([] [input]) </td>
|
||||
<td>(READ ); (READ INPUT) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>An implementation of a Lisp reader sufficient for bootstrapping; not necessarily the final Lisp reader. <code>input</code> should be either a string representation of a LISP expression, or else an input stream. A single form will be read. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REMAINDER </td>
|
||||
<td>Host function </td>
|
||||
<td>([x y]) </td>
|
||||
<td>(REMAINDER X Y) </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REPEAT </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(N X) </td>
|
||||
<td>(REPEAT N X) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RPLACA </td>
|
||||
<td>Host function </td>
|
||||
<td>([cell value]) </td>
|
||||
<td>(RPLACA CELL VALUE) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Replace the CAR pointer of this <code>cell</code> with this <code>value</code>. Dangerous, should really not exist, but does in Lisp 1.5 (and was important for some performance hacks in early Lisps) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RPLACD </td>
|
||||
<td>Host function </td>
|
||||
<td>([cell value]) </td>
|
||||
<td>(RPLACD CELL VALUE) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Replace the CDR pointer of this <code>cell</code> with this <code>value</code>. Dangerous, should really not exist, but does in Lisp 1.5 (and was important for some performance hacks in early Lisps) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SET </td>
|
||||
<td>Host function </td>
|
||||
<td>([symbol val]) </td>
|
||||
<td>(SET SYMBOL VAL) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Implementation of SET in Clojure. Add to the <code>oblist</code> a binding of the value of <code>var</code> to the value of <code>val</code>. NOTE WELL: this is not SETQ! </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SUB1 </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(N) </td>
|
||||
<td>? </td>
|
||||
<td>(SUB1 N) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=34">26</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=72">64</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SYSIN </td>
|
||||
<td>Host function </td>
|
||||
<td>([filename]) </td>
|
||||
<td>(SYSIN ); (SYSIN FILENAME) </td>
|
||||
<td>(SYSIN) </td>
|
||||
<td>Read the contents of the file at this <code>filename</code> into the object list. If the file is not a valid Beowulf sysout file, this will probably corrupt the system, you have been warned. File paths will be considered relative to the filepath set when starting Lisp. It is intended that sysout files can be read both from resources within the jar file, and from the file system. If a named file exists in both the file system and the resources, the file system will be preferred. <strong>NOTE THAT</strong> if the provided <code>filename</code> does not end with <code>.lsp</code> (which, if you’re writing it from the Lisp REPL, it won’t), the extension <code>.lsp</code> will be appended. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SYSOUT </td>
|
||||
<td>Host function </td>
|
||||
<td>([] [filepath]) </td>
|
||||
<td>(SYSOUT ); (SYSOUT FILEPATH) </td>
|
||||
<td>(SYSOUT) </td>
|
||||
<td>Dump the current content of the object list to file. If no <code>filepath</code> is specified, a file name will be constructed of the symbol <code>Sysout</code> and the current date. File paths will be considered relative to the filepath set when starting Lisp. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TERPRI </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Lisp variable </td>
|
||||
<td> </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TIMES </td>
|
||||
<td>Host function </td>
|
||||
<td>([& args]) </td>
|
||||
<td>(TIMES & ARGS) </td>
|
||||
<td> </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TRACE </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>? </td>
|
||||
<td>Host function </td>
|
||||
<td>(TRACE S) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>Add this symbol <code>s</code> to the set of symbols currently being traced. If <code>s</code> is not a symbol, does nothing. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>UNTRACE </td>
|
||||
<td>? </td>
|
||||
<td>null </td>
|
||||
<td>Host function </td>
|
||||
<td>(UNTRACE S) </td>
|
||||
<td>PSEUDO-FUNCTION </td>
|
||||
<td>? </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ZEROP </td>
|
||||
<td>Lisp function </td>
|
||||
<td>(N) </td>
|
||||
<td>? </td>
|
||||
<td>(ZEROP N) </td>
|
||||
<td>LAMBDA-fn </td>
|
||||
<td>see manual pages <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=34">26</a>, <a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=72">64</a> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue