The digikar-utilities Reference Manual

Table of Contents

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

The digikar-utilities Reference Manual

This is the digikar-utilities Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 14:49:09 2019 GMT+0.


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

1 Introduction

Background and Introduction

WARNING: This will modify your read-table.

This is yet another utility library for common lisp. (Several libraries can be found at cliki. Notable ones besides those include Alexandria and cl21. There's also a good discussion on reddit about "fixing" common lisp.

I don't think it is good enough yet; therefore, I'm using a personalized name - in case someone comes up with a "God" level library, let them use a good name. (Learnt over reddit that one should give a good name, only after it is proven to be good. And it is reasonable: we don't want to waste good names. :p)

Detailed documentation is available on github pages.

The library is still unreleased, and therefore, subject to changes.

Undocumented

    CL-USER> (digikar-utilities:getf-equal '("a" "b" "c" "d") "a")
    "b"

    CL-USER> (digikar-utilities.logic:gen-truth-table (a b c) (and a b c))
    ((T (T T T)) (NIL (T T NIL)) (NIL (T NIL T)) (NIL (T NIL NIL)) (NIL (NIL T T))
     (NIL (NIL T NIL)) (NIL (NIL NIL T)) (NIL (NIL NIL NIL)))
    (A B C)
    

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 digikar-utilities

Author

Maintained by Shubhamkar Ayare (shubhamayare@yahoo.co.in)

License

MIT

Description

A utility library, primarily intended to provide an easy interface to vectors and hash-tables.

Dependency

alexandria

Source

digikar-utilities.asd (file)

Component

digikar-utilities.lisp (file)


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 digikar-utilities.asd

Location

digikar-utilities.asd

Systems

digikar-utilities (system)


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

3.1.2 digikar-utilities/digikar-utilities.lisp

Parent

digikar-utilities (system)

Location

digikar-utilities.lisp

Packages
Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 digikar-utilities

Source

digikar-utilities.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

4.2 digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

gen-all-cases (function)


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: gen-truth-table SYMBOLS EXPRESSION

Generate truth table of expression. symbols should be a list of all the boolean variables present in expr.

Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Macro: list-case LIST &rest CLAUSES

Case using different lengths of list.
Example: CL-USER> (list-case ’(1 2 3)
((x y) (+ x y))
((x y z) (- (+ x y) z))) 0

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Macro: nand &rest ARGS
Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Macro: nor &rest ARGS
Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)


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

5.1.2 Compiler macros

Compiler Macro: get-val OBJECT KEY &optional INTENDED-TYPE-OF-OBJECT

Get the value associated with KEY in OBJECT.
Optionally, specify the type of OBJECT in INTENDED-TYPE-OF-OBJECT. Pass the indexes as a list in case of an array.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Compiler Macro: slice SEQUENCE &optional START END INTERVAL ALLOW-NEGATIVE-INDICES &key TYPE
Package

digikar-utilities

Source

digikar-utilities.lisp (file)


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

5.1.3 Functions

Function: -> X Y

Truth value of x implies y

Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Function: <- X Y

Truth value of y implies x

Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Function: <> X Y

Truth value of x if and only if y

Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Function: get-val OBJECT KEY &optional INTENDED-TYPE-OF-OBJECT

Get the value associated with KEY in OBJECT.
Optionally, specify the type of OBJECT in INTENDED-TYPE-OF-OBJECT. Pass the indexes as a list in case of an array.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Writer

(setf get-val) (function)

Function: (setf get-val) VALUE OBJECT KEY &optional INTENDED-TYPE-OF-OBJECT

Set the value associated with KEY in OBJECT to VALUE. (is destructive) Optionally, specify the type of OBJECT in INTENDED-TYPE-OF-OBJECT. Pass the indexes as a list in case of an array.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Reader

get-val (function)

Function: getf-equal PLIST INDICATOR

getf using #’equal for comparison

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: join-strings-using DELIMITER-STRING &rest ARGS
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: prefix-to-infix EXPR
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-file FILENAME

Read and returns the first lisp-object from file filename.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: replace-all STRING PART REPLACEMENT &key TEST

Returns a new string in which all the occurences of the part is replaced with replacement. Credits: Common Lisp Cookbook

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: slice SEQUENCE &optional START END INTERVAL ALLOW-NEGATIVE-INDICES &key TYPE

Equivalent of the python list slicing.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: slice-list SEQUENCE &optional START END INTERVAL ALLOW-NEGATIVE-INDICES
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: slice-string SEQUENCE &optional START END INTERVAL ALLOW-NEGATIVE-INDICES
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: slice-vector SEQUENCE &optional START END INTERVAL ALLOW-NEGATIVE-INDICES
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: write-file FILENAME LISP-OBJECT &optional IF-EXISTS

Writes the lisp-object to file filename, overwrites if the file already exists.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)


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

5.1.4 Generic functions

Generic Function: shallow-copy OBJECT &rest INITARGS &key &allow-other-keys

Makes and returns a shallow copy of OBJECT.

An uninitialized object of the same class as OBJECT is allocated by calling ALLOCATE-INSTANCE. For all slots returned by CLASS-SLOTS, the returned object has the
same slot values and slot-unbound status as OBJECT.

REINITIALIZE-INSTANCE is called to update the copy with INITARGS.

Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Methods
Method: shallow-copy (OBJECT standard-object) &rest INITARGS &key &allow-other-keys

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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +left-brace+
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Constant: +left-square+
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Constant: +right-brace+
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Constant: +right-square+
Package

digikar-utilities

Source

digikar-utilities.lisp (file)


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

5.2.2 Functions

Function: gen-all-cases SYM
Package

digikar-utilities.logic

Source

digikar-utilities.lisp (file)

Function: normalize START END INTERVAL LENGTH ALLOW-NEGATIVE-INDICES
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-delimiter STREAM CHAR
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-hash-table STREAM CHAR N
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-hash-table-literally STREAM CHAR
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-next-object DELIMITER &optional INPUT-STREAM
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-vector STREAM CHAR N
Package

digikar-utilities

Source

digikar-utilities.lisp (file)

Function: read-vector-literally STREAM CHAR
Package

digikar-utilities

Source

digikar-utilities.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
digikar-utilities.asd: The digikar-utilities<dot>asd file
digikar-utilities/digikar-utilities.lisp: The digikar-utilities/digikar-utilities<dot>lisp file

F
File, Lisp, digikar-utilities.asd: The digikar-utilities<dot>asd file
File, Lisp, digikar-utilities/digikar-utilities.lisp: The digikar-utilities/digikar-utilities<dot>lisp file

L
Lisp File, digikar-utilities.asd: The digikar-utilities<dot>asd file
Lisp File, digikar-utilities/digikar-utilities.lisp: The digikar-utilities/digikar-utilities<dot>lisp file

Jump to:   D   F   L  

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

A.2 Functions

Jump to:   (   -   <  
C   F   G   J   L   M   N   P   R   S   W  
Index Entry  Section

(
(setf get-val): Exported functions

-
->: Exported functions

<
<-: Exported functions
<>: Exported functions

C
Compiler Macro, get-val: Exported compiler macros
Compiler Macro, slice: Exported compiler macros

F
Function, (setf get-val): Exported functions
Function, ->: Exported functions
Function, <-: Exported functions
Function, <>: Exported functions
Function, gen-all-cases: Internal functions
Function, get-val: Exported functions
Function, getf-equal: Exported functions
Function, join-strings-using: Exported functions
Function, normalize: Internal functions
Function, prefix-to-infix: Exported functions
Function, read-delimiter: Internal functions
Function, read-file: Exported functions
Function, read-hash-table: Internal functions
Function, read-hash-table-literally: Internal functions
Function, read-next-object: Internal functions
Function, read-vector: Internal functions
Function, read-vector-literally: Internal functions
Function, replace-all: Exported functions
Function, slice: Exported functions
Function, slice-list: Exported functions
Function, slice-string: Exported functions
Function, slice-vector: Exported functions
Function, write-file: Exported functions

G
gen-all-cases: Internal functions
gen-truth-table: Exported macros
Generic Function, shallow-copy: Exported generic functions
get-val: Exported compiler macros
get-val: Exported functions
getf-equal: Exported functions

J
join-strings-using: Exported functions

L
list-case: Exported macros

M
Macro, gen-truth-table: Exported macros
Macro, list-case: Exported macros
Macro, nand: Exported macros
Macro, nor: Exported macros
Method, shallow-copy: Exported generic functions

N
nand: Exported macros
nor: Exported macros
normalize: Internal functions

P
prefix-to-infix: Exported functions

R
read-delimiter: Internal functions
read-file: Exported functions
read-hash-table: Internal functions
read-hash-table-literally: Internal functions
read-next-object: Internal functions
read-vector: Internal functions
read-vector-literally: Internal functions
replace-all: Exported functions

S
shallow-copy: Exported generic functions
shallow-copy: Exported generic functions
slice: Exported compiler macros
slice: Exported functions
slice-list: Exported functions
slice-string: Exported functions
slice-vector: Exported functions

W
write-file: Exported functions

Jump to:   (   -   <  
C   F   G   J   L   M   N   P   R   S   W  

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

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+left-brace+: Internal constants
+left-square+: Internal constants
+right-brace+: Internal constants
+right-square+: Internal constants

C
Constant, +left-brace+: Internal constants
Constant, +left-square+: Internal constants
Constant, +right-brace+: Internal constants
Constant, +right-square+: Internal constants

Jump to:   +  
C  

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

A.4 Data types

Jump to:   D   P   S  
Index Entry  Section

D
digikar-utilities: The digikar-utilities system
digikar-utilities: The digikar-utilities package
digikar-utilities.logic: The digikar-utilities<dot>logic package

P
Package, digikar-utilities: The digikar-utilities package
Package, digikar-utilities.logic: The digikar-utilities<dot>logic package

S
System, digikar-utilities: The digikar-utilities system

Jump to:   D   P   S