on master help sign in
docs: decode all html entities
6d36307Matilde Park
content/docs/arvo/eyre/guide.md+5−5
@@ -204,7 +204,7 @@ Server: urbit/vere-1.5
204set-cookie: urbauth-~zod=0v1.1pseu.tq7hs.hps2t.ltaf1.tmqjm; Path=/; Max-Age=604800
204set-cookie: urbauth-~zod=0v1.1pseu.tq7hs.hps2t.ltaf1.tmqjm; Path=/; Max-Age=604800
205content-type: text/html
205content-type: text/html
206
206
207−<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>There was an error while handling the request for /foo/bar/baz.json.</p><code>no scry result</code></body></html>
207+<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>There was an error while handling the request for /foo/bar/baz.json.</p><code>no scry result</code></body></html>
208```
208```
209
209
210## Advanced
210## Advanced
@@ -254,7 +254,7 @@ Note that this example does a lot of things manually for demonstrative purposes.
254 ~& [mark req]
254 ~& [mark req]
255 ?+ method.request.q.req
255 ?+ method.request.q.req
256 =/ data=octs
256 =/ data=octs
257− (as-octs:mimes:html '&lt;h1>405 Method Not Allowed&lt;/h1>')
257+ (as-octs:mimes:html '<h1>405 Method Not Allowed</h1>')
258 =/ content-length=@t
258 =/ content-length=@t
259 (crip ((d-co:co 1) p.data))
259 (crip ((d-co:co 1) p.data))
260 =/ =response-header:http
260 =/ =response-header:http
@@ -272,7 +272,7 @@ Note that this example does a lot of things manually for demonstrative purposes.
272 ::
272 ::
273 %'GET'
273 %'GET'
274 =/ data=octs
274 =/ data=octs
275− (as-octs:mimes:html '&lt;h1>Hello, World!&lt;/h1>')
275+ (as-octs:mimes:html '<h1>Hello, World!</h1>')
276 =/ content-length=@t
276 =/ content-length=@t
277 (crip ((d-co:co 1) p.data))
277 (crip ((d-co:co 1) p.data))
278 =/ =response-header:http
278 =/ =response-header:http
@@ -374,7 +374,7 @@ Content-Type: text/html
374Content-Length: 22
374Content-Length: 22
375transfer-encoding: chunked
375transfer-encoding: chunked
376
376
377−&lt;h1>Hello, World!&lt;/h1>%
377+<h1>Hello, World!</h1>%
378```
378```
379
379
380...which has succeed! This is because the `+on-poke` arm tests for http GET requests and responds with `Hello, World!` when it sees one:
380...which has succeed! This is because the `+on-poke` arm tests for http GET requests and responds with `Hello, World!` when it sees one:
@@ -382,7 +382,7 @@ transfer-encoding: chunked
382```hoon
382```hoon
383 %'GET'
383 %'GET'
384=/ data=octs
384=/ data=octs
385− (as-octs:mimes:html '&lt;h1>Hello, World!&lt;/h1>')
385+ (as-octs:mimes:html '<h1>Hello, World!</h1>')
386=/ content-length=@t
386=/ content-length=@t
387 (crip ((d-co:co 1) p.data))
387 (crip ((d-co:co 1) p.data))
388=/ =response-header:http
388=/ =response-header:http
content/docs/system-overview/arvo.md+2−2
@@ -11,9 +11,9 @@ itself from over the network without downtime. The Arvo kernel proper is quite
11simple -- it's only about 600 lines of code, excluding its various modules.
11simple -- it's only about 600 lines of code, excluding its various modules.
12
12
13The Urbit transition function is implemented in Arvo. Upon being 'poked' by Vere
13The Urbit transition function is implemented in Arvo. Upon being 'poked' by Vere
14−with the pair of `&lt;input event, state>`, Arvo directs the event to the
14+with the pair of `<input event, state>`, Arvo directs the event to the
15appropriate OS module. The result of each Vere 'poke' is a pair of
15appropriate OS module. The result of each Vere 'poke' is a pair of
16−`&lt;output events, new state>`. Events are typed, and each has an explicit call-stack
16+`<output events, new state>`. Events are typed, and each has an explicit call-stack
17structure indicating the event's source module in Arvo.
17structure indicating the event's source module in Arvo.
18
18
19For a more in-depth technical introduction, see [Arvo Overview](/docs/arvo/overview).
19For a more in-depth technical introduction, see [Arvo Overview](/docs/arvo/overview).
content/docs/userspace/dist/guide.md+17−4
@@ -194,10 +194,23 @@ We've grabbed an image to use in our "Hello world!" page. The next thing we need
194In the editor, paste in the following HTML and save it:
194In the editor, paste in the following HTML and save it:
195
195
196```html
196```html
197+<!DOCTYPE html>
198+<html>
199+ <head>
200+ <style>
201+ div {
197−&lt;!DOCTYPE html> &lt;html> &lt;head> &lt;style> div { text-align: center; }
202+ text-align: center;
203+ }
204+ </style>
205+ </head>
198−&lt;/style> &lt;/head> &lt;title>Hello World&lt;/title> &lt;body> &lt;div>
206+ <title>Hello World</title>
207+ <body>
208+ <div>
209+ <h1>Hello World!</h1>
199−&lt;h1>Hello World!&lt;/h1> &lt;img src="img/pot.svg" alt="pot" width="219"
210+ <img src="img/pot.svg" alt="pot" width="219" height="196" />
200−height="196" /> &lt;/div> &lt;/body> &lt;/html>
211+ </div>
212+ </body>
213+</html>
201```
214```
202
215
203Our `hello-glob` folder should now look like this:
216Our `hello-glob` folder should now look like this:
content/docs/userspace/full-stack/7-react-setup.md+1−1
@@ -74,7 +74,7 @@ window.ship = "sampel-palnet";
74```
74```
75
75
76`sampel-palnet` will of course be replaced by the actual name of the ship. We
76`sampel-palnet` will of course be replaced by the actual name of the ship. We
77−include this script by adding the following line to the `&lt;head>` section of
77+include this script by adding the following line to the `<head>` section of
78`public/index.html`:
78`public/index.html`:
79
79
80```
80```
content/docs/userspace/http-api-guide.md+14−14
@@ -147,7 +147,7 @@ import Urbit from '@urbit/http-api';
147```
147```
148
148
149Note that the examples in this guide are simple HTML documents with vanilla
149Note that the examples in this guide are simple HTML documents with vanilla
150−Javascript in `&lt;script>` tags, so they use [unpkg.com](https://unpkg.com) to
150+Javascript in `<script>` tags, so they use [unpkg.com](https://unpkg.com) to
151import `@urbit/http-api`. This is not typical, and is just done here for
151import `@urbit/http-api`. This is not typical, and is just done here for
152purposes of simplicity.
152purposes of simplicity.
153
153
@@ -437,7 +437,7 @@ This example will, upon clicking the "Subscribe" button, subscribe to the
437update it receives. You can test it by doing something like posting a message in
437update it receives. You can test it by doing something like posting a message in
438a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
438a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
439
439
440−```
440+````
441<html>
441<html>
442 <head>
442 <head>
443 <script src="https://unpkg.com/@urbit/http-api"></script>
443 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -445,7 +445,7 @@ a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
445 </head>
445 </head>
446 <body>
446 <body>
447 <button id="toggle" type="button" onClick="doSub()" >Subscribe</button>
447 <button id="toggle" type="button" onClick="doSub()" >Subscribe</button>
448− <pre id="event"></pre>
448+ <pre id="event">```
449 </body>
449 </body>
450 <script>
450 <script>
451 const api = new UrbitHttpApi.Urbit("");
451 const api = new UrbitHttpApi.Urbit("");
@@ -478,7 +478,7 @@ a chat. You can also unsubscribe by clicking the "Unsubscribe" button.
478 };
478 };
479 </script>
479 </script>
480</html>
480</html>
481−```
481+````
482
482
483### Subscribe Once
483### Subscribe Once
484
484
@@ -514,7 +514,7 @@ printing every `graph-store` update it receives, it will instead just print the
514first one it receives and close the subscription. Additionally, it sets a five
514first one it receives and close the subscription. Additionally, it sets a five
515second timeout, and prints an error message if it times out.
515second timeout, and prints an error message if it times out.
516
516
517−```
517+````
518<html>
518<html>
519 <head>
519 <head>
520 <script src="https://unpkg.com/@urbit/http-api"></script>
520 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -522,7 +522,7 @@ second timeout, and prints an error message if it times out.
522 </head>
522 </head>
523 <body>
523 <body>
524 <button type="button" onClick="doSub()" >Subscribe Once</button>
524 <button type="button" onClick="doSub()" >Subscribe Once</button>
525− <pre id="event"></pre>
525+ <pre id="event">```
526 </body>
526 </body>
527 <script>
527 <script>
528 const api = new UrbitHttpApi.Urbit("");
528 const api = new UrbitHttpApi.Urbit("");
@@ -541,7 +541,7 @@ second timeout, and prints an error message if it times out.
541 };
541 };
542 </script>
542 </script>
543</html>
543</html>
544−```
544+````
545
545
546### Scries
546### Scries
547
547
@@ -564,7 +564,7 @@ Upon pressing the "Scry Graphs" button, this example will scry the `graph-store`
564agent's `/keys` endpoint for the list of graphs, and print the resulting JSON
564agent's `/keys` endpoint for the list of graphs, and print the resulting JSON
565data.
565data.
566
566
567−```
567+````
568<html>
568<html>
569 <head>
569 <head>
570 <script src="https://unpkg.com/@urbit/http-api"></script>
570 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -572,7 +572,7 @@ data.
572 </head>
572 </head>
573 <body>
573 <body>
574 <button id="scry" type="button" onClick="doScry()" >Scry Graphs</button>
574 <button id="scry" type="button" onClick="doScry()" >Scry Graphs</button>
575− <pre id="result"></pre>
575+ <pre id="result">```
576 </body>
576 </body>
577 <script>
577 <script>
578 const api = new UrbitHttpApi.Urbit("");
578 const api = new UrbitHttpApi.Urbit("");
@@ -584,7 +584,7 @@ data.
584 }
584 }
585 </script>
585 </script>
586</html>
586</html>
587−```
587+````
588
588
589### Thread
589### Thread
590
590
@@ -608,7 +608,7 @@ mark conversion failed, the promise will fail.
608This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
608This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
609`graph-eval` thread in the `landscape` desk, and prints the result.
609`graph-eval` thread in the `landscape` desk, and prints the result.
610
610
611−```
611+````
612<html>
612<html>
613 <head>
613 <head>
614 <script src="https://unpkg.com/@urbit/http-api"></script>
614 <script src="https://unpkg.com/@urbit/http-api"></script>
@@ -617,8 +617,8 @@ This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
617 <body>
617 <body>
618 <input id="hoon" type="text" placeholder="Hoon to evaluate" />
618 <input id="hoon" type="text" placeholder="Hoon to evaluate" />
619 <button id="submit" type="button" onClick="runThread()" >Submit</button>
619 <button id="submit" type="button" onClick="runThread()" >Submit</button>
620− <pre id="expr"></pre>
620+ <pre id="expr">```
621− <pre id="result"></pre>
621+ <pre id="result">```
622 </body>
622 </body>
623 <script>
623 <script>
624 document.getElementById("hoon")
624 document.getElementById("hoon")
@@ -646,7 +646,7 @@ This example takes a hoon expression (such as `(add 1 1)`), evalutes it with the
646 };
646 };
647 </script>
647 </script>
648</html>
648</html>
649−```
649+````
650
650
651### Delete Channel
651### Delete Channel
652
652
content/docs/userspace/threads/basics/bind.md+5−5
@@ -34,16 +34,16 @@ j
34
34
35## bind
35## bind
36
36
37−Bind by itself must be specialised like `(bind:m ,&lt;type>)` and it takes two arguments:
37+Bind by itself must be specialised like `(bind:m ,<type>)` and it takes two arguments:
38
38
39−- The first argument is a function that returns the `form` of a strand which produces `&lt;type>`.
39+- The first argument is a function that returns the `form` of a strand which produces `<type>`.
40−- The second argument is a gate whose sample is `&lt;type>` and which returns a `form`.
40+- The second argument is a gate whose sample is `<type>` and which returns a `form`.
41
41
42−Since you'll invariably use it in conjunction with micgal, the `&lt;type>` in `;< &lt;type> bind:m ...` will both specialise `bind` and specify the gate's sample.
42+Since you'll invariably use it in conjunction with micgal, the `<type>` in `;< <type> bind:m ...` will both specialise `bind` and specify the gate's sample.
43
43
44Bind calls the first function then, if it succeeded, calls the second gate with the result of the first as its sample. If the first function failed, it will instead just return an error message and not bother calling the next gate. So it's essentially "strand A then strand B".
44Bind calls the first function then, if it succeeded, calls the second gate with the result of the first as its sample. If the first function failed, it will instead just return an error message and not bother calling the next gate. So it's essentially "strand A then strand B".
45
45
46−Since the second gate may itself contain another `;< &lt;type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
46+Since the second gate may itself contain another `;< <type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
47
47
48## strandio
48## strandio
49
49
content/docs/userspace/threads/basics/output.md+1−1
@@ -4,7 +4,7 @@ weight = 4
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−A strand produces a `[(list card) &lt;response>]`. The first part is a list of cards to be sent off immediately, and `&lt;response>` is one of:
7+A strand produces a `[(list card) <response>]`. The first part is a list of cards to be sent off immediately, and `<response>` is one of:
8
8
9- `[%wait ~]`
9- `[%wait ~]`
10- `[%skip ~]`
10- `[%skip ~]`
content/docs/userspace/threads/basics/summary.md+4−4
@@ -55,8 +55,8 @@ Now here's a quick recap of the main points covered:
55
55
56- is used to chain strands together like javascript promises
56- is used to chain strands together like javascript promises
57- is used in conjunction with micgal (`;<`)
57- is used in conjunction with micgal (`;<`)
58−- must be specialised to a type like `;< &lt;type> bind:m ...`
58+- must be specialised to a type like `;< <type> bind:m ...`
59−- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `&lt;type>`. The second is a gate whose sample is `&lt;type>` and which returns a `form`.
59+- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `<type>`. The second is a gate whose sample is `<type>` and which returns a `form`.
60- calls the first and then, if it succeeded, calls the second with the result of the first as its sample.
60- calls the first and then, if it succeeded, calls the second with the result of the first as its sample.
61
61
62## Strand input
62## Strand input
@@ -68,9 +68,9 @@ Now here's a quick recap of the main points covered:
68
68
69## Strand output
69## Strand output
70
70
71−- contains `[cards=(list card:agent:gall) &lt;response>]`
71+- contains `[cards=(list card:agent:gall) <response>]`
72- `cards` are any cards to be sent immediately
72- `cards` are any cards to be sent immediately
73−- `&lt;response>` is something like `[%done value]`, `[%fail err]`, etc.
73+- `<response>` is something like `[%done value]`, `[%fail err]`, etc.
74- `%done` will contain the result
74- `%done` will contain the result
75- responses are only used internally to manage the flow of the thread and are not returned to subscribers.
75- responses are only used internally to manage the flow of the thread and are not returned to subscribers.
76
76