home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / ti / pcscm3_3 / read.me < prev    next >
Encoding:
Text File  |  1988-06-07  |  21.8 KB  |  478 lines

  1.               PC Scheme Version 3.03 Release Notes
  2.  
  3.   This document describes the changes in PC Scheme since version 2.0. 
  4.  
  5.  
  6. PC Scheme 3.0 features
  7. ----------------------
  8.  
  9.   Version 3.0 contains bug fixes, significant enhancements over 2.0, and
  10. has been upgraded to the latest Scheme Standard as defined by the "Revised
  11. Revised Revised (R^3) Report on the Algorithmic Language Scheme." A copy 
  12. of that report is now included in the 3.0 manuals.
  13.  
  14.   Also included in this document is a number of features which are not
  15. documented in the Language Reference Manual nor the User's Guide, but
  16. which may be useful for programming.
  17.  
  18. R^3 Report Changes
  19. ------------------
  20.  
  21.   1. #T and #F now replace #!TRUE and #!FALSE. #!TRUE and #!FALSE are
  22.      still supported in 3.0, however their use is discouraged and they
  23.      may not be supported in future versions.
  24.  
  25.   2. Quasiquote expressions may now be nested and are defined to work
  26.      with vectors. The keywords UNQUOTE (",") and UNQUOTE-SPLICING (",@")
  27.      are also now recognized.
  28.  
  29.   3. The defining form (DEFINE (<variable> <formals>) <body>) no longer
  30.      expands into a NAMED-LAMBDA as specified in the Report. To support
  31.      code written under earlier versions of Scheme, the global variable
  32.      PCS-INTEGRATE-DEFINE may be set non-nil to force the expansion, or
  33.      nil to conform to the Report. Its default value is #T.
  34.  
  35.   4. BOOLEAN? is a new procedure which indicates if an object is either
  36.      #T or #F (ie., (BOOLEAN? #T) => #T).
  37.  
  38.   5. PROCEDURE? is a new procedure which indicates if an object is a
  39.      procedure (ie., (PROCEDURE? CAR) => #T).
  40.  
  41.   6. The expression types NAMED-LAMBDA, REC, and SEQUENCE have been removed
  42.      from the Report but will continue to be supported as extensions.
  43.  
  44.   7. The following procedures have been removed from the report, however
  45.      they will continue to be supported as extensions:
  46.  
  47.     APPEND!, STRING-NULL?, SUBSTRING-FILL!, SUBSTRING-MOVE-LEFT!,
  48.     SUBSTRING-MOVE-RIGHT!, OBJECT-HASH, OBJECT-UNHASH, 1+, -1+.
  49.  
  50.   8. The redundant procedure names <?, <=?, =?, >?, and >=? have been removed
  51.      from the Report and will be supported in this release, however their use
  52.      is discouraged and future versions may not support them.
  53.  
  54.   9. The syntax #!NULL (for the empty list) has been removed from the report.
  55.      Its usage is also discouraged and may not be supported in the future.
  56.  
  57.  
  58.  
  59. Bug Fixes
  60. ---------
  61.  
  62.   1. DEFINE has been corrected to bind a variable in the correct environment.
  63.      Earlier versions of PCS could incorrectly rebind variables defined in
  64.      parent environments, if the variable did not exist in the defining
  65.      environment.
  66.  
  67.   2. IMPLODE now flags an error if given a non-list object.
  68.  
  69.   3. NUMBER->STRING has fixes to correct problems with the '(heur) format.
  70.  
  71.   4. Shift/Break now correctly halts printing of circular lists.
  72.  
  73.   5. INPUT-PORT? and OUTPUT-PORT? have been corrected to return '() after the
  74.      port is closed.
  75.  
  76.   6. Expanded Memory Scheme no longer requires the EMM page frame to be on a
  77.      64kb boundary.
  78.  
  79.   7. Drawing a line from x1,y1 to x2,y2 and later erasing it in the
  80.      direction x2,y2 to x1,y1 now correctly resets all the intermediate
  81.      pixels.
  82.  
  83.  
  84.  
  85. Enhancements/New Features
  86. -------------------------
  87.  
  88.   1. Graphics has undergone significant changes which are documented in the
  89.      User's Guide and Language Reference Manual. Following is a synopsis of
  90.      the changes:
  91.  
  92.     * The %GRAPHICS primitives now accept a seventh argument to specify
  93.       an exclusive-or when drawing pixels or lines.
  94.  
  95.     * A new %GRAPHICS function has been included which allows you to set
  96.       a clipping rectangle which subsequent drawing functions use. All
  97.       %GRAPHICS drawing routines now use the clipping rectangle.
  98.  
  99.     * New graphics functions:
  100.          (GET-PEN-COLOR)    - returns the pen's color.
  101.          (GET-PEN-POSITION) - returns the pen's position.
  102.          (POINT-COLOR)    - returns a point's color value.
  103.          (SET-CLIPPING-RECTANGLE! x1 y1 x2 y2) - set clipping rectangle.
  104.  
  105.     * Modes 14 and 16 for the EGA are now supported.
  106.  
  107.     * CLEAR-GRAPHICS no longer automatically switches into mode 4, but
  108.       remains in the current video mode. SET-VIDEO-MODE! will automati-
  109.       cally do a CLEAR-GRAPHICS after changing modes.
  110.  
  111.   2. EDWIN contains several changes to help in its performance and flexibility.
  112.  
  113.     * The file EDWIN.INI will be loaded if it exists within the PCS
  114.       directory. EDWIN.INI may contain code to customize the display,
  115.       or remap the keyboard. See EDWIN.INI for examples.
  116.  
  117.     * Edwin now loads into its own environment, EDWIN-ENVIRONMENT. This
  118.       reduces the number of variables in the USER-GLOBAL-ENVIRONMENT and
  119.       allows EDWIN to be removed via the new REMOVE-EDWIN command.
  120.  
  121.     * REMOVE-EDWIN is a procedure of no arguments which may now be called
  122.       to remove references to EDWIN so that it will disappear upon the
  123.       next garbage collection. Remember that if EDWIN was loaded from
  124.       SCHEME-TOP-LEVEL, the history will still contain pointers to EDWIN,
  125.       prohibiting it from being garbage collected. In that case, you must
  126.       perform a SCHEME-RESET prior to the garbage collect to remove all
  127.       references to EDWIN.
  128.  
  129.     * EDWIN will now query the user upon exiting Scheme, if its buffers
  130.       have been modified but not written back out to the file.
  131.  
  132.     * The time required to load files into EDWIN's buffer has been
  133.       significantly reduced.
  134.  
  135.   3. PC Scheme now contains an External Language Interface (XLI) to support
  136.      the calling of subroutines written in other languages. XLI has been
  137.      tested to work with assembly, C and Pascal. See the chapter "External
  138.      Language Interface (XLI)" in the User's Guide for more information.
  139.  
  140.   4. Transcendental functions have been rewritten using XLI and
  141.      use the 8087/80287 numeric coprocessor when it is available.
  142.      Accuracy is true double-precision and performance is significantly
  143.      improved, even without the 8087.  The complete source code of this
  144.      XLI interface is included.  Refer to the chapter "External Language
  145.      Interface (XLI)" in the User's Guide for more information.
  146.  
  147.   5. A semi-interpretive EVAL has been implemented. EVAL now works
  148.      interpretively until it encounters a binding form (such as LAMBDA,
  149.      LET, etc.), at which time the compiler will be invoked.
  150.  
  151.   6. READ-LINE has been implemented as a primitive operation and will now echo
  152.      to the screen when called to read from the console.
  153.  
  154.   7. LIST-TAIL has been implemented as a primitive operation. Both LIST-REF
  155.      and LIST-TAIL gain significant performance increases.
  156.  
  157.   8. Random I/O is now supported via SET-FILE-POSITION! and GET-FILE-POSITION.
  158.      See the description in the Language Reference Manual.
  159.  
  160.   9. Binary file input and output is now supported via OPEN-BINARY-INPUT-FILE
  161.      and OPEN-BINARY-OUTPUT-FILE procedures. See the description in the
  162.      Language Reference Manual.
  163.  
  164.   10. The non-essential procedure STRING->NUMBER from the R^3 Report is now
  165.       included. See the description in the Language Reference Manual.
  166.  
  167.   11. #\ESCAPE has been added as a system defined character.
  168.  
  169.   12. Enhanced error handling is now available, and DOS I/O errors now trap
  170.       to the inspector, with extended error information available. Reference
  171.       the User's Guide under the chapter "DEBUGGING" for information on
  172.       defining your own error handler via *USER-ERROR-HANDLER*.
  173.  
  174.   13. New procedures EXPAND-MACRO-1, EXPAND-MACRO, and EXPAND. EXPAND-MACRO-1
  175.       will expand the outer-level of some form once and return the expanded
  176.       form, EXPAND-MACRO will repeatedly expand the outer-level form until it
  177.       is no longer a macro, and EXPAND will expand the entire form (outer and
  178.       inner level forms), returning an expansion.
  179.  
  180.     Example: (EXPAND-MACRO '(let ((a 1) (b 2)) (foo a b)))
  181.  
  182.       *** Note ***
  183.     When expanding various forms with the above procedures, you may
  184.     encounter references to primitive operations. These primitive oper-
  185.     ations typically begin with one or more percent signs (%), are
  186.     generally not available for direct use by the user, and may change
  187.     in future versions of PC Scheme.
  188.  
  189.   14. The random number generator can be reseeded using the RANDOMIZE
  190.       function.  See the description in the Language Reference Manual.
  191.  
  192.  
  193.  
  194. Corrections to the Manuals
  195. --------------------------
  196.  
  197. The following corrections to the User's Guide should be noted.
  198.  
  199.    1. At the top of page 8-16, the request number to be used for the
  200.       "swap" special service request was omitted.  The bullet that reads:
  201.  
  202.     * swap
  203.  
  204.       should be replaced with:
  205.  
  206.     * swap (request number = 1)
  207.  
  208.    2. On page C-1 the symbol "remap" is equated with interrupt 7fh.
  209.       However, the comment just below it refers to interrupt 60h.
  210.       The correct interrupt number is 7fh.  Therefore, the comment that reads:
  211.  
  212.     ; This example uses the interrupt at 60h; refer to ...
  213.  
  214.       should be replaced with:
  215.  
  216.     ; This example uses the interrupt at 7fh; refer to ...
  217.  
  218.  
  219.  
  220. Undocumented/Non-Standard Features
  221. ----------------------------------
  222.  
  223. The following features are undocumented features which may or may not be
  224. supported in future releases. They certainly are not standard Scheme
  225. features and prohibit portability, but may be useful in some cases.
  226.  
  227.  
  228.   1. GRAPHICS-WINDOW is a function which may be useful in creating graphics
  229.      windows. It is currently in an experimental stage, is not fully complete,
  230.      and is subject to change. Still, it is useful in its current form, and
  231.      you may try it out at your own risk.
  232.  
  233.      GRAPHICS-WINDOW is a "marker" function indicating that the next series
  234.      of MIT graphics functions will execute relative to a specified window
  235.      instead of the full screen. It takes one argument, a window object
  236.      (a port), and returns a 2-list of 4-lists.  The first list is the
  237.      clipping rectangle for the window's interior using window-centered 
  238.      coordinates, expressed as (left top right bottom), for use by the MIT
  239.      functions, and the second list is the same rectangle expressed in
  240.      screen coordinates for use by %GRAPHICS.  It changes the graphics
  241.      state known by the MIT functions and sets the clipping rectangle to
  242.      correspond to the window's interior so that further use of the MIT
  243.      functions will execute relative to the window instead of the full screen.
  244.      Aside from setting the clipping rectangle, there are no other effects
  245.      on %GRAPHICS.
  246.  
  247.      After executing GRAPHICS-WINDOW on a window for the first time, a call
  248.      to CLEAR-GRAPHICS should be issued to set the pen position and color
  249.      and erase the graphics plane under the window (which may erase text
  250.      too if they share the same plane). Further graphics commands are 
  251.      issued normally.
  252.  
  253.      To move from one graphics window to another, use GRAPHICS-WINDOW with 
  254.      the next window.  Note that when you move to another window, the graphics
  255.      state (window, pen color, and pen position) of the first window is
  256.      forgotten.  You will need to save it off if you want to come back and
  257.      start up where you left off.  The functions CURRENT-GRAPHICS-WINDOW,
  258.      GET-PEN-COLOR, and GET-PEN-POSITION, executed before the switch, will
  259.      give you this information.
  260.  
  261.      While executing relative to a window, CLEAR-GRAPHICS will not affect
  262.      the entire screen.  To reset CLEAR-GRAPHICS to its initial state
  263.      where it does affect the entire screen, do (GRAPHICS-WINDOW 'SCREEN)
  264.      followed by (CLEAR-GRAPHICS).  Executing SET-VIDEO-MODE! any time will do
  265.      this automatically.  Note that (GRAPHICS-WINDOW 'SCREEN) is not the same
  266.      as (GRAPHICS-WINDOW 'CONSOLE); although the console generally matches the
  267.      screen, it doesn't have to--it's a window in its own right.
  268.  
  269.   2. %LOGAND, %LOGIOR, %LOGXOR are procedures of two arguments and are used
  270.      to perform the bitwise logical operations and, or, and xor. The
  271.      arguments must be 15 bit integers.
  272.  
  273.   3. UNBIND is a procedure which may be used to remove bindings from
  274.      environments. The call to unbind is as follows:
  275.  
  276.        (UNBIND 'VAR ENV)
  277.  
  278.          Where : VAR is the variable you wish to remove
  279.              ENV is any heap allocated environment, including the
  280.              user-initial and user-global environments.
  281.  
  282.      Unbind can be useful in providing user-assisted memory management.
  283.      If an object which is auto-loadable is unbound via the UNBIND
  284.      procedure, it may later be auto-loaded again. Therefore, if you
  285.      define autoload lists, you can maintain some control over what
  286.      code you desire in memory.
  287.  
  288.   4. Autoload information created from the function AUTOLOAD-FROM-FILE (see
  289.      chapter titled "ADVANCED FEATURES" in User's Guide) is stored on a
  290.      property list under the name PCS-AUTOLOAD-INFO. Scheme defines a number
  291.      of autoload entries of its own, and any that you add will be consed
  292.      onto the autoload list. You can see the autoload information by
  293.      performing (GETPROP 'PCS-AUTOLOAD-INFO).
  294.  
  295.      The procedure AUTOLOAD-FROM-FILE also takes an optional third argument
  296.      which indicates the environment that you want the file loaded into. For
  297.      example
  298.  
  299.        (autoload-from-file "DEFS.FSL" '(foo bar baz) user-initial-environment)
  300.  
  301.      will load the file "DEFS.FSL" into the user-initial-environment whenever
  302.      foo, bar, or baz is referenced. The optional environment argument can
  303.      be any heap allocated environment. To add or delete entries from the
  304.      autoload list just write your own functions to modify the list, however
  305.      if you remove any of the compiler dependent files from the list, a
  306.      reference to one of its functions will cause errors.
  307.  
  308.      The undocumented procedure REMOVE-AUTOLOAD-INFO may be used to remove
  309.      information from the autoload list. REMOVE-AUTOLOAD-INFO takes one
  310.      argument, the filename of the autoload entry you wish to remove, and
  311.      then removes the autoload information from the list. This function,
  312.      along with UNBIND can be used to help the user perform memory manage-
  313.      ment.
  314.  
  315.   5. MAKE-HASHED-ENVIRONMENT is a procedure of no arguments which creates
  316.      an environment in the Scheme heap in the form of a hash table for
  317.      better accessing. The hash table contains 211 entries; any time a
  318.      variable is defined in that environment a hash key will be determined
  319.      via an internal hash function to find the correct entry. This is
  320.      identical to the user global and user initial environments. A hashed
  321.      environment's parent is the user-initial-environment.
  322.  
  323.      A hashed environment will provide better access times than normal
  324.      environments, given there are a lot of variables in the environment.
  325.      However, there is certainly a space/time tradeoff to consider. The
  326.      hashed environment contains much more overhead which will be wasted
  327.      if you need only a handfull of variables.
  328.  
  329.      One advantage of the hashed environment, as with all environments,
  330.      is that if you discard all references to the environment, it will
  331.      be garbage collected and all the space may be reclaimed. This means
  332.      that you must keep track of all variables or references which are
  333.      exported to other environments. Also, if you define a macro within
  334.      an environment, the macro definition holds a reference to the
  335.      environment and will prohibit garbage collection of the environment.
  336.      Macro definitions may be found under the property PCS*MACRO of the
  337.      macro name declared.
  338.  
  339.   6. While the 3.0 implementation of transcendental functions is much
  340.      faster and more accurate and therefore to be preferred, the 2.0
  341.      version had the advantage of being about half the size.  If space is
  342.      more important than speed or accuracy, you can do the following:
  343.  
  344.     1. Invoke PC Scheme as usual, except put a minus sign in front
  345.        of the .XLI control file name; this prevents XLI from
  346.        loading NEWTRIG.EXE.  For example:
  347.  
  348.           pcs (my.ini -my.xli) arg1 arg2
  349.  
  350.     2. Inside PC Scheme, do:
  351.          (eval '(load "oldpmath.fsl") user-global-environment)
  352.        If your current directory is not the PC Scheme directory,
  353.        you'll need to append the value of the system variable
  354.        PCS-SYSDIR to the front of the filename.  The LOAD must be
  355.        inside the EVAL so that autoload references to pmath.fsl
  356.        will be intercepted correctly.
  357.  
  358.      It is not absolutely necessary to do step 1 just to use oldpmath.fsl,
  359.      but the space savings won't be realized without it.  Also, step 2
  360.      should be done soon upon entering PC Scheme, as various system
  361.      functions, such as some Edwin commands, require the math functions
  362.      (whether through XLI\pmath.fsl or through oldpmath.fsl) to be loaded.
  363.  
  364. PC Scheme 3.02 features
  365. -----------------------
  366.   
  367. The following bugs have been fixed.
  368.  
  369.   1. There were several obscure bugs in the extended and expanded memory
  370.      models of PC Scheme which have been corrected.  Also, extended memory
  371.      performance has been enhanced by about 25%.
  372.  
  373.   2. PC Scheme 3.02 recognizes an IBM PS/2 Model 80.  IBM has assigned
  374.      a new machine-type number to it, which is reflected in the value
  375.      of PCS-MACHINE-TYPE.  More importantly, FREESP in extended memory
  376.      PC Scheme now works correctly on the Model 80.
  377.  
  378.   3. EQUAL? on ports no longer causes a type mismatch error.
  379.  
  380.   4. There was a bug in determining the pathname of NEWTRIG.EXE when
  381.      PC Scheme had been installed in the root directory.  This usually
  382.      showed itself when running PC Scheme from floppy disks.
  383.  
  384.   5. In the form (SET! (ACCESS var env) value), there was a bug in which
  385.      environment the "value" was placed if the "var" did not already exist.
  386.  
  387.   6. DOS-CALL no longer depends on the COMSPEC environment variable
  388.      being listed first in the DOS environment.
  389.  
  390.   7. Line-lengths for binary files are now automatically set to zero
  391.      so end-of-line sequences are suppressed.
  392.  
  393.   8. XLI checks for its version number.  PC Scheme 3.02 uses the same
  394.      version number as 3.0.  The error message is "[XLI] Version mismatch".
  395.      Also, the XLI error message "[XLI] The function requested by XCALL is not
  396.      available" now is followed by the name of the function that failed.
  397.  
  398.   10. PC Scheme's definition of EQV? says "=" is used to compare numeric
  399.      arguments.  However, MEMV and ASSV, which are supposed to use EQV?
  400.      for their equality predicates, were really using EQUAL?.  "=" and
  401.      EQUAL? return different results when two numeric arguments have
  402.      different types, so the fix may cause a change of behavior in how
  403.      MEMV and ASSV work.
  404.  
  405.   11. Internal "getmem" errors no longer cause an abort to DOS.
  406.      Instead, the system performs a SCHEME-RESET.  The error generally
  407.      appears during output of extremely large data structures when
  408.      I/O buffer space is exhausted, but the data structures themselves
  409.      remain intact, so this should be adequate recovery in most cases.
  410.  
  411.   12. A bug in SCOOPS was making the environments in which instance 
  412.      variables got created be dependent on the order in which the
  413.      classes were compiled.
  414.  
  415. The following features are "new" to PC Scheme 3.02.
  416.  
  417.   1. XLI can now receive error messages from external programs and drop into
  418.      the Inspector displaying the error message. 
  419.  
  420.      The external program reports an error as follows.  It formats the
  421.      parameter block with a string as return value, where the string is
  422.      the error message.  However, instead of using a return-value type of
  423.      2 (string), it should use a value of 10 (error-string).  XLI will
  424.      drop into the Inspector with the error message "[XLI] Error reported
  425.      by external program" followed on the next line by the external
  426.      program's error message (note the Inspector uses WRITE to display
  427.      the message).  The error is not restartable.
  428.  
  429.      If an external program using this error technique is run under
  430.      PC Scheme 3.0, XLI reports the different error "[XLI] The return value
  431.      of XCALL is invalid" and the external program's error message never
  432.      appears.
  433.  
  434.      NEWTRIG.EXE has been reimplemented with this technique.  Refer to
  435.      the file XLI\TRIG_LC.C to examine the source code.
  436.  
  437.   2. There are a couple more XLI source examples in the XLI directory.
  438.      One is in assembly language, the other in C.  One provides PC Scheme 
  439.      with sound capability, and the other demonstrates a way to run
  440.      DOS-executable files without using DOS-CALL.
  441.  
  442.   3. %GRAPHICS for EGA has been reimplemented to do direct screen writes.
  443.      This gives a significant performance boost at the expense of generality,
  444.      which may affect some EGA clones.  Also, VGA modes 17 and 18 are now
  445.      supported.
  446.  
  447. PC Scheme 3.03 features
  448. -----------------------
  449.   
  450. The following bugs have been fixed.
  451.  
  452.   1. Random I/O has been fixed. If a file is opened with OPEN-EXTEND-FILE,
  453.      one can perform both input from and output to that file.
  454.  
  455.   2. An obscure garbage collection bug was fixed which envolved one defining
  456.      their own top-level. If a user top-level has been defined instead of
  457.      the Scheme-Top-level, and an out of memory encountered an error message
  458.      occurred on the next garbage collect.
  459.  
  460.   3. A garbage collection bug in extended memory was fixed. Compaction of
  461.      list cells could sometimes cause problems.
  462.  
  463.   4. A problem with DOS memory fragmentation was fixed. Upon returning from
  464.      PC Scheme, all of memory was not being returned to DOS. This could some-
  465.      times cause other programs to fail with "not enough memory" errors.
  466.  
  467. The following new features have been added:
  468.  
  469.   1. Support has been added for VGA mode 18.
  470.  
  471.  
  472.   2. One can now specify when garbage compaction should occur. 
  473.  
  474.     (GC-GET-COMPACT-COUNT! number) - specifies that a compaction should
  475.                      occur after every "number" of gc's.
  476.  
  477.     (GC-GET-COMPACT-COUNT)            - returns the current "number".
  478.