@@ -9,7 +9,10 @@ title: Shell (:dojo)
9<div class="row">
9<div class="row">
10<div class="col-md-8">
10<div class="col-md-8">
12−The `:dojo` is the place to quickly experiment with Urbit. At first glance the `:dojo` is just a Hoon REPL. Looking a bit deeper the `:dojo` is set up to make operating on and transforming data in Urbit easy.
12+The `:dojo` is the place to quickly experiment with Urbit. On
13+the surface the `:dojo` is just a Hoon REPL. On the inside, the
14+`:dojo` is a system for operating on and transforming data in
@@ -21,7 +24,7 @@ Evaluate a hoon expression:
21 ~your-urbit:dojo> (add 2 2)
24 ~your-urbit:dojo> (add 2 2)
22 ~your-urbit:dojo> %+ add 2 2
25 ~your-urbit:dojo> %+ add 2 2
24−Tall form Hoon will be prompted for:
27+Tall form Hoon may require multiple lines:
26 ~your-urbit:dojo> %+ add
29 ~your-urbit:dojo> %+ add
27 ~your-urbit:dojo< 2
30 ~your-urbit:dojo< 2
@@ -47,6 +50,65 @@ Run system commands from `:hood`, like `reload`, using `|`:
48 ~your-urbit:dojo> |reload %eyre
51 ~your-urbit:dojo> |reload %eyre
56+**`+cat`** - Similar to Unix `cat`. Accepts a path.
58+ ~your-urbit:dojo> +cat %/web/md
59+ ~your-urbit:dojo> +cat /~talsur-todres/home/2/web/notes/md
61+**`+curl`** - Similar to Unix `curl`. Accepts a `tape`.
63+ ~your-urbit:dojo> +curl "http://nyt.com"
65+**`+hello`** - Just prints the argument. Accepts a `@ta`.
67+ ~your-urbit:dojo> +hello 'mars'
69+**`+ls`** - Similar to Unix `ls`. Accepts a path.
71+ ~your-urbit:dojo> +ls %/web
72+ ~your-urbit:dojo> +ls /~talsur-todres/home/2/web/notes
74+**`+moon`** - Generate a random moon from a planet. No arguments.
76+**`+solid`** - Compile the current state of the kernel and output a noun. Usually downloaded to a file in unix. No arguments.
78+ ~your-urbit:dojo> .urbit/pill +solid
80+**`+ticket`** - Generate a ticket for an Urbit plot. Takes an Urbit name (`@p`).
82+ ~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
84+**`+tree`** - Generate a recursive directory listing. Takes a path.
86+ ~your-urbit:dojo> +tree %/web
90+The hood is the system daemon. See `gen/hood` and `app/hood`.
92+**`|hi`** - Sends a direct message. Sort of like Unix `write`. Accepts an urbit name (`@p`) and a string (`cord`).
94+ ~your-urbit:dojo> |hi ~doznec 'you there?'
96+**`|link`** / **`|unlink`** - Link / unlink a remote app. Accepts an Urbit name and an app name.
98+ ~your-urbit:dojo> |link ~talsur-todres %octo
100+**`|mass`** - Prints the current memory usage of all the kernel modules. No arguments.
102+**`|reload`** - Reloads a kernel module (vane) from source. Accepts any number of vane names.
104+ ~your-urbit:dojo> |reload %clay %eyre
106+**`|reset`** - Reloads `hoon.hoon`. No arguments.
108+**`|start`** - Starts an app. Accepts an app name.
110+ ~your-urbit:dojo> |start %curl
52<h3 class="first child">Sources and sinks</h3>
114<h3 class="first child">Sources and sinks</h3>
@@ -131,6 +193,9 @@ Use `_` to run a gate (or function):
132`-http[s]://example.com &json [%s 'hi']` - sends a PUT request with the JSON `"hi"` in the body.
194`-http[s]://example.com &json [%s 'hi']` - sends a PUT request with the JSON `"hi"` in the body.
196+Note that the first of these is a source while the last two are
134#### `+` - Generators
199#### `+` - Generators
136Generators are simple hoon scripts loaded from the filesystem. They live in `gen/`.
201Generators are simple hoon scripts loaded from the filesystem. They live in `gen/`.
@@ -209,61 +274,3 @@ The current urbit plot. Read-only.
209 ~your-urbit:dojo> eny
274 ~your-urbit:dojo> eny
210 :: produces
275 :: produces
211 0v1o.m2vio.j5ieb.7tq84.5kcnp.gjn04.9gl2e.tkj5v.0oqk3.iugk8.rhu6o
276 0v1o.m2vio.j5ieb.7tq84.5kcnp.gjn04.9gl2e.tkj5v.0oqk3.iugk8.rhu6o
215−**`+cat`** - Similar to Unix `cat`. Accepts a path.
217− ~your-urbit:dojo> +cat %/web/md
218− ~your-urbit:dojo> +cat /~talsur-todres/home/2/web/notes/md
220−**`+curl`** - Similar to Unix `curl`. Accepts a `tape`.
222− ~your-urbit:dojo> +curl "http://nyt.com"
224−**`+hello`** - Just prints the argument. Accepts a `@ta`.
226− ~your-urbit:dojo> +hello 'mars'
228−**`+ls`** - Similar to Unix `ls`. Accepts a path.
230− ~your-urbit:dojo> +ls %/web
231− ~your-urbit:dojo> +ls /~talsur-todres/home/2/web/notes
233−**`+moon`** - Generate a random moon from a planet. No arguments.
235−**`+solid`** - Compile the current state of the kernel and output a noun. Usually downloaded to a file in unix. No arguments.
237− ~your-urbit:dojo> .urbit/pill +solid
239−**`+ticket`** - Generate a ticket for an Urbit plot. Takes an Urbit name (`@p`).
241− ~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
243−**`+tree`** - Generate a recursive directory listing. Takes a path.
245− ~your-urbit:dojo> +tree %/web
249−The hood is the system daemon. See `gen/hood` and `app/hood`.
251−**`|hi`** - Sends a direct message. Sort of like Unix `write`. Accepts an urbit name (`@p`) and a string (`cord`).
253− ~your-urbit:dojo> |hi ~doznec 'you there?'
255−**`|link`** / **`|unlink`** - Link / unlink a remote app. Accepts an Urbit name and an app name.
257− ~your-urbit:dojo> |link ~talsur-todres %octo
259−**`|mass`** - Prints the current memory usage of all the kernel modules. No arguments.
261−**`|reload`** - Reloads a kernel module (vane) from source. Accepts any number of vane names.
263− ~your-urbit:dojo> |reload %clay %eyre
265−**`|reset`** - Reloads `hoon.hoon`. No arguments.
267−**`|start`** - Starts an app. Accepts an app name.
269− ~your-urbit:dojo> |start %curl