on master help sign in
151ized docs
commit2ed523832e3c7633846ddc7e3560ae1902829705 authorHenry Ault <henry@tlon.io> dateFri 15 Apr 2016, 14:17 (11 years ago) parent911d8ed5623de7
24 files changed+345−77
docs/about.md+1−1 docs/programming.md+1−1 docs/programming/core.md+8−10 docs/programming/core/demo.md+20−16 docs/programming/reference.md+1−1 docs/programming/reference/runes.md+13−13 docs/programming/reference/runes/bc.md+2−2 docs/programming/reference/runes/br.md+2−2 docs/programming/reference/runes/cl.md+2−2 docs/programming/reference/runes/cn.md+2−2 docs/programming/reference/runes/dt.md+2−2 docs/programming/reference/runes/hx.md+2−2 docs/programming/reference/runes/kt.md+2−2 docs/programming/reference/runes/sg.md+2−2 docs/programming/reference/runes/sm.md+2−2 docs/programming/reference/runes/ts.md+2−2 docs/programming/reference/runes/wt.md+2−2 docs/programming/reference/runes/zp.md+2−2 docs/programming/system/marks.md+2−1 docs/programming/system/security-driver.md+262 docs/using.md+1−1 docs/using/install.md+3 docs/using/setup.md+2−2 docs/using/web.md+7−7
docs/about.md+1−1
@@ -4,4 +4,4 @@ sort: 1
44
55# About
66
7−<list dataPath="docs/about"></list>
7+<list />
docs/programming.md+1−1
@@ -4,4 +4,4 @@ sort: 3
44
55# Programming
66
7−<list dataPath="docs/programming"></list>
7+<list />
docs/programming/core.md+8−10
@@ -4,21 +4,19 @@ sort: 1
44
55# Core Hoon
66
7−Hoon is strict, typed functional programming without math.
7+Hoon is strict, typed functional programming without category
8+theory.
89
910Hoon is named after a Wallace Stevens poem. Coincidentally, it
1011means "hooligan" in Australian. Practically, "Hoon" is a short
1112punchy name which search engines handle well.
1213
13−This manual defines a practical Hoon subset we call Core Hoon.
14−Some of the internal structures we present are simplified to
15−reflect the Core subset.
14+Hoon has simple principles and a lot of details. To keep the
15+details from getting overwhelming, we start out learning a
16+simplified subset called Core Hoon. (Note that some of the
17+internal structures we show are simplified to match the subset.
18+These simplifications are corrected under Advanced Types.)
1619
17−To read it for the first time, read these links in order:
20+To learn Hoon, traverse this tree in depth-first order:
1821
1922<list/>
20−
21−The Core manual is as terse as possible and written from a
22−top-down reference perspective. This will suit some and not others. For a
23−more narrative, bottom-up analysis, read [Deep Hoon](deep).
24−
docs/programming/core/demo.md+20−16
@@ -13,17 +13,18 @@ line is commented with its number:
1313:gate end/atom :: 1
1414:var count 1 :: 2
1515:loop :: 3
16−:if =(end count) :: 4
17− ~ :: 5
18−:cons :: 6
19− :if =(0 (mod count 15)) :: 7
20− "FizzBuzz" :: 8
21− :if =(0 (mod count 5)) :: 9
22− "Fizz" :: 10
23− :if =(0 (mod count 3)) :: 11
24− "Buzz" :: 12
25− (text :wrap(count)) :: 13
26−:moar(count (add 1 count)) :: 14
16+:cast (list tape) :: 4
17+:if =(end count) :: 5
18+ ~ :: 6
19+:cons :: 7
20+ :if =(0 (mod count 15)) :: 8
21+ "FizzBuzz" :: 9
22+ :if =(0 (mod count 5)) :: 10
23+ "Fizz" :: 11
24+ :if =(0 (mod count 3)) :: 12
25+ "Buzz" :: 13
26+ (text :wrap(count)) :: 14
27+:moar(count (add 1 count)) :: 15
2728```
2829
2930Can you understand this code by just looking at it? Hopefully,
@@ -40,16 +41,19 @@ Line 2 declares a variable, `count`, with initial value `1`.
4041
4142Line 3 begins a loop.
4243
43−Line 4 checks if `count` equals `end`. If so, line 5 (and the
44−whole loop) produces the value `~`, null. If not, line 6 begins
45−an ordered pair.
44+Line 4 casts the product of the loop to a list of `tape`
45+(string as a character list).
46+
47+Line 5 checks if `count` equals `end`. If so, line 6 (and the
48+whole loop) produces the value `~`, null, the empty list. If
49+not, line 7 begins an ordered pair.
4650
4751The head of the pair is "FizzBuzz", or "Fizz", or "Buzz", if the
48−respective tests hit. If not, line 13 wraps a runtime type
52+respective tests hit. If not, line 14 wraps a runtime type
4953around `count`, then prints the type-value pair to a string (like
5054C `sprintf()`). This string is the first item in the output list.
5155
52−The tail of the pair is line 14, which repeats the loop (like
56+The tail of the pair is line 15, which repeats the loop (like
5357Clojure `recur`), with `count` incremented. This list of strings
5458is the rest of the output list.
5559
docs/programming/reference.md+1−1
@@ -6,4 +6,4 @@ sort: 4
66
77Background information on Nock, Hoon, Arvo,
88
9−<list dataPath="docs/programming/reference"></list>
9+<list />
docs/programming/reference/runes.md+13−13
@@ -13,72 +13,72 @@ Runes
1313
1414## `$ buc` (molds)
1515
16−<list dataPath="docs/system/hoon/runes/bc" dataPreview="true" className="runes" childIsFragment="true"></list>
16+<list src="bc" dataPreview="true" className="runes" childIsFragment="true"></list>
1717
1818---
1919
2020## `| bar` (cores)
2121
22−<list dataPath="docs/system/hoon/runes/br" dataPreview="true" className="runes" childIsFragment="true"></list>
22+<list src="br" dataPreview="true" className="runes" childIsFragment="true"></list>
2323
2424---
2525
2626## `: col` (tuples)
2727
28−<list dataPath="docs/system/hoon/runes/cl" dataPreview="true" className="runes" childIsFragment="true"></list>
28+<list src="cl" dataPreview="true" className="runes" childIsFragment="true"></list>
2929
3030---
3131
3232## `% cen` (invocations)
3333
34−<list dataPath="docs/system/hoon/runes/cn" dataPreview="true" className="runes" childIsFragment="true"></list>
34+<list src="cn" dataPreview="true" className="runes" childIsFragment="true"></list>
3535
3636---
3737
3838## `. dot` (nock)
3939
40−<list dataPath="docs/system/hoon/runes/dt" dataPreview="true" className="runes" childIsFragment="true"></list>
40+<list src="dt" dataPreview="true" className="runes" childIsFragment="true"></list>
4141
4242---
4343
4444## `# hax` (printing)
4545
46−<list dataPath="docs/system/hoon/runes/hx" dataPreview="true" className="runes" childIsFragment="true"></list>
46+<list src="hx" dataPreview="true" className="runes" childIsFragment="true"></list>
4747
4848---
4949
5050## `^ ket` (casting)
5151
52−<list dataPath="docs/system/hoon/runes/kt" dataPreview="true" className="runes" childIsFragment="true"></list>
52+<list src="kt" dataPreview="true" className="runes" childIsFragment="true"></list>
5353
5454---
5555
5656## `~ sig` (hints)
5757
58−<list dataPath="docs/system/hoon/runes/sg" dataPreview="true" className="runes" childIsFragment="true"></list>
58+<list src="sg" dataPreview="true" className="runes" childIsFragment="true"></list>
5959
6060---
6161
6262## `; sem` (composition)
6363
64−<list dataPath="docs/system/hoon/runes/sm" dataPreview="true" className="runes" childIsFragment="true"></list>
64+<list src="sm" dataPreview="true" className="runes" childIsFragment="true"></list>
6565
6666---
6767
6868## `= tis` (subject modifiers)
6969
70−<list dataPath="docs/system/hoon/runes/ts" dataPreview="true" className="runes" childIsFragment="true"></list>
70+<list src="ts" dataPreview="true" className="runes" childIsFragment="true"></list>
7171
7272---
7373
7474## `? wut` (conditional)
7575
76−<list dataPath="docs/system/hoon/runes/wt" dataPreview="true" className="runes" childIsFragment="true"></list>
76+<list src="wt" dataPreview="true" className="runes" childIsFragment="true"></list>
7777
7878---
7979
8080## `! zap` (special)
8181
82−<list dataPath="docs/system/hoon/runes/zp" dataPreview="true" className="runes" childIsFragment="true"></list>
82+<list src="zp" dataPreview="true" className="runes" childIsFragment="true"></list>
8383
84−</div>
84+</div>
docs/programming/reference/runes/bc.md+2−2
@@ -6,6 +6,6 @@ sort: 2
66
77##### Molds are types, but we don't have types.
88
9−<list dataPath="docs/system/hoon/runes/bc" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/bc" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/br.md+2−2
@@ -6,6 +6,6 @@ sort: 1
66
77##### Cores are sort of like objects, but not quite.
88
9−<list dataPath="docs/system/hoon/runes/br" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/br" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/cl.md+2−2
@@ -6,6 +6,6 @@ sort: 3
66
77##### Tuples are easy.
88
9−<list dataPath="docs/system/hoon/runes/cl" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/cl" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/cn.md+2−2
@@ -6,6 +6,6 @@ sort: 4
66
77##### Calls, but not.
88
9−<list dataPath="docs/system/hoon/runes/cn" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/cn" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/dt.md+2−2
@@ -6,6 +6,6 @@ sort: 5
66
77##### Run some nock.
88
9−<list dataPath="docs/system/hoon/runes/dt" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/dt" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/hx.md+2−2
@@ -6,6 +6,6 @@ sort: 6
66
77##### Want to print something? Fine.
88
9−<list dataPath="docs/system/hoon/runes/hx" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/hx" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/kt.md+2−2
@@ -6,6 +6,6 @@ sort: 7
66
77##### Go ahead, recast that.
88
9−<list dataPath="docs/system/hoon/runes/kt" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/kt" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/sg.md+2−2
@@ -6,6 +6,6 @@ sort: 8
66
77##### Give the compiler a little help.
88
9−<list dataPath="docs/system/hoon/runes/sg" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/sg" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/sm.md+2−2
@@ -6,6 +6,6 @@ sort: 10
66
77##### Compose at will.
88
9−<list dataPath="docs/system/hoon/runes/sm" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/sm" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/ts.md+2−2
@@ -6,6 +6,6 @@ sort: 9
66
77##### Feel free to change the subject.
88
9−<list dataPath="docs/system/hoon/runes/ts" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/ts" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/wt.md+2−2
@@ -6,6 +6,6 @@ sort: 11
66
77##### If this then what?
88
9−<list dataPath="docs/system/hoon/runes/wt" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/wt" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/reference/runes/zp.md+2−2
@@ -6,6 +6,6 @@ sort: 12
66
77##### Pow, zap, bam.
88
9−<list dataPath="docs/system/hoon/runes/zp" dataPreview="true" className="runes" linkToFragments="true"></list>
9+<list dataPreview="true" className="runes" linkToFragments="true"></list>
1010
11−<kids dataPath="docs/system/hoon/runes/zp" className="runes"></kids>
11+<kids className="runes"></kids>
docs/programming/system/marks.md+2−1
@@ -49,7 +49,8 @@ to `++scot`. Thus, the form of an arm in `++grab` is
4949
5050In `++grow`, we just convert to the `md` mark, which is just a
5151`@t` internally, but it has fancy conversion functions to things
52−like html. `++md` isn't a function because the "argument" is already a `@t`, so we can just produce the new value directly.
52+like html. `++md` isn't a function because the "argument" is
53+already a `@t`, so we can just produce the new value directly.
5354
5455Let's play around a bit with this mark. First, let's take a
5556marked atom and convert it to our new mark.
docs/programming/system/security-driver.mdnew file+262
@@ -0,0 +1,262 @@
1+---
2+next: false
3+sort: 10
4+title: Security Drivers
5+---
6+
7+A security driver is a file in `/=home=/sec/<tld>/<domain>/hoon`
8+that handles the authentication for all HTTP requests to
9+`https://<domain>.<tld>`. All requests to the domain are
10+filtered through the security driver, which will either decorate
11+the request with the needed credentials if it has them, or else
12+it will guide the user through the process of authenticating
13+Urbit with the service.
14+
15+Each web service needs its own security driver, but most of them
16+are pretty standard. We recommend starting with an existing
17+security driver based on your needed authentication method (e.g.
18+basic auth, OAuth1, OAuth2), and changing whatever is specific to
19+your service.
20+
21+The best strategy for building security drivers is to copy a
22+similar one and tweak it until it works for you. The best
23+representatives are Github for Basic Authentication, Twitter for
24+OAuth1, Slack for OAuth2 when access tokens don't expire, and
25+Google APIs for OAuth2 when access tokens do expire. In most
26+cases you'll need to make very few changes to one of these
27+models.
28+
29+Still, it's worth seeing one or two built from the ground up.
30+Here, we'll build a connector for the Github API v3. The
31+simplest way to interact with the Github API is to just fetch
32+https://api.github.com.
33+
34+ +https://api.github.com
35+
36+Github exposes a few endpoints to the general web, and the root
37+endpoint is one of them. This gives you a textual representation
38+of a JSON object that contains a bunch of urls to other parts of
39+Github's API. This is exactly the same response you would get
40+from just running `curl` on UNIX.
41+
42+If we don't have a security driver for Github yet, many of the
43+endpoints won't be accessible, or they will only have publicly
44+accessible information. Most of what we care about requires us
45+to be authenticated.
46+
47+Here's a simple security driver:
48+
49+```
50+:: Test url +https://api.github.com/user
51+::
52+:::: /hoon/github/com/sec
53+ ::
54+/+ basic-auth
55+!:
56+|_ {bal/(bale keys:basic-auth) $~}
57+++ aut ~(standard basic-auth bal ~)
58+++ filter-request out-adding-header:aut
59+--
60+```
61+
62+Github supports authentication through either Basic
63+Authentication or OAuth2. We'll show the basic auth example
64+first, but in general we'd prefer OAuth2.
65+
66+Since this driver is for Github, put it in
67+`/=home=/sec/com/github/hoon`.
68+
69+To try this out, we first have to initialize our credentials with
70+`|init-auth-basic`, which prompts for the url of the service
71+(api.github.com), username, and password. It stores this
72+information in a manner that `%eyre` knows how to decode and send
73+put into your bale. Note that `|init-auth-basic` is standard for
74+basic auth, but other auth schemes (like OAuth) are initialized
75+in other ways.
76+
77+After you've run `|init-auth-basic`, you should be able to run
78+`+https://api.github.com/user` and get a response indicating who
79+you're logged in as.
80+
81+You can similarly POST:
82+
83+ +https://api.github.com/gists &json _(cork poja need)
84+ '{"files":{"file1.txt":{"content":"can\'t stop the signal"}}}'
85+
86+This creates a gist, go to `https://gist.github.com/<username>` to
87+see it.
88+
89+The `+url` syntax used in "source" position makes a GET request,
90+but if you pass it data it will make a POST request with that
91+data as the body. This request is authenticated seamlessly. You
92+can send data of any mark as long as it has a conversion path to
93+`%mime`.
94+
95+Let's take a look at the code and see if we can figure out what's
96+happening here.
97+
98+First, we load a library called `basic-auth`. This library
99+exposes two items. `keys` is the type of the basic auth key,
100+which is essentially a base64'd username and password.
101+`standard` accepts a bale and produces a core with everything
102+we'll need to implement basic auth.
103+
104+Every security driver needs some amount of state, which is stored
105+in the bale. The bale contains:
106+
107+- `our`, our urbit name
108+- `now`, the current time
109+- `eny`, 256 bits of entropy
110+- `byk`, the urbit, desk, and case which the security driver is
111+ running off
112+- `usr`, the particular identity we're logging in with
113+- `dom`, the site we're accessing
114+- `key`, the secrets required to authenticate requests. The type
115+ for this entry is supplied by the programmer as the argument to
116+ `++bale`. Thus, in our case, `key` in our bale is of type
117+ `keys:basic-auth`.
118+
119+Additionally, a security driver contains at least one "special"
120+arm. Here, we use `++filter-request`, which is a function which
121+takes a hiss (http request) and produces a `sec-move`, which is
122+one of:
123+
124+- `%send` plus a hiss, which sends the new hiss. This is the
125+ case in, for example, basic auth, where all we need to do is
126+ add an extra header to the request.
127+- `%give` plus an httr (http response), which immediately returns
128+ an http response to the sender.
129+- `%show` plus a purl (parsed url), which displays a message
130+ asking the user to visit the given url to continue the
131+ authentication process.
132+
133+Every request to a Github url will be filtered through
134+`++filter-request`, and we want to add the authentication header
135+to it. Our `++aut` core contains a function
136+`++out-addding-header`, which does exactly what we want.
137+
138+Where do the keys come from, though? Remember we ran
139+`|init-auth-basic` to input them. This just prompts you for the
140+service url, username, and password, and it stores them next to
141+the driver. In our case, that's
142+`/=home=/sec/com/gitub/api/atom`. These keys are stored
143+encrypted, and you don't want to edit them directly. `%eyre`
144+loads them directly into your bale.
145+
146+# OAuth2
147+
148+Most services are better accessed through some form of OAuth.
149+Github can be accessed with OAuth2, which is a little more
150+complicated than basic auth, but not hugely so.
151+
152+The basic steps for OAuth2 are these:
153+
154+- create an app and get its client id and client secret (on
155+ Github)
156+- store these in Urbit (with `|init-oauth2`)
157+- try to make a request that requires authentication. The
158+ security driver should prompt you to visit a particular url.
159+- visit the url and click "authorize", which gives the app access
160+ to your account
161+- the security driver will turn the code it receives into an
162+ access token
163+- on every request, include that access token
164+
165+Creating an app is easy and
166+[well-documented](https://github.com/settings/applications/new).
167+If necessary, set the callback url to
168+`/~/ac/github.com/_state/in`, and note its client id and client
169+secret.
170+
171+Run `|init-oauth2`, which will prompt for the hostname
172+(api.github.com), client id, and client secret. This will store
173+the information, encrypted, in `/=home=/sec/com/github.atom`,
174+just as with Basic Authentication.
175+
176+Now we need a security driver. Use this:
177+
178+```
179+:: Test url +https://api.github.com/user
180+::
181+:::: /hoon/github/com/sec
182+ ::
183+/+ oauth2
184+!:
185+::::
186+ ::
187+|_ {bal/(bale keys:oauth2) tok/token:oauth2}
188+++ scopes :: comment out scopes to taste
189+ :~ 'user' 'user:email' 'user:follow' 'public_repo' 'repo'
190+ 'repo_deployment' 'repo:status' 'delete_repo' 'notifications'
191+ 'gist' 'read:repo_hook' 'write:repo_hook' 'admin:repo_hook'
192+ 'admin:org_hook' 'read:org' 'write:org' 'admin:org'
193+ 'read:public_key' 'write:public_key' 'admin:public_key'
194+ ==
195+:: ++aut is a "standard oauth2" core, which implements the
196+:: most common handling of oauth2 semantics. see lib/oauth2 for more details,
197+:: and examples at the bottom of the file.
198+++ aut (~(standard oauth2 bal tok) . |=(tok/token:oauth2 +>(tok tok)))
199+++ filter-request
200+ %^ out-add-query-param:aut 'access_token'
201+ scope=~[%client %admin]
202+ oauth-dialog='https://github.com/login/oauth/authorize'
203+::
204+++ receive-auth-query-string
205+ %- in-code-to-token:aut
206+ url='https://github.com/login/oauth/api/access_token'
207+++ receive-auth-response bak-save-token:aut
208+--
209+```
210+
211+The oauth2 library provides the main "engine" in `standard`, just
212+like in basic auth, except that we also have to specify a
213+function to save the access token when we get it.
214+
215+Running `+http://api.github.com/user` tries to make a request to
216+Github with authentication. This loads into the bale the keys,
217+which are of type `keys:oauth2`, defined in the oauth2 library.
218+We don't have to worry about the specifics of these keys -- the
219+library handles them -- but they include the client id and the
220+client secret.
221+
222+Before the request is sent, `%eyre` calls `++filter-request` to
223+decorate it with authentication headers. Since we don't yet have
224+an access token, we need to prompt the user to visit the "dialog"
225+url. `++out-add-query-param` checks whether we have a token, and
226+if we don't it produces `%show` and a message telling the user to
227+visit the `oauth-dialog` url we provide, with the extra query
228+parameters added (client id, scopes, and state).
229+
230+When the user visits that url, Github will ask them to log in and
231+authorize the application. When they do so, Github will post a
232+request to `/~/ac/github.com/_state/in` with a code in the query
233+string. `%eyre` sends the query string to
234+`++receive-auth-query-string`, which is a function that takes a
235+quay and produces a `sec-move`. `++in-code-to-token` from our
236+`aut` takes the `code` parameter from the quay and uses it to
237+create a request to the given url. This request includes the
238+client id, the client secret, and the code we just got.
239+
240+Github's response to that request includes an access token in its
241+body. This is handled in `++receive-auth-response`.
242+`++bak-save-token` extracts that token and gives it to the
243+function that we passed in the definition of `++aut`. In our
244+case, we just save that token into our state for later usage.
245+
246+Now we have the credentials we need, so `++filter-request` is
247+called with the original request, and `++out-add-query-param`
248+passes the request through with the addition of the query
249+parameter `access_token`.
250+
251+Just like with Basic Authentication, you should be able to run
252+`+https://api.github.com/user` and get a response indicating who
253+you're logged in as.
254+
255+Some drivers a slightly more complicated. For example, Github's
256+access token's don't expire, but that's not the case for all
257+service. The googleapis driver shows the flow when the access
258+token can expire. Twitter uses OAuth1, for which we have another
259+library.
260+
261+Remember, of course, that the best strategy for building security
262+drivers is to copy a similar one and tweak it to taste.
docs/using.md+1−1
@@ -4,4 +4,4 @@ sort: 2
44
55# Using
66
7−<list dataPath="docs/using"></list>
7+<list />
docs/using/install.md+3
@@ -51,6 +51,9 @@ Which can usually be installed with the following one-liners:
5151 # FreeBSD
5252 pkg install git gmake gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
5353
54+ # Arch
55+ pacman -S gcc gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool ncurses
56+
5457 # AWS
5558 sudo yum —enablerepo epel install gcc gcc-c++ git gmp-devel openssl-devel ncurses-devel libsigsegv-devel ctags automake autoconf libtool cmake re2c
5659
docs/using/setup.md+2−2
@@ -85,8 +85,8 @@ which indicates the command was processed.
8585
8686We go into much greater detail about using each of these components in our walkthroughs:
8787
88−<list dataPath="/docs/walkthroughs"></list>
88+<list src="."></list>
8989
9090With your Urbit up and running you know enough to start learning to program:
9191
92−<list dataPath="/docs/deep-dives"></list>
92+<list src="../programming/deep"></list>
docs/using/web.md+7−7
@@ -42,7 +42,7 @@ Now modify `/home/web/test.md` to list the children using the `<list/>` JSX:
4242
4343 This is a simple markdown file.
4444
45− <div><list /></div>
45+ <div><list / />
4646
4747To view your file as raw `md`:
4848
@@ -148,31 +148,31 @@ For those familiar with React / Flux each JSX tag corresponds to a component in
148148
149149### `<list>`
150150
151−Example: `<list dataPath="/posts" titlesOnly="true"></list>`
151+Example: `<list src="/posts" titlesOnly="true" />`
152152
153153Creates a list of children at a path. Defaults to the current path.
154154
155155Optional properties:
156156
157−- `dataPath`: Path to load kids from.
157+- `src`: Path to load kids from.
158158- `titlesOnly`: Only show the 'title' which is either the filename or the first h1.
159159- `sortBy`: Can be `date` if items have a `date` YAML.
160160- `className`: Class to be assigned to the container.
161161
162162### `<kids>`
163163
164−Example: `<kids dataPath="/posts"></kids>`
164+Example: `<kids src="/posts" />`
165165
166166Includes all the children at the specified path separated by `<hr>` tags.
167167
168168Optional properties:
169169
170−- `dataPath`: Path to load kids from.
170+- `src`: Path to load kids from.
171171- `className`: Class to be assigned to the container.
172172
173173### `<toc>`
174174
175−Example: `<toc noHeader="true"></toc>`
175+Example: `<toc noHeader="true" />`
176176
177177Creates a table of contents from the `h1` - `h6` tags on the page.
178178
@@ -244,7 +244,7 @@ Talk, for example, looks like this:
244244 <script src="/~~/~/at/lib/js/urb.js" />
245245 <script src="/talk/main.js" />
246246 <link href="/talk/main.css" rel="stylesheet" />
247− <talk></talk>
247+ <talk />
248248</module>
249249```
250250