on master help sign in
various fixes to runes and other pages
5a942e0joshuareagan
docs/about/overview.udon+2−3
@@ -18,8 +18,7 @@ The current Urbit stack includes (among other things):
18- Arvo: the functional operating system of each urbit, written in Hoon.
18- Arvo: the functional operating system of each urbit, written in Hoon.
19- Hoon: a strictly typed functional programming language whose standard library
19- Hoon: a strictly typed functional programming language whose standard library
20 includes a Hoon-to-Nock compiler.
20 includes a Hoon-to-Nock compiler.
21−- Nock: a low-level combinator language whose formal specification gzips to 340
21+- Nock: a low-level combinator language whose formal specification fits readably on a t-shirt.
22− bytes.
23- Vere: a Nock interpreter and Unix-based virtual machine that mediates between
22- Vere: a Nock interpreter and Unix-based virtual machine that mediates between
24 each urbit and the Unix software layer.
23 each urbit and the Unix software layer.
25
24
@@ -58,7 +57,7 @@ there is a risk of losing functional purity; your urbit cannot _guarantee_ that
58the side effects in question actually occur. What's the solution?
57the side effects in question actually occur. What's the solution?
59
58
60Each urbit is
59Each urbit is
61−[sandboxed](https://en.wikipedia.org/wiki/Sandbox_(computer_security)) in a
60+[sandboxed](https://en.wikipedia.org/wiki/Sandbox_(computer_security%29) in a
62virtual machine, Vere, which runs on Unix. Code running in your urbit cannot
61virtual machine, Vere, which runs on Unix. Code running in your urbit cannot
63make Unix system calls or otherwise directly affect the underlying platform.
62make Unix system calls or otherwise directly affect the underlying platform.
64Strictly speaking, internal urbit code can only change internal urbit state; it
63Strictly speaking, internal urbit code can only change internal urbit state; it
docs/tutorials/hoon-ch1/hoon-ch1-4.udon+2−2
@@ -28,7 +28,7 @@ Nock is a [low-level](https://en.wikipedia.org/wiki/Low-level_programming_langua
28
28
29### What is a Function?
29### What is a Function?
30
30
31−The word 'function' is used in various ways in other programming languages, but we mean it in basically its [mathematical sense](https://en.wikipedia.org/wiki/Function_(mathematics)). Roughly put, a function takes one or more arguments (i.e., input values) and returns a value. What the return value is depends solely on the argument(s), and nothing else. For example, we can understand multiplication as a function: it takes two numbers and returns another number. It doesn't matter where you ask, when you ask, or what kind of hat you're wearing when you ask. If you pass the same two numbers (e.g., `3` and `4`), you get the same answer returned every time (`12`).
31+The word 'function' is used in various ways in other programming languages, but we mean it in basically its [mathematical sense](https://en.wikipedia.org/wiki/Function_(mathematics%29). Roughly put, a function takes one or more arguments (i.e., input values) and returns a value. What the return value is depends solely on the argument(s), and nothing else. For example, we can understand multiplication as a function: it takes two numbers and returns another number. It doesn't matter where you ask, when you ask, or what kind of hat you're wearing when you ask. If you pass the same two numbers (e.g., `3` and `4`), you get the same answer returned every time (`12`).
32
32
33### The Nock Function
33### The Nock Function
34
34
@@ -45,7 +45,7 @@ Here's an example of some Nock run in the dojo, using `.*( )`:
45
45
46In this example `[15 17]` is the subject, `[[4 0 2] [0 3]]` is the formula, and `[16 17]` is the product.
46In this example `[15 17]` is the subject, `[[4 0 2] [0 3]]` is the formula, and `[16 17]` is the product.
47
47
48−This tutorial series is designed to teach you Hoon. For that purpose it's not important that you know how to read and understand Nock formulas; you just need to know that Nock takes a subject and a formula and returns a product. (Those who who want to learn more about Nock should head over to the [Nock tutorial]([Nock spec](../../nock)).)
48+This tutorial series is designed to teach you Hoon. For that purpose it's not important that you know how to read and understand Nock formulas; you just need to know that Nock takes a subject and a formula and returns a product. (Those who who want to learn more about Nock should head over to the [Nock tutorial](../../nock).)
49
49
50### Nock Formulas Define Functions
50### Nock Formulas Define Functions
51
51
docs/tutorials/hoon-ch1/hoon-ch1-6.udon+1−1
@@ -54,7 +54,7 @@ The second way of making a function call involves an expression that _produces_
54246
54246
55```
55```
56
56
57−Pop quiz: Are calls to `add` and `mul` of the Hoon standard library of the first kind, or the second?
57+Are calls to `add` and `mul` of the Hoon standard library of the first kind, or the second?
58
58
59```
59```
60> (add 12 23)
60> (add 12 23)
docs/tutorials/hoon-ch2/hoon-ch2-10.udon+1−1
@@ -198,7 +198,7 @@ There are other set functions in the Hoon standard library we won't cover here.
198
198
199### Cartesian Product
199### Cartesian Product
200
200
201−Here's a program that takes two sets of atoms and returns the Cartesian product of those sets. A Cartesian of two sets `a` and `b` is a set of all the cells whose head is a member of `a` and whose tail is a member of `b`.
201+Here's a program that takes two sets of atoms and returns the Cartesian product of those sets. A Cartesian product of two sets `a` and `b` is a set of all the cells whose head is a member of `a` and whose tail is a member of `b`.
202
202
203```
203```
204|= [a=(set @) b=(set @)]
204|= [a=(set @) b=(set @)]
docs/tutorials/hoon-ch2/hoon-ch2-7.udon+1−1
@@ -349,7 +349,7 @@ To use a door as a state machine, put the door in the subject and modify that do
3490
3490
350```
350```
351
351
352−As you can see, you never actually 'change' the `num` core literally; you actually product a variant of that core and set that as the new value of `num`. You can see the sample value of `num` using `a.num`.
352+As you can see, you never actually 'change' the `num` core literally; you actually produce a variant of that core and set that as the new value of `num`. You can see the sample value of `num` using `a.num`.
353
353
354Let's do the same sort of thing in a generator. Save the following as `numcore.hoon` in the `/gen` directory of your urbit's pier:
354Let's do the same sort of thing in a generator. Save the following as `numcore.hoon` in the `/gen` directory of your urbit's pier:
355
355
docs/tutorials/hoon-ch2/hoon-ch2-8.udon+3−3
@@ -99,7 +99,7 @@ You'll notice that the `plus` arm of the `num` core above evaluates to a gate.
99 [(add a b) this(a (add a b))]
99 [(add a b) this(a (add a b))]
100```
100```
101
101
102−But this gate doesn't have a cast in it, and that's bad practice. Any time you produce a gate you should include a cast for the desired output type. The desired output of the `plus` gate is a cell whose head is an atom and whose tail is a core of the same type as `num`. The head is easy to case for using `@`, but what about the tail? How do we cast for a core of the same type as `num`?
102+But this gate doesn't have a cast in it, and that's bad practice. Any time you produce a gate you should include a cast for the desired output type. The desired output of the `plus` gate is a cell whose head is an atom and whose tail is a core of the same type as `num`. We know how to cast for the head -- it's just an atom, `@`. But what about the tail? How do we cast for a core of the same type as `num`?
103
103
104There is no straight-forward way of casting for a core in general, and anyway that isn't what is desired in this case. We don't want `plus` to produce just any core; we want it to produce a core of the same type as `num`.
104There is no straight-forward way of casting for a core in general, and anyway that isn't what is desired in this case. We don't want `plus` to produce just any core; we want it to produce a core of the same type as `num`.
105
105
@@ -136,7 +136,7 @@ The irregular form of `$_( )` is just `_`, so we can shorten the cast above to:
136 [(add a b) this(a (add a b))]
136 [(add a b) this(a (add a b))]
137```
137```
138
138
139−This kind of casting is relatively common. It's generally used in gates of doors used as state machines.
139+This kind of casting is relatively common. It's generally used in cores used as state machines.
140
140
141#### The `_+>.$` Construction
141#### The `_+>.$` Construction
142
142
@@ -628,7 +628,7 @@ With this version of the program, you get a different sorted deck of cards each
628
628
629### Dealing Cards with a State Machine
629### Dealing Cards with a State Machine
630
630
631−Let's use a door as a state machine. The state will have two parts: (1) a deck of cards, and (2) `rng` a copy of the `og` core with a seed value. Instead of having functions that produce a sorted deck of cards or a shuffled deck of cards, let's have the arms of this door compute a new version of the state machine with an appropriately modified state.
631+Let's use a door as a state machine. The state will have two parts: (1) `deck`, a deck of cards, and (2) `rng`, a copy of the `og` core with a seed value. Instead of having functions that produce a sorted deck of cards or a shuffled deck of cards, let's have the arms of this door compute a new version of the state machine with an appropriately modified state.
632
632
633We'll use this state machine in a program that deals `a` hands of `b` cards each:
633We'll use this state machine in a program that deals `a` hands of `b` cards each:
634
634