picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit f77ff02d57d2909ea5f6471b77f5a50da5db3138
parent 0619b3ea6f2f00991b560ab09a1b5ea1e132921b
Author: Alexander Burger <abu@software-lab.de>
Date:   Thu,  5 May 2011 12:45:56 +0200

Global vs. local invocation
Diffstat:
Mdoc/refA.html | 2+-
Mdoc/refC.html | 4++--
Mdoc/refI.html | 2+-
Mdoc/refP.html | 14++++++++------
Mdoc/refS.html | 4++--
Mdoc/select.html | 4++--
Mdoc/tut.html | 33+++++++++++++++++----------------
7 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/doc/refA.html b/doc/refA.html @@ -451,7 +451,7 @@ in debug mode. See also <code><a href="refT.html#test">test</a></code>. <pre><code> # Start in debug mode -$ ./dbg +$ pil + : (de foo (N) ~(assert (>= 90 N 10)) (bar N) ) diff --git a/doc/refC.html b/doc/refC.html @@ -407,7 +407,7 @@ href="refA.html#argv">argv</a></code> and <a href="ref.html#invoc">Invocation</a>. <pre><code> -$ ./dbg +$ pil + : (cmd) -> "./bin/picolisp" : (cmd "!/bin/picolust") @@ -625,7 +625,7 @@ href="refP.html#pipe">pipe</a></code>. <pre><code> $ echo 9 >count # Write '9' to file "count" -$ ./dbg +$ pil + : (ctl ".ctl" # Exclusive control, using ".ctl" (in "count" (let Cnt (read) # Read '9' diff --git a/doc/refI.html b/doc/refI.html @@ -247,7 +247,7 @@ href="refL.html#lines">lines</a></code>. <pre><code> $ ls -l x.l -rw-r--r-- 1 abu users 208 Jun 17 08:58 x.l -$ ./dbg +$ pil + : (info "x.l") -> (208 730594 . 32315) : (stamp 730594 32315) diff --git a/doc/refP.html b/doc/refP.html @@ -199,7 +199,7 @@ href="refS.html#skip">skip</a></code>. $ cat a # Comment abcd -$ ./dbg +$ pil + : (in "a" (list (peek) (char))) -> ("#" "#") </code></pre> @@ -610,11 +610,13 @@ arguments, using the system <code>ps</code> utility. See also <code><a href="refH.html#hd">hd</a></code>. <pre><code> -: (proc 'picolisp) - PID PPID STARTED SZ %CPU WCHAN CMD - 9781 8895 16:06:53 2536 0.8 select ./bin/picolisp -on *Dbg ./lib.l @ext.l @dbg.l app/main.l lib/too.l -main -go - 9884 9781 16:07:01 2540 0.0 wait ./bin/picolisp -on *Dbg ./lib.l @ext.l @dbg.l app/main.l lib/too.l -main -go --> T</code></pre> +: (proc 'pil) + PID PPID STARTED SIZE %CPU WCHAN CMD +16993 3267 12:38:21 1516 0.5 - /usr/bin/picolisp /usr/lib/picolisp/lib.l /usr/bin/pil + +15731 1834 12:36:35 2544 0.1 - /usr/bin/picolisp /usr/lib/picolisp/lib.l /usr/bin/pil app/main.l lib/too.l -main -go + +15823 15731 12:36:44 2548 0.0 - /usr/bin/picolisp /usr/lib/picolisp/lib.l /usr/bin/pil app/main.l lib/too.l -main -go + +-> T +</code></pre> <dt><a name="prog"><code>(prog . prg) -> any</code></a> <dd>Executes <code>prg</code>, and returns the result of the last expression. diff --git a/doc/refS.html b/doc/refS.html @@ -196,7 +196,7 @@ href="refR.html#rest">rest</a></code>. $ cat x (* (next) (next)) -$ ./dbg +$ pil + : (script "x" 3 4) -> 12 </code></pre> @@ -495,7 +495,7 @@ href="refE.html#eof">eof</a></code>. $ cat a # Comment abcd -$ ./dbg +$ pil + : (in "a" (skip "#")) -> "a" </code></pre> diff --git a/doc/select.html b/doc/select.html @@ -57,10 +57,10 @@ on a concrete example. <p>The examples in this document will use the demo application in "app/*.l" (see also "<a href="app.html#minApp">A Minimal Complete Application</a>"). To get an -interactive prompt, simply start it as +interactive prompt, start it as <pre><code> -$ ./dbg app/main.l -main +$ pil app/main.l -main + : </code></pre> diff --git a/doc/tut.html b/doc/tut.html @@ -26,11 +26,12 @@ specificities of PicoLisp, and its differences with other Lisp dialects. <h3>Now let's start</h3> -<p>If not stated otherwise, all examples assume that PicoLisp was started in the -installation directory from the shell prompt as +<p>If not stated otherwise, all examples assume that PicoLisp was started from a +global installation (see <a href="ref.html#inst">Installation</a>) from the +shell prompt as <pre><code> -$ ./dbg +$ pil + : </code></pre> @@ -56,9 +57,9 @@ 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". -Note that in this case, however, you will not have the TAB symbol completion -feature available during command line editing. +another input front-end, please remove the entry "@lib/led.l" from "lib.l" and +"dbg.l". Note that in this case, however, you will not have the TAB symbol +completion feature available during command line editing. <h3>Table of content</h3> @@ -100,8 +101,8 @@ which is similar to (though much simpler than) the <code>readline</code> feature of the <code>bash</code> shell. Only a subset of the <code>vi</code> mode is supported, which is restricted to single-key commands (the "real" <code>vi</code> supports multi-key commands and the modification of most -commands with count prefixes). It is loaded at startup via "dbg.l", you find its -source in "lib/led.l". +commands with count prefixes). It is loaded at startup in debug mode, you find +its source in "lib/led.l". <p>You can enter lines in the normal way, correcting mistypes with the BACKSPACE key, and terminating them with the ENTER key. This is the <i>Insert Mode</i>. @@ -769,12 +770,12 @@ also <a href="faq.html#lambda">this FAQ entry</a>). <p>There are two major ways to debug functions (and methods) at runtime: <i>Tracing</i> and <i>single-stepping</i>. -In this section we will use the REPL to explore the debugging facilities, but in -the <a href="#script">Scripting</a> section, you will learn how to launch +<p>In this section we will use the REPL to explore the debugging facilities, but +in the <a href="#script">Scripting</a> section, you will learn how to launch PicoLisp scripts with some selected functions debugged: <pre><code> -$ ./dbg app/file1.l -"trace 'foo" -main -"debug 'bar" app/file2.l +$ pil app/file1.l -"trace 'foo" -main -"debug 'bar" app/file2.l + </code></pre> <h3>Tracing</h3> @@ -1147,7 +1148,7 @@ href="refL.html#load">load</a></code>ed as a file. A typical invocation might look like: <pre><code> -$ ./dbg app/file1.l -main app/file2.l +$ pil app/file1.l -main app/file2.l + </code></pre> <p>It loads the debugging environment, an application source file, calls the @@ -1156,7 +1157,7 @@ development and debugging session, this line is often modified using the shell's history mechanisms, e.g. by inserting debugging statements: <pre><code> -$ ./dbg app/file1.l -"trace 'foo" -main -"debug 'bar" app/file2.l +$ pil app/file1.l -"trace 'foo" -main -"debug 'bar" app/file2.l + </code></pre> <p>Another convenience during debugging and testing is to put things into the @@ -1164,7 +1165,7 @@ command line (shell history) which would otherwise have to be done each time in the application's user interface: <pre><code> -$ ./dbg app/file1.l -main app/file2.l -go -'login "name" "password"' +$ pil app/file1.l -main app/file2.l -go -'login "name" "password"' + </code></pre> <p>The final production release of an application usually includes a shell @@ -1262,8 +1263,8 @@ processing. <p>Utilities are typically used outside the context of the PicoLisp environment. All examples above assumed that the current working directory is the PicoLisp installation directory, which is usually all right for applications developed in -that environment. Command line file arguments like "dbg.l" or "app/file1.l" will -be properly found. +that environment. Command line file arguments like "app/file1.l" will be +properly found. <p>To allow utilities to run in arbitrary places on the host file system, the concept of <i>home directory substitution</i> was introduced. The interpreter