on master help sign in
almost done
bfaa358Henry Ault
docs/programming/system/basic.md+9−23
@@ -1,5 +1,4 @@
1---
1---
2−logo: black
3sort: 1
2sort: 1
4next: true
3next: true
5title: Hoon refresher / crash course
4title: Hoon refresher / crash course
@@ -19,33 +18,20 @@ simple programs: the first [Project
19Euler](https://projecteuler.net/) problem and
18Euler](https://projecteuler.net/) problem and
20[fizzbuzz](https://en.wikipedia.org/wiki/Fizz_buzz).
19[fizzbuzz](https://en.wikipedia.org/wiki/Fizz_buzz).
21
20
22−To run this code, you'll need an urbit, and you'll need the
21+To run this code, you'll need an urbit, and will have to copy the [examples repo](https://github.com/urbit/examples) into it.
22+
23−`%examples` desk from `~zod`. If you haven't installed
23+If you haven't installed
24urbit yet, check out the [installation
24urbit yet, check out the [installation
25−instructions](http://urbit.org/docs/user/install). Once urbit is
25+instructions](/docs/user/install). Once urbit is
26installed, take a look at the [basic
26installed, take a look at the [basic
27−operation](http://urbit.org/docs/user/basic) of your urbit.
27+operation](/docs/user/basic) of your urbit.
28−
29−If you haven't pulled the examples desk from `~zod`, do
30−so now:
31−
32− ~fintud-macrep:dojo> |merge %examples ~zod %examples
33− >=
34− [time passes...]
35− merged with strategy %init
36−
37−This merge could take several minutes; you'll know it's done when
38−"merged with strategy %init" is printed. Next, mount the new files to
39−your Unix pier directory:
40−
41− ~fintud-macrep:dojo> |mount /=examples=
42
28
43−Switch desks to run commands from the `%examples` desk:
29+If you haven't copied in the examples repo, running the following commands from your urbit directory should do the trick:
44
30
45− ~fintud-macrep:dojo> =dir /=examples=
31+`cp -r {wherever-you've-pulled-to}/examples/gall/*/ arvo/`
46− =% /~fintud-macrep/examples/~2015.11.13..02.25.00..41e9/
32+`cp -r {wherever-you've-pulled-to}/examples/dojo/*/ arvo/`
47
33
48−Run an example:
34+Run an example to ensure it worked:
49
35
50 ~fintud-macrep:dojo> +examples-euler1
36 ~fintud-macrep:dojo> +examples-euler1
51 233.168
37 233.168
docs/programming/system/generators.md+1−1
@@ -182,7 +182,7 @@ Now we can run this with:
182```
182```
183~fintud-macrep:dojo> |start %examples-ping
183~fintud-macrep:dojo> |start %examples-ping
184>=
184>=
185−~fintud-macrep:dojo> :examples-ping &ping-message [~sampel-sipnym 'heyya']
185+~fintud-macrep:dojo> :examples-ping &examples-ping-message [~sampel-sipnym 'heyya']
186>=
186>=
187```
187```
188
188
docs/programming/system/http.md+1−1
@@ -32,7 +32,7 @@ code isn't 2xx. Here's `app/up.hoon`:
32 ==
32 ==
33--
33--
34|_ {hid/bowl on/_| in-progress/_| target/@t}
34|_ {hid/bowl on/_| in-progress/_| target/@t}
35−++ poke-atom
35+++ poke-cord
36 |= url-or-command/@t ^- (quip move +>)
36 |= url-or-command/@t ^- (quip move +>)
37 =+ ^- act/action
37 =+ ^- act/action
38 ?: ?=($on url-or-command) [%on ~]
38 ?: ?=($on url-or-command) [%on ~]
docs/programming/system/marks.md+14−14
@@ -9,9 +9,9 @@ our own marks. Let's write a sample mark of our own, then chain
9it together with some preexisting ones to have fun with type
9it together with some preexisting ones to have fun with type
10conversions.
10conversions.
11
11
12−Let's make a small "cord" mark. "Cord" is a name we use for `@t`
12+Let's make a small "examples-cord" mark. "Cord" is a name we use for `@t`
13−text, but there's no predefined mark for it. This is
13+text, but there's no predefined mark for it. Let's put the following code in:
14−`/mar/cord.hoon`:
14+`/mar/examples/cord.hoon`:
15
15
16```
16```
17/? 314
17/? 314
@@ -57,9 +57,9 @@ marked atom and convert it to our new mark.
57```
57```
58~fintud-macrep:dojo> &atom 9
58~fintud-macrep:dojo> &atom 9
599
599
60−~fintud-macrep:dojo> &cord &atom 9
60+~fintud-macrep:dojo> &examples-cord &atom 9
61'9'
61'9'
62−~fintud-macrep:dojo> &cord &atom &cord &atom 9
62+~fintud-macrep:dojo> &examples-cord &atom &examples-cord &atom 9
63'57'
63'57'
64```
64```
65
65
@@ -71,9 +71,9 @@ same concept. They're not isomorphisms.
71Let's play around a little more:
71Let's play around a little more:
72
72
73```
73```
74−~fintud-macrep:dojo> &md &cord &atom 17
74+~fintud-macrep:dojo> &md &examples-cord &atom 17
75'17'
75'17'
76−~fintud-macrep:dojo> &hymn &md &cord &atom 17
76+~fintud-macrep:dojo> &hymn &md &examples-cord &atom 17
77[ [%html ~]
77[ [%html ~]
78 [[%head ~] [[%title ~] [[%~. [%~. "Untitled"] ~] ~] ~] ~]
78 [[%head ~] [[%title ~] [[%~. [%~. "Untitled"] ~] ~] ~] ~]
79 [ [%body ~]
79 [ [%body ~]
@@ -93,7 +93,7 @@ the time this gets to the web page, it's plain html. Let's do
93the final step in the conversion.
93the final step in the conversion.
94
94
95```
95```
96−~fintud-macrep:dojo> &mime &hymn &md &cord &atom 17
96+~fintud-macrep:dojo> &mime &hymn &md &examples-cord &atom 17
97[ [%text %html ~]
97[ [%text %html ~]
98 p=121
98 p=121
99 q='<html><head><title>Untitled</title></head><body><meta value="{}" name="frontmatter" urb:front="" /><p>17</p></body></html>'
99 q='<html><head><title>Untitled</title></head><body><meta value="{}" name="frontmatter" urb:front="" /><p>17</p></body></html>'
@@ -102,26 +102,26 @@ the final step in the conversion.
102
102
103This is a mime-typed octet stream with type `/text/html`, length
103This is a mime-typed octet stream with type `/text/html`, length
104121 bytes, and our lowly number `17` rendered to a web page.
104121 bytes, and our lowly number `17` rendered to a web page.
105−`cord` was just one step in the chain.
105+`examples-cord` was just one step in the chain.
106
106
107Of course, arvo can infer some parts of this chain:
107Of course, arvo can infer some parts of this chain:
108
108
109```
109```
110−~fintud-macrep:dojo> &cord 17
110+~fintud-macrep:dojo> &examples-cord 17
111'17'
111'17'
112```
112```
113
113
114−Likewise, `md` is the only way to get from `cord` to `hymn`, so
114+Likewise, `md` is the only way to get from `examples-cord` to `hymn`, so
115that can be omitted. If we omit the `hymn`, though, we get:
115that can be omitted. If we omit the `hymn`, though, we get:
116
116
117```
117```
118−~fintud-macrep:dojo> &mime &cord 17
118+~fintud-macrep:dojo> &mime &examples-cord 17
119[[%text %x-markdown ~] p=1 q='7']
119[[%text %x-markdown ~] p=1 q='7']
120```
120```
121
121
122−Here, we converted straight from `cord` to `md` to `mime`. Arvo
122+Here, we converted straight from `examples-cord` to `md` to `mime`. Arvo
123decided that was the most straightforward conversion, but it
123decided that was the most straightforward conversion, but it
124gives a different result than passing it through the `hymn`
124gives a different result than passing it through the `hymn`
125mark.
125mark.
126
126
127−The minimal correct input, then, is `&mime &hymn &cord &atom 17`.
127+The minimal correct input, then, is `&mime &hymn &examples-cord &atom 17`.
docs/programming/system/network.md+1−1
@@ -191,7 +191,7 @@ Run it with these commands:
191```
191```
192
192
193Replace `~sampel-sipnym` with another urbit. The easiest thing to
193Replace `~sampel-sipnym` with another urbit. The easiest thing to
194−do is to start a [moon](), a sub-identity of your urbit. Don't
194+do is to start a moon, a sub-identity of your urbit. If you don't know how to start a moon, see [the user admin section](/docs/using/admin/) Don't
195forget to start the `%examples-pong` app on that urbit too. You should
195forget to start the `%examples-pong` app on that urbit too. You should
196see, on the foreign urbit, this output:
196see, on the foreign urbit, this output:
197
197
docs/programming/system/subject.md+1−1
@@ -1,7 +1,7 @@
1---
1---
2sort: 2
2sort: 2
3next: true
3next: true
4−title: Hoon refresher / crash course
4+title: The subject
5---
5---
6
6
7# The subject
7# The subject