adds 'next' link at bottom of lessons
commit275f9201f7d987eaefdde3b59f5de7daa0c52281
authorRobert <robert@tlon.io>
dateFri 1 Feb 2019, 13:12 (8 years ago)
parent8543ac9
introduction/arvo-vs-azimuth.udon+3−3
@@ -8,8 +8,8 @@
88
99The Arvo network is composed of virtual machines running our software stack. Using a blockchain for this kind of computing is impossible: there's far too much data involved in an operating system to run on top of a distributed consensus mechanism. And you don't want your private information on a public ledger. The Arvo network is not a blockchain.
1010
11−However, being a decentralized system, we need some way to cryptographically secure and authenticate your identity on the Arvo network. What keeps track of who owns any given identity? Well, simply matching something to an address is a small piece of computing, and a blockchain are wonderful for such a purpose. That's where the Azimuth comes in.
11+However, being a decentralized system, we need some way to cryptographically secure and authenticate your identity on the Arvo network. What keeps track of who owns any given identity? Well, simply matching something to an address is a small piece of computing, and a blockchain are wonderful for such a purpose. That's where the Azimuth comes in.
1212
13−We chose to build Azimuth on the Ethereum blockchain because smart contracts are well-suited for the peculiarities of the identities. Urbit identities are owned by Ethereum addresses.
13+We chose to build Azimuth on the Ethereum blockchain because smart contracts are well-suited for the peculiarities of the identities. Urbit identities are owned by Ethereum addresses.
1414
15−Azimuth and the Arvo network are parallel systems. Azimuth isn't necessarily Arvo-related; it can be used as a generalized identity system for other projects. Azimuth is the equivalent of a bank vault that stores the deed to your house. The Arvo network is the neighborhood that you live in.
15+Azimuth and the Arvo network are parallel systems. Azimuth isn't necessarily Arvo-related; it can be used as a generalized identity system for other projects. Azimuth is the equivalent of a bank vault that stores the deed to your house. The Arvo network is the neighborhood that you live in.
learn/arvo/hoon/arms-and-cores.udon+2
@@ -421,3 +421,5 @@ You can now unbind `c` in the dojo -- this will help to keep your dojo subject t
421421> c
422422-find.c
423423```
424+
425+### [Next Lesson: Gates](../gates)
learn/arvo/hoon/atoms-auras-and-simple-cell-types.udon+3
@@ -778,3 +778,6 @@ Hoon pretty-prints them the same way, but can we be sure that they are the same
778778```
779779
780780They are indeed the same.
781+
782+
783+### [Next Lesson: Type Checking and Type Inference](../type-checking-and-type-inference)
learn/arvo/hoon/cores-again.udon+4−2
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'26'
4+ sort/'28'
55 title/'Cores Again'
66 ==
77;>
88
9−# 2.6 Cores Again
9+# 2.8 Cores Again
1010
1111In the last lesson you learned a bit about how to use cores as state machines. In this lesson you'll expand on that knowledge, in particular by learning how to use the `=^` rune. At the end of the lesson you'll learn how to write a generator that shuffles a 52 card deck and deals hands from it.
1212
@@ -798,3 +798,5 @@ Save this as `carddeal.hoon` in `/gen` of your urbit's pier and run in the dojo:
798798```
799799
800800You get a different set of hands each time you run the generator.
801+
802+### [Next Lesson: Lists](../lists)
learn/arvo/hoon/cores.udon+3−1
@@ -6,7 +6,7 @@
66 ==
77;>
88
9−2.7 Cores
9+# 2.7 Cores
1010
1111You learned what a core is in previous lessons. After a brief review, let's talk about how to use cores effectively in Hoon programming.
1212
@@ -397,3 +397,5 @@ Now run it in the dojo:
397397Each of the `=.` expressions 'modifies' `num` by replacing the old `num` core with a different version of it. In this program we 'modify' `num` four times.
398398
399399For more on how to use cores as state machines see the next lesson.
400+
401+### [Next Lesson: Cores Again](../cores-again)
learn/arvo/hoon/examples.udon+2−2
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'30'
4+ sort/'33'
55 title/'Examples'
66 ==
77;>
88
9−# 2.10 Examples
9+# Examples
1010
1111Let's look at two more examples of Hoon code: the Sieve of Eratosthenes (a naive prime sieve) and a tic-tac-toe engine.
1212
learn/arvo/hoon/gates.udon+2
@@ -275,3 +275,5 @@ Write a gate that takes an atom, `a=@`, and which returns double the value of `a
275275> (double 25)
27627650
277277```
278+
279+### [Next Lesson: Multi-gate Cores and Doors](../multi-gate-cores-and-doors)
learn/arvo/hoon/getting-started.udon+2
@@ -112,3 +112,5 @@ You'll see:
112112```
113113
114114You asked dojo to evaluate `17` and it echoed the number back at you. This value is a 'noun'. But what is a noun? Move on to lesson 1.2 for the answer.
115+
116+### [Next Lesson: Nouns](../nouns)
learn/arvo/hoon/hoon-programs.udon+3
@@ -162,3 +162,6 @@ If not, line 7 uses the rune `:-` to produce a cell. Why is the program produci
162162The product of the `$( )` call on line 8 is another list. It essentially says that the value of `count` is to be replaced by `(add 1 count)`, and that the code starting at `|-` is to be run again.
163163
164164And that's it!
165+
166+
167+### [Next Lesson: Hoon Syntax](../hoon-syntax)
learn/arvo/hoon/hoon-syntax.udon+2
@@ -591,3 +591,5 @@ A language lends itself to *feature/label confusion* (FLC) when it's difficult t
591591The worst-case result of FLC is "DSL cancer". Every source file with this malady is effectively written in its own domain-specific language (DSL). Learning to read such a file is like learning a language. One can also describe the result as "write-only code". User-level macros, operator overloading, and even excessive use of higher-order programming, can all lead quickly to the tragedy of write-only code.
592592
593593Hoon largely avoids FLC by its use of runes. Hoon has no user-level macros or operator overloading. It does support higher-order programming; write-only Hoon can certainly be (and has been) written. However, with a little discipline one can write Hoon without inventing a DSL.
594+
595+### [Next Lesson: Simple One-Gate Programs](../simple-one-gate-programs)
learn/arvo/hoon/lists.udon+4−2
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'28'
4+ sort/'29'
55 title/'Standard Library: Lists'
66 ==
77;>
88
9−# 2.8 Standard Library: Lists
9+# 2.9 Standard Library: Lists
1010
1111In this lesson we'll review what a list is and then cover many of the list-related functions in the Hoon standard library.
1212
@@ -387,3 +387,5 @@ Run in dojo:
387387> +snag [2 ~[11 22 33 44]]
38838833
389389```
390+
391+### [Next Lesson: Trees, Sets, and Maps](../trees-sets-and-maps)
learn/arvo/hoon/multi-gate-cores-and-doors.udon+1−1
@@ -504,4 +504,4 @@ It's better simply to use the `~(arm rs arg)` syntax to replace the value of the
504504
505505## Conclusion
506506
507−You've now reached the end of Chapter 1 of the Hoon tutorial. Ideally you should have a fair understanding of the fundamental concepts of subject-oriented programming: limbs, legs, faces, wings, arms, cores, gates, and doors. If you can master these concepts you should have little or no trouble learning to write substantial Hoon programs. Continue to [Chapter 2](../hoon-ch2-1) to get started.
507+You've now reached the end of Chapter 1 of the Hoon tutorial. Ideally you should have a fair understanding of the fundamental concepts of subject-oriented programming: limbs, legs, faces, wings, arms, cores, gates, and doors. If you can master these concepts you should have little or no trouble learning to write substantial Hoon programs. Continue to [Chapter 2](../hoon-programs) to get started.
learn/arvo/hoon/nouns.udon+2
@@ -486,3 +486,5 @@ That's it for our basic introduction to nouns. Hit `ctrl-d` to exit your comet,
486486+ +14
487487+ +15
488488+ +31
489+
490+*[Next Lesson: The Subject and Its Legs](../the-subject-and-its-legs)*
learn/arvo/hoon/simple-one-gate-programs.udon+2
@@ -889,3 +889,5 @@ $(x (dec x), y (dec y))
889889?: (gth (mul c 2) a) &
890890$(c +(c))
891891```
892+
893+### [Next Lesson: Atoms, Auras, and Simple Cell Types](../atoms-auras-and-simple-cell-types)
learn/arvo/hoon/structures-and-complex-types.udon+5−3
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'25'
4+ sort/'26'
55 title/'Structures and Complex Types'
66 ==
77;>
88
9−# 2.5 Structures and Complex Types
9+# 2.6 Structures and Complex Types
1010
1111In this lesson we'll talk a little about how type expressions become structures, and how these structures manifest in different ways in different parts of your Hoon code. We'll also talk about how to create your own custom-defined complex types from simpler ones.
1212
@@ -355,4 +355,6 @@ Often `$@` is used to define a type with a null or trivial case for the `@` case
355355
356356Now the `~` value is included as a possible value for `user`.
357357
358−That's all we have to say about types in this chapter. More on types in Chapter 3.
358+That's all we have to say about types in this chapter. More on types in [Chapter 3](../type-polymorphism).
359+
360+### [Next Lesson: Cores](../cores)
learn/arvo/hoon/the-subject-and-its-legs.udon+2
@@ -656,3 +656,5 @@ You can also use more complex wings and modify their values as well:
656656```
657657
658658At this point you should have at least a rough idea of what the subject is, and a fair understanding of how to get legs of the subject using wings. But legs are only one kind of limb -- we'll talk about arms in the next lesson.
659+
660+### [Next Lesson: Arms and Cores](../arms-and-cores)
learn/arvo/hoon/trees-sets-and-maps.udon+5−3
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'29'
4+ sort/'30'
55 title/'Standard Library: Trees, Sets, and Maps'
66 ==
77;>
88
9−# 2.9 Hoon Standard Library: Trees, Sets, and Maps
9+# 2.10 Hoon Standard Library: Trees, Sets, and Maps
1010
1111Along with lists, the Hoon standard library also supports trees, sets, and maps as data structures. A Hoon `tree` is the data structure for a binary tree. A Hoon `set` is the data structure for a set of values. A Hoon `map` is the data structure for a set of `[key value]` pairs.
1212
@@ -321,4 +321,6 @@ You can use `run` of `by` to apply a gate to each value in a map, producing a ma
321321{[p=%three q=6] [p=%one q=2] [p=%two q=4]}
322322```
323323
324−There are other map functions in the Hoon standard library we won't cover here.
324+There are other map functions in the Hoon standard library that didn't cover here.
325+
326+### [Next Lesson: Type Polymorphism](../type-polymorphism)
learn/arvo/hoon/type-checking-and-type-inference.udon+4−2
@@ -1,12 +1,12 @@
11:- :~ navhome/'/docs/'
22 navuptwo/'true'
33 next/'true'
4− sort/'24'
4+ sort/'25'
55 title/'Type Checking and Type Inference'
66 ==
77;>
88
9−# 2.4 Type Checking and Type Inference
9+# 2.5 Type Checking and Type Inference
1010
1111As the Hoon compiler compiles your Hoon code, it does a *type check* on certain expressions to make sure they are guaranteed to produce a value of the correct type. If it cannot be proved that the output value is correctly typed, the compile will fail with a `nest-fail` crash. In order to figure out what type of value is produced by a given expression, the compiler uses *type inference* on that code. In this lesson we'll cover various cases in which a type check is performed, and also how the compiler does type inference on an expression.
1212
@@ -708,3 +708,5 @@ $(a +.a, b +.b)
708708 a t.a
709709==
710710```
711+
712+### [Next Lesson: Structures and Complex Types](../structures-and-complex-types)