*** 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
23
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
39Guile now recognizes a '-s' command line switch, whose argument is the
40name of a file of Scheme code to load. It also treats the two
41characters `#!' as the start of a comment, terminated by `!#'. Thus,
42to make a file of Scheme code directly executable by Unix, insert the
43following two lines at the top of the file:
44
45#!/usr/local/bin/guile -s
46!#
47
48Guile treats the argument of the `-s' command-line switch as the name
49of a file of Scheme code to load, and treats the sequence `#!' as the
50start of a block comment, terminated by `!#'.
51
52For example, here's a version of 'echo' written in Scheme:
53
54#!/usr/local/bin/guile -s
55!#
56(let loop ((args (cdr (program-arguments))))
57 (if (pair? args)
58 (begin
59 (display (car args))
60 (if (pair? (cdr args))
61 (display " "))
62 (loop (cdr args)))))
63(newline)
64
65Why does `#!' start a block comment terminated by `!#', instead of the
66end of the line? That is the notation SCSH uses, and although we
67don't yet support the other SCSH features that motivate that choice,
68we would like to be backward-compatible with any existing Guile
69scripts once we do.
70
71Note that some very old Unix systems don't support the `#!' syntax.
72
73
6685dc83
JB
74* You can now run Guile without installing it.
75
76Previous versions of the interactive Guile interpreter (`guile')
77couldn't start up unless Guile's Scheme library had been installed;
78they used the value of the environment variable `SCHEME_LOAD_PATH'
79later on in the startup process, but not to find the startup code
80itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
81code.
82
83To run Guile without installing it, build it in the normal way, and
84then set the environment variable `SCHEME_LOAD_PATH' to a
85colon-separated list of directories, including the top-level directory
86of the Guile sources. For example, if you unpacked Guile so that the
87full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
88you might say
89
90 export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
91
92* Guile's header files should no longer conflict with your system's
93header files.
94
95In order to compile code which #included <libguile.h>, previous
96versions of Guile required you to add a directory containing all the
97Guile header files to your #include path. This was a problem, since
98Guile's header files have names which conflict with many systems'
99header files.
100
101Now only <libguile.h> need appear in your #include path; you must
102refer to all Guile's other header files as <libguile/mumble.h>.
103Guile's installation procedure puts libguile.h in $(includedir), and
104the rest in $(includedir)/libguile.
105
106* The compiled-library-path function has been deleted from libguile.
107
108* A variable and two new functions have been added to libguile:
109
110** The variable %load-path now tells Guile which directories to search
111for Scheme code. Its value is a list of strings, each of which names
112a directory.
113
114** (%search-load-path FILENAME) searches the directories listed in the
115value of the %load-path variable for a Scheme file named FILENAME. If
116it finds a match, then it returns its full filename. Otherwise, it
117returns #f. %search-load-path will not return matches that refer to
118directories.
119
120** (%try-load-path FILENAME :optional CASE-INSENSITIVE-P SHARP)
121searches the directories listed in %load-path for a file named
122FILENAME, and loads it if it finds it. If it can't read FILENAME for
123any reason, it throws an error.
124
125The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
126%try-load function.
127
128
129\f
5c54da76
JB
130This is the beginning of recorded history.
131
132\f
133Copyright information:
134
135Copyright (C) 1996 Free Software Foundation, Inc.
136
137 Permission is granted to anyone to make or distribute verbatim copies
138 of this document as received, in any medium, provided that the
139 copyright notice and this permission notice are preserved,
140 thus giving the recipient permission to redistribute in turn.
141
142 Permission is granted to distribute modified versions
143 of this document, or of portions of it,
144 under the above conditions, provided also that they
145 carry prominent notices stating who last changed them.
146