home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / winterp-1.13 / doc / README.XLISP < prev    next >
Encoding:
Text File  |  1991-10-06  |  10.2 KB  |  272 lines

  1. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  2. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  3. #
  4. # Permission to use, copy, modify, distribute, and sell this software and its
  5. # documentation for any purpose is hereby granted without fee, provided that
  6. # the above copyright notice appear in all copies and that both that
  7. # copyright notice and this permission notice appear in supporting
  8. # documentation, and that the name of Hewlett-Packard, David Betz and
  9. # Niels Mayer not be used in advertising or publicity pertaining to distribution
  10. # of the software without specific, written prior permission.  Hewlett-Packard,
  11. # David Betz and Niels Mayer makes no representations about the suitability of
  12. # this software and documentation for any purpose.  It is provided "as is"
  13. # without express or implied warranty.
  14. #
  15.  
  16. NOTE: to make a standalone XLISP 2.1, use rule "lisp:" in
  17. ./winterp/src-server/xlisp/Makefile.{hpux,generic,sparc}. All the original
  18. XLISP files are in directory ../src-server/xlisp and all the original XLISP
  19. example files are in ../examples/{xlisp-1.6,xlisp-2.1}. Note that the XLISP
  20. code has been #ifdef'd for WINTERP. Doing "make lisp" out of one of the
  21. aforementioned makefiles should build you a standard XLISP 2.1 binary
  22. because that make rule doesn't define cpp symbol -DWINTERP...
  23.  
  24.                 -- Niels Mayer.
  25. ==============================================================================
  26.  
  27. XLISP 2.0 is an experimental programming language combining some of
  28. the features of Common Lisp with an object-oriented extension
  29. capability.  It was implemented to allow experimentation with
  30. object-oriented programming on small computers.  It was written and is
  31. copyrighted by David Micheal Betz.  See xlisp.doc for more information
  32.  
  33. INFO2.0 contains information about changes from Xlisp1.7.  I don't
  34. have any other change lists.
  35.  
  36. Before attempting to recompile any of the modules, make sure that the
  37. proper symbol is defined at the top of 'xlisp.h' where the machine
  38. type is specified (right under the copyright notice) and modify the
  39. Makefile for your machine.  Watch out for the *.h.* and the *.c.*
  40. names when you transfer files to the smaller machines.
  41.  
  42. AZTEC_AMIGA    /* Amiga, AZTEC C compiler */
  43. DR        /* Atari ST, Digital Research C compiler */
  44. LATTICE        /* Atari ST, Lattice C compiler */
  45. MWC        /* Atari ST, Mark Williams C compiler */
  46. UNIX        /* BSD and AT&T */
  47. AZTEC_MAC    /* Macintosh, AZTEC C compiler */
  48. LSC        /* Macintosh, Lightspeed C compiler */
  49. _TURBOC_    /* MS-DOS, large model, Turbo C compiler */
  50. AZTEC_LM    /* MS-DOS, large model, AZTEC C compiler */
  51. MSC        /* MS-DOS, large model, Microsoft C compiler */
  52.  
  53. I added the UNIX support (from the 1.7 Unix support).  I have only
  54. tried the UNIX version.  I don't have binaries.  I put together the
  55. Makefile to run on UNIX.  You will need to fix up something
  56. appropriate for the other systems.  If something is missing please let
  57. me know.  I will collect support for other compiler/OS combinations.
  58.  
  59. Brad Davis
  60. {ihnp4, decvax, ut-sally}!utah-cs!cai!b-davis
  61. b-davis@cs.utah.edu
  62. b-davis@cai.utah.edu
  63.  
  64. ==============================================================================
  65. File INFO2.0 -- information on new features added bet v1.7 --> v2.0
  66. ==============================================================================
  67.  
  68. This is a list of new features in XLISP version 2.0 as of 16Dec87:
  69.  
  70. Symbols have two value cells, one for normal values and one for
  71. function values.  SETQ sets the normal value, DEFUN sets the
  72. functional value.
  73.  
  74. The most important change from version 1.7 to 2.0 of XLISP is that
  75. it is now possible to save XLISP's workspace between sessions.  This
  76. feature isn't necessarily part of every implementation of XLISP 2.0
  77. since it is controlled by a compile-time conditional.  Check the file
  78. 'xlisp.h' to see if the symbol SAVERESTORE is defined for your machine
  79. before you try to use these functions.
  80.  
  81. The &key lambda list keyword is now supported as are initialization forms
  82. for &optional, &key and &aux parameters.  The supplied-p variables are
  83. also supported for &optional and &key parameters.
  84.  
  85. New functions and special forms:
  86.  
  87. (save filename)        ; *** NOT IN ALL 2.0 IMPLEMENTATIONS ***
  88. (restore filename)    ; *** NOT IN ALL 2.0 IMPLEMENTATIONS ***
  89. (subseq string start [end])
  90. (open name &key :direction)
  91. (vector [expr]...)
  92. (block name [expr]...)
  93. (return-from name [value])
  94. (tagbody [tag|expr]...)
  95. (psetq [sym value]...)
  96. (flet ([sym lambda-list [body]...]...) [expr]...)
  97. (labels ([sym lambda-list [body]...]...) [expr]...)
  98. (macrolet ([sym lambda-list [body]...]...) [expr]...)
  99. (unwind-protect expr [expr]...)
  100. (when test [expr]...)
  101. (unless test [expr]...)
  102. (loop [expr]...)
  103. (progv symbols values [expr]...)
  104. (pprint expr [stream])
  105. (string< str1 str2 &key :start1 :end1 :start2 :end2)
  106. (string= str1 str2 &key :start1 :end1 :start2 :end2)
  107. (string> str1 str2 &key :start1 :end1 :start2 :end2)
  108. (string<= str1 str2 &key :start1 :end1 :start2 :end2)
  109. (string/= str1 str2 &key :start1 :end1 :start2 :end2)
  110. (string>= str1 str2 &key :start1 :end1 :start2 :end2)
  111. (string-lessp str1 str2 &key :start1 :end1 :start2 :end2)
  112. (string-equal str1 str2 &key :start1 :end1 :start2 :end2)
  113. (string-greaterp str1 str2 &key :start1 :end1 :start2 :end2)
  114. (string-not-greaterp str1 str2 &key :start1 :end1 :start2 :end2)
  115. (string-not-equal str1 str2 &key :start1 :end1 :start2 :end2)
  116. (string-not-lessp str1 str2 &key :start1 :end1 :start2 :end2)
  117. (string-trim bag string)
  118. (string-left-trim bag string)
  119. (string-right-trim bag string)
  120. (string-upcase string &key :start :end)
  121. (string-downcase string &key :start :end)
  122. (nstring-upcase string &key :start :end)
  123. (nstring-downcase string &key :start :end)
  124. (symbol-function sym)
  125. (send obj msg [expr]...)
  126. (send-super msg [expr]...)
  127. (integerp expr)
  128. (floatp expr)
  129. (stringp expr)
  130. (arrayp expr)
  131. (streamp expr)
  132. (objectp expr)
  133. (fboundp expr)
  134. (characterp expr)
  135. (int-char expr)
  136. (char-int expr)
  137. (read-byte [stream])
  138. (write-byte expr [stream])
  139. (make-string-input-stream string [start [end]])
  140. (make-string-output-stream)
  141. (get-output-stream-string stream)
  142. (get-output-stream-list stream)
  143. (get-lambda-expression closure)
  144. (gcd expr1 expr2)
  145. (macroexpand form)
  146. (macroexpand-1 form)
  147. (format stream fmt &rest args)
  148.  
  149. The only FORMAT directives that are supported are ~A, ~S, ~% and ~~
  150. for now.  You can use NIL as the stream argument to get output to
  151. *standard-output* and T to have a string built and returned as the
  152. value of the FORMAT function.  Obviously, you can also use and stream
  153. as the value of the stream argument.  Using anything other than T will
  154. cause FORMAT to return NIL.
  155.  
  156. There is now a real character data type.  All functions that are
  157. supposed to return characters (like READ-CHAR) now do.
  158.  
  159. The reader is now capable of handling both single and multiple escapes.
  160. This means that it is possible to read the symbol |aBc| and get a symbol
  161. with the print name "aBc".  The backslash can also be used as a single
  162. escape.  The same symbol could have been written \aB\c.
  163.  
  164. The read table now supports the character types :SESCAPE for single
  165. escape and :MESCAPE for multiple escapes.
  166.  
  167. The reader also supports the reader macros:
  168.  
  169.     #:symbol    an uninterned symbol
  170.     #| ... |#   a comment
  171.     #Onumber    an octal number
  172.     #Bnumber    a binary number
  173.  
  174. The following symbols preserve a history of values used by the
  175. read-eval-print loop:
  176.  
  177.     -        the current input expression
  178.     +        the last expression read
  179.     ++        the previous value of +
  180.     +++        the previous value of ++
  181.     *        the result of the last evaluation
  182.     **        the previous value of *
  183.     ***        the previous value of **
  184.  
  185. The global symbol *PRINT-CASE* was added to control the output case of
  186. symbols.  Its default value is :UPCASE which will cause symbols to
  187. be printed in uppercase.  You can change it to :DOWNCASE to get symbols
  188. to print in lowercase.
  189.  
  190. I have added the functions FIRST, SECOND, THIRD, FOURTH and REST as
  191. synonyms for CAR, CADR, CADDR, CADDDR and CDR.
  192.  
  193. Changed the default value of *print-case* to :upcase.
  194.  
  195. Added macros to init.lsp for:
  196.  
  197.     (defvar sym &optional val)
  198.     (defparameter sym val)
  199.     (defconstant sym val)
  200.  
  201. These symbols control the format in which numbers are printed.  They
  202. should be set to printf format strings.
  203.  
  204.     *integer-format*    (default is "%d" or "%ld")
  205.     *float-format*     (default is "%g")
  206.  
  207. (substr string start [length]) is replaced by:
  208.     (subseq string start [end])
  209.  
  210. (openi name) is replaced by: (open name :direction :input)
  211. (openo name) is replaced by: (open name :direction :output)
  212.  
  213. OPEN, LOAD, SAVE and RESTORE take strings or symbols as file names.
  214. If a symbol is given, the print name of the symbol is used as the base
  215. filename and the default extension (if any) is appended.
  216.  
  217. Renamed MEM to ROOM and TRANSCRIPT to DRIBBLE.
  218.  
  219. Added a trace facility.  The evaluator will now print trace
  220. information for function and macro calls.  The names of the
  221. functions and macros to trace should be in a list that is stored
  222. as the value of *TRACELIST*.
  223.  
  224. Added macro definitions for TRACE and UNTRACE to "init.lsp".
  225. Trace output goes to the stream that is the value of *TRACE-OUTPUT*.
  226.  
  227. Removed the hard wired prompting from READ.  There is no longer
  228. an unmatched left paren counter, but the debug level prompt remains.
  229.  
  230. The symbols *ERROR-OUTPUT* and *DEBUG-IO* have been added and
  231. are bound to streams that are used for error output and debug
  232. i/o respectively.
  233.  
  234. The symbol *GC-HOOK* has been added.  If it is bound to a function
  235. of two arguments, that function will be called after the garbage
  236. collector runs.  The two parameters are the total number of nodes
  237. and the number free after the garbage collection.
  238.  
  239. Added the function (COMMAND-POINT-SIZE <n>) to the Macintosh version
  240. to set the point size for the text in the command window.  The default
  241. point size is 9.
  242.  
  243. The SEND-SUPER function replaces the :SENDSUPER message to objects.
  244. All messages must be sent using either the SEND function or the
  245. SEND-SUPER function.  In other words, the syntax:
  246.  
  247.     (Class :new '(a b c))
  248.  
  249. must now be written as:
  250.  
  251.     (send Class :new '(a b c))
  252.  
  253. and
  254.  
  255.     (self :sendsuper :msg 1 2 3)
  256.  
  257. must now be written as:
  258.  
  259.     (send-super :msg 1 2 3)
  260.  
  261. This is because the CAR of a form is no longer evaluated.  To get the
  262. effect of having the function position evaluated, use the FUNCALL form.
  263.  
  264. The syntax of LOAD has changed from:
  265.  
  266.     (load name [verbose-flag [print-flag]])
  267.  
  268. to:
  269.  
  270.     (load name &key :verbose :print)
  271.