@@ -6,7 +6,7 @@ template = "doc.html"
7This document contains a number of examples of interacting with Clay using its various `task`s. Sections correspond to the general details in the [API Reference](/docs/arvo/clay/tasks) document.
7This document contains a number of examples of interacting with Clay using its various `task`s. Sections correspond to the general details in the [API Reference](/docs/arvo/clay/tasks) document.
9−Most examples will either use `|pass` to just send a `task` or the following thread to send a `task` and take the resulting `gift`. You can save the following thread to the `ted` directory of your `%home` `desk`:
9+Most examples will either use `|pass` to just send a `task` or the following thread to send a `task` and take the resulting `gift`. You can save the following thread to the `ted` directory of the `%base` `desk` on a fake ship:
11`send-task-take-gift.hoon`
11`send-task-take-gift.hoon`
@@ -40,7 +40,7 @@ Here we'll look at reading files by passing Clay a `%warp` `task` with a `%sing`
40Using the `send-task-take-gift.hoon` thread, let's try reading `gen/hood/hi.hoon`:
40Using the `send-task-take-gift.hoon` thread, let's try reading `gen/hood/hi.hoon`:
43−> -send-task-take-gift [%warp our %home ~ %sing %x da+now /gen/hood/hi/hoon]
43+> -send-task-take-gift [%warp our %base ~ %sing %x da+now /gen/hood/hi/hoon]
46You should see something like this as the output:
46You should see something like this as the output:
@@ -49,7 +49,7 @@ You should see something like this as the output:
52− [ p=[p=%x q=[%da p=~2021.5.20..23.37.50..e79b] r=%home]
52+ [ p=[p=%x q=[%da p=~2021.5.20..23.37.50..e79b] r=%base]
53 q=/gen/hood/hi/hoon
53 q=/gen/hood/hi/hoon
@@ -67,11 +67,11 @@ You should see something like this as the output:
67The `cage` in the `riot` of the `%writ` contains the file's data due to our use of an `%x` `care`. It needn't be `%x` though. If we change it to `%u`, for example, we'll get a `?` `cage` instead:
67The `cage` in the `riot` of the `%writ` contains the file's data due to our use of an `%x` `care`. It needn't be `%x` though. If we change it to `%u`, for example, we'll get a `?` `cage` instead:
70−> -send-task-take-gift [%warp our %home ~ %sing %x da+now /gen/hood/hi/hoon]
70+> -send-task-take-gift [%warp our %base ~ %sing %x da+now /gen/hood/hi/hoon]
74− [ p=[p=%u q=[%da p=~2021.5.20..23.42.21..bb33] r=%home]
74+ [ p=[p=%u q=[%da p=~2021.5.20..23.42.21..bb33] r=%base]
75 q=/gen/hood/hi/hoon
75 q=/gen/hood/hi/hoon
76 r=[p=%flag q=[#t/?(%.y %.n) q=0]]
76 r=[p=%flag q=[#t/?(%.y %.n) q=0]]
@@ -90,27 +90,27 @@ Here we'll look at subscribing to the next version of a file by passing Clay a `
90Using the `send-task-take-gift.hoon` thread, let's subscribe to the next version of `foo.txt`:
90Using the `send-task-take-gift.hoon` thread, let's subscribe to the next version of `foo.txt`:
93−> -send-task-take-gift [%warp our %home ~ %next %x da+now /foo/txt]
93+> -send-task-take-gift [%warp our %base ~ %next %x da+now /foo/txt]
96−Now, in unix, create a file called `foo.txt` in the root of the `home` directory of your ship. In the dojo, hit backspace to disconnect the thread from the dojo prompt and run `|commit %home`. You should see something like:
96+Now, in unix, create a file called `foo.txt` in the root of the `base` directory of your ship. In the dojo, hit backspace to disconnect the thread from the dojo prompt and run `|commit %base`. You should see something like:
99−> |commit %home
99+> |commit %base
101−[%writ p=[~ [p=[p=%x q=[%ud p=3] r=%home] q=/foo/txt r=[p=%txt q=[#t/*'' q=0]]]]]
101+[%writ p=[~ [p=[p=%x q=[%ud p=3] r=%base] q=/foo/txt r=[p=%txt q=[#t/*'' q=0]]]]]
102−+ /~zod/home/3/foo/txt
102++ /~zod/base/3/foo/txt
105As you can see, the `riot` in the `%writ` includes a `cage` with the data of `/foo/txt` due to our use of an `%x` `care`.
105As you can see, the `riot` in the `%writ` includes a `cage` with the data of `/foo/txt` due to our use of an `%x` `care`.
107−Now run the thread again, and this time delete the file in unix and again `|commit %home` in the dojo. You should see:
107+Now run the thread again, and this time delete the file in unix and again `|commit %base` in the dojo. You should see:
110−> |commit %home
110+> |commit %base
112[%writ p=~]
112[%writ p=~]
113−- /~zod/home/4/foo/txt
113+- /~zod/base/4/foo/txt
116You can see the `riot` is just `~` due to the file being deleted.
116You can see the `riot` is just `~` due to the file being deleted.
@@ -141,7 +141,7 @@ This thread will subscribe to `/foo/txt` with an `%x` `care` and `/bar/txt` with
141 [%u /bar/txt]
141 [%u /bar/txt]
143;< =bowl:strand bind:m get-bowl:strandio
143;< =bowl:strand bind:m get-bowl:strandio
144−=/ =task:clay [%warp our.bowl %home ~ %mult da+now.bowl files]
144+=/ =task:clay [%warp our.bowl %base ~ %mult da+now.bowl files]
145=/ =card:agent:gall [%pass /mult %arvo %c task]
145=/ =card:agent:gall [%pass /mult %arvo %c task]
146;< ~ bind:m (send-raw-card:strandio card)
146;< ~ bind:m (send-raw-card:strandio card)
147;< response=(pair wire sign-arvo) bind:m take-sign-arvo:strandio
147;< response=(pair wire sign-arvo) bind:m take-sign-arvo:strandio
@@ -149,27 +149,27 @@ This thread will subscribe to `/foo/txt` with an `%x` `care` and `/bar/txt` with
149(pure:m !>(~))
149(pure:m !>(~))
152−Save the above to `ted/sub-mult.hoon`, `|commit %home` and run with `-sub-mult`. Now, create `foo.txt` and `bar.txt` in your home directory, hit backspace in the dojo to disconnect the thread and run `|commit %home`. You should see something like:
152+Save the above to `ted/sub-mult.hoon`, `|commit %base` and run with `-sub-mult`. Now, create `foo.txt` and `bar.txt` in your base directory, hit backspace in the dojo to disconnect the thread and run `|commit %base`. You should see something like:
155−> |commit %home
155+> |commit %base
157[%wris p=[%da p=~2021.4.27..06.07.08..5ec4] q={[p=%u q=/bar/txt] [p=%x q=/foo/txt]}]
157[%wris p=[%da p=~2021.4.27..06.07.08..5ec4] q={[p=%u q=/bar/txt] [p=%x q=/foo/txt]}]
158−+ /~zod/home/151/foo/txt
158++ /~zod/base/151/foo/txt
159−+ /~zod/home/151/bar/txt
159++ /~zod/base/151/bar/txt
162You'll notice that, unlike a `%writ`, the `%wris` doesn't give you the data. It merely tells you the `care`s and `path`s of the files that changed. If you need to actually get the data, you can just scry or send a request for the files in question.
162You'll notice that, unlike a `%writ`, the `%wris` doesn't give you the data. It merely tells you the `care`s and `path`s of the files that changed. If you need to actually get the data, you can just scry or send a request for the files in question.
164−Now, run the thread again, open `bar.txt` in an editor, modify its contents, save it and `|commit %home`. You'll notice you didn't receive a `%wris`. This is because we subscribed to `/bar/txt` with `%u` care and its existence didn't change.
164+Now, run the thread again, open `bar.txt` in an editor, modify its contents, save it and `|commit %base`. You'll notice you didn't receive a `%wris`. This is because we subscribed to `/bar/txt` with `%u` care and its existence didn't change.
166−Lastly, delete `foo.txt` and `|commit %home`. You should see something like:
166+Lastly, delete `foo.txt` and `|commit %base`. You should see something like:
169−> |commit %home
169+> |commit %base
171[%wris p=[%da p=~2021.4.27..06.15.03..0da4] q={[p=%x q=/foo/txt]}]
171[%wris p=[%da p=~2021.4.27..06.15.03..0da4] q={[p=%x q=/foo/txt]}]
172−- /~zod/home/153/foo/txt
172+- /~zod/base/153/foo/txt
175As you can see, a relevant change to any of the subscribed files will trigger a response, not just when all of them change.
175As you can see, a relevant change to any of the subscribed files will trigger a response, not just when all of them change.
@@ -182,7 +182,7 @@ Here's a breakdown of the `task` we sent:
183Here we'll look at subscribing to a range of changes to a `desk` by passing Clay a `%warp` `task` with a `%many` `rave` and receiving `%writ` `gift`s when changes occur.
183Here we'll look at subscribing to a range of changes to a `desk` by passing Clay a `%warp` `task` with a `%many` `rave` and receiving `%writ` `gift`s when changes occur.
185−This thread will subscribe to changes to your `%home` `desk` for the next three minutes. The `track` is `%.y` so it will only inform you of changes, not send the full `nako`. It will only get updates if the specified file exists. It contains a `main-loop` that will take an arbitrary number of `sign`s and print them out in the dojo. Since it never ends, you'll need to stop it with the `:spider|kill` command in the dojo.
185+This thread will subscribe to changes to your `%base` `desk` for the next three minutes. The `track` is `%.y` so it will only inform you of changes, not send the full `nako`. It will only get updates if the specified file exists. It contains a `main-loop` that will take an arbitrary number of `sign`s and print them out in the dojo. Since it never ends, you'll need to stop it with the `:spider|kill` command in the dojo.
187`sub-many.hoon`
187`sub-many.hoon`
@@ -213,30 +213,30 @@ This thread will subscribe to changes to your `%home` `desk` for the next three
213 (strand-fail:strand %no-arg ~)
213 (strand-fail:strand %no-arg ~)
214=/ =path u.uarg
214=/ =path u.uarg
215;< =bowl:strand bind:m get-bowl:strandio
215;< =bowl:strand bind:m get-bowl:strandio
216−=/ =task:clay [%warp our.bowl %home ~ %many %.y da+now.bowl da+(add ~m3 now.bowl) path]
216+=/ =task:clay [%warp our.bowl %base ~ %many %.y da+now.bowl da+(add ~m3 now.bowl) path]
217=/ =card:agent:gall [%pass /many %arvo %c task]
217=/ =card:agent:gall [%pass /many %arvo %c task]
218;< ~ bind:m (send-raw-card:strandio card)
218;< ~ bind:m (send-raw-card:strandio card)
219;< ~ bind:m take-sign-loop
219;< ~ bind:m take-sign-loop
220(pure:m !>(~))
220(pure:m !>(~))
223−Make sure `foo.txt` doesn't exist in the root of your `%home` `desk`. Save this to `ted/sub-many.hoon`, `|commit %home`, run it like `-sub-many /foo/txt`, and hit backspace in the dojo to free up the dojo prompt. Now, add a file called `bar.txt` to your `desk` and `|commit %home`. You should see something like:
223+Make sure `foo.txt` doesn't exist in the root of your `%base` `desk`. Save this to `ted/sub-many.hoon`, `|commit %base`, run it like `-sub-many /foo/txt`, and hit backspace in the dojo to free up the dojo prompt. Now, add a file called `bar.txt` to your `desk` and `|commit %base`. You should see something like:
226−> |commit %home
226+> |commit %base
228−+ /~zod/home/260/bar/txt
228++ /~zod/base/260/bar/txt
231−Notice you've received no `%writ` from Clay. This is because `/foo/txt` doesn't exist. Now, create `foo.txt` and `|commit %home` again. You should see:
231+Notice you've received no `%writ` from Clay. This is because `/foo/txt` doesn't exist. Now, create `foo.txt` and `|commit %base` again. You should see:
234−> |commit %home
234+> |commit %base
237− q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=261] r=%home] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
237+ q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=261] r=%base] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
239−+ /~zod/home/261/foo/txt
239++ /~zod/base/261/foo/txt
242Now that `/foo/txt` exists it will inform you of updates. Note that if you delete `/foo/txt` again it will again stop sending updates.
242Now that `/foo/txt` exists it will inform you of updates. Note that if you delete `/foo/txt` again it will again stop sending updates.
@@ -244,24 +244,24 @@ Now that `/foo/txt` exists it will inform you of updates. Note that if you delet
244Now try adding `baz.txt`:
244Now try adding `baz.txt`:
247−> |commit %home
247+> |commit %base
250− q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=262] r=%home] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
250+ q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=262] r=%base] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
252−+ /~zod/home/262/baz/txt
252++ /~zod/base/262/baz/txt
255Now wait until the three minutes is up and try making a change, for example deleting `baz.txt`:
255Now wait until the three minutes is up and try making a change, for example deleting `baz.txt`:
258−> |commit %home
258+> |commit %base
261− q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=264] r=%home] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
261+ q=[%clay [%writ p=[~ [p=[p=%w q=[%ud p=264] r=%base] q=/ r=[p=%null q=[#t/@n q=0]]]]]]
263[p=/many q=[%clay [%writ p=~]]]
263[p=/many q=[%clay [%writ p=~]]]
264−- /~zod/home/263/baz/txt
264+- /~zod/base/263/baz/txt
267You can see that along with the normal `%writ` it's also sent a second `%writ` with a null `riot` to indicate the subscription has ended. This is because it has now passed the end of the range of `case`s to which you subscribed.
267You can see that along with the normal `%writ` it's also sent a second `%writ` with a null `riot` to indicate the subscription has ended. This is because it has now passed the end of the range of `case`s to which you subscribed.
@@ -289,10 +289,10 @@ This thread will subscribe to the `%next` version of `/foo/txt`, then immediatel
289=/ m (strand ,vase)
289=/ m (strand ,vase)
291;< =bowl:strand bind:m get-bowl:strandio
291;< =bowl:strand bind:m get-bowl:strandio
292−=/ =task:clay [%warp our.bowl %home ~ %next %x da+now.bowl /foo/txt]
292+=/ =task:clay [%warp our.bowl %base ~ %next %x da+now.bowl /foo/txt]
293=/ =card:agent:gall [%pass /next %arvo %c task]
293=/ =card:agent:gall [%pass /next %arvo %c task]
294;< ~ bind:m (send-raw-card:strandio card)
294;< ~ bind:m (send-raw-card:strandio card)
295−=. task [%warp our.bowl %home ~]
295+=. task [%warp our.bowl %base ~]
296=. card [%pass /next %arvo %c task]
296=. card [%pass /next %arvo %c task]
297;< ~ bind:m (send-raw-card:strandio card)
297;< ~ bind:m (send-raw-card:strandio card)
298;< =riot:clay bind:m (take-writ:strandio /next)
298;< =riot:clay bind:m (take-writ:strandio /next)
@@ -300,12 +300,12 @@ This thread will subscribe to the `%next` version of `/foo/txt`, then immediatel
300(pure:m !>(~))
300(pure:m !>(~))
303−Save the above to `ted/stop-sub.hoon`, `|commit %home`, run it with `-stop-sub` and hit backspace to detach it from the dojo prompt. Now, add `foo.txt` to the root of your `%home` `desk` and `|commit %home`. You should see:
303+Save the above to `ted/stop-sub.hoon`, `|commit %base`, run it with `-stop-sub` and hit backspace to detach it from the dojo prompt. Now, add `foo.txt` to the root of your `%base` `desk` and `|commit %base`. You should see:
306−> |commit %home
306+> |commit %base
308−+ /~zod/home/266/foo/txt
308++ /~zod/base/266/foo/txt
311As you can see we've received no `%writ`. We can thus conclude the subscription has successfully been cancelled.
311As you can see we've received no `%writ`. We can thus conclude the subscription has successfully been cancelled.
@@ -327,11 +327,11 @@ Here we'll look at adding a file by sending Clay a `%info` `task` containing a `
327Let's try adding a `foo.txt` file with 'foo' as its contents:
327Let's try adding a `foo.txt` file with 'foo' as its contents:
330−> |pass [%c [%info %home %& [/foo/txt %ins %txt !>(~['foo'])]~]]
330+> |pass [%c [%info %base %& [/foo/txt %ins %txt !>(~['foo'])]~]]
331−+ /~zod/home/5/foo/txt
331++ /~zod/base/5/foo/txt
334−If you have a look in the home of your pier you'll see there's now a file called `foo.txt` with the text `foo` in it.
334+If you have a look in the base of your pier you'll see there's now a file called `foo.txt` with the text `foo` in it.
336We've created the `cage` of the content like `[%txt !>(~['foo'])]`, if you want to write something besides a text file you'd just give it the appropriate `mark` and `vase`.
336We've created the `cage` of the content like `[%txt !>(~['foo'])]`, if you want to write something besides a text file you'd just give it the appropriate `mark` and `vase`.
@@ -346,11 +346,11 @@ Here we'll look at deleting a file by sending Clay a `%info` `task` containing a
346Let's try deleting the `foo.txt` file created in the [previous example](#ins):
346Let's try deleting the `foo.txt` file created in the [previous example](#ins):
349−> |pass [%c [%info %home %& [/foo/txt %del ~]~]]
349+> |pass [%c [%info %base %& [/foo/txt %del ~]~]]
350−- /~zod/home/6/foo/txt
350+- /~zod/base/6/foo/txt
353−If you have a look in the home of your pier you'll see the `foo.txt` file is now gone.
353+If you have a look in the base of your pier you'll see the `foo.txt` file is now gone.
355Here's a breakdown of the `task` we sent:
355Here's a breakdown of the `task` we sent:
@@ -384,21 +384,21 @@ Since `soba` is just a `list` of `miso`, you can add a bunch of `miso` and they'
384 [/bar/txt %del ~]
384 [/bar/txt %del ~]
385 [/baz/txt %del ~]
385 [/baz/txt %del ~]
387−;< ~ bind:m (send-raw-card:strandio [%pass /info %arvo %c %info %home %& soba-a])
387+;< ~ bind:m (send-raw-card:strandio [%pass /info %arvo %c %info %base %& soba-a])
388−;< ~ bind:m (send-raw-card:strandio [%pass /info %arvo %c %info %home %& soba-b])
388+;< ~ bind:m (send-raw-card:strandio [%pass /info %arvo %c %info %base %& soba-b])
389(pure:m !>(~))
389(pure:m !>(~))
392−Save to `ted/multi-change.hoon`, `|commit %home`, and run:
392+Save to `ted/multi-change.hoon`, `|commit %base`, and run:
395> -multi-change
395> -multi-change
396−+ /~zod/home/37/foo/txt
396++ /~zod/base/37/foo/txt
397−+ /~zod/home/37/bar/txt
397++ /~zod/base/37/bar/txt
398−+ /~zod/home/37/baz/txt
398++ /~zod/base/37/baz/txt
399−- /~zod/home/38/foo/txt
399+- /~zod/base/38/foo/txt
400−- /~zod/home/38/bar/txt
400+- /~zod/base/38/bar/txt
401−- /~zod/home/38/baz/txt
401+- /~zod/base/38/baz/txt
404## Manage Mounts
404## Manage Mounts
@@ -413,44 +413,41 @@ Using the `send-task-take-gift.hoon` thread, let's make such a request:
415> -send-task-take-gift [%boat ~]
415> -send-task-take-gift [%boat ~]
416−[%hill p=~[%home]]
416+[%hill p=~[%base]]
419### `%mont`
419### `%mont`
421Here we'll look at mounting `desk`s, directories and files to unix by sending Clay a `%mont` `task`.
421Here we'll look at mounting `desk`s, directories and files to unix by sending Clay a `%mont` `task`.
423−Let's first try mounting our `%kids` desk:
423+Let's first try mounting our `%garden` desk:
426−> |pass [%c [%mont %kids [our %kids da+now] /]]
426+> |pass [%c [%mont %garden [our %garden da+now] /]]
429−If you look in your pier, you should now see a `kids` folder which contains the contents of that `desk`.
429+If you look in your pier, you should now see a `garden` folder which contains the contents of that `desk`.
431If we make a `%boat` request as detailed in the [%boat](#boat) section, we'll now see the mount point listed:
431If we make a `%boat` request as detailed in the [%boat](#boat) section, we'll now see the mount point listed:
434> -send-task-take-gift [%boat ~]
434> -send-task-take-gift [%boat ~]
435−[%hill p=~[%kids %home]]cruz gift. It looks like:
435+[%hill p=~[%garden %base]]
437−[%cruz cez=(map @ta crew)] :: permission groups
438−The cez is just a map from group name to crew
441Note the mount point doesn't need to match a `desk`, file or directory. We can also do:
438Note the mount point doesn't need to match a `desk`, file or directory. We can also do:
444−> |pass [%c [%mont %wibbly-wobbly [our %home da+now] /]]
441+> |pass [%c [%mont %wibbly-wobbly [our %base da+now] /]]
447−And you'll now see that there's a `wibbly-wobbly` folder with the contents of the `%home` `desk`. You'll also notice we can mount the same file or directory more than once. There's no problem having `%home` mounted to both `home` and `wibbly-wobbly`. The only requirement is that their mount points be unique.
444+And you'll now see that there's a `wibbly-wobbly` folder with the contents of the `%base` `desk`. You'll also notice we can mount the same file or directory more than once. There's no problem having `%base` mounted to both `base` and `wibbly-wobbly`. The only requirement is that their mount points be unique.
449Let's try mounting a subdirectory and a single folder:
446Let's try mounting a subdirectory and a single folder:
452−> |pass [%c [%mont %gen [our %home da+now] /gen]]
449+> |pass [%c [%mont %gen [our %base da+now] /gen]]
453−> |pass [%c [%mont %hi [our %home da+now] /gen/hood/hi]]
450+> |pass [%c [%mont %hi [our %base da+now] /gen/hood/hi]]
456If you look in your pier you'll now see a `gen` folder with the contents of `/gen` and a `hi.hoon` file by itself. Notice how the file extension has been automatically added.
453If you look in your pier you'll now see a `gen` folder with the contents of `/gen` and a `hi.hoon` file by itself. Notice how the file extension has been automatically added.
@@ -459,10 +456,10 @@ If you look in your pier you'll now see a `gen` folder with the contents of `/ge
460Here we'll look at unmounting `desk`s, directories and files by sending Clay a `%ogre` `task`.
457Here we'll look at unmounting `desk`s, directories and files by sending Clay a `%ogre` `task`.
462−Let's unmount what we mounted in the [%mont](#mont) section. First we'll unmount the `%kids` desk:
459+Let's unmount what we mounted in the [%mont](#mont) section. First we'll unmount the `%garden` desk:
465−|pass [%c [%ogre %kids]]
462+|pass [%c [%ogre %garden]]
468Our custom mount point `%wibbly-wobbly`:
465Our custom mount point `%wibbly-wobbly`:
@@ -480,8 +477,8 @@ And the single `hi.hoon` we previously mounted by specifying its mount point `%h
480If we specify a non-existent mount point it will fail with an error printed to the dojo like:
477If we specify a non-existent mount point it will fail with an error printed to the dojo like:
483−> |pass [%c [%ogre %kids]]
480+> |pass [%c [%ogre %foo]]
484−[%not-mounted %kids]
481+[%not-mounted %foo]
487If we give it an unmounted `beam` it will not print an error but still won't work.
484If we give it an unmounted `beam` it will not print an error but still won't work.
@@ -492,11 +489,11 @@ Here we'll look at committing changed files by sending Clay a `%dirk` `task`.
493This `task` performs the same function as the `|commit` dojo command.
490This `task` performs the same function as the `|commit` dojo command.
495−With your `%home` `desk` mounted, try adding a file and send a `%dirk` to commit the change:
492+With your `%base` `desk` mounted, try adding a file and send a `%dirk` to commit the change:
498−> |pass [%c [%dirk %home]]
495+> |pass [%c [%dirk %base]]
499−+ /~zod/home/12/foo/txt
496++ /~zod/base/12/foo/txt
502Clay will print the changed files to the dojo with a leading `+`, `-` or `:` to indicate a new file, deleted file and changed file respectively.
499Clay will print the changed files to the dojo with a leading `+`, `-` or `:` to indicate a new file, deleted file and changed file respectively.
@@ -514,7 +511,7 @@ Here we'll look at merging `desk`s by sending Clay a `%merg` `task` and receivin
514First, using the `send-task-take-gift.hoon` thread, let's try creating a new `desk`:
511First, using the `send-task-take-gift.hoon` thread, let's try creating a new `desk`:
517−> -send-task-take-gift [%merg %foo our %home da+now %init]
514+> -send-task-take-gift [%merg %foo our %base da+now %init]
518[%mere p=[%.y p={}]]
515[%mere p=[%.y p={}]]
@@ -522,15 +519,15 @@ Now if we scry for our `desk`s we'll see `%foo` is there:
524> .^((set desk) %cd /===)
521> .^((set desk) %cd /===)
525−{%home %foo %kids}
522+{%bitcoin %base %landscape %webterm %garden %foo}
528Next, we'll create a merge conflict and try a couple of things. Mount `%foo` with `|mount /=foo=`, then add a `foo.txt` to both `desk`s but with different text in each and `|commit` them.
525Next, we'll create a merge conflict and try a couple of things. Mount `%foo` with `|mount /=foo=`, then add a `foo.txt` to both `desk`s but with different text in each and `|commit` them.
530−Now we'll try merging `%home` into `%foo` with a `%mate` strategy:
527+Now we'll try merging `%base` into `%foo` with a `%mate` strategy:
533−> -send-task-take-gift [%merg %foo our %home da+now %mate]
530+> -send-task-take-gift [%merg %foo our %base da+now %mate]
@@ -549,14 +546,14 @@ Now we'll try merging `%home` into `%foo` with a `%mate` strategy:
549As you can see, the merge has failed. Let's try again with a `%meld` strategy:
546As you can see, the merge has failed. Let's try again with a `%meld` strategy:
552−> -send-task-take-gift [%merg %foo our %home da+now %meld]
549+> -send-task-take-gift [%merg %foo our %base da+now %meld]
553[/foo [%clay [%mere p=[%.y p={/foo/txt}]]]]
550[/foo [%clay [%mere p=[%.y p={/foo/txt}]]]]
556Now the merge has succeeded and the `%mere` notes the file with a merge conflict. If we try with a `%only-that` strategy:
553Now the merge has succeeded and the `%mere` notes the file with a merge conflict. If we try with a `%only-that` strategy:
559−> -send-task-take-gift [%merg %foo our %home da+now %only-that]
556+> -send-task-take-gift [%merg %foo our %base da+now %only-that]
560[/foo [%clay [%mere p=[%.y p={}]]]]
557[/foo [%clay [%mere p=[%.y p={}]]]]
561: /~zod/foo/6/foo/txt
558: /~zod/foo/6/foo/txt
@@ -566,10 +563,10 @@ Now the merge has succeeded and the `%mere` notes the file with a merge conflict
566Next, let's look at subscribing for future changes. Since the `case` is specified explicitly in the `%merge` `task`, we can set it in the future:
563Next, let's look at subscribing for future changes. Since the `case` is specified explicitly in the `%merge` `task`, we can set it in the future:
569−> -send-task-take-gift [%merg %foo our %home da+(add ~m2 now) %only-that]
566+> -send-task-take-gift [%merg %foo our %base da+(add ~m2 now) %only-that]
572−Now change the text in the `foo.txt` in the `%home` `desk`, hit backspace to detach the thread and `|commit %home`. After the two minutes pass you should see:
569+Now change the text in the `foo.txt` in the `%base` `desk`, hit backspace to detach the thread and `|commit %base`. After the two minutes pass you should see:
575[/foo [%clay [%mere p=[%.y p={}]]]]
572[/foo [%clay [%mere p=[%.y p={}]]]]
@@ -589,7 +586,7 @@ Here we'll look at setting permissions by sending Clay a `%perm` `task`.
589First, let's allow `~nes` to read `/gen/hood/hi/hoon`:
586First, let's allow `~nes` to read `/gen/hood/hi/hoon`:
592−> |pass [%c [%perm %home /gen/hood/hi/hoon %r ~ %white (sy [%.y ~nes]~)]]
589+> |pass [%c [%perm %base /gen/hood/hi/hoon %r ~ %white (sy [%.y ~nes]~)]]
595...and we'll do a `%p` scry to see that the permission was set:
592...and we'll do a `%p` scry to see that the permission was set:
@@ -602,7 +599,7 @@ First, let's allow `~nes` to read `/gen/hood/hi/hoon`:
602You can see that `~nes` is now in the read whitelist. Next, let's try a write permission:
599You can see that `~nes` is now in the read whitelist. Next, let's try a write permission:
605−> |pass [%c [%perm %home /ted %w ~ %white (sy [%.y ~nes]~)]]
602+> |pass [%c [%perm %base /ted %w ~ %white (sy [%.y ~nes]~)]]
608You can see `~nes` can now write to `/ted`:
605You can see `~nes` can now write to `/ted`:
@@ -624,7 +621,7 @@ Since we've set it for the whole `/ted` directory, if we check a file inside it
624Now let's try setting both read and write permissions:
621Now let's try setting both read and write permissions:
627−> |pass [%c [%perm %home /gen/help/hoon %rw `[%black (sy [%.y ~nes]~)] `[%white (sy [%.y ~nes]~)]]]
624+> |pass [%c [%perm %base /gen/help/hoon %rw `[%black (sy [%.y ~nes]~)] `[%white (sy [%.y ~nes]~)]]]
@@ -637,7 +634,7 @@ Lastly, let's look at deleting a permission rule we've previously set. To do tha
637For example, to remove a read permission (or write if you specify `%w`):
634For example, to remove a read permission (or write if you specify `%w`):
640−> |pass [%c [%perm %home /gen/help/hoon %r ~]]
637+> |pass [%c [%perm %base /gen/help/hoon %r ~]]
@@ -648,7 +645,7 @@ For example, to remove a read permission (or write if you specify `%w`):
648...and to remove both read and write at the same time:
645...and to remove both read and write at the same time:
651−> |pass [%c [%perm %home /gen/help/hoon %rw ~ ~]]
648+> |pass [%c [%perm %base /gen/help/hoon %rw ~ ~]]
@@ -692,8 +689,8 @@ Here we'll look at retrieving a list of all files and directories in all `desk`s
692First we'll set a couple of permissions for the `foo` group we created in the [%cred](#cred) section:
689First we'll set a couple of permissions for the `foo` group we created in the [%cred](#cred) section:
695−> |pass [%c [%perm %home /gen/hood/hi/hoon %w ~ %white (sy [%.n 'foo']~)]]
692+> |pass [%c [%perm %base /gen/hood/hi/hoon %w ~ %white (sy [%.n 'foo']~)]]
696−> |pass [%c [%perm %home /ted %w ~ %white (sy [%.n 'foo']~)]]
693+> |pass [%c [%perm %base /ted %w ~ %white (sy [%.n 'foo']~)]]
699Notice we use a `%.n` in the `whom` to indicate a group rather than the `%.y` of a ship.
696Notice we use a `%.n` in the `whom` to indicate a group rather than the `%.y` of a ship.
@@ -704,7 +701,7 @@ Now we'll use the `send-task-take-gift.hoon` thread to try `%crow`:
704> -send-task-take-gift [%crow 'foo']
701> -send-task-take-gift [%crow 'foo']
707− { [ p=%home
704+ { [ p=%base
@@ -725,29 +722,29 @@ See the [Foreign Ships](/docs/arvo/clay/tasks#foreign-ships) section of the [API
726Here we'll look at reading files on a foreign ship by sending Clay a `%warp` `task` with a foreign ship in the `wer` field and receiving a `%writ` `gift` in response.
723Here we'll look at reading files on a foreign ship by sending Clay a `%warp` `task` with a foreign ship in the `wer` field and receiving a `%writ` `gift` in response.
728−We'll use a fake ~nes as the the foreign ship and a fake ~zod as the local ship.
725+We'll use a fake `~nes` as the the foreign ship and a fake `~zod` as the local ship.
730−First we'll set permissions on the foreign ship. Create a file called `foo.txt` in the `%home` of ~nes, then send a `%perm` request to allow ~zod to read and write the file:
727+First we'll set permissions on the foreign ship. Create a file called `foo.txt` in the `%base` of ~nes, then send a `%perm` request to allow ~zod to read and write the file:
733−> |pass [%c [%perm %home /foo/txt %rw `[%white (sy [%.y ~zod]~)] `[%white (sy [%.y ~zod]~)]]]
730+> |pass [%c [%perm %base /foo/txt %rw `[%white (sy [%.y ~zod]~)] `[%white (sy [%.y ~zod]~)]]]
736−If we scry the file for its permissions with a `%p` `care`, we'll see ~zod is now whitelisted:
733+If we scry the file for its permissions with a `%p` `care`, we'll see `~zod` is now whitelisted:
739> .^([r=dict:clay w=dict:clay] %cp /===/foo/txt)
736> .^([r=dict:clay w=dict:clay] %cp /===/foo/txt)
740[r=[src=/foo/txt rul=[mod=%white who=[p={~zod} q={}]]] w=[src=/foo/txt rul=[mod=%white who=[p={~zod} q={}]]]]
737[r=[src=/foo/txt rul=[mod=%white who=[p={~zod} q={}]]] w=[src=/foo/txt rul=[mod=%white who=[p={~zod} q={}]]]]
743−Back on ~zod: Using the `send-task-take-gift.hoon` thread, send a `%x` read request for `/foo/txt` on ~nes like:
740+Back on `~zod`: Using the `send-task-take-gift.hoon` thread, send a `%x` read request for `/foo/txt` on ~nes like:
746−> -send-task-take-gift [%warp ~nes %home ~ %sing %x da+now /foo/txt]
743+> -send-task-take-gift [%warp ~nes %base ~ %sing %x da+now /foo/txt]
750− [ p=[p=%x q=[%da p=~2021.5.3..08.24.22..9ce7] r=%home]
747+ [ p=[p=%x q=[%da p=~2021.5.3..08.24.22..9ce7] r=%base]
751 q=/foo/txt
748 q=/foo/txt
752 r=[p=%txt q=[#t/txt=*'' q=[7.303.014 0]]]
749 r=[p=%txt q=[#t/txt=*'' q=[7.303.014 0]]]
@@ -758,11 +755,11 @@ Back on ~zod: Using the `send-task-take-gift.hoon` thread, send a `%x` read requ
758As you can see, we've received a `%writ` containing the requested data just as we would with a local request. Let's try a `%u`:
755As you can see, we've received a `%writ` containing the requested data just as we would with a local request. Let's try a `%u`:
761−> -send-task-take-gift [%warp ~nes %home ~ %sing %u da+now /foo/txt]
758+> -send-task-take-gift [%warp ~nes %base ~ %sing %u da+now /foo/txt]
765− [ p=[p=%u q=[%da p=~2021.5.3..08.26.32..88cf] r=%home]
762+ [ p=[p=%u q=[%da p=~2021.5.3..08.26.32..88cf] r=%base]
766 q=/foo/txt
763 q=/foo/txt
767 r=[p=%flag q=[#t/?(%.y %.n) q=0]]
764 r=[p=%flag q=[#t/?(%.y %.n) q=0]]
@@ -773,7 +770,7 @@ As you can see, we've received a `%writ` containing the requested data just as w
773If we send a `%d` request however, it will crash:
770If we send a `%d` request however, it will crash:
776−> -send-task-take-gift [%warp ~nes %home ~ %sing %d da+now /foo/txt]
773+> -send-task-take-gift [%warp ~nes %base ~ %sing %d da+now /foo/txt]
777call: failed
774call: failed
778/sys/vane/clay/hoon:<[4.085 3].[4.314 5]>
775/sys/vane/clay/hoon:<[4.085 3].[4.314 5]>