The darts.lib.uuid Reference Manual

Table of Contents

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

The darts.lib.uuid Reference Manual

This is the darts.lib.uuid Reference Manual, version 0.1, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 15:30:26 2019 GMT+0.


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

1 Introduction

UUID Library

This is a simple library to work with UUID values. The library primarily uses the Leach-Salz variant of UUIDs, but can represent all kinds of UUIDs.

Documentation

Types

Comparing and Hashing

Values of type UUID can be compared for equality as well as order. The ordering on UUIDs is total, i.e., every two UUID instances v1 and v2 can be compared, and exactly one of

will answer true. The ordering carefully reflects the lexicographic ordering of the string representations of UUIDs, i.e., it is always the case that

where XX is one of <, <=, =, >=, >, /=. Note, that the actual implementation of the predicates is more efficient than that.

The hash function can be used in Common Lisp implementations, which support custom hash functions

For example, in CCL

(make-hash-table :test 'uuid= :hash-function 'uuid-hash)

In SBCL you can

(sb-ext:define-hash-table-test uuid= #'uuid-hash)

and then use this as

(make-hash-table :test 'uuid=)

(but

(make-hash-table :test #'uuid= :hash-function #'uuid-hash)

will work there, too)

The ordering predicates can be used with data structures like FSet and WBTree:

(define-wbtree uuid-wbtree 
  (:key uuid)
  (:test uuid<)
  (:documentation "A weight-balanced binary tree, whose keys are
    UUID values."))
    
(defvar *mapping* (make-uuid-wbtree (list "F664863A-B3D9-4EF4-BB22-E1061F0010D6" 'stuff)))

*mapping* ;; => #<UUID-WBTREE #<UUID F664863A-B3D9-4EF4-BB22-E1061F0010D6> STUFF 1>

Reading and Writing

Conversions

Special Constructors

Format Information

The following functions extract information about variant and version of a UUID value. Certain extractor functions (like uuid-clock-sequence, uuid-timestamp, etc.) are meaningful only for certain variants, if at all. These functions are provided for completeness, but I have yet to find a reason for using any of them...

Compatibility with System UUID

The UUID provided by this library is comparable to the one provided by the UUID library with the following differences

You can convert between uuid:uuid and darts.lib.uuid:uuid values, for example, by

(defvar *uuid-uuid* (uuid:make-v1-uuid))
(defvar *darts-uuid* (darts.lib.uuid:uuid (uuid:uuid-to-byte-array *uuid-uuid*)))

and

(defvar *darts-uuid-2* (darts.lib.uuid:random-uuid))
(defvar *uuid-uuid-2* (uuid:byte-array-to-uuid (darts.lib.uuid:uuid-bytes *darts-uuid-2*)))

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 darts.lib.uuid

Maintainer

Dirk Esser

Author

Dirk Esser

License

MIT

Description

Simple library to handle UUID values

Long Description
Version

0.1

Dependencies
Source

darts.lib.uuid.asd (file)

Component

src (module)


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

3 Modules

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


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

3.1 darts.lib.uuid/src

Parent

darts.lib.uuid (system)

Location

src/

Components

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

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 files   [Contents][Index]

4.1.1 darts.lib.uuid.asd

Location

darts.lib.uuid.asd

Systems

darts.lib.uuid (system)

Packages

darts.asdf


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

4.1.2 darts.lib.uuid/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

darts.lib.uuid


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

4.1.3 darts.lib.uuid/src/uuid.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/uuid.lisp

Exported Definitions
Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 darts.asdf

Source

darts.lib.uuid.asd

Use List

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

5.2 darts.lib.uuid

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Functions

Function: parse-uuid VALUE &key START END
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: print-uuid OBJECT &key STREAM BRACES DOWNCASE
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: random-uuid &key GENERATOR RANDOM-STATE

Construct a new random UUID. If ‘generator‘ is supplied, it must be a function callable with a single argument (the number of random bytes to generate), which answers an array of "random" ‘(unsigned-byte 8)‘ numbers. If no generator function is provided, the UUID is generated using Lisp’s built-in ‘random‘ function, passing the given ‘random-state‘ along, which defaults to the value of the global ‘*random-state*‘ variable.

Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-bytes OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-clock-sequence OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-for-name STRING &key START END DIGEST NAMESPACE
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-hash OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-node OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-number OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-string OBJECT &key BRACES DOWNCASE
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-string-p OBJECT &key LENIENT BRACES
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-timestamp OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-variant OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-version OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid/= U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid< U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid<= U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid= U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid> U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid>= U1 U2
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuidp OBJECT
Package

darts.lib.uuid

Source

uuid.lisp (file)


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

6.1.2 Structures

Structure: uuid ()
Package

darts.lib.uuid

Source

uuid.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
  • make-load-form (method)
  • print-object (method)
Direct slots
Slot: low-word
Type

(unsigned-byte 64)

Initform

(error "missing low word")

Readers

uuid-low-word (function)

Writers

(setf uuid-low-word) (function)

Slot: high-word
Type

(unsigned-byte 64)

Initform

(error "missing high word")

Readers

uuid-high-word (function)

Writers

(setf uuid-high-word) (function)


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

6.2 Internal definitions


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

6.2.1 Functions

Function: %make-uuid LOW-WORD HIGH-WORD
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: set-version BUFFER VERSION
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-high-word INSTANCE
Package

darts.lib.uuid

Source

uuid.lisp (file)

Function: uuid-low-word INSTANCE
Package

darts.lib.uuid

Source

uuid.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   D   F   L   M  
Index Entry  Section

D
darts.lib.uuid.asd: The darts<dot>lib<dot>uuid<dot>asd file
darts.lib.uuid/src: The darts<dot>lib<dot>uuid/src module
darts.lib.uuid/src/package.lisp: The darts<dot>lib<dot>uuid/src/package<dot>lisp file
darts.lib.uuid/src/uuid.lisp: The darts<dot>lib<dot>uuid/src/uuid<dot>lisp file

F
File, Lisp, darts.lib.uuid.asd: The darts<dot>lib<dot>uuid<dot>asd file
File, Lisp, darts.lib.uuid/src/package.lisp: The darts<dot>lib<dot>uuid/src/package<dot>lisp file
File, Lisp, darts.lib.uuid/src/uuid.lisp: The darts<dot>lib<dot>uuid/src/uuid<dot>lisp file

L
Lisp File, darts.lib.uuid.asd: The darts<dot>lib<dot>uuid<dot>asd file
Lisp File, darts.lib.uuid/src/package.lisp: The darts<dot>lib<dot>uuid/src/package<dot>lisp file
Lisp File, darts.lib.uuid/src/uuid.lisp: The darts<dot>lib<dot>uuid/src/uuid<dot>lisp file

M
Module, darts.lib.uuid/src: The darts<dot>lib<dot>uuid/src module

Jump to:   D   F   L   M  

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

A.2 Functions

Jump to:   %  
F   P   R   S   U  
Index Entry  Section

%
%make-uuid: Internal functions

F
Function, %make-uuid: Internal functions
Function, parse-uuid: Exported functions
Function, print-uuid: Exported functions
Function, random-uuid: Exported functions
Function, set-version: Internal functions
Function, uuid: Exported functions
Function, uuid-bytes: Exported functions
Function, uuid-clock-sequence: Exported functions
Function, uuid-for-name: Exported functions
Function, uuid-hash: Exported functions
Function, uuid-high-word: Internal functions
Function, uuid-low-word: Internal functions
Function, uuid-node: Exported functions
Function, uuid-number: Exported functions
Function, uuid-string: Exported functions
Function, uuid-string-p: Exported functions
Function, uuid-timestamp: Exported functions
Function, uuid-variant: Exported functions
Function, uuid-version: Exported functions
Function, uuid/=: Exported functions
Function, uuid<: Exported functions
Function, uuid<=: Exported functions
Function, uuid=: Exported functions
Function, uuid>: Exported functions
Function, uuid>=: Exported functions
Function, uuidp: Exported functions

P
parse-uuid: Exported functions
print-uuid: Exported functions

R
random-uuid: Exported functions

S
set-version: Internal functions

U
uuid: Exported functions
uuid-bytes: Exported functions
uuid-clock-sequence: Exported functions
uuid-for-name: Exported functions
uuid-hash: Exported functions
uuid-high-word: Internal functions
uuid-low-word: Internal functions
uuid-node: Exported functions
uuid-number: Exported functions
uuid-string: Exported functions
uuid-string-p: Exported functions
uuid-timestamp: Exported functions
uuid-variant: Exported functions
uuid-version: Exported functions
uuid/=: Exported functions
uuid<: Exported functions
uuid<=: Exported functions
uuid=: Exported functions
uuid>: Exported functions
uuid>=: Exported functions
uuidp: Exported functions

Jump to:   %  
F   P   R   S   U  

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

A.3 Variables

Jump to:   H   L   S  
Index Entry  Section

H
high-word: Exported structures

L
low-word: Exported structures

S
Slot, high-word: Exported structures
Slot, low-word: Exported structures

Jump to:   H   L   S  

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

A.4 Data types

Jump to:   D   P   S   U  
Index Entry  Section

D
darts.asdf: The darts<dot>asdf package
darts.lib.uuid: The darts<dot>lib<dot>uuid system
darts.lib.uuid: The darts<dot>lib<dot>uuid package

P
Package, darts.asdf: The darts<dot>asdf package
Package, darts.lib.uuid: The darts<dot>lib<dot>uuid package

S
Structure, uuid: Exported structures
System, darts.lib.uuid: The darts<dot>lib<dot>uuid system

U
uuid: Exported structures

Jump to:   D   P   S   U