on master help sign in
2e
e2bacd6Henry Ault
docs/system/hoon/library/src/2e/gate/.fnv.md.swpnew file

Binary file not shown.

docs/system/hoon/library/src/2e/gate/.mug.md.swpnew file

Binary file not shown.

docs/system/hoon/library/src/2e/gate/.mum.md.swpnew file

Binary file not shown.

docs/system/hoon/library/src/2e/gate/fnv.md+2−2
@@ -2,7 +2,7 @@
2
2
3Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm.
3Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm.
4Multiplies `a` by the prime number 16,777,619 and then takes the block
4Multiplies `a` by the prime number 16,777,619 and then takes the block
5−of size 5 off the product's end, producing an [atom]().
5+of size 5 off the product's end, producing an atom.
6
6
7Accepts
7Accepts
8-------
8-------
@@ -18,7 +18,7 @@ An atom.
18Source
18Source
19------
19------
20
20
21− ++ fnv |=(a=@ (end 5 1 (mul 16.777.619 a))) :: FNV scrambler
21+ ++ fnv |=(a/@ (end 5 1 (mul 16.777.619 a))) :: FNV scrambler
22
22
23Examples
23Examples
24--------
24--------
docs/system/hoon/library/src/2e/gate/mug.md+4−3
@@ -1,12 +1,12 @@
1### `++mug`
1### `++mug`
2
2
3Hashes `a` with the 31-bit nonzero FNV-1a non-cryptographic hash
3Hashes `a` with the 31-bit nonzero FNV-1a non-cryptographic hash
4−algorithm, producing an [atom]().
4+algorithm, producing an atom.
5
5
6Accepts
6Accepts
7-------
7-------
8
8
9−A is a [noun]().
9+A is a noun.
10
10
11Produces
11Produces
12--------
12--------
@@ -18,7 +18,7 @@ Source
18
18
19 ++ mug :: 31bit nonzero FNV1a
19 ++ mug :: 31bit nonzero FNV1a
20 ~/ %mug
20 ~/ %mug
21− |= a=*
21+ |= a/*
22 ?^ a
22 ?^ a
23 =+ b=[p=$(a -.a) q=$(a +.a)]
23 =+ b=[p=$(a -.a) q=$(a +.a)]
24 |- ^- @
24 |- ^- @
@@ -37,6 +37,7 @@ Source
37 ^$(b +(b))
37 ^$(b +(b))
38 $(c (fnv (mix c (cut 3 [d 1] a))), d +(d))
38 $(c (fnv (mix c (cut 3 [d 1] a))), d +(d))
39
39
40+
40Examples
41Examples
41--------
42--------
42
43
docs/system/hoon/library/src/2e/gate/mum.md+6−15
@@ -13,15 +13,15 @@ Source
13
13
14 ++ mum :: mug with murmur3
14 ++ mum :: mug with murmur3
15 ~/ %mum
15 ~/ %mum
16− |= a=*
16+ |= a/*
17 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
17 |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
18 ++ spec :: standard murmur3
18 ++ spec :: standard murmur3
19− |= [syd=@ key=@]
19+ |= {syd/@ key/@}
20 ?> (lte (met 5 syd) 1)
20 ?> (lte (met 5 syd) 1)
21 =+ ^= row
21 =+ ^= row
22− |= [a=@ b=@]
22+ |= {a/@ b/@}
23 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
23 (con (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b))
24− =+ mow=|=([a=@ b=@] (end 5 1 (mul a b)))
24+ =+ mow=|=({a/@ b/@} (end 5 1 (mul a b)))
25 =+ len=(met 5 key)
25 =+ len=(met 5 key)
26 =- =. goc (mix goc len)
26 =- =. goc (mix goc len)
27 =. goc (mix goc (rsh 4 1 goc))
27 =. goc (mix goc (rsh 4 1 goc))
@@ -35,22 +35,13 @@ Source
35 ?: =(inx len) goc
35 ?: =(inx len) goc
36 =+ kop=(cut 5 [inx 1] key)
36 =+ kop=(cut 5 [inx 1] key)
37 =. kop (mow kop 0xcc9e.2d51)
37 =. kop (mow kop 0xcc9e.2d51)
38− =. kop (row 15 kop)
38+ =. kop (row 15 kop)
39 =. kop (mow kop 0x1b87.3593)
39 =. kop (mow kop 0x1b87.3593)
40 =. goc (mix kop goc)
40 =. goc (mix kop goc)
41 =. goc (row 13 goc)
41 =. goc (row 13 goc)
42 =. goc (end 5 1 (add 0xe654.6b64 (mul 5 goc)))
42 =. goc (end 5 1 (add 0xe654.6b64 (mul 5 goc)))
43 $(inx +(inx))
43 $(inx +(inx))
44− ::
44+
45− ++ trim :: 31-bit nonzero
46− |= key=@
47− =+ syd=0xcafe.babe
48− |- ^- @
49− =+ haz=(spec syd key)
50− =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
51− ?.(=(0 ham) ham $(syd +(syd)))
52− --
53− ::
54
45
55Examples
46Examples
56--------
47--------