| 1 | Guile NEWS --- history of user-visible changes. 2 Aug 1996 -*- text -*- |
| 2 | Copyright (C) 1996 Free Software Foundation, Inc. |
| 3 | See the end for copying conditions. |
| 4 | |
| 5 | Please send Guile bug reports to bug-guile@prep.ai.mit.edu. |
| 6 | \f |
| 7 | Guile 1.0b3 |
| 8 | |
| 9 | Changes since Thursday, September 5: |
| 10 | |
| 11 | |
| 12 | * Guile now distinguishes between #f and the empty list. |
| 13 | |
| 14 | This is for compatibility with the IEEE standard, the (possibly) |
| 15 | upcoming Revised^5 Report on Scheme, and many extant Scheme |
| 16 | implementations. |
| 17 | |
| 18 | Guile used to have #f and '() denote the same object, to make Scheme's |
| 19 | type system more compatible with Emacs Lisp's. However, the change |
| 20 | caused too much trouble for Scheme programmers, and we found another |
| 21 | way to reconcile Emacs Lisp with Scheme that didn't require this. |
| 22 | |
| 23 | * You can now use Guile as a shell script interpreter. |
| 24 | |
| 25 | To paraphrase the SCSH manual: |
| 26 | |
| 27 | When Unix tries to execute an executable file whose first two |
| 28 | characters are the `#!', it treats the file not as machine code to |
| 29 | be directly executed by the native processor, but as source code |
| 30 | to be executed by some interpreter. The interpreter to use is |
| 31 | specified immediately after the #! sequence on the first line of |
| 32 | the source file. The kernel reads in the name of the interpreter, |
| 33 | and executes that instead. It passes the interpreter the source |
| 34 | filename as its first argument, with the original arguments |
| 35 | following. Consult the Unix man page for the `exec' system call |
| 36 | for more information. |
| 37 | |
| 38 | Now you can use Guile as an interpreter, using a mechanism which is a |
| 39 | compatible subset of that provided by SCSH. |
| 40 | |
| 41 | Guile now recognizes a '-s' command line switch, whose argument is the |
| 42 | name of a file of Scheme code to load. It also treats the two |
| 43 | characters `#!' as the start of a comment, terminated by `!#'. Thus, |
| 44 | to make a file of Scheme code directly executable by Unix, insert the |
| 45 | following two lines at the top of the file: |
| 46 | |
| 47 | #!/usr/local/bin/guile -s |
| 48 | !# |
| 49 | |
| 50 | Guile treats the argument of the `-s' command-line switch as the name |
| 51 | of a file of Scheme code to load, and treats the sequence `#!' as the |
| 52 | start of a block comment, terminated by `!#'. |
| 53 | |
| 54 | For example, here's a version of 'echo' written in Scheme: |
| 55 | |
| 56 | #!/usr/local/bin/guile -s |
| 57 | !# |
| 58 | (let loop ((args (cdr (program-arguments)))) |
| 59 | (if (pair? args) |
| 60 | (begin |
| 61 | (display (car args)) |
| 62 | (if (pair? (cdr args)) |
| 63 | (display " ")) |
| 64 | (loop (cdr args))))) |
| 65 | (newline) |
| 66 | |
| 67 | Why does `#!' start a block comment terminated by `!#', instead of the |
| 68 | end of the line? That is the notation SCSH uses, and although we |
| 69 | don't yet support the other SCSH features that motivate that choice, |
| 70 | we would like to be backward-compatible with any existing Guile |
| 71 | scripts once we do. |
| 72 | |
| 73 | Note that some very old Unix systems don't support the `#!' syntax. |
| 74 | |
| 75 | * You can now run Guile without installing it. |
| 76 | |
| 77 | Previous versions of the interactive Guile interpreter (`guile') |
| 78 | couldn't start up unless Guile's Scheme library had been installed; |
| 79 | they used the value of the environment variable `SCHEME_LOAD_PATH' |
| 80 | later on in the startup process, but not to find the startup code |
| 81 | itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme |
| 82 | code. |
| 83 | |
| 84 | To run Guile without installing it, build it in the normal way, and |
| 85 | then set the environment variable `SCHEME_LOAD_PATH' to a |
| 86 | colon-separated list of directories, including the top-level directory |
| 87 | of the Guile sources. For example, if you unpacked Guile so that the |
| 88 | full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then |
| 89 | you might say |
| 90 | |
| 91 | export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3 |
| 92 | |
| 93 | * Guile's header files should no longer conflict with your system's |
| 94 | header files. |
| 95 | |
| 96 | In order to compile code which #included <libguile.h>, previous |
| 97 | versions of Guile required you to add a directory containing all the |
| 98 | Guile header files to your #include path. This was a problem, since |
| 99 | Guile's header files have names which conflict with many systems' |
| 100 | header files. |
| 101 | |
| 102 | Now only <libguile.h> need appear in your #include path; you must |
| 103 | refer to all Guile's other header files as <libguile/mumble.h>. |
| 104 | Guile's installation procedure puts libguile.h in $(includedir), and |
| 105 | the rest in $(includedir)/libguile. |
| 106 | |
| 107 | * The compiled-library-path function has been deleted from libguile. |
| 108 | |
| 109 | * A variable and two new functions have been added to libguile: |
| 110 | |
| 111 | ** The variable %load-path now tells Guile which directories to search |
| 112 | for Scheme code. Its value is a list of strings, each of which names |
| 113 | a directory. |
| 114 | |
| 115 | ** (%search-load-path FILENAME) searches the directories listed in the |
| 116 | value of the %load-path variable for a Scheme file named FILENAME. If |
| 117 | it finds a match, then it returns its full filename. Otherwise, it |
| 118 | returns #f. %search-load-path will not return matches that refer to |
| 119 | directories. |
| 120 | |
| 121 | ** (%try-load-path FILENAME :optional CASE-INSENSITIVE-P SHARP) |
| 122 | searches the directories listed in %load-path for a file named |
| 123 | FILENAME, and loads it if it finds it. If it can't read FILENAME for |
| 124 | any reason, it throws an error. |
| 125 | |
| 126 | The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the |
| 127 | %try-load function. |
| 128 | |
| 129 | \f |
| 130 | Older changes: |
| 131 | |
| 132 | * Guile no longer includes sophisticated Tcl/Tk support. |
| 133 | |
| 134 | The old Tcl/Tk support was unsatisfying to us, because it required the |
| 135 | user to link against the Tcl library, as well as Tk and Guile. The |
| 136 | interface was also un-lispy, in that it preserved Tcl/Tk's practice of |
| 137 | referring to widgets by names, rather than exporting widgets to Scheme |
| 138 | code as a special datatype. |
| 139 | |
| 140 | In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk |
| 141 | maintainers described some very interesting changes in progress to the |
| 142 | Tcl/Tk internals, which would facilitate clean interfaces between lone |
| 143 | Tk and other interpreters --- even for garbage-collected languages |
| 144 | like Scheme. They expected the new Tk to be publicly available in the |
| 145 | fall of 1996. |
| 146 | |
| 147 | Since it seems that Guile might soon have a new, cleaner interface to |
| 148 | lone Tk, and that the old Guile/Tk glue code would probably need to be |
| 149 | completely rewritten, we (Jim Blandy and Richard Stallman) have |
| 150 | decided not to support the old code. We'll spend the time instead on |
| 151 | a good interface to the newer Tk, as soon as it is available. |
| 152 | |
| 153 | \f |
| 154 | Copyright information: |
| 155 | |
| 156 | Copyright (C) 1996 Free Software Foundation, Inc. |
| 157 | |
| 158 | Permission is granted to anyone to make or distribute verbatim copies |
| 159 | of this document as received, in any medium, provided that the |
| 160 | copyright notice and this permission notice are preserved, |
| 161 | thus giving the recipient permission to redistribute in turn. |
| 162 | |
| 163 | Permission is granted to distribute modified versions |
| 164 | of this document, or of portions of it, |
| 165 | under the above conditions, provided also that they |
| 166 | carry prominent notices stating who last changed them. |
| 167 | |