on master help sign in
convert sail syntax to markdown/html in md files
c690028John Franklin
learn/arvo/eyre.md+89−49
@@ -47,7 +47,8 @@ Runtime
47Let us follow the loading of a simple cli app, as it bounces from
47Let us follow the loading of a simple cli app, as it bounces from
48browser to server to browser and back.
48browser to server to browser and back.
49
49
50+<span id="init"></span>
50−### Initial request ;a(id "init");
51+### Initial request
51
52
52An http request for `http://sampel-sipnym.urbit.org/cli` will be [redirected](dns)
53An http request for `http://sampel-sipnym.urbit.org/cli` will be [redirected](dns)
53to the `%eyre` on ~sampel-sipnym, and come in as a `%this` kiss.
54to the `%eyre` on ~sampel-sipnym, and come in as a `%this` kiss.
@@ -141,7 +142,7 @@ from request data.
141Returning to `++process-auth`, `%get` checks if the yac is authenticated with
142Returning to `++process-auth`, `%get` checks if the yac is authenticated with
142the requested credentials(`anon` requests are always granted), which for the
143the requested credentials(`anon` requests are always granted), which for the
143fresh new `cyst` is not the case (more on success [later](#auth-ok)). Unless
144fresh new `cyst` is not the case (more on success [later](#auth-ok)). Unless
144−authentiacting as a [foreign ship](#xeno), the only thing left is to
145+authenticating as a [foreign ship](#xeno), the only thing left is to
145`++show-login-page`, which detects that the requested resource is not `%html`,
146`++show-login-page`, which detects that the requested resource is not `%html`,
146and produces a `%red` pest. For `%js`, `%red`irections `++resolve` to
147and produces a `%red` pest. For `%js`, `%red`irections `++resolve` to
147`++auth-redir:js`, a line of javascript which prepends `/~~` to the url path.
148`++auth-redir:js`, a line of javascript which prepends `/~~` to the url path.
@@ -182,7 +183,8 @@ to a `[%auth %try {password}]` perk. `%get:process-auth` checks it against
182serves a fresh `auth.json` which reflects the changed `user`. Upon receiving
183serves a fresh `auth.json` which reflects the changed `user`. Upon receiving
183this, the page is refreshed to retry the original request.
184this, the page is refreshed to retry the original request.
184
185
186+<span id="auth-ok"></span>
185−### Post-authentication: app communication. <a id="auth-ok"/>
187+### Post-authentication: app communication.
186
188
187Upon refresh, `/~~/cli` brings us for the third time to `%get:process-auth`, but
189Upon refresh, `/~~/cli` brings us for the third time to `%get:process-auth`, but
188this time the cookie is set, and the `yac` fetched contains the serving ship as
190this time the cookie is set, and the `yac` fetched contains the serving ship as
@@ -205,7 +207,8 @@ of `oryx` that identifies the connection. `++as-aux-request`, an `%is` is a
205`++add-subs:ix`, the ix core fetched `++for-view` by hashing the request
207`++add-subs:ix`, the ix core fetched `++for-view` by hashing the request
206`++oryx-to-ixor`.
208`++oryx-to-ixor`.
207
209
210+<span id="view-ixor"></span>
208−<a id="ixor"/> A view has all the state associated with a client that must be
211+A view has all the state associated with a client that must be
209remembered between events. In this case, this is what app/path the request duct
212remembered between events. In this case, this is what app/path the request duct
210is associated with; but mainly, `++add-subs:ix` will `pass-note` to `%gall` so
213is associated with; but mainly, `++add-subs:ix` will `pass-note` to `%gall` so
211it `%show`s the data on the path, current and future.
214it `%show`s the data on the path, current and future.
@@ -239,14 +242,16 @@ would occur first, and `%made:axon` would send the gall message proper. In
239either case, eventually a `%mean` or `%nice` arrives, is encoded as json, and
242either case, eventually a `%mean` or `%nice` arrives, is encoded as json, and
240sent to the client callback.
243sent to the client callback.
241
244
245+<span id="mage"></span>
242−## A path not taken: magic filenames <a id="mage"/>
246+## A path not taken: magic filenames
243
247
244The `/robots.txt` and `/favicon.(ico|png)` files are static, and served
248The `/robots.txt` and `/favicon.(ico|png)` files are static, and served
245immediately when caught by a `++parse`.
249immediately when caught by a `++parse`.
246
250
247XX index.html?
251XX index.html?
248
252
253+<span id="xeno"></span>
249−## A path not taken: foreign auth <a id="xeno"/>
254+## A path not taken: foreign auth
250
255
251While this example details a login `/~/as/own`, it is possible to be
256While this example details a login `/~/as/own`, it is possible to be
252authenticated as any ship on the network. A request for such seen in
257authenticated as any ship on the network. A request for such seen in
@@ -276,7 +281,8 @@ and sending `%g %nuke`.
276
281
277XX unmentioned arms: abet, add-poll, adit, ames-gram, anon, ares-to-json, bolo, cyst, doze, even, ford-kill, get-mean, gift, give-json, give-thou, gram, hapt, hasp, host-to-ship, ix, ixor, js, kiss, load, mean-json, move, note, pass-note, perk, perk-auth, pest, poke-test, print-subs, render-tang, resp, root-beak, scry, ses-authed, ses-ya, sign, silk, sine, stay, stem, teba, titl, to-oryx, urb, wait-era, wake, whir, wush, xml, ya, ye
282XX unmentioned arms: abet, add-poll, adit, ames-gram, anon, ares-to-json, bolo, cyst, doze, even, ford-kill, get-mean, gift, give-json, give-thou, gram, hapt, hasp, host-to-ship, ix, ixor, js, kiss, load, mean-json, move, note, pass-note, perk, perk-auth, pest, poke-test, print-subs, render-tang, resp, root-beak, scry, ses-authed, ses-ya, sign, silk, sine, stay, stem, teba, titl, to-oryx, urb, wait-era, wake, whir, wush, xml, ya, ye
278
283
279−### Appendix A: DNS <a id="dns"/>
284+<span id="dns"></span>
285+### Appendix A: DNS
280
286
281The `*.urbit.org` domain can be used to access destroyers and cruisers. In the
287The `*.urbit.org` domain can be used to access destroyers and cruisers. In the
282common case oh hosted ships, this is done by dynamic DNS directly to the hosting
288common case oh hosted ships, this is done by dynamic DNS directly to the hosting
@@ -344,8 +350,8 @@ When a new version of a page becomes available, it is useful to propagate it to
344- `/~/on/[hash].json` retuns `true` when a page may require updating.
350- `/~/on/[hash].json` retuns `true` when a page may require updating.
345- `/~/on/[hash].js` is a lightweight script that polls for the above. It is primarily used in error messages.
351- `/~/on/[hash].js` is a lightweight script that polls for the above. It is primarily used in error messages.
346
352
347−;a(id "auth");
353+<span id="auth"></span>
348−## 1.3 Authentication
354+### 1.3 Authentication
349
355
350Authenticated requests are accomplished through sessions, tracked with cookies which are set on the first such request.
356Authenticated requests are accomplished through sessions, tracked with cookies which are set on the first such request.
351- `/~/as/[user]/...` is an authenticated request to `...`, where `user` can be a `@p` ship, `'own'`, `'any'`, or `'anon'`.
357- `/~/as/[user]/...` is an authenticated request to `...`, where `user` can be a `@p` ship, `'own'`, `'any'`, or `'anon'`.
@@ -370,11 +376,10 @@ So far, all the paths specified have been GET requests. Authentication, however,
370- `POST {oryx, wire, xyro} /~/to/[app]/[mark].json`, where `xyro` is data that will be converted to the `mark`. In the simplest case, `/~/to/hello/json.json` will pass `xyro` through verbatim, sending `[%json xyro]` to the `++poke` arm of app `%hello`.
376- `POST {oryx, wire, xyro} /~/to/[app]/[mark].json`, where `xyro` is data that will be converted to the `mark`. In the simplest case, `/~/to/hello/json.json` will pass `xyro` through verbatim, sending `[%json xyro]` to the `++poke` arm of app `%hello`.
371- `POST {oryx, wire, xyro} /~/to/<ship>/[app]/[mark].json` is a foreign message send, as above.
377- `POST {oryx, wire, xyro} /~/to/<ship>/[app]/[mark].json` is a foreign message send, as above.
372
378
373−;a(id "subs");
379+<span id="subs"></span>
374### 1.5 Subscriptions
380### 1.5 Subscriptions
375
381
376−;a(id "of-ixor");
382+<span id="of-ixor"></span>
377−
378- `/~/of/[ixor]` is an `EventSource`: a conceptually infinite file containing a stream of events. By default, it sends a newline every 30 seconds serving to signal that the connection is alive to both the server and IP middleware.
383- `/~/of/[ixor]` is an `EventSource`: a conceptually infinite file containing a stream of events. By default, it sends a newline every 30 seconds serving to signal that the connection is alive to both the server and IP middleware.
379 + `/~/of/[ixor]?poll={n}` is a long-polling fallback interface. Produces event number `{n}`, blocking until it occurs. Its contexts can be affected by `POST` requests with a body of `{oryx, wire}`, and a query string of `PUT` or `DELETE`. They return either `{mark}`(which may be `null`), or [`{fail, mess}`](#mean-json)
384 + `/~/of/[ixor]?poll={n}` is a long-polling fallback interface. Produces event number `{n}`, blocking until it occurs. Its contexts can be affected by `POST` requests with a body of `{oryx, wire}`, and a query string of `PUT` or `DELETE`. They return either `{mark}`(which may be `null`), or [`{fail, mess}`](#mean-json)
380- `/~/in/[hash].json` is a dual to [`/~/on`](#on-change). It binds `mod` events, which echo the requesting token.
385- `/~/in/[hash].json` is a dual to [`/~/on`](#on-change). It binds `mod` events, which echo the requesting token.
@@ -382,14 +387,15 @@ So far, all the paths specified have been GET requests. Authentication, however,
382
387
383
388
384
389
385−;a(id "temp");
390+<span id="temp"></span>
386### 1.6 Ablative
391### 1.6 Ablative
387
392
388These interfaces will temporarily exist to aid development, and are to be considered unstable.
393These interfaces will temporarily exist to aid development, and are to be considered unstable.
389- `/~/debug/...` access normally inaccessible pages. For example, `/~/debug/as.html` will present the login page, regardless of current session status.
394- `/~/debug/...` access normally inaccessible pages. For example, `/~/debug/as.html` will present the login page, regardless of current session status.
390
395
391
396
397+<span id="client"></span>
392−## 2. Client state ;a(id "client");
398+## 2. Client state
393
399
394Some information is stored on, and provided to, browser clients
400Some information is stored on, and provided to, browser clients
395
401
@@ -397,7 +403,8 @@ Some information is stored on, and provided to, browser clients
397
403
398Authenticated users receive a cookie on the domain of `*.urbit.org`. The cookie contains a client session token, keyed by the serving ship.
404Authenticated users receive a cookie on the domain of `*.urbit.org`. The cookie contains a client session token, keyed by the serving ship.
399
405
400−### 2.2 Authentication ;a(id "auth-json");
406+<span id="auth-json"></span>
407+### 2.2 Authentication
401
408
402It is common(e.g. by the `%urb` mark) to set window.urb to the contents of `/~/auth.json`:
409It is common(e.g. by the `%urb` mark) to set window.urb to the contents of `/~/auth.json`:
403- `ship` is the serving ship
410- `ship` is the serving ship
@@ -415,7 +422,8 @@ To this object, `/main/lib/urb.js` adds helpers:
415- `drop({path,app?=urb.app}, cb?)` pulls the subscription
422- `drop({path,app?=urb.app}, cb?)` pulls the subscription
416- `util` is an object containing methods for converting between JavaScript types and Hoon atom odors.
423- `util` is an object containing methods for converting between JavaScript types and Hoon atom odors.
417
424
425+<span id="kiss"></span>
418−## 3. Requests ;a(id "kiss");
426+## 3. Requests
419
427
420## `[%born port=@ud]`, unix init
428## `[%born port=@ud]`, unix init
421
429
@@ -477,18 +485,23 @@ Sometimes, messages are received from other ships. They are expected to take the
477
485
478*Gifts given in response:* [`%nice` or `%mean`](#ack).
486*Gifts given in response:* [`%nice` or `%mean`](#ack).
479
487
480−#### 3.4.1 `gram` <a id="gram"/>
488+<span id="gram"></span>
489+#### 3.4.1 `gram`
481
490
491+<span id="foreign"></span>
482−There are three messages of note, all concerning authentication <a id="foreign"/>
492+There are three messages of note, all concerning authentication
493+<span id="lon"></span>
483−- `[/lon ses]` <a id="lon"/> is a login request, which contains the session wishing to authenticate.
494+- `[/lon ses]` is a login request, which contains the session wishing to authenticate.
484- if the session is already authorized, a reply of `[/aut ses]` from (%eyre on) a foreign ship prescribes that the session is henceforth allowed to act on its behalf. All waiting `/~/as` are resolved as successful.
495- if the session is already authorized, a reply of `[/aut ses]` from (%eyre on) a foreign ship prescribes that the session is henceforth allowed to act on its behalf. All waiting `/~/as` are resolved as successful.
485- otherwise, `[/hat ses hart]` contains the ship's preferred hostname. This can then be used to redirect the client. All waiting `/~/as` are given `307 Redirect`s to `/~/am` on the provided host.
496- otherwise, `[/hat ses hart]` contains the ship's preferred hostname. This can then be used to redirect the client. All waiting `/~/as` are given `307 Redirect`s to `/~/am` on the provided host.
486
497
487*Gifts given in response:* nice?
498*Gifts given in response:* nice?
488
499
500+<span id="gift"></span>
489−## 4. Responses ;a(id "gift");
501+## 4. Responses
490
502
503+<span id="ack"></span>
491−### 4.1 `[%nice ~]`, `[%mean ares]`, network acknowledgement ;a(id "ack");
504+### 4.1 `[%nice ~]`, `[%mean ares]`, network acknowledgement
492
505
493A `%nice` is given upon receiving an [ames message](#gram), indicating succesful receipt. `%mean` is currently unused directly, but reserved for error conditions.
506A `%nice` is given upon receiving an [ames message](#gram), indicating succesful receipt. `%mean` is currently unused directly, but reserved for error conditions.
494
507
@@ -503,25 +516,31 @@ Most requests are served with one coherent response, consisting of
503- `q=mess`, response headers
516- `q=mess`, response headers
504- `r=(unit octs)`, an optional body
517- `r=(unit octs)`, an optional body
505
518
519+<span id="that"></span>
506−### 4.3 `[%that httr]`, partial HTTP response ;a(id "that");
520+### 4.3 `[%that httr]`, partial HTTP response
507
521
508[EventStream responses](#of-ixor) consist of multiple sequential chunks. Treated as `%thou`, except the request is kept open.
522[EventStream responses](#of-ixor) consist of multiple sequential chunks. Treated as `%thou`, except the request is kept open.
509
523
524+<span id="thar"></span>
510−### 4.4 `[%thar (unit octs)]`, partial HTTP body ;a(id "thar");
525+### 4.4 `[%thar (unit octs)]`, partial HTTP body
511
526
512Complementing `%that`, `%thar` is a body chunk, containing an event. An empty `%thar` signals for the connection to be closed.
527Complementing `%that`, `%thar` is a body chunk, containing an event. An empty `%thar` signals for the connection to be closed.
513
528
514Body chunks, besides `[1 '\0a']`(a heartbeat newline), are encoded from `even` events. The stem becomes the [`event` field](#eventsource), and the content, `data` lines.
529Body chunks, besides `[1 '\0a']`(a heartbeat newline), are encoded from `even` events. The stem becomes the [`event` field](#eventsource), and the content, `data` lines.
515
530
531+<span id="even"></span>
516−#### 4.4.1 `even`, event types ;a(id "even");
532+#### 4.4.1 `even`, event types
517
533
518There are three events that a [client subscription](#subs) will be given.
534There are three events that a [client subscription](#subs) will be given.
519
535
536+<span id="even-news"></span>
520−- `[%news hash]`;a(id "even-news"); is a `%f` update, and contains the relevant dependency token.
537+- `[%news hash]` is a `%f` update, and contains the relevant dependency token.
538+<span id="even-rush"></span>
521−- `[%rush [term path] wain]` ;a(id "even-rush"); is sourced subscription data.
539+- `[%rush [term path] wain]` is sourced subscription data.
522- `[%mean [term path] ares]` is a sourced subscription error.
540- `[%mean [term path] ares]` is a sourced subscription error.
523
541
542+<span id="note"></span>
524−## 5. Vane requests ;a(id "note");
543+## 5. Vane requests
525
544
526### 5.1 ``[%a %wont sock `[path *]`gram]``, outbound message
545### 5.1 ``[%a %wont sock `[path *]`gram]``, outbound message
527
546
@@ -529,14 +548,16 @@ The `%a` interface provides conveyance of [messages](#gram) over UDP.
529
548
530Signs a `%woot` upon message arrival.
549Signs a `%woot` upon message arrival.
531
550
551+<span id="wait"></span>
532−### 5.2 `[%b ?(%wait %rest) time]`, timeout set/unset ;a(id "wait");
552+### 5.2 `[%b ?(%wait %rest) time]`, timeout set/unset
533
553
534All open [subscriptions](#of-ixor) require a "heartbeat" newline every `~s30`. When this fails to arrive, a complementary timer is set for `~m1`, after which the client is considered to have departed.
554All open [subscriptions](#of-ixor) require a "heartbeat" newline every `~s30`. When this fails to arrive, a complementary timer is set for `~m1`, after which the client is considered to have departed.
535The `%b` timer interface is used to schedule the next such event, or cancel past scheduled ones when a connection closes.
555The `%b` timer interface is used to schedule the next such event, or cancel past scheduled ones when a connection closes.
536
556
537Signs a `%wake` upon timer activation.
557Signs a `%wake` upon timer activation.
538
558
559+<span id="wasp"></span>
539−### 5.3 `[%f %wasp @uvI]`, dependency listen ;a(id "wasp");
560+### 5.3 `[%f %wasp @uvI]`, dependency listen
540
561
541Knowledge of filesystem changes, requested by `/~/on` and `/~/in`, is requested the `%wasp` note. It contains the hash token which identifies a set of dependencies to query. Saved as a (live[live](#live)#live] request in case of cancellation when caused by `/~/on`.
562Knowledge of filesystem changes, requested by `/~/on` and `/~/in`, is requested the `%wasp` note. It contains the hash token which identifies a set of dependencies to query. Saved as a (live[live](#live)#live] request in case of cancellation when caused by `/~/on`.
542
563
@@ -557,7 +578,8 @@ The simplest functional request is the construction of a page. Saved as a [live]
557- A `beam`(path in `%clay`) is decoded from the request path.
578- A `beam`(path in `%clay`) is decoded from the request path.
558- A `/web/<nyp ced quy>` virtual path is appended, span-encoding method, auth, and query string.
579- A `/web/<nyp ced quy>` virtual path is appended, span-encoding method, auth, and query string.
559
580
581+<span id="done"></span>
560−### `[%cast mark %done ~ cage]`, convert ;a(id "done");
582+### `[%cast mark %done ~ cage]`, convert
561
583
562This is used when communicating with apps, in both directions.
584This is used when communicating with apps, in both directions.
563- Client messages are encoded as JSON objects, but can contain many different marks. Ones sent to non-`json.json` endpoints are `%cast` to he relevant mark, with a `cage` of `[%json p:!>(*json) jon]`, prior to being sent onwards to applications with `[%g %mess]`.
585- Client messages are encoded as JSON objects, but can contain many different marks. Ones sent to non-`json.json` endpoints are `%cast` to he relevant mark, with a `cage` of `[%json p:!>(*json) jon]`, prior to being sent onwards to applications with `[%g %mess]`.
@@ -567,13 +589,15 @@ This is used when communicating with apps, in both directions.
567
589
568The end goal of many a userspace `hymn.hook` is to provide UI for a `%gall` app. To accommodate this, various functionality needs to be interfaced with.
590The end goal of many a userspace `hymn.hook` is to provide UI for a `%gall` app. To accommodate this, various functionality needs to be interfaced with.
569
591
592+<span id="mess"></span>
570−### `[%mess hapt ship cage]`, app message ;a(id "mess");
593+### `[%mess hapt ship cage]`, app message
571
594
572After a `/~/to` POST has been received, and possibly converted to the correct mark, it is sent to `%g` for processing. The `hapt` is the destination, the `ship` is the source, the `cage` is the marked message data.
595After a `/~/to` POST has been received, and possibly converted to the correct mark, it is sent to `%g` for processing. The `hapt` is the destination, the `ship` is the source, the `cage` is the marked message data.
573
596
574Signs a `%nice` or `%mean`, in userspace or upon crashing.
597Signs a `%nice` or `%mean`, in userspace or upon crashing.
575
598
599+<span id="show"></span>
576−### `[%show hapt ship path]`, app subscription ;a(id "show");
600+### `[%show hapt ship path]`, app subscription
577
601
578An `/~/is` PUT, if not already registered, results in a new subscription. A request for such contains the destination `hapt`, requesting `ship`, and app-internal `path`.
602An `/~/is` PUT, if not already registered, results in a new subscription. A request for such contains the destination `hapt`, requesting `ship`, and app-internal `path`.
579
603
@@ -591,15 +615,18 @@ An `/~/is` DELETE is used to remove a subscription, and is converted straightfor
591
615
592Signs an empty `%mean` for each open subscription that is closed.
616Signs an empty `%mean` for each open subscription that is closed.
593
617
618+<span id="whir"></span>
594−## 6. In-flight metadata ;a(id "whir");
619+## 6. In-flight metadata
595
620
596Various state can be associated with requests, but not necessarily be returned in responses to them.
621Various state can be associated with requests, but not necessarily be returned in responses to them.
597
622
623+<span id="wire-drop"></span>
598−### 6.1 `~`, dropthrough ;a(id "wire-drop");
624+### 6.1 `~`, dropthrough
599
625
600If the response should be sent statelessly further up the duct, the `wire` is empty. This is used in `%f` pure functional page generation.
626If the response should be sent statelessly further up the duct, the `wire` is empty. This is used in `%f` pure functional page generation.
601
627
628+<span id="wire-live"></span>
602−### 6.2 `[?(%y %n) ...]`, stability ;a(id "wire-live");
629+### 6.2 `[?(%y %n) ...]`, stability
603
630
604The first element of a [`%b` timer](#wait) path distinguishes between live(%y) and dying(%n) channels.
631The first element of a [`%b` timer](#wait) path distinguishes between live(%y) and dying(%n) channels.
605
632
@@ -611,15 +638,18 @@ Designates which stream to act upon. Present on `%b` timer cards.
611
638
612Present on `%f` dependency news. Looked up in [the state](#bolo) to see if any response is necessary.
639Present on `%f` dependency news. Looked up in [the state](#bolo) to see if any response is necessary.
613
640
641+<span id="wire-to"></span>
614−### 6.5 `/to/<hasp>/<ship>`, app ;a(id "wire-to");
642+### 6.5 `/to/<hasp>/<ship>`, app
615
643
616Present on `%f` translations of message marks
644Present on `%f` translations of message marks
617
645
646+<span id="wire-is"></span>
618−### 6.6 `/is/[ixor]/{hasp path}`, subscription ;a(id "wire-is");
647+### 6.6 `/is/[ixor]/{hasp path}`, subscription
619
648
620Subscription requests. Present on `%g` subscription requests, and `%f` translations of [`%rush` subscription data](#show).
649Subscription requests. Present on `%g` subscription requests, and `%f` translations of [`%rush` subscription data](#show).
621
650
651+<span id="sign"></span>
622−## 7. Vane responses ;a(id "sign");
652+## 7. Vane responses
623
653
624The goal of requests is to cause some manner of result. Specifically,
654The goal of requests is to cause some manner of result. Specifically,
625
655
@@ -655,13 +685,15 @@ The former is [served](#mime) back to the requester(i.e. the remaining duct), an
655
685
656A `%rush` arrives on a [subscription wire](#wire-is), and is then sent [for conversion](#done) to the correct mark. An unexpected `%rush` is `%nuke`d.
686A `%rush` arrives on a [subscription wire](#wire-is), and is then sent [for conversion](#done) to the correct mark. An unexpected `%rush` is `%nuke`d.
657
687
688+<span id="bolo"></span>
658−## 8. Server state ;a(id "bolo");
689+## 8. Server state
659
690
660There is a quantity of data that persists between events.
691There is a quantity of data that persists between events.
661
692
662### 8.1 Global
693### 8.1 Global
663
694
695+<span id="prefix"></span>
664−- `path` ;a(id "prefix"); the default path which is prepended to relative plain requests. Initialized to `/<our>`, the serving ship; this interprets the first element of requests as a desk, and injects a `case` of `0`.
696+- `path` the default path which is prepended to relative plain requests. Initialized to `/<our>`, the serving ship; this interprets the first element of requests as a desk, and injects a `case` of `0`.
665- `(jar ship hart)` remembered hostnames in order of preference, made accessible through `.^`
697- `(jar ship hart)` remembered hostnames in order of preference, made accessible through `.^`
666 + The default values(for self) are `http://<ship>.urbit.org:80` if not on a fake network, followed by `https://0.0.0.0:[port]`.
698 + The default values(for self) are `http://<ship>.urbit.org:80` if not on a fake network, followed by `https://0.0.0.0:[port]`.
667- `(jug deps (each duct oryx))`, `/~/on` and `/~/in` endpoints listening to `%c` updates.
699- `(jug deps (each duct oryx))`, `/~/on` and `/~/in` endpoints listening to `%c` updates.
@@ -671,7 +703,8 @@ There is a quantity of data that persists between events.
671- `(map hole sink)`, session state.
703- `(map hole sink)`, session state.
672- `(map hole ,[ship ?])`, foreign session names, along with their origin ships and whether they are authorized to act on our behalf.
704- `(map hole ,[ship ?])`, foreign session names, along with their origin ships and whether they are authorized to act on our behalf.
673
705
706+<span id="live"></span>
674−### 8.2 `live`, per-request state ;a(id "live");
707+### 8.2 `live`, per-request state
675
708
676To honor request cancellations, each unserved request must track which effect it is causing.
709To honor request cancellations, each unserved request must track which effect it is causing.
677+ `[%exec whir]` if it is a ford data request
710+ `[%exec whir]` if it is a ford data request
@@ -679,7 +712,8 @@ To honor request cancellations, each unserved request must track which effect it
679+ `[%xeno ship]` if this is a proxied request
712+ `[%xeno ship]` if this is a proxied request
680+ `[%poll ixor]` if this is a session long-poll
713+ `[%poll ixor]` if this is a session long-poll
681
714
715+<span id="sink"></span>
682−### 8.3 `sink`, per-session state ;a(id "sink");
716+### 8.3 `sink`, per-session state
683
717
684Each `hole` has associated authentication state.
718Each `hole` has associated authentication state.
685- `priv`, a random secret that verifies the session, stored in cookie.
719- `priv`, a random secret that verifies the session, stored in cookie.
@@ -687,11 +721,13 @@ Each `hole` has associated authentication state.
687- `(jug ship ,[path duct])`, authentication `/~/as` requests waiting on foreign ships.
721- `(jug ship ,[path duct])`, authentication `/~/as` requests waiting on foreign ships.
688- `(set oryx)`, views associated with this session. Dual of `hole` in `stem`.
722- `(set oryx)`, views associated with this session. Dual of `hole` in `stem`.
689
723
724+<span id="stem"></span>
690−### 8.4 `stem`, per-view state ;a(id "stem");
725+### 8.4 `stem`, per-view state
691
726
692Each `oryx` has active subscription state.
727Each `oryx` has active subscription state.
693- `hole`, session in which this view resides. Dual of `(set oryx)` in `sink`.
728- `hole`, session in which this view resides. Dual of `(set oryx)` in `sink`.
729+<span id="ixor"></span>
694−- `ixor` ;a(id "ixor"); , a cached hash of the `oryx` that is used as a subscription id, by the `/~/of` EventStream.
730+- `ixor`, a cached hash of the `oryx` that is used as a subscription id, by the `/~/of` EventStream.
695- `[,@u (map ,@u even)]`, queued [events](#even). Has a maximum size.
731- `[,@u (map ,@u even)]`, queued [events](#even). Has a maximum size.
696- `(unit ,[duct @u ?])`, http connection, its last received event, and whether it is a long-poll request.
732- `(unit ,[duct @u ?])`, http connection, its last received event, and whether it is a long-poll request.
697- `(set deps)`, subscribed `/~/in` points. Mirrored in `bolo`.
733- `(set deps)`, subscribed `/~/in` points. Mirrored in `bolo`.
@@ -701,11 +737,15 @@ Each `oryx` has active subscription state.
701## Appendix A: Glossary
737## Appendix A: Glossary
702
738
703- An `oryx` is a CSRF token used for [authenticated requests](#auth)
739- An `oryx` is a CSRF token used for [authenticated requests](#auth)
740+<span id="mean-json"></span>
704−- `mean.json` ;a(id "mean-json"); is a rendering of hoon `ares`: an error message formatted as `{fail:'type',mess:"Error message"}`
741+- `mean.json` is a rendering of hoon `ares`: an error message formatted as `{fail:'type',mess:"Error message"}`
742+<span id="urb-js"></span>
705−- `urb.js` ;a(id "urb-js"); is the standard client-side implementation of the `%eyre` protocols, normally found in `/=main=/lib`
743+- `urb.js` is the standard client-side implementation of the `%eyre` protocols, normally found in `/=main=/lib`
744+<span id="mime"></span>
706−- The act of "serving" ;a(id "mime"); , refers to the wrapping of a `%mime` cage in an HTTP `200 Success` response, and errors or other marks being [sent to ford](#done) for conversion. Inside a `sign`, this conversion occurs along the same [`wire`](#wire); otherwise, the `wire` is [empty](#wire-drop).
745+- The act of "serving", refers to the wrapping of a `%mime` cage in an HTTP `200 Success` response, and errors or other marks being [sent to ford](#done) for conversion. Inside a `sign`, this conversion occurs along the same [`wire`](#wire); otherwise, the `wire` is [empty](#wire-drop).
707−
746+
747+<span id="eventsource"></span>
708−## Appendix B: EventSource ;a(id "eventsource");
748+## Appendix B: EventSource
709
749
710UNIMPLEMENTED
750UNIMPLEMENTED
711
751
reference/glossary.md+61−98
@@ -9,15 +9,13 @@ from the strange words within.
9As Dijkstra put it: "The purpose of abstraction is not to be vague, but
9As Dijkstra put it: "The purpose of abstraction is not to be vague, but
10to create a new semantic level in which one can be absolutely precise."
10to create a new semantic level in which one can be absolutely precise."
11
11
12−;h3
12+<span id="application"></span>
13− ;div(id "application"): application
13+### application
14−==
15
14
16Also known as an “app,” an _application_ is a Hoon program that can hold state.
15Also known as an “app,” an _application_ is a Hoon program that can hold state.
17
16
18−;h3
17+<span id="arm"></span>
19− ;div(id "arm"): arm
18+### arm
20−==
21
19
22An _arm_ is a named, functionally-computed attribute of a [core](#core).
20An _arm_ is a named, functionally-computed attribute of a [core](#core).
23
21
@@ -45,9 +43,8 @@ dry.
45_See [advanced types](/docs/reference/hoon-expressions/advanced/)_.
43_See [advanced types](/docs/reference/hoon-expressions/advanced/)_.
46
44
47
45
48−;h3
46+<span id="arvo"></span>
49− ;div(id "arvo"): Arvo
47+### Arvo
50−==
51
48
52The Urbit operating system and kernel. Arvo's state is a pure function of its
49The Urbit operating system and kernel. Arvo's state is a pure function of its
53event log, and it serves as the Urbit event manager. It contains vanes, which are
50event log, and it serves as the Urbit event manager. It contains vanes, which are
@@ -192,9 +189,8 @@ An atom type is _warm_ or _cold_ based on whether the constant exists.
192
189
193_See [basic types](/docs/reference/hoon-expressions/basic)_
190_See [basic types](/docs/reference/hoon-expressions/basic)_
194
191
195−;h3
192+<span id="aura"></span>
196− ;div(id "aura"): aura
193+### aura
197−==
198
194
199An aura is a soft atom type. They appear as strings beginning with `@`. Auras
195An aura is a soft atom type. They appear as strings beginning with `@`. Auras
200represent the structure of an atom, print format, or other semantics. Its
196represent the structure of an atom, print format, or other semantics. Its
@@ -297,9 +293,8 @@ least-significant bit first. Represented as the aura `@t`.
297 'hello'
293 'hello'
298```
294```
299
295
300−;h3
296+<span id="core"></span>
301− ;div(id "core"): core
297+### core
302−==
303
298
304A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
299A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
305code head the _battery_ and the data tail the _payload_. All code-data
300code head the _battery_ and the data tail the _payload_. All code-data
@@ -366,9 +361,8 @@ _no_.
366Why? It's fresh, it's different, it's new. And it's annoying. And it
361Why? It's fresh, it's different, it's new. And it's annoying. And it
367keeps you on your toes. And it's also just intuitively right.
362keeps you on your toes. And it's also just intuitively right.
368
363
369−;h3
364+<span id="gate"></span>
370− ;div(id "gate"): gate
365+### gate
371−==
372
366
373A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
367A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
374analog to a function. To call a gate on an argument, replace the sample
368analog to a function. To call a gate on an argument, replace the sample
@@ -453,9 +447,8 @@ _More information on Hall can be found [here](/docs/learn/arvo/arvo-internals/ha
453_Hood_ orchestrates many of the Urbit initialization systems necessary
447_Hood_ orchestrates many of the Urbit initialization systems necessary
454for boot.
448for boot.
455
449
456−;h3
450+<span id="hoon"></span>
457− ;div(id "hoon"): Hoon
451+### Hoon
458−==
459
452
460Hoon is a strict, higher-order typed functional language that compiles itself
453Hoon is a strict, higher-order typed functional language that compiles itself
461to Nock.
454to Nock.
@@ -464,11 +457,8 @@ The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
464
457
465_More information can be found in the [hoon](/docs/learn/arvo/hoon) section._
458_More information can be found in the [hoon](/docs/learn/arvo/hoon) section._
466
459
467−- ;div
460+<span id="mint"></span>
468− ;h5
469− ;div(id "mint"): Mint
461+- ##### Mint
470− ==
471− ==
472
462
473 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
463 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
474 expression source (a [hoon](#a-hoon), for example) and produces the product
464 expression source (a [hoon](#a-hoon), for example) and produces the product
@@ -560,9 +550,8 @@ you desire.
56015
55015
561```
551```
562
552
563−;h3
553+<span id="limb"></span>
564− ;div(id "limb"): limb
554+### limb
565−==
566
555
567A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
556A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
568[leg](#leg).
557[leg](#leg).
@@ -585,82 +574,59 @@ found, the result is the product of the arm.
585_See [Limbs and wings](/docs/hoon-expressions/limb/)_
574_See [Limbs and wings](/docs/hoon-expressions/limb/)_
586
575
587
576
588−;h3
589− ;div(id "move"): formula
577+<span id="move"></span>
590−==
578+### move
591
579
592A move is the [Arvo](#arvo) equivalent of a syscall.
580A move is the [Arvo](#arvo) equivalent of a syscall.
593
581
594
582
595−;h3
583+<span id="noun"></span>
596− ;div(id "noun"): noun
584+### noun
597−==
598
585
599In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
586In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
600
587
601
588
602−;h3
589+<span id="nock"></span>
603− ;div(id "nock"): Nock
590+### Nock
604−==
605
591
606Nock is a Turing-complete, non-lambda combinator interpreter. It's
592Nock is a Turing-complete, non-lambda combinator interpreter. It's
607Urbit's low-level programming language. Nock is functional and typeless.
593Urbit's low-level programming language. Nock is functional and typeless.
608
594
609−- ;div
610− ;h5
611− ;div(id "nock-noun"): noun
595+<span id="nock-noun"></span>
612− ==
596+- ##### noun
597+
613− ;div: an _atom_ or a _cell_.
598+ an _atom_ or a _cell_.
614− ==
599+
615−
616−- ;div
617− ;h5
618− ;div(id "nock-atom"): atom
600+<span id="nock-atom"></span>
619− ==
601+- ##### atom
602+
620− any natural number, including zero.
603+ any natural number, including zero.
621− ==
604+
622−
623− - ;div
624− ;h5
625− ;div(id "nock-cell"): cell
605+<span id="nock-cell"></span>
626− ==
606+- ##### cell
627− any ordered pair of nouns.
607+
628− ==
629−
630− - ;div
631− ;h5
632− ;div(id "nock-cell"): cell
633− ==
634− any ordered pair of nouns.
608+ any ordered pair of nouns.
635− ==
609+
636−
637− - ;div
638− ;h5
639− ;div(id "nock-subject"): subject
610+<span id="nock-subject"></span>
640− ==
611+- ##### subject
612+
641− a noun - the data against which a _formula_ is evaluated.
613+ a noun - the data against which a _formula_ is evaluated.
642− ==
614+
643−
644− - ;div
645− ;h5
646− ;div(id "nock-formula"): formula
615+<span id="nock-formula"></span>
647− ==
616+- ##### formula
617+
648− a noun - a function at the nock level.
618+ a noun - a function at the nock level.
649− ==
619+
650−
651− - ;div
652− ;h5
653− ;div(id "nock-product"): product
620+<span id="nock-product"></span>
654− ==
621+- ##### product
622+
655− a noun - the result of evaluating a formula against a subject.
623+ a noun - the result of evaluating a formula against a subject.
656− ==
657
624
658_See the [Nock definition](/docs/learn/arvo/nock/definition)._
625_See the [Nock definition](/docs/learn/arvo/nock/definition)._
659
626
660
627
661−;h3
628+<span id="mark"></span>
662− ;div(id "mark"): mark
629+### mark
663−==
664
630
665A _mark_ is Urbit's version of a MIME type, if a MIME type was an
631A _mark_ is Urbit's version of a MIME type, if a MIME type was an
666executable specification. The mark is just a label that's used as a path
632executable specification. The mark is just a label that's used as a path
@@ -741,9 +707,8 @@ whose number is its bottom half. So the planet `~firbyr-napbes`,
741 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
707 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
742 usually the planet name.
708 usually the planet name.
743
709
744−;h3
710+<span id="structure"></span>
745− ;div(id "structure"): structure
711+### structure
746−==
747
712
748A _structure_ is an idempotent [gate](#gate) (function) that constructs and
713A _structure_ is an idempotent [gate](#gate) (function) that constructs and
749validates types in Hoon.
714validates types in Hoon.
@@ -771,9 +736,8 @@ Here's some common structure terminology:
771
736
772_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
737_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
773
738
774−;h3
739+<span id="rune"></span>
775− ;div(id "rune"): rune
740+### rune
776−==
777
741
778A Hoon _rune_ is a pair of ASCII symbols used to begin a
742A Hoon _rune_ is a pair of ASCII symbols used to begin a
779[Hoon expression](#a-hoon).
743[Hoon expression](#a-hoon).
@@ -842,9 +806,8 @@ The head of `+n` is `+2n`, the tail is `+(2n+1)`.
842`+7` is a special address for gates, because the position is defined
806`+7` is a special address for gates, because the position is defined
843(by convention) as the context of a gate and of all cores.
807(by convention) as the context of a gate and of all cores.
844
808
845−;h3
809+<span id="talk"></span>
846− ;div(id "talk"): talk
810+### talk
847−==
848
811
849_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
812_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
850built on top of Hall, the Urbit back-end messaging system.
813built on top of Hall, the Urbit back-end messaging system.
using/messaging.md+4−6
@@ -137,9 +137,8 @@ Now you can tell your friends to `;join ~your-urbit/my-channel`.
137
137
138---
138---
139
139
140−;h2
140+<span id="manual"></span>
141− ;div(id "manual"): Manual
141+## Manual
142−==
143
142
144Hall's design is similar in spirit to
143Hall's design is similar in spirit to
145[NNTP](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol),
144[NNTP](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol),
@@ -319,9 +318,8 @@ For example:
319sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
318sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
320```
319```
321
320
322−;h6
321+<span id="filter"></span>
323− ;div(id "filter"): Filter
322+###### Filter
324−==
325
323
326Syntax: `;filter %name [capitals] [unicode]`
324Syntax: `;filter %name [capitals] [unicode]`
327
325
using/shell.md+1−3
@@ -212,9 +212,7 @@ number of vane names.
212
212
213## Manual
213## Manual
214
214
215−;h3(class "first child")
216−Sources and sinks
215+### Sources and sinks
217−==
218
216
219A Dojo command is either a *source* or a *sink*. A source is just something
217A Dojo command is either a *source* or a *sink*. A source is just something
220that can be printed to your console or the result of some computation. A
218that can be printed to your console or the result of some computation. A