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