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 | ||
6685dc83 JB |
9 | Changes since Thursday, September 5: |
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 | ||
3065a62a JB |
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 | ||
1a1945be JB |
38 | Now you can use Guile as an interpreter, using a mechanism which is a |
39 | compatible subset of that provided by SCSH. | |
40 | ||
3065a62a JB |
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 | |
3763761c JB |
71 | scripts once we do. Furthermore, if the path to Guile on your system |
72 | is too long for your kernel, you can start the script with this | |
73 | horrible hack: | |
74 | ||
75 | #!/bin/sh | |
76 | exec /really/long/path/to/guile -s "$0" ${1+"$@"} | |
77 | !# | |
3065a62a JB |
78 | |
79 | Note that some very old Unix systems don't support the `#!' syntax. | |
80 | ||
6685dc83 JB |
81 | * You can now run Guile without installing it. |
82 | ||
83 | Previous versions of the interactive Guile interpreter (`guile') | |
84 | couldn't start up unless Guile's Scheme library had been installed; | |
85 | they used the value of the environment variable `SCHEME_LOAD_PATH' | |
86 | later on in the startup process, but not to find the startup code | |
87 | itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme | |
88 | code. | |
89 | ||
90 | To run Guile without installing it, build it in the normal way, and | |
91 | then set the environment variable `SCHEME_LOAD_PATH' to a | |
92 | colon-separated list of directories, including the top-level directory | |
93 | of the Guile sources. For example, if you unpacked Guile so that the | |
94 | full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then | |
95 | you might say | |
96 | ||
97 | export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3 | |
98 | ||
99 | * Guile's header files should no longer conflict with your system's | |
100 | header files. | |
101 | ||
102 | In order to compile code which #included <libguile.h>, previous | |
103 | versions of Guile required you to add a directory containing all the | |
104 | Guile header files to your #include path. This was a problem, since | |
105 | Guile's header files have names which conflict with many systems' | |
106 | header files. | |
107 | ||
108 | Now only <libguile.h> need appear in your #include path; you must | |
109 | refer to all Guile's other header files as <libguile/mumble.h>. | |
110 | Guile's installation procedure puts libguile.h in $(includedir), and | |
111 | the rest in $(includedir)/libguile. | |
112 | ||
113 | * The compiled-library-path function has been deleted from libguile. | |
114 | ||
115 | * A variable and two new functions have been added to libguile: | |
116 | ||
117 | ** The variable %load-path now tells Guile which directories to search | |
118 | for Scheme code. Its value is a list of strings, each of which names | |
119 | a directory. | |
120 | ||
121 | ** (%search-load-path FILENAME) searches the directories listed in the | |
122 | value of the %load-path variable for a Scheme file named FILENAME. If | |
123 | it finds a match, then it returns its full filename. Otherwise, it | |
124 | returns #f. %search-load-path will not return matches that refer to | |
125 | directories. | |
126 | ||
127 | ** (%try-load-path FILENAME :optional CASE-INSENSITIVE-P SHARP) | |
128 | searches the directories listed in %load-path for a file named | |
129 | FILENAME, and loads it if it finds it. If it can't read FILENAME for | |
130 | any reason, it throws an error. | |
131 | ||
132 | The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the | |
133 | %try-load function. | |
134 | ||
6685dc83 | 135 | \f |
1a1945be JB |
136 | Older changes: |
137 | ||
138 | * Guile no longer includes sophisticated Tcl/Tk support. | |
139 | ||
140 | The old Tcl/Tk support was unsatisfying to us, because it required the | |
141 | user to link against the Tcl library, as well as Tk and Guile. The | |
142 | interface was also un-lispy, in that it preserved Tcl/Tk's practice of | |
143 | referring to widgets by names, rather than exporting widgets to Scheme | |
144 | code as a special datatype. | |
145 | ||
146 | In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk | |
147 | maintainers described some very interesting changes in progress to the | |
148 | Tcl/Tk internals, which would facilitate clean interfaces between lone | |
149 | Tk and other interpreters --- even for garbage-collected languages | |
150 | like Scheme. They expected the new Tk to be publicly available in the | |
151 | fall of 1996. | |
152 | ||
153 | Since it seems that Guile might soon have a new, cleaner interface to | |
154 | lone Tk, and that the old Guile/Tk glue code would probably need to be | |
155 | completely rewritten, we (Jim Blandy and Richard Stallman) have | |
156 | decided not to support the old code. We'll spend the time instead on | |
157 | a good interface to the newer Tk, as soon as it is available. | |
5c54da76 | 158 | |
8512dea6 | 159 | Until then, gtcltk-lib provides trivial, low-maintenance functionality. |
deb95d71 | 160 | |
5c54da76 JB |
161 | \f |
162 | Copyright information: | |
163 | ||
164 | Copyright (C) 1996 Free Software Foundation, Inc. | |
165 | ||
166 | Permission is granted to anyone to make or distribute verbatim copies | |
167 | of this document as received, in any medium, provided that the | |
168 | copyright notice and this permission notice are preserved, | |
169 | thus giving the recipient permission to redistribute in turn. | |
170 | ||
171 | Permission is granted to distribute modified versions | |
172 | of this document, or of portions of it, | |
173 | under the above conditions, provided also that they | |
174 | carry prominent notices stating who last changed them. | |
175 |