Next: , Up: scheme  


Vicare Scheme

Development of this project has stopped!!!

Overview

Vicare is an implementation of the Scheme language compliant with the r6rs standard with several language extensions; it is a fork of Ikarus Scheme by Abdulaziz Ghuloum.

Vicare is a native compiler producing single threaded programs running on Intel x86 processors, both 32-bit and 64-bit. It officially supports the gnu+Linux platform; it should work on posix platforms, but not Cygwin. It offers arbitrary precision integers through gmp; it implements an optionally included foreign–functions interface based on Libffi. It is to be considered alpha quality; the project is hosted at Github and as backup at Bitbucket.

Introduction

Scheme is a statically scoped and properly tail–recursive dialect of the Lisp programming language, invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions.

The Revised^6 Report on the Algorithmic Language Scheme (r6rs) gives a defining description of the programming language Scheme. The report is the work of many people in the course of many years; revision 6 was edited by Michael Sperber, R. Kent Dybvig, Matthew Flatt and Anton Van Straaten.

Ikarus Scheme was an almost r6rs compliant implementation of the Scheme programming language; it is the creation of Abdulaziz Ghuloum, which retired from deveoping it in early 2010.

Vicare (pronounced the etruscan way) is an r6rs compliant fork of Ikarus; it implements a native compiler producing single threaded programs running on Intel x86 32-bit and 64-bit processors; it officially supports the gnu+Linux platform, it should run on <acronym>posix</acronym> platforms.

Arbitrary precision integers are implemented on top of gmp. The foreign–functions interface (ffi) allows use of foreign C language libraries; it is built on top of Libffi. It is possible to write C language shared libraries using an internal Vicare api and interface them at the Scheme level, without using the ffi. A very basic interface to gnu Readline or compatible library is available to make life easier at the repl; for full line–editing capabilities we should rely on rlwrap, as explained in the documentation.

A collection of libraries comes bundled with the distribution of Vicare, implementing:

The latest revisions introduced a statically typing extension through a typed language that is alternative to r6rs.

The documentation is available on-line, split into multiple documents: core, libraries, typed language.

License

Vicare Scheme is free software: you can redistribute it and/or modify it under the terms of the gnu General Public License version 3 as published by the Free Software Foundation. Vicare Scheme is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the gnu General Public License for more details. You should have received a copy of the gnu General Public License along with the Vicare Scheme package. If not, see http://www.gnu.org/licenses/.

Downloads

The package release archives (tarballs) can be downloaded from the download pages at Bitbucket. End users should stick to official releases. gnu+Linux is the only officially supported platform; however it should be possible to run Vicare on posix systems.

Community

There is no mailing list. Bug reports should be registerd at Github’s Issue Tracker.

How it works

Vicare is a compiler for the Scheme language. It does not produce standalone executable programs, neither shared libraries as C language compilers do. Source code for Vicare is either: a program, a library, an include file.

Starting with version ‘0.4’, programs can be compiled or executed directly as scripts from source code; however standalone executable cannot be created. When running from source: it is always possible to put all the code of an application into a library and reduce the program needed to launch the application to 2 or 3 lines of Scheme code.

Vicare compiles Scheme libraries into fasl files (FASt Loading) which can be installed on the system. It also allows loading libraries in source format; in this case the code is compiled on the fly.

To run an application written in Vicare Scheme we need both the vicare executable program and the boot image file vicare.boot. The boot image contains the language implementation, the compiler and a collection of functions extending the r6rs language; it is the equivalent of what the C standard library is for the C language. To run a program file demo.sps containing the UTF-8 text:

(import (rnrs (6)))
(display "Hello World!\n")
(flush-output-port (current-output-port))

we can do:

$ vicare --r6rs-script demo.sps</code>

When running on gnu+Linux systems, it is possible to use the features of the binfmt_misc kernel module to automatically launch Vicare programs without prepending the vicare executable to the name of the program file (not a big improvement... but it is possible).

Starting with revision series ‘0.4’ we can compile the demo program with:

$ vicare -o demo -c demo.sps

and using the binfmt_misc facilities run it with:

$ ./demo

which will print ‘Hello World!

Development

The Revised^6 Scheme language is fully implemented; code using the compound library (rnrs (6)), or its component libraries, should run fine under all the releases from version ‘0.3’ onwards. Development has entered revision series ‘0.4’ which will bring many backwards incompatibilities in code using the library (vicare) and, in general, in the library infrastructure and the interface of the run–time executable program.

The code base can be partitioned in:

the current development goal is to put the code in such a shape that: the run–atime support program and the language implementation will not change anymore and are just subject to maintenance (mostly bug fixes); only the assembler, compiler, interface to the os and external libraries should see further significant work.

Bindings to foreign libraries

Vicare/CRE2 A binding to the CRE2 library embedded in the distribution; CRE2 is a C wrapper for RE2, a regular expressions library written in C++.

Vicare/Expat A binding to the Expat library, a parser for XML. This is a separate package installing a C library with low–level function wrappers and a Scheme library with a higher–level interface.

Vicare/CityHash A binding to the CityHash C++ library implementing hash functions for strings. This is a separate package installing a C library with low–level function wrappers and a Scheme library with a higher–level interface.

Vicare/SQLite A binding for the SQLite sql database engine.

Vicare/cURL A binding for the cURL library.

Vicare/libESMTP A binding for the libESMTP library.

Vicare/GSASL A binding for the GNU SASL library.

Vicare/Flite A binding for the Flite (Festival-lite) library.

Vicare/AO A binding for the Libao library.

Vicare/OpenSSL A binding for the OpenSSL library.

Vicare/Template A template package showing how to write a Vicare extension using both the C language and the Scheme language.

Other libraries for r6rs implementations

Industria (Github) a collection of miscellaneous libraries, especially about cryptography. There is a fork of it that repackages the distribution with the gnu Autotools and has verified support for Vicare Scheme.

SRFI-R6RS, a port of the srfi libraries to r6rs implementations. Notice the Vicare Scheme distribution already comes with such srfi libraries.

Xitomatl, a collection of miscellaneous libraries. There is no support for Vicare Scheme.

Wak (Gitorious repository), a collection of libraries being a port to r6rs of libraries for other Scheme standards; it has no support for Vicare Scheme.

PFDS, a collection of libraries implementing purely functional data structures in Scheme. There is a fork of it that repackages the distribution with the gnu Autotools and has verified support for Vicare Scheme: look for the branch ‘vicare-scheme’.

Fectors, a collection of libraries implementing functional vectors in Scheme. There is a fork of it that repackages the distribution with the gnu Autotools and has verified support for Vicare Scheme: look for the branch ‘vicare-scheme’.

r6rs-protobuf, a collection of libraries implementing the Protocol Buffer in Scheme.

Libraries for other Scheme implementations

Alex Shinn’s packages for Scheme. Among these IrRegex, a regular expressions library, and fmt, a combinator formatting library.


Next: , Up: scheme