This is the phoe-toolbox Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Apr 08 14:45:46 2019 GMT+0.
This is a collection of Lisp utilities that I have collected, and will have collected, over time.
All exported functions are expected to be documented.
Basically, if a stack is LIFO, if a queue is FIFO, then a bag is RIRO (random in, random out).
They are of type BAG and are created via MAKE-BAG. Contents of a bag are an unspecialized adjustable vector accessible via BAG-CONTENTS. You can BAG-INSERT an element into a bag, BAG-COUNT to get the element count, BAG-REMOVE an element from the bag and, additionally, BAG-COMPRESS the bag's internal vector.
Asserts that the provided slot is bound.
Defines an INITIALIZE-INSTANCE :AFTER method on the given object.
Defines a PRINT-OBJECT method on the given object with inserting BODY inside PRINT-UNREADABLE-OBJECT.
Defines a PRINT-OBJECT method on the given object, which depends on the value of *PRINT-READABLY*. If it is true, then the object is printed using PRINT-INSTANCE-READABLY; else, it is printed with inserting BODY inside PRINT-UNREADABLE-OBJECT.
Binds the function objects in the function namespace.
Like LET*, except each variable binding is of form (var initform . forms) where FORMS will be evaluated when leaving the LET* by means of UNWIND-PROTECT. These forms will be evaluated from last binding to first.
Like DECF, except the final value set in PLACE is always a modulus modulo DIVISOR.
Like INCF, except the final value set in PLACE is always a modulus modulo DIVISOR.
Sets the value of PLACE to its logical negation and returns the new value.
Testing macro analogous to 1AM:SIGNALS, except it does not perform a non-local transfer of control and therefore is not suitable for any code that makes calls to INVOKE-DEBUGGER. Instead, it allows the caller to assert that a condition of type CONDITION-TYPE was signaled exactly N times.
Evaluates BODY each STEP seconds until it evaluates to true, at which point it returns the value of BODY, or until TIMEOUT seconds pass, at which point it returns NIL.
Evaluates BODY each STEP seconds until it evaluates to true, at which point it returns the value of BODY.
Like WITH-OPEN-FILE, except with defaults suitable for reading from binary.
Like WITH-OPEN-FILE, except with defaults suitable for wriiting to binary.
Evaluates BODY with *PACKAGE* bound to a freshly created temporary package that will be deleted once control leaves the BODY, uninterning all symbols that were interned into it during that time.
Like ALEXANDRIA:ASSOC-VALUE, except it signals an error if the value is not found.
Given a generalized instance of STANDARD-OBJECT, returns a list of all slot names which are bound in that instance.
Concatenates targets into a string.
Concatenates targets into a string, inserting a newline between each of them.
Accepts a list of directed edges (two-element lists of EQL-comparable nodes). If the graph does not contain a cycle, returns (VALUES NIL NIL). If the graph contains a cycle, returns (VALUES T VERTEX), where VERTEX is one of the vertices in the cycle.
Like CONSTANTLY, except the returned closure may return multiple values, denoted by ARGS.
Returns the number of digits in an integer, sans any sign.
Like SUBSEQ, except the created array is an array displaced to SEQUENCE ~ and therefore shares structure with it.
Acts like FORMAT, except it calls FORCE-OUTPUT on STREAM afterwards.
Like GETHASH, except it signals an error if the value is not found.
Accepts a list of directed edges (two-element lists of EQL-comparable nodes). Returns a list of root vertices (vertices that are not pointed at).
Returns true if the string contains only digits 0-9 and lowercase/uppercase characters #A-#F, false otherwise.
Like CONSTANTLY, except the list of ARGS is returned instead.
Returns a wrapper stream around the original stream. All data read from the wrapper stream is additionally sent to DUMP-INPUT-STREAM. All data written to the wrapper stream is additionally sent to the DUMP-OUTPUT-STREAM.
Returns multiple lists of all multiple values returned by repeatedly applying FUNCTION to consecutive arguments from LISTS.
Funcall FUNCTION composed COUNT times with itself on ARGUMENT.
Like PEEK-CHAR, except it immediately returns NIL if no character is available for reading on the input stream.
Prints a hash table readably using ALEXANDRIA:ALIST-HASH-TABLE.
Prints an instance readably using the #. notation with MAKE-INSTANCE.
This function is a hack. Its functioning depends on all direct slots of a class being of form %FOO or FOO and having an initarg keyword called :FOO. All values stored in these slots need to be printable readably. Moreover, indirect slots are not restored. Before you use it, make sure you know what you are doing.
Like ALEXANDRIA:RASSOC-VALUE, except it signals an error if the value is not found.
Reads the data file from the provided pathname. The pathname should be a system relative pathname.
Returns a new string in which all the occurences of the part is replaced with replacement.
Like SUBSEQ, but handles out-of-range bounding index designators gracefully.
Collects the element of funcalling FUNCTION on successive elements of LIST, sleeping for SLEEP-INTERVAL seconds every N elements.
Separates the list into a sublist of elements for which the predicate returns true and a sublist of elements for which the predicate returns false. Returns them as two values.
Like GETF, except it tests with STRING= and is there suitable for use with strings and symbols.
Trims whitespace characters from both sides of a string.
Returns a copy of the provided tree, in which all symbols have been uninterned. The tree must not contain improper lists.
Decodes the unix time and returns its textual form in format "YYYY-MM-DD HH:MM:SS".
Given a URL, returns everything after its last slash.
Provided a list of URLs and a valid directory pathname, returns a list of pathnames that end with the filenames suitable for downloaded files.
Returns a fresh vector which is VECTOR concatenated to itself N times.
Returns true if the provided character is whitespace.
Collects a list of lists, where the first list contains the first element of the argument lists, the second list - second, etc.. The lists are as long as the shortest list.