mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
Transcript updates
This commit is contained in:
parent
b3c4f9d87f
commit
a320820bc3
File diff suppressed because it is too large
Load Diff
@ -122,20 +122,29 @@ And here's the full API:
|
||||
```ucm
|
||||
.builtin.crypto> find
|
||||
|
||||
1. hash : HashAlgorithm -> a -> ##Bytes
|
||||
2. builtin type HashAlgorithm
|
||||
3. HashAlgorithm.Blake2b_256 : HashAlgorithm
|
||||
4. HashAlgorithm.Blake2b_512 : HashAlgorithm
|
||||
5. HashAlgorithm.Blake2s_256 : HashAlgorithm
|
||||
6. HashAlgorithm.Md5 : HashAlgorithm
|
||||
7. HashAlgorithm.Sha1 : HashAlgorithm
|
||||
8. HashAlgorithm.Sha2_256 : HashAlgorithm
|
||||
9. HashAlgorithm.Sha2_512 : HashAlgorithm
|
||||
10. HashAlgorithm.Sha3_256 : HashAlgorithm
|
||||
11. HashAlgorithm.Sha3_512 : HashAlgorithm
|
||||
12. hashBytes : HashAlgorithm -> ##Bytes -> ##Bytes
|
||||
13. hmac : HashAlgorithm -> ##Bytes -> a -> ##Bytes
|
||||
14. hmacBytes : HashAlgorithm -> ##Bytes -> ##Bytes -> ##Bytes
|
||||
1. type CryptoFailure
|
||||
2. Ed25519.sign.impl : ##Bytes
|
||||
-> ##Bytes
|
||||
-> ##Bytes
|
||||
-> #0o7mf021fo #r29dja8j9d ##Bytes
|
||||
3. Ed25519.verify.impl : ##Bytes
|
||||
-> ##Bytes
|
||||
-> ##Bytes
|
||||
-> #0o7mf021fo #r29dja8j9d ##Boolean
|
||||
4. hash : HashAlgorithm -> a -> ##Bytes
|
||||
5. builtin type HashAlgorithm
|
||||
6. HashAlgorithm.Blake2b_256 : HashAlgorithm
|
||||
7. HashAlgorithm.Blake2b_512 : HashAlgorithm
|
||||
8. HashAlgorithm.Blake2s_256 : HashAlgorithm
|
||||
9. HashAlgorithm.Md5 : HashAlgorithm
|
||||
10. HashAlgorithm.Sha1 : HashAlgorithm
|
||||
11. HashAlgorithm.Sha2_256 : HashAlgorithm
|
||||
12. HashAlgorithm.Sha2_512 : HashAlgorithm
|
||||
13. HashAlgorithm.Sha3_256 : HashAlgorithm
|
||||
14. HashAlgorithm.Sha3_512 : HashAlgorithm
|
||||
15. hashBytes : HashAlgorithm -> ##Bytes -> ##Bytes
|
||||
16. hmac : HashAlgorithm -> ##Bytes -> a -> ##Bytes
|
||||
17. hmacBytes : HashAlgorithm -> ##Bytes -> ##Bytes -> ##Bytes
|
||||
|
||||
|
||||
.> cd .
|
||||
|
@ -81,7 +81,7 @@ The `builtins.merge` command adds the known builtins to a `builtin` subnamespace
|
||||
70. Value (builtin type)
|
||||
71. Value/ (5 terms)
|
||||
72. bug (a -> b)
|
||||
73. crypto/ (13 terms, 1 type)
|
||||
73. crypto/ (15 terms, 2 types)
|
||||
74. io2/ (135 terms, 32 types)
|
||||
75. metadata/ (2 terms)
|
||||
76. todo (a -> b)
|
||||
|
@ -23,7 +23,7 @@ Technically, the definitions all exist, but they have no names. `builtins.merge`
|
||||
|
||||
.foo> ls
|
||||
|
||||
1. builtin/ (453 terms, 70 types)
|
||||
1. builtin/ (455 terms, 71 types)
|
||||
|
||||
```
|
||||
And for a limited time, you can get even more builtin goodies:
|
||||
@ -35,7 +35,7 @@ And for a limited time, you can get even more builtin goodies:
|
||||
|
||||
.foo> ls
|
||||
|
||||
1. builtin/ (625 terms, 88 types)
|
||||
1. builtin/ (627 terms, 89 types)
|
||||
|
||||
```
|
||||
More typically, you'd start out by pulling `base.
|
||||
|
@ -119,13 +119,13 @@ it's still in the `history` of the parent namespace and can be resurrected at an
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #733ouv89e4
|
||||
⊙ 1. #1qpabd7ooq
|
||||
|
||||
- Deletes:
|
||||
|
||||
feature1.y
|
||||
|
||||
⊙ 2. #nomh416gj1
|
||||
⊙ 2. #jhqb98218p
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -136,26 +136,26 @@ it's still in the `history` of the parent namespace and can be resurrected at an
|
||||
Original name New name(s)
|
||||
feature1.y master.y
|
||||
|
||||
⊙ 3. #bsnvm0os4j
|
||||
⊙ 3. #n25372gm2b
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
feature1.y
|
||||
|
||||
⊙ 4. #gipijd9j3c
|
||||
⊙ 4. #b9s4c5ut48
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
x master.x
|
||||
|
||||
⊙ 5. #2dhojv53dl
|
||||
⊙ 5. #9uq9mhup43
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
x
|
||||
|
||||
□ 6. #gndb53fevj (start of history)
|
||||
□ 6. #8f47abto6r (start of history)
|
||||
|
||||
```
|
||||
To resurrect an old version of a namespace, you can learn its hash via the `history` command, then use `fork #namespacehash .newname`.
|
||||
|
@ -80,7 +80,7 @@ Should be able to move the term, type, and namespace, including its types, terms
|
||||
1. Bar (Nat)
|
||||
2. Bar (type)
|
||||
3. Bar/ (4 terms, 1 type)
|
||||
4. builtin/ (625 terms, 88 types)
|
||||
4. builtin/ (627 terms, 89 types)
|
||||
|
||||
.> ls Bar
|
||||
|
||||
@ -145,7 +145,7 @@ bonk = 5
|
||||
|
||||
.z> ls
|
||||
|
||||
1. builtin/ (453 terms, 70 types)
|
||||
1. builtin/ (455 terms, 71 types)
|
||||
2. zonk (Nat)
|
||||
|
||||
```
|
||||
@ -188,7 +188,7 @@ bonk.zonk = 5
|
||||
|
||||
.a> ls
|
||||
|
||||
1. builtin/ (453 terms, 70 types)
|
||||
1. builtin/ (455 terms, 71 types)
|
||||
2. zonk/ (1 term)
|
||||
|
||||
.a> view zonk.zonk
|
||||
|
@ -277,7 +277,7 @@ I should be able to move the root into a sub-namespace
|
||||
|
||||
.> ls
|
||||
|
||||
1. root/ (1364 terms, 211 types)
|
||||
1. root/ (1370 terms, 214 types)
|
||||
|
||||
.> history
|
||||
|
||||
@ -286,22 +286,22 @@ I should be able to move the root into a sub-namespace
|
||||
|
||||
|
||||
|
||||
□ 1. #2vg6il9d4g (start of history)
|
||||
□ 1. #p1ltr60tg9 (start of history)
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> ls .root.at.path
|
||||
|
||||
1. existing/ (454 terms, 70 types)
|
||||
2. happy/ (456 terms, 71 types)
|
||||
3. history/ (454 terms, 70 types)
|
||||
1. existing/ (456 terms, 71 types)
|
||||
2. happy/ (458 terms, 72 types)
|
||||
3. history/ (456 terms, 71 types)
|
||||
|
||||
.> history .root.at.path
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #m44k1k58ou
|
||||
⊙ 1. #nndiivp3ng
|
||||
|
||||
- Deletes:
|
||||
|
||||
@ -312,7 +312,7 @@ I should be able to move the root into a sub-namespace
|
||||
Original name New name
|
||||
existing.a.termInA existing.b.termInA
|
||||
|
||||
⊙ 2. #7r4j4dmhru
|
||||
⊙ 2. #1he7dqonrt
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -324,26 +324,26 @@ I should be able to move the root into a sub-namespace
|
||||
happy.b.termInA existing.a.termInA
|
||||
history.b.termInA existing.a.termInA
|
||||
|
||||
⊙ 3. #qlh1ogmt6v
|
||||
⊙ 3. #fbm4gr3975
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
existing.a.termInA existing.b.termInB
|
||||
|
||||
⊙ 4. #v3oiqufnsl
|
||||
⊙ 4. #v7j1f8vgni
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
history.a.termInA history.b.termInA
|
||||
|
||||
⊙ 5. #g19oumvmue
|
||||
⊙ 5. #ofsvuc0cgu
|
||||
|
||||
- Deletes:
|
||||
|
||||
history.b.termInB
|
||||
|
||||
⊙ 6. #73204ctkae
|
||||
⊙ 6. #s3afu924g2
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -354,13 +354,13 @@ I should be able to move the root into a sub-namespace
|
||||
Original name New name(s)
|
||||
happy.b.termInA history.a.termInA
|
||||
|
||||
⊙ 7. #cgiold3l98
|
||||
⊙ 7. #0bb30gq2b1
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
history.a.termInA history.b.termInB
|
||||
|
||||
⊙ 8. #8qrf3qbi9i
|
||||
⊙ 8. #aoclegh6j7
|
||||
|
||||
> Moves:
|
||||
|
||||
@ -370,7 +370,7 @@ I should be able to move the root into a sub-namespace
|
||||
happy.a.T.T2 happy.b.T.T2
|
||||
happy.a.termInA happy.b.termInA
|
||||
|
||||
⊙ 9. #e90bu6v600
|
||||
⊙ 9. #509sbqajct
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -380,7 +380,7 @@ I should be able to move the root into a sub-namespace
|
||||
|
||||
happy.a.T.T
|
||||
|
||||
⊙ 10. #lc2ce2arha
|
||||
⊙ 10. #8erj1uau9u
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -392,7 +392,7 @@ I should be able to move the root into a sub-namespace
|
||||
|
||||
⠇
|
||||
|
||||
⊙ 11. #9ck3j8r41m
|
||||
⊙ 11. #v4nrp8uols
|
||||
|
||||
|
||||
```
|
||||
@ -414,26 +414,26 @@ I should be able to move a sub namespace _over_ the root.
|
||||
.> ls
|
||||
|
||||
1. b/ (3 terms, 1 type)
|
||||
2. builtin/ (453 terms, 70 types)
|
||||
2. builtin/ (455 terms, 71 types)
|
||||
|
||||
.> history
|
||||
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #ian8vro0cp
|
||||
⊙ 1. #buu0h3vir1
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
b.T b.T.T1 b.T.T2 b.termInA
|
||||
|
||||
⊙ 2. #gt9figld7p
|
||||
⊙ 2. #rck0cngerk
|
||||
|
||||
- Deletes:
|
||||
|
||||
a.T a.T.T1 a.T.T2 a.termInA
|
||||
|
||||
⊙ 3. #i8i5on9i6t
|
||||
⊙ 3. #k6m6gfsvd6
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
@ -443,13 +443,13 @@ I should be able to move a sub namespace _over_ the root.
|
||||
|
||||
a.T.T
|
||||
|
||||
⊙ 4. #ucfoesjvhd
|
||||
⊙ 4. #2rvval9cn9
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
a.T a.T.T a.termInA
|
||||
|
||||
□ 5. #1t2hb5o115 (start of history)
|
||||
□ 5. #schnold03v (start of history)
|
||||
|
||||
```
|
||||
```ucm
|
||||
|
@ -63,17 +63,17 @@ y = 2
|
||||
most recent, along with the command that got us there. Try:
|
||||
|
||||
`fork 2 .old`
|
||||
`fork #k5ephrtf3c .old` to make an old namespace
|
||||
`fork #lbg8tf1sdh .old` to make an old namespace
|
||||
accessible again,
|
||||
|
||||
`reset-root #k5ephrtf3c` to reset the root namespace and
|
||||
`reset-root #lbg8tf1sdh` to reset the root namespace and
|
||||
its history to that of the
|
||||
specified namespace.
|
||||
|
||||
When Root Hash Action
|
||||
1. now #t21ukntm9u add
|
||||
2. now #k5ephrtf3c add
|
||||
3. now #1t2hb5o115 builtins.merge
|
||||
1. now #5gonu2p9gp add
|
||||
2. now #lbg8tf1sdh add
|
||||
3. now #schnold03v builtins.merge
|
||||
4. #sg60bvjo91 history starts here
|
||||
|
||||
Tip: Use `diff.namespace 1 7` to compare namespaces between
|
||||
|
@ -28,13 +28,13 @@ a = 5
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #u0t5k4nr2u
|
||||
⊙ 1. #havp29or07
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
a
|
||||
|
||||
□ 2. #1t2hb5o115 (start of history)
|
||||
□ 2. #schnold03v (start of history)
|
||||
|
||||
.> reset 2
|
||||
|
||||
@ -47,7 +47,7 @@ a = 5
|
||||
|
||||
|
||||
|
||||
□ 1. #1t2hb5o115 (start of history)
|
||||
□ 1. #schnold03v (start of history)
|
||||
|
||||
```
|
||||
```unison
|
||||
@ -83,13 +83,13 @@ foo.a = 5
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #suv33jrb2l
|
||||
⊙ 1. #i2199da947
|
||||
|
||||
+ Adds / updates:
|
||||
|
||||
foo.a
|
||||
|
||||
□ 2. #1t2hb5o115 (start of history)
|
||||
□ 2. #schnold03v (start of history)
|
||||
|
||||
.> reset 1 foo
|
||||
|
||||
|
@ -13,7 +13,7 @@ Let's look at some examples. We'll start with a namespace with just the builtins
|
||||
|
||||
|
||||
|
||||
□ 1. #ocvls2863b (start of history)
|
||||
□ 1. #iq58l8umv4 (start of history)
|
||||
|
||||
.> fork builtin builtin2
|
||||
|
||||
@ -42,21 +42,21 @@ Now suppose we `fork` a copy of builtin, then rename `Nat.+` to `frobnicate`, th
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #s0mte1f5cs
|
||||
⊙ 1. #cb1ngbi7os
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
Nat.frobnicate Nat.+
|
||||
|
||||
⊙ 2. #tteb770olk
|
||||
⊙ 2. #evasbqug8s
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
Nat.+ Nat.frobnicate
|
||||
|
||||
□ 3. #ocvls2863b (start of history)
|
||||
□ 3. #iq58l8umv4 (start of history)
|
||||
|
||||
```
|
||||
If we merge that back into `builtin`, we get that same chain of history:
|
||||
@ -73,21 +73,21 @@ If we merge that back into `builtin`, we get that same chain of history:
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #s0mte1f5cs
|
||||
⊙ 1. #cb1ngbi7os
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
Nat.frobnicate Nat.+
|
||||
|
||||
⊙ 2. #tteb770olk
|
||||
⊙ 2. #evasbqug8s
|
||||
|
||||
> Moves:
|
||||
|
||||
Original name New name
|
||||
Nat.+ Nat.frobnicate
|
||||
|
||||
□ 3. #ocvls2863b (start of history)
|
||||
□ 3. #iq58l8umv4 (start of history)
|
||||
|
||||
```
|
||||
Let's try again, but using a `merge.squash` (or just `squash`) instead. The history will be unchanged:
|
||||
@ -108,7 +108,7 @@ Let's try again, but using a `merge.squash` (or just `squash`) instead. The hist
|
||||
|
||||
|
||||
|
||||
□ 1. #ocvls2863b (start of history)
|
||||
□ 1. #iq58l8umv4 (start of history)
|
||||
|
||||
```
|
||||
The churn that happened in `mybuiltin` namespace ended up back in the same spot, so the squash merge of that namespace with our original namespace had no effect.
|
||||
@ -493,13 +493,13 @@ This checks to see that squashing correctly preserves deletions:
|
||||
Note: The most recent namespace hash is immediately below this
|
||||
message.
|
||||
|
||||
⊙ 1. #4tccfsvgtq
|
||||
⊙ 1. #272p6p79u5
|
||||
|
||||
- Deletes:
|
||||
|
||||
Nat.* Nat.+
|
||||
|
||||
□ 2. #ocvls2863b (start of history)
|
||||
□ 2. #iq58l8umv4 (start of history)
|
||||
|
||||
```
|
||||
Notice that `Nat.+` and `Nat.*` are deleted by the squash, and we see them deleted in one atomic step in the history.
|
||||
|
@ -57,7 +57,7 @@ proj/main> upgrade old new
|
||||
|
||||
proj/main> ls lib
|
||||
|
||||
1. builtin/ (453 terms, 70 types)
|
||||
1. builtin/ (455 terms, 71 types)
|
||||
2. new/ (1 term)
|
||||
|
||||
proj/main> view thingy
|
||||
|
Loading…
Reference in New Issue
Block a user