on master help sign in
add missing steps for tutorial
commit4c71b1ed577e7f0277835b4d17b54ec6f065efa0 authorMikhail Vaysman <Vaysman@users.noreply.github.com> dateMon 30 Sep 2019, 21:52 (7 years ago) parent91ef98f
2 files changed+2−2
learn/hoon/hoon-tutorial/list-of-numbers.md+1−1 learn/hoon/hoon-tutorial/setup.md+1−1
learn/hoon/hoon-tutorial/list-of-numbers.md+1−1
@@ -18,7 +18,7 @@ Below is a simple Hoon program that takes a single number `n` from the user as i
1818$(count (add 1 count)) :: 8
1919```
2020
21−As we mentioned in the previous lesson, the easiest way to use such a program is to run it as a _generator_. Saving a file in the `/home/gen` directory of your ship allows you to run it from your ship's Dojo (command line) as a generator. Save the above code there as `list.hoon`. Now you can run it in the Dojo as so:
21+As we mentioned in the previous lesson, the easiest way to use such a program is to run it as a _generator_. Mount your desk `|mount %` (if you didn't do it before), saving a file in the `/home/gen` directory of your ship and commiting these changes `|commit %home` allows you to run it from your ship's Dojo (command line) as a generator. Save the above code there as `list.hoon`. Now you can run it in the Dojo as so:
2222
2323`~your-ship:> +list 5`
2424
learn/hoon/hoon-tutorial/setup.md+1−1
@@ -65,7 +65,7 @@ You asked dojo to evaluate `17` and it echoed the number back at you. This valu
6565
6666Generators are the most straightforward way to write Hoon programs. They are a concept in Arvo, and involve saving Hoon code in a `.hoon` text file. While they aren't strictly part of the Hoon language, we'll be dealing with generators throughout this tutorial.
6767
68−The simplest type of generator is the **naked generator**. All naked generators are `gates`: functions that take an argument and produce an output. So, to create a generator, all you need to do is write a `gate` and put it into a file in the `/home/gen` directory of your ship as a `.hoon` file. After this, you need to run `|commit %home` in dojo and the new file will be recognized by your ship. To run a generator named `mygen.hoon`, you would type `+mygen <argument>` in your ship's Dojo.
68+The simplest type of generator is the **naked generator**. All naked generators are `gates`: functions that take an argument and produce an output. Before creating generator you need to mount your `desk` to Unix, for So, to create a generator, all you need to do is write a `gate` and put it into a file in the `/home/gen` directory of your ship as a `.hoon` file. After this, you need to run `|commit %home` in dojo and the new file will be recognized by your ship. To run a generator named `mygen.hoon`, you would type `+mygen <argument>` in your ship's Dojo.
6969
7070If this doesn't make sense yet, that's okay. In the [next lesson](../list-of-numbers), we will walk you through an example `gate` that is run as a generator.
7171