Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the gute Reference Manual, version 1.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 13:39:53 2020 GMT+0.
• Introduction | What gute is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Gene's Utilities, a cute personal library of functions in Common Lisp. File IO, string manipulation, etc. As I do research in reasoning with language the code is oriented towards processing grammatical attributes of English and manipulating tree structures.
Much of the code is copied over (and refactored) from the Lore project by Jonathan Gordon and Benjamin Van Durme. The files are named to reflect the content inside. Please read the comments in the files to get the details.
You can add an issue or contact me at gkim21@cs.rochester.edu to report bugs.
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The gute system |
Gene Louis Kim <gkim21@cs.rochester.edu>
MIT
Gene’s personal kitchen sink library.
1.0.0
gute.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The gute/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
gute.asd
gute (system)
Next: The gute/general․lisp file, Previous: The gute․asd file, Up: Lisp files [Contents][Index]
gute (system)
package.lisp
Next: The gute/list․lisp file, Previous: The gute/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
gute (system)
general.lisp
*lisp-implementation-to-shorthand* (special variable)
Next: The gute/io․lisp file, Previous: The gute/general․lisp file, Up: Lisp files [Contents][Index]
general.lisp (file)
gute (system)
list.lisp
insert-end (function)
Next: The gute/string․lisp file, Previous: The gute/list․lisp file, Up: Lisp files [Contents][Index]
list.lisp (file)
gute (system)
io.lisp
Next: The gute/sexpr․lisp file, Previous: The gute/io․lisp file, Up: Lisp files [Contents][Index]
io.lisp (file)
gute (system)
string.lisp
*trim-whitespace-chars* (special variable)
Next: The gute/symbol․lisp file, Previous: The gute/string․lisp file, Up: Lisp files [Contents][Index]
string.lisp (file)
gute (system)
sexpr.lisp
Next: The gute/lore-util․lisp file, Previous: The gute/sexpr․lisp file, Up: Lisp files [Contents][Index]
sexpr.lisp (file)
gute (system)
symbol.lisp
preslash-unsafe-chars (function)
Next: The gute/regex․lisp file, Previous: The gute/symbol․lisp file, Up: Lisp files [Contents][Index]
symbol.lisp (file)
gute (system)
lore-util.lisp
Next: The gute/lang․lisp file, Previous: The gute/lore-util․lisp file, Up: Lisp files [Contents][Index]
lore-util.lisp (file)
gute (system)
regex.lisp
Next: The gute/reachability-indexing․lisp file, Previous: The gute/regex․lisp file, Up: Lisp files [Contents][Index]
regex.lisp (file)
gute (system)
lang.lisp
Next: The gute/hashtable․lisp file, Previous: The gute/lang․lisp file, Up: Lisp files [Contents][Index]
lang.lisp (file)
gute (system)
reachability-indexing.lisp
Next: The gute/function․lisp file, Previous: The gute/reachability-indexing․lisp file, Up: Lisp files [Contents][Index]
reachability-indexing.lisp (file)
gute (system)
hashtable.lisp
Next: The gute/stats․lisp file, Previous: The gute/hashtable․lisp file, Up: Lisp files [Contents][Index]
hashtable.lisp (file)
gute (system)
function.lisp
Next: The gute/memo․lisp file, Previous: The gute/function․lisp file, Up: Lisp files [Contents][Index]
function.lisp (file)
gute (system)
stats.lisp
Next: The gute/queue․lisp file, Previous: The gute/stats․lisp file, Up: Lisp files [Contents][Index]
stats.lisp (file)
gute (system)
memo.lisp
Next: The gute/time․lisp file, Previous: The gute/memo․lisp file, Up: Lisp files [Contents][Index]
memo.lisp (file)
gute (system)
queue.lisp
Previous: The gute/queue․lisp file, Up: Lisp files [Contents][Index]
queue.lisp (file)
gute (system)
time.lisp
timing (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The gene-utilities package |
package.lisp (file)
gute
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 structures |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
symbol.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
lore-util.lisp (file)
ANSI compliant, robust version of defconstant.
general.lisp (file)
Define a memoized function.
memo.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
symbol.lisp (file)
symbol.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
Next: Exported structures, Previous: Exported macros, Up: Exported definitions [Contents][Index]
general.lisp (file)
lang.lisp (file)
Concatenation of the common-noun with the proper indefinite article.
lang.lisp (file)
Adds a package nickname.
general.lisp (file)
Takes a verb, as a string or symbol, and applies -ING morphology.
lang.lisp (file)
Returns the number of required arguments in the given function. Required arguments don’t include &key &optional or &rest arguments.
function.lisp (file)
Gives the argv depending on the distribution.
general.lisp (file)
string.lisp (file)
lang.lisp (file)
stats.lisp (file)
Clear the hash table from a memo function.
memo.lisp (file)
general.lisp (file)
Composes any number of one argument functions.
function.lisp (file)
Non-nil if a given character is a consonant.
lang.lisp (file)
lore-util.lisp (file)
lang.lisp (file)
The graph G is given as a list of vertices, where vertices are
atoms with properties named by IN and OUT. The values corresponding
to these properties are lists of vertices from which edges are
incident, and to which they are directed, respectively. IN and OUT
are pre-existing properties, while INDS, INTS, and VIS are created
in this program. VIS IN, OUT, INDS, INTS, VIS are all *names* of
atoms to be used as indicators, not the indicator atoms themselves.
The result is that all vertices have properties named INDS and INTS
(indices and intervals), such that vertex m is a proper ancestor of
n iff some index in the INDS list of n is contained in some interval
in the INTS list of m. Intervals are represented as dotted pairs of
positive integers, e.g., an INTS list might be ((1 . 3) (5 . 5) (8 . 9)).
VIS (’visited’) is used as a temporary flag. The VIS flags are reset
to NIL at the end.
reachability-indexing.lisp (file)
Dequeues an item from queue. Signals an error if queue is empty.
queue.lisp (file)
Enqueue item in queue. Returns the queue.
queue.lisp (file)
sexpr.lisp (file)
lore-util.lisp (file)
symbol.lisp (file)
lore-util.lisp (file)
stats.lisp (file)
Returns an alist of the function argument list grouped by argument type.
e.g. (grouped-arglist #’reduce)
-> ((&required . (function sequence))
(&key . (key from-end start end initial-value))
(&optional . nil)
(&rest . nil))
(grouped-arglist #’mapcar)
-> ((&required . (function list))
(&key . nil)
(&optional . nil)
(&rest . (more-lists)))
function.lisp (file)
Returns ’a or ’an as appropriate.
lang.lisp (file)
Inserts X to LST at position I. Destructive.
list.lisp (file)
Returns a list where the items alternate between the items of LST1 and LST2.
list.lisp (file)
lore-util.lisp (file)
function.lisp (file)
Labels LST with numbers.
Similar to ’enumerate’ in Python.
(label-with-num ’(a b c)) -> ’((0 a) (1 b) (2 c))
list.lisp (file)
string.lisp (file)
string.lisp (file)
Returns a symbol of the lisp implementation.
This uses the implementation shorthands rather than the idiosyncratic names
returned from #’CL:LISP-IMPLEMENTATION-TYPE.
general.lisp (file)
string.lisp (file)
stats.lisp (file)
Returns an empty queue.
queue.lisp (file)
lore-util.lisp (file)
Return a memo-function of fn.
memo.lisp (file)
Replace fn-name’s global definition with a memoized version.
memo.lisp (file)
stats.lisp (file)
Returns an intersection, as a vector.
By default assumes x and y are lists or vectors of ints sorted least to greatest.
lore-util.lisp (file)
lore-util.lisp (file)
Function that just returns nil.
function.lisp (file)
function.lisp (file)
regex.lisp (file)
regex.lisp (file)
Returns a list where every two consecutive items in LST are paired together.
i.e. (a b c d) -> ((a b) (c d))
Assumes that the list is of even length and doesn’t contain nil elements.
list.lisp (file)
lang.lisp (file)
Returns a list of all permutations of LIST.
From https://rosettacode.org/wiki/Permutations#Common_Lisp
list.lisp (file)
Returns plural of common-noun as a string. If already plural then returns as-is.
lang.lisp (file)
Returns multiple values:
t iff common-noun is plural,
the entry from +number-regexps+ that tipped us off
lang.lisp (file)
Computes a powerset of set S.
From https://rosettacode.org/wiki/Power_set#Common_Lisp
list.lisp (file)
stats.lisp (file)
lang.lisp (file)
CL version of ’println’ in Java.
The name PRINCLN is meant to reflect the CL naming conventions for prints.
io.lisp (file)
Prints a hash table readably using ALEXANDRIA:ALIST-HASH-TABLE.
hashtable.lisp (file)
Prints a hash table readably to look like Python hash tables.
hashtable.lisp (file)
lore-util.lisp (file)
lang.lisp (file)
Returns true if the queue is empty.
queue.lisp (file)
Peeks into the first item of the queue.
queue.lisp (file)
Returns T if NODE1 is reachable via a downward path from NODE2;
INDS must evaluate to the name of the indicator used to store
the list of indices of a node in the graph to which NODE1
and NODE2 belong;
INTS must evaluate to the name of the indicator used to store
the list of intervals of a node in the graph to which NODE1
and NODE2 belong.
reachability-indexing.lisp (file)
Reads all s-expressions from the given file until exhausted.
It will raise an error if the file does not contain a sequence of valid
s-expresssions.
io.lisp (file)
Reads all s-expressions from a character stream until exhausted. It will
raise an eof-error if the stream does not represent a sequence of
s-expresssions. Comments are ignored.
The handling of file-ending block comments are done by redefining the block
comment dispatch function to return the concatenation of a generated symbol
and a specific base symbol. This is only checked when we come across a ##
macro dispatch, so the method will fail if some other ## dispatch macro
returns this symbol. This is extremely unlikely, but not impossible.
The optional argument placeholder-base allows the caller to specify a placeholder that is known to not conflict with any read result.
io.lisp (file)
Reads all s-expressions from the given string.
Raises an error if the string does not represent a series of valid
s-expressions. Same as READ-ALL-FROM-FILE, but for strings.
io.lisp (file)
Reads a file line by line and return a list of strings.
io.lisp (file)
Reads a file line by line and return a list of strings.
Done in a loop so you won’t get a stack overflow even with bad compiler
parameters.
io.lisp (file)
regex.lisp (file)
Returns LST without the N-th element.
list.lisp (file)
Replace punctuation with spaces in string.
lang.lisp (file)
function.lisp (file)
string.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
Safe intern.
strsym can be a string or a symbol and it interns it.
general.lisp (file)
lore-util.lisp (file)
Evaluate symbol w.r.t. a package safely.
Evaluates a symbol with respect to the given package iff the package is
available and the symbol is found in that package.
general.lisp (file)
lore-util.lisp (file)
general.lisp (file)
lang.lisp (file)
Returns singular form of common-noun as a string. If already singular then returns as-is.
lang.lisp (file)
Returns multiple values:
t iff common-noun is singular,
the entry from +number-regexps+ that tipped us off
lang.lisp (file)
Returns a slice of LST with given indices.
START and END are inclusive and exclusive, respectively.
list.lisp (file)
lore-util.lisp (file)
Split the given literal atom into a part ending in an underscore and a part after the underscore; If there is no underscore, return nil; o/w return a list (metavar test) consisting of two atoms corresponding to the respective parts above; if there was nothing after the underscore, use test = nil.
lore-util.lisp (file)
lore-util.lisp (file)
Returns LST with CNDN filtered out followed by LST with only CNDN.
list.lisp (file)
symbol.lisp (file)
lore-util.lisp (file)
lore-util.lisp (file)
string.lisp (file)
lore-util.lisp (file)
Function that just returns t.
function.lisp (file)
time.lisp (file)
Transforms the given common-noun from singular to plural or vice-versa
depending on the value of number (’singular or ’plural).
number-entry refers to the entry in +number-regexps+ that we will be using
to do the transformation.
lang.lisp (file)
sexpr.lisp (file)
sexpr.lisp (file)
Takes a string representing a tree, returns a lisp object.
Assumes tree is represented as embedded parenthesis.
Disallowed symbols such as ’,’ will be escaped.
No matter input, output will be uppercase.
lore-util.lisp (file)
string.lisp (file)
Non-nil if a given character is a vowel.
lang.lisp (file)
Writes a list to a file. Depends on write-to-file.
io.lisp (file)
Writes a string to a file.
io.lisp (file)
Previous: Exported functions, Up: Exported definitions [Contents][Index]
queue.lisp (file)
structure-object (structure)
list
(quote nil)
queue-items (function)
(setf queue-items) (function)
list
(quote nil)
queue-tail (function)
(setf queue-tail) (function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal special variables | ||
• Internal functions |
Next: Internal special variables, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
lang.lisp (file)
lang.lisp (file)
lang.lisp (file)
Next: Internal functions, Previous: Internal constants, Up: Internal definitions [Contents][Index]
lang.lisp (file)
lang.lisp (file)
general.lisp (file)
lang.lisp (file)
lang.lisp (file)
string.lisp (file)
Previous: Internal special variables, Up: Internal definitions [Contents][Index]
queue.lisp (file)
Add index I to the INDS list of vertex R, keeping the list in ascending order.
reachability-indexing.lisp (file)
Add integer I to the INTS list of vertex R, maintaining maximal, ascending, disjoint intervals.
reachability-indexing.lisp (file)
Takes a verb, as a string, applies -ED morphology, returns string.
lang.lisp (file)
lang.lisp (file)
lang.lisp (file)
queue.lisp (file)
R is the start vertex for the depth-first labelling; it is assumed
not to have been visited yet (its vis value is nil); I is the depth-
first edge index that is to be assigned to the first unlabelled edge
encountered that leads to a terminal or already visited vertex.
The result is that all vertices which are reachable from R and, to begin
with, are not flagged as visited, are marked as visited, and all edges
that are reachable from r and, to begin with, are not indexed become
indexed with depth-first numbers.
The value returned is a pair (CYCLIC J) where CYCLIC = T if a cycle was encountered in the depth-first search, and J is the next index that can be assigned to an edge, i.e., it is the highest index that was assigned, plus 1.
reachability-indexing.lisp (file)
lore-util.lisp (file)
Inserts X to LST at the rightmost position. Destructive.
list.lisp (file)
X is a child of Y; the intervals of X are merged into the intervals of Y, maintaining maximal, ascending, disjoint integer intervals; Besides changing the INTS property of Y, the function also returns the merged intervals.
reachability-indexing.lisp (file)
Prefix ” to unsafe characters # ‘ ’ : ; , . | in ’aString’.
symbol.lisp (file)
queue.lisp (file)
queue.lisp (file)
queue.lisp (file)
lore-util.lisp (file)
Return T iff the INTS-intervals of X contain all the INTS-intervals of Y.
reachability-indexing.lisp (file)
lore-util.lisp (file)
lore-util.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: | F G L |
---|
Jump to: | F G L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A B C D E F G I K L M N O P Q R S T V W |
---|
Jump to: | %
(
A B C D E F G I 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: | *
+
C I S T |
---|
Jump to: | *
+
C I S T |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | G P Q S |
---|
Jump to: | G P Q S |
---|