~ chicken-core (chicken-5) e79760ad31aceb99f6d4d09869427dcf79d8bec7
commit e79760ad31aceb99f6d4d09869427dcf79d8bec7 Author: felix <felix@z.(none)> AuthorDate: Fri Apr 8 12:08:01 2011 +0200 Commit: felix <felix@z.(none)> CommitDate: Fri Apr 8 12:08:01 2011 +0200 merged wiki manul changes diff --git a/manual/Acknowledgements b/manual/Acknowledgements index 4a1827dd..784c2cbe 100644 --- a/manual/Acknowledgements +++ b/manual/Acknowledgements @@ -75,7 +75,7 @@ The documentation and examples for explicit renaming macros was taken from the following paper: William D. Clinger. -[["Hygienic macros through explicit renaming"|ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/prop/exrename.ps.gz]] +[[ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/prop/exrename.ps.gz|''Hygienic macros through explicit renaming'']]. Lisp Pointers. IV(4). December 1991. --- diff --git a/manual/Basic mode of operation b/manual/Basic mode of operation index adf30a1c..32332257 100644 --- a/manual/Basic mode of operation +++ b/manual/Basic mode of operation @@ -13,7 +13,7 @@ The most portable way of creating separately linkable entities is supported by so-called ''unit''s. A unit is a single compiled object module that contains a number of toplevel expressions that are executed either when the unit is the ''main'' unit or if the -unit is ''used''. To use a unit, the unit has to be ''declare''ed +unit is ''used''. To use a unit, the unit has to be ''declare''d as used, like this: <enscript highlight=scheme> diff --git a/manual/Cross development b/manual/Cross development index 24376bef..72d9d351 100644 --- a/manual/Cross development +++ b/manual/Cross development @@ -31,15 +31,13 @@ compiled for the target system. Obtain and unpack a tarball of the CHICKEN sources, or check out the code from the official code repository, then build the libraries and necessary development files: -{{ -make ARCH= \ + make ARCH= \ PREFIX=/usr \ PLATFORM=linux HOSTSYSTEM=arm-none-linux-gnueabi \ DESTDIR=$HOME/target \ TARGET_FEATURES="-no-feature x86 -feature arm" \ libs install-dev -}} This will build the CHICKEN libraries and install them in {{~/target}}, which we use as a temporary place to store the target files. A few things @@ -84,8 +82,7 @@ and run {{make CONFIG=config.mk}}. You should now have these files on {{~/target}}: -{{ -`-- usr + `-- usr |-- include | |-- chicken-config.h | `-- chicken.h @@ -96,7 +93,6 @@ You should now have these files on {{~/target}}: | |-- libchicken.a | `-- libchicken.so `-- share -}} You should now transfer {{libchicken.so}} to the target system, and place it in {{/usr}}. @@ -110,15 +106,13 @@ we have just built. Again, unpack a CHICKEN release tarball or a source tree and run {{make(1)}} once again: -{{ -make PLATFORM=linux \ + make PLATFORM=linux \ PREFIX=$HOME/cross-chicken \ TARGETSYSTEM=arm-none-linux-gnueabi \ PROGRAM_PREFIX=arm- \ TARGET_PREFIX=$HOME/target/usr \ TARGET_RUN_PREFIX=/usr \ install -}} * {{PREFIX}} gives the place where the "cross chicken" should be installed into. It is recommended not to install into a standard location (like {{/usr/local}} @@ -143,37 +137,35 @@ about the {{CHICKEN}} variable applies as given above. In {{~/cross-chicken}}, you should find the following: -{{ -|-- bin -| |-- arm-chicken -| |-- arm-chicken-bug -| |-- arm-chicken-install -| |-- arm-chicken-profile -| |-- arm-chicken-status -| |-- arm-chicken-uninstall -| |-- arm-csc -| `-- arm-csi -|-- include -| |-- chicken-config.h -| `-- chicken.h -|-- lib -| |-- chicken -| | `-- 5 -| | : -| | -| |-- libchicken.a -| |-- libchicken.so -> libchicken.so.5 -| `-- libchicken.so.5 -`-- share - |-- chicken - | |-- doc - : ; : - | | - | `-- setup.defaults - `-- man - `-- man1 - : -}} + |-- bin + | |-- arm-chicken + | |-- arm-chicken-bug + | |-- arm-chicken-install + | |-- arm-chicken-profile + | |-- arm-chicken-status + | |-- arm-chicken-uninstall + | |-- arm-csc + | `-- arm-csi + |-- include + | |-- chicken-config.h + | `-- chicken.h + |-- lib + | |-- chicken + | | `-- 5 + | | : + | | + | |-- libchicken.a + | |-- libchicken.so -> libchicken.so.5 + | `-- libchicken.so.5 + `-- share + |-- chicken + | |-- doc + : ; : + | | + | `-- setup.defaults + `-- man + `-- man1 + : To make sure that the right C compiler is used, we ask {{arm-csc}} to show the name of the cross C compiler: @@ -221,11 +213,9 @@ still may need compile-time information from the target-only extension, like the import library of modules. One option is to copy the import-library into the repository of the host compiler: -{{ -# optionally, you can compile the import library: -# ~/cross-chicken/arm-csc -O3 -d0 -s target-only-extension.import.scm -cp target-only-extension.import.scm ~/cross-chicken/lib/chicken/5 -}} + # optionally, you can compile the import library: + # ~/cross-chicken/arm-csc -O3 -d0 -s target-only-extension.import.scm + cp target-only-extension.import.scm ~/cross-chicken/lib/chicken/5 === Final notes diff --git a/manual/Declarations b/manual/Declarations index e73f43e2..d35d3dfc 100644 --- a/manual/Declarations +++ b/manual/Declarations @@ -257,6 +257,13 @@ that any calls to these variables can always be assumed to be calls to proper procedures. +=== scrutinize + + [declaration specifier] (scrutinize) + +Enables scrutiny. This is equivalent to passing the {{-scrutinize}} option to the compiler. + + === standard-bindings [declaration specifier] (standard-bindings SYMBOL ...) diff --git a/manual/Deployment b/manual/Deployment index 1330f163..8a82866e 100644 --- a/manual/Deployment +++ b/manual/Deployment @@ -137,17 +137,16 @@ Deployment is fully compatible with "cross CHICKENs" (see [[Cross development]]) ===== Linux -Deployment is fully suppored on Linux +Deployment is fully supported on Linux ===== Windows -Deployment is fully supported on Windows. Since Windows looks up dynamic link -libraries in the programs original location by default, adding third-party -libraries to the application directory is no problem. The freely available -{{depends}} tool is helpful to find out what DLLs your application depends -on: - - [[http://dependencywalker.com/]] +Deployment is fully supported on Windows. Since Windows looks up +dynamic link libraries in the programs original location by default, +adding third-party libraries to the application directory is no +problem. The freely available [[http://dependencywalker.com|Dependency +Walker]] tool is helpful to find out what DLLs your application +depends on. ===== MacOS X diff --git a/manual/Extensions b/manual/Extensions index 7ae087a6..d93fd0f0 100644 --- a/manual/Extensions +++ b/manual/Extensions @@ -76,6 +76,8 @@ extracted the files, the setup script will be invoked. There are no additional constraints on the structure of the archive, but the setup script has to be in the root path of the archive. +For more details on creating extensions, see the [[/eggs tutorial|eggs tutorial]]. + === Procedures and macros available in setup scripts @@ -185,7 +187,7 @@ Equivalent to {{(run (csc FORM ...))}}. A ''make'' macro that executes the expressions {{COMMAND ...}}, when any of the dependents {{DEPENDENT ...}} have changed, to build {{TARGET}}. This is the same as the {{make}} extension, which is available separately. For more information, see -[[http://www.call-with-current-continuation.org/eggs/make.html|make]]. +[[http://wiki.call-cc.org/egg/make|make]]. ==== patch @@ -354,7 +356,8 @@ Lastly, we need a file {{hello.meta}} defining a minimal set of properties: (files "hello.scm" "hello.setup")) </enscript> -(for more information about available properties, see {{Metafile reference}}) +(for more information about available properties, see +[[/Metafile reference|the metafile reference]]) After entering @@ -560,6 +563,7 @@ Available options: ; {{-u -update-db}} : update export database ; {{-repository}} : print path to extension repository ; {{-deploy}} : install extension in the application directory for a deployed application (see [[Deployment]] for more information) +; {{-trunk}} : build trunk instead of tagged version (only local) ; {{-D -feature FEATURE}} : pass this on to subinvocations of {{csi}} and {{csc}} (when done via {{compile}} or {{(run (csc ...))}}) ; {{-debug}} : print full call-trace when encountering errors in the setup script ; {{-keep-going}} : continue installation, even if a dependency fails @@ -635,7 +639,8 @@ Then set this environment variable: loaded from for all chicken-based programs (which includes all the tools). -You can install eggs with +If you want to install eggs somewhere other than the default or +your environment variable, you can use chicken-install -p ~/myeggs <package> @@ -657,7 +662,7 @@ where libraries are being loaded from: === Other modes of installation It is possible to install extensions directly from a -[[http://subversion.tigris.org|Subversion]] repository or from a local +[[http://subversion.apache.org/|Subversion]] repository or from a local checkout of the repository tree by using the {{-transport}} and {{-location}} options when invoking {{chicken-install}}. Three possible transport mechanisms are currently supported: diff --git a/manual/Extensions to the standard b/manual/Extensions to the standard index 53098560..45fd3ea3 100644 --- a/manual/Extensions to the standard +++ b/manual/Extensions to the standard @@ -1,5 +1,7 @@ [[tags: manual]] +[[toc:]] + == Extensions to the standard === Identifiers @@ -110,7 +112,7 @@ Local sequences of {{define-syntax}} forms are translated into equivalent {{letrec-syntax}} forms that enclose the following forms as the body of the expression. -=== {{define}} +=== Curried definitions {{define}} with a single argument is allowed and initializes the toplevel or local binding to an unspecified value. CHICKEN supports ''curried'' definitions, where the variable name diff --git a/manual/Foreign type specifiers b/manual/Foreign type specifiers index dd98b573..faf4f221 100644 --- a/manual/Foreign type specifiers +++ b/manual/Foreign type specifiers @@ -68,6 +68,8 @@ allowed as return type). The value {{#f}} is also allowed and is passed as a Don't confuse this type with {{(c-pointer ...)}} which means something different (a machine-pointer object). +{{scheme-pointer}} is typically used to get a pointer to the raw byte content of strings and blobs. But if you pass in a SRFI-4 vector, you will get a pointer to a blob object (''not'' the blob's contents), which is almost certainly wrong. Instead, convert to a blob beforehand, or use a SRFI-4 specific type. + === nonnull-scheme-pointer As {{scheme-pointer}}, but guaranteed not to be {{#f}}. @@ -246,6 +248,8 @@ Foreign types are mapped to C types in the following manner: int </td></tr><tr><td>[unsigned-]char</td><td> [unsigned] char +</td></tr><tr><td>[unsigned-]byte</td><td> +[unsigned] char </td></tr><tr><td>[unsigned-]short</td><td> [unsigned] short </td></tr><tr><td>[unsigned-]int</td><td> diff --git a/manual/Getting started b/manual/Getting started index ae127455..6c193f42 100644 --- a/manual/Getting started +++ b/manual/Getting started @@ -60,7 +60,6 @@ or other languages. These can be found on the CHICKEN wiki. CHICKEN is an implementation of Scheme that has many advantages. -<blockquote> CHICKEN Scheme combines an optimising compiler with a reasonably fast interpreter. It supports almost all of R5RS and the important SRFIs. The compiler generates portable C code that supports tail recursion, @@ -70,7 +69,6 @@ hundreds of contributed CHICKEN libraries that make the programmer's task easier. The interpreter allows interactive use, fast prototyping, debugging, and scripting. The active and helpful CHICKEN community fixes bugs and provides support. Extensive documentation is supplied. -</blockquote> CHICKEN was developed by Felix L. Winkelmann over the period from 2000 through 2007. In early 2008, Felix @@ -213,6 +211,10 @@ can pretty much ignore the C compiler once you have installed it.) Refer to the {{README}} file for the version you're installing for more information on the installation process. +Alternatively, third party packages in binary format are available. +Se [[http://wiki.call-cc.org/platforms]] for information about how to +obtain them. + === Development environments The simplest development environment is a text editor and terminal @@ -285,12 +287,15 @@ CHICKEN code. To invoke the CHICKEN interpreter, you use the {{csi}} command. + $ csi + CHICKEN - (c)2008 The CHICKEN Team + (c)2008-2010 The Chicken Team (c)2000-2007 Felix L. Winkelmann - Version 3.1.2 - macosx-unix-gnu-x86 [ manyargs dload ptables applyhook ] - SVN rev. 10185 compiled 2008-03-27 on argyre.local (Darwin) + Version 4.6.0 + macosx-unix-gnu-x86 [ manyargs dload ptables ] + #;1> This brings up a brief banner, and then the prompt. You can use this @@ -318,7 +323,7 @@ We can now load this file and try out the function. The '''read-eval-print loop''' ('''REPL''') is the component of the Scheme system that ''reads'' a Scheme expression, ''eval''uates it, and ''prints'' out the result. The REPL's prompt can be customized -(see the [[Using the Interpreter]]) +(see the [[Using the interpreter]]) but the default prompt, showing the number of the form, is quite convenient. @@ -345,14 +350,41 @@ actually a Scheme ''form''. ==== Scripts You can use the interpreter to run a Scheme program from the command -line. Here we create a program that does a quick search-and-replace on -an input file; the arguments are a regular expression and a -replacement string. +line. For the following example we create a program that does a quick +search-and-replace on an input file; the arguments are a regular +expression and a replacement string. First create a file to hold the "data" called ''quickrep.dat'' with your favorite editor holding these lines: - $ cat quickrep.dat xyzabcghi abxawxcgh foonly + +Next create the scheme code in a file called ''quickrep.scm'' with the +following little program: + +<enscript highlight=scheme> + +(use irregex) ; irregex, the regular expression library, is one of the + ; libraries included with CHICKEN. + +(define (process-line line re rplc) + (string-substitute re rplc line 'all)) + +(define (quickrep re rplc) + (let ((line (read-line))) + (if (not (eof-object? line)) + (begin + (display (process-line line re rplc)) + (newline) + (quickrep re rplc))))) + +;;; Does a lousy job of error checking! +(define (main args) + (quickrep (regexp (car args)) (cadr args))) +</enscript> + + +To run it enter this in your shell: + $ csi -ss quickrep.scm <quickrep.dat 'a.*c' A xyzAghi Agh @@ -363,23 +395,6 @@ execute a script. You can make the command directly executable from the shell by inserting a `[[Using the interpreter#Writing Scheme scripts|shebang line]]' at the beginning of the program. -{{regex}}, the regular expression library, is one of the libraries -included with CHICKEN. - - (use regex) - (define (process-line line re rplc) - (string-substitute re rplc line 'all)) - (define (quickrep re rplc) - (let ((line (read-line))) - (if (not (eof-object? line)) - (begin - (display (process-line line re rplc)) - (newline) - (quickrep re rplc))))) - ;;; Does a lousy job of error checking! - (define (main args) - (quickrep (regexp (car args)) (cadr args))) - The {{-ss}} option arranges to call a procedure named {{main}}, with the command line arguments, packed in a list, as its arguments. (There are a number of ways this program could be made more idiomatic CHICKEN @@ -424,20 +439,22 @@ On any system, we can just compile a program directly into an executable. Here's a program that tells you whether its argument is a palindrome. - (define (palindrome? x) - (define (check left right) - (if (>= left right) - #t - (and (char=? (string-ref x left) (string-ref x right)) - (check (add1 left) (sub1 right))))) - (check 0 (sub1 (string-length x)))) - (let ((arg (car (command-line-arguments)))) - (display - (string-append arg - (if (palindrome? arg) - " is a palindrome\n" - " isn't a palindrome\n")))) - +<enscript highlight=scheme> +(define (palindrome? x) + (define (check left right) + (if (>= left right) + #t + (and (char=? (string-ref x left) (string-ref x right)) + (check (add1 left) (sub1 right))))) + (check 0 (sub1 (string-length x)))) +(let ((arg (car (command-line-arguments)))) + (display + (string-append arg + (if (palindrome? arg) + " is a palindrome\n" + " isn't a palindrome\n")))) +</enscript> + We can compile this program using {{csc}}, creating an executable named {{palindrome}}. @@ -457,27 +474,31 @@ CHICKEN. (Units deal with separate compilation, but don't involve separated namespaces; namespaced module systems are available as eggs.) - ;;; Library pal-proc.scm - (declare (unit pal-proc)) - (define (palindrome? x) - (define (check left right) - (if (>= left right) - #t - (and (char=? (string-ref x left) (string-ref x right)) - (check (add1 left) (sub1 right))))) - (check 0 (sub1 (string-length x)))) +<enscript highlight=scheme> +;;; Library pal-proc.scm +(declare (unit pal-proc)) +(define (palindrome? x) + (define (check left right) + (if (>= left right) + #t + (and (char=? (string-ref x left) (string-ref x right)) + (check (add1 left) (sub1 right))))) + (check 0 (sub1 (string-length x)))) +</enscript> Next we have some client code that `uses' this separately-compiled module. - ;;; Client pal-user.scm - (declare (uses pal-proc)) - (let ((arg (car (command-line-arguments)))) - (display - (string-append arg - (if (palindrome? arg) - " is a palindrome\n" - " isn't a palindrome\n")))) +<enscript highlight=scheme> +;;; Client pal-user.scm +(declare (uses pal-proc)) +(let ((arg (car (command-line-arguments)))) + (display + (string-append arg + (if (palindrome? arg) + " is a palindrome\n" + " isn't a palindrome\n")))) +</enscript> Now we can compile and link everything together. (We show the compile and link operations separately, but they can of course be combined @@ -497,35 +518,39 @@ Solaris, and Windows). The command {{chicken-install}} will fetch an egg from the master CHICKEN repository, and install it on your local system. -In this example, we install the {{uri}} egg, for parsing Uniform -Resource Identifiers. The installation produces a lot of output, which -we have edited for space reasons. - - $ chicken-install uri - - The extension uri does not exist. - Do you want to download it ? (yes/no/abort) [yes] yes - downloading uri.egg from (www.call-with-current-continuation.org eggs/3 80) - gzip -d -c ../uri.egg | tar xf - - . /Users/vmanis/local/bin/csc -feature compiling-extension - -s -O2 -d1 uri.scm -o uri.so -check-imports -emit-exports uri.exports - ... (lots of stuff elided) - . rm -fr /Users/vmanis/project/chicken/uri.egg - -First, {{chicken-install}} asks us if we want to download the egg. It -then uncompresses the egg, compiles the code, and installs the egg in -the local CHICKEN repository. +In this example, we install the {{uri-common}} egg, for parsing +Uniform Resource Identifiers. The installation produces a lot of +output, which we have edited for space. + + $ chicken-install uri-common + + retrieving ... + resolving alias `kitten-technologies' to: http://chicken.kitten-technologies.co.uk/henrietta.cgi + connecting to host "chicken.kitten-technologies.co.uk", port 80 ... + requesting "/henrietta.cgi?name=uri-common&mode=default" ... + reading response ... + [...] + /usr/bin/csc -feature compiling-extension -setup-mode -s -O2 uri-common.scm -j uri-common + /usr/bin/csc -feature compiling-extension -setup-mode -s -O2 uri-common.import.scm + cp -r uri-common.so /usr/lib/chicken/5/uri-common.so + chmod a+r /usr/lib/chicken/5/uri-common.so + cp -r uri-common.import.so /usr/lib/chicken/5/uri-common.import.so + chmod a+r /usr/lib/chicken/5/uri-common.import.so + chmod a+r /usr/lib/chicken/5/uri-common.setup-info + +{{chicken-install}} connects to a mirror of the egg repository and +retrieves the egg contents. If the egg has any uninstalled +dependencies, it recursively installs them. Then it builds the egg +code and installs the resulting extension into the +local CHICKEN repository. Now we can use our new egg. - #;1> (use uri) - ; loading /Users/vmanis/local/lib/chicken/3/uri.so ... - ; loading /Users/vmanis/local/lib/chicken/3/coerce-support.so ... - ; loading /Users/vmanis/local/lib/chicken/3/misc-extn-list-support.so ... - ; loading /Users/vmanis/local/lib/chicken/3/synch-support.so ... - ; loading /Users/vmanis/local/lib/chicken/3/lookup-table.so ... - ; loading /Users/vmanis/local/lib/chicken/3/misc-extn-control-support.so ... - #;2> (uri-host (uri "http://www.foobar.org/blah")) + #;1> (use uri-common) + ; loading /usr/lib/chicken/5/uri-common.import.so ... + ; [... other loaded files omitted for clarity ...] + + #;2> (uri-host (uri-reference "http://www.foobar.org/blah")) "www.foobar.org" === Accessing C libraries @@ -579,7 +604,7 @@ name), and that it returns an integer result (the {{int}} before.) Now we can in 0 1 1 2 3 5 8 13 21 34 55 Those who are interfacing to substantial C libraries should consider -using the [[bind]] egg. +using the [[/egg/bind|bind egg]]. --- diff --git a/manual/Interface to external functions and variables b/manual/Interface to external functions and variables index 07ce9c18..85cff250 100644 --- a/manual/Interface to external functions and variables +++ b/manual/Interface to external functions and variables @@ -6,6 +6,8 @@ The macros in this section, such as {{define-foreign-type}} and {{define-externa (import foreign) +Note: Using the foreign library directly from the interpreter or the REPL will not work. + * [[Accessing external objects]] * [[Foreign type specifiers]] * [[Embedding]] diff --git a/manual/Locations b/manual/Locations index 4129cf7e..5954638b 100644 --- a/manual/Locations +++ b/manual/Locations @@ -30,6 +30,7 @@ Defines a lexically bound location. <macro>(location NAME)</macro><br> <macro>(location X)</macro> +<read>#$</read> This form returns a pointer object that contains the address of the variable {{NAME}}. diff --git a/manual/Non-standard macros and special forms b/manual/Non-standard macros and special forms index 939fce20..7a04183d 100644 --- a/manual/Non-standard macros and special forms +++ b/manual/Non-standard macros and special forms @@ -185,20 +185,23 @@ Defines several variables at once, with the result values of expression Binds the variables {{VAR1 ...}} dynamically to the values {{X1 ...}} during execution of {{BODY ...}}. +This implements [[http://srfi.schemers.org/srfi-15/srfi-15.html|SRFI-15]]. ==== let-values <macro>(let-values (((NAME ...) EXP) ...) BODY ...)</macro> -SRFI 11. Binds multiple variables to the result values of {{EXP ...}}. +Binds multiple variables to the result values of {{EXP ...}}. All variables are bound simultaneously. +This implements [[http://srfi.schemers.org/srfi-11/srfi-11.html|SRFI-11]]. ==== let*-values <macro>(let*-values (((NAME ...) EXP) ...) BODY ...)</macro> -SRFI 11. Binds multiple variables to the result values of {{EXP ...}}. +Binds multiple variables to the result values of {{EXP ...}}. The variables are bound sequentially. +This is also part of [[http://srfi.schemers.org/srfi-11/srfi-11.html|SRFI-11]]. <enscript highlight=scheme> (let*-values (((a b) (values 2 3)) @@ -230,19 +233,14 @@ Binds the parameters {{PARAMETER1 ...}} dynamically to the values {{make-parameter}} in [[Parameters]]). Note that {{PARAMETER}} may be any expression that evaluates to a parameter procedure. -Note: due to a bug in the implementation of {{parameterize}}, -restoring the previous parameter values does reinvoke the guard -procedure of the parameter, if it has any. If the guard procedure -performs a conversion, then the conversion will be reinvoked -on restoration of the old value. - ==== receive <macro>(receive (NAME ...) VALUEEXP BODY ...)</macro><br> <macro>(receive (NAME1 ... NAMEn . NAMEn+1) VALUEEXP BODY ...)</macro><br> <macro>(receive VALUEEXP)</macro> -SRFI-8. Syntactic sugar for {{call-with-values}}. Binds variables +[[http://srfi.schemers.org/srfi-8/srfi-8.html|SRFI-8]]. +Syntactic sugar for {{call-with-values}}. Binds variables to the result values of {{VALUEEXP}} and evaluates {{BODY ...}}. {{(receive VALUEEXP)}} is equivalent to {{(receive _ VALUEEXP _)}}. diff --git a/manual/Non-standard read syntax b/manual/Non-standard read syntax index 0cecce36..1c439ca9 100644 --- a/manual/Non-standard read syntax +++ b/manual/Non-standard read syntax @@ -17,17 +17,24 @@ === Multiline Block Comment +<read>#|</read> + #| ... |# -A multiline ''block'' comment. May be nested. Implements [[http://srfi.schemers.org/srfi-30/srfi-30.html|SRFI-30]] +A multiline ''block'' comment. May be nested. Implements [[http://srfi.schemers.org/srfi-30/srfi-30.html|SRFI-30]]. === Expression Comment +<read>#;</read> + #;EXPRESSION -Treats {{EXPRESSION}} as a comment. That is, the comment runs through the whole S-expression, regardless of newlines, which saves you from having to comment out every line, or add a newline in the middle of your parens to make the commenting of the last line work, or other things like that. +Treats {{EXPRESSION}} as a comment. That is, the comment runs through the whole S-expression, regardless of newlines, which saves you from having to comment out every line, or add a newline in the middle of your parens to make the commenting of the last line work, or other things like that. Implements [[http://srfi.schemers.org/srfi-62/srfi-62.html|SRFI-62]]. + === External Representation +<read>#,</read> + #,(CONSTRUCTORNAME DATUM ...) Allows user-defined extension of external representations. (For more information see the documentation for @@ -39,9 +46,11 @@ Allows user-defined extension of external representations. (For more information An abbreviation for {{(location EXPRESSION)}}. -=== "Blob" literals +=== Blob literals + +<read>#{</read> - #${HEX ...} + #{ HEX ... } Syntax for literal "blobs" (byte-sequences). Expects hexadecimal digits and ignores any whitespace characters: @@ -52,6 +61,8 @@ any whitespace characters: === Keyword +<read>#:</read> + #:SYMBOL SYMBOL: :SYMBOL @@ -60,6 +71,8 @@ Syntax for keywords. Keywords are symbols that evaluate to themselves, and as su === Multiline String Constant +<read>#<<</read> + #<<TAG Specifies a multiline string constant. Anything up to a line equal to {{TAG}} (or end of file) will be returned as a single string: @@ -75,6 +88,8 @@ is equivalent to === Multiline String Constant with Embedded Expressions +<read>#<</read> + #<#TAG Similar to {{#<<}}, but allows substitution of embedded Scheme expressions prefixed with {{#}} and optionally enclosed in curly brackets. Two consecutive {{#}}s are translated to a single {{#}}: @@ -93,6 +108,14 @@ prints and substituted expressions: (+ three 99) ==> 102 (three is "3") +=== Foreign Declare + +<read>#></read> + + #> ... <# + +Abbreviation for {{(foreign-declare " ... ")}}. + === String escape sequences String-literals may contain the following of the escape sequences: @@ -122,53 +145,57 @@ Abbreviation for {{foreign-declare " ... ")}}. === Sharp Prefixed Symbol +<read>#%</read> + #%... Reads like a normal symbol. === Bang +<read>#!</read> + #!... Interpretation depends on the directly following characters. Only the following are recognized. Any other case results in a read error. -==== Line Comment - -* If followed by whitespace or a slash, then everything up the end of the current line is ignored - -==== Eof Object +; Line Comment : If followed by whitespace or a slash, then everything up the end of the current line is ignored -* If followed by the character sequence {{eof}}, then the (self-evaluating) end-of-file object is returned +; Eof Object : If followed by the character sequence {{eof}}, then the (self-evaluating) end-of-file object is returned -==== DSSSL Formal Parameter List Annotation +; DSSSL Formal Parameter List Annotation : If followed by any of the character sequences {{optional}}, {{rest}} or {{key}}, then a symbol with the same name (and prefixed with {{#!}}) is returned -* If followed by any of the character sequences {{optional}}, {{rest}} or {{key}}, then a symbol with the same name (and prefixed with {{#!}}) is returned - -==== Read Mark Invocation - -* If a ''read mark'' with the same name as the token is registered, then its procedure is called and the result of the read-mark procedure will be returned -(see {{set-read-syntax!}} for more information about read-marks). +; Read Mark Invocation : If a ''read mark'' with the same name as the token is registered, then its procedure is called and the result of the read-mark procedure will be returned === Case Sensitive Expression +<read>#cs</read> + #cs... Read the next expression in case-sensitive mode (regardless of the current global setting). === Case Insensitive Expression +<read>#ci</read> + #ci... Read the next expression in case-insensitive mode (regardless of the current global setting). === Conditional Expansion +<read>#+</read> + #+FEATURE EXPR -Equivalent to +Rewrites to (cond-expand (FEATURE EXPR) (else)) +and performs the feature test at macroexpansion time. Therefore, it may not +work as expected when used within a macro form. + --- Previous: [[Extensions to the standard]] diff --git a/manual/Parameters b/manual/Parameters index 8e21811f..2d9b22ca 100644 --- a/manual/Parameters +++ b/manual/Parameters @@ -3,12 +3,11 @@ == Parameters -Parameters are a form of dynamic variables, except that they are -procedures rather than actual variables. A parameter is a procedure -of zero or one arguments. To retrieve the value of a parameter call -the parameter-procedure with zero arguments. To change the setting of -the parameter, call the parameter-procedure with the new value as -argument: +Parameters are Chicken's form of dynamic variables, except that they are +procedures rather than actual variables. A parameter is a procedure of +zero or one arguments. To retrieve the value of a parameter call the +parameter-procedure with zero arguments. To change the setting of the +parameter, call the parameter-procedure with the new value as argument: <enscript highlight=scheme> (define foo (make-parameter 123)) @@ -17,18 +16,11 @@ argument: (foo) ==> 99 </enscript> -Parameters are fully thread-local, each thread of execution owns a -local copy of a parameters' value. +Parameters are fully thread-local, each thread of execution +owns a local copy of a parameters' value. CHICKEN implements [[http://srfi.schemers.org/srfi-39/srfi-39.html|SRFI-39]]. -Parameters are "settable", in other words, you can also write - -<enscript highlight=scheme> -(set! (foo) 100) -</enscript> - -to assign a new value. === make-parameter diff --git a/manual/The R5RS standard b/manual/The R5RS standard index 138ab7a4..f8b6ba4c 100644 --- a/manual/The R5RS standard +++ b/manual/The R5RS standard @@ -50,7 +50,7 @@ equivalent in all respects. '() ===> () '(+ 1 2) ===> (+ 1 2) '(quote a) ===> (quote a) - "a ===> (quote a) + ''a ===> (quote a) Numerical constants, string constants, character constants, and boolean constants evaluate "to themselves"; they need not be quoted. diff --git a/manual/Unit eval b/manual/Unit eval index f6e6b582..ab6611bb 100644 --- a/manual/Unit eval +++ b/manual/Unit eval @@ -60,7 +60,7 @@ If {{PRINTER}} is given and not false, then each expression is printed before evaluation by applying the expression to the value of this argument, which should be a one-argument procedure. -See also the [[http://wiki.call-cc.org/Parameters#load-verbose|load-verbose]] parameter. +See also the [[Parameters#load-verbose|load-verbose]] parameter. ==== load-library <procedure>(load-library UNIT [LIBRARYFILE])</procedure> @@ -156,7 +156,10 @@ extension library and load it. If {{ID}} names a library-unit of the base system, then it is loaded via {{load-library}}. If no extension library is available for the given ID, then an attempt is made to load the file {{ID.so}} or {{ID.scm}} (in that order) -in the current directory. +from one of the following locations: + +* the current include path, which defaults to the pathnames given in {{CHICKEN_INCLUDE_PATH}}. +* the current directory {{ID}} should be a string or a symbol. diff --git a/manual/Unit extras b/manual/Unit extras index 3d0163a8..cb9d4299 100644 --- a/manual/Unit extras +++ b/manual/Unit extras @@ -4,10 +4,7 @@ == Unit extras This unit contains a collection of useful utility definitions. The unit is -used by default, unless the program is compiled with the {{-explicit-use}} -option. - - +used in {{csi}} by default. === Random numbers diff --git a/manual/Unit files b/manual/Unit files index 46285a9f..bdbc3e58 100644 --- a/manual/Unit files +++ b/manual/Unit files @@ -166,7 +166,7 @@ platform-dependent. Moves {{ORIGFILE}} (a string denoting some filename) to {{NEWFILE}}, with the same semantics as {{file-copy}}, above. {{file-move}} is safe across -filesystems and devices (unlike {{file-rename}}). It is possible for an +filesystems and devices (unlike {{rename-file}}). It is possible for an error to be signalled despite partial success if {{NEWFILE}} could be created and fully written but removing {{ORIGFILE}} fails. diff --git a/manual/Unit library b/manual/Unit library index 6584fe1c..fd4158e0 100644 --- a/manual/Unit library +++ b/manual/Unit library @@ -3,13 +3,9 @@ == Unit library -This unit contains basic library definitions. This unit is used by default, +This unit contains basic Scheme definitions. This unit is used by default, unless the program is compiled with the {{-explicit-use}} option. -In addition to standard Scheme functions, this unit provides quite -a number of additional operations. - - === Arithmetic @@ -408,11 +404,11 @@ Returns a keyword with the name {{STRING}}. <procedure>(argv)</procedure> -Return a list of all supplied command-line arguments. The first item -in the list is a string containing the name of the executing -program. The other items are the arguments passed to the -application. It depends on the host-shell whether arguments are -expanded ('globbed') or not. +Return a list of all supplied command-line arguments. The first item in +the list is a string containing the name of the executing program. The +other items are the arguments passed to the application. This list is +freshly created on every invocation of {{(argv)}}. It depends on +the host-shell whether arguments are expanded ('globbed') or not. ==== exit @@ -655,22 +651,21 @@ the call-chain will only be constructed for calls performed by this thread. ==== print-call-chain -<procedure>(print-call-chain [PORT [START [THREAD]]])</procedure> +<procedure>(print-call-chain [PORT [START [THREAD [HEADER]]]])</procedure> Prints a backtrace of the procedure call history to {{PORT}}, -which defaults to {{(current-output-port)}}. +which defaults to {{(current-output-port)}}. The output is prefixed by the +{{HEADER}}, which defaults to {{"\n\tCall history:\n"}}. ==== print-error-message -<procedure>(print-error-message EXN [PORT [STRING]])</procedure> - -Prints an appropriate error message to {{PORT}} (which defaults to the -value of {{(current-output-port)}} for the object {{EXN}}. -{{EXN}} may be a condition, a string or any other object. -If the optional argument {{STRING}} is given, it is printed before the -error-message. {{STRING}} defaults to {{"Error:"}}. +<procedure>(print-error-message EXN [PORT [HEADER]])</procedure> +Prints an appropriate error message to {{PORT}} (which defaults to the value of +{{(current-output-port)}} for the object {{EXN}}. {{EXN}} may be a condition, a +string or any other object. The output is prefixed by the {{HEADER}}, which +defaults to {{"Error:"}}. ==== procedure-information diff --git a/manual/Unit posix b/manual/Unit posix index cf46f22c..cdbfddbb 100644 --- a/manual/Unit posix +++ b/manual/Unit posix @@ -422,7 +422,7 @@ return an inexact integer. <procedure>(regular-file? FILENAME)</procedure> -Returns true, if {{FILENAME}} names a regular file (not a directory or symbolic link). +Returns true, if {{FILENAME}} names a regular file (not a directory, socket, etc.) This operation follows symbolic links; use either {{symbolic-link?}} or {{file-type}} if you need to test for symlinks. ==== file-owner @@ -684,7 +684,7 @@ the session ID. <procedure>(symbolic-link? FILENAME)</procedure> Returns true, if {{FILENAME}} names a symbolic link. If no such file exists, {{#f}} -is returned. +is returned. This operation does not follow symbolic links itself. ==== create-symbolic-link @@ -920,7 +920,7 @@ These variables contain signal codes for use with {{process-signal}}, {{set-sig === Environment access -==== current-environment +==== get-environment-variables <procedure>(get-environment-variables)</procedure> @@ -946,6 +946,8 @@ nothing happens. === Memory mapped I/O +Memory mapped I/O takes the contents of a file descriptor and places them in memory. + ==== memory-mapped-file? <procedure>(memory-mapped-file? X)</procedure> @@ -987,6 +989,44 @@ by the procedure {{map-file-to-memory}}. The optional argument {{LEN}} specifies the length of the section to be unmapped and defaults to the complete length given when the file was mapped. +==== Memory Mapped I/O Example + +<enscript highlight=scheme> +;; example-mmap.scm +;; +;; basic example of memory mapped I/O +;; +;; This example does no error checking or cleanup, and serves +;; only to demonstrate how the mmap functions work together. +;; +(use posix) +(use lolevel) + + ; open a file using the posix module, so we have the file descriptor. +(let* ((fd (file-open "example-mmap.scm" (+ open/rdonly open/nonblock))) + ; fstat(2) the file descriptor fd to determine its size + (size (file-size fd)) + ; mmap(2) the file for reading. + (mmap (map-file-to-memory #f + size + prot/read + (+ map/file map/shared) + fd)) + ; return a pointer object to the beginning of the memory map. + (buf (memory-mapped-file-pointer mmap)) + ; allocate a string the same size as the file. + (str (make-string size))) + ; copy the mapped memory into a string + (move-memory! buf str size) + (display str) + ; alternately, print the string byte-by-byte without copying. + (let loop ((p buf) + (i 0)) + (unless (= i size) + (display (integer->char (pointer-s8-ref p))) + (loop (pointer+ p 1) (+ i 1))))) +</enscript> + === Date and time routines @@ -1145,12 +1185,12 @@ followed. Note that {{action}} is called with the full pathname of each file, including the directory prefix. -In older CHICKEN versions, {{find-files}} has a different argument -signature: +This procedure's signature was changed in CHICKEN 4.6. In older versions, {{find-files}} +has a different signature: (find-files DIRECTORY [TEST [ACTION [SEED [LIMIT]]]]) -This signature is still supported for compatibility reasons but is +The old signature is still supported in CHICKEN 4.6 for compatibility reasons, but is deprecated. === Getting the hostname and system information @@ -1198,12 +1238,12 @@ Returns {{#t}} if {{PORT}} is connected to a terminal and ==== terminal-size -<procedure>(terminal-size)</procedure> +<procedure>(terminal-size PORT)</procedure> -Returns two values, the number of columns and rows of the -current terminal window or {{0}}, {{0}} if the terminal -size can not be obtained. On Windows, this procedure -always returns {{0}}, {{0}}. +Returns two values, the number of columns and rows of the terminal +that is connected to {{PORT}} or {{0}}, {{0}} if the terminal size can +not be obtained. On Windows, this procedure always returns {{0}}, +{{0}}. === How Scheme procedures relate to UNIX C functions diff --git a/manual/Unit srfi-1 b/manual/Unit srfi-1 index 59a47160..7a8eb917 100644 --- a/manual/Unit srfi-1 +++ b/manual/Unit srfi-1 @@ -1,5 +1,4 @@ [[tags: manual]] -[[toc:]] == Unit srfi-1 diff --git a/manual/Unit srfi-13 b/manual/Unit srfi-13 index 81dd16fb..bbd71086 100644 --- a/manual/Unit srfi-13 +++ b/manual/Unit srfi-13 @@ -31,7 +31,7 @@ done code point by code point. Chicken's native strings are simple byte sequences (not Unicode code points). Comparison or reversal is done byte-wise. If Unicode semantics are -desired, see the [[utf8]] egg. +desired, see the [[/egg/utf8|utf8]] egg. === Case mapping and case-folding @@ -337,7 +337,7 @@ in some implementations, proper substrings may share memory with S. [R5RS+] Stores CHAR in every element of S. -{{string-fill}} is extended from the R5RS definition to take optional +{{string-fill!}} is extended from the R5RS definition to take optional START/END arguments. @@ -1108,7 +1108,7 @@ If any of the checks fail, an error condition is raised, and PROC is used as part of the error condition -- it should be the client procedure whose argument list {{string-parse-start+end}} is parsing. -{{string-parse-final-start+end}} is exactly the same, except that the args +{{string-parse-final-start+end}} is exactly the same, except that the ARGS list passed to it is required to be of length two or less; if it is longer, an error condition is raised. It may be used when the optional START/END parameters are final arguments to the procedure. @@ -1311,7 +1311,7 @@ non-empty -- PLEN > 0.) Hence: -* A negative return value indicates success, and says where in the string the match occured. +* A negative return value indicates success, and says where in the string the match occurred. * A non-negative return value provides the I to use for continued search in a following string. This utility is designed to allow searching for occurrences of a fixed diff --git a/manual/Unit srfi-14 b/manual/Unit srfi-14 index 37ecb9e0..14d0763d 100644 --- a/manual/Unit srfi-14 +++ b/manual/Unit srfi-14 @@ -15,7 +15,7 @@ be made available in the interpreter ({{csi}}) by entering </enscript> This library provides only the Latin-1 character set. To get Unicode -semantics, see the [[utf8]] egg. However, information on Unicode +semantics, see the [[/egg/utf8|utf8]] egg. However, information on Unicode character sets is still provided in this document. == Specification diff --git a/manual/Unit srfi-69 b/manual/Unit srfi-69 index 80fc3fef..92db700b 100644 --- a/manual/Unit srfi-69 +++ b/manual/Unit srfi-69 @@ -81,14 +81,14 @@ The {{HASH-TABLE}} maximum load factor. <procedure>(hash-table-weak-keys HASH-TABLE)</procedure> -Does the {{HASH-TABLE}} weak references for keys? +Does the {{HASH-TABLE}} use weak references for keys? ==== hash-table-weak-values <procedure>(hash-table-weak-values HASH-TABLE)</procedure> -Does the {{HASH-TABLE}} weak references for values? +Does the {{HASH-TABLE}} use weak references for values? ==== hash-table-has-initial? @@ -172,12 +172,12 @@ is equivalent to ==== hash-table-update! -<procedure>(hash-table-update! HASH-TABLE KEY UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION])</procedure> +<procedure>(hash-table-update! HASH-TABLE KEY [UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION]])</procedure> Sets or replaces the {{VALUE}} for {{KEY}} in the {{HASH-TABLE}}. The {{UPDATE-FUNCTION}} takes the existing {{VALUE}} for {{KEY}} and returns -the new {{VALUE}}. +the new {{VALUE}}. The default is {{identity}} The {{DEFAULT-VALUE-FUNCTION}} is called when the entry for {{KEY}} is missing. The default uses the {{(hash-table-initial-value)}}, if provided. Otherwise diff --git a/manual/Unit utils b/manual/Unit utils index 9d3186ce..8c1df377 100644 --- a/manual/Unit utils +++ b/manual/Unit utils @@ -18,7 +18,7 @@ This unit uses the {{extras}} and {{srfi-13}} units. <procedure>(system* FORMATSTRING ARGUMENT1 ...)</procedure> Similar to {{(system (sprintf FORMATSTRING ARGUMENT1 ...))}}, -but signals an error if the invoked program should return a nonzero +but signals an error should the invoked program return a nonzero exit status. === Reading a file's contents diff --git a/manual/Using the compiler b/manual/Using the compiler index 00d8c079..ebbff6f5 100644 --- a/manual/Using the compiler +++ b/manual/Using the compiler @@ -166,9 +166,9 @@ the source text should be read from standard input. ; -prelude EXPRESSIONS : Add {{EXPRESSIONS}} before all other toplevel expressions in the compiled file. This option may be given multiple times. Processing of this option takes place before processing of {{-prologue}}. ; -profile : -; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE.<randomnumber>}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to the current file (use {{-profile-name}} in this case to specify to which file it should be appended). {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist. Only profiling information for global procedures will be collected. +; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE.<randomnumber>}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile}} with no arguments at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist. Only profiling information for global procedures will be collected. -; -profile-name FILENAME : Specifies name of the generated profile information (which defaults to {{PROFILE.<process-id>}}. Implies {{-profile}}. +; -profile-name FILENAME : Specifies name of the generated profile information (which defaults to {{PROFILE.<randomnumber>}}. Implies {{-profile}}. ; -prologue FILENAME : Includes the file named {{FILENAME}} at the start of the compiled source file. The include-path is not searched. This option may be given multiple times. diff --git a/manual/Using the interpreter b/manual/Using the interpreter index 0efe7123..7af24e5e 100644 --- a/manual/Using the interpreter +++ b/manual/Using the interpreter @@ -12,7 +12,7 @@ and expressions interactively. where {{FILENAME}} specifies a file with Scheme source-code. If the extension of the source file is {{.scm}}, it may be omitted. The -runtime options described in [[Using%20the%20compiler#Compiler%20command%20line%20format|Compiler command line format]] are also available +runtime options described in [[Using the compiler#Compiler command line format|Compiler command line format]] are also available for the interpreter. If the environment variable {{CSI_OPTIONS}} is set to a list of options, then these options are additionally passed to every direct or indirect invocation of {{csi}}. Please note that @@ -280,21 +280,17 @@ textual description of the object to the passed output-port. For example: === Auto-completion and edition -On platforms that support it, it is possible to get auto-completion of symbols, -history (over different {{csi}} sessions) and a more feature-full -editor for the expressions you type -using the [[http://wiki.call-cc.org/eggref/4/readline]] egg by -Tony Garnock Jones. -It is very useful for interactive use of csi. - -To enable it install the egg and put this in your {{~/.csirc}} file: - -<enscript highlight=scheme> -(use readline regex) -(current-input-port (make-gnu-readline-port)) -(gnu-history-install-file-manager - (string-append (or (getenv "HOME") ".") "/.csi.history")) -</enscript> +On platforms that support it, it is possible to get auto-completion of +symbols, history (over different {{csi}} sessions) and a more +feature-full editor for the expressions you type using the +[[http://wiki.call-cc.org/eggref/4/readline|readline]] egg by Tony +Garnock Jones. It is very useful for interactive use of csi. See the +egg's documentation on how to set it up. If readline is not available +on your system consider using the self-contained +[[http://wiki.call-cc.org/eggref/4/linenoise|linenoise]] egg +instead. It should work on almost any system but is not as +feature-rich as readline (e.g. it lacks reverse-i-search and +auto-completion). The interpreter {{csi}} internally requires some routines from the {{ports}} and {{extras}} library units and loads them automatically diff --git a/manual/faq b/manual/faq index 5053951b..ca26480d 100644 --- a/manual/faq +++ b/manual/faq @@ -28,10 +28,10 @@ for the existence of CHICKEN are: ==== What should I do if I find a bug? -Send e-mail to felix@call-with-current-continuation.org -with some hints about the problem, like -version/build of the compiler, platform, system configuration, code that -causes the bug, etc. +Fill a ticket at [[http://bugs.call-cc.org|bugs.call-cc.org]] with +some hints about the problem, like version/build of the compiler, +platform, system configuration, code that causes the bug, etc. + === Specific @@ -100,11 +100,12 @@ every object has to be accessed via a thread synchronization protocol. Such a design would make native threads in Chicken essentially equivalent to Unix processes and shared memory. +For a different approach to concurrency, please see the +[[/egg/mpi|mpi]] egg. + ==== Does CHICKEN support Unicode strings? -The system does not directly support Unicode, but an extension for UTF8 strings -exists for CHICKEN 3, which may be ported to the current CHICKEN version at some -stage. +The system does not directly support Unicode, but there is an extension for UTF-8 strings: [[http://wiki.call-cc.org/egg/utf8|utf8]]. === Why are `dynamic-wind' thunks not executed when a SRFI-18 thread signals an error? @@ -235,7 +236,7 @@ just like source files (see {{load}} in the User's Manual). With CHICKEN 4, the macro-expansion subsystem is now hygienic where old Lisp-style low-level macros are not available anymore. {{define-syntax}} can define hygienic macros using {{syntax-rules}} or low-level macros with user-controlled hygienic with ''explicit renaming'' macros. Translating -old-style macros into ER-macros isn't that hard, see [[Modules and macros]] for more information. +old-style macros into ER-macros isn't that hard, see [[Macros]] for more information. ==== Why are low-level macros defined with {{define-syntax}} complaining about unbound variables? @@ -469,7 +470,7 @@ The following extended bindings are handled specially: {{pointer-u32-set!}} {{pointer-s32-set!}} {{pointer-f32-set!}} {{pointer-f64-set!}} {{make-record-instance}} {{locative-ref}} {{locative-set!}} {{locative?}} {{locative->object}} {{identity}} -{{error}} {{call/cc}} {{any?}} +{{cpu-time}} {{error}} {{call/cc}} {{any?}} {{substring=?}} {{substring-ci=?}} {{substring-index}} {{substring-index-ci}} {{printf}} {{sprintf}} {{fprintf}} {{format}} {{o}} @@ -584,7 +585,7 @@ and wrap calls to {{set-finalizer!}} in it. ==== Does CSI support history and autocompletion? -CSI doesn't support it natively but it can be activated with the [[http://www.call-with-current-continuation.org/eggs/readline.html]] egg. +CSI doesn't support it natively but it can be activated with the [[http://wiki.call-cc.org/egg/readline|readline]] egg. After installing the egg, add the following to your {{~/.csirc}} or equivalent file: <enscript highlight=scheme> @@ -629,7 +630,7 @@ It should contain the path where you want eggs to be installed: $ chicken-install -init ~/eggs/lib/chicken/5 $ chicken-install -p ~/eggs/ extensionname -In order to make programs (including csi) see these eggs, you should set this variable when you run them. See the [[http://wiki.call-cc.org/man/4/Extensions#changing-repository-location|Extensions/Changing repository location]] section of the manual for more information on that. +In order to make programs (including csi) see these eggs, you should set this variable when you run them. See the [[/man/4/Extensions#Changing repository location|Extensions/Changing repository location]] section of the manual for more information on that. Alternatively, you can call the {{repository-path}} Scheme procedure before loading the eggs, as in:Trap