on master help sign in
change ford headers, remove deprecated rune (#688)
commit23d6dfa758240b71021a628db99b26f2884493dc authorpoprox <51337059+syzygyzer@users.noreply.github.com> dateTue 29 Oct 2019, 15:14 (7 years ago) parente5c35c7
1 file changed+17−22
tutorials/arvo/ford.md+17−22
tutorials/arvo/ford.md+17−22
@@ -111,7 +111,7 @@ One of the most common ways to use ford is through ford's runes, all of which be
111111
112112Another common use case is assembling and rendering markdown templates into a single HTML file, to be sent as an HTTP response in urbit's web server `%eyre`. It's important to keep in mind that %ford is quite flexible and generic, and is used in other parts of urbit -- such as the dojo -- that would not traditionally fall under the purview of a build system.
113113
114−### `/+` import from lib/
114+### `/+` "faslus"
115115
116116The `/+` rune accepts a filename as an argument. It interprets that filename
117117as a hoon source file within the `lib` directory. This is how we import a shared
@@ -162,7 +162,7 @@ Example:
162162
163163will load the `hep-to-cab` library from `~zod` at `%clay` revision `4`.
164164
165−### `/-` import from sur/
165+### `/-` "fashep"
166166
167167The `/-` rune accepts a filename as an argument. It interprets that filename as
168168a hoon source file within the `sur` directory. The `sur` directory contains
@@ -183,7 +183,7 @@ produces: `0v0`
183183arguments can be specified. See the `/+` docs for more details about the syntax
184184for those features.
185185
186−### `/~` twig by hand
186+### `/~` "fassig"
187187
188188`/~ <twig>` produces a "horn" that evaluates a twig and places the product in
189189the subject. Arbitrary hoon can be in the twig. A
@@ -212,7 +212,7 @@ produces: `%something`
212212```
213213produces: `[%a %b]`
214214
215−### `//` include a file by relative path
215+### `//` "fasfas"
216216
217217`// <rel-path>` parses `rel-path` as a hoon twig, and then adds the resulting
218218twig to the subject. Note that the result type of this rune is not a horn, but
@@ -240,7 +240,7 @@ directories the way unix filesystems do. Whereas in unix, a directory is a
240240special kind of file, in %clay it's just a path prefix, and there is no file
241241stored at that path._
242242
243−### `/=` wrap a face around an included horn
243+### `/=` "fastis"
244244
245245`/=` runs a horn (usually produced by another ford rune), takes the result of
246246that horn, and wraps a face around it.
@@ -255,7 +255,7 @@ produces: `[0 1]`
255255
256256In wide-form, `/=` uses `=` as a delimiter: `/=foo=/~[a=0 b=1]`
257257
258−### `/:` evaluate at path, and `/<mark>/` render mark at current path
258+### `/:` "fascol"
259259
260260`/:` takes a path and a horn, and evaluates the horn with the current path set to the supplied path.
261261`/mar/` renders the mark 'mar' at the current path.
@@ -292,7 +292,7 @@ and the HTML itself.
292292
293293In wide-form, `/:` uses `:` as a delimiter: `/=page=/:/path/to/html/file:/mime/`
294294
295−### `/!mark/` evaluate as hoon, then pass through mark
295+### `/!mark/` "faszap"
296296
297297Example:
298298```hoon
@@ -305,7 +305,7 @@ mime
305305```
306306produces: `[[%text %plain ~] 15 'produces-a-cord']`
307307
308−### `/&` pass through a series of marks
308+### `/&` "faspam"
309309
310310`/&` passes a horn through multiple marks, right-to-left. It has both a
311311wide-form and a tall-form syntax. In wide-form, it takes a series of mark
@@ -349,7 +349,7 @@ just a mark: `/&c&b&/:path:/mark/`
349349Tall-form `/&` takes only two arguments: a mark and a horn. The mark does not
350350need to be enclosed in `/`'s: `/& html /elem/`
351351
352−### `/|` short-circuiting 'or'
352+### `/|` "fasbar"
353353
354354`/|` takes a series of horns and produces the first one (left-to-right) that
355355succeeds. If none succeed, it produces stack traces from all of its arguments.
@@ -374,7 +374,7 @@ file as hoon to be evaluated.
374374Wide-form `/|` encloses its arguments in parentheses, with a single space as a delimiter:
375375`/|(/!elem/ /elem/)`
376376
377−### `/_` unfiltered: run a horn on each file in the current directory
377+### `/_` "fascab"
378378
379379`/_` can be used in two ways: filtered and unfiltered.
380380
@@ -418,7 +418,7 @@ to a cord of markdown-formatted text.
418418
419419Wide-form filtered `/_` uses `_` as a delimiter: `/= timed-posts /_@da_/md/`
420420
421−### `/;` operate on
421+### `/;` "fasmic"
422422
423423`/;` takes a twig and a horn. The twig should evaluate to a gate, which is then slammed
424424with the result of the horn as its sample.
@@ -444,7 +444,7 @@ file-length
444444```
445445produces the number of bytes in the file "/%/path/to/hoon/file."
446446
447−### `/,` switch by path
447+### `/,` "fascom"
448448
449449`/,` is a switch statement, which picks a branch to evaluate based on
450450whether the current path matches the path in the switch statement.
@@ -465,7 +465,7 @@ Example:
465465
466466produces: `'evaluate-me'`
467467
468−### `/.` list
468+### `/.` "fasdot"
469469
470470Produce a null-terminated list from a sequence of horns, terminated by a `==`. No wide-form.
471471
@@ -486,12 +486,7 @@ vanes
486486```
487487produces: `[%ames %behn %clay %dill %eyre %ford %gall ~]`.
488488
489−### `/*` heterogeneous map
490−
491−_DEPRECATED_
492−TODO: remove
493−
494−### `/^` cast
489+### `/^` "fasket"
495490
496491`/^` takes a mold and a horn, and casts the result of the horn to the mold.
497492
@@ -510,7 +505,7 @@ Without the cast, we wouldn't be able to access the 'i' face of the list.
510505
511506Wide-form `/^` uses `^` as a delimiter: `/^(list @)^/~[1 2 3 ~]`
512507
513−### `/#` insert dephash
508+### `/#` "fashax"
514509
515510`/#` takes a horn and produces a cell of the dependency
516511hash of the result of the horn, and the result itself.
@@ -531,7 +526,7 @@ This pattern is used in urbit's `tree` web publishing system.
531526Wide-form `/#` does not need a delimiter:
532527`/= inline /^ {dep/@uvH txt/@t} /#/:/%/my-script:/js/`
533528
534−### `/$` process extra arguments
529+### `/$` "fasbuc"
535530
536531`/$` will slam a gate on whatever extra arguments have been supplied to this build.
537532At the moment, only HTTP requests forwarded by `%eyre` contain any extra arguments,
@@ -554,7 +549,7 @@ produces: [%who '~zod' %where /ford/pages/web %case 60]
554549Wide-form `/$` takes its arguments inside brackets, like `/~`:
555550`/=gas=/$[fuel:html]`
556551
557−### `/%` propagate extra arguments into renderers
552+### `/%` "fascen"
558553
559554`/%` will forward extra arguments (usually from `%eyre`) on to any enclosed `/renderer/`'s. Without this,
560555renderers that use `/$` to read the extra arguments will crash.