@@ -4,42 +4,48 @@ sort: 2
44title: Shell
55---
66
7+<div class="row">
8+<div class="col-md-8">
9+
710# `:dojo` (Shell)
811
9−The dojo is a typed functional shell.
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.
13+
14+</div>
15+</div>
1016
1117## Quickstart
1218
1319Evaluate a hoon expression:
1420
15− ~fintud-macrep:dojo> (add 2 2)
16− ~fintud-macrep:dojo> %+ add 2 2
21+ ~your-urbit:dojo> (add 2 2)
22+ ~your-urbit:dojo> %+ add 2 2
1723
1824Tall form Hoon will be prompted for:
1925
20− ~fintud-macrep:dojo> %+ add
21− ~fintud-macrep:dojo< 2
22− ~fintud-macrep:dojo< 2
26+ ~your-urbit:dojo> %+ add
27+ ~your-urbit:dojo< 2
28+ ~your-urbit:dojo< 2
2329
2430Use `=var` to save a shell variable:
2531
26− ~fintud-macrep:dojo> =foo (add 2 2)
32+ ~your-urbit:dojo> =foo (add 2 2)
2733
2834Use `=dir` to set the current working directory:
2935
30− ~fintud-macrep:dojo> =dir %/web
36+ ~your-urbit:dojo> =dir %/web
3137
3238Generators (files in `/gen`) are run with `+`:
3339
34− ~fintud-macrep:dojo> +hello 'world'
40+ ~your-urbit:dojo> +hello 'world'
3541
3642Save output to a file in `%clay` with `*`:
3743
38− ~fintud-macrep:dojo> *foo/bar/hoon 'hello world'
44+ ~your-urbit:dojo> *foo/bar/hoon 'hello world'
3945
4046Run system commands from `:hood`, like `reload`, using `|`:
4147
42− ~fintud-macrep:dojo> |reload %eyre
48+ ~your-urbit:dojo> |reload %eyre
4349
4450## Manual
4551
@@ -55,8 +61,8 @@ Sources can be chained together, but we can only produce one effect per command.
5561
5662Set any envronment variable:
5763
58− ~fintud-macrep:dojo> =foo 42
59− ~fintud-macrep:dojo> (add 2 foo)
64+ ~your-urbit:dojo> =foo 42
65+ ~your-urbit:dojo> (add 2 foo)
6066
6167 44
6268
@@ -68,7 +74,7 @@ Set any envronment variable:
6874
6975Send a `helm-hi` message to `hood`:
7076
71− ~fintud-macrep:dojo> :hood &helm-hi 'hi'
77+ ~your-urbit:dojo> :hood &helm-hi 'hi'
7278
7379App usually expect marked data, so `&` is often used here.
7480
@@ -76,7 +82,7 @@ App usually expect marked data, so `&` is often used here.
7682
7783Save a new `md` file in `web`:
7884
79− ~fintud-macrep:dojo> *%/web/foo/md '# hello'
85+ ~your-urbit:dojo> *%/web/foo/md '# hello'
8086
8187The last component of the path is expected to be the mark (or mime type).
8288
@@ -84,13 +90,13 @@ The last component of the path is expected to be the mark (or mime type).
8490
8591Download a noun to Unix with `.`:
8692
87− ~fintud-macrep:dojo> .foo/bar/baz (add 2 2)
93+ ~your-urbit:dojo> .foo/bar/baz (add 2 2)
8894
8995Which creates a file at `pier/.urb/put/foo/bar.baz`.
9096
9197This is very often used with `+solid`:
9298
93− ~fintud-macrep:dojo> .urbit/pill +solid
99+ ~your-urbit:dojo> .urbit/pill +solid
94100
95101Which outputs a new `urbit.pill` to `pier/.urb/put/urbit.pill`
96102
@@ -100,7 +106,7 @@ Which outputs a new `urbit.pill` to `pier/.urb/put/urbit.pill`
100106
101107Convert between marks using `&`:
102108
103− ~fintud-macrep:dojo> &html &md '# hello'
109+ ~your-urbit:dojo> &html &md '# hello'
104110 :: produces
105111 '<html><head></head><body><div><h1 id="-hello">hello</h1></div></body></html>'
106112
@@ -109,11 +115,11 @@ Convert between marks using `&`:
109115Use `_` to run a gate (or function):
110116
111117 :: assign an arbitrary function and pass data to it
112− ~fintud-macrep:dojo> _|=({a/@} (mul a 3)) 3
118+ ~your-urbit:dojo> _|=({a/@} (mul a 3)) 3
113119 :: produces
114120 9
115121 :: assign an arbitrary function to get the status code from an http request
116− ~fintud-macrep:dojo> _|=({p/@ud q/* r/*} p) +http://google.com
122+ ~your-urbit:dojo> _|=({p/@ud q/* r/*} p) +http://google.com
117123 :: produces
118124 301
119125
@@ -131,9 +137,9 @@ Generators are simple hoon scripts loaded from the filesystem. They live in `ge
131137
132138Create a random moon (from any planet):
133139
134− ~fintud-macrep:dojo> +moon
140+ ~your-urbit:dojo> +moon
135141 :: produces
136− "moon: ~docsun-tamtem-fintud-macrep; ticket: ~bartug-hodbyr-fognum-ralmud"
142+ "moon: ~docsun-tamtem-your-urbit; ticket: ~bartug-hodbyr-fognum-ralmud"
137143
138144### Variables
139145
@@ -145,8 +151,8 @@ Current working `%clay` desk and revision. Read / write.
145151
146152**Examples:**
147153
148− ~fintud-macrep:dojo> =dir %/web
149− ~fintud-macrep:dojo> +ls %
154+ ~your-urbit:dojo> =dir %/web
155+ ~your-urbit:dojo> +ls %
150156
151157 404/hoon docs/ dojo/hoon lib/ listen/hoon md static/md talk/ tree/main/
152158
@@ -156,11 +162,11 @@ Current set of libraries (`/lib`) in your environment. Can also be set with `/+
156162
157163**Examples:**
158164
159− ~fintud-macrep:dojo> =lib ~[[%react ~]]
160− ~fintud-macrep:dojo> :: this also works:
161− ~fintud-macrep:dojo> /+ react
162− ~fintud-macrep:dojo> :: now we can use arms from lib/react.hoon
163− ~fintud-macrep:dojo> (react-vale:react %div)
165+ ~your-urbit:dojo> =lib ~[[%react ~]]
166+ ~your-urbit:dojo> :: this also works:
167+ ~your-urbit:dojo> /+ react
168+ ~your-urbit:dojo> :: now we can use arms from lib/react.hoon
169+ ~your-urbit:dojo> (react-vale:react %div)
164170
165171#### `sur`
166172
@@ -168,11 +174,11 @@ Current set of structures (`/sur`) in your environment. Can also be set with `/
168174
169175**Examples:**
170176
171− ~fintud-macrep:dojo> =sur ~[[%sole ~]]
172− ~fintud-macrep:dojo> :: this also works:
173− ~fintud-macrep:dojo> /- sole
174− ~fintud-macrep:dojo> :: now we can use arms in sur/sole.hoon
175− ~fintud-macrep:dojo> `sole-effect:sole`[%bel ~]
177+ ~your-urbit:dojo> =sur ~[[%sole ~]]
178+ ~your-urbit:dojo> :: this also works:
179+ ~your-urbit:dojo> /- sole
180+ ~your-urbit:dojo> :: now we can use arms in sur/sole.hoon
181+ ~your-urbit:dojo> `sole-effect:sole`[%bel ~]
176182
177183#### `now`
178184
@@ -180,7 +186,7 @@ The current (128-bit `@da`) time. Read-only.
180186
181187**Example:**
182188
183− ~fintud-macrep:dojo> now
189+ ~your-urbit:dojo> now
184190 :: produces
185191 ~2016.3.21..21.10.57..429a
186192
@@ -190,9 +196,9 @@ The current urbit plot. Read-only.
190196
191197**Example:**
192198
193− ~fintud-macrep:dojo> our
199+ ~your-urbit:dojo> our
194200 :: produces
195− ~fintud-macrep
201+ ~your-urbit
196202
197203#### `eny`
198204
@@ -200,7 +206,7 @@ The current urbit plot. Read-only.
200206
201207**Example:**
202208
203− ~fintud-macrep:dojo> eny
209+ ~your-urbit:dojo> eny
204210 :: produces
205211 0v1o.m2vio.j5ieb.7tq84.5kcnp.gjn04.9gl2e.tkj5v.0oqk3.iugk8.rhu6o
206212
@@ -208,35 +214,35 @@ The current urbit plot. Read-only.
208214
209215**`+cat`** - Similar to Unix `cat`. Accepts a path.
210216
211− ~fintud-macrep:dojo> +cat %/web/md
212− ~fintud-macrep:dojo> +cat /~talsur-todres/home/2/web/notes/md
217+ ~your-urbit:dojo> +cat %/web/md
218+ ~your-urbit:dojo> +cat /~talsur-todres/home/2/web/notes/md
213219
214220**`+curl`** - Similar to Unix `curl`. Accepts a `tape`.
215221
216− ~fintud-macrep:dojo> +curl "http://nyt.com"
222+ ~your-urbit:dojo> +curl "http://nyt.com"
217223
218224**`+hello`** - Just prints the argument. Accepts a `@ta`.
219225
220− ~fintud-macrep:dojo> +hello 'mars'
226+ ~your-urbit:dojo> +hello 'mars'
221227
222228**`+ls`** - Similar to Unix `ls`. Accepts a path.
223229
224− ~fintud-macrep:dojo> +ls %/web
225− ~fintud-macrep:dojo> +ls /~talsur-todres/home/2/web/notes
230+ ~your-urbit:dojo> +ls %/web
231+ ~your-urbit:dojo> +ls /~talsur-todres/home/2/web/notes
226232
227233**`+moon`** - Generate a random moon from a planet. No arguments.
228234
229235**`+solid`** - Compile the current state of the kernel and output a noun. Usually downloaded to a file in unix. No arguments.
230236
231− ~fintud-macrep:dojo> .urbit/pill +solid
237+ ~your-urbit:dojo> .urbit/pill +solid
232238
233239**`+ticket`** - Generate a ticket for an Urbit plot. Takes an Urbit name (`@p`).
234240
235− ~fintud-macrep:dojo> +ticket ~talsur-todres-fintud-macrep
241+ ~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
236242
237243**`+tree`** - Generate a recursive directory listing. Takes a path.
238244
239− ~fintud-macrep:dojo> +tree %/web
245+ ~your-urbit:dojo> +tree %/web
240246
241247### Hood
242248
@@ -244,20 +250,20 @@ The hood is the system daemon. See `gen/hood` and `app/hood`.
244250
245251**`|hi`** - Sends a direct message. Sort of like `finger`. Accepts an urbit name (`@p`) and a string (`cord`).
246252
247− ~fintud-macrep:dojo> |hi ~doznec 'you there?'
253+ ~your-urbit:dojo> |hi ~doznec 'you there?'
248254
249255**`|link`** / **`|unlink`** - Link / unlink a remote app. Accepts an Urbit name and an app name.
250256
251− ~fintud-macrep:dojo> |link ~talsur-todres %octo
257+ ~your-urbit:dojo> |link ~talsur-todres %octo
252258
253259**`|mass`** - Prints the current memory usage of all the kernel modules. No arguments.
254260
255261**`|reload`** - Reloads a kernel module (vane) from source. Accepts any number of vane names.
256262
257− ~fintud-macrep:dojo> |reload %clay %eyre
263+ ~your-urbit:dojo> |reload %clay %eyre
258264
259265**`|reset`** - Reloads `hoon.hoon`. No arguments.
260266
261267**`|start`** - Starts an app. Accepts an app name.
262268
263− ~fintud-macrep:dojo> |start %curl
269+ ~your-urbit:dojo> |start %curl