The cl-libfarmhash Reference Manual

This is the cl-libfarmhash Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon May 15 04:03:29 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-libfarmhash

Common Lisp Binding for Google’s Farmhash.

Author

David Gu

License

MIT

Long Description

# cl-libfarmhash - Common Lisp Binding for Google’s [Farmhash](https://github.com/google/farmhash).

<a href="http://quickdocs.org/cl-libfarmhash"><img src="http://quickdocs.org/badge/cl-libfarmhash.svg" /></a>

## Usage

**note:** _all results shown below are from a 64bit Mac OS platform._

### farmhash

“‘common-lisp
FARM> (farmhash "test")
2929758365
“‘

### farmhash32

“‘common-lisp
FARM> (farmhash32 "test")
168770635
“‘

### farmhash32-with-seed

“‘common-lisp
FARM> (farmhash32-with-seed "test" 12345)
687740529
“‘

### farmhash64

“‘common-lisp
FARM> (farmhash64 "test")
656818571139125405
“‘

### farmhash64-with-seed

“‘common-lisp
FARM> (farmhash64-with-seed "test" 12345)
1329645378812687902
“‘

### farmhash64-with-seeds

“‘common-lisp
FARM> (farmhash64-with-seeds "test" 12345 54321)
2807312541950536949
“‘

### farmhash128

“‘common-lisp
FARM> (farmhash128 "test")
278051559519782271719215074689603618262
“‘

### farmhash128-with-seed

“‘common-lisp
FARM> (farmhash128-with-seed "test" 1234554321)
8373479877626909324346027983011427843
“‘

### farmhash-fingerprint32

“‘common-lisp
FARM> (farmhash-fingerprint32 "test")
1633095781
“‘

### farmhash-fingerprint64

“‘common-lisp
FARM> (farmhash-fingerprint64 "test")
8581389452482819506
“‘

### farmhash-fingerprint128

“‘common-lisp
FARM> (farmhash-fingerprint128 "test")
334882099032867325754781607143811124132
“‘

## Installation

Just ‘(ql:quickload :cl-libfarmhash)‘. All exported functions has been simply tested on ‘SBCL‘, ‘CCL‘, ‘Allegro CL‘ and ‘LispWorks‘.

## Author

* David Gu (macdavid313@gmail.com)

## Copyright

Copyright (c) 2016 David Gu (macdavid313@gmail.com)

Version

0.1

Dependencies
  • cffi (system).
  • cffi-libffi (system).
Source

cl-libfarmhash.asd.

Child Component

src (module).


3 Modules

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


3.1 cl-libfarmhash/src

Source

cl-libfarmhash.asd.

Parent Component

cl-libfarmhash (system).

Child Component

cl-libfarmhash.lisp (file).


4 Files

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


4.1 Lisp


4.1.1 cl-libfarmhash/cl-libfarmhash.asd

Source

cl-libfarmhash.asd.

Parent Component

cl-libfarmhash (system).

ASDF Systems

cl-libfarmhash.

Packages

cl-libfarmhash-asd.


4.1.2 cl-libfarmhash/src/cl-libfarmhash.lisp

Source

cl-libfarmhash.asd.

Parent Component

src (module).

Packages

cl-libfarmhash.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 cl-libfarmhash

Source

cl-libfarmhash.lisp.

Nicknames
  • farm
  • farmhash
  • libfarmhash
Use List

common-lisp.

Public Interface
Internals

5.2 cl-libfarmhash-asd

Source

cl-libfarmhash.asd.

Use List
  • asdf/interface.
  • common-lisp.

6 Definitions

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


6.1 Public Interface


6.1.1 Ordinary functions

Function: farmhash (string)

Hash function for a byte array.
May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash-fingerprint128 (string)

Fingerprint function for a byte array.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash-fingerprint32 (string)

Fingerprint function for a byte array. Most useful in 32-bit binaries.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash-fingerprint64 (string)

Fingerprint function for a byte array.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash128 (string)

Hash function for a byte array.
May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash128-with-seed (string seed)

Hash function for a byte array. For convenience, a 128-bit seed is also hashed into the result. May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash32 (string)

Hash function for a byte array. Most useful in 32-bit binaries.
May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash32-with-seed (string seed)

Hash function for a byte array. For convenience, a 32-bit seed is also hashed into the result. May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash64 (string)

Hash 128 input bits down to 64 bits of output.
Hash function for a byte array.
May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash64-with-seed (string seed)

Hash function for a byte array. For convenience, a 64-bit seed is also hashed into the result. May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Function: farmhash64-with-seeds (string seed0 seed1)

Hash function for a byte array. For convenience, two seeds are also hashed into the result. May change from time to time, may differ on different platforms, may differ depending on NDEBUG.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.


6.1.2 Standalone methods

Method: translate-from-foreign (ptr (type uint128-tclass))

Translate a c struct, ‘uint128‘, to a Lisp integer.

Package

cffi.

Source

cl-libfarmhash.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *cc*
Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Special Variable: *ext-path*
Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Special Variable: *root-path*
Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.


6.2.2 Macros

Macro: define-farmhash-function (name return-type docstring &rest other-args)

A macro that helps define Farmhash API functions.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.


6.2.3 Ordinary functions

Function: split-128bit-number-to-64bit (number)

Given a number, retruns its low 64bit and high 64bit.

Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.


6.2.4 Classes

Class: uint128-tclass
Package

cl-libfarmhash.

Source

cl-libfarmhash.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.
Direct methods

translate-from-foreign.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   D   F   M   S   T  
Index Entry  Section

D
define-farmhash-function: Private macros

F
farmhash: Public ordinary functions
farmhash-fingerprint128: Public ordinary functions
farmhash-fingerprint32: Public ordinary functions
farmhash-fingerprint64: Public ordinary functions
farmhash128: Public ordinary functions
farmhash128-with-seed: Public ordinary functions
farmhash32: Public ordinary functions
farmhash32-with-seed: Public ordinary functions
farmhash64: Public ordinary functions
farmhash64-with-seed: Public ordinary functions
farmhash64-with-seeds: Public ordinary functions
Function, farmhash: Public ordinary functions
Function, farmhash-fingerprint128: Public ordinary functions
Function, farmhash-fingerprint32: Public ordinary functions
Function, farmhash-fingerprint64: Public ordinary functions
Function, farmhash128: Public ordinary functions
Function, farmhash128-with-seed: Public ordinary functions
Function, farmhash32: Public ordinary functions
Function, farmhash32-with-seed: Public ordinary functions
Function, farmhash64: Public ordinary functions
Function, farmhash64-with-seed: Public ordinary functions
Function, farmhash64-with-seeds: Public ordinary functions
Function, split-128bit-number-to-64bit: Private ordinary functions

M
Macro, define-farmhash-function: Private macros
Method, translate-from-foreign: Public standalone methods

S
split-128bit-number-to-64bit: Private ordinary functions

T
translate-from-foreign: Public standalone methods