diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-10-25 08:40:27 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-10-25 08:40:27 +0000 |
commit | 3065a62a4c3e44ec424cfa0f13f74479d07bf83f (patch) | |
tree | 78f54a38ad1190cae6809b15b99e2f0ab28c214e | |
parent | 0464a0956f0fd06d126ebce2b6637bfd00f738b5 (diff) | |
download | guile-3065a62a4c3e44ec424cfa0f13f74479d07bf83f.tar.gz |
*** empty log message ***
-rw-r--r-- | NEWS | 63 | ||||
-rw-r--r-- | ice-9/ChangeLog | 6 | ||||
-rw-r--r-- | libguile/ChangeLog | 11 |
3 files changed, 80 insertions, 0 deletions
@@ -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') diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index f28fe2028..68179749c 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -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. diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 41b45db26..f4e6c82e3 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -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. |