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 c5ef73f92c948e2858c9d583d865259701cba3ad
parent 56476b8f5b5c5b7be548e4c1d8c291bb4771bda9
Author: Commit-Bot <unknown>
Date:   Thu, 30 Sep 2010 10:49:45 +0000

Automatic commit from picoLisp.tgz, From: Thu, 30 Sep 2010 10:49:45 GMT
Diffstat:
MCHANGES | 4+++-
MReleaseNotes | 56+++++---------------------------------------------------
Mdoc/ref.html | 1-
Mdoc/refP.html | 21---------------------
Mdoc/refT.html | 3+--
Mlib/el/picolisp.el | 2+-
Mlib/tags | 131+++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/flow.c | 16+---------------
Msrc/pico.h | 3+--
Msrc/tab.c | 3+--
Msrc64/flow.l | 28+---------------------------
Msrc64/glob.l | 3+--
Msrc64/version.l | 4++--
Mtest/src/flow.l | 8+-------
14 files changed, 83 insertions(+), 200 deletions(-)

diff --git a/CHANGES b/CHANGES @@ -1,4 +1,6 @@ -* XXsep10 picoLisp-3.0.4 +* XXdec10 picoLisp-3.0.5 + +* 30sep10 picoLisp-3.0.4 'tell' accepts PID argument Deprecated 'pid' Extended protocol for 'sync' diff --git a/ReleaseNotes b/ReleaseNotes @@ -1,58 +1,12 @@ -28sep10abu +30sep10abu (c) Software Lab. Alexander Burger - Release Notes for picoLisp-3.0.4 + Release Notes for picoLisp-3.0.5 ================================ -A. In the 64-bit version bignum division is now faster by a factor between 20 - and 60. That version had used an inefficient algorithm (bitwise shifts), - which was now replaced by Knuth's wordwise division algorithm (as is used - 32-bit version). - -B. An OpenGL library (64-bit) is now part of the standard release. - -C. The 'native' function now also accepts up to six fixpoint arguments of the - form (value . 1.0), and can return scaled fixpoint numbers if the return spec - is a number (typically 1.0). - -D. HTTP file uploads can now be achieved with Drag & Drop, using the new '+Drop' - button prefix class. For example, a simple file-upload GUI which accepts a - file and copies it to some destination: - - (gui '(+UpField) 30) - (gui '(+Button) "Upload File" - '(let? F (val> (field -1)) - (call 'cp (tmp F) (some-destination)) ) ) - - may now be written as - - (gui '(+UpField) 30) - (gui '(+Drop +Button) '(field -1) "Upload File" - '(when (: drop) - (call 'cp @ (some-destination)) ) ) - - This allows manual file selection as before, but you can also drag the file - and drop it onto the "Upload File" button. The '+Drag' prefix takes a - references of the related '+UpField', and sets the 'drop' property of its GUI - component to a proper value that can be used in the action expression. - - Note that this works only in HTML5 capable browsers (e.g Firefox 3.6), - supporting the JavaScript File API. - -E. The license was changed from GPL to the MIT/X11 License with this release - (see the file "COPYING"). - -F. The usage of the poll(2) system call in the 64-bit version was found to cause - errors. The database stress test in "misc/stress.l" occasionally indicated - inconsistencies (for reasons which are not completely clear). Therefore, the - 64-bit version is now - like the 32-bit version - based on select(2). And, - both versions employ now a different strategy for syncing the communication - between child processes. This required a slight change in the semantics of - 'sync' and 'tell', which should however not have any influence on normal - applications. - -G. The 'pid' function is deprecated. It will be removed in the next release. - This was announced in the mailing list in +A. The 'pid' function was removed. This was announced in the previous version, + and in the mailing list in http://www.mail-archive.com/picolisp@software-lab.de/msg01949.html + diff --git a/doc/ref.html b/doc/ref.html @@ -2035,7 +2035,6 @@ abbreviations: <a href="refP.html#pass">pass</a> <a href="refQ.html#quote">quote</a> <a href="refA.html#as">as</a> - <a href="refP.html#pid">pid</a> <a href="refL.html#lit">lit</a> <a href="refE.html#eval">eval</a> <a href="refR.html#run">run</a> diff --git a/doc/refP.html b/doc/refP.html @@ -240,27 +240,6 @@ href="refE.html#extract">extract</a></code>. -> 1 </code></pre> -<dt><a name="pid"><code>(pid 'pid|lst . exe) -> any</code></a> -<dd>Evaluates <code>exe</code> when the value of the global <code><a -href="refP.html#*Pid">*Pid</a></code> is equal to the <code>pid</code> argument, -or a member of the <code>lst</code> argument. Used typically in combination with -<code><a href="refT.html#tell">tell</a></code> to send a command selectively to -another process. - -<pre><code> -: (tell 'pid 20290 'gc 0) # Tell process 20290 to purge unused heap blocks --> 0 -</code></pre> - -<p><strong>Note:</strong> This function is deprecated, and will be removed in -the next version. Please use the PID argument feature of <code>tell</code> -instead. With that, the above example reduces to - -<pre><code> -: (tell 20290 'gc 0) --> 0 -</code></pre> - <dt><a name="pilog"><code>(pilog 'lst . prg) -> any</code></a> <dd>Evaluates a <a href="ref.html#pilog">Pilog</a> query, and executes <code>prg</code> for each result set with all Pilog variables bound to their diff --git a/doc/refT.html b/doc/refT.html @@ -214,8 +214,7 @@ process. <code>tell</code> is also used internally by <code><a href="refC.html#commit">commit</a></code> to notify about database changes. When called without arguments, no message is actually sent, and the parent process may grant <code><a href="refS.html#sync">sync</a></code> to the next waiting -process. See also <code><a href="refH.html#hear">hear</a></code>, <code><a -href="refP.html#pid">pid</a></code> and <code><a +process. See also <code><a href="refH.html#hear">hear</a></code> and <code><a href="refR.html#rpc">rpc</a></code>. <pre><code> diff --git a/lib/el/picolisp.el b/lib/el/picolisp.el @@ -298,7 +298,7 @@ See `run-hooks'." "balance" "get" "fill" "apply" "range" ;; Control Flow "load" "args" "next" "arg" "rest" "pass" "quote" "as" - "pid" "lit" "eval" "run" "macro" "curry" "def" "de" "dm" + "lit" "eval" "run" "macro" "curry" "def" "de" "dm" "recur" "recurse" "undef" "box" "new" "type" "isa" "method" "meth" "send" "try" "super" "extra" "with" "bind" "job" "let" "let?" "use" "and" "or" "nand" "nor" diff --git a/lib/tags b/lib/tags @@ -1,5 +1,5 @@ -! (2869 . "@src64/flow.l") -$ (2971 . "@src64/flow.l") +! (2843 . "@src64/flow.l") +$ (2945 . "@src64/flow.l") % (2570 . "@src64/big.l") & (2791 . "@src64/big.l") * (2389 . "@src64/big.l") @@ -28,7 +28,7 @@ accept (139 . "@src64/net.l") adr (613 . "@src64/main.l") alarm (487 . "@src64/main.l") all (772 . "@src64/sym.l") -and (1643 . "@src64/flow.l") +and (1617 . "@src64/flow.l") any (3869 . "@src64/io.l") append (1329 . "@src64/subr.l") apply (597 . "@src64/apply.l") @@ -38,15 +38,15 @@ argv (2864 . "@src64/main.l") as (146 . "@src64/flow.l") asoq (2942 . "@src64/subr.l") assoc (2907 . "@src64/subr.l") -at (2128 . "@src64/flow.l") +at (2102 . "@src64/flow.l") atom (2372 . "@src64/subr.l") -bind (1381 . "@src64/flow.l") +bind (1355 . "@src64/flow.l") bit? (2732 . "@src64/big.l") -bool (1743 . "@src64/flow.l") -box (841 . "@src64/flow.l") +bool (1717 . "@src64/flow.l") +box (815 . "@src64/flow.l") box? (999 . "@src64/sym.l") by (1553 . "@src64/apply.l") -bye (3450 . "@src64/flow.l") +bye (3424 . "@src64/flow.l") caaaar (271 . "@src64/subr.l") caaadr (288 . "@src64/subr.l") caaar (99 . "@src64/subr.l") @@ -61,10 +61,10 @@ caddar (409 . "@src64/subr.l") cadddr (435 . "@src64/subr.l") caddr (156 . "@src64/subr.l") cadr (45 . "@src64/subr.l") -call (3102 . "@src64/flow.l") +call (3076 . "@src64/flow.l") car (5 . "@src64/subr.l") -case (1984 . "@src64/flow.l") -catch (2484 . "@src64/flow.l") +case (1958 . "@src64/flow.l") +catch (2458 . "@src64/flow.l") cd (2619 . "@src64/main.l") cdaaar (464 . "@src64/subr.l") cdaadr (487 . "@src64/subr.l") @@ -89,11 +89,11 @@ clip (1786 . "@src64/subr.l") close (4257 . "@src64/io.l") cmd (2846 . "@src64/main.l") cnt (1297 . "@src64/apply.l") -co (2566 . "@src64/flow.l") +co (2540 . "@src64/flow.l") commit (1496 . "@src64/db.l") con (725 . "@src64/subr.l") conc (781 . "@src64/subr.l") -cond (1938 . "@src64/flow.l") +cond (1912 . "@src64/flow.l") connect (201 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1216 . "@src64/subr.l") @@ -102,43 +102,43 @@ ctty (2644 . "@src64/main.l") cut (1797 . "@src64/sym.l") date (2358 . "@src64/main.l") dbck (2105 . "@src64/db.l") -de (549 . "@src64/flow.l") +de (523 . "@src64/flow.l") dec (2323 . "@src64/big.l") -def (473 . "@src64/flow.l") +def (447 . "@src64/flow.l") default (1661 . "@src64/sym.l") del (1852 . "@src64/sym.l") delete (1392 . "@src64/subr.l") delq (1443 . "@src64/subr.l") diff (2563 . "@src64/subr.l") dir (2777 . "@src64/main.l") -dm (561 . "@src64/flow.l") -do (2158 . "@src64/flow.l") -e (2932 . "@src64/flow.l") +dm (535 . "@src64/flow.l") +do (2132 . "@src64/flow.l") +e (2906 . "@src64/flow.l") echo (4288 . "@src64/io.l") env (625 . "@src64/main.l") eof (3428 . "@src64/io.l") eol (3419 . "@src64/io.l") errno (1358 . "@src64/main.l") -eval (208 . "@src64/flow.l") +eval (182 . "@src64/flow.l") ext (5017 . "@src64/io.l") ext? (1034 . "@src64/sym.l") extern (900 . "@src64/sym.l") -extra (1284 . "@src64/flow.l") +extra (1258 . "@src64/flow.l") extract (1102 . "@src64/apply.l") fifo (1963 . "@src64/sym.l") file (2724 . "@src64/main.l") fill (3177 . "@src64/subr.l") filter (1045 . "@src64/apply.l") fin (2020 . "@src64/subr.l") -finally (2542 . "@src64/flow.l") +finally (2516 . "@src64/flow.l") find (1206 . "@src64/apply.l") fish (1497 . "@src64/apply.l") flg? (2419 . "@src64/subr.l") flip (1686 . "@src64/subr.l") flush (4992 . "@src64/io.l") fold (3343 . "@src64/sym.l") -for (2247 . "@src64/flow.l") -fork (3276 . "@src64/flow.l") +for (2221 . "@src64/flow.l") +fork (3250 . "@src64/flow.l") format (2089 . "@src64/big.l") free (2047 . "@src64/db.l") from (3447 . "@src64/io.l") @@ -157,24 +157,24 @@ hear (3130 . "@src64/io.l") host (184 . "@src64/net.l") id (1027 . "@src64/db.l") idx (2037 . "@src64/sym.l") -if (1824 . "@src64/flow.l") -if2 (1843 . "@src64/flow.l") -ifn (1884 . "@src64/flow.l") +if (1798 . "@src64/flow.l") +if2 (1817 . "@src64/flow.l") +ifn (1858 . "@src64/flow.l") in (4093 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2611 . "@src64/subr.l") info (2681 . "@src64/main.l") intern (875 . "@src64/sym.l") -ipid (3221 . "@src64/flow.l") -isa (978 . "@src64/flow.l") -job (1448 . "@src64/flow.l") +ipid (3195 . "@src64/flow.l") +isa (952 . "@src64/flow.l") +job (1422 . "@src64/flow.l") journal (970 . "@src64/db.l") key (3278 . "@src64/io.l") -kill (3253 . "@src64/flow.l") +kill (3227 . "@src64/flow.l") last (2031 . "@src64/subr.l") length (2687 . "@src64/subr.l") -let (1498 . "@src64/flow.l") -let? (1559 . "@src64/flow.l") +let (1472 . "@src64/flow.l") +let? (1533 . "@src64/flow.l") lieu (1156 . "@src64/db.l") line (3603 . "@src64/io.l") lines (3756 . "@src64/io.l") @@ -182,10 +182,10 @@ link (1163 . "@src64/subr.l") lisp (1921 . "@src64/main.l") list (887 . "@src64/subr.l") listen (151 . "@src64/net.l") -lit (183 . "@src64/flow.l") +lit (157 . "@src64/flow.l") load (4070 . "@src64/io.l") lock (1184 . "@src64/db.l") -loop (2190 . "@src64/flow.l") +loop (2164 . "@src64/flow.l") low? (3215 . "@src64/sym.l") lowc (3245 . "@src64/sym.l") lst? (2389 . "@src64/subr.l") @@ -207,8 +207,8 @@ maxi (1395 . "@src64/apply.l") member (2429 . "@src64/subr.l") memq (2451 . "@src64/subr.l") meta (3135 . "@src64/sym.l") -meth (1106 . "@src64/flow.l") -method (1070 . "@src64/flow.l") +meth (1080 . "@src64/flow.l") +method (1044 . "@src64/flow.l") min (2343 . "@src64/subr.l") mini (1446 . "@src64/apply.l") mix (1251 . "@src64/subr.l") @@ -217,15 +217,15 @@ n0 (2176 . "@src64/subr.l") n== (2074 . "@src64/subr.l") nT (2185 . "@src64/subr.l") name (499 . "@src64/sym.l") -nand (1678 . "@src64/flow.l") +nand (1652 . "@src64/flow.l") native (1366 . "@src64/main.l") need (918 . "@src64/subr.l") -new (852 . "@src64/flow.l") +new (826 . "@src64/flow.l") next (2226 . "@src64/main.l") -nil (1761 . "@src64/flow.l") -nond (1961 . "@src64/flow.l") -nor (1699 . "@src64/flow.l") -not (1751 . "@src64/flow.l") +nil (1735 . "@src64/flow.l") +nond (1935 . "@src64/flow.l") +nor (1673 . "@src64/flow.l") +not (1725 . "@src64/flow.l") nth (685 . "@src64/subr.l") num? (2400 . "@src64/subr.l") off (1598 . "@src64/sym.l") @@ -234,9 +234,9 @@ on (1583 . "@src64/sym.l") onOff (1613 . "@src64/sym.l") one (1646 . "@src64/sym.l") open (4219 . "@src64/io.l") -opid (3237 . "@src64/flow.l") +opid (3211 . "@src64/flow.l") opt (2967 . "@src64/main.l") -or (1659 . "@src64/flow.l") +or (1633 . "@src64/flow.l") out (4113 . "@src64/io.l") pack (1144 . "@src64/sym.l") pair (2381 . "@src64/subr.l") @@ -245,7 +245,6 @@ pat? (720 . "@src64/sym.l") path (1229 . "@src64/io.l") peek (3335 . "@src64/io.l") pick (1253 . "@src64/apply.l") -pid (157 . "@src64/flow.l") pipe (4134 . "@src64/io.l") poll (3222 . "@src64/io.l") pool (648 . "@src64/db.l") @@ -258,9 +257,9 @@ prinl (4930 . "@src64/io.l") print (4956 . "@src64/io.l") println (4987 . "@src64/io.l") printsp (4972 . "@src64/io.l") -prog (1779 . "@src64/flow.l") -prog1 (1787 . "@src64/flow.l") -prog2 (1804 . "@src64/flow.l") +prog (1753 . "@src64/flow.l") +prog1 (1761 . "@src64/flow.l") +prog2 (1778 . "@src64/flow.l") prop (2781 . "@src64/sym.l") protect (532 . "@src64/main.l") prove (3434 . "@src64/subr.l") @@ -285,11 +284,11 @@ rewind (5000 . "@src64/io.l") rollback (1890 . "@src64/db.l") rot (848 . "@src64/subr.l") rpc (5141 . "@src64/io.l") -run (331 . "@src64/flow.l") +run (305 . "@src64/flow.l") sect (2515 . "@src64/subr.l") seed (2944 . "@src64/big.l") seek (1159 . "@src64/apply.l") -send (1150 . "@src64/flow.l") +send (1124 . "@src64/flow.l") seq (1083 . "@src64/db.l") set (1482 . "@src64/sym.l") setq (1515 . "@src64/sym.l") @@ -301,51 +300,51 @@ sp? (711 . "@src64/sym.l") space (4934 . "@src64/io.l") split (1579 . "@src64/subr.l") stack (571 . "@src64/main.l") -state (2028 . "@src64/flow.l") +state (2002 . "@src64/flow.l") stem (1976 . "@src64/subr.l") str (3923 . "@src64/io.l") str? (1013 . "@src64/sym.l") strip (1563 . "@src64/subr.l") sub? (1444 . "@src64/sym.l") sum (1344 . "@src64/apply.l") -super (1237 . "@src64/flow.l") +super (1211 . "@src64/flow.l") sym (3909 . "@src64/io.l") sym? (2408 . "@src64/subr.l") sync (3090 . "@src64/io.l") -sys (3073 . "@src64/flow.l") -t (1770 . "@src64/flow.l") +sys (3047 . "@src64/flow.l") +t (1744 . "@src64/flow.l") tail (1898 . "@src64/subr.l") tell (3162 . "@src64/io.l") text (1272 . "@src64/sym.l") -throw (2510 . "@src64/flow.l") -tick (3189 . "@src64/flow.l") +throw (2484 . "@src64/flow.l") +tick (3163 . "@src64/flow.l") till (3514 . "@src64/io.l") time (2491 . "@src64/main.l") touch (1049 . "@src64/sym.l") trim (1746 . "@src64/subr.l") -try (1191 . "@src64/flow.l") -type (931 . "@src64/flow.l") +try (1165 . "@src64/flow.l") +type (905 . "@src64/flow.l") udp (268 . "@src64/net.l") unify (3842 . "@src64/subr.l") -unless (1920 . "@src64/flow.l") -until (2104 . "@src64/flow.l") +unless (1894 . "@src64/flow.l") +until (2078 . "@src64/flow.l") up (712 . "@src64/main.l") upp? (3230 . "@src64/sym.l") uppc (3294 . "@src64/sym.l") -use (1592 . "@src64/flow.l") +use (1566 . "@src64/flow.l") usec (2596 . "@src64/main.l") val (1463 . "@src64/sym.l") version (2981 . "@src64/main.l") wait (3052 . "@src64/io.l") -when (1903 . "@src64/flow.l") -while (2080 . "@src64/flow.l") +when (1877 . "@src64/flow.l") +while (2054 . "@src64/flow.l") wipe (3090 . "@src64/sym.l") -with (1349 . "@src64/flow.l") +with (1323 . "@src64/flow.l") wr (5125 . "@src64/io.l") xchg (1538 . "@src64/sym.l") -xor (1720 . "@src64/flow.l") +xor (1694 . "@src64/flow.l") x| (2871 . "@src64/big.l") -yield (2724 . "@src64/flow.l") +yield (2698 . "@src64/flow.l") yoke (1187 . "@src64/subr.l") zap (1063 . "@src64/sym.l") zero (1631 . "@src64/sym.l") diff --git a/src/flow.c b/src/flow.c @@ -1,4 +1,4 @@ -/* 04sep10abu +/* 30sep10abu * (c) Software Lab. Alexander Burger */ @@ -66,20 +66,6 @@ any doAs(any x) { return cdr(x); } -// (pid 'pid|lst . exe) -> any -any doPid(any x) { - any y; - - x = cdr(x); - if (!isCell(y = EVAL(car(x)))) - return equal(y, val(Pid))? EVAL(cdr(x)) : Nil; - do - if (equal(car(y), val(Pid))) - return EVAL(cdr(x)); - while (isCell(y = cdr(y))); - return Nil; -} - // (lit 'any) -> any any doLit(any x) { x = cadr(x); diff --git a/src/pico.h b/src/pico.h @@ -1,4 +1,4 @@ -/* 23sep10abu +/* 30sep10abu * (c) Software Lab. Alexander Burger */ @@ -636,7 +636,6 @@ any doPath(any); any doPatQ(any); any doPeek(any); any doPick(any); -any doPid(any); any doPipe(any); any doPoll(any); any doPool(any); diff --git a/src/tab.c b/src/tab.c @@ -1,4 +1,4 @@ -/* 20may10abu +/* 30sep10abu * (c) Software Lab. Alexander Burger */ @@ -243,7 +243,6 @@ static symInit Symbols[] = { {doPath, "path"}, {doPatQ, "pat?"}, {doPeek, "peek"}, - {doPid, "pid"}, {doPick, "pick"}, {doPipe, "pipe"}, {doPoll, "poll"}, diff --git a/src64/flow.l b/src64/flow.l @@ -1,4 +1,4 @@ -# 15sep10abu +# 30sep10abu # (c) Software Lab. Alexander Burger (code 'redefMsgEC) @@ -153,32 +153,6 @@ ldnz E (A CDR) # No: Return 'any2' ret -# (pid 'pid|lst . exe) -> any -(code 'doPid 2) - ld E (E CDR) - push (E CDR) # Push rest - ld E (E) # Eval condition - eval - ld A (Pid) # Get '*Pid' - atom E # Single 'pid'? - if nz # Yes - cmp E A # Matches '*Pid'? - pop E - jne retNil # No - eval/ret # Evaluate 'exe' - end - do - cmp (E) A # CAR matches '*Pid'? - if eq - pop E - eval/ret # Evaluate 'exe' - end - ld E (E CDR) # Try next - atom E # Any? - until nz # No - pop A # Drop 'exe' - ret - # (lit 'any) -> any (code 'doLit 2) ld E (E CDR) # Get arg diff --git a/src64/glob.l b/src64/glob.l @@ -1,4 +1,4 @@ -# 23sep10abu +# 30sep10abu # (c) Software Lab. Alexander Burger (data 'Globals 0) @@ -232,7 +232,6 @@ # Control flow initSym NIL "as" doAs - initSym NIL "pid" doPid initSym NIL "lit" doLit initSym NIL "eval" doEval initSym NIL "run" doRun diff --git a/src64/version.l b/src64/version.l @@ -1,6 +1,6 @@ -# 28sep10abu +# 30sep10abu # (c) Software Lab. Alexander Burger -(de *Version 3 0 3 25) +(de *Version 3 0 4 1) # vi:et:ts=3:sw=3 diff --git a/test/src/flow.l b/test/src/flow.l @@ -1,4 +1,4 @@ -# 26aug10abu +# 30sep10abu # (c) Software Lab. Alexander Burger ### quote ### @@ -10,12 +10,6 @@ (test '(A B C) (as (= 3 3) A B C)) -### pid ### -(test NIL (pid 1 '+ 3 4))) -(test 7 (pid *Pid '+ 3 4)) -(test 7 (pid (list 0 *Pid 1) '+ 3 4)) - - ### lit ### (test 123 (lit 123)) (test NIL (lit NIL))