1 | [[tags:manual]] |
---|
2 | |
---|
3 | == The User's Manual |
---|
4 | |
---|
5 | ''(This document describes version 3.0.0)'' |
---|
6 | |
---|
7 | '''CHICKEN is a compiler that translates Scheme source files into C''', which in |
---|
8 | turn can be fed to a C-compiler to generate a standalone executable. |
---|
9 | An interpreter is also available and can be used as |
---|
10 | a scripting environment or for testing programs before compilation. |
---|
11 | |
---|
12 | This package is distributed under the '''BSD license''' and as such is free |
---|
13 | to use and modify. |
---|
14 | |
---|
15 | The method of compilation and the design of the runtime-system follow |
---|
16 | closely Henry Baker's [[http://home.pipeline.com/~hbaker1/CheneyMTA.html|CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A.]] paper and expose a number of interesting |
---|
17 | properties: |
---|
18 | |
---|
19 | * Consing (creation of data on the heap) is relatively inexpensive, because a generational garbage collection scheme is used, in which short-lived data structures are reclaimed extremely quickly. |
---|
20 | |
---|
21 | * Moreover, {{call-with-current-continuation}} is practically for free and CHICKEN does not suffer under any performance penalties if first-class continuations are used in complex ways. |
---|
22 | |
---|
23 | The generated C code is fully tail-recursive. |
---|
24 | |
---|
25 | Some of the features supported by CHICKEN: |
---|
26 | |
---|
27 | * SRFIs 0, 1, 2, 4, 6-19, 23, 25-31, 37-40, 42, 43, 45, 47, 55, 57, 60-63, 66, 69, 72, 78, 85 and 95. |
---|
28 | * Lightweight threads based on first-class continuations |
---|
29 | * Pattern matching with Andrew Wright's {{match}} package |
---|
30 | * Record structures |
---|
31 | * Extended comment- and string-literal syntaxes |
---|
32 | * Libraries for regular expressions, string handling |
---|
33 | * UNIX system calls and extended data structures |
---|
34 | * Create interpreted or compiled shell scripts written in Scheme for UNIX or Windows |
---|
35 | * Compiled C files can be easily distributed |
---|
36 | * Allows the creation of fully self-contained statically linked executables |
---|
37 | * On systems that support it, compiled code can be loaded dynamically |
---|
38 | |
---|
39 | This manual is merely a reference for the CHICKEN system and assumes |
---|
40 | a working knowledge of Scheme. |
---|
41 | |
---|
42 | The manual is split in the following sections: |
---|
43 | |
---|
44 | ; [[Basic mode of operation]] : Compiling Scheme files. |
---|
45 | |
---|
46 | ; [[Using the compiler]] : Explains how to use CHICKEN to compile programs and execute them. |
---|
47 | |
---|
48 | ; [[Using the interpreter]] : Invocation and usage of {{csi}}, the CHICKEN interpreter |
---|
49 | |
---|
50 | ; [[Supported language]] : The language implemented by CHICKEN (deviations from the standard and extensions). |
---|
51 | |
---|
52 | ; [[Interface to external functions and variables]] : Accessing C and C++ code and data. |
---|
53 | |
---|
54 | ; [[chicken-setup]] : Packaging and installing extension libraries. |
---|
55 | |
---|
56 | ; [[Data representation]] : How Scheme data is internally represented. |
---|
57 | |
---|
58 | ; [[Bugs and limitations]] : Yes, there are some. |
---|
59 | |
---|
60 | ; [[FAQ]] : A list of Frequently Asked Questions about CHICKEN (and their answers!). |
---|
61 | |
---|
62 | ; [[Acknowledgements]] : A list of some of the people that have contributed to make CHICKEN what it is. |
---|
63 | |
---|
64 | ; [[Bibliography]] : Links to documents that may be of interest. |
---|
65 | |
---|