commit e292278762f6ddf319b2894996c3a347606a50c2
parent 3af8336b60521908f64928dadaf98d9cbc088361
Author: Commit-Bot <unknown>
Date: Thu, 11 Nov 2010 07:18:55 +0000
Automatic commit from picoLisp.tgz, From: Thu, 11 Nov 2010 07:18:55 GMT
Diffstat:
2 files changed, 51 insertions(+), 25 deletions(-)
diff --git a/doc/faq.html b/doc/faq.html
@@ -207,17 +207,17 @@ queries.
<h3>Persistent Symbols</h3>
<p>Database objects ("external" symbols) are a primary data type in PicoLisp.
-They look like normal symbols to the programmer, but are managed (fetched from,
-and stored to, the data base) automatically by the system. Symbol manipulation
+They look like normal symbols to the programmer, but are managed in the database
+(fetched from, and stored to) automatically by the system. Symbol manipulation
functions like <code>set</code>, <code>put</code> or <code>get</code>, the
garbage collector, and other parts of the interpreter know about them.
<h3>Application Server</h3>
-<p>Stand-alone system: Does not depend on external programs like Apache or
-MySQL. Provides a "live" user interface on the client side, with an application
-server session for each connected client. The GUI layout and behavior is
-described with s-expressions, generated dynamically at runtime, and interacts
-directly with the database structures.
+<p>It is a stand-alone system (it does not depend on external programs like
+Apache or MySQL) and it provides a "live" user interface on the client side,
+with an application server session for each connected client. The GUI layout and
+behavior are described with S-expressions, generated dynamically at runtime, and
+interact directly with the database structures.
<h3>Localization</h3>
<p>Internal exclusive and full use of UTF-8 encoding, and self-translating <a
@@ -229,11 +229,12 @@ write country- and language-independent applications.
<h2><a name="performance">How is the performance compared to other Lisp systems?</a></h2>
<p>Despite the fact that PicoLisp is an interpreted-only system, the performance
-is quite good. Typical Lisp programs, operating on list data structures, execute
-in (interpreted) PicoLisp at about the same speed as in (compiled) CMUCL, and
-about two or three times faster than in CLisp or Scheme48. Programs with lots of
-numeric calculations, however, are several times slower, mainly due to
-PicoLisp's somewhat inefficient implementation of bignums in the 32-bit version.
+is quite good. Typical Lisp programs operating on list data structures are
+executed in (interpreted) PicoLisp at about the same speed as in (compiled)
+CMUCL, and about two or three times faster than in CLisp or Scheme48. Programs
+with lots of numeric calculations, however, are several times slower. This is
+mainly due to PicoLisp's somewhat inefficient implementation of bignums in the
+32-bit version.
<p>But in practice, speed was never a problem, even with the first versions of
PicoLisp in 1988 on a Mac II with a 12 MHz CPU. And certain things are cleaner
diff --git a/doc/tut.html b/doc/tut.html
@@ -18,9 +18,11 @@
example. For a general description of the PicoLisp kernel please look at the <a
href="ref.html">PicoLisp Reference</a>.
-<p>This is <i>not</i> a Lisp tutorial, as it assumes some working knowledge of
-Lisp (and programming in general). It concentrates on the specialties of
-PicoLisp, and its differences to other Lisp dialects.
+<p>This is <i>not</i> a Lisp tutorial, as it assumes some basic knowledge of
+programming, Lisp, and even PicoLisp. Please read these sections before coming
+back here: <a href="ref.html#intro">Introduction</a> and <a
+href="ref.html#vm">The PicoLisp Machine</a>. This tutorial concentrates on the
+specificities of PicoLisp, and its differences with other Lisp dialects.
<h3>Now let's start</h3>
@@ -54,7 +56,7 @@ debugging environment will set the console (tty) to raw mode by itself and do
the special handling seen above during character input.
<p>If you feel that you absolutely have to use an IDE, <code>rlwrap</code> or
-+another input front-end, please remove the entry "@lib/led.l" from "dbg.l".
+another input front-end, please remove the entry "@lib/led.l" from "dbg.l".
Note that in this case, however, you will not have the TAB symbol completion
feature available during command line editing.
@@ -257,7 +259,10 @@ to know:
<p>The most commonly used tool is probably the <code><a
href="refS.html#show">show</a></code> function. It takes a symbolic argument,
and shows the symbol's name (if any), followed by its value cell, and then the
-contents of the property list on the following lines.
+contents of the property list on the following lines (assignment of such things
+to a symbol can be done with <code><a href="refS.html#set">set</a></code>,
+<code><a href="refS.html#setq">setq</a></code>, and <code><a
+href="refP.html#put">put</a></code>).
<pre><code>
: (setq A '(This is the value)) # Set the value cell of 'A'
@@ -741,6 +746,26 @@ function, using <code><a href="refP.html#pass">pass</a></code>:
-> 1350 # Return the result
</code></pre>
+<h3>Anonymous functions without the <i>lambda</i> keyword</h3>
+
+There's no distinction between code and data in PicoLisp,
+<code><a href="refQ.html#quote">quote</a></code> will do what you want (see
+also <a href="faq.html#lambda">this FAQ entry</a>).
+
+<pre><code>
+: ((quote (X) (* X X)) 9)
+-> 81
+</code></pre>
+
+<pre><code>
+: (setq f '((X) (* X X)))
+-> ((X) (* X X))
+: f
+-> ((X) (* X X))
+: (f 3)
+-> 9
+</code></pre>
+
<p><hr>
<h2><a name="dbg">Debugging</a></h2>
@@ -904,7 +929,8 @@ look at
<li><code><a href="refD.html#date">date</a></code> and <code><a
href="refT.html#time">time</a></code> (grab system date and time)
-<li><code><a href="refD.html#default">default</a></code> (conditional assignmen
+<li><code><a href="refD.html#default">default</a></code> (conditional
+assignments)
<li><code><a href="refP.html#pack">pack</a></code> (kind of concatenation), and
@@ -980,7 +1006,7 @@ pretty-print it:
-> stamp
</code></pre>
-<p>To reset the function to its normal state, calll <code><a
+<p>To reset the function to its normal state, call <code><a
href="refU.html#unbug">unbug</a></code>:
<pre><code>
@@ -1051,9 +1077,8 @@ href="refT.html#till">till</a></code>:
<p>With <code><a href="refL.html#line">line</a></code>, a line of characters is
-read, either into a single transient <a
-href="ref.html#transient-io">transient</a> symbol (the type used by PicoLisp for
-strings),
+read, either into a single <a href="ref.html#transient-io">transient</a> symbol
+(the type used by PicoLisp for strings),
<pre><code>
: (in "doc/tut.html" (line T))
@@ -1122,7 +1147,7 @@ work: via command line arguments, or as a stand-alone script.
<p>The command line can specify either files for execution, or arbitrary Lisp
expressions for direct evaluation (see <code><a
href="ref.html#invoc">Invocation</a></code>): if an argument starts with a
-hyphen, it is evaluated, otherwise <code><a
+hyphen, it is evaluated, otherwise it is <code><a
href="refL.html#load">load</a></code>ed as a file. A typical invocation might
look like:
@@ -1181,8 +1206,8 @@ Then a simple hello-world script might look like:
</code></pre>
<p>If you write this into a text file, and use <code>chmod</code> to set it to
-"executable", it can be executed like any other command. Note that - because
-<code>#</code> is the comment character in PicoLisp - the first line will not be
+"executable", it can be executed like any other command. Note that (because
+<code>#</code> is the comment character in PicoLisp) the first line will not be
interpreted, and you can still use that file as a normal command line argument
to PicoLisp (useful during debugging).