The ia-hash-table Reference Manual

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

The ia-hash-table Reference Manual

This is the ia-hash-table Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:51:57 2022 GMT+0.

Table of Contents


1 Introduction

IA-HASH-TABLE Build Status Coverage Status

Examples


CL-USER> (defvar ht (ia-hash-table:make-ia-hash-table))
HT
CL-USER> (setf (gethash "qwe" ht) 1)
1
CL-USER> (gethash :qwe ht)
1
T
(enable-ia-syntax)

(defparameter response (alist-ia-hash-table '(("name" . "John Smith")
                                              ("age" . 34)
                                              ("city" . "New York")
                                              ("account" . (("checking" . 36223)
                                                            ("saving" . 468300))))))

>> #Iresponse.name
"John Smith"

>> #Iresponse.account.saving
468300

>> #Iresponse.address
NIL

>> #Iresponse.address.state
The value NIL is not of type HASH-TABLE.

>> #Iresponse.address?.state
NIL

;; or even
(defparameter nil-response nil)

>> #Inil-response?.account.saving
NIL

2 Systems

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


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

2.1 ia-hash-table

Main purpose is to be able to use strings as real keys but do gethash with symbols and vice versa.
Can be useful for things like http headers parsing (no more intern leaks), json apis with/without https://github.com/AccelerationNet/access. Only tested on SBCL. Expected to work on Allegro, CCL and LW.
Also provides nil safe dot syntax

Author

Ilya Khaprov <ilya.kharpov@publitechs.com>

License

MIT

Version

0.2.1

Dependencies
  • alexandria (system).
  • split-sequence (system).
Source

ia-hash-table.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


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

3.1 ia-hash-table/src

Source

ia-hash-table.asd.

Parent Component

ia-hash-table (system).

Child Components

4 Files

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


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

4.1 Lisp


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

4.1.1 ia-hash-table/ia-hash-table.asd

Source

ia-hash-table.asd.

Parent Component

ia-hash-table (system).

ASDF Systems

ia-hash-table.


4.1.2 ia-hash-table/src/package.lisp

Source

ia-hash-table.asd.

Parent Component

src (module).

Packages

ia-hash-table.


4.1.3 ia-hash-table/src/ia-hash-table.lisp

Dependency

package.lisp (file).

Source

ia-hash-table.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 ia-hash-table/src/reader.lisp

Dependency

ia-hash-table.lisp (file).

Source

ia-hash-table.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


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

5.1 ia-hash-table

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

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


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

6.1 Public Interface


6.1.1 Macros

Macro: disable-ia-syntax ()
Package

ia-hash-table.

Source

reader.lisp.

Macro: enable-ia-syntax ()
Package

ia-hash-table.

Source

reader.lisp.


Previous: , Up: Public Interface   [Contents][Index]

6.1.2 Ordinary functions

Function: alist-ia-hash-table (alist &rest hash-table-initargs)

Adopted version of alexandria:alist-hash-table

Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: make-ia-hash-table (&rest options)
Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: plist-ia-hash-table (plist &rest hash-table-initargs)

Adopted version of alexandria:plist-hash-table

Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: string-equalp (f1 f2)
Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: string-sxhash (f)
Package

ia-hash-table.

Source

ia-hash-table.lisp.


6.2 Internals


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

6.2.1 Special variables

Special Variable: *previous-readtables*

A stack which holds the previous readtables that have been pushed here by ENABLE-IA-SYNTAX.

Package

ia-hash-table.

Source

reader.lisp.


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

6.2.2 Ordinary functions

Function: %disable-ia-syntax ()

Internal function used to restore previous readtable.

Package

ia-hash-table.

Source

reader.lisp.

Function: %enable-ia-syntax ()
Package

ia-hash-table.

Source

reader.lisp.

Function: deep-alist-ia-hash-table (value hash-table-initargs)
Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: gen-get-deep-hash (ht keys)
Package

ia-hash-table.

Source

reader.lisp.

Function: gen-get-deep-hash-nullables (ht keys)
Package

ia-hash-table.

Source

reader.lisp.

Function: gen-get-deep-hash-w/o-nullables (ht keys)
Package

ia-hash-table.

Source

reader.lisp.

Function: have-nullable-p (keys)
Package

ia-hash-table.

Source

reader.lisp.

Function: ia-syntax-reader (stream char arg)
Package

ia-hash-table.

Source

reader.lisp.

Function: list-is-alist (list)
Package

ia-hash-table.

Source

ia-hash-table.lisp.

Function: parse-key (key)
Package

ia-hash-table.

Source

reader.lisp.

Function: process-?. (keys)
Package

ia-hash-table.

Source

reader.lisp.

Function: process-elt-key (key)
Package

ia-hash-table.

Source

reader.lisp.

Function: safe-aref (vector index)
Package

ia-hash-table.

Source

reader.lisp.


6.2.3 Types

Type: alist ()
Package

ia-hash-table.

Source

ia-hash-table.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   %  
A   D   E   F   G   H   I   L   M   P   S  
Index Entry  Section

%
%disable-ia-syntax: Private ordinary functions
%enable-ia-syntax: Private ordinary functions

A
alist-ia-hash-table: Public ordinary functions

D
deep-alist-ia-hash-table: Private ordinary functions
disable-ia-syntax: Public macros

E
enable-ia-syntax: Public macros

F
Function, %disable-ia-syntax: Private ordinary functions
Function, %enable-ia-syntax: Private ordinary functions
Function, alist-ia-hash-table: Public ordinary functions
Function, deep-alist-ia-hash-table: Private ordinary functions
Function, gen-get-deep-hash: Private ordinary functions
Function, gen-get-deep-hash-nullables: Private ordinary functions
Function, gen-get-deep-hash-w/o-nullables: Private ordinary functions
Function, have-nullable-p: Private ordinary functions
Function, ia-syntax-reader: Private ordinary functions
Function, list-is-alist: Private ordinary functions
Function, make-ia-hash-table: Public ordinary functions
Function, parse-key: Private ordinary functions
Function, plist-ia-hash-table: Public ordinary functions
Function, process-?.: Private ordinary functions
Function, process-elt-key: Private ordinary functions
Function, safe-aref: Private ordinary functions
Function, string-equalp: Public ordinary functions
Function, string-sxhash: Public ordinary functions

G
gen-get-deep-hash: Private ordinary functions
gen-get-deep-hash-nullables: Private ordinary functions
gen-get-deep-hash-w/o-nullables: Private ordinary functions

H
have-nullable-p: Private ordinary functions

I
ia-syntax-reader: Private ordinary functions

L
list-is-alist: Private ordinary functions

M
Macro, disable-ia-syntax: Public macros
Macro, enable-ia-syntax: Public macros
make-ia-hash-table: Public ordinary functions

P
parse-key: Private ordinary functions
plist-ia-hash-table: Public ordinary functions
process-?.: Private ordinary functions
process-elt-key: Private ordinary functions

S
safe-aref: Private ordinary functions
string-equalp: Public ordinary functions
string-sxhash: Public ordinary functions

Jump to:   %  
A   D   E   F   G   H   I   L   M   P   S  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*previous-readtables*: Private special variables

S
Special Variable, *previous-readtables*: Private special variables

Jump to:   *  
S