mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 20:20:20 +02:00
docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi, doc/ref/api-control.texi, doc/ref/api-debug.texi, doc/ref/api-io.texi, doc/ref/api-macros.texi, doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi, doc/ref/api-undocumented.texi, doc/ref/api-utility.texi, doc/ref/compiler.texi, doc/ref/goops.texi, doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi, doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi, doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi, doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi, doc/sources/env.texi, doc/sources/jimb-org.texi, doc/sources/scheme-concepts.texi, doc/sources/unix.texi, module/ice-9/optargs.scm: Fix typos. * doc/r4rs/r5rs.texi: Likewise. Do not capitalize code symbols even at the start of a sentence. * doc/ref/api-data.texi: Likewise. Also, remove executable bit.
This commit is contained in:
parent
e745064231
commit
ecb8733562
29 changed files with 73 additions and 73 deletions
|
@ -4429,9 +4429,9 @@ all.
|
||||||
These procedures are part of every implementation that supports
|
These procedures are part of every implementation that supports
|
||||||
@c %R4%%
|
@c %R4%%
|
||||||
general
|
general
|
||||||
real numbers; they compute the usual transcendental functions. @samp{Log}
|
real numbers; they compute the usual transcendental functions. @samp{log}
|
||||||
computes the natural logarithm of @var{z} (not the base ten logarithm).
|
computes the natural logarithm of @var{z} (not the base ten logarithm).
|
||||||
@samp{Asin}, @samp{acos}, and @samp{atan} compute arcsine (sin^-1),
|
@samp{asin}, @samp{acos}, and @samp{atan} compute arcsine (sin^-1),
|
||||||
arccosine (cos^-1), and arctangent (tan^-1), respectively.
|
arccosine (cos^-1), and arctangent (tan^-1), respectively.
|
||||||
The two-argument variant of @samp{atan} computes @t{(angle
|
The two-argument variant of @samp{atan} computes @t{(angle
|
||||||
(make-rectangular @var{x} @var{y}))} (see below), even in implementations
|
(make-rectangular @var{x} @var{y}))} (see below), even in implementations
|
||||||
|
@ -5988,7 +5988,7 @@ unspecified value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vectors are heterogenous structures whose elements are indexed
|
Vectors are heterogeneous structures whose elements are indexed
|
||||||
by integers. A vector typically occupies less space than a list
|
by integers. A vector typically occupies less space than a list
|
||||||
of the same length, and the average time required to access a randomly
|
of the same length, and the average time required to access a randomly
|
||||||
chosen element is typically less for the vector than for the list.
|
chosen element is typically less for the vector than for the list.
|
||||||
|
|
|
@ -159,7 +159,7 @@ The @var{init} expressions are not allowed to refer to any of the
|
||||||
@var{variables}.
|
@var{variables}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
The other binding contructs are variations on the same theme: making new
|
The other binding constructs are variations on the same theme: making new
|
||||||
values, binding them to variables, and executing a body in that new,
|
values, binding them to variables, and executing a body in that new,
|
||||||
extended lexical context.
|
extended lexical context.
|
||||||
|
|
||||||
|
|
|
@ -909,7 +909,7 @@ Sets the element at position @var{idx} in the simple vector
|
||||||
Acquire a handle for the vector @var{vec} and return a pointer to the
|
Acquire a handle for the vector @var{vec} and return a pointer to the
|
||||||
elements of it. This pointer can only be used to read the elements of
|
elements of it. This pointer can only be used to read the elements of
|
||||||
@var{vec}. When @var{vec} is not a vector, an error is signaled. The
|
@var{vec}. When @var{vec} is not a vector, an error is signaled. The
|
||||||
handle mustr eventually be released with
|
handle must eventually be released with
|
||||||
@code{scm_array_handle_release}.
|
@code{scm_array_handle_release}.
|
||||||
|
|
||||||
The variables pointed to by @var{lenp} and @var{incp} are filled with
|
The variables pointed to by @var{lenp} and @var{incp} are filled with
|
||||||
|
@ -2377,7 +2377,7 @@ to be stored along side usual Scheme @code{SCM} values.
|
||||||
|
|
||||||
A vtable is a structure type, specifying its layout, and other
|
A vtable is a structure type, specifying its layout, and other
|
||||||
information. A vtable is actually itself a structure, but there's no
|
information. A vtable is actually itself a structure, but there's no
|
||||||
need to worray about that initially (@pxref{Vtable Contents}.)
|
need to worry about that initially (@pxref{Vtable Contents}.)
|
||||||
|
|
||||||
@deffn {Scheme Procedure} make-vtable fields [print]
|
@deffn {Scheme Procedure} make-vtable fields [print]
|
||||||
Create a new vtable.
|
Create a new vtable.
|
||||||
|
@ -2786,7 +2786,7 @@ of tools for using either association lists or hash tables.
|
||||||
@tpindex Alist
|
@tpindex Alist
|
||||||
@cindex association List
|
@cindex association List
|
||||||
@cindex alist
|
@cindex alist
|
||||||
@cindex aatabase
|
@cindex database
|
||||||
|
|
||||||
An association list is a conventional data structure that is often used
|
An association list is a conventional data structure that is often used
|
||||||
to implement simple key-value databases. It consists of a list of
|
to implement simple key-value databases. It consists of a list of
|
||||||
|
|
|
@ -148,7 +148,7 @@ and the last @var{clause} may have the form
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
All @var{datum}s must be distinct. First, @var{key} is evaluated. The
|
All @var{datum}s must be distinct. First, @var{key} is evaluated. The
|
||||||
the result of this evaluation is compared against all @var{datum}s using
|
result of this evaluation is compared against all @var{datum} values using
|
||||||
@code{eqv?}. When this comparison succeeds, the expression(s) following
|
@code{eqv?}. When this comparison succeeds, the expression(s) following
|
||||||
the @var{datum} are evaluated from left to right, returning the value of
|
the @var{datum} are evaluated from left to right, returning the value of
|
||||||
the last expression as the result of the @code{case} expression.
|
the last expression as the result of the @code{case} expression.
|
||||||
|
@ -1303,7 +1303,7 @@ frees the memory. But once the memory is freed, we can not get it
|
||||||
back on reentry. Thus reentry can not be allowed.
|
back on reentry. Thus reentry can not be allowed.
|
||||||
|
|
||||||
The consequence is that continuations become less useful when
|
The consequence is that continuations become less useful when
|
||||||
non-reenterable contexts are captured, but you don't need to worry
|
non-reentrant contexts are captured, but you don't need to worry
|
||||||
about that too much.
|
about that too much.
|
||||||
|
|
||||||
The context is ended either implicitly when a non-local exit happens,
|
The context is ended either implicitly when a non-local exit happens,
|
||||||
|
|
18
doc/ref/api-data.texi
Executable file → Normal file
18
doc/ref/api-data.texi
Executable file → Normal file
|
@ -1155,7 +1155,7 @@ Returns the magnitude or angle of @var{z} as a @code{double}.
|
||||||
The C arithmetic functions below always takes two arguments, while the
|
The C arithmetic functions below always takes two arguments, while the
|
||||||
Scheme functions can take an arbitrary number. When you need to
|
Scheme functions can take an arbitrary number. When you need to
|
||||||
invoke them with just one argument, for example to compute the
|
invoke them with just one argument, for example to compute the
|
||||||
equivalent od @code{(- x)}, pass @code{SCM_UNDEFINED} as the second
|
equivalent of @code{(- x)}, pass @code{SCM_UNDEFINED} as the second
|
||||||
one: @code{scm_difference (x, SCM_UNDEFINED)}.
|
one: @code{scm_difference (x, SCM_UNDEFINED)}.
|
||||||
|
|
||||||
@c begin (texi-doc-string "guile" "+")
|
@c begin (texi-doc-string "guile" "+")
|
||||||
|
@ -1327,7 +1327,7 @@ including complex numbers.
|
||||||
@c begin (texi-doc-string "guile" "sqrt")
|
@c begin (texi-doc-string "guile" "sqrt")
|
||||||
@deffn {Scheme Procedure} sqrt z
|
@deffn {Scheme Procedure} sqrt z
|
||||||
Return the square root of @var{z}. Of the two possible roots
|
Return the square root of @var{z}. Of the two possible roots
|
||||||
(positive and negative), the one with the a positive real part is
|
(positive and negative), the one with a positive real part is
|
||||||
returned, or if that's zero then a positive imaginary part. Thus,
|
returned, or if that's zero then a positive imaginary part. Thus,
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@ -2989,7 +2989,7 @@ Convert the string @var{str} into a list of characters.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-split str chr
|
@deffn {Scheme Procedure} string-split str chr
|
||||||
@deffnx {C Function} scm_string_split (str, chr)
|
@deffnx {C Function} scm_string_split (str, chr)
|
||||||
Split the string @var{str} into the a list of the substrings delimited
|
Split the string @var{str} into a list of substrings delimited
|
||||||
by appearances of the character @var{chr}. Note that an empty substring
|
by appearances of the character @var{chr}. Note that an empty substring
|
||||||
between separator characters will result in an empty string in the
|
between separator characters will result in an empty string in the
|
||||||
result list.
|
result list.
|
||||||
|
@ -3422,12 +3422,12 @@ case-insensitively.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
|
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
|
||||||
@deffnx {C Function} scm_substring_hash (s, bound, start, end)
|
@deffnx {C Function} scm_substring_hash (s, bound, start, end)
|
||||||
Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
|
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
|
||||||
@deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
|
@deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
|
||||||
Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
Because the same visual appearance of an abstract Unicode character can
|
Because the same visual appearance of an abstract Unicode character can
|
||||||
|
@ -3449,7 +3449,7 @@ Unicode Standard; and composition, which performs the converse.
|
||||||
|
|
||||||
There are two decomposition operations. ``Canonical decomposition''
|
There are two decomposition operations. ``Canonical decomposition''
|
||||||
produces character sequences that share the same visual appearance as
|
produces character sequences that share the same visual appearance as
|
||||||
the original characters, while ``compatiblity decomposition'' produces
|
the original characters, while ``compatibility decomposition'' produces
|
||||||
ones whose visual appearances may differ from the originals but which
|
ones whose visual appearances may differ from the originals but which
|
||||||
represent the same abstract character.
|
represent the same abstract character.
|
||||||
|
|
||||||
|
@ -4069,7 +4069,7 @@ If a character in @var{str} cannot be represented in the locale encoding
|
||||||
of the current output port, the port conversion strategy of the current
|
of the current output port, the port conversion strategy of the current
|
||||||
output port will determine the result, @xref{Ports}. If output port's
|
output port will determine the result, @xref{Ports}. If output port's
|
||||||
conversion strategy is @code{error}, an error will be raised. If it is
|
conversion strategy is @code{error}, an error will be raised. If it is
|
||||||
@code{subsitute}, a replacement character, such as a question mark, will
|
@code{substitute}, a replacement character, such as a question mark, will
|
||||||
be inserted in its place. If it is @code{escape}, a hex escape will be
|
be inserted in its place. If it is @code{escape}, a hex escape will be
|
||||||
inserted in its place.
|
inserted in its place.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
@ -5128,8 +5128,8 @@ Guile currently retains some elements of the traditional structure in
|
||||||
case they turn out to be useful when implementing translators for other
|
case they turn out to be useful when implementing translators for other
|
||||||
languages, in particular Emacs Lisp.
|
languages, in particular Emacs Lisp.
|
||||||
|
|
||||||
Specifically, Guile symbols have two extra slots. for a symbol's
|
Specifically, Guile symbols have two extra slots, one for a symbol's
|
||||||
property list, and for its ``function value.'' The following procedures
|
property list, and one for its ``function value.'' The following procedures
|
||||||
are provided to access these slots.
|
are provided to access these slots.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} symbol-fref symbol
|
@deffn {Scheme Procedure} symbol-fref symbol
|
||||||
|
|
|
@ -1030,7 +1030,7 @@ of an application of @var{proc}.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} trap-instructions-in-dynamic-extent proc @
|
@deffn {Scheme Procedure} trap-instructions-in-dynamic-extent proc @
|
||||||
next-handler [#:current-frame] [#:vm] [#:closure?]
|
next-handler [#:current-frame] [#:vm] [#:closure?]
|
||||||
A trap that calls @var{next-handler} for all retired intructions within
|
A trap that calls @var{next-handler} for all retired instructions within
|
||||||
the dynamic extent of a call to @var{proc}.
|
the dynamic extent of a call to @var{proc}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
|
@ -871,7 +871,7 @@ requested, @code{open-file} throws an exception.
|
||||||
When the file is opened, this procedure will scan for a coding
|
When the file is opened, this procedure will scan for a coding
|
||||||
declaration (@pxref{Character Encoding of Source Files}). If present
|
declaration (@pxref{Character Encoding of Source Files}). If present
|
||||||
will use that encoding for interpreting the file. Otherwise, the
|
will use that encoding for interpreting the file. Otherwise, the
|
||||||
port's encoding will be used. To supress this behavior, open
|
port's encoding will be used. To suppress this behavior, open
|
||||||
the file in binary mode and then set the port encoding explicitly
|
the file in binary mode and then set the port encoding explicitly
|
||||||
using @code{set-port-encoding!}.
|
using @code{set-port-encoding!}.
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ Determine whether @var{obj} is a port that is related to a file.
|
||||||
@cindex String port
|
@cindex String port
|
||||||
@cindex Port, string
|
@cindex Port, string
|
||||||
|
|
||||||
The following allow string ports to be opened by analogy to R4R*
|
The following allow string ports to be opened by analogy to R4RS
|
||||||
file port facilities:
|
file port facilities:
|
||||||
|
|
||||||
With string ports, the port-encoding is treated differently than other
|
With string ports, the port-encoding is treated differently than other
|
||||||
|
|
|
@ -299,7 +299,7 @@ expression.
|
||||||
|
|
||||||
This property is sometimes known as @dfn{hygiene}, and it does aid in code
|
This property is sometimes known as @dfn{hygiene}, and it does aid in code
|
||||||
cleanliness. In your macro definitions, you can feel free to introduce temporary
|
cleanliness. In your macro definitions, you can feel free to introduce temporary
|
||||||
variables, without worrying about inadvertantly introducing bindings into the
|
variables, without worrying about inadvertently introducing bindings into the
|
||||||
macro expansion.
|
macro expansion.
|
||||||
|
|
||||||
Consider the definition of @code{my-or} from the previous section:
|
Consider the definition of @code{my-or} from the previous section:
|
||||||
|
@ -461,7 +461,7 @@ found @var{exp} referenced outside a @code{syntax} form.
|
||||||
|
|
||||||
Since @code{syntax} appears frequently in macro-heavy code, it has a special
|
Since @code{syntax} appears frequently in macro-heavy code, it has a special
|
||||||
reader macro: @code{#'}. @code{#'foo} is transformed by the reader into
|
reader macro: @code{#'}. @code{#'foo} is transformed by the reader into
|
||||||
@code{(syntax foo)}, just as @code{'foo} is tranformed into @code{(quote foo)}.
|
@code{(syntax foo)}, just as @code{'foo} is transformed into @code{(quote foo)}.
|
||||||
|
|
||||||
The pattern language used by @code{syntax-case} is conveniently the same
|
The pattern language used by @code{syntax-case} is conveniently the same
|
||||||
language used by @code{syntax-rules}. Given this, Guile actually defines
|
language used by @code{syntax-rules}. Given this, Guile actually defines
|
||||||
|
@ -763,7 +763,7 @@ macro. @code{syntax-rules} provides some syntax to effect this transformation
|
||||||
more easily.
|
more easily.
|
||||||
|
|
||||||
@deffn {Syntax} identifier-syntax exp
|
@deffn {Syntax} identifier-syntax exp
|
||||||
Returns a macro transformer that will replace occurences of the macro with
|
Returns a macro transformer that will replace occurrences of the macro with
|
||||||
@var{exp}.
|
@var{exp}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -814,7 +814,7 @@ bar-alias @result{} 30
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
There is an extension to identifer-syntax which allows it to handle the
|
There is an extension to identifier-syntax which allows it to handle the
|
||||||
@code{set!} case as well:
|
@code{set!} case as well:
|
||||||
|
|
||||||
@deffn {Syntax} identifier-syntax (var exp1) ((set! var val) exp2)
|
@deffn {Syntax} identifier-syntax (var exp1) ((set! var val) exp2)
|
||||||
|
|
|
@ -489,7 +489,7 @@ take @code{lambda*}-style extended parameter lists, where @code{#:optional},
|
||||||
semantics. Here is an example of a macro with an optional argument:
|
semantics. Here is an example of a macro with an optional argument:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(defmacro* transmorgify (a #:optional b)
|
(defmacro* transmogrify (a #:optional b)
|
||||||
(a 1))
|
(a 1))
|
||||||
@end lisp
|
@end lisp
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
|
@ -743,7 +743,7 @@ Set @var{fluids} to @var{values} temporary, and call @var{thunk}.
|
||||||
@var{fluids} must be a list of fluids and @var{values} must be the
|
@var{fluids} must be a list of fluids and @var{values} must be the
|
||||||
same number of their values to be applied. Each substitution is done
|
same number of their values to be applied. Each substitution is done
|
||||||
in the order given. @var{thunk} must be a procedure with no argument.
|
in the order given. @var{thunk} must be a procedure with no argument.
|
||||||
it is called inside a @code{dynamic-wind} and the fluids are
|
It is called inside a @code{dynamic-wind} and the fluids are
|
||||||
set/restored when control enter or leaves the established dynamic
|
set/restored when control enter or leaves the established dynamic
|
||||||
extent.
|
extent.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
|
@ -568,7 +568,7 @@ as @var{array}, if used as the @var{prototype} for
|
||||||
|
|
||||||
@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
|
@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
|
||||||
@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
|
@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
|
||||||
Call @var{thunk} with a new dynamic state and withina continuation barrier. The @var{handler} catches allotherwise uncaught throws and executes within the samedynamic context as @var{thunk}.
|
Call @var{thunk} with a new dynamic state and within a continuation barrier. The @var{handler} catches all otherwise uncaught throws and executes within the same dynamic context as @var{thunk}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} dynamic-root
|
@deffn {Scheme Procedure} dynamic-root
|
||||||
|
@ -587,13 +587,13 @@ Return @code{#t} if @var{obj} is a uniform vector.
|
||||||
@deffn {Scheme Procedure} uniform-vector-ref v idx
|
@deffn {Scheme Procedure} uniform-vector-ref v idx
|
||||||
@deffnx {C Function} scm_uniform_vector_ref (v, idx)
|
@deffnx {C Function} scm_uniform_vector_ref (v, idx)
|
||||||
Return the element at index @var{idx} of the
|
Return the element at index @var{idx} of the
|
||||||
homogenous numeric vector @var{v}.
|
homogeneous numeric vector @var{v}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} uniform-vector-set! v idx val
|
@deffn {Scheme Procedure} uniform-vector-set! v idx val
|
||||||
@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
|
@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
|
||||||
Set the element at index @var{idx} of the
|
Set the element at index @var{idx} of the
|
||||||
homogenous numeric vector @var{v} to @var{val}.
|
homogeneous numeric vector @var{v} to @var{val}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} uniform-vector->list uvec
|
@deffn {Scheme Procedure} uniform-vector->list uvec
|
||||||
|
|
|
@ -432,7 +432,7 @@ copies any pairs in the cars of the input lists.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} copy-tree obj
|
@deffn {Scheme Procedure} copy-tree obj
|
||||||
@deffnx {C Function} scm_copy_tree (obj)
|
@deffnx {C Function} scm_copy_tree (obj)
|
||||||
Recursively copy the data tree that is bound to @var{obj}, and return a
|
Recursively copy the data tree that is bound to @var{obj}, and return
|
||||||
the new data structure. @code{copy-tree} recurses down the
|
the new data structure. @code{copy-tree} recurses down the
|
||||||
contents of both pairs and vectors (since both cons cells and vector
|
contents of both pairs and vectors (since both cons cells and vector
|
||||||
cells may point to arbitrary objects), and stops recursing when it hits
|
cells may point to arbitrary objects), and stops recursing when it hits
|
||||||
|
|
|
@ -295,7 +295,7 @@ Properties}, for more information.
|
||||||
|
|
||||||
Although Tree-IL objects are represented internally using records,
|
Although Tree-IL objects are represented internally using records,
|
||||||
there is also an equivalent S-expression external representation for
|
there is also an equivalent S-expression external representation for
|
||||||
each kind of Tree-IL. For example, an the S-expression representation
|
each kind of Tree-IL. For example, the S-expression representation
|
||||||
of @code{#<const src: #f exp: 3>} expression would be:
|
of @code{#<const src: #f exp: 3>} expression would be:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@ -418,7 +418,7 @@ argument, or @code{#f}.
|
||||||
(@var{keyword} @var{name} @var{var}) ...)}, where @var{keyword} is the
|
(@var{keyword} @var{name} @var{var}) ...)}, where @var{keyword} is the
|
||||||
keyword corresponding to the argument named @var{name}, and whose
|
keyword corresponding to the argument named @var{name}, and whose
|
||||||
corresponding gensym is @var{var}. @var{inits} are tree-il expressions
|
corresponding gensym is @var{var}. @var{inits} are tree-il expressions
|
||||||
corresponding to all of the optional and keyword argumens, evaluated
|
corresponding to all of the optional and keyword arguments, evaluated
|
||||||
to bind variables whose value is not supplied by the procedure caller.
|
to bind variables whose value is not supplied by the procedure caller.
|
||||||
Each @var{init} expression is evaluated in the lexical context of
|
Each @var{init} expression is evaluated in the lexical context of
|
||||||
previously bound variables, from left to right.
|
previously bound variables, from left to right.
|
||||||
|
@ -877,7 +877,7 @@ next step.
|
||||||
The compiler also needs help at the top end, enhancing the Scheme that
|
The compiler also needs help at the top end, enhancing the Scheme that
|
||||||
it knows to also understand R6RS, and adding new high-level compilers.
|
it knows to also understand R6RS, and adding new high-level compilers.
|
||||||
We have JavaScript and Emacs Lisp mostly complete, but they could use
|
We have JavaScript and Emacs Lisp mostly complete, but they could use
|
||||||
some love; Lua would be nice as well, butq whatever language it is
|
some love; Lua would be nice as well, but whatever language it is
|
||||||
that strikes your fancy would be welcome too.
|
that strikes your fancy would be welcome too.
|
||||||
|
|
||||||
Compilers are for hacking, not for admiring or for complaining about.
|
Compilers are for hacking, not for admiring or for complaining about.
|
||||||
|
|
|
@ -535,7 +535,7 @@ other. A better solution is to use virtual slots, like this:
|
||||||
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
In this class definition, the magniture @code{m} and angle @code{a}
|
In this class definition, the magnitude @code{m} and angle @code{a}
|
||||||
slots are virtual, and are calculated, when referenced, from the normal
|
slots are virtual, and are calculated, when referenced, from the normal
|
||||||
(i.e. @code{#:allocation #:instance}) slots @code{r} and @code{i}, by
|
(i.e. @code{#:allocation #:instance}) slots @code{r} and @code{i}, by
|
||||||
calling the function defined in the relevant @code{#:slot-ref} option.
|
calling the function defined in the relevant @code{#:slot-ref} option.
|
||||||
|
@ -619,7 +619,7 @@ different sets of specializing argument classes; for example:
|
||||||
@lisp
|
@lisp
|
||||||
(define-method (+ (x <string>) (y <string)) ...)
|
(define-method (+ (x <string>) (y <string)) ...)
|
||||||
(define-method (+ (x <matrix>) (y <matrix>)) ...)
|
(define-method (+ (x <matrix>) (y <matrix>)) ...)
|
||||||
(define-method (+ (f <fish>) (b <bicyle>)) ...)
|
(define-method (+ (f <fish>) (b <bicycle>)) ...)
|
||||||
(define-method (+ (a <foo>) (b <bar>) (c <baz>)) ...)
|
(define-method (+ (a <foo>) (b <bar>) (c <baz>)) ...)
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,7 @@ modified in another thread while the loop iterates over it. Thus, while
|
||||||
copying its elements into the vector, the list might get longer or
|
copying its elements into the vector, the list might get longer or
|
||||||
shorter. For this reason, the loop must check both that it doesn't
|
shorter. For this reason, the loop must check both that it doesn't
|
||||||
overrun the vector (@code{SCM_SIMPLE_VECTOR_SET} does no range-checking)
|
overrun the vector (@code{SCM_SIMPLE_VECTOR_SET} does no range-checking)
|
||||||
and that it doesn't overrung the list (@code{SCM_CAR} and @code{SCM_CDR}
|
and that it doesn't overrun the list (@code{SCM_CAR} and @code{SCM_CDR}
|
||||||
likewise do no type checking).
|
likewise do no type checking).
|
||||||
|
|
||||||
It is safe to use @code{SCM_CAR} and @code{SCM_CDR} on the local
|
It is safe to use @code{SCM_CAR} and @code{SCM_CDR} on the local
|
||||||
|
|
|
@ -91,11 +91,11 @@ dots.}, or in the worst case, displayed as @nicode{#}.
|
||||||
@deffn {Scheme Procedure} truncated-print obj [port] [keyword-options]
|
@deffn {Scheme Procedure} truncated-print obj [port] [keyword-options]
|
||||||
Print @var{obj}, truncating the output, if necessary, to make it fit
|
Print @var{obj}, truncating the output, if necessary, to make it fit
|
||||||
into @var{width} characters. By default, @var{x} will be printed using
|
into @var{width} characters. By default, @var{x} will be printed using
|
||||||
@code{write}, though that behavior can be overriden via the
|
@code{write}, though that behavior can be overridden via the
|
||||||
@var{display?} keyword argument.
|
@var{display?} keyword argument.
|
||||||
|
|
||||||
The default behaviour is to print depth-first, meaning that the entire
|
The default behaviour is to print depth-first, meaning that the entire
|
||||||
remaining width will be available to each sub-expressoin of @var{x} --
|
remaining width will be available to each sub-expression of @var{x} --
|
||||||
e.g., if @var{x} is a vector, each member of @var{x}. One can attempt to
|
e.g., if @var{x} is a vector, each member of @var{x}. One can attempt to
|
||||||
``ration'' the available width, trying to allocate it equally to each
|
``ration'' the available width, trying to allocate it equally to each
|
||||||
sub-expression, via the @var{breadth-first?} keyword argument.
|
sub-expression, via the @var{breadth-first?} keyword argument.
|
||||||
|
@ -1260,7 +1260,7 @@ The return value from @code{nftw} is @code{#t} if it ran to
|
||||||
completion, or otherwise the non-@code{#t} value from @var{proc} which
|
completion, or otherwise the non-@code{#t} value from @var{proc} which
|
||||||
caused the stop.
|
caused the stop.
|
||||||
|
|
||||||
@c For reference, one reason not to esacpe is that the current
|
@c For reference, one reason not to escape is that the current
|
||||||
@c directory is not saved and restored with dynamic-wind. Maybe
|
@c directory is not saved and restored with dynamic-wind. Maybe
|
||||||
@c changing that would be enough to allow escaping.
|
@c changing that would be enough to allow escaping.
|
||||||
@c
|
@c
|
||||||
|
|
|
@ -2456,7 +2456,7 @@ When given, @var{hint_family} should specify the requested
|
||||||
address family, e.g., @code{AF_INET6}. Similarly,
|
address family, e.g., @code{AF_INET6}. Similarly,
|
||||||
@var{hint_socktype} should specify the requested socket type
|
@var{hint_socktype} should specify the requested socket type
|
||||||
(e.g., @code{SOCK_DGRAM}), and @var{hint_protocol} should
|
(e.g., @code{SOCK_DGRAM}), and @var{hint_protocol} should
|
||||||
specify the requested protocol (its value is interpretered
|
specify the requested protocol (its value is interpreted
|
||||||
as in calls to @code{socket}).
|
as in calls to @code{socket}).
|
||||||
|
|
||||||
On error, an exception with key @code{getaddrinfo-error} is
|
On error, an exception with key @code{getaddrinfo-error} is
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ called on exceptions thrown by the corresponding @code{raise} procedure.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} with-exception-handler handler thunk
|
@deffn {Scheme Procedure} with-exception-handler handler thunk
|
||||||
Installs @var{handler}, which must be a procedure taking one argument,
|
Installs @var{handler}, which must be a procedure taking one argument,
|
||||||
as the current exception handler during the invokation of @var{thunk}, a
|
as the current exception handler during the invocation of @var{thunk}, a
|
||||||
procedure taking zero arguments. The handler in place at the time
|
procedure taking zero arguments. The handler in place at the time
|
||||||
@code{with-exception-handler} is called is made current again once
|
@code{with-exception-handler} is called is made current again once
|
||||||
either @var{thunk} returns or @var{handler} is invoked after an
|
either @var{thunk} returns or @var{handler} is invoked after an
|
||||||
|
@ -1290,7 +1290,7 @@ condition in a compound condition.
|
||||||
@deffn {Condition Type} &who
|
@deffn {Condition Type} &who
|
||||||
@deffnx {Scheme Procedure} make-who-condition who
|
@deffnx {Scheme Procedure} make-who-condition who
|
||||||
@deffnx {Scheme Procedure} who-condition? obj
|
@deffnx {Scheme Procedure} who-condition? obj
|
||||||
@deffnx {Scheme Procedure} condiction-who condition
|
@deffnx {Scheme Procedure} condition-who condition
|
||||||
A base type used for storing the identity, a string or symbol, of the
|
A base type used for storing the identity, a string or symbol, of the
|
||||||
entity responsible for another condition in a compound condition.
|
entity responsible for another condition in a compound condition.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1544,7 +1544,7 @@ value, and the maximum fixnum value.
|
||||||
@deffnx {Scheme Procedure} fx<=? fx1 fx2 fx3 ...
|
@deffnx {Scheme Procedure} fx<=? fx1 fx2 fx3 ...
|
||||||
These procedures return @code{#t} if their fixnum arguments are
|
These procedures return @code{#t} if their fixnum arguments are
|
||||||
(respectively): equal, monotonically increasing, monotonically
|
(respectively): equal, monotonically increasing, monotonically
|
||||||
decreasing, monotonically nondecreasing, or monotonically nonincrasing;
|
decreasing, monotonically nondecreasing, or monotonically nonincreasing;
|
||||||
@code{#f} otherwise.
|
@code{#f} otherwise.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1716,7 +1716,7 @@ Returns the flonum that is numerically closest to the real number
|
||||||
@deffnx {Scheme Procedure} fl>=? fl1 fl2 fl3 ...
|
@deffnx {Scheme Procedure} fl>=? fl1 fl2 fl3 ...
|
||||||
These procedures return @code{#t} if their flonum arguments are
|
These procedures return @code{#t} if their flonum arguments are
|
||||||
(respectively): equal, monotonically increasing, monotonically
|
(respectively): equal, monotonically increasing, monotonically
|
||||||
decreasing, monotonically nondecreasing, or monotonically nonincrasing;
|
decreasing, monotonically nondecreasing, or monotonically nonincreasing;
|
||||||
@code{#f} otherwise.
|
@code{#f} otherwise.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1915,7 +1915,7 @@ in the direction of more significant bits.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} bitwise-reverse-bit-field ei1 ei2 ei3
|
@deffn {Scheme Procedure} bitwise-reverse-bit-field ei1 ei2 ei3
|
||||||
Returns the result of reversing the order of the bits of @var{e1}
|
Returns the result of reversing the order of the bits of @var{ei1}
|
||||||
between position @var{ei2} (inclusive) and position @var{ei3}
|
between position @var{ei2} (inclusive) and position @var{ei3}
|
||||||
(exclusive).
|
(exclusive).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
|
@ -55,7 +55,7 @@ Library}):
|
||||||
@item
|
@item
|
||||||
Unpack SLIB and install it using @code{make install} from its directory.
|
Unpack SLIB and install it using @code{make install} from its directory.
|
||||||
By default, this will install SLIB in @file{/usr/local/lib/slib/}.
|
By default, this will install SLIB in @file{/usr/local/lib/slib/}.
|
||||||
Running @code{make installinfo} installs its documentation, by default
|
Running @code{make install-info} installs its documentation, by default
|
||||||
under @file{/usr/local/info/}.
|
under @file{/usr/local/info/}.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
|
|
@ -391,13 +391,13 @@ Return a list containing all but the first @var{i} elements of
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} take-right lst i
|
@deffn {Scheme Procedure} take-right lst i
|
||||||
Return the a list containing the @var{i} last elements of @var{lst}.
|
Return a list containing the @var{i} last elements of @var{lst}.
|
||||||
The return shares a common tail with @var{lst}.
|
The return shares a common tail with @var{lst}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} drop-right lst i
|
@deffn {Scheme Procedure} drop-right lst i
|
||||||
@deffnx {Scheme Procedure} drop-right! lst i
|
@deffnx {Scheme Procedure} drop-right! lst i
|
||||||
Return the a list containing all but the @var{i} last elements of
|
Return a list containing all but the @var{i} last elements of
|
||||||
@var{lst}.
|
@var{lst}.
|
||||||
|
|
||||||
@code{drop-right} always returns a new list, even when @var{i} is
|
@code{drop-right} always returns a new list, even when @var{i} is
|
||||||
|
@ -633,7 +633,7 @@ Determines when to stop unfolding.
|
||||||
Maps each seed value to the corresponding list element.
|
Maps each seed value to the corresponding list element.
|
||||||
|
|
||||||
@item g
|
@item g
|
||||||
Maps each seed value to next seed valu.
|
Maps each seed value to next seed value.
|
||||||
|
|
||||||
@item seed
|
@item seed
|
||||||
The state value for the unfold.
|
The state value for the unfold.
|
||||||
|
@ -665,7 +665,7 @@ Determines when to stop unfolding.
|
||||||
Maps each seed value to the corresponding list element.
|
Maps each seed value to the corresponding list element.
|
||||||
|
|
||||||
@item g
|
@item g
|
||||||
Maps each seed value to next seed valu.
|
Maps each seed value to next seed value.
|
||||||
|
|
||||||
@item seed
|
@item seed
|
||||||
The state value for the unfold.
|
The state value for the unfold.
|
||||||
|
@ -1678,7 +1678,7 @@ at the following odd index.
|
||||||
@deftypefnx {C Function} {const scm_t_int32 *} scm_s32vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const scm_t_int32 *} scm_s32vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const scm_t_uint64 *} scm_u64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const scm_t_uint64 *} scm_u64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const scm_t_int64 *} scm_s64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const scm_t_int64 *} scm_s64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const float *} scm_f23vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const float *} scm_f32vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const double *} scm_f64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const double *} scm_f64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const float *} scm_c32vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const float *} scm_c32vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {const double *} scm_c64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {const double *} scm_c64vector_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
|
@ -1695,7 +1695,7 @@ indicated kind.
|
||||||
@deftypefnx {C Function} {scm_t_int32 *} scm_s32vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {scm_t_int32 *} scm_s32vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {scm_t_uint64 *} scm_u64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {scm_t_uint64 *} scm_u64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {scm_t_int64 *} scm_s64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {scm_t_int64 *} scm_s64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {float *} scm_f23vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {float *} scm_f32vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {double *} scm_f64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {double *} scm_f64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {float *} scm_c32vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {float *} scm_c32vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
@deftypefnx {C Function} {double *} scm_c64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
@deftypefnx {C Function} {double *} scm_c64vector_writable_elements (SCM vec, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp)
|
||||||
|
@ -1884,7 +1884,7 @@ The @var{fieldname}s provide the names for the record fields, as per
|
||||||
the core @code{record-type-fields} etc, and are referred to in the
|
the core @code{record-type-fields} etc, and are referred to in the
|
||||||
subsequent accessor/modifier forms.
|
subsequent accessor/modifier forms.
|
||||||
|
|
||||||
@var{predictate} is bound to a function to be called as
|
@var{predicate} is bound to a function to be called as
|
||||||
@code{(@var{predicate} obj)}. It returns @code{#t} or @code{#f}
|
@code{(@var{predicate} obj)}. It returns @code{#t} or @code{#f}
|
||||||
according to whether @var{obj} is a record of this type.
|
according to whether @var{obj} is a record of this type.
|
||||||
|
|
||||||
|
@ -4117,7 +4117,7 @@ stream-filter algorithm, expressed in a hypothetical lazy language as
|
||||||
(stream-filter p? t)))))
|
(stream-filter p? t)))))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
This algorithm can be espressed as follows in Scheme:
|
This algorithm can be expressed as follows in Scheme:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(define (stream-filter p? s)
|
(define (stream-filter p? s)
|
||||||
|
|
|
@ -298,7 +298,7 @@ basic arithmetic operations, which are represented by the XML elements
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
Using the catamorphism feature of @code{sxml-match}, a more concise version of
|
Using the catamorphism feature of @code{sxml-match}, a more concise version of
|
||||||
@code{simple-eval} can be written. The pattern @code{,[x]} recusively invokes
|
@code{simple-eval} can be written. The pattern @code{,[x]} recursively invokes
|
||||||
the pattern matcher on the value bound in this position.
|
the pattern matcher on the value bound in this position.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
|
|
|
@ -252,7 +252,7 @@ functions.
|
||||||
@node Writing your own snarfing macros
|
@node Writing your own snarfing macros
|
||||||
@subsubsection Writing your own snarfing macros
|
@subsubsection Writing your own snarfing macros
|
||||||
|
|
||||||
When you want to use the general snarfing machanism, but none of the
|
When you want to use the general snarfing mechanism, but none of the
|
||||||
provided macros fits your need, you can use the macro
|
provided macros fits your need, you can use the macro
|
||||||
@code{SCM_SNARF_INIT}.
|
@code{SCM_SNARF_INIT}.
|
||||||
|
|
||||||
|
|
|
@ -746,7 +746,7 @@ Jump to @var{offset} if the number of arguments is not equal to, greater
|
||||||
than, or less than @var{n}. @var{n} is encoded over two bytes, and
|
than, or less than @var{n}. @var{n} is encoded over two bytes, and
|
||||||
@var{offset} has the normal three-byte encoding.
|
@var{offset} has the normal three-byte encoding.
|
||||||
|
|
||||||
These instructions are used to implement muliple arities, as in
|
These instructions are used to implement multiple arities, as in
|
||||||
@code{case-lambda}. @xref{Case-lambda}, for more information.
|
@code{case-lambda}. @xref{Case-lambda}, for more information.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -803,7 +803,7 @@ keyword arguments to their local variable indices.
|
||||||
There are two bitflags that affect the parser, @code{allow-other-keys?}
|
There are two bitflags that affect the parser, @code{allow-other-keys?}
|
||||||
(@code{0x1}) and @code{rest?} (@code{0x2}). Unless
|
(@code{0x1}) and @code{rest?} (@code{0x2}). Unless
|
||||||
@code{allow-other-keys?} is set, the parser will signal an error if an
|
@code{allow-other-keys?} is set, the parser will signal an error if an
|
||||||
unknown key is found. If @code{rest?} is set, errors parsing the the
|
unknown key is found. If @code{rest?} is set, errors parsing the
|
||||||
keyword arguments will be ignored, as a later @code{bind-rest}
|
keyword arguments will be ignored, as a later @code{bind-rest}
|
||||||
instruction will collect all of the tail arguments, including the
|
instruction will collect all of the tail arguments, including the
|
||||||
keywords, into a list. Otherwise if the keyword arguments are invalid,
|
keywords, into a list. Otherwise if the keyword arguments are invalid,
|
||||||
|
@ -940,7 +940,7 @@ Jump to @var{offset} if the object on the stack is not @code{'()}.
|
||||||
@subsubsection Data Constructor Instructions
|
@subsubsection Data Constructor Instructions
|
||||||
|
|
||||||
These instructions push simple immediate values onto the stack,
|
These instructions push simple immediate values onto the stack,
|
||||||
or constructo compound data structures from values the stack.
|
or construct compound data structures from values on the stack.
|
||||||
|
|
||||||
@deffn Instruction make-int8 value
|
@deffn Instruction make-int8 value
|
||||||
Push @var{value}, an 8-bit integer, onto the stack.
|
Push @var{value}, an 8-bit integer, onto the stack.
|
||||||
|
@ -1067,7 +1067,7 @@ encoded in the ``latin1'' locale.
|
||||||
@end deffn
|
@end deffn
|
||||||
@deffn Instruction load-wide-string length
|
@deffn Instruction load-wide-string length
|
||||||
Load a UTF-32 string from the instruction stream. @var{length} is the
|
Load a UTF-32 string from the instruction stream. @var{length} is the
|
||||||
length in bytes, not in codepoints
|
length in bytes, not in codepoints.
|
||||||
@end deffn
|
@end deffn
|
||||||
@deffn Instruction load-symbol length
|
@deffn Instruction load-symbol length
|
||||||
Load a symbol from the instruction stream. The symbol is assumed to be
|
Load a symbol from the instruction stream. The symbol is assumed to be
|
||||||
|
@ -1228,7 +1228,7 @@ Since most of these operations are historically implemented as C
|
||||||
primitives, not inlining them would entail constantly calling out from
|
primitives, not inlining them would entail constantly calling out from
|
||||||
the VM to the interpreter, which has some costs---registers must be
|
the VM to the interpreter, which has some costs---registers must be
|
||||||
saved, the interpreter has to dispatch, called procedures have to do
|
saved, the interpreter has to dispatch, called procedures have to do
|
||||||
much typechecking, etc. It's much more efficient to inline these
|
much type checking, etc. It's much more efficient to inline these
|
||||||
operations in the virtual machine itself.
|
operations in the virtual machine itself.
|
||||||
|
|
||||||
All of these instructions pop their arguments from the stack and push
|
All of these instructions pop their arguments from the stack and push
|
||||||
|
|
|
@ -762,7 +762,7 @@ list is itself a list, in the same format as @code{content-type}.
|
||||||
(parse-header 'accept "text/html,text/plain;charset=utf-8")
|
(parse-header 'accept "text/html,text/plain;charset=utf-8")
|
||||||
@result{} ((text/html) (text/plain (charset . "utf-8")))
|
@result{} ((text/html) (text/plain (charset . "utf-8")))
|
||||||
@end example
|
@end example
|
||||||
Preference is expressed with qualitiy values:
|
Preference is expressed with quality values:
|
||||||
@example
|
@example
|
||||||
(parse-header 'accept "text/html;q=0.8,text/plain;q=0.6")
|
(parse-header 'accept "text/html;q=0.8,text/plain;q=0.6")
|
||||||
@result{} ((text/html (q . 800)) (text/plain (q . 600)))
|
@result{} ((text/html (q . 800)) (text/plain (q . 600)))
|
||||||
|
@ -1008,7 +1008,7 @@ A string identifying the server.
|
||||||
|
|
||||||
@deftypevr {HTTP Header} *|List vary
|
@deftypevr {HTTP Header} *|List vary
|
||||||
A set of request headers that were used in computing this response.
|
A set of request headers that were used in computing this response.
|
||||||
Used to indicate that server-side content negotation was performed, for
|
Used to indicate that server-side content negotiation was performed, for
|
||||||
example in response to the @code{accept-language} header. Can also be
|
example in response to the @code{accept-language} header. Can also be
|
||||||
the symbol @code{*}, indicating that all headers were considered.
|
the symbol @code{*}, indicating that all headers were considered.
|
||||||
@example
|
@example
|
||||||
|
|
|
@ -80,7 +80,7 @@ we document the Scheme procedure only, and call it a "Primitive". If a
|
||||||
Scheme function is marked as a primitive, you can derive the name of the
|
Scheme function is marked as a primitive, you can derive the name of the
|
||||||
corresponding C function by changing @code{-} to @code{_}, @code{!} to
|
corresponding C function by changing @code{-} to @code{_}, @code{!} to
|
||||||
@code{_x}, @code{?} to @code{_p}, and prepending @code{scm_}. The C
|
@code{_x}, @code{?} to @code{_p}, and prepending @code{scm_}. The C
|
||||||
function's arguments will be all of the Scheme procedure's argumements,
|
function's arguments will be all of the Scheme procedure's arguments,
|
||||||
both required and optional; if the Scheme procedure takes a ``rest''
|
both required and optional; if the Scheme procedure takes a ``rest''
|
||||||
argument, that will be a final argument to the C function. The C
|
argument, that will be a final argument to the C function. The C
|
||||||
function's arguments, as well as its return type, will be @code{SCM}.
|
function's arguments, as well as its return type, will be @code{SCM}.
|
||||||
|
@ -735,7 +735,7 @@ changes the bindings of @var{local} or @var{imported}, those changes
|
||||||
will be visible in @var{eval}.
|
will be visible in @var{eval}.
|
||||||
|
|
||||||
Since most Scheme evaluation takes place in @var{eval} environments,
|
Since most Scheme evaluation takes place in @var{eval} environments,
|
||||||
they transparenty cache the bindings received from @var{local} and
|
they transparently cache the bindings received from @var{local} and
|
||||||
@var{imported}. Thus, the first time the program looks up a symbol in
|
@var{imported}. Thus, the first time the program looks up a symbol in
|
||||||
@var{eval}, @var{eval} may make calls to @var{local} or @var{imported}
|
@var{eval}, @var{eval} may make calls to @var{local} or @var{imported}
|
||||||
to find their bindings, but subsequent references to that symbol will be
|
to find their bindings, but subsequent references to that symbol will be
|
||||||
|
@ -1086,7 +1086,7 @@ Once this is done, we can make the following simplifications to Guile:
|
||||||
|
|
||||||
@item
|
@item
|
||||||
A good portion of symbols.c can go away. Symbols no longer need value
|
A good portion of symbols.c can go away. Symbols no longer need value
|
||||||
slots. The mismash of @code{scm_sym2ovcell},
|
slots. The mishmash of @code{scm_sym2ovcell},
|
||||||
@code{scm_intern_obarray_soft}, etc. can go away. @code{intern} becomes
|
@code{scm_intern_obarray_soft}, etc. can go away. @code{intern} becomes
|
||||||
simpler.
|
simpler.
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ Part I: Guile Scheme
|
||||||
Keywords
|
Keywords
|
||||||
Exceptions
|
Exceptions
|
||||||
Modules
|
Modules
|
||||||
--- the preceeding three come first, because we need them
|
--- the preceding three come first, because we need them
|
||||||
in order to explain the behavior of some things later
|
in order to explain the behavior of some things later
|
||||||
Exception Handling
|
Exception Handling
|
||||||
--- mention that repls usually establish default exception handlers
|
--- mention that repls usually establish default exception handlers
|
||||||
|
|
|
@ -204,7 +204,7 @@ arrays, uniform arrays, bit vectors:
|
||||||
@deffn procedure array-prototype ra
|
@deffn procedure array-prototype ra
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
Unform arrays can be written and read, but @code{read} won't recognize
|
Uniform arrays can be written and read, but @code{read} won't recognize
|
||||||
them unless the optional @code{read-sharp} parameter is supplied,
|
them unless the optional @code{read-sharp} parameter is supplied,
|
||||||
e.g,
|
e.g,
|
||||||
@smalllisp
|
@smalllisp
|
||||||
|
|
|
@ -28,7 +28,7 @@ be required to make them available.
|
||||||
The low-level interfaces are designed to give Scheme programs
|
The low-level interfaces are designed to give Scheme programs
|
||||||
access to as much functionality as possible from the underlying
|
access to as much functionality as possible from the underlying
|
||||||
Unix system. They can be used to implement higher level
|
Unix system. They can be used to implement higher level
|
||||||
intefaces such as the Scheme shell @ref{scsh}.
|
interfaces such as the Scheme shell @ref{scsh}.
|
||||||
|
|
||||||
Generally there is a single procedure for each corresponding Unix
|
Generally there is a single procedure for each corresponding Unix
|
||||||
facility. However some of the procedures are implemented for
|
facility. However some of the procedures are implemented for
|
||||||
|
@ -53,7 +53,7 @@ facility.
|
||||||
Underscores in Unix names are converted to hyphens.
|
Underscores in Unix names are converted to hyphens.
|
||||||
@item
|
@item
|
||||||
Procedures which destructively modify Scheme data gain postpended
|
Procedures which destructively modify Scheme data gain postpended
|
||||||
exclaimation marks, e.g., @code{recv!}.
|
exclamation marks, e.g., @code{recv!}.
|
||||||
@item
|
@item
|
||||||
Predicates are postpended with question marks, e.g., @code{access?}.
|
Predicates are postpended with question marks, e.g., @code{access?}.
|
||||||
@item
|
@item
|
||||||
|
|
|
@ -269,7 +269,7 @@
|
||||||
;; take lambda*-style extended paramter lists, where #:optional,
|
;; take lambda*-style extended paramter lists, where #:optional,
|
||||||
;; #:key, #:allow-other-keys and #:rest are allowed with the usual
|
;; #:key, #:allow-other-keys and #:rest are allowed with the usual
|
||||||
;; semantics. Here is an example of a macro with an optional argument:
|
;; semantics. Here is an example of a macro with an optional argument:
|
||||||
;; (defmacro* transmorgify (a #:optional b)
|
;; (defmacro* transmogrify (a #:optional b)
|
||||||
|
|
||||||
(define-syntax defmacro*
|
(define-syntax defmacro*
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue