pi [file] [arguments]
(exit)
is evaluated.*invocation-arg*
or procedure
rp:command-line-arguments
.
Use "--" as the first argument to give arguments to pi without loading any
files. If pi is invoked with no arguments or "--" as the first argument, and
if the environment variable RHIZOME_PI_RC is set, content of it is evaluated
before entering read-eval-print loop.*invocation-arg*
contains
command line.
*invocation-arg*
.
Otherwise, if there is any argument, delete zeroth argument (the
command name itself) from *invocation-arg*
.
If there is no argument at all (aside from zeroth one,) remain
*invocation-arg*
intact.
*invocation-arg*
. This is not a facility of module rp_pi in
fact and done regardless of whether module rp_pi is linked in or not.
*invocation-arg*
global variable
(rp:command-line-arguments)
procedure
EXAMPLE
$ cat arg.scm (display "*invocation-arg* is ") (write *invocation-arg*) (newline) (display "rp:command-line-arguments returns ") (write (rp:command-line-arguments)) (newline) (exit) $ pi arg.scm foo bar baz *invocation-arg* is ("arg.scm" "foo" "bar" "baz") rp:command-line-arguments returns #("pi" "arg.scm" "foo" "bar" "baz") $ pisc arg.scm $ pisl arg gcc -O2 -m486 -I/u/qfwfq/lib/rhizome -c arg.c gcc -O2 -m486 -I/u/qfwfq/lib/rhizome -c a.c gcc -L/u/qfwfq/lib/rhizome a.o arg.o -lrhzscm -lrhzpi -lrhizome -lm $ ./a.out foo bar baz *invocation-arg* is ("./a.out" "foo" "bar" "baz") rp:command-line-arguments returns #("./a.out" "foo" "bar" "baz")
pisc -help
pisc [options] file
file
to program in C language.
OPTIONS
-module module-identifier
module-identifier
.
Module name is a name you specify to pisl when creating executable.
This must be a valid identifier in C language. Default is the name of
source file without ".scm" suffix (if the file name had one.)
-output filename
-mpath dir
dir
to search path of
rp:use-macro-package
.
This option may be used multiple times.
-load filename
pisf -help
pisf [options] file
file
.
OPTIONS
-exec interpreter
interpreter
".
-module module-identifier
Module-identifier
has the same meaning as in pisc and resulting file can be specified
as module to pisl as if it was output from pisc.
-output filename
-mpath dir
-load filename
pisl -help
pisl [options] module-specifier ...
module-specifier
together and generates executable file.
OPTIONS
-cc cc-command-line
pisl -help
'.
-ld ld-command-line
pisl -help
'.
-nold
-nolib
pisl -help
'.
-loadable
rp:load-compiled-module
.
In some environment, this option is not supported.
-static
-modlib
-windows
-o filename
-s filename
-base address
-xm module
expand |
Hygienic macro feature with syntax-case. Some syntaxes will change its behavior slightly if this is omitted, though this should not affect normal programs. |
stdmacro |
Standard marcros. In rhizome/pi, basic syntax kyewords such as define, lambda are impremented as macros, so omitting stdmacro disables usage of them. If application has no feature to evaluate arbitrary expression specified at run time, you can safely omit this. |
debugger |
Debugging features. |
stdproc |
Built in procedures implemented in scheme code at
rhizome/pi. Consult to the source to see what will be
unusable if this is omitted :-)
Expand and debugger will be
omitted automatically if stdproc is omitted. |
extcall |
Macros providing interface to functions in shared objects. If application need not to be able to define new external procedures, callbacks, buffer structures or constants at run time, you can safely omit this. |
saccess |
Procedures used to expand macros defined trough macros
which belongs to extcall . Saccess
will be omitted automatically if expand is
omitted and if saccess is omitted,
extcall will be omitted automatically. |
-aux string
string
to the command line of linker.
This may be used in the purpose of specifying a module wich is already
in an object file. This option may be used multiple times.
module-specifier
Specify names you specified at -module
option to pisc as
module-specifier
.
If tha name of file which contains the module is not the module name
appended ".c", specify the file name after ':'. If the module is already
in object file, specify null string after ':' and specify object file using
-aux option.
EXAMPLE
Assume creating a executable from source files x.scm, y.scm, z-0.scm. The
following is one sample of compiling process.
pisc x.scm # generates x.c pisl -nold x # generates x.o pisc y.scm # generates y.c pisc -module zz -output z-0.c z-0.scm # generates z-0.c with module name zz pisl -aux x.o x: y zz:z-0.c # generates executableRunning generated executable results in the same effact as loading each source files to the interpreter in the same sequence of module specification to pisl. In the above example, assuming the contents of a.scm is
(load "x.scm") (load "y.scm") (load "z-0.scm")the result will be same with doing
pi a.scm [arguments]If compiled program is written to accomplish
(exit)
after some
uninteractive operation, resulting executable will be an uninteractive
program. On the other hand, compiling program which only includes some
definitions of procedures, resulting executable will be a scheme
interpreter extended with the predefined procedures. Note, however, if you
want the same behaviour with pi, namely loading its first argument, you
must describe such behaviour in your program (linking with module rp_pi
included in library is sufficient. In fact, pi itself can be reprodeced by
"pisl -o pi rp_pi:
".)