that the repl displays them properly. E.g.,
(read (open-string-input-port "#!r6rs |foo|")) shows an &assertion,
but typing #!r6rs |foo| at the repl causes the repl to reset without
a message.
scope would get messed up when the macro call appears inside
let/letrec-syntax. Basically, in the following example,
(let-syntax ([id-macro (syntax-rules () [(_ x) x])])
(let ()
(define (foo) (display "not ok\n"))
(let-syntax ([foo (syntax-rules () [(_) (display "ok\n")])])
(id-macro (foo)))))
the call to (id-macro) would make (foo) refer to the foo in the
internal-definition context (the not ok one) instead of the
let-syntax one.
On the plus side, macro expansion is now half a second faster!
runs the script according to the R6RS semantics, then starts a
repl in an interaction environment made of everything visible
(imported and defined) in the script.
Use cases include:
* debugging a script.
* starting ikarus in some predefined environment, e.g.,
$ ikarus --r6rs-repl rnrs.ss
where rnrs.ss contains (import (rnrs))
Also, interaction-environment is made a parameter with an initial
value set prior to entering the repl.
library-path, so, whereever you set it, you should decide whether
to include "." or exclude it.
["$prefix/lib/ikarus" is still added to the path so that multiple
versions of ikarus can exist and each uses its own sources dir
without interference]
- some cleanup in compiler to use the new include library instead of
"ikarus.include-src.ss" which is no longer needed.
- it now takes an optional environment (it was required)
- it no longer returns a second value (list of libraries)
- it's output is "pretty".
the old expand is now called core-expand.
Summary:
By default, ikarus now executes the file $HOME/.ikarusrc (which
must be an R6RS script) (if it exists) before startup.
Details:
There is a default behavior for RC files which can be overriden by
command-line options.
Default RC files location:
1. If the command-line argument --no-rcfile is set, the set of RC
files is empty.
2. Otherwise, if there is at least one --rcfile <filename>
command-line argument, the specified files are used as the set
of RC files. (--rcfile and --no-rcfile are mutually exclusive)
3. Otherwise, if the environment variable IKARUS_RC_FILES is set,
the colon-separated list of files are used as the RC files.
4. Otherwise, if the file $HOME/.ikarusrc exists, only it is used.
5. Otherwise, the set is empty.
The startup sequence is now:
1. Setup the library path.
2. Execute all RC files.
3. Set command-line options (e.g., -O2, --debug, etc.).
4. Set command-line-arguments.
5. Proceed with normal operation (start repl, run an r6rs script,
compile dependencies, etc.).
syntax: (stale-when guard-expr e* ...) ;; in definition context
(stale-when guard-expr e e* ...) ;; in expression context
semantics:
When a stale-when form is encountered while expanding any code
(expressions, macros, macros in macros, etc.) in a library
body, the guard-expr is expanded (but not evaluated) and
serialized along with the library. When the library is later
reloaded from fasl and before it is installed, the guard-expr
is evaluated. If guard-expr returns true, the fasl content is
ignored and the library is recompiled afresh from source.
fasl-directory parameter) that works as follows:
- if IKARUS_FASL_DIRECTORY is set to "", no fasl files are produced.
- if IKARUS_FASL_DIRECTORY is set to something other than "", the
string is used as a directory in which fasl files are placed.
- if IKARUS_FASL_DIRECTORY is unset, the directory
$HOME/.ikarus/precompiled is used for fasl output.
- library file names are cannonicalized using file-real-path.
- the fasl file (if produced) is the result of
(string-append (fasl-directory) (file-real-path filename) ext)
where ext is either ".ikarus-32bit-fasl" or ".ikarus-64bit-fasl".
- The old behavior (placing the fasl files in the same place as the
library files) can be achieved by setting IKARUS_FASL_DIRECTORY='/'.
directory structure recursively)
- Added split-file-name (takes a string, returns two values: the
substring before the final "/" and the string after it).
- Fixed a minor bug in file-directory?, file-exists?, etc. that were
failing on OS X if part of the path given was not a directory.
E.g., if /tmp/foo is a regular file, (file-directory? "/tmp/foo/bar")
was raising an exception instead of returning #f.
Ack now runs only 80 times slower in debug mode (down from 360
times), and bootstrapping is now done in 170 seconds instead of
500 (nondebug time is still less than 8 seconds).