@@ -23,14 +23,45 @@ The `/+` rune accepts a filename as an argument. It interprets that filename as
23a hoon source file within the `lib` directory. This is how we import a shared
23a hoon source file within the `lib` directory. This is how we import a shared
24library in urbit.
24library in urbit.
26−Example:
26+To run this example, put this code in your desk at `gen/faslus.hoon` and run
27+`+faslus` in your dojo. This example is a generator. For more information on
28+generators, see the [generator docs](https://urbit.org/docs/arvo/generators).
28 /+ time-to-id
30 /+ time-to-id
33+ |= {now/@da * *} $~ $~}
30 (time-to-id now)
35 (time-to-id now)
32produces: `"c.314d"` (or something similar depending on when you run it)
37produces: `"c.314d"` (or something similar depending on when you run it)
39+You can import multiple libraries with a single `/+` rune by separating them
42+Replace the code in `gen/faslus.hoon` with the following:
44+ /+ time-to-id, hep-to-cab
47+ |= {{now/@da * *} $~ $~}
49+ =/ id (time-to-id now)
50+ =/ str "my-id-is-{id}"
51+ (hep-to-cab (crip str))
53+This should print something like `my_id_is_c.3588`.
55+Another feature of the
56+`/+ and`/-`runes is the ability to specify the`ship`and`case\` from which to
61+ /+ time-to-id, hep-to-cab/4/~zod
63+will load the `hep-to-cab` library from `~zod` at `%clay` revision `4`.
34### `/-` import from sur/
65### `/-` import from sur/
36The `/-` rune accepts a filename as an argument. It interprets that filename as
67The `/-` rune accepts a filename as an argument. It interprets that filename as
@@ -46,6 +77,10 @@ Example:
47produces: `0v0`
78produces: `0v0`
80+`/-` can also take multiple files as arguments, and the ship and case of those
81+arguments can be specified. See the `/+` docs for more details about the syntax
49### `/~` twig by hand
84### `/~` twig by hand
51`/~ <twig>` produces a "horn" that evaluates a twig and places the product in
86`/~ <twig>` produces a "horn" that evaluates a twig and places the product in