*** 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
6685dc83
JB
9Changes since Thursday, September 5:
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
3065a62a
JB
23* You can now use Guile as a shell script interpreter.
24
25To 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
38Now you can use Guile as an interpreter, using a mechanism which is a
39compatible subset of that provided by SCSH.
40
3065a62a
JB
41Guile now recognizes a '-s' command line switch, whose argument is the
42name of a file of Scheme code to load. It also treats the two
43characters `#!' as the start of a comment, terminated by `!#'. Thus,
44to make a file of Scheme code directly executable by Unix, insert the
45following two lines at the top of the file:
46
47#!/usr/local/bin/guile -s
48!#
49
50Guile treats the argument of the `-s' command-line switch as the name
51of a file of Scheme code to load, and treats the sequence `#!' as the
52start of a block comment, terminated by `!#'.
53
54For 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
67Why does `#!' start a block comment terminated by `!#', instead of the
68end of the line? That is the notation SCSH uses, and although we
69don't yet support the other SCSH features that motivate that choice,
70we would like to be backward-compatible with any existing Guile
71scripts once we do.
72
73Note that some very old Unix systems don't support the `#!' syntax.
74
6685dc83
JB
75* You can now run Guile without installing it.
76
77Previous versions of the interactive Guile interpreter (`guile')
78couldn't start up unless Guile's Scheme library had been installed;
79they used the value of the environment variable `SCHEME_LOAD_PATH'
80later on in the startup process, but not to find the startup code
81itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
82code.
83
84To run Guile without installing it, build it in the normal way, and
85then set the environment variable `SCHEME_LOAD_PATH' to a
86colon-separated list of directories, including the top-level directory
87of the Guile sources. For example, if you unpacked Guile so that the
88full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
89you 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
94header files.
95
96In order to compile code which #included <libguile.h>, previous
97versions of Guile required you to add a directory containing all the
98Guile header files to your #include path. This was a problem, since
99Guile's header files have names which conflict with many systems'
100header files.
101
102Now only <libguile.h> need appear in your #include path; you must
103refer to all Guile's other header files as <libguile/mumble.h>.
104Guile's installation procedure puts libguile.h in $(includedir), and
105the 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
112for Scheme code. Its value is a list of strings, each of which names
113a directory.
114
115** (%search-load-path FILENAME) searches the directories listed in the
116value of the %load-path variable for a Scheme file named FILENAME. If
117it finds a match, then it returns its full filename. Otherwise, it
118returns #f. %search-load-path will not return matches that refer to
119directories.
120
121** (%try-load-path FILENAME :optional CASE-INSENSITIVE-P SHARP)
122searches the directories listed in %load-path for a file named
123FILENAME, and loads it if it finds it. If it can't read FILENAME for
124any reason, it throws an error.
125
126The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
127%try-load function.
128
6685dc83 129\f
1a1945be
JB
130Older changes:
131
132* Guile no longer includes sophisticated Tcl/Tk support.
133
134The old Tcl/Tk support was unsatisfying to us, because it required the
135user to link against the Tcl library, as well as Tk and Guile. The
136interface was also un-lispy, in that it preserved Tcl/Tk's practice of
137referring to widgets by names, rather than exporting widgets to Scheme
138code as a special datatype.
139
140In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
141maintainers described some very interesting changes in progress to the
142Tcl/Tk internals, which would facilitate clean interfaces between lone
143Tk and other interpreters --- even for garbage-collected languages
144like Scheme. They expected the new Tk to be publicly available in the
145fall of 1996.
146
147Since it seems that Guile might soon have a new, cleaner interface to
148lone Tk, and that the old Guile/Tk glue code would probably need to be
149completely rewritten, we (Jim Blandy and Richard Stallman) have
150decided not to support the old code. We'll spend the time instead on
151a good interface to the newer Tk, as soon as it is available.
5c54da76
JB
152
153\f
154Copyright information:
155
156Copyright (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