Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the deoxybyte-io Reference Manual, version 0.15.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 04:37:42 2022 GMT+0.
• Introduction | What deoxybyte-io is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Introduction The deoxybyte-io system is a selection of utility code focused on transfer of data between Lisp and its environment. It includes: - IO and parser conditions - File and directory utilities - Command line interface definition utilities - Stream classes and methods - Tabular text parsing - Binary encoding and decoding * * Nathan Froyd has released nibbles (https://github.com/froydnj/nibbles) which implements octet-vector operations similar to those in this system, only optimized for efficiency. I'll consider replacing my implementations with a shim to nibbles, or calling nibbles directly. Installation deoxybyte-io uses ASDF for system definition. Install as described in the ASDF documentation and then load: (asdf:load-system :deoxybyte-io) Alternatively, use the equivalent deoxybyte-systems:load-system function: (dxs:load-system :deoxybyte-io) Tests To run the unit and regression tests you need to have LIFT installed. Run the tests: (asdf:test-system :deoxybyte-io) Alternatively, use the equivalent deoxybyte-systems:test-system function: (dxs:test-system :deoxybyte-io) Documentation See the Lisp docstrings, particularly the package docstrings for an overview. HTML documentation may be generated with the command: (dxs:document-system :deoxybyte-io) at the REPL, provided that CLDOC is installed. Dependencies deoxybyte-systems git://github.com/keithj/deoxybyte-systems.git deoxybyte-utilities git://github.com/keithj/deoxybyte-utilities.git cl-fad http://www.weitz.de/cl-fad/ getopt git://git.b9.com/getopt.git Optional dependencies LIFT http://common-lisp.net/project/lift/ CLDOC http://common-lisp.net/project/cldoc/
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The deoxybyte-io system |
Keith James
GPL v3
0.15.0
deoxybyte-io.asd (file)
core (module)
Modules are listed depth-first from the system components tree.
• The deoxybyte-io/core module |
deoxybyte-io (system)
src/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The deoxybyte-io/core/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
deoxybyte-io.asd
deoxybyte-io (system)
Next: The deoxybyte-io/core/conditions․lisp file, Previous: The deoxybyte-io․asd file, Up: Lisp files [Contents][Index]
core (module)
src/package.lisp
Next: The deoxybyte-io/core/deoxybyte-io․lisp file, Previous: The deoxybyte-io/core/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
core (module)
src/conditions.lisp
Next: The deoxybyte-io/core/environment․lisp file, Previous: The deoxybyte-io/core/conditions․lisp file, Up: Lisp files [Contents][Index]
conditions.lisp (file)
core (module)
src/deoxybyte-io.lisp
Next: The deoxybyte-io/core/parse-float․lisp file, Previous: The deoxybyte-io/core/deoxybyte-io․lisp file, Up: Lisp files [Contents][Index]
deoxybyte-io.lisp (file)
core (module)
src/environment.lisp
Next: The deoxybyte-io/core/ieee-float․lisp file, Previous: The deoxybyte-io/core/environment․lisp file, Up: Lisp files [Contents][Index]
environment.lisp (file)
core (module)
src/parse-float.lisp
parse-float (function)
Next: The deoxybyte-io/core/binary-operations․lisp file, Previous: The deoxybyte-io/core/parse-float․lisp file, Up: Lisp files [Contents][Index]
parse-float.lisp (file)
core (module)
src/ieee-float.lisp
Next: The deoxybyte-io/core/streams․lisp file, Previous: The deoxybyte-io/core/ieee-float․lisp file, Up: Lisp files [Contents][Index]
ieee-float.lisp (file)
core (module)
src/binary-operations.lisp
Next: The deoxybyte-io/core/line-stream․lisp file, Previous: The deoxybyte-io/core/binary-operations․lisp file, Up: Lisp files [Contents][Index]
binary-operations.lisp (file)
core (module)
src/streams.lisp
Next: The deoxybyte-io/core/command-line-interface․lisp file, Previous: The deoxybyte-io/core/streams․lisp file, Up: Lisp files [Contents][Index]
streams.lisp (file)
core (module)
src/line-stream.lisp
Next: The deoxybyte-io/core/files-and-directories․lisp file, Previous: The deoxybyte-io/core/line-stream․lisp file, Up: Lisp files [Contents][Index]
line-stream.lisp (file)
core (module)
src/command-line-interface.lisp
Next: The deoxybyte-io/core/simple-table-parser․lisp file, Previous: The deoxybyte-io/core/command-line-interface․lisp file, Up: Lisp files [Contents][Index]
command-line-interface.lisp (file)
core (module)
src/files-and-directories.lisp
merge-pathstrings (function)
Next: The deoxybyte-io/core/external-merge-sort․lisp file, Previous: The deoxybyte-io/core/files-and-directories․lisp file, Up: Lisp files [Contents][Index]
files-and-directories.lisp (file)
core (module)
src/simple-table-parser.lisp
Next: The deoxybyte-io/core/external-line-sort․lisp file, Previous: The deoxybyte-io/core/simple-table-parser․lisp file, Up: Lisp files [Contents][Index]
simple-table-parser.lisp (file)
core (module)
src/external-merge-sort.lisp
Next: The deoxybyte-io/core/sbcl․lisp file, Previous: The deoxybyte-io/core/external-merge-sort․lisp file, Up: Lisp files [Contents][Index]
external-merge-sort.lisp (file)
core (module)
src/external-line-sort.lisp
Previous: The deoxybyte-io/core/external-line-sort․lisp file, Up: Lisp files [Contents][Index]
external-line-sort.lisp (file)
core (module)
src/sbcl.lisp
get-system-argv (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The uk.co.deoxybyte-io package |
The deoxybyte-io system is a selection of utility
code focused on transfer of data between Lisp and its environment. It
includes:
- IO and parser conditions
- File and directory utilities
- Command line interface definition utilities
- Stream classes and methods
- Tabular text parsing
- Binary encoding and decoding
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported conditions | ||
• Exported classes |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
The default temporary file directory pathname.
files-and-directories.lisp (file)
The defaults used to fill in temporary file pathnames.
files-and-directories.lisp (file)
The default empty field string.
simple-table-parser.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Checks FIELD of RECORD. If TEST-FORM returns false a
{define-condition malformed-field-error} is raised. The default error
message may be refined with an additional ERROR-MESSAGE.
Arguments:
- test-form (form): A form to be evaluated. If the form returns NIL,
an error is raised.
- record (form): A form that evaluates to a record.
- field (form): A form that evaluates to a field in RECORD.
Optional:
- error-message (string): An error message string.
Rest:
- message-arguments (forms): Forms that evaluate to arguments for the error message.
deoxybyte-io.lisp (file)
Checks RECORD. If TEST-FORM returns false a
{define-condition malformed-record-error} is raised. The default error
message may be refined with an additional ERROR-MESSAGE.
Arguments:
- test-form (form): A form to be evaluated. If the form returns NIL,
an error is raised.
- record (form): A form that evaluates to a record.
Optional:
- error-message (string): An error message string.
Rest:
- message-arguments (forms): Forms that evaluate to arguments for the error message.
deoxybyte-io.lisp (file)
Defines a new CLI class NAME.
Arguments:
- name (symbol): The class name.
- direct-superclasses (list symbols): The direct superclasses.
- option-specs (list option-specs): The CLI option specifiers.
Each option-spec specifies a slot and its corresponding CLI option
instance.
Arguments:
- slot-name (symbol)
- option-name (string)
Rest:
- cl-option instance initargs
Key:
- documentation (string): Slot (and hence cli-option) documentation.
e.g.
;;; (a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
Rest:
- class-options as in defclass.
e.g.
;;; (define-cli example-cli (cli)
;;; ((a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
;;; (b "b" :required-option nil :value-type ’integer :value-default 99
;;; :documentation "Required option D."))
;;; (:documentation "An example CLI class definition."))
command-line-interface.lisp (file)
Defines a function NAME with one mandatory argument, a simple-array
of unsigned-byte 8, and one optional argument, a fixnum index in that
array that defaults to 0. The function returns the Lisp integer whose
value is given by the bytes at that index in the byte array.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
- signed (boolean): T if the bytes are a two’s complement
representation of a signed integer.
binary-operations.lisp (file)
Defines a function NAME with two mandatory arguments, an integer
and a simple-array of unsigned-byte 8, and one optional argument, a
fixnum index in that array that defaults to 0. The function returns
the buffer containing the encoded integer.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
binary-operations.lisp (file)
Defines a line parser function that splits lines and then parses and
validates fields according to the FIELDS contraints and validates
combinations of fields according to CONSTRAINTS.
Arguments:
- parser-name (symbol): a symbol naming the new function.
- delimiter (character): a character used to split the lines being
parsed.
- fields (list list): a list of field definition lists. The form of a
definition list is
;;; (symbolic-field-name &keys type ignore parser validator null-str)
which indicates the symbol to which the parsed field value will be
stored in the alist returned by the function
- parser-name (symbol): the expected type of the field value ( :string,
:integer or :float, defaulting to :string), an optional boolean flag
indicating that the field should be ignored, an optional parser
function (defaults to a pass-through string parser), an optional
validator function that returns T when the parsed field is valid and
an optional string to indicate an null field (defaults to
{defparameter *empty-field*} ).
Optional:
- constraints (list list): a list of field constraint definition
lists. The form of a constraint definition list is
;;; (symbolic-constraint-name (symbolic-field-name list) validator)
The symbolic-field-name list should contain names of one or more fields and the validator must then be a function which accepts the parsed values of those fields in the same order and returns T when those fields have acceptable values.
simple-table-parser.lisp (file)
Executes BODY with ARGV bound to system argv list.
command-line-interface.lisp (file)
Executes BODY with DIRECTORY bound to a temporary directory that has been created with the MAKE-TMP-DIRECTORY function. If BODY executes without error, the temporary directory is deleted. If an error occurs, restarts DELETE-TMP-DIRECTORY and LEAVE-TMP-DIRECTORY are provided to control what happens.
files-and-directories.lisp (file)
Executes BODY with DIRECTORY bound to a pathname of a temporary file that has been created with the MAKE-TMP-PATHNAME function. If BODY executes without error, any file denoted by the temporary pathname is deleted. If an error occurs, restarts DELETE-TMP-PATHNAME and LEAVE-TMP-PATHNAME are provided to control what happens.
files-and-directories.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Returns T if PATHSPEC is a pathname designator for an absolute file or directory, or NIL otherwise.
files-and-directories.lisp (file)
Decodes 4 byte float stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes 4 byte float stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes 8 byte float stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes 8 byte float stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an IEEE 754 encoded single-float from 32-bit integer
N. NaN, +Inf and -Inf are represented by the keywords :not-a-number
:positive-infinity or :negative-infinity respectively.
ieee-float.lisp (file)
Decodes an IEEE 754 encoded double-float from 64-bit integer
N. NaN, +Inf and -Inf are represented by the keywords
:not-a-number :positive-infinity or :negative-infinity respectively.
ieee-float.lisp (file)
Decodes a signed 2 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 2 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 4 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 4 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 8 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 8 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 1 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes a signed 1 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 2 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 2 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 4 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 4 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 8 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 8 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 1 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Decodes an unsigned 1 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Returns a float parsed from simple-base-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
simple-table-parser.lisp (file)
Returns an integer parsed from simple-base-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
simple-table-parser.lisp (file)
Invokes the DELETE-TMP-DIRECTORY restart, if established.
files-and-directories.lisp (file)
Invokes the DELETE-TMP-PATHNAME restart, if established.
files-and-directories.lisp (file)
Returns a new pathname that represents the directory component of PATHSPEC.
files-and-directories.lisp (file)
Encodes 4 byte float as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes 4 byte float as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes 8 byte float as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes 8 byte float as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes single-float F as a 32-bit integer using IEEE 754 encoding. NaN, +Inf and -Inf may be represented by using the keywords :not-a-number :positive-infinity or :negative-infinity respectively, as an argument.
ieee-float.lisp (file)
Encodes double-float F as a 64-bit integer using IEEE 754 encoding. NaN, +Inf and -Inf may be represented by using the keywords :not-a-number :positive-infinity or :negative-infinity respectively, as an argument.
ieee-float.lisp (file)
Encodes a 2 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 2 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 4 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 4 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 8 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 8 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 1 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 1 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 2 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 2 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 4 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 4 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 8 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 8 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 1 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Encodes a 1 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
binary-operations.lisp (file)
Creates the file designated by FILESPEC, if it does not exist. Returns the pathname of FILESPEC.
files-and-directories.lisp (file)
Returns the string value of VARIABLE-NAME, or NIL.
sbcl.lisp (file)
(setf environment-variable) (function)
Sets the value of VARIABLE-NAME to VALUE, which maye be a string or a symbol.
sbcl.lisp (file)
environment-variable (function)
Returns a new pathname that represents the file component of PATHSPEC.
files-and-directories.lisp (file)
Returns a new relative pathname that represents the leaf directory component of PATHSPEC.
files-and-directories.lisp (file)
Invokes the LEAVE-TMP-DIRECTORY restart, if established.
files-and-directories.lisp (file)
Invokes the LEAVE-TMP-PATHNAME restart, if established.
files-and-directories.lisp (file)
Creates a new temporary directory and returns its pathname. The new directory’s pathname is created using {defun tmp-pathname} . The IF-EXISTS keyword argument determines what happens if a directory by that name already exists; options are :error which causes a FILE-ERROR to be raised, :supersede which causes the existing directory to be deleted and a new, empty one created and NIL where no directory is created an NIL is returned to indicate failure.
files-and-directories.lisp (file)
Returns the value from alist PARSED-ARGS for the option named by the symbol KEY.
command-line-interface.lisp (file)
Converts a substring of STRING, as delimited by START and END, to a
floating point number, if possible. START and END default to the
beginning and end of the string. RADIX must be between 2 and 36.
A floating point number will be returned if the string consists of an
optional string of spaces and an optional sign, followed by a string
of digits optionally containing a decimal point, and an optional e or
E followed by an optionally signed integer. The use of e/E to indicate
an exponent only works for RADIX = 10. Returns the floating point
number, if any, and the index for the first character after the number.
parse-float.lisp (file)
Returns a function of zero arity that returns modified copies of a pathname argument. The pathname is modified by extending its namestring. The new namestring is composed of the original namestring SEPARATOR (defaults to NIL) and a value taken from calling the function GENERATOR (defaults to a numeric generator starting from 0, incrementing by 1). TYPE may be used to specify the type of the new pathname, otherwise the original type will be used.
files-and-directories.lisp (file)
Returns a function of zero arity that generates pathnames when called. The generated pathnames are relative to DIRECTORY and have a namestring composed of NAME, SEPARATOR (defaults to NIL) and a value taken from calling the function GENERATOR (defaults to a numeric generator starting from 0, incrementing by 1). TYPE may be used to specify the type of the new pathnames.
files-and-directories.lisp (file)
Returns a string representing PATHNAME. This function is similar to CL:NAMESTRING, but is designed to be portable whereas the return value of CL:NAMESTRING is implementation-dependent.
files-and-directories.lisp (file)
sbcl.lisp (file)
sbcl.lisp (file)
Returns T if PATHSPEC is a pathname designator for a relative file or directory, or NIL otherwise.
files-and-directories.lisp (file)
Returns a pathname suitable for use as a temporary file or directory. The directory component of the new pathname is TMPDIR, defaulting to *DEFAULT-TMPDIR*. The NAME component of the new pathname is a concatenation of BASENAME, defaulting to an empty string, and a pseudo-random number. The type component of the new pathname is TYPE, defaulting to NIL.
files-and-directories.lisp (file)
Next: Exported conditions, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Returns T if OPTION does not require a value, or NIL otherwise.
command-line-interface.lisp (file)
Prints the help string for CLI to STREAM (which
defaults to *ERROR-OUTPUT*). This is usually the class documentation
string of CLI, plus all of the option help.
command-line-interface.lisp (file)
Returns documentation of CLI or a CLI option identified by NAME.
command-line-interface.lisp (file)
Performs an external merge sort on the elements
read from SORT-INPUT-STREAM and writes the sorted elements to
SORT-OUTPUT-STREAM.
Arguments:
- sort-input-stream (sort-input-stream): The stream whose elements are
to be sorted.
- sort-output-stream (sort-output-stream): A stream whose elements are
sorted.
- predicate (function designator): The sorting predicate, as in
CL:SORT, a function of two arguments that returns a generalized
boolean.
Key:
- key (function designator): A function of one argument, or nil.
- buffer-size (fixnum): The size of the in-memory sort buffer and
hence the number of elements written to disk in the external merge
file.
Returns:
- The total number of elements sorted (fixnum).
- The number of {defclass merge-stream} s used in sorting (fixnum).
external-merge-sort.lisp (file)
conditions.lisp (file)
Iterates through lines read from LINE-INPUT-STREAM
until a line matching predicate TEST is found or until a number of
lines equal to MAX-LINES have been examined.
line-stream.lisp (file)
Prints a help MESSAGE and help for each avaliable option in CLI to STREAM.
command-line-interface.lisp (file)
A list of lines that have been pushed back into the stream to be read again.
line-stream.lisp (file)
Returns a new {defclass line-stream} created from STREAM.
line-stream.lisp (file)
Returns a new {defclass merge-stream} appropriate
to SORT-INPUT-STREAM. The new stream must return sorted elements read
from SORT-INPUT-STREAM.
Arguments:
- sort-input-stream (sort-input-stream): The stream whose elements are
to be sorted.
- predicate (function designator): The sorting predicate, as in
CL:SORT, a function of two arguments that returns a generalized
boolean.
Key:
- key (function designator): A function of one argument, or nil.
- buffer-size (fixnum): The size of the in-memory sort buffer and
hence the number of elements written to disk in the external merge
file.
Returns:
- a {defclass merge-stream} from which sorted elements may be read.
external-merge-sort.lisp (file)
external-line-sort.lisp (file)
Returns T if {defclass line-input-stream} contains unread data.
line-stream.lisp (file)
The name string of the option.
command-line-interface.lisp (file)
conditions.lisp (file)
conditions.lisp (file)
Prints the help string for option NAME to STREAM (which defaults to *ERROR-OUTPUT*).
command-line-interface.lisp (file)
Returns the CLI option identified by NAME.
command-line-interface.lisp (file)
Returns T if SLOT is an option slot in CLI, or NIL
otherwise. The default implementation returns T, meaning that all
slots are expected to contain option objects. Overriding this method
means that slots may be added for other purposes.
command-line-interface.lisp (file)
Returns a new, sorted list of CLI option slots.
command-line-interface.lisp (file)
Returns a new, sorted list of CLI options.
command-line-interface.lisp (file)
Parses a system command line to create a mapping of
option keywords to Lisp objects. Where multiple values are to be
accepted for an argument e.g. ’integer-list , they must be
comma-separated on the command line e.g. 1,2,3,4.
Arguments:
- cli (object): A CLI instance.
- arglist (list string): A list of CLI string arguments.
Returns:
- alist mapping slots to parsed values
- list of unmatched argument strings
- list of unknown argument strings
e.g
;;; (define-cli example-cli (cli)
;;; ((a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
;;; (b "b" :required-option t :value-type ’integer
;;; :documentation "Required option D.")
;;; (c "c" :required-option nil :value-type ’string :default "foo"
;;; :documentation "Option C."))
;;; (:documentation "An example CLI class definition."))
;;; (parse-command-line (make-instance ’example-cli)
;;; (list "–a" "aaa" "–b" "1")))
command-line-interface.lisp (file)
Pops one line from {defclass line-input-stream} .
line-stream.lisp (file)
Pushes LINE back onto {defclass line-input-stream} .
line-stream.lisp (file)
conditions.lisp (file)
T if option is required on the command line, or NIL otherwise.
command-line-interface.lisp (file)
Returns T if OPTION requires a value, or NIL otherwise.
command-line-interface.lisp (file)
Closes STREAM, returning T if STREAM was open. If
ABORT is T, attempts to clean up any side effects of having created stream.
streams.lisp (file)
Returns the next element from
MERGE-STREAM without removing it. Part of the external merge sort
protocol.
external-merge-sort.lisp (file)
Returns the next element from MERGE-STREAM as part
of the a merging operation between several {defclass merge-stream }
s.
external-merge-sort.lisp (file)
external-line-sort.lisp (file)
The underlying stream from which data are read.
streams.lisp (file)
Returns a Gray stream of CLASS
streams.lisp (file)
Returns the next element from SORT-INPUT-STREAM.
external-merge-sort.lisp (file)
external-line-sort.lisp (file)
Writes ELEMENT to SORT-OUTPUT-STREAM.
external-merge-sort.lisp (file)
external-line-sort.lisp (file)
A function designator for a test that returns
T when the next datum read from the stream is to be ignored.
streams.lisp (file)
A default value of the required value-type.
command-line-interface.lisp (file)
A value parser function for option
that is capable of parsing a string to the correct type.
command-line-interface.lisp (file)
The type of the value of the option. A
type of T indicates a boolean option. Valid types are the symbols
string, integer, character, float, string-list, integer-list,
character-list, float-list and T (indicating boolean, i.e. no
value).
command-line-interface.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
The parent type of all CLI error conditions.
conditions.lisp (file)
error (condition)
cli-of (method)
The CLI object relevant to the error.
:cli
(quote nil)
cli-of (generic function)
The parent type of all CLI option error conditions.
conditions.lisp (file)
cli-error (condition)
name-of (method)
The option name.
:name
name-of (generic function)
The parent type of all CLI option warning conditions.
conditions.lisp (file)
cli-warning (condition)
name-of (method)
The option name.
:name
name-of (generic function)
The parent type of all CLI warning conditions.
conditions.lisp (file)
warning (condition)
cli-option-warning (condition)
cli-of (method)
The CLI object relevant to the warning.
:cli
(quote nil)
cli-of (generic function)
An error that is raised when a record field fails validation.
conditions.lisp (file)
malformed-field-error (condition)
The parent type of all parse error conditions.
conditions.lisp (file)
An error that is raised when an option is supplied with an invalid value.
conditions.lisp (file)
cli-option-error (condition)
The expected type of option value.
:type
type-of (generic function)
The invalid value.
:value
value-of (generic function)
The parent type of all IO error conditions.
conditions.lisp (file)
error (condition)
general-parse-error (condition)
The parent type of all IO warning conditions.
conditions.lisp (file)
warning (condition)
An error that is raised when a field-based record contains a malformed field within it.
conditions.lisp (file)
malformed-record-error (condition)
field-validation-error (condition)
field-of (method)
The malformed field.
:field
(quote nil)
field-of (generic function)
An error that is raised when a file is malformed for any reason.
conditions.lisp (file)
general-parse-error (condition)
file-of (method)
The malformed file.
:file
(quote nil)
file-of (generic function)
An error that is raised when a record is malformed for any reason.
conditions.lisp (file)
general-parse-error (condition)
record-of (method)
The malformed record.
:record
(quote nil)
record-of (generic function)
An error that is raised when a required option is missing.
conditions.lisp (file)
cli-option-error (condition)
An error that is raised when a required value for an option is missing.
conditions.lisp (file)
cli-option-error (condition)
An error that is raised when a record fails validation of one or more of its parts.
conditions.lisp (file)
malformed-record-error (condition)
An error that is raised when the main command is not recognised.
conditions.lisp (file)
cli-error (condition)
command-of (method)
The unknown command.
:command
command-of (generic function)
conditions.lisp (file)
cli-option-warning (condition)
conditions.lisp (file)
cli-option-warning (condition)
Previous: Exported conditions, Up: Exported definitions [Contents][Index]
line-stream.lisp (file)
The base class of all command line
interfaces. Command line options are added as slots, the slot
documentation acting as the coomand line option documentation.
command-line-interface.lisp (file)
standard-object (class)
The base class of all command line options.
command-line-interface.lisp (file)
standard-object (class)
The name string of the option.
:name
(error "an option name is required")
name-of (generic function)
T if option is required on the command line, or NIL otherwise.
:required-option
required-option-p (generic function)
The type of the value of the option. A
type of T indicates a boolean option. Valid types are the symbols
string, integer, character, float, string-list, integer-list,
character-list, float-list and T (indicating boolean, i.e. no
value).
:value-type
(quote string)
value-type-of (generic function)
A value parser function for option
that is capable of parsing a string to the correct type.
value-parser-of (generic function)
A default value of the required value-type.
:value-default
value-default-of (generic function)
streams.lisp (file)
merge-stream (class)
A line-based stream that allows lines to be pushed back into a stack to be re-read.
line-stream.lisp (file)
A list of lines that have been pushed back into the stream to be read again.
line-stack-of (generic function)
(setf line-stack-of) (generic function)
external-line-sort.lisp (file)
line-stream.lisp (file)
stream-write-sequence (method)
external-line-sort.lisp (file)
external-line-sort.lisp (file)
stream-write-element (method)
A line-based stream. Useful for building readers and writers for ad-hoc text data sources.
line-stream.lisp (file)
standard-object (class)
stream-element-type (method)
An IO stream for merging sorted data.
external-merge-sort.lisp (file)
io-stream-mixin (class)
line-merge-stream (class)
Returns the next element from
MERGE-STREAM without removing it. Part of the external merge sort
protocol.
:stream-head
stream-head-of (generic function)
(setf stream-head-of) (generic function)
A {defclass line-input-stream} whose lines are
arrays of bytes. Allows buffered reading of lines of (unsigned-byte 8)
from a stream.
line-stream.lisp (file)
The buffer from which lines are read.
:buffer
(make-array uk.co.deoxybyte-io::+octet-buffer-size+ :element-type (quote uk.co.deoxybyte-utilities:octet) :initial-element 0)
The end of line character code. If two characters are used, this is the first of the pair.
:eol-code
(char-code #\newline)
The number of bytes that were read into the buffer from the stream.
0
The offset in the byte buffer from which the next byte is to be read.
0
An input stream for reading and sorting the stream contents.
external-merge-sort.lisp (file)
fundamental-input-stream (class)
line-sort-input-stream (class)
external-merge-sort (method)
An output stream for sorting and writing the stream contents.
external-merge-sort.lisp (file)
fundamental-output-stream (class)
line-sort-output-stream (class)
external-merge-sort (method)
A mixin that provides a filtering function for
streams. Any data encountered while reading or writing for which the
test returns T are ignored and skipped.
streams.lisp (file)
standard-object (class)
test-of (method)
A function designator for a test that returns
T when the next datum read from the stream is to be ignored.
:test
test-of (generic function)
A Gray-stream wrapping a standard Lisp stream.
streams.lisp (file)
standard-object (class)
The underlying stream from which data are read.
:stream
stream-of (generic function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal classes | ||
• Internal types |
Next: Internal special variables, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Exponent bias for float32
ieee-float.lisp (file)
Exponent bias for float64
ieee-float.lisp (file)
Mantissa fraction float32 multiplication factor
ieee-float.lisp (file)
Mantissa fraction float64 multiplication factor
ieee-float.lisp (file)
Smallest normalized float32 exponent
ieee-float.lisp (file)
Smallest normalized float64 exponent
ieee-float.lisp (file)
ieee-float.lisp (file)
ieee-float.lisp (file)
ieee-float.lisp (file)
ieee-float.lisp (file)
Buffer size for {defclass octet-line-input-stream} internal buffer.
line-stream.lisp (file)
ieee-float.lisp (file)
ieee-float.lisp (file)
Next: Internal macros, Previous: Internal constants, Up: Internal definitions [Contents][Index]
The separator character used in multi-value arguments.
command-line-interface.lisp (file)
parse-float.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
Defines a function NAME with one mandatory argument, a simple-array
of unsigned-byte 8, and one optional argument, a fixnum index in that
array that defaults to 0. The function returns the Lisp float whose
value is given by the bytes at that index in the byte array.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
binary-operations.lisp (file)
Defines a function NAME with two mandatory arguments, a float and a
simple-array of unsigned-byte 8, and one optional argument, a fixnum
index in that array that defaults to 0. The function returns the
buffer containing the encoded float.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
binary-operations.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
line-stream.lisp (file)
line-stream.lisp (file)
Returns an argument list form to be used by CROSS-VALIDATE by quoting the field-names in FORM and re-ordering the elements.
simple-table-parser.lisp (file)
Returns an argument list form for FIELD to be used by PARSE-FIELD which has suitable parsers and validators set up for the standard field types: :string , :integer and :float .
simple-table-parser.lisp (file)
Returns a string subsequence from simple-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
simple-table-parser.lisp (file)
The default validator always returns T.
simple-table-parser.lisp (file)
sbcl.lisp (file)
command-line-interface.lisp (file)
Returns the next element from one of MERGE-STREAMS. The returned element is the on that sorts first according to PREDICATE and KEY, as required by the merge-sort algorithm.
external-merge-sort.lisp (file)
Merges PATHNAME with defaults, using CL:MERGE-PATHNAMES, and calls {defun pathstring} on the result.
files-and-directories.lisp (file)
command-line-interface.lisp (file)
Returns a character parsed from STRING of length 1 character.
command-line-interface.lisp (file)
Returns a list of integers parsed from STRING after splitting on the *list-separator-char* character.
command-line-interface.lisp (file)
Returns a value parsed from LINE between START and END using PARSER and VALIDATOR.
simple-table-parser.lisp (file)
Returns a list of floats parsed from STRING after splitting on the *list-separator-char* character.
command-line-interface.lisp (file)
Returns a list of integers parsed from STRING after splitting on the *list-separator-char* character.
command-line-interface.lisp (file)
Returns a list of strings parsed from STRING by splitting on the *list-separator-char* character.
command-line-interface.lisp (file)
command-line-interface.lisp (file)
Reads chunks of bytes up to the next newline or end of stream, returning them in a list. The newline is not included. Returns two values - a list of chunks and either NIL or T to indicate whether a terminating newline was missing. When the stream underlying the buffer is exhausted the list of chunks will be empty.
line-stream.lisp (file)
Signals a MALFORMED-FIELD-ERROR for FIELD in STR between START and END for REASON.
simple-table-parser.lisp (file)
Returns a copy of STR where any occurrence of CHARS are substituted by CHAR.
command-line-interface.lisp (file)
Returns a pair of constraint NAME and either T or NIL, indicating the result of applying VALIDATOR to values from the alist of parsed FIELDS named by FIELD-NAMES.
simple-table-parser.lisp (file)
command-line-interface.lisp (file)
parse-float.lisp (file)
Format STR, wrapped at 70 characters, to STREAM.
command-line-interface.lisp (file)
Next: Internal classes, Previous: Internal functions, Up: Internal definitions [Contents][Index]
conditions.lisp (file)
conditions.lisp (file)
conditions.lisp (file)
conditions.lisp (file)
Returns the slot named NAME from CLI.
command-line-interface.lisp (file)
Returns a parsed VALUE of the correct Lisp type for
OPTION or raises an {define-condition incompatible-argument} error.
command-line-interface.lisp (file)
Equivalent to CL:DELETE-FILE.
streams.lisp (file)
external-merge-sort.lisp (file)
line-stream.lisp (file)
conditions.lisp (file)
conditions.lisp (file)
Next: Internal types, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
line-stream.lisp (file)
line-output-stream (class)
stream-write-line (method)
line-stream.lisp (file)
line-output-stream (class)
stream-write-line (method)
Previous: Internal classes, Up: Internal definitions [Contents][Index]
Buffer type for {defclass octet-line-input-stream} internal buffer.
line-stream.lisp (file)
Index type for {defclass octet-line-input-stream} internal buffer.
line-stream.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | D F L M |
---|
Jump to: | D F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G H K L M N O P Q R S T V W |
---|
Jump to: | %
(
A B C D E F G H K L M N O P Q R S T V W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
B C E F L N O R S T V |
---|
Jump to: | *
+
B C E F L N O R S T V |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D F G I L M O P R S T U W |
---|
Jump to: | C D F G I L M O P R S T U W |
---|