on master help sign in
remove list headers, delete some spurious span tags
8a15880Morgan Sutherland
learn/arvo/eyre.md−47
@@ -47,7 +47,6 @@ 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>
51### Initial request
50### Initial request
52
51
53An http request for `http://sampel-sipnym.urbit.org/cli` will be [redirected](dns)
52An http request for `http://sampel-sipnym.urbit.org/cli` will be [redirected](dns)
@@ -183,7 +182,6 @@ to a `[%auth %try {password}]` perk. `%get:process-auth` checks it against
183serves a fresh `auth.json` which reflects the changed `user`. Upon receiving
182serves a fresh `auth.json` which reflects the changed `user`. Upon receiving
184this, the page is refreshed to retry the original request.
183this, the page is refreshed to retry the original request.
185
184
186−<span id="auth-ok"></span>
187### Post-authentication: app communication.
185### Post-authentication: app communication.
188
186
189Upon refresh, `/~~/cli` brings us for the third time to `%get:process-auth`, but
187Upon refresh, `/~~/cli` brings us for the third time to `%get:process-auth`, but
@@ -207,7 +205,6 @@ of `oryx` that identifies the connection. `++as-aux-request`, an `%is` is a
207`++add-subs:ix`, the ix core fetched `++for-view` by hashing the request
205`++add-subs:ix`, the ix core fetched `++for-view` by hashing the request
208`++oryx-to-ixor`.
206`++oryx-to-ixor`.
209
207
210−<span id="view-ixor"></span>
211A view has all the state associated with a client that must be
208A view has all the state associated with a client that must be
212remembered between events. In this case, this is what app/path the request duct
209remembered between events. In this case, this is what app/path the request duct
213is associated with; but mainly, `++add-subs:ix` will `pass-note` to `%gall` so
210is associated with; but mainly, `++add-subs:ix` will `pass-note` to `%gall` so
@@ -242,7 +239,6 @@ would occur first, and `%made:axon` would send the gall message proper. In
242either case, eventually a `%mean` or `%nice` arrives, is encoded as json, and
239either case, eventually a `%mean` or `%nice` arrives, is encoded as json, and
243sent to the client callback.
240sent to the client callback.
244
241
245−<span id="mage"></span>
246## A path not taken: magic filenames
242## A path not taken: magic filenames
247
243
248The `/robots.txt` and `/favicon.(ico|png)` files are static, and served
244The `/robots.txt` and `/favicon.(ico|png)` files are static, and served
@@ -250,7 +246,6 @@ immediately when caught by a `++parse`.
250
246
251XX index.html?
247XX index.html?
252
248
253−<span id="xeno"></span>
254## A path not taken: foreign auth
249## A path not taken: foreign auth
255
250
256While this example details a login `/~/as/own`, it is possible to be
251While this example details a login `/~/as/own`, it is possible to be
@@ -281,7 +276,6 @@ and sending `%g %nuke`.
281
276
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
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
283
278
284−<span id="dns"></span>
285### Appendix A: DNS
279### Appendix A: DNS
286
280
287The `*.urbit.org` domain can be used to access destroyers and cruisers. In the
281The `*.urbit.org` domain can be used to access destroyers and cruisers. In the
@@ -350,7 +344,6 @@ When a new version of a page becomes available, it is useful to propagate it to
350- `/~/on/[hash].json` retuns `true` when a page may require updating.
344- `/~/on/[hash].json` retuns `true` when a page may require updating.
351- `/~/on/[hash].js` is a lightweight script that polls for the above. It is primarily used in error messages.
345- `/~/on/[hash].js` is a lightweight script that polls for the above. It is primarily used in error messages.
352
346
353−<span id="auth"></span>
354### 1.3 Authentication
347### 1.3 Authentication
355
348
356Authenticated requests are accomplished through sessions, tracked with cookies which are set on the first such request.
349Authenticated requests are accomplished through sessions, tracked with cookies which are set on the first such request.
@@ -376,10 +369,8 @@ So far, all the paths specified have been GET requests. Authentication, however,
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`.
369- `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`.
377- `POST {oryx, wire, xyro} /~/to/<ship>/[app]/[mark].json` is a foreign message send, as above.
370- `POST {oryx, wire, xyro} /~/to/<ship>/[app]/[mark].json` is a foreign message send, as above.
378
371
379−<span id="subs"></span>
380### 1.5 Subscriptions
372### 1.5 Subscriptions
381
373
382−<span id="of-ixor"></span>
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.
374- `/~/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.
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)
375 + `/~/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)
385- `/~/in/[hash].json` is a dual to [`/~/on`](#on-change). It binds `mod` events, which echo the requesting token.
376- `/~/in/[hash].json` is a dual to [`/~/on`](#on-change). It binds `mod` events, which echo the requesting token.
@@ -387,14 +378,12 @@ So far, all the paths specified have been GET requests. Authentication, however,
387
378
388
379
389
380
390−<span id="temp"></span>
391### 1.6 Ablative
381### 1.6 Ablative
392
382
393These interfaces will temporarily exist to aid development, and are to be considered unstable.
383These interfaces will temporarily exist to aid development, and are to be considered unstable.
394- `/~/debug/...` access normally inaccessible pages. For example, `/~/debug/as.html` will present the login page, regardless of current session status.
384- `/~/debug/...` access normally inaccessible pages. For example, `/~/debug/as.html` will present the login page, regardless of current session status.
395
385
396
386
397−<span id="client"></span>
398## 2. Client state
387## 2. Client state
399
388
400Some information is stored on, and provided to, browser clients
389Some information is stored on, and provided to, browser clients
@@ -403,7 +392,6 @@ Some information is stored on, and provided to, browser clients
403
392
404Authenticated users receive a cookie on the domain of `*.urbit.org`. The cookie contains a client session token, keyed by the serving ship.
393Authenticated users receive a cookie on the domain of `*.urbit.org`. The cookie contains a client session token, keyed by the serving ship.
405
394
406−<span id="auth-json"></span>
407### 2.2 Authentication
395### 2.2 Authentication
408
396
409It is common(e.g. by the `%urb` mark) to set window.urb to the contents of `/~/auth.json`:
397It is common(e.g. by the `%urb` mark) to set window.urb to the contents of `/~/auth.json`:
@@ -422,7 +410,6 @@ To this object, `/main/lib/urb.js` adds helpers:
422- `drop({path,app?=urb.app}, cb?)` pulls the subscription
410- `drop({path,app?=urb.app}, cb?)` pulls the subscription
423- `util` is an object containing methods for converting between JavaScript types and Hoon atom odors.
411- `util` is an object containing methods for converting between JavaScript types and Hoon atom odors.
424
412
425−<span id="kiss"></span>
426## 3. Requests
413## 3. Requests
427
414
428## `[%born port=@ud]`, unix init
415## `[%born port=@ud]`, unix init
@@ -485,22 +472,17 @@ Sometimes, messages are received from other ships. They are expected to take the
485
472
486**Gifts given in response:** [`%nice` or `%mean`](#ack).
473**Gifts given in response:** [`%nice` or `%mean`](#ack).
487
474
488−<span id="gram"></span>
489#### 3.4.1 `gram`
475#### 3.4.1 `gram`
490
476
491−<span id="foreign"></span>
492There are three messages of note, all concerning authentication
477There are three messages of note, all concerning authentication
493−<span id="lon"></span>
494- `[/lon ses]` is a login request, which contains the session wishing to authenticate.
478- `[/lon ses]` is a login request, which contains the session wishing to authenticate.
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.
479- 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.
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.
480- 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.
497
481
498**Gifts given in response:** nice?
482**Gifts given in response:** nice?
499
483
500−<span id="gift"></span>
501## 4. Responses
484## 4. Responses
502
485
503−<span id="ack"></span>
504### 4.1 `[%nice ~]`, `[%mean ares]`, network acknowledgement
486### 4.1 `[%nice ~]`, `[%mean ares]`, network acknowledgement
505
487
506A `%nice` is given upon receiving an [ames message](#gram), indicating succesful receipt. `%mean` is currently unused directly, but reserved for error conditions.
488A `%nice` is given upon receiving an [ames message](#gram), indicating succesful receipt. `%mean` is currently unused directly, but reserved for error conditions.
@@ -516,30 +498,23 @@ Most requests are served with one coherent response, consisting of
516- `q=mess`, response headers
498- `q=mess`, response headers
517- `r=(unit octs)`, an optional body
499- `r=(unit octs)`, an optional body
518
500
519−<span id="that"></span>
520### 4.3 `[%that httr]`, partial HTTP response
501### 4.3 `[%that httr]`, partial HTTP response
521
502
522[EventStream responses](#of-ixor) consist of multiple sequential chunks. Treated as `%thou`, except the request is kept open.
503[EventStream responses](#of-ixor) consist of multiple sequential chunks. Treated as `%thou`, except the request is kept open.
523
504
524−<span id="thar"></span>
525### 4.4 `[%thar (unit octs)]`, partial HTTP body
505### 4.4 `[%thar (unit octs)]`, partial HTTP body
526
506
527Complementing `%that`, `%thar` is a body chunk, containing an event. An empty `%thar` signals for the connection to be closed.
507Complementing `%that`, `%thar` is a body chunk, containing an event. An empty `%thar` signals for the connection to be closed.
528
508
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.
509Body chunks, besides `[1 '\0a']`(a heartbeat newline), are encoded from `even` events. The stem becomes the [`event` field](#eventsource), and the content, `data` lines.
530
510
531−<span id="even"></span>
532#### 4.4.1 `even`, event types
511#### 4.4.1 `even`, event types
533
512
534There are three events that a [client subscription](#subs) will be given.
513There are three events that a [client subscription](#subs) will be given.
535
514
536−<span id="even-news"></span>
537- `[%news hash]` is a `%f` update, and contains the relevant dependency token.
515- `[%news hash]` is a `%f` update, and contains the relevant dependency token.
538−<span id="even-rush"></span>
539−- `[%rush [term path] wain]` is sourced subscription data.
540- `[%mean [term path] ares]` is a sourced subscription error.
516- `[%mean [term path] ares]` is a sourced subscription error.
541
517
542−<span id="note"></span>
543## 5. Vane requests
518## 5. Vane requests
544
519
545### 5.1 ``[%a %wont sock `[path *]`gram]``, outbound message
520### 5.1 ``[%a %wont sock `[path *]`gram]``, outbound message
@@ -548,15 +523,12 @@ The `%a` interface provides conveyance of [messages](#gram) over UDP.
548
523
549Signs a `%woot` upon message arrival.
524Signs a `%woot` upon message arrival.
550
525
551−<span id="wait"></span>
552−### 5.2 `[%b ?(%wait %rest) time]`, timeout set/unset
553
526
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.
527All 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.
555The `%b` timer interface is used to schedule the next such event, or cancel past scheduled ones when a connection closes.
528The `%b` timer interface is used to schedule the next such event, or cancel past scheduled ones when a connection closes.
556
529
557Signs a `%wake` upon timer activation.
530Signs a `%wake` upon timer activation.
558
531
559−<span id="wasp"></span>
560### 5.3 `[%f %wasp @uvI]`, dependency listen
532### 5.3 `[%f %wasp @uvI]`, dependency listen
561
533
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`.
534Knowledge 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`.
@@ -578,7 +550,6 @@ The simplest functional request is the construction of a page. Saved as a [live]
578- A `beam`(path in `%clay`) is decoded from the request path.
550- A `beam`(path in `%clay`) is decoded from the request path.
579- A `/web/<nyp ced quy>` virtual path is appended, span-encoding method, auth, and query string.
551- A `/web/<nyp ced quy>` virtual path is appended, span-encoding method, auth, and query string.
580
552
581−<span id="done"></span>
582### `[%cast mark %done ~ cage]`, convert
553### `[%cast mark %done ~ cage]`, convert
583
554
584This is used when communicating with apps, in both directions.
555This is used when communicating with apps, in both directions.
@@ -589,14 +560,12 @@ This is used when communicating with apps, in both directions.
589
560
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.
561The 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.
591
562
592−<span id="mess"></span>
593### `[%mess hapt ship cage]`, app message
563### `[%mess hapt ship cage]`, app message
594
564
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.
565After 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.
596
566
597Signs a `%nice` or `%mean`, in userspace or upon crashing.
567Signs a `%nice` or `%mean`, in userspace or upon crashing.
598
568
599−<span id="show"></span>
600### `[%show hapt ship path]`, app subscription
569### `[%show hapt ship path]`, app subscription
601
570
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`.
571An `/~/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`.
@@ -615,17 +584,14 @@ An `/~/is` DELETE is used to remove a subscription, and is converted straightfor
615
584
616Signs an empty `%mean` for each open subscription that is closed.
585Signs an empty `%mean` for each open subscription that is closed.
617
586
618−<span id="whir"></span>
619## 6. In-flight metadata
587## 6. In-flight metadata
620
588
621Various state can be associated with requests, but not necessarily be returned in responses to them.
589Various state can be associated with requests, but not necessarily be returned in responses to them.
622
590
623−<span id="wire-drop"></span>
624### 6.1 `~`, dropthrough
591### 6.1 `~`, dropthrough
625
592
626If the response should be sent statelessly further up the duct, the `wire` is empty. This is used in `%f` pure functional page generation.
593If the response should be sent statelessly further up the duct, the `wire` is empty. This is used in `%f` pure functional page generation.
627
594
628−<span id="wire-live"></span>
629### 6.2 `[?(%y %n) ...]`, stability
595### 6.2 `[?(%y %n) ...]`, stability
630
596
631The first element of a [`%b` timer](#wait) path distinguishes between live(%y) and dying(%n) channels.
597The first element of a [`%b` timer](#wait) path distinguishes between live(%y) and dying(%n) channels.
@@ -638,17 +604,14 @@ Designates which stream to act upon. Present on `%b` timer cards.
638
604
639Present on `%f` dependency news. Looked up in [the state](#bolo) to see if any response is necessary.
605Present on `%f` dependency news. Looked up in [the state](#bolo) to see if any response is necessary.
640
606
641−<span id="wire-to"></span>
642### 6.5 `/to/<hasp>/<ship>`, app
607### 6.5 `/to/<hasp>/<ship>`, app
643
608
644Present on `%f` translations of message marks
609Present on `%f` translations of message marks
645
610
646−<span id="wire-is"></span>
647### 6.6 `/is/[ixor]/{hasp path}`, subscription
611### 6.6 `/is/[ixor]/{hasp path}`, subscription
648
612
649Subscription requests. Present on `%g` subscription requests, and `%f` translations of [`%rush` subscription data](#show).
613Subscription requests. Present on `%g` subscription requests, and `%f` translations of [`%rush` subscription data](#show).
650
614
651−<span id="sign"></span>
652## 7. Vane responses
615## 7. Vane responses
653
616
654The goal of requests is to cause some manner of result. Specifically,
617The goal of requests is to cause some manner of result. Specifically,
@@ -685,14 +648,12 @@ The former is [served](#mime) back to the requester(i.e. the remaining duct), an
685
648
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.
649A `%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.
687
650
688−<span id="bolo"></span>
689## 8. Server state
651## 8. Server state
690
652
691There is a quantity of data that persists between events.
653There is a quantity of data that persists between events.
692
654
693### 8.1 Global
655### 8.1 Global
694
656
695−<span id="prefix"></span>
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`.
657- `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`.
697- `(jar ship hart)` remembered hostnames in order of preference, made accessible through `.^`
658- `(jar ship hart)` remembered hostnames in order of preference, made accessible through `.^`
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]`.
659 + 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]`.
@@ -703,7 +664,6 @@ There is a quantity of data that persists between events.
703- `(map hole sink)`, session state.
664- `(map hole sink)`, session state.
704- `(map hole ,[ship ?])`, foreign session names, along with their origin ships and whether they are authorized to act on our behalf.
665- `(map hole ,[ship ?])`, foreign session names, along with their origin ships and whether they are authorized to act on our behalf.
705
666
706−<span id="live"></span>
707### 8.2 `live`, per-request state
667### 8.2 `live`, per-request state
708
668
709To honor request cancellations, each unserved request must track which effect it is causing.
669To honor request cancellations, each unserved request must track which effect it is causing.
@@ -712,7 +672,6 @@ To honor request cancellations, each unserved request must track which effect it
712+ `[%xeno ship]` if this is a proxied request
672+ `[%xeno ship]` if this is a proxied request
713+ `[%poll ixor]` if this is a session long-poll
673+ `[%poll ixor]` if this is a session long-poll
714
674
715−<span id="sink"></span>
716### 8.3 `sink`, per-session state
675### 8.3 `sink`, per-session state
717
676
718Each `hole` has associated authentication state.
677Each `hole` has associated authentication state.
@@ -721,12 +680,10 @@ Each `hole` has associated authentication state.
721- `(jug ship ,[path duct])`, authentication `/~/as` requests waiting on foreign ships.
680- `(jug ship ,[path duct])`, authentication `/~/as` requests waiting on foreign ships.
722- `(set oryx)`, views associated with this session. Dual of `hole` in `stem`.
681- `(set oryx)`, views associated with this session. Dual of `hole` in `stem`.
723
682
724−<span id="stem"></span>
725### 8.4 `stem`, per-view state
683### 8.4 `stem`, per-view state
726
684
727Each `oryx` has active subscription state.
685Each `oryx` has active subscription state.
728- `hole`, session in which this view resides. Dual of `(set oryx)` in `sink`.
686- `hole`, session in which this view resides. Dual of `(set oryx)` in `sink`.
729−<span id="ixor"></span>
730- `ixor`, a cached hash of the `oryx` that is used as a subscription id, by the `/~/of` EventStream.
687- `ixor`, a cached hash of the `oryx` that is used as a subscription id, by the `/~/of` EventStream.
731- `[,@u (map ,@u even)]`, queued [events](#even). Has a maximum size.
688- `[,@u (map ,@u even)]`, queued [events](#even). Has a maximum size.
732- `(unit ,[duct @u ?])`, http connection, its last received event, and whether it is a long-poll request.
689- `(unit ,[duct @u ?])`, http connection, its last received event, and whether it is a long-poll request.
@@ -737,14 +694,10 @@ Each `oryx` has active subscription state.
737## Appendix A: Glossary
694## Appendix A: Glossary
738
695
739- An `oryx` is a CSRF token used for [authenticated requests](#auth)
696- An `oryx` is a CSRF token used for [authenticated requests](#auth)
740−<span id="mean-json"></span>
741- `mean.json` is a rendering of hoon `ares`: an error message formatted as `{fail:'type',mess:"Error message"}`
697- `mean.json` is a rendering of hoon `ares`: an error message formatted as `{fail:'type',mess:"Error message"}`
742−<span id="urb-js"></span>
743- `urb.js` is the standard client-side implementation of the `%eyre` protocols, normally found in `/=main=/lib`
698- `urb.js` is the standard client-side implementation of the `%eyre` protocols, normally found in `/=main=/lib`
744−<span id="mime"></span>
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).
699- 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).
746
700
747−<span id="eventsource"></span>
748## Appendix B: EventSource
701## Appendix B: EventSource
749
702
750UNIMPLEMENTED
703UNIMPLEMENTED
learn/arvo/hall.md+3−3
@@ -11,11 +11,11 @@ Hall is the Urbit messaging and notifications protocol. This document details Ha
11
11
12## Table of contents
12## Table of contents
13
13
14−- #### [Hall Architecture](#architecture)
14+- [Hall Architecture](#architecture)
15
15
16−- #### [The Hall Interface](#interface)
16+- [The Hall Interface](#interface)
17
17
18−- #### [The New Gall Model](#new-gall)
18+- [The New Gall Model](#new-gall)
19
19
20# Hall Architecture
20# Hall Architecture
21
21
learn/nock/implementations.md+12−13
@@ -7,31 +7,31 @@ We use a C implementation for our Nock interpreter. But building a Nock interpre
7
7
8## Table of Contents
8## Table of Contents
9
9
10−- #### [C](#C)
10+- [C](#C)
11
11
12−- #### [Clojure](#clojure)
12+- [Clojure](#clojure)
13
13
14−- #### [C#](#c-sharp)
14+- [C#](#c-sharp)
15
15
16−- #### [Groovy](#groovy)
16+- [Groovy](#groovy)
17
17
18−- #### [Haskell](#haskell)
18+- [Haskell](#haskell)
19
19
20−- #### [JavaScript](#javascript)
20+- [JavaScript](#javascript)
21
21
22−- #### [Python](#python)
22+- [Python](#python)
23
23
24−- #### [Ruby](#ruby)
24+- [Ruby](#ruby)
25
25
26−- #### [Scala](#scala)
26+- [Scala](#scala)
27
27
28−- #### [Scheme](#scheme)
28+- [Scheme](#scheme)
29
29
30−- #### [Swift](#swift)
30+- [Swift](#swift)
31
31
32## C Implementation
32## C Implementation
33
33
34−The actual production Nock interpreter. Note gotos for tail-call elimination,
34+The actual production Nock interpreter. Note gotos for tail-call elimination,
35and manual reference counting. More about the C environment can be found
35and manual reference counting. More about the C environment can be found
36in the [runtime system documentation](./docs/learn/vere/runtime.md).
36in the [runtime system documentation](./docs/learn/vere/runtime.md).
37```
37```
@@ -399,7 +399,6 @@ From [Matt Earnshaw](https://github.com/mattearnshaw/anock/blob/master/src/anock
399
399
400## C#
400## C#
401
401
402−
403From [Julien Beasley](https://github.com/zass30/Nock5KCSharp):
402From [Julien Beasley](https://github.com/zass30/Nock5KCSharp):
404
403
405```
404```
reference/glossary.md+34−60
@@ -9,12 +9,10 @@ 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−<span id="application"></span>
13### application
12### application
14
13
15Also known as an “app,” an _application_ is a Hoon program that can hold state.
14Also known as an “app,” an _application_ is a Hoon program that can hold state.
16
15
17−<span id="arm"></span>
18### arm
16### arm
19
17
20An _arm_ is a named, functionally-computed attribute of a [core](#core).
18An _arm_ is a named, functionally-computed attribute of a [core](#core).
@@ -25,14 +23,14 @@ enclosing [core](#core) itself as the subject.
25There are two kinds of arms: _dry_ and _wet_. Most arms are
23There are two kinds of arms: _dry_ and _wet_. Most arms are
26dry.
24dry.
27
25
28−- ##### dry:
26+##### dry
29
27
30 normal, `++`, polymorphic by means of _variance_
28 normal, `++`, polymorphic by means of _variance_
31
29
32 For a dry arm, we ask: is the new payload compatible with the old
30 For a dry arm, we ask: is the new payload compatible with the old
33 payload (against which the core was compiled)?
31 payload (against which the core was compiled)?
34
32
35−- ##### wet:
33+##### wet
36
34
37 unusual, `+-`, polymorphic by means of _genericity_
35 unusual, `+-`, polymorphic by means of _genericity_
38
36
@@ -43,7 +41,7 @@ dry.
43_See [advanced types](/docs/reference/hoon-expressions/advanced/)_.
41_See [advanced types](/docs/reference/hoon-expressions/advanced/)_.
44
42
45
43
46−<span id="arvo"></span>
44+
47### Arvo
45### Arvo
48
46
49The Urbit operating system and kernel. Arvo's state is a pure function of its
47The Urbit operating system and kernel. Arvo's state is a pure function of its
@@ -69,7 +67,7 @@ More in-depth information on Arvo can be found
69
67
70Below are Arvo modules, which are called "vanes".
68Below are Arvo modules, which are called "vanes".
71
69
72−- ##### Ames
70+##### Ames
73
71
74 The networking vane. Ames handles all things UDP. Here live the protocols for
72 The networking vane. Ames handles all things UDP. Here live the protocols for
75 discovering and interacting with other urbits. It’s also the name for the Urbit
73 discovering and interacting with other urbits. It’s also the name for the Urbit
@@ -80,7 +78,7 @@ Below are Arvo modules, which are called "vanes".
80 More in-depth information on Ames can be found
78 More in-depth information on Ames can be found
81 [`here`](.t/docs/learn/arvo/ames.md).
79 [`here`](.t/docs/learn/arvo/ames.md).
82
80
83−- ##### Behn
81+##### Behn
84
82
85 The timing vane. Behn allows for applications to schedule events, which are
83 The timing vane. Behn allows for applications to schedule events, which are
86 managed in a simple priority queue. For example, Clay, the Urbit filesystem,
84 managed in a simple priority queue. For example, Clay, the Urbit filesystem,
@@ -89,7 +87,7 @@ Below are Arvo modules, which are called "vanes".
89
87
90 Behn is located in `/home/sys/vane/behn.hoon` within your urbit.
88 Behn is located in `/home/sys/vane/behn.hoon` within your urbit.
91
89
92−- ##### Clay
90+##### Clay
93
91
94 The filesystem and typed revision-control vane. Think of Clay as a
92 The filesystem and typed revision-control vane. Think of Clay as a
95 continuously synced git. It handles file-change events and maps them from Urbit
93 continuously synced git. It handles file-change events and maps them from Urbit
@@ -106,7 +104,7 @@ Below are Arvo modules, which are called "vanes".
106 of the architecture can be found
104 of the architecture can be found
107 [`here`](./docs/learn/arvo/clay.md).
105 [`here`](./docs/learn/arvo/clay.md).
108
106
109−- ##### Dill
107+##### Dill
110
108
111 The terminal-driver vane. You run your urbit in your Unix terminal, and
109 The terminal-driver vane. You run your urbit in your Unix terminal, and
112 Unix sends every event -- such as a keystroke or a change in the dimensions of
110 Unix sends every event -- such as a keystroke or a change in the dimensions of
@@ -125,7 +123,7 @@ Below are Arvo modules, which are called "vanes".
125 More in-depth information on Dill can be found
123 More in-depth information on Dill can be found
126 [`here`](./docs/learn/arvo/dill.md).
124 [`here`](./docs/learn/arvo/dill.md).
127
125
128−- ##### Eyre
126+##### Eyre
129
127
130 The web-server vane. Anything HTTP-related lives here. Unix sends HTTP messages
128 The web-server vane. Anything HTTP-related lives here. Unix sends HTTP messages
131 though to Eyre, and Eyre produces HTTP messages in response.
129 though to Eyre, and Eyre produces HTTP messages in response.
@@ -139,7 +137,7 @@ Below are Arvo modules, which are called "vanes".
139 More in-depth information on Eyre can be found
137 More in-depth information on Eyre can be found
140 [`here`](./docs/learn/arvo/eyre.md).
138 [`here`](./docs/learn/arvo/eyre.md).
141
139
142−- ##### Ford
140+##### Ford
143
141
144 The build-system vane. Ford is capable of sequencing generic asynchronous
142 The build-system vane. Ford is capable of sequencing generic asynchronous
145 computations. Its uses include linking source files into programs, assembling
143 computations. Its uses include linking source files into programs, assembling
@@ -154,7 +152,7 @@ Below are Arvo modules, which are called "vanes".
154 More in-depth information on Ford can be found
152 More in-depth information on Ford can be found
155 [`here`](content/docs/learn/arvo/ford.md).
153 [`here`](content/docs/learn/arvo/ford.md).
156
154
157−- ##### Gall
155+##### Gall
158
156
159 The application-management vane. Userspace apps -- daemons, really -- are
157 The application-management vane. Userspace apps -- daemons, really -- are
160 started, stopped, and sandboxed by Gall. Gall provides developers with a
158 started, stopped, and sandboxed by Gall. Gall provides developers with a
@@ -179,17 +177,16 @@ optional constant.
179
177
180An atom type is _warm_ or _cold_ based on whether the constant exists.
178An atom type is _warm_ or _cold_ based on whether the constant exists.
181
179
182−- ##### warm:
180+##### warm
183
181
184 If the constant is `~` (null), any atom is in the type.
182 If the constant is `~` (null), any atom is in the type.
185
183
186−- ##### cold:
184+##### cold
187
185
188 If the constant is `[~ atom]`, its only legal value is `atom`.
186 If the constant is `[~ atom]`, its only legal value is `atom`.
189
187
190_See [basic types](./docs/reference/hoon-expressions/basic.md)_
188_See [basic types](./docs/reference/hoon-expressions/basic.md)_
191
189
192−<span id="aura"></span>
193### aura
190### aura
194
191
195An aura is a soft atom type. They appear as strings beginning with `@`. Auras
192An aura is a soft atom type. They appear as strings beginning with `@`. Auras
@@ -293,7 +290,6 @@ least-significant bit first. Represented as the aura `@t`.
293 'hello'
290 'hello'
294```
291```
295
292
296−<span id="core"></span>
297### core
293### core
298
294
299A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
295A _core_ is a [cell](#nock-cell) of `[code data]`, where we call the
@@ -301,11 +297,11 @@ code head the _battery_ and the data tail the _payload_. All code-data
301structures in normal languages (functions, objects, modules, etc.)
297structures in normal languages (functions, objects, modules, etc.)
302translate to cores in Hoon.
298translate to cores in Hoon.
303
299
304−- ##### battery
300+##### battery
305
301
306 The code-containing head of a core.
302 The code-containing head of a core.
307
303
308−- ##### payload
304+##### payload
309
305
310 The data-containing tail of a core.
306 The data-containing tail of a core.
311
307
@@ -361,7 +357,6 @@ _no_.
361Why? It's fresh, it's different, it's new. And it's annoying. And it
357Why? It's fresh, it's different, it's new. And it's annoying. And it
362keeps you on your toes. And it's also just intuitively right.
358keeps you on your toes. And it's also just intuitively right.
363
359
364−<span id="gate"></span>
365### gate
360### gate
366
361
367A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
362A _gate_ is a [core](#core) with one [arm](#arm) -- Hoon's closest
@@ -371,11 +366,11 @@ in the core) with the argument, and then compute the arm.
371
366
372The payload of a gate has a shape of `[sample context]`.
367The payload of a gate has a shape of `[sample context]`.
373
368
374−- ##### sample
369+##### sample
375
370
376 The argument tuple.
371 The argument tuple.
377
372
378−- ##### context
373+##### context
379
374
380 The subject in which the gate was defined.
375 The subject in which the gate was defined.
381
376
@@ -433,7 +428,7 @@ such app that uses Hall.
433
428
434_More information on Hall can be found [here](./docs/learn/arvo/hall.md)._
429_More information on Hall can be found [here](./docs/learn/arvo/hall.md)._
435
430
436−- ##### circle
431+##### circle
437
432
438 A circle is the “audience” of your messages -- who can receive them. It can be
433 A circle is the “audience” of your messages -- who can receive them. It can be
439 thought of as a chat channel, but this is a little too narrow. More
434 thought of as a chat channel, but this is a little too narrow. More
@@ -447,7 +442,6 @@ _More information on Hall can be found [here](./docs/learn/arvo/hall.md)._
447_Hood_ orchestrates many of the Urbit initialization systems necessary
442_Hood_ orchestrates many of the Urbit initialization systems necessary
448for boot.
443for boot.
449
444
450−<span id="hoon"></span>
451### Hoon
445### Hoon
452
446
453Hoon is a strict, higher-order typed functional language that compiles itself
447Hoon is a strict, higher-order typed functional language that compiles itself
@@ -457,8 +451,7 @@ The Hoon source file is located in `/home/sys/hoon.hoon` within your urbit.
457
451
458_More information can be found in the [hoon](./docs/learn/hoon/_index.md) section._
452_More information can be found in the [hoon](./docs/learn/hoon/_index.md) section._
459
453
460−<span id="mint"></span>
461−- ##### Mint
454+##### Mint
462
455
463 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
456 _Mint_ is the Hoon compiler function. Mint takes the subject type and the
464 expression source (a [hoon](#a-hoon), for example) and produces the product
457 expression source (a [hoon](#a-hoon), for example) and produces the product
@@ -550,7 +543,6 @@ you desire.
55015
54315
551```
544```
552
545
553−<span id="limb"></span>
554### limb
546### limb
555
547
556A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
548A _limb_ is an attribute or variable reference. A limb is an [arm](#arm) or a
@@ -561,71 +553,58 @@ head-first for either a face named "foo" or a core with an arm of
561"foo". If a face is found, the result is a leg, if a core is
553"foo". If a face is found, the result is a leg, if a core is
562found, the result is the product of the arm.
554found, the result is the product of the arm.
563
555
564−- ##### leg
556+##### leg
565
557
566 a subexpression, or subtree of the
558 a subexpression, or subtree of the
567 [subject](#nock-subject).
559 [subject](#nock-subject).
568
560
569−- ##### wing
561+##### wing
570
562
571 a search path into the subject, composed of
563 a search path into the subject, composed of
572 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
564 limbs. Search occurs from right to left (`a.b` means `b` within `a`).
573
565
574_See [Limbs and wings](./docs/reference/hoon-expressions/limb/_index.md)_
566_See [Limbs and wings](./docs/reference/hoon-expressions/limb/_index.md)_
575
567
576−
577−<span id="move"></span>
578### move
568### move
579
569
580A move is the [Arvo](#arvo) equivalent of a syscall.
570A move is the [Arvo](#arvo) equivalent of a syscall.
581
571
582−
583−<span id="noun"></span>
584### noun
572### noun
585
573
586In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
574In [Nock](#nock) and [Hoon](#hoon), a _noun_ is an atom or a cell.
587
575
588−
589−<span id="nock"></span>
590### Nock
576### Nock
591
577
592Nock is a Turing-complete, non-lambda combinator interpreter. It's
578Nock is a Turing-complete, non-lambda combinator interpreter. It's
593Urbit's low-level programming language. Nock is functional and typeless.
579Urbit's low-level programming language. Nock is functional and typeless.
594
580
595−<span id="nock-noun"></span>
596−- ##### noun
581+##### noun
597
582
598 an _atom_ or a _cell_.
583 an _atom_ or a _cell_.
599
584
600−<span id="nock-atom"></span>
601−- ##### atom
585+##### atom
602
586
603 any natural number, including zero.
587 any natural number, including zero.
604
588
605−<span id="nock-cell"></span>
606−- ##### cell
589+##### cell
607
590
608 any ordered pair of nouns.
591 any ordered pair of nouns.
609
592
610−<span id="nock-subject"></span>
593+
611−- ##### subject
594+##### subject
612
595
613 a noun - the data against which a _formula_ is evaluated.
596 a noun - the data against which a _formula_ is evaluated.
614
597
615−<span id="nock-formula"></span>
616−- ##### formula
598+##### formula
617
599
618 a noun - a function at the nock level.
600 a noun - a function at the nock level.
619
601
620−<span id="nock-product"></span>
621−- ##### product
602+##### product
622
603
623 a noun - the result of evaluating a formula against a subject.
604 a noun - the result of evaluating a formula against a subject.
624
605
625_See the [Nock definition](./docs/learn/nock/definition.md)._
606_See the [Nock definition](./docs/learn/nock/definition.md)._
626
607
627−
628−<span id="mark"></span>
629### mark
608### mark
630
609
631A _mark_ is Urbit's version of a MIME type, if a MIME type was an
610A _mark_ is Urbit's version of a MIME type, if a MIME type was an
@@ -701,13 +680,11 @@ whose number is its bottom half. So the planet `~firbyr-napbes`,
701`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
680`48.879`, whose parent is `~mun`, `0xef`, `239`. The galaxy at the address of
702`0` is `~zod`.
681`0` is `~zod`.
703
682
704−
705−- ##### pier
683+##### pier
706
684
707 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
685 A ship's _pier_ is its Unix directory. For planets, the name of the pier is
708 usually the planet name.
686 usually the planet name.
709
687
710−<span id="structure"></span>
711### structure
688### structure
712
689
713A _structure_ is an idempotent [gate](#gate) (function) that constructs and
690A _structure_ is an idempotent [gate](#gate) (function) that constructs and
@@ -718,7 +695,7 @@ validate untrusted network data.
718
695
719Here's some common structure terminology:
696Here's some common structure terminology:
720
697
721−- ##### bunt:
698+##### bunt
722
699
723 A bunt is the default value of a [structure](#structure). It's also a verb;
700 A bunt is the default value of a [structure](#structure). It's also a verb;
724 to _bunt_ a structure is to produce the bunt of that structure. For example,
701 to _bunt_ a structure is to produce the bunt of that structure. For example,
@@ -732,11 +709,10 @@ Here's some common structure terminology:
732 ''
709 ''
733 ```
710 ```
734
711
735−- ##### icon: The type of the mold's range.
712+##### icon: The type of the mold's range
736
713
737_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
714_See [mold hoons](/docs/reference/hoon-expressions/rune/buc/)._
738
715
739−<span id="rune"></span>
740### rune
716### rune
741
717
742A Hoon _rune_ is a pair of ASCII symbols used to begin a
718A Hoon _rune_ is a pair of ASCII symbols used to begin a
@@ -753,7 +729,7 @@ a [`hoon`](#a-hoon).
753
729
754Runes have two syntactic forms, _tall_ and _flat_:
730Runes have two syntactic forms, _tall_ and _flat_:
755
731
756−- ##### tall:
732+##### tall
757
733
758 multiple lines, no parentheses, two or more spaces between tokens
734 multiple lines, no parentheses, two or more spaces between tokens
759
735
@@ -764,7 +740,7 @@ Runes have two syntactic forms, _tall_ and _flat_:
764 4
740 4
765 ```
741 ```
766
742
767−- ##### flat:
743+##### flat
768
744
769 one line, parentheses, one space between tokens
745 one line, parentheses, one space between tokens
770
746
@@ -806,7 +782,6 @@ The head of `+n` is `+2n`, the tail is `+(2n+1)`.
806`+7` is a special address for gates, because the position is defined
782`+7` is a special address for gates, because the position is defined
807(by convention) as the context of a gate and of all cores.
783(by convention) as the context of a gate and of all cores.
808
784
809−<span id="talk"></span>
810### talk
785### talk
811
786
812_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
787_Talk_ is Urbit's built-in chat app. It’s one example of an app that can be
@@ -826,7 +801,7 @@ All types are assembled out of base types defined in `++type`.
826does type-inference on a program, it assembles complex types out
801does type-inference on a program, it assembles complex types out
827of the simpler built-in types.
802of the simpler built-in types.
828
803
829−- ##### nest
804+##### nest
830
805
831 `nest` is an internal Hoon function on two types which performs a type
806 `nest` is an internal Hoon function on two types which performs a type
832 compatibility test. `nest` produces yes if the
807 compatibility test. `nest` produces yes if the
@@ -834,8 +809,7 @@ of the simpler built-in types.
834 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
809 If `nest` produces no, the Hoon programmer will receive a `nest-fail`
835 error. This is one of the most commons errors in Hoon programming.
810 error. This is one of the most commons errors in Hoon programming.
836
811
837− _See [advanced types](./docs/reference/hoon-expressions/advanced.md)_.
812+ _See [advanced types](./docs/reference/hoon-expressions/advanced.md)_ and [troubleshooting](./docs/reference/troubleshooting.md).
838− _See [troubleshooting](./docs/reference/troubleshooting.md)_.
839
813
840
814
841### Unit
815### Unit
using/messaging.md+1−2
@@ -125,7 +125,6 @@ Now you can tell your friends to `;join ~your-urbit/my-channel`.
125
125
126---
126---
127
127
128−<span id="manual"></span>
129## Manual
128## Manual
130
129
131Hall's design is similar in spirit to
130Hall's design is similar in spirit to
@@ -306,7 +305,7 @@ For example:
306sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
305sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
307```
306```
308
307
309−<span id="filter"></span>
308+
310#### Filter
309#### Filter
311
310
312Syntax: `;filter %name [capitals] [unicode]`
311Syntax: `;filter %name [capitals] [unicode]`
using/sail-and-udon.md+4−4
@@ -12,13 +12,13 @@ This document will be divided into two main sections: the Sail guide and the Udo
12
12
13## Table of Contents
13## Table of Contents
14
14
15−- #### [Sail: A Guide](#sail)
15+- [Sail: A Guide](#sail)
16
16
17−- #### [Udon: A Guide](#udon)
17+- [Udon: A Guide](#udon)
18
18
19−- #### [Udon: A Simple Blog](#blog)
19+- [Udon: A Simple Blog](#blog)
20
20
21−- #### [Udon: A Static Site](#static)
21+- [Udon: A Static Site](#static)
22
22
23## Getting Started
23## Getting Started
24
24