mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
*** empty log message ***
This commit is contained in:
parent
0464a0956f
commit
3065a62a4c
3 changed files with 80 additions and 0 deletions
63
NEWS
63
NEWS
|
@ -8,6 +8,69 @@ Guile 1.0b3
|
|||
|
||||
Changes since Thursday, September 5:
|
||||
|
||||
|
||||
* Guile now distinguishes between #f and the empty list.
|
||||
|
||||
This is for compatibility with the IEEE standard, the (possibly)
|
||||
upcoming Revised^5 Report on Scheme, and many extant Scheme
|
||||
implementations.
|
||||
|
||||
Guile used to have #f and '() denote the same object, to make Scheme's
|
||||
type system more compatible with Emacs Lisp's. However, the change
|
||||
caused too much trouble for Scheme programmers, and we found another
|
||||
way to reconcile Emacs Lisp with Scheme that didn't require this.
|
||||
|
||||
|
||||
* You can now use Guile as a shell script interpreter.
|
||||
|
||||
To paraphrase the SCSH manual:
|
||||
|
||||
When Unix tries to execute an executable file whose first two
|
||||
characters are the `#!', it treats the file not as machine code to
|
||||
be directly executed by the native processor, but as source code
|
||||
to be executed by some interpreter. The interpreter to use is
|
||||
specified immediately after the #! sequence on the first line of
|
||||
the source file. The kernel reads in the name of the interpreter,
|
||||
and executes that instead. It passes the interpreter the source
|
||||
filename as its first argument, with the original arguments
|
||||
following. Consult the Unix man page for the `exec' system call
|
||||
for more information.
|
||||
|
||||
Guile now recognizes a '-s' command line switch, whose argument is the
|
||||
name of a file of Scheme code to load. It also treats the two
|
||||
characters `#!' as the start of a comment, terminated by `!#'. Thus,
|
||||
to make a file of Scheme code directly executable by Unix, insert the
|
||||
following two lines at the top of the file:
|
||||
|
||||
#!/usr/local/bin/guile -s
|
||||
!#
|
||||
|
||||
Guile treats the argument of the `-s' command-line switch as the name
|
||||
of a file of Scheme code to load, and treats the sequence `#!' as the
|
||||
start of a block comment, terminated by `!#'.
|
||||
|
||||
For example, here's a version of 'echo' written in Scheme:
|
||||
|
||||
#!/usr/local/bin/guile -s
|
||||
!#
|
||||
(let loop ((args (cdr (program-arguments))))
|
||||
(if (pair? args)
|
||||
(begin
|
||||
(display (car args))
|
||||
(if (pair? (cdr args))
|
||||
(display " "))
|
||||
(loop (cdr args)))))
|
||||
(newline)
|
||||
|
||||
Why does `#!' start a block comment terminated by `!#', instead of the
|
||||
end of the line? That is the notation SCSH uses, and although we
|
||||
don't yet support the other SCSH features that motivate that choice,
|
||||
we would like to be backward-compatible with any existing Guile
|
||||
scripts once we do.
|
||||
|
||||
Note that some very old Unix systems don't support the `#!' syntax.
|
||||
|
||||
|
||||
* You can now run Guile without installing it.
|
||||
|
||||
Previous versions of the interactive Guile interpreter (`guile')
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
Fri Oct 25 03:34:47 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* boot-9.scm (%read-sharp): Don't recognize the `#!' syntax here;
|
||||
that's now taken care of in libguile, and in a way compatible with
|
||||
SCSH (which this isn't).
|
||||
|
||||
Mon Oct 21 18:52:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* boot-9.scm: Formatting tweaks.
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
Fri Oct 25 01:56:30 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* read.c (scm_lreadr): Recognize SCSH-style block comments; text
|
||||
between `#!' and `!#' is ignored.
|
||||
(skip_scsh_block_comment): New function.
|
||||
|
||||
* feature.c (scm_set_program_arguments): New argument, FIRST.
|
||||
* feature.h: Update prototype.
|
||||
* init.c (scm_boot_guile_1): Pass new argument to
|
||||
scm_set_program_arguments.
|
||||
|
||||
Tue Oct 22 20:54:42 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* init.c (scm_start_stack): Don't initialize scm_progargs here.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue