The utility Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The utility Reference Manual

This is the utility Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Fri May 24 10:02:22 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

utility Manual

Description

A collection of useful macros and functions I use in almost every project.

Installing utility

We can use QuickLisp to load utility:

(ql:quickload :utility)

Some Things inside

(etouq (list (car (cons 'car 0))
		      `(quote ,(cdr (list 0 1 2)))))
=> 
1 

Example:

(dobox ((x 0 2) (y 0 3)) (print (list x y)))
=> 
(0 0) 
(0 1) 
(0 2) 
(1 0) 
(1 1) 
(1 2)

License Information

This library is released under the MIT License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 utility

Author

terminal625

License

MIT

Description

A collection of useful functions and macros.

Source

utility.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 utility.asd

Location

utility.asd

Systems

utility (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 utility/package.lisp

Parent

utility (system)

Location

package.lisp

Packages

utility


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 utility/other.lisp

Dependency

package.lisp (file)

Parent

utility (system)

Location

other.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 utility/math.lisp

Dependency

other.lisp (file)

Parent

utility (system)

Location

math.lisp

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 utility/utility.lisp

Dependency

math.lisp (file)

Parent

utility (system)

Location

utility.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 utility

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: %list TARGET &rest ARGS
Package

utility

Source

utility.lisp (file)

Macro: any &body BODY
Package

utility

Source

utility.lisp (file)

Macro: dobox (&rest INTERVAL-FORMS) &rest BODY
Package

utility

Source

utility.lisp (file)

Macro: dohash (K V) HASH &body BODY
Package

utility

Source

utility.lisp (file)

Macro: etouq &body BODY
Package

utility

Source

utility.lisp (file)

Macro: eval-always &body BODY
Package

utility

Source

utility.lisp (file)

Macro: nest &rest THINGS

Macro to do keep code nesting and indentation under control.

Package

utility

Source

other.lisp (file)

Macro: once-only SPECS &body FORMS

Evaluates FORMS with symbols specified in SPECS rebound to temporary variables, ensuring that each initform is evaluated only once.

Each of SPECS must either be a symbol naming the variable to be rebound, or of the form:

(symbol initform)

Bare symbols in SPECS are equivalent to

(symbol symbol)

Example:

(defmacro cons1 (x) (once-only (x) ‘(cons ,x ,x)))
(let ((y 0)) (cons1 (incf y))) => (1 . 1)

Package

utility

Source

other.lisp (file)

Macro: progno &rest ARGS
Package

utility

Source

utility.lisp (file)

Macro: this-directory ()
Package

utility

Source

utility.lisp (file)

Macro: this-file ()
Package

utility

Source

utility.lisp (file)

Macro: toggle VAR
Package

utility

Source

utility.lisp (file)

Macro: with-declaim-inline (&rest NAMES) &body BODY
Package

utility

Source

utility.lisp (file)

Macro: with-gensyms NAMES &body FORMS

Binds each variable named by a symbol in NAMES to a unique symbol around FORMS. Each of NAMES must either be either a symbol, or of the form:

(symbol string-designator)

Bare symbols appearing in NAMES are equivalent to:

(symbol symbol)

The string-designator is used as the argument to GENSYM when constructing the unique symbol the named variable will be bound to.

Package

utility

Source

other.lisp (file)

Macro: with-let-mapped-places (&rest PLACE-PAIRS) &body BODY
Package

utility

Source

utility.lisp (file)

Macro: with-unsafe-speed &body BODY
Package

utility

Source

utility.lisp (file)

Macro: with-vec (&rest BUFVARS) (BUF &optional BINDER) &body BODY
Package

utility

Source

utility.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: %%with-vec-params BUFVARS BUF BINDER BODY
Package

utility

Source

utility.lisp (file)

Function: %nest THINGS
Package

utility

Source

other.lisp (file)

Function: %with-let-mapped-places PLACE-PAIRS &optional BODY
Package

utility

Source

utility.lisp (file)

Function: byte/255 X
Package

utility

Source

math.lisp (file)

Function: clamp MIN MAX X
Package

utility

Source

math.lisp (file)

Function: floatify X
Package

utility

Source

math.lisp (file)

Function: keywordify SYM
Package

utility

Source

utility.lisp (file)

Function: make-gensym-list LENGTH &optional X

Returns a list of LENGTH gensyms, each generated as if with a call to MAKE-GENSYM, using the second (optional, defaulting to "G") argument.

Package

utility

Source

other.lisp (file)

Function: parse-body BODY &key DOCUMENTATION WHOLE

Parses BODY into (values remaining-forms declarations doc-string). Documentation strings are recognized only if DOCUMENTATION is true. Syntax errors in body are signalled and WHOLE is used in the signal arguments when given.

Package

utility

Source

other.lisp (file)

Function: print-bits N &optional STREAM
Package

utility

Source

utility.lisp (file)

Function: rebase-path PATH BASE
Package

utility

Source

utility.lisp (file)

Function: spill-hash HASH &optional STREAM
Package

utility

Source

utility.lisp (file)

Function: symbolicate2 THINGS &optional PACKAGE

Concatenate together the names of some strings and symbols, producing a symbol in the current package.

Package

utility

Source

other.lisp (file)

Function: with-vec-params &rest ARGS
Package

utility

Source

utility.lisp (file)

Function: with-vec-params2 BUFVARS
Package

utility

Source

utility.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +fixnum-bits+
Package

utility

Source

utility.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: %2aux-with-vec-params BUFVARS
Package

utility

Source

utility.lisp (file)

Function: %aux-with-vec-params VARS-OR-OFFSETS &optional OFFSET
Package

utility

Source

utility.lisp (file)

Function: dorange-generator BODY VAR START-FORM END-FORM &key TEST JMP INC
Package

utility

Source

utility.lisp (file)

Function: file-directory VALUE
Package

utility

Source

utility.lisp (file)

Function: type-multimap-alist TYPE VARNAME ALIST
Package

utility

Source

utility.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   U  
Index Entry  Section

F
File, Lisp, utility.asd: The utility<dot>asd file
File, Lisp, utility/math.lisp: The utility/math<dot>lisp file
File, Lisp, utility/other.lisp: The utility/other<dot>lisp file
File, Lisp, utility/package.lisp: The utility/package<dot>lisp file
File, Lisp, utility/utility.lisp: The utility/utility<dot>lisp file

L
Lisp File, utility.asd: The utility<dot>asd file
Lisp File, utility/math.lisp: The utility/math<dot>lisp file
Lisp File, utility/other.lisp: The utility/other<dot>lisp file
Lisp File, utility/package.lisp: The utility/package<dot>lisp file
Lisp File, utility/utility.lisp: The utility/utility<dot>lisp file

U
utility.asd: The utility<dot>asd file
utility/math.lisp: The utility/math<dot>lisp file
utility/other.lisp: The utility/other<dot>lisp file
utility/package.lisp: The utility/package<dot>lisp file
utility/utility.lisp: The utility/utility<dot>lisp file

Jump to:   F   L   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %  
A   B   C   D   E   F   K   M   N   O   P   R   S   T   W  
Index Entry  Section

%
%%with-vec-params: Exported functions
%2aux-with-vec-params: Internal functions
%aux-with-vec-params: Internal functions
%list: Exported macros
%nest: Exported functions
%with-let-mapped-places: Exported functions

A
any: Exported macros

B
byte/255: Exported functions

C
clamp: Exported functions

D
dobox: Exported macros
dohash: Exported macros
dorange-generator: Internal functions

E
etouq: Exported macros
eval-always: Exported macros

F
file-directory: Internal functions
floatify: Exported functions
Function, %%with-vec-params: Exported functions
Function, %2aux-with-vec-params: Internal functions
Function, %aux-with-vec-params: Internal functions
Function, %nest: Exported functions
Function, %with-let-mapped-places: Exported functions
Function, byte/255: Exported functions
Function, clamp: Exported functions
Function, dorange-generator: Internal functions
Function, file-directory: Internal functions
Function, floatify: Exported functions
Function, keywordify: Exported functions
Function, make-gensym-list: Exported functions
Function, parse-body: Exported functions
Function, print-bits: Exported functions
Function, rebase-path: Exported functions
Function, spill-hash: Exported functions
Function, symbolicate2: Exported functions
Function, type-multimap-alist: Internal functions
Function, with-vec-params: Exported functions
Function, with-vec-params2: Exported functions

K
keywordify: Exported functions

M
Macro, %list: Exported macros
Macro, any: Exported macros
Macro, dobox: Exported macros
Macro, dohash: Exported macros
Macro, etouq: Exported macros
Macro, eval-always: Exported macros
Macro, nest: Exported macros
Macro, once-only: Exported macros
Macro, progno: Exported macros
Macro, this-directory: Exported macros
Macro, this-file: Exported macros
Macro, toggle: Exported macros
Macro, with-declaim-inline: Exported macros
Macro, with-gensyms: Exported macros
Macro, with-let-mapped-places: Exported macros
Macro, with-unsafe-speed: Exported macros
Macro, with-vec: Exported macros
make-gensym-list: Exported functions

N
nest: Exported macros

O
once-only: Exported macros

P
parse-body: Exported functions
print-bits: Exported functions
progno: Exported macros

R
rebase-path: Exported functions

S
spill-hash: Exported functions
symbolicate2: Exported functions

T
this-directory: Exported macros
this-file: Exported macros
toggle: Exported macros
type-multimap-alist: Internal functions

W
with-declaim-inline: Exported macros
with-gensyms: Exported macros
with-let-mapped-places: Exported macros
with-unsafe-speed: Exported macros
with-vec: Exported macros
with-vec-params: Exported functions
with-vec-params2: Exported functions

Jump to:   %  
A   B   C   D   E   F   K   M   N   O   P   R   S   T   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+fixnum-bits+: Internal constants

C
Constant, +fixnum-bits+: Internal constants

Jump to:   +  
C  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S   U  
Index Entry  Section

P
Package, utility: The utility package

S
System, utility: The utility system

U
utility: The utility system
utility: The utility package

Jump to:   P   S   U