Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  CHIBI-SCHEME (1)


chibi-scheme - a tiny Scheme interpreter


See Also


chibi-scheme [-qQrRfV] [-I path ] [-A path ] [-m module ] [-x module ] [-l file ] [-e expr ] [-p expr ] [-t ] [-d image-file ] [-i image-file ] [--] [ script argument ... ]


chibi-scheme is a sample interactive Scheme interpreter for the chibi-scheme library. It serves as an example of how to embed chibi-scheme in applications, and can be useful on its own for writing scripts and interactive development.

When script is given, the script will be loaded with SRFI-22 semantics, calling the procedure main (if defined) with a single parameter as a list of the command-line arguments beginning with the script name. This works as expected with shell #! semantics.

Otherwise, if no script is given and no -e or -p options are given an interactive repl is entered, reading, evaluating, then printing expressions until EOF is reached. The repl provided is very minimal - if you want readline completion you may want to wrap it with the rlwrap(1) program. Signals aren’t caught either - to enable handling keyboard interrupts you can use the (chibi process) module. For a more sophisticated REPL with readline support, signal handling, module management and smarter read/write you may want to use the (chibi repl) module. This can be launched automatically with: chibi-scheme -R [char46]

The default language the R7RS (scheme base) module. To get a mostly R5RS-compatible language, use chibi-scheme -xscheme.r5rs or to get just the core language used for bootstrapping, use chibi-scheme -xchibi or its shortcut chibi-scheme -q [char46]


Space is optional between options and their arguments. Options without arguments may not be chained together.

To reduce the need for shell escapes, options with module arguments ( -m , -x and -R ) are written in a dot notation, so that the module (foo bar) is written as [char46]

-V Prints the version information and exits.
-q "Quick" load, shortcut for chibi-scheme -xchibi This is a slightly different language from (scheme base), which may load faster, and is guaranteed not to load any additional shared libraries.
-Q Extra "quick" load, shortcut for chibi-scheme -xchibi.primitive The resulting environment will only contain the core syntactic forms and primitives coded in C. This is very fast and guaranteed not to load any external files, but is also very limited.
  Run the "main" procedure when the script finishes loading as in SRFI-22.
  Loads the given module and runs the "main" procedure it defines (which need not be exported) with a single argument of the list of command-line arguments as in SRFI-22. The name "main" can be overridden with the -r option. [module] may be omitted, in which case it default to chibi.repl. Thus chibi-scheme -R is the recommended means to obtain the advanced REPL.
-s Strict mode, escalating warnings to fatal errors.
-f Change the reader to case-fold symbols as in R5RS.
  Specifies the initial size of the heap, in bytes, optionally followed by the maximum size the heap can grow to. size can be any integer value, optionally suffixed by "K", for kilobytes, "M" for megabytes, or "G" for gigabytes. -h must be specified before any options which load or evaluate Scheme code.
  Inserts path on front of the load path list.
  Appends path to the load path list.
  Imports module as though "(import module )" were evaluated. If the -x version is used, then module replaces the current environment instead of being added to it.
  Loads the Scheme source from the file file searched for in the default load path.
  Evaluates the Scheme expression expr.
  Evaluates the Scheme expression expr then prints the result to stdout.
  Enables tracing for the given identifier id in the module module.
  Dumps the current Scheme heap to image-file and exits. This feature is still experimental.
  Loads the Scheme heap from image-file instead of compiling the init file on the fly. This feature is still experimental.


  A colon separated list of directories to search for module files, inserted before the system default load paths. chibi-scheme searchs for modules in directories in the following order:

directories included with the -I path option
directories included from CHIBI_MODULE_PATH
system directories
directories included with -A path option

If CHIBI_MODULE_PATH is unset, the directoriese "./lib", and "." are search in order.


Alex Shinn (alexshinn @ gmail . com)


More detailed information can be found in the manuale included in doc/chibi.scrbl included in the distribution.

The chibi-scheme home-page:

Search for    or go to Top of page |  Section 1 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.