a wrong result to things like (numeric (- (* 36 36 36) 1) 36). Fixed a bug in numeric that caused comma-sep and dec-sep to get initialized wrongly. Fixed maybe-trim-zeros to leave behind at least a ".0" on inexact numbers that otherwise would have been output without the decimal point. This is for consistency with number->string which is used when the radix is 10. In gen-general, fixed a bug in the digit-generating loop for the whole part of the number. Previously, an integer that should have looked like 5003 would be emitted as 5300. Switched the order of application of maybe-round and maybe-trim-zeros so that a number that should round to .0000000000000001 doesn't get emitted as 0.1. In gen-positive-real, fixed the ratio case to not call number->string with a radix that might not be in {2,8,10,16}. Also in gen-positive-real, fixed the call to number->string to include the radix which was missing previously. Fixed wrap-sign to correctly handle the case of -0.0. In numeric/si, always emit the supplied separator even if the number is too small for an SI-suffix to be emitted. The examples in the SRFI document depend on this. |
||
---|---|---|
benchmarks | ||
build-lib/chibi/char-set | ||
contrib | ||
data | ||
doc | ||
examples | ||
include/chibi | ||
js | ||
lib | ||
opt | ||
tests | ||
tools | ||
.gitignore | ||
.hgignore | ||
.travis.yml | ||
appveyor.yml | ||
AUTHORS | ||
bignum.c | ||
chibi-gdb | ||
chibi-run | ||
chibi-save | ||
chibi-scheme.pc.in | ||
CMakeLists.txt | ||
configure | ||
COPYING | ||
eval.c | ||
fedora.spec | ||
gc.c | ||
gc_heap.c | ||
main.c | ||
Makefile | ||
Makefile.detect | ||
Makefile.libs | ||
mkfile | ||
opcodes.c | ||
plan9.c | ||
README-win32.md | ||
README.libs | ||
README.md | ||
RELEASE | ||
sexp.c | ||
simplify.c | ||
TODO | ||
VERSION | ||
vm.c |
Minimal Scheme Implementation for use as an Extension Language
http://synthcode.com/wiki/chibi-scheme
Chibi-Scheme is a very small library intended for use as an extension and scripting language in C programs. In addition to support for lightweight VM-based threads, each VM itself runs in an isolated heap allowing multiple VMs to run simultaneously in different OS threads.
There are no external dependencies so is relatively easy to drop into any project.
The default repl language contains all bindings from
R7RS small,
available explicitly as the (scheme small)
library. The
language is built in layers, however - see the manual for
instructions on compiling with fewer features or requesting
a smaller language on startup.
Chibi-Scheme is known to work on 32 and 64-bit Linux, FreeBSD and OS X, Plan 9, Windows (using Cygwin), iOS, Android, ARM and Emscripten. Basic support for native Windows desktop also exists. See README-win32.md for details and build instructions.
To build on most platforms just run make && make test
. This will
provide a shared library libchibi-scheme, as well as a sample
chibi-scheme command-line repl. You can then run
sudo make install
to install the binaries and libraries. You can optionally specify a PREFIX for the installation directory:
make PREFIX=/path/to/install/
sudo make PREFIX=/path/to/install/ install
By default files are installed in /usr/local.
If you want to try out chibi-scheme without installing, be sure to set
LD_LIBRARY_PATH
so it can find the shared libraries.
For more detailed documentation, run make doc
and see the generated
doc/chibi.html.