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