on master help sign in
structures by category rather than by system component
commitd41a2f42856a638684fa326c2722555d0f050c5b authorRobert <robert@Roberts-MacBook-Pro.local> dateWed 9 Oct 2019, 17:14 (7 years ago) parent39bc0ab
61 files changed+9−3576
azimuth/_index.md−5 azimuth/creating-an-invite-pool.md−41 azimuth/glossary.md−118 concepts/azimuth.md+1−19 concepts/community-tutorials.md−15 concepts/galaxies-stars-and-planets.md−34 getting-started/_index.md−37 getting-started/booting-a-ship.md−108 getting-started/contributing.md−21 getting-started/installing-urbit.md−74 getting-started/using-bridge.md−70 learn/_index.md+3−4 learn/arvo/hall.md−1335 learn/azimuth.md−12 learn/hoon/hoon-tutorial/_index.md → learn/hoon-tutorial/_index.md+3−1 learn/hoon/hoon-tutorial/ackermann.md → learn/hoon-tutorial/ackermann.md learn/hoon/hoon-tutorial/arms-and-cores.md → learn/hoon-tutorial/arms-and-cores.md learn/hoon/hoon-tutorial/atoms-auras-and-simple-cell-types.md → learn/hoon-tutorial/atoms-auras-and-simple-cell-types.md learn/hoon/hoon-tutorial/bank-account.md → learn/hoon-tutorial/bank-account.md learn/hoon/hoon-tutorial/caesar.md → learn/hoon-tutorial/caesar.md learn/hoon/hoon-tutorial/conditionals.md → learn/hoon-tutorial/conditionals.md learn/hoon/hoon-tutorial/doors.md → learn/hoon-tutorial/doors.md learn/hoon/hoon-tutorial/egg-timer.md → learn/hoon-tutorial/egg-timer.md learn/hoon/hoon-tutorial/fibonacci.md → learn/hoon-tutorial/fibonacci.md learn/hoon/hoon-tutorial/gall.md → learn/hoon-tutorial/gall.md learn/hoon/hoon-tutorial/gates.md → learn/hoon-tutorial/gates.md learn/hoon/hoon-tutorial/generators.md → learn/hoon-tutorial/generators.md learn/hoon/hoon-tutorial/hoon-syntax.md → learn/hoon-tutorial/hoon-syntax.md learn/hoon/hoon-tutorial/iron-polymorphism.md → learn/hoon-tutorial/iron-polymorphism.md learn/hoon/hoon-tutorial/lead-polymorphism.md → learn/hoon-tutorial/lead-polymorphism.md learn/hoon/hoon-tutorial/libraries.md → learn/hoon-tutorial/libraries.md learn/hoon/hoon-tutorial/list-of-numbers.md → learn/hoon-tutorial/list-of-numbers.md learn/hoon/hoon-tutorial/lists.md → learn/hoon-tutorial/lists.md learn/hoon/hoon-tutorial/molds.md → learn/hoon-tutorial/molds.md learn/hoon/hoon-tutorial/nouns.md → learn/hoon-tutorial/nouns.md learn/hoon/hoon-tutorial/recursion.md → learn/hoon-tutorial/recursion.md learn/hoon/hoon-tutorial/setup.md → learn/hoon-tutorial/setup.md learn/hoon/hoon-tutorial/structures-and-complex-types.md → learn/hoon-tutorial/structures-and-complex-types.md learn/hoon/style.md → learn/hoon-tutorial/style.md+1−1 learn/hoon/hoon-tutorial/the-subject-and-its-legs.md → learn/hoon-tutorial/the-subject-and-its-legs.md learn/hoon/hoon-tutorial/trees-sets-and-maps.md → learn/hoon-tutorial/trees-sets-and-maps.md learn/hoon/hoon-tutorial/type-checking-and-type-inference.md → learn/hoon-tutorial/type-checking-and-type-inference.md learn/hoon/hoon-tutorial/type-polymorphism.md → learn/hoon-tutorial/type-polymorphism.md learn/hoon/workbook/_index.md → learn/hoon-tutorial/workbook/_index.md learn/hoon/workbook/bomb.md → learn/hoon-tutorial/workbook/bomb.md learn/hoon/workbook/digits.md → learn/hoon-tutorial/workbook/digits.md learn/hoon/workbook/eightball.md → learn/hoon-tutorial/workbook/eightball.md learn/hoon/workbook/traffic-light.md → learn/hoon-tutorial/workbook/traffic-light.md learn/hoon/_index.md−24 using/sail-and-udon.md → learn/sail-and-udon.md using/ship-troubleshooting.md → learn/ship-troubleshooting.md reference/arvo-glossary.md+1−1 using/_index.md−18 using/admin.md−213 using/arvo-network-dns.md−52 using/creating-a-comet.md−29 using/creating-a-development-ship.md−69 using/filesystem.md−471 using/messaging.md−315 using/operating-a-star.md−49 using/shell.md−440
azimuth/_index.mddeleted−5
@@ -1,5 +0,0 @@
1−+++
2−title = "Azimuth"
3−weight = 1
4−template = "sections/docs/chapters.html"
5−+++
azimuth/creating-an-invite-pool.mddeleted−41
@@ -1,41 +0,0 @@
1−+++
2−title = "Creating an Invite Pool"
3−weight = 3
4−template = "doc.html"
5−+++
6−
7−If you’re a star owner, you have the ability to create **invite pools**. These invite pools let you give your friends a piece of the network in the form of planets. This document will give you an explanation of how to create an invite pool and how to share it with your friends using our tool [Bridge](bridge.urbit.org).
8−
9−## Anatomy of an Invite Pool
10−
11−An invite pool is a set of planet invites that can be distributed via email; each invite is worth one planet when redeemed. An invite pool can be as big as you’d like, providing that you have enough planets left to spawn. All invite pools must be created by a star, but they must be given to a planet. If you’re interested in how this works technically, take a look at the [DelegatedSending.sol contract](https://github.com/urbit/azimuth/blob/master/contracts/DelegatedSending.sol).
12−
13−Keep in mind that all planets will have access to the invite pool until the invite pool expires.
14−
15−For example: As `~marzod`, I spawn `~wicdev-wisryt` and give it an invite pool of 100 planets. `~wicdev-wisryt` can now send an invite to a friend at galen@tlon.io. When Galen claims his planet (`~ravmel-ropdyl`), `~ravmel-ropdyl` can now invite his friend — or 99 of them.
16−
17−## How to Invite Friends
18−
19−Giving your friends a piece of Urbit only takes a few minutes: spawn a planet, send it an invite pool, and use that planet to email an invite to a friend (or friends)
20−
21−1. Log into Bridge using your ownership address for your star.
22−
23−2. Go to Admin > Edit Permissions and copy your ownership address.
24−
25−![](https://storage.cloud.google.com/media.urbit.org/docs/invite-pool/browser-settings.png)
26−
27−3. Spawn a planet to the same ownership address as your star (for the sake of convenience).
28−
29−4. Click “Manage Invite Pools” to assign an invite pool to the planet you just spawned. You may receive a notification that you need to assign your spawn proxy to the address of the Delegated Sending contract. This is so that the contract can send invites on your behalf when the recipient claims them.
30−
31−![](https://storage.cloud.google.com/media.urbit.org/docs/invite-pool/browser-point.png)
32−
33−5. Enter the planet name and the number of invites you’d like to assign them.
34−
35−![](https://storage.cloud.google.com/media.urbit.org/docs/invite-pool/browser-create-pool.png)
36−
37−The planet you created should be accessible from the Bridge homepage. Click the Planet, then “Invite” to create invites for your friends.
38−
39−![](https://storage.cloud.google.com/media.urbit.org/docs/invite-pool/browser-invite.png)
40−
41−Your friend will get an email shortly with your gift of an identity for life!
azimuth/glossary.mddeleted−118
@@ -1,118 +0,0 @@
1−+++
2−title = "Azimuth Glossary"
3−weight = 4
4−template = "doc.html"
5−aliases = ["/docs/reference/azimuth-glossary/"]
6−+++
7−
8−
9−Azimuth is a general-purpose public-key infrastructure (PKI) on the Ethereum blockchain, used as a platform for Urbit identities. You need an Azimuth identity to use the Arvo network. All identity-related operations are governed at this layer For more information, see the [Azimuth documentation](azimuth).
10−
11−This glossary is intended to familiarize you with Azimuth-related terminology. To brush up on terminology related to Arvo, check out the [Arvo glossary](../arvo/glossary).
12−
13−### Azimuth identity
14−
15−An Azimuth identity, previously known as a _point_, is a non-fungible Ethereum token ([ERC-271](https://medium.com/@brenn.a.hill/noobs-guide-to-understanding-erc-20-vs-erc-721-tokens-d7f5657a4ee7)) that represents a digital identity. The ERC-721 standard, having been made specifically to provide a smart-contract interface for non-fungible assets, allows Azimuth identity ownership to be take advantage of existing third-party tools and systems.
16−
17−#### Planet
18−
19−An Azimuth identity to be used as a personal identity. Issued by stars.
20−
21−#### Star
22−
23−An Azimuth identity meant to be used as network infrastructure. Issued by galaxies, issues planets.
24−
25−#### Galaxy
26−
27−An Azimuth identity meant to be used as top-level network infrastructure, with governance powers. Issues stars.
28−
29−### Bridge
30−
31−A tool that's the primary way to interact with Azimuth and manage your identities. It can be accessed at bridge.azimuth.network.
32−
33−### Master Ticket
34−
35−Think of your master ticket as a very high-value password. The master ticket is the secret code from which all of your other secrets are derived. Technically, your master ticket is seed entropy. You should never share it with anyone, and store it very securely. This ticket can derive all of your other keys: your ownership key and all of the related proxies.
36−
37−### Multipass
38−
39−Multipass is a planned feature of an Azimuth point that can be used as a universal, real-world identity. It will be able to hold money and have packets routed to it. See this [blog post](https://urbit.org/posts/azimuth-as-multipass/) for more information.
40−
41−#### Network Explorer
42−
43−A Bridge-based interface for browsing Azimuth identities. You can do things such as see which ships are on which invite pools, and much more.
44−
45−### Ownership Address
46−
47−The Ethereum address that owns a point. As the owner, it can perform all possible operations for that point.
48−
49−### Invite Pool
50−
51−Also called an _invite tree_. A host starts a pool and all individuals invited to it have the ability to share remaining, unclaimed invites with others; when an invite is sent to someone, they become a full member of the invite pool and themselves have the ability to invite. So membership of the invite pool grows like a tree.
52−
53−#### Pool Host
54−
55−The ship that generates the invite pool. It's most often a star.
56−
57−#### Guest List
58−
59−The names of planets invited to the same invite pool, as viewed by the pool host.
60−
61−#### Invite Cohort
62−
63−The names of planets invited to the same invite pool, as viewed by the pool's member's.
64−
65−#### Sending Invites
66−
67−The action of giving someone a planet using Bridge.
68−
69−#### Code
70−
71−Activation code from an email that allows you to claim an invite
72−
73−#### Birth Time
74−
75−When a ship is claimed from an invite
76−
77−### Passport
78−
79−The Passport is a folder of files one downloads that contains the secrets of your point and should be stored securely. As long as you own the passport, you own the point. The master ticket is stored in the Passport.
80−
81−### Proxy Address
82−
83−An Ethereum address that's allowed to perform a specific subset of the operations the owner of the point can perform. Useful for allowing some control over a point while keeping its ownership address in cold storage. Below, the specific kinds of proxy addresses are listed.
84−
85−#### Management Proxy Address
86−
87−An Ethereum address used for managing a point. This means it can only configure public (aka networking) keys, and perform sponsorship-related operations (requesting sponsor changes & approving/rejecting those).
88−Use cases:
89−- Keeping this handy so you can put the ownership/master ticket in a super safe place
90−- Allowing someone to manage your ship (by setting/deriving networking keys, managing sponsorship)
91−- Allowing a smart contract to manage sponsorship ops (ie star service smart contract)
92−
93−#### Network Keys
94−
95−Your public key contains Authentication and Encryption addresses, and also have Revision, Continuity Era, and Crypto Suite versions. Resetting Network Keys increases the revision number on the key. A main use case would be if your Network Keys were compromised, so you can use your Management Address to re-derive your Network Keys to another revision.
96−
97−#### Spawn Proxy Address
98−
99−An Ethereum address used for spawning children of a point. It can only perform the spawn operation (creating child points) and can do nothing else.
100−
101−Use cases:
102−- Keeping this handy so you can put the ownership/master ticket in a super safe place
103−- Allowing a smart contract to spawn on your behalf (delegated sending/invites, planet sale)
104−
105−#### Voting Proxy Address
106−An Ethereum address used for voting as a point.
107−
108−Use cases:
109−- Keeping this handy so you can put the ownership/master ticket in a super safe place
110−- Delegating your voting rights to someone else
111−
112−#### Transfer Proxy Address
113−
114−An Ethereum address that's allowed to transfer ownership of a point. Generally not used outside of transfers-in-progress. Using a transfer proxy allows one to give the recipient the power to take ownership of a point, rather than being given it. This "control check" is a strong safety mechanism commonly used in many (Ethereum-based) cryptographic assets.
115−
116−### Sponsorship
117−
118−Azimuth registers hierarchical dependence of identities on other identities; planets depend on stars, and stars depend on galaxies. Applications that use Azimuth can use this to set up things like network topology. In Arvo's case, the sponsor promises to provide software updates and peer discovery.
concepts/azimuth.md+1−19
@@ -20,24 +20,6 @@ These otherwise-parallel systems meet when you want to connect to the Arvo netwo
2020
2121A metaphor might help illustrate the relationship between these two systems: the Arvo network is the neighborhood that you live in; Azimuth is the bank vault that stores the deed to your house.
2222
23−## Why Urbit Uses a Blockchain
24−
25−The Arvo network is composed of personal servers: instances of the Arvo operating system, called ships, that communicate as peers.
26−
27−Every ship has an associated secure identity, called a point, that it needs to connect to the network. Your point is your name and your network address. Each point has associated authentication and encryption keys for networking. Think of a point as an IP address, a domain name, and a PGP key-pair.
28−
29−There are a limited number of points and, as you might expect, scarcity gives points value. This means that bad actors – spammers, scammers, and malware-spreaders – can be made economically unviable. Points being immutable allows for reputation systems to be built on top, keeping the network friendly and giving users information to help them decide who to treat as a trusted peer.
30−
31−At the user level, having one identity for your digital life means that all the services that you trust recognize you. You no longer need to worry about managing dozens of different logins. When you're using Arvo, everything you do is "verified" in the sense that it links back to your point.
32−
33−But wait! We need some way to secure these identities. To that end, we have built the Azimuth identity layer on the Ethereum blockchain to determine which PKI. As mentioned above, it's separate from and parallel to the Arvo network.
34−
35−In theory, our ecosystem doesn't need a blockchain, because Urbit identities are more like real estate than currency: they change hands slowly. A low-friction, zero-trust solution to the double-spend problem isn't an economic necessity for transactions such as ours. So we could have the Arvo network run its own key-signing system. But, since Azimuth identities are valuable, you don't want to put them in an self-hosted PKI that isn't generally recognized as secure. Arvo is still young, we'd prefer to use an existing system for people to secure their property.
36−
37−Moving the Urbit land registry to Ethereum is an easy and obvious solution to this problem. We chose Ethereum over Bitcoin because the former is built for computation and the latter is not. We need a computational blockchain to enforce the specific rules of the Urbit identity registry.
38−
39−For more background on the decision to use the Ethereum blockchain, check out [these](https://urbit.org/posts/essays/urbit-and-the-blockchain/) [two](https://urbit.org/posts/essays/bootstrapping-urbit-from-ethereum/) posts.
40−
4123## The Urbit HD Wallet
4224
4325Owners of Azimuth points need safeguards that allow for the use of Urbit without jeopardizing cryptographic ownership of their assets. Toward this end, we created the **Urbit Hierarchical Deterministic (HD) Wallet** for the storage of points. The Urbit HD Wallet is not one key-pair, but a system of related key-pairs that each have distinct powers, from setting networking keys for communicating in the Arvo network to transferring ownership of points.
@@ -89,5 +71,5 @@ Points, and all of their blockchain operations, are governed by the Ecliptic.
8971The Ecliptic is an Ethereum smart-contract that governs point state and the
9072ownership, spawn, management, and voting rights affiliated with your points.
9173
92−For the technical implementation details, take a look at Azimuth's
74+For the technical implementation details, take a look at Azimuth's
9375[Github repository](https://github.com/urbit/azimuth).
concepts/community-tutorials.mddeleted−15
@@ -1,15 +0,0 @@
1−+++
2−title = "Community Tutorials"
3−weight = 9
4−template = "doc.html"
5−description = "A collection of unofficial but useful Urbit learning resources."
6−+++
7−Here are some tutorials written by members of the Urbit community. Some are a little outdated, but they may still prove useful.
8−
9−- [Generators](https://github.com/joemfb/mardev/tree/master/docs/gen) by `~master-morzod`
10−- [Urbit by Doing](https://github.com/Fang-/Urbit-By-Doing) by `~palfun-foslup`
11−- [Learning Hoon](https://github.com/knubie/learning-hoon) by `@knubie`
12−- [A Nock Interpreter](https://jtobin.io/nock) by `~nidsut-tomdun`
13−- [Basic Hoonery](https://jtobin.io/basic-hoonery) by `~nidsut-tomdun`
14−
15−If you want to add something to the list, [shoot us an email](mailto:support@urbit.org) or make a pull request in the [docs repository](https://github.com/urbit/docs).
concepts/galaxies-stars-and-planets.mddeleted−34
@@ -1,34 +0,0 @@
1−+++
2−title = "Galaxies, Stars, and Planets"
3−weight = 7
4−template = "doc.html"
5−description = "An explanation of the Urbit address-space hierarchy. "
6−+++
7−
8−The current internet has no consistent system of identity. There are only quasi-identities such as IP addresses, Google accounts and email addresses, each able to be assumed and abandoned without much trouble. The result is a hostile social experience, since bad actors -- spammers, scammers, malware-spreaders, and harassers -- have an inexhaustible supply of places to hide.
9−
10−That's why we built a system for persistent identity called [Azimuth](@/docs/concepts/azimuth.md). Azimuth identities are called _points_, and you need one to use the Arvo network. Points are secure, since they are owned and controlled with key-pair the Ethereum blockchain, which Azimuth is built on top of.
11−
12−An Azimuth point is a pronounceable string like `~firbyr-napbes`. It means nothing, but it's easy to remember and say out loud. `~firbyr-napbes` is actually just a 32-bit number (`3.237.967.392`, to be exact) that we turn into a human-memorable string.
13−
14−Points come in three classes: **galaxies**, **stars**, and **planets**. You can tell what class a point is in by how long its name is. The address space grows like a family tree. Galaxies are 8-bit and have names like `~mul`. Galaxies can issue 16-bit stars (`~dacpyl`), which can themselves issue 32-bit planets (`~laptel-holfur`).
15−
16−Planets are intended for everyday use by an adult human, and there is a maximum of about 4.3 billion of them (2 to the 32nd power). Stars and galaxies, on the other hand, are meant to act as network infrastructure: in the Arvo network they provide P2P routing and distribute software updates.
17−
18−```
19− Size Name Parent Object Example
20− ----- ------ ------ ------ -------
21− 2^8 galaxy ~ supernode ~zod
22− 2^16 star galaxy supernode ~dozbud
23− 2^32 planet star user ~tasfyn-partyv
24− 2^64 moon planet device ~sigsam-nimbot-tasfyn-partyv
25− 2^128 comet ~ bot ~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex
26−```
27−
28−## Moons and Comets
29−
30−In addition to these three classes of Azimuth points, there two other kinds of Urbit identities, but they do _not_ use Azimuth.
31−
32−**Moons** are 64 bits, are issued by planets, and have names like `~doznec-salfun-naptul-habrys`. Moons are meant for connected devices: phones, smart TVs, digital thermostats. Moons are not independent, but are subordinated to their parent planet. To create new moon under your planet, follow [this guide](/docs/using/admin#moons).
33−
34−**Comets** are 128-bit points with no parents that can be launched by anyone. They are meant for bots. Being disposable and essentially unlimited, they will likely not be trusted by the others on the Arvo network. They have enormous names, like `~racmus-mollen-fallyt-linpex--watres-sibbur-modlux-rinmex`.
getting-started/_index.mddeleted−37
@@ -1,37 +0,0 @@
1−+++
2−title = "Getting Started"
3−weight = 1
4−sort_by = "weight"
5−template = "sections/docs/chapters.html"
6−+++
7−
8−Welcome to Urbit, a personal server. Urbit isn't ready for serious use yet, but it's available to try out. If you have an Azimuth point, you can follow this step-by-step guide to get your point's _keyfile_, which you need to boot your ship. Then you can install Urbit and join the community.
9−
10−If you don't have an Azimuth point, you can always [create a comet](@/docs/using/creating-a-comet.md) to join the network before committing to a point, or [create a development ship](@/docs/using/creating-a-development-ship.md) and start using Urbit offline first.
11−
12−### [Step 1: Using Bridge](@/docs/getting-started/using-bridge.md)
13−
14−In order to join the Urbit network, you need an Azimuth point, which acts like an identity and a password for your Urbit ship. Bridge is our client for managing Azimuth points, and lets you get your keyfile and claim the point.
15−
16−### [Step 2: Installing Urbit](@/docs/getting-started/installing-urbit.md)
17−
18−The Urbit software is a command-line application that runs the Arvo operating system. This guide walks you through the installation process.
19−
20−### [Step 3: Booting a Ship](@/docs/getting-started/booting-a-ship.md)
21−
22−This guide teaches you how to get your ship operational and onto the Arvo network.
23−
24−### [Optional: Contributing](contributing)
25−
26−This document will get your started with contributing code or contributing to the community.
27−
28−## Terminology
29−
30−You've already encountered some new terminology on this page, and you'll encounter more as you proceed with this guide. Let's go over the basics:
31−
32−- Arvo is the name of the Urbit operating system.
33−- An instance of the Arvo operating system is called a _ship_.
34−- Ships communicate with one another over "the Arvo network."
35−- Azimuth is an Ethereum-based PKI used to give each ship a unique identity on the Arvo network.
36−- An Azimuth identity is called a _point_. You'll need a point to use the Arvo network.
37−- Urbit refers to the project as a whole, including Arvo, Azimuth, and other system components.
getting-started/booting-a-ship.mddeleted−108
@@ -1,108 +0,0 @@
1−+++
2−title = "Booting a Ship"
3−weight = 3
4−template = "doc.html"
5−+++
6−Now the rubber meets the road. You'll be booting your ship with the keyfile that you [downloaded from Bridge](@/docs/concepts/azimuth.md).
7−
8−Note that this document is only for booting a ship that uses the live Arvo network. If you just want to create an unnetworked ship for development purposes, read [this guide](@/docs/using/creating-a-development-ship.md) instead.
9−
10−## Step 1: Find Your Point's Name
11−
12−This will look something like `~lodleb-ritrul`. You can see the name of your point(s) when you log into your wallet using the Bridge client.
13−
14−![](https://media.urbit.org/site/bridge-0.png)
15−
16−## Step 2: Find the path to your keyfile
17−
18−Find the absolute path to the keyfile that you downloaded from Bridge. Copy it.
19−
20−## Step 3: Run the boot command
21−
22−Type `cd` in your terminal to return to your home directory. If you want to
23−store your ship somewhere besides your home directory, change the terminal's
24−working directory to the desired directory.
25−
26−Run the command below, except with `sample-planet` replaced by the name of your
27−Urbit identity, and `path/to/my-planet.key` replaced with the path to your
28−keyfile:
29−
30−```
31−./urbit -w sample-planet -k path/to/my-planet.key
32−```
33−
34−Or, if you'd prefer to copy your key in, you can run:
35−
36−```
37−./urbit -w sample-planet -G rAnDoMkEy
38−```
39−
40−Either command will create a directory called `sample-planet/` and begin
41−building your ship. It may take a few minutes.
42−
43−When your ship is finished booting, you will see the `~sample-planet:dojo>`
44−prompt. At that point, you should permanently erase your keyfile from your
45−machine.
46−
47−## Basic Operations
48−
49−Welcome to your ship! There's a few things you should do to become oriented.
50−
51−### The Dojo
52−
53−Let's try out the Dojo, the Arvo command line and Hoon REPL:
54−
55−```
56−~sample-planet:dojo> (add 2 2)
57−```
58−
59−Should produce:
60−
61−```
62−> (add 2 2)
63−4
64−```
65−
66−Good.
67−
68−### Mounting
69−
70−Your ship's filesystem being "mounted" means that its filesystem can be interacted with through Unix. This makes things much easier for you.
71−
72−The Arvo filesystem isn't mounted to Unix by default. Switch to the Dojo prompt and run:
73−
74−```
75−~sample-planet:dojo> |mount %
76−```
77−
78−This should produce:
79−
80−```
81−> |mount %
82−>=
83−```
84−
85−which indicates that the command was processed.
86−
87−`|mount %` will cause a `home/` directory to appear inside your _pier_ folder in Unix (the "pier" is our shorthand for the directory whose name corresponds to your Azimuth point). Once you've changed a file, `|commit %home` to synchronize changes to your pier.
88−
89−**Note:** Do not delete your pier. Doing so will make your ship unusable, because deleted piers normally cannot be recovered. The exception is during a network breach (a reset) -- in such a rare event, you must delete your pier to update your ship to the new era, and ships with previously deleted piers can be recovered.
90−
91−### Shutting Down and Restarting
92−
93−You can toggle between the Dojo and Talk (chat) prompts with `ctrl-x`. You can turn your ship off with `ctrl-d` from the Talk or Dojo prompts.
94−
95−To restart your ship, simply pass the name of your pier:
96−
97−```
98−./urbit some-planet
99−```
100−
101−### Using Landscape
102−
103−Landscape is the Urbit web interface, and it's the best way to interact with your ship. Chrome and Brave are the recommended browsers for using Landscape. To get onto Landscape:
104−
105−1. Start your ship. In the boot messages, look for a line that says something like `http: live (insecure, public) on 80`. The number given is the port that your ship is using.
106−2. If the port given is 80, simply type `localhost` into your browser's address bar. If the given port is a different number, such as `8080`, you would type `localhost:8080`.
107−3. Type `+code` into your ship's Dojo. Copy-paste the returned code into the field asking for it.
108−4. You're in! Now you can explore apps such as Chat for messages, Publish for blogging, and Weather.
getting-started/contributing.mddeleted−21
@@ -1,21 +0,0 @@
1−+++
2−title = "Contributing"
3−weight = 5
4−template = "doc.html"
5−description = "A guide to getting involved with the Urbit project."
6−+++
7−
8−We welcome submissions for improving our [code](https://github.com/urbit/urbit/) and [documentation](https://github.com/urbit/docs/) alike. If you're looking to get involved, there are a few things you can do to get started right away:
9−
10−- Join the [urbit-dev](https://groups.google.com/a/urbit.org/forum/#!forum/dev) mailing list
11−- [Apply to Hoon School](https://urbit.org/hoonschool/). We run a beginner course and an advanced course to teach the Hoon programming language and Urbit application development. Both courses are free, online, and asynchronous.
12−- Check out the "good contributor issues" tag in the [urbit](https://github.com/urbit/urbit/labels/good%20contributor%20issue) and [arvo](https://github.com/urbit/arvo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+contributor+issue%22) Github repositories.
13−- Reach out to [support@urbit.org](mailto:support@urbit.org) to say hi and ask any questions you might have. We're always happy to try to point you in the right direction.
14−
15−Many contributors start by contributing to the [documentation](https://github.com/urbit/docs), [urbit.org](https://github.com/urbit/urbit.org), or [bridge](https://github.com/urbit/bridge) repositories. If you're not yet comfortable with Hoon, we recommend starting there.
16−
17−If you're just getting set up to work on the Urbit or Arvo code base for the first time, see our [Getting Started](@/docs/getting-started/_index.md) guide, then have a look at [CONTRIBUTING.md](https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md) in the Urbit repository.
18−
19−## Code style
20−
21−Before contributing Hoon code, you should familiarize yourself with the [Hoon style guide](@/docs/learn/hoon/style.md). For a good example of idiomatic Hoon, see [Ford](https://github.com/urbit/urbit/blob/master/pkg/arvo/sys/vane/ford.hoon).
getting-started/installing-urbit.mddeleted−74
@@ -1,74 +0,0 @@
1−+++
2−title = "Installing Urbit"
3−weight = 2
4−template = "doc.html"
5−+++
6−
7−Arvo runs nicely on a Unix-like operating system – Ubuntu, Fedora, macOS, and FreeBSD, for example. If you're using Windows, you'll need to get one of the aforementioned systems. Don't worry: most of them are free. Let's get it onto your machine.
8−
9−But first, some terminology:
10−
11−- `vere` or `urbit`: the interpreter that runs when you run a command like `urbit` or `/bin/urbit` in your command line
12−- `arvo`: the deterministic OS that lives in a directory whose name matches your Azimuth point, ie `~famreb-todmec` lives in `/famreb-todmec`
13−
14−We have different installation instructions for different platforms. To install and run Arvo, run the commands that are listed for your operating system.
15−
16−On any platform, you can check your Arvo installation by running the `urbit` command. Installation was successful if you get a block of output that begins with the line below:
17−
18−```
19−Urbit: a personal server operating function
20−```
21−
22−## Instructions
23−
24−### macOS (Darwin)
25−
26−We provide static binaries for macOS. You can grab the latest stable release as follows:
27−
28−```
29−curl -O https://bootstrap.urbit.org/urbit-darwin-v0.8.2.tgz
30−tar xzf urbit-darwin-v0.8.2.tgz
31−./urbit
32−```
33−
34−### Linux (64-bit)
35−
36−We also provide static binaries for 64-bit Linux distributions (Ubuntu, Debian, Fedora, Arch, etc.). You can get the latest stable release similarly:
37−
38−```
39−curl -O https://bootstrap.urbit.org/urbit-linux64-v0.8.2.tgz
40−tar xzf urbit-linux64-v0.8.2.tgz
41−./urbit
42−```
43−
44−To access your Urbit via HTTP on port 80 on Ubuntu, you may need to run the following:
45−
46−```
47−sudo apt-get install libcap2-bin
48−sudo setcap 'cap_net_bind_service=+ep' /path/to/urbit
49−```
50−
51−### Other
52−
53−We maintain a [Nix](https://nixos.org/nix) derivation for Urbit in [nixpkgs](https://github.com/NixOS/nixpkgs), however we're still in the process of updating it to `v0.8.2`. Once available, you will be able to install and launch it like so:
54−
55−```
56−nix-env -i urbit
57−urbit
58−```
59−
60−## Booting a Ship
61−
62−One you've completed your installation, you can continue on to the instructions for [booting your ship](@/docs/getting-started/booting-a-ship.md) to get on the Arvo network.
63−
64−Or, if you want to try testing and writing code, check out the guide to [getting an unnetworked development ship](/docs/using/creating-a-development-ship).
65−
66−## Set Up Swap
67−
68−If you're running Urbit in the cloud on a small instance, you may need to additionally configure swap space. If you're not, you can safely ignore this section.
69−
70−Urbit wants to map 2GB of memory when it boots up. We won’t necessarily use all this memory, we just want to see it. On a normal modern PC or Mac, or on a large cloud virtual machine, this is not an issue. On some small cloud virtual machines (Amazon or Digital Ocean), the default memory configuration is smaller than this, and you need to manually configure a swapfile.
71−
72−Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04). For Amazon there’s a StackOverflow thread [here](https://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
73−
74−Don’t spend a lot of time tweaking these settings; the simplest thing is fine.
getting-started/using-bridge.mddeleted−70
@@ -1,70 +0,0 @@
1−+++
2−title = "Using Bridge"
3−weight = 1
4−template = "doc.html"
5−+++
6−
7−[Bridge](https://github.com/urbit/bridge) is the application we built for interacting with [Azimuth](@/docs/concepts/azimuth.md), the Urbit PKI, and managing your Azimuth identities, also known as _points_. Importantly, Bridge also allows you to generate a keyfile that you will need to boot your ship so that it can use the Arvo network.
8−
9−This guide assumes that you own an Azimuth identity, or that you have found someone to send an Azimuth identity to your Ethereum address and are looking to claim it.
10−
11−## Online Bridge
12−
13−To connect to Bridge, type `https://bridge.urbit.org` into your browser, and enter the your identity's credentials in the appropriate fields. If you were invited to claim an Azimuth identity, it's very likely that you received an email that would direct you to Bridge, and you can simply follow the hyperlink in that email.
14−
15−Once you arrive Proceed through the steps presented to you. You'll eventually arrive at a page with a few choices: `Invite`, `Admin`, and `Boot Arvo`. `Admin` is the only option that you're interested in right now; click on it. On the "Admin" page, click the `Download Arvo Keyfile` button. Once you have downloaded the keyfile, you can exit Bridge ands proceed to the guide to [installing Arvo](@/docs/getting-started/installing-urbit.md).
16−
17−## Offline Bridge
18−
19−Alternatively, Bridge can be run locally. It's more complicated, but we recommend this option for managing sufficiently valuable assets, such as several stars or more. To install local Bridge, navigate to the [release page](https://github.com/urbit/bridge/releases/) on GitHub. Download the `.zip` file of the latest version. After you download it, follow the instructions below.
20−
21−### Installation
22−
23−To use Bridge:
24−
25−+ Unzip the `.zip` file that you downloaded (`bridge-$version.zip`).
26−+ Open up your command line interface (Terminal on OSX, Command Prompt on Windows).
27−+ Navigate to the `bridge-$version` directory, where `$version` is the appropriate version number.
28−+ Run this command: `python3 -m http.server 5000 --bind 127.0.0.1`
29−+ You can then use the Bridge app by navigating to `http://localhost:5000` in your internet browser.
30−
31−**Note:** Bridge allows you both make reads and writes to the Ethereum blockchain. Writing to the blockchain, such as changing your networking keys, will incur a transaction cost that will require you to have some ETH in your address.
32−
33−Once the program is running in your browser, go through each step presented according to what kind of wallet you have. There are a few login options you'll be presented with. A notable option is **Urbit Master Ticket**. This is for those who used our Wallet Generator software. If you bought points from an Urbit sale and then used the Wallet Generator, your networking keys will be set for you. All other login options will result in you needing to set your own networking keys.
34−
35−### Accept Your Transfer
36−
37−If you were given points by Tlon, you likely already fully own them. But if someone sent you a point, then you will first need to use Bridge to accept that transfer.
38−
39−After you access your Ethereum address, if a point was sent to that address,
40−you'll come to a page that has an `Incoming Transfers` header, under which is
41−a graphic. Click the `Details ->` link under that graphic.
42−
43−Now you'll be on the management page of your point. The transfer isn't completed
44−yet, so click `Accept incoming transfer`. Then check both boxes and and click
45−their associated `Sign Transaction` and `Send Transaction` buttons.
46−
47−If you already own a point, then click on the `Details ->` under your sigil in the
48−`Your Points` section.
49−
50−### Set Your Networking Keys
51−
52−If you just accepted a point, you'll be returned to your point screen. Notice that that links and buttons are now clickable. You now own this point!
53−
54−Click the link that says `Set network keys`. The field that is presented in the resulting page expects a 32-byte hexadecimal string. If it's filled already, no action is required. If this is empty, you will need to generate such a string. You can generate this data any way you please, but in the terminal on MacOS or Linux, you can write
55−
56−```
57−hexdump -n 32 -e '4/4 "%08X"' /dev/random
58−```
59−
60−and use the result.
61−
62−It should be noted that setting your network keys is an event on the Ethereum network, and will therefore cost a trivial, but non-zero, amount of [gas](https://github.com/ethereum/wiki/wiki/Design-Rationale#gas-and-fees) to complete.
63−
64−### Generate Your Keyfile
65−
66−From the detail page associated with your point, click the `Generate Arvo Keyfile` link and you'll be taken to a page with a field titled `Network seed`. This field should already be filled in, and should match the hexadecimal string that you entered in the previous step. If its not filled in or does not match, fill it in with the correct string.
67−
68−Click `Generate ->`, which will download a keyfile onto your machine.
69−
70−With that keyfile in hand, you can now exit Bridge, and continue to the guide to [installing Arvo](@/docs/getting-started/installing-urbit.md).
learn/_index.md+3−4
@@ -4,17 +4,16 @@ weight = 4
44sort_by = "weight"
55template = "sections/docs/chapters.html"
66+++
7+
78Tutorials and explanations for all the components of Urbit.
89
910## [Arvo](@/docs/learn/arvo/_index.md)
1011
1112Arvo is a clean-slate system software stack defined as a deterministic computer. An encrypted P2P network, %ames, runs on a functional operating system, Arvo, written in a strict, typed functional language, Hoon, which compiles itself to a combinator interpreter, Nock, whose spec gzips to 340 bytes.
1213
13−## [Hoon](@/docs/learn/hoon/_index.md)
14−
15−Hoon is a high-level, statically typed, functional programming language, custom-designed for use with Urbit. For a functional language it has a surprisingly imperative style, and mastering it doesn't require knowing any advanced mathematics.
14+## [Hoon Tutorial](@/docs/learn/hoon-tutorial/_index.md)
1615
17−The [Hoon Tutorial](@/docs/learn/hoon/hoon-tutorial/_index.md) is the best place to start if you want to learn Urbit.
16+Hoon is a high-level, statically typed, functional programming language, custom-designed for use with Urbit. For a functional language it has a surprisingly imperative style, and mastering it doesn't require knowing any advanced mathematics. The Hoon Tutorial is the best place to start if you want to learn Urbit.
1817
1918## [Nock](@/docs/learn/nock/_index.md)
2019
learn/arvo/hall.mddeleted−1335
@@ -1,1335 +0,0 @@
1−+++
2−title = "Hall"
3−weight = 7
4−template = "doc.html"
5−aliases = ["docs/learn/arvo/hall/"]
6−+++
7−> Last major revision of this tutorial: 2017. Some of the information and Hoon syntax here may
8− be outdated.
9−
10−
11−Hall is the Urbit messaging and notifications protocol. This document details Hall's architecture, its interfaces, and the new Gall model it's built to target.
12−
13−## Table of contents
14−
15−- [Hall Architecture](#hall-architecture)
16−
17−- [The Hall Interface](#the-hall-interface)
18−
19−- [The New Gall Model](#the-new-gall-model)
20−
21−# Hall Architecture
22−
23−This document is complemented by Hall's source code, but doesn't require it. Definitions of data structures, code snippets and diagrams will be provided where useful.
24−
25−Hall's implementation is structured according to the new Gall model. Familiarity with its concepts is assumed. See [the new Gall model](#the-new-gall-model).
26−
27−## Talk
28−
29−Talk was Urbit's first big user-facing application. It continues to enjoy a prominent role in the Urbit landscape, but now does so as two separate applications.
30−
31−The messaging parts of Talk have been separated from its user-interface parts. What we ended up with is a shiny new generic messaging bus, and the chat interface we all know and love. The messaging bus, which should now prove useful to many different applications, will be named `Hall`. Applications that use it are referred to as **clients**. One such application, as you might have guessed, is `:talk`.
32−
33−
34−## Structures & functionality
35−
36−### Circles
37−
38−```hoon
39−++ circle {hos/ship nom/term} :: native target
40−```
41−
42−A `circle` is essentially a named collection of messages created by and hosted on a ship's Hall, usually represented as `~ship-name/circle-name`. Most of Hall revolves around doing things with circles.
43−
44−### Messages
45−
46−When we subscribe to a circle, the primary thing we're interested in is its messages. Message data itself isn't that complicated, but a fair amount of metadata comes into play when actually sending a message. Let's work our way up, starting at the contents.
47−
48−```hoon
49−++ speech :> content body
50− $% {$lin pat/? msg/cord} :< no/@ text line
51− {$url url/purf:eyre} :< parsed url
52− {$exp exp/cord res/(list tank)} :< hoon line
53− {$ire top/serial sep/speech} :< in reply to
54− {$fat tac/attache sep/speech} :< attachment
55− {$app app/term sep/speech} :< app message
56− {$inv inv/? cir/circle} :< inv/ban for circle
57− == ::
58−```
59−
60−At the heart of every message lies a `speech` that describes the message body. There's a large number of different speech types, from simple text messages to parsed URLs, Hoon expressions and more.
61−
62−```hoon
63−++ audience (set circle) :< destinations
64−++ serial @uvH :< unique identifier
65−++ thought :> inner message
66− $: uid/serial :< unique identifier
67− aud/audience :< destinations
68− wen/@da :< timestamp
69− sep/speech :< content
70− == ::
71−```
72−
73−A `speech` is always accompanied by various bits of metadata. We include a unique identifier, a message timestamp and an `audience`, the set of all intended recipients of the message.
74−
75−```hoon
76−++ telegram {aut/ship thought} :< whose message
77−++ envelope {num/@ud gam/telegram} :< outward message
78−```
79−
80−Finally, before sending the message over the wire, we add on the message's original author. In most cases, we also include a sequence number, the index of the message in the originating circle's list of messages. This can be a useful point of reference for clients.
81−
82−### Participant metadata
83−
84−Messages aren't the only thing a subscription gets us. We're also kept up to date with relevant metadata.
85−
86−```hoon
87−++ crowd {loc/group rem/(map partner group)} :< our & srcs presences
88−++ group (map ship status) :< presence map
89−++ status {pec/presence man/human} :< participant
90−++ presence :> status type
91− $? $gone :< absent
92− $idle :< idle
93− $hear :< present
94− $talk :< typing
95− == ::
96−++ human :> human identifier
97− $: han/(unit cord) :< handle
98− tru/(unit truename) :< true name
99− == ::
100−++ truename {fir/cord mid/(unit cord) las/cord} :< real-life name
101−```
102−
103−`status` is user-set metadata that describes, well, the status of users in a circle. This encompasses their `presence`, which shows their activity, and their `human` identity, which includes their display handle.
104−
105−For reasons we'll discover shortly, circles keep track of both their own `group` and those of the circles they're subscribed to. `crowd` encapsulates this.
106−
107−### Configurations
108−
109−```hoon
110−++ lobby {loc/config rem/(map circle config)} :< our & srcs configs
111−++ config :> circle config
112− $: src/(set circle) :< active sources
113− cap/cord :< description
114− fit/filter :< message rules
115− con/control :< restrictions
116− == ::
117−++ filter :> content filters
118− $: cas/? :< dis/allow capitals
119− utf/? :< dis/allow non-ascii
120− == ::
121−++ control {sec/security ses/(set ship)} :< access control
122−```
123−
124−Another part of metadata we get from circle subscriptions is configurations. Again, circles want to remember their own configuration, as well as those of their subscriptions. But why, precisely?
125−
126−The `config` structure contains `src`, a set of partners. These indicate the different sources a circle is currently pulling content from. This allows circles to aggregate messages from multiple places. In doing so, it also receives metadata from those places, hence why we have structures for storing "remote" presences and configurations alongside local ones.
127−
128−Aside from that, `config` contains a description for the circle, which is exactly what it sounds like. It also specifies a `filter`, which are content formatting rules all messages passing through this circle are made to adhere to.
129−
130−Lastly, there's a `control` structure that contains both a security mode and a list of ships, which is either a white- or blacklist depending on the aforementioned mode. There are four such modes available.
131−
132−```hoon
133−++ security :> security mode
134− $? $channel :< blacklist
135− $village :< whitelist
136− $journal :< pub r, whitelist w
137− $mailbox :< our r, blacklist w
138− == ::
139−```
140−
141−A `channel` is publicly readable and writable, with a blacklist for blocking.
142−A `village` is privately readable and writable, with a whitelist for inviting.
143−A `journal` is publicly readable and privately writable, with a whitelist for authors.
144−A `mailbox` is readable by its owner and publicly writable, with a blacklist for blocking.
145−
146−### Stories
147−
148−To see how that all ties together, we're going to take a look at Hall's state.
149−
150−```hoon
151−++ state :> hall state
152− $: stories/(map term story) :< conversations
153− :: ... ::
154− == ::
155−++ story :> wire content
156− $: grams/(list telegram) :< all messages
157− locals/group :< local presence
158− remotes/(map circle group) :< remote presence
159− shape/config :< configuration
160− mirrors/(map circle config) :< remote config
161− :: ... ::
162− == ::
163−```
164−
165−Stories are the primary driver behind Hall. They are the structures that are used to power circles, which we can now say are named stories hosted on ships.
166−
167−With the configuration described above in mind, we can try and imagine the things we can do with stories. Knowing that we can subscribe them to any number of sources, they can function as central hubs for our messaging, aggregate specific kinds of data feeds, or simply accept whatever messages get sent to it like a regular old chatroom.
168−
169−### General use
170−
171−Upon initial startup, Hall creates a default story, a mailbox named `inbox`. This mailbox is the primary target for anyone and anything that wants to reach its owner. Applications can use it to send notifications and other information to the user (Hall itself does this as well), and users can use it to send direct messages to each other.
172−
173−Applications that use Hall, especially clients, are encouraged to use the default mailbox as the primary messaging hub. This way, users can easily switch between different applications without "losing" their subscriptions, message backlog, etc.
174−
175−As an example, Talk operates like this, serving as an interface for reading from and managing the user's mailbox. Local stories are subscribed to through the `inbox`, which ends up containing all messages the user receives.
176−
177−### Public membership
178−
179−To aid in discoverability of circles, it is possible for users to make their participation in any given circle public. This data can then be used by things like profile widgets, or read out directly by other users.
180−
181−
182−## Interfaces for applications
183−
184−Applications can interact with Hall in two complementary ways: they can tell it what actions to perform, and they can subscribe to its state and the changes made to it.
185−
186−### Interactions
187−
188−Hall can be commanded by poking it with `action`s.
189−
190−```hoon
191−++ action :> user action
192− $% :: circle configuration ::
193− {$create nom/term des/cord sec/security} :< create circle
194− {$delete nom/term why/(unit cord)} :< delete + announce
195− {$depict nom/term des/cord} :< change description
196− {$filter nom/term fit/filter} :< change message rules
197− {$permit nom/term inv/? sis/(set ship)} :< invite/banish
198− {$source nom/term sub/? srs/(set source)} :< un/sub to/from src
199− :: messaging ::
200− {$convey tos/(list thought)} :< post exact
201− {$phrase aud/audience ses/(list speech)} :< post easy
202− :: personal metadata ::
203− {$notify aud/audience pes/(unit presence)} :< our presence update
204− {$naming aud/audience man/human} :< our name update
205− :: changing shared ui ::
206− {$glyph gyf/char aud/audience bin/?} :< un/bind a glyph
207− {$nick who/ship nic/cord} :< new identity
208− :: misc changes ::
209− {$public add/? cir/circle} :< show/hide membership
210− == ::
211−```
212−
213−The largest part of these actions concern themselves with managing local circles. `nom` is always the name used to identify the relevant story. To disambiguate between "add" and "delete" type actions (for permissions and subscriptions), a loob `?` is used.
214−
215−To send messages, two interfaces are available. `%convey` lets you specify all details of the messages, including its timestamp, serial, and fully assembled audience. `%phrase`, on the other hand, takes care of that for you, allowing you to specify just the target partners and message contents.
216−
217−`%notify` and `%naming` are useful for setting your own presence and nickname in a circle respectively, so others can see if you're active and what to call you by.
218−
219−"Shared UI" encompasses UI data that should be consistent across applications. For example, if the user sets a local nickname for an identity, they expect to see that nickname regardless of the application they're currently using. The same goes for glyph bindings, for easy audience targeting.
220−
221−### Queries, prizes and rumors
222−
223−To receive data from Hall, applications will have to query it. There are two paths that are useful for clients to query. Let's look at them and their results.
224−
225−```hoon
226−++ query :> query paths
227− $% {$client $~} :< shared ui state
228− $: $circle :> story query
229− nom/naem :< circle name
230− wat/(set circle-data) :< data to get
231− ran/range :< query duration
232− == ::
233− :: ... ::
234− == ::
235−++ circle-data :> kinds of circle data
236− $? $grams :< messages
237− $group-l :< local presence
238− $group-r :< remote presences
239− $config-l :< local config
240− $config-r :< remote configs
241− == ::
242−++ range :> inclusive msg range
243− %- unit :< ~ means everything
244− $: hed/place :< start of range
245− tal/(unit place) :< opt end of range
246− == ::
247−++ place :> range indicators
248− $% {$da @da} :< date
249− {$ud @ud} :< message number
250− == ::
251−++ prize :> query result
252− $% $: $client :< /client
253− gys/(jug char (set partner)) :< glyph bindings
254− nis/(map ship cord) :< nicknames
255− == ::
256− {$circle burden} :< /circle
257− :: ... ::
258− == ::
259−++ burden :< full story state
260− $: gaz/(list telegram) :< all messages
261− cos/lobby :< loc & rem configs
262− pes/crowd :< loc & rem presences
263− == ::
264−```
265−
266−To be clear, the paths for those queries are `/client` and `/circle/[name]/[data]/[start]/[end]`, where data is at least one `circle-data`, and `start` and `end` are optional and can be either a date or a message number.
267−
268−`/client` queries produce shared UI state. That is, glyph bindings and nicknames.
269−`/circle` queries produce the entire public state of the requested story, including remotes.
270−
271−Any changes to the results of these queries are communicated via the following `rumor`s. It's a fairly long list of potential changes,
272−
273−```hoon
274−++ rumor :< query result change
275− $% {$client rum/rumor-client} :< /client
276− {$circle rum/rumor-story} :< /circle
277− :: ... ::
278− == ::
279−++ rumor-client :< changed ui state
280− $% {$glyph diff-glyph} :< un/bound glyph
281− {$nick diff-nick} :< changed nickname
282− == ::
283−++ diff-glyph {bin/? gyf/char aud/audience} :< un/bound glyph
284−++ diff-nick {who/ship nic/cord} :< changed nickname
285−++ diff-story :> story change
286− $% {$new cof/config} :< new story
287− {$config cir/circle dif/diff-config} :< new/changed config
288− {$status cir/circle who/ship dif/diff-status} :< new/changed status
289− {$remove $~} :< removed story
290− :: ... ::
291− == ::
292−++ rumor-story ::> story rumor
293− $? diff-story ::< both in & outward
294− $% {$gram nev/envelope} ::< new/changed msgs
295− == == ::
296−++ diff-config :> config change
297− $% {$full cof/config} :< set w/o side-effects
298− {$source add/? src/source} :< add/rem sources
299− {$caption cap/cord} :< changed description
300− {$filter fit/filter} :< changed filter
301− {$secure sec/security} :< changed security
302− {$permit add/? sis/(set ship)} :< add/rem to b/w-list
303− {$remove $~} :< removed config
304− == ::
305−++ diff-status :> status change
306− $% {$full sat/status} :< fully changed status
307− {$presence pec/presence} :< changed presence
308− {$human dif/diff-human} :< changed name
309− {$remove $~} :< removed status
310− == ::
311−++ diff-human :> name change
312− $% {$full man/human} :< fully changed name
313− {$handle han/(unit cord)} :< changed handle
314− {$true tru/(unit truename)} :< changed true name
315− == ::
316−```
317−
318−These are, as enforced by Gall, the changes as they happen. This makes it possible for very minimal Hall clients to be implemented that only display a stream of changes, rather than keeping state themselves.
319−
320−
321−## Communication between Halls
322−
323−Halls can communicate with other Halls by sending commands and subscription updates.
324−
325−### Commands
326−
327−To request changes to a story, Halls can send `command`s.
328−
329−```hoon
330−++ command :> effect on story
331− $% {$publish tos/(list thought)} :< deliver
332− {$present nos/(set term) dif/diff-status} :< status update
333− :: ... ::
334− == ::
335−```
336−
337−A `%publish` command contains messages. These are sent to foreign Halls to be published to their stories.
338−
339−The `%present` command is used for sending status updates about our ship.
340−
341−### Querying
342−
343−Halls can query other halls. Here's the peer move we send when we open a query on a foreign circle:
344−
345−```hoon
346−:* ost.bol :< bone
347− %peer :< move type
348− /[our-circle]/[host]/[query-path] :< rumor path
349− [host %hall] :< query target
350− /circle/[their-circle]/[data]/[start]/[end] :< query path
351−== ::
352−```
353−
354−Again, the rumor path is what our Hall uses to identify what query a received message originates from. Our circle is specified so that we know what story is interested in the changes we get.
355−
356−The query path is slightly more interesting. Of course it specifies the name of their story we want to subscribe our story to, but also a "start" and "end". These can (optionally) be used to specify the range of messages we want to get from our query. Once that range has passed, we stop receiving updates.
357−
358−### Federation implementation
359−
360−Along the way so far, we've skipped some parts of structures. Most of those relate to federation. Let's see what we missed.
361−
362−```hoon
363−++ query :> query paths
364− $% {$burden who/ship} :< duties to share
365− {$report $~} :< duty reports
366− :: ... ::
367− == ::
368−++ prize :> query result
369− $% {$burden sos/(map term burden)} :< /burden
370− :: ... ::
371− == ::
372−++ rumor :< query result change
373− $% {$burden nom/term rum/rumor-story} :< /burden
374− :: ... ::
375− == ::
376−++ diff-story ::
377− $% {$bear bur/burden} :< new inherited story
378− :: ... ::
379− == ::
380−++ burden :> full story state
381− $: gaz/(list telegram) :< all messages
382− cos/lobby :< loc & rem configs
383− pes/crowd :< loc & rem presences
384− == ::
385−```
386−
387−We briefly touched upon how federation works on the higher level. On the lower, this is how things go down.
388−
389−1. When Hall boots on a star or galaxy, it starts querying its parent's `/burden` path. (Galaxies query ~zod.)
390−2. Upon receiving that query, the parent sends a `%burden` prize containing all state of its channels (fully public circles) to the child. It also subscribes to `/report` on that child.
391−3. When a new story gets created on the parent, its children get a `%burden` rumor with a `%bear` story diff, and they create a local copy of that channel.
392−4. When something about a parent's story changes, a `%burden` rumor is sent to all its children (because they're querying `/burden`). The children apply this change to their local version of the story.
393−5. When a child's story has a `%grams` or `%status` change, a `%burden` rumor is sent to the parent (because they're querying `/report`). The parent applies this change to their local version of the story, and #4 happens.
394−
395−
396−## Hall implementation
397−
398−Now that we know what gets sent over the wire and why, let's see what happens whenever such events happen. We won't be covering everything, but enough to illustrate the general flow.
399−
400−First though, it's useful to understand how Hall's code is structured. It consists of primary cores, designed to work optimally with Gall.
401−
402−- `++ta` is the transaction core. For every event that happens, be it a poke, peer or diff, the transaction core gets put to work to process it. Once it's done, it produces a list of deltas that describe how our state needs to be modified.
403−- `++da` is the delta application core. It is used to apply `++ta`'s deltas to our application state, and produce a list of side-effects.
404−
405−Both those cores also have a core within themselves dedicated solely to dealing with stories, `++so` and `++sa` respectively.
406−
407−Once all work in an engine core has finished, its `-done` arm is called to produce the result of all the core's computation.
408−
409−In the diagrams that follow, regular lines indicate flows that always happen. Dashed lines indicate flows that are traversed if the described condition is met.
410−Below the diagrams you will find brief explanations of the involved arms. In a particularly bright future, these might be available on-hover instead.
411−For brevity, utility arms that aren't a direct and important part of the flow have been omitted.
412−
413−(You will find that the origins still use old Gall arms, with some glue code in between. At the time of writing, new Gall has not yet been implemented, so this will have to do.)
414−
415−We will only display the delta generation parts of the flow. Delta application is usually implemented simply enough to deduce what it does from looking at the label.
416−
417−### Subscriptions
418−
419−Hall-to-Hall subscriptions happen when a source gets added to a story. This is done with a `%source` action, and results in a `%peer` move being sent (prompted by a `%story %follow` delta).
420−Upon receiving a valid peer on a `/circle` path, the subscribing ship is added to that circle's presence map.
421−
422−![subscriptions implementation flow](https://media.urbit.org/docs/hall/diagrams/flow-subscriptions.png)
423−
424−```hoon
425−++ poke-talk-action :< we got poked with an action.
426− ++ ta-action :< applies an action.
427− ++ ta-config :< (re)configures a story.
428−:: ::
429−++ peer :< we got peered.
430− ++ g-query :< resolves query to prize.
431− ++ ta-subscribe :< act upon subscription.
432− ++ so-attend :< adds a ship's status to the story.
433−```
434−
435−### Rumors
436−
437−Once a query has opened, Hall will receive updates on it, rumors. The changes describes in these rumors are applied via the following flow.
438−
439−![rumor implementation flow](https://media.urbit.org/docs/hall/diagrams/flow-rumors.png)
440−
441−```hoon
442−++ diff-talk-rumor :< we got a query update.
443− ++ ta-hear :< applies a rumor to the story it's intended for.
444− ++ so-hear :< applies a %circle rumor to the story.
445− ++ so-config-full :< splits a %full diff-config into separate changes.
446− ++ so-bear :< accept burden, assimilate into the story's state.
447− ++ so-lesson :< sends a report with presences.
448−```
449−
450−### Messaging
451−
452−To send messages, the user sends a `%convey` or `%phrase` action, resulting in a `%publish` command being sent to the involved partners. Receiving a `%publish` command causes its messages to be added to the story through the creation of a `%story %grams` delta.
453−
454−![messaging implementation flow](https://media.urbit.org/docs/hall/diagrams/flow-messaging.png)
455−
456−```hoon
457−++ poke-talk-action :< we got poked with an action.
458− ++ ta-action :< applies an action.
459−:: ::
460−++ poke-talk-command :< we get poked with a command.
461− ++ ta-apply :< applies a command.
462− ++ ta-think :< consumes each message in the given list.
463− ++ ta-consume :< conducts a message to each partner in audience.
464− ++ ta-conduct :< records or sends a message.
465− ++ ta-transmit :< sends a message to a partner.
466− ++ ta-record :< stores a message in a story.
467− ++ so-learn :< either adds or modifies a message.
468−```
469−
470−
471−## The future
472−
473−Hall is neither complete nor perfect. There are features that need to be implemented, varying from small quality of life changes to broad-reaching functionality.
474−
475−### Features and functionality
476−
477−To turn Talk into a [sustainable social platform](https://urbit.org/fora/posts/~2017.4.26..18.00.25..b93c~/), it needs a number of things.
478−
479−We want to have some kind of discoverability for circles. This could be realized by making it possible for users to add friends, who would have their Hall subscribe to a list of circles the added friends are in. The existing public membership functionality can be leveraged for this.
480−
481−Eventually, content self-moderation might need to be implemented. Users would flag their content if it is potentially offensive. Others would easily be able to filter out content that might offend them.
482−This functionality brings its own large sets of challenges that need to be tackled.
483−
484−Additionally, federation might be put to broader use. Knowing that a circle is federated could help fall back to alternative hosts in case the one Hall originally subscribed to is unavailable. Implementation-wise, care would need to be taken for this to not get ugly. Not to mention, when/how would availability of a host be verified?
485−
486−Other changes that might have a fair impact on the functioning of Hall are un/read states for messages, and being able to use moons to allow your friends to chat with you in a local channel.
487−
488−More minor functionalities that need to be implemented include:
489−- Extended permissions management. Being able to black-/whitelist entire ship classes.
490−- Improved presence functionality. Actually using the presence system, and sending "typing", "idle", etc. statuses.
491−- Polls.
492−
493−And, of course, there's a lot that the Talk client can improve on as well.
494−
495−
496−## Further reading
497−
498−To gain a more thorough understanding of Hall's inner workings, take a look at its source code. It comes with inline documentation.
499−[On Github.](https://github.com/urbit/urbit/blob/master/pkg/arvo/app/hall.hoon)
500−
501−To see an expansive example of a Hall client, take a look at the code of Talk. It, too, comes with inline documentation.
502−[On Github.](https://github.com/urbit/urbit/blob/master/pkg/arvo/app/talk.hoon)
503−
504−# The Hall Interface
505−
506−This document describes the different interfaces Hall provides and the data that is accessible and modifiable through them. Knowledge of the Urbit application model (including [new gall](#the-new-gall-model)) and [Hall's architecture](#hall-architecture) is assumed.
507−
508−While the structures here are given in Hoon, they match fairly closely to their JSON equivalent. Most important to note is that `$%({$x y/z})` becomes accessible as `json.x.y`.
509−
510−## Queries
511−
512−Queries are the paths you pass into `%peer` moves. Internally, they get translated to a `++query` structure for easier handling. We'll be giving examples of valid query paths alongside the structures themselves.
513−
514−### /client
515−
516−To be able to keep certain UI elements like glyphs and local nicknames consistent across different Hall clients, they can query Hall for the current UI state.
517−
518−```hoon
519−++ query ::
520− $% {$client $~} :< shared ui state
521− :: .... ::
522− == ::
523−```
524−
525−Valid paths include:
526−
527−```
528−:> all shared ui state
529−/client
530−```
531−
532−#### /client prize
533−
534−Contains a map of glyphs and the audiences that they map to, as well as a map of ships and their locally set nicknames.
535−
536−```hoon
537−++ prize :> query result
538− $% {$client prize-client} :< /client
539− :: ... ::
540− == ::
541−++ prize-client :> shared ui state
542− $: gys/(jug char audience) :< glyph bindings
543− nis/(map ship nick) :< local nicknames
544− == ::
545−```
546−
547−#### /client rumor
548−
549−Contains either a bound or unbound glyph and its target, or a ship with its new nickname. A nickname of `''` means the associated ship no longer has a nickname set for it.
550−
551−```hoon
552−++ rumor :> query result change
553− $% {$client rum/rumor-client} :< /client
554− :: ... ::
555− == ::
556−++ rumor-client :< changed ui state
557− $% {$glyph diff-glyph} :< un/bound glyph
558− {$nick diff-nick} :< changed nickname
559− == ::
560−++ diff-glyph {bin/? gyf/char aud/audience} :< un/bound glyph
561−++ diff-nick {who/ship nic/nick} :< changed nickname
562−```
563−
564−
565−### /public
566−
567−To aid in circle discoverability, users can add circles to their "public membership" list. This can then be queried for by, for example, a profile page.
568−
569−```hoon
570−++ query ::
571− $% {$public $~} :< public memberships
572− :: .... ::
573− == ::
574−```
575−
576−Valid paths include:
577−
578−```
579−:> all public memberships
580−/public
581−```
582−
583−#### /public prize
584−
585−Contains the set of circles the user has on their public list.
586−
587−```hoon
588−++ prize :> query result
589− $% {$public cis/(set circle)} :< /public
590− :: ... ::
591− == ::
592−```
593−
594−#### /public rumor
595−
596−Contains a circle that was either added or removed from the public list.
597−
598−```hoon
599−++ rumor :> query result change
600− $% {$public add/? cir/circle} :< /public
601− :: ... ::
602− == ::
603−```
604−
605−### /peers
606−
607−To allow a circle owner to inspect who is currently subscribed to their stories, they can issue a query to retrieve subscription data.
608−
609−```hoon
610−++ query ::
611− $% {$peers nom/naem} :< readers of story
612− :: .... ::
613− == ::
614−```
615−
616−Query paths are structured as follows:
617−
618−```
619−/peers/[circle-name]
620−```
621−
622−Valid paths include:
623−
624−```
625−:> peers for circle %urbit-help
626−/peers/urbit-help
627−```
628−
629−#### /peers prize
630−
631−Contains a map of ships and the different queries they currently have active for the selected story.
632−
633−```hoon
634−++ prize :> query result
635− $% {$peers pes/(jar ship query)} :< /peers
636− :: ... ::
637− == ::
638−```
639−
640−#### /peers rumor
641−
642−Contains a ship and a query, and a flag to indicate whether that subscription has started or ended.
643−
644−```hoon
645−++ rumor :> query result change
646− $% {$peers add/? who/ship qer/query} :< /peers
647− :: ... ::
648− == ::
649−```
650−
651−### /circle
652−
653−Circle queries allow for the retrieving of data from stories. Their messages, configuration, and presences can all be accessed. Since this is a lot of data, there are lots of possibilities for filtering it built in to the query itself.
654−
655−
656−A quick refresher on the difference between "local" and "remote" presence and configuration: "local" means it pertains to the circle itself; "remote" means it pertains to one of its configured sources. The latter is primarily useful to clients when using a circle for aggregation, like the `%inbox`.
657−
658−```hoon
659−++ query ::
660− $% $: $circle :> story query
661− nom/naem :< circle name
662− wer/(unit circle) :< from source
663− wat/(set circle-data) :< data to get
664− ran/range :< query duration
665− == ::
666− :: .... ::
667− == ::
668−++ circle-data :> kinds of circle data
669− $? $grams :< messages
670− $group-l :< local presence
671− $group-r :< remote presences
672− $config-l :< local config
673− $config-r :< remote configs
674− == ::
675−++ range :> inclusive msg range
676− %- unit :< ~ means everything
677− $: hed/place :< start of range
678− tal/(unit place) :< opt end of range
679− == ::
680−++ place :> range indicators
681− $% {$da @da} :< date
682− {$ud @ud} :< message number
683− == ::
684−```
685−
686−Query paths are structured as follows:
687−
688−```
689−/circle/[circle-name]/(from-circle)/[what/data]/(range-start(/range-end))
690−(from-circle) : optional message source, ~ship/circle
691−[what/data] : one or more of grams, group, group-l, group-r,
692− : config, config-l, config-r, combined using /
693−(range) : an optional range with an optional end, its points denoted
694− : in either message number (@ud) or date (@da)
695−```
696−
697−Valid paths include:
698−
699−```
700−:> get all messages from circle %urbit-help
701−/circle/urbit-help/grams
702−:> get all messages, all presences and local configs from %urbit-help
703−/circle/urbit-help/grams/group/config-l
704−:> get all messages %urbit-help has heard from its source ~zod/fora
705−/circle/urbit-help/~zod/fora/grams
706−:> get the first 100 messages from %urbit-help
707−/circle/urbit-help/grams/0/99
708−:> get the first 100 messages %urbit-help has heard from its source ~zod/fora
709−/circle/urbit-help/~zod/fora/grams/0/99
710−:> get all messages from %urbit-help, starting now
711−/circle/urbit-help/grams/group/(scow %da now)
712−:> get all messages from %urbit-help, starting now, ending at the 100th message
713−/circle/urbit-help/grams/(scow %da now)/99
714−:> get local presences from %urbit-help for a week
715−/circle/urbit-help/group-l/(scow %da now)/(scow %da (add now ~d7))
716−```
717−
718−#### /circle prize
719−
720−Contains (where applicable) messages in envelopes (with message numbers), as well as local and remote configurations and presences.
721−
722−```hoon
723−++ prize :> query result
724− $% {$circle package} :< /circle
725− :: ... ::
726− == ::
727−++ package :> story state
728− $: nes/(list envelope) :< messages
729− cos/lobby :< loc & rem configs
730− pes/crowd :< loc & rem presences
731− == ::
732−```
733−
734−#### /circle rumor
735−
736−Contains a detailed change description of the data relevant to the query that changed.
737−
738−Messages are wrapped in envelopes to include their sequence number, and note the source they were heard from. Configuration and status changes specify the circle they apply to.
739−
740−```hoon
741−++ rumor :> query result change
742− $% {$circle rum/rumor-story} :< /circle
743− :: ... ::
744− == ::
745−++ rumor-story :> story rumor
746− $% {$new cof/config} :< new story
747− {$gram src/circle nev/envelope} :< new/changed message
748− {$config cir/circle dif/diff-config} :< new/changed config
749− {$status cir/circle who/ship dif/diff-status} :< new/changed status
750− {$remove $~} :< removed story
751− == ::
752−++ diff-config :> config change
753− $% {$full cof/config} :< set w/o side-effects
754− {$source add/? src/source} :< add/rem sources
755− {$caption cap/cord} :< changed description
756− {$filter fit/filter} :< changed filter
757− {$secure sec/security} :< changed security
758− {$permit add/? sis/(set ship)} :< add/rem to b/w-list
759− {$remove $~} :< removed config
760− == ::
761−++ diff-status :> status change
762− $% {$full sat/status} :< fully changed status
763− {$presence pec/presence} :< changed presence
764− {$human dif/diff-human} :< changed name
765− {$remove $~} :< removed status
766− == ::
767−++ diff-human :> name change
768− $% {$full man/human} :< fully changed name
769− {$handle han/(unit cord)} :< changed handle
770− {$true tru/(unit truename)} :< changed true name
771− == ::
772−```
773−
774−
775−## Actions
776−
777−Actions can be sent by poking Hall with data marked as `%hall-action`. Actions are used for all user operations. If an error or other unexpected behavior occurs while executing an action, Hall notifies the user by sending an `%app` message to their `%inbox`.
778−
779−### Circle configuration
780−
781−Since all of these apply to a specific circle, they all specify a name `nom` of the circle to operate on.
782−
783−```hoon
784−++ action :> user action
785− $% {$create nom/naem des/cord sec/security} :< create circle
786− {$delete nom/naem why/(unit cord)} :< delete + announce
787− {$depict nom/naem des/cord} :< change description
788− {$filter nom/naem fit/filter} :< change message rules
789− {$permit nom/naem inv/? sis/(set ship)} :< invite/banish
790− {$source nom/naem sub/? srs/(set source)} :< un/sub to/from src
791− :: ... ::
792− ==
793−```
794−
795−`%create`: Creates a circle with description `des` and security mode `sec`. If this mode is a whitelist, the user is automatically added to it.
796−
797−`%delete`: Deletes the circle. If a reason `why` is provided, posts that as the last message to the circle before deleting it.
798−
799−`%depict`: Set the description of the circle to `des`.
800−
801−`%filter`: Set the filter (message sanitation rules) for the circle to `fit`.
802−
803−`%permit`: Either invite or banish ships to/from the circle, modifying the access control list accordingly. Regardless of whether this actually makes any changes, sends an `%inv` message to the involved ships' `%inbox`es.
804−
805−`%source`: Add or remove sources to/from the circle, un/subscribing it to/from the `grams`, `group-l` and `config-l` each one.
806−
807−### Messaging
808−
809−There are two interfaces for telling Hall to send a message. The first takes entire `thought`s, the second only `speech`es and the audience to send them to.
810−
811−```hoon
812−++ action :> user action
813− $% {$convey tos/(list thought)} :< post exact
814− {$phrase aud/audience ses/(list speech)} :< post easy
815− :: ...
816− ==
817−```
818−
819−`%convey`: Sends the thoughts to their audiences.
820−
821−`%phrase`: Turns the speeches into thoughts by applying sane defaults for metadata (auto-generated `uid`, `now` for `wen`), and then sends those thoughts.
822−
823−### Personal metadata
824−
825−These concern the presence users have in circles they are participating in.
826−
827−```hoon
828−++ action :> user action
829− $% {$notify aud/audience pes/(unit presence)} :< our presence update
830− {$naming aud/audience man/human} :< our name update
831− :: ... ::
832− ==
833−```
834−
835−`%notify`: Sets the user's presence in the audience circles to `pes`. A good client will automatically set these based on the user's activity. (`%talk` on typing, `%idle` on idle, `%gone` on sign-off.)
836−
837−`%naming`: Sets the user's name (handle and real name) for the given audience. Good clients can display these in place of ship names.
838−
839−### Changing shared UI
840−
841−When the user makes any changes to shared UI elements (elements that should persist between clients), this has to be communicated to Hall.
842−
843−```hoon
844−++ action :> user action
845− $% {$glyph gyf/char aud/audience bin/?} :< un/bind a glyph
846− {$nick who/ship nic/nick} :< new identity
847− :: ... ::
848− ==
849−```
850−
851−`%glyph`: Adds or removes a binding of a glyph to an audience.
852−
853−`%nick`: Sets a local nickname for a ship. An empty nickname `''` means the ship has no nickname.
854−
855−### Miscellaneous changes
856−
857−```hoon
858−++ action :> user action
859− $% {$public add/? cir/circle} :< show/hide membership
860− :: ... ::
861− ==
862−```
863−
864−`%public`: Adds or removes a circle to/from the user's public membership list.
865−
866−# The New Gall Model
867−
868−This document is complemented by the source code of applications that use the new Gall model (like [Hall](https://github.com/urbit/urbit/blob/master/pkg/arvo/app/hall.hoon)), but doesn't require it. Code snippets will be provided where useful. Some knowledge of Hoon and the functioning of Hoon apps is assumed.
869−
870−New `%gall` has not yet fully solidified. As such, its structure and naming are tentative.
871−
872−## Renewing a pillar of Arvo
873−
874−When you write an app, Gall is responsible for making sure its event arms like `++poke` get called when they need to. In essence, it provides developers with a consistent interface for hooking their app up to the operating system.
875−
876−It's not doing a lot to make sure this is done in a structured way, though, which results in apps (especially larger ones) feeling like big, tangled messes. Something needs to be done about this.
877−
878−### Problems
879−
880−Imagine a `++poke`, `++diff`, or even a `++peer` arm. In current implementations, you'll often see their product defined through cast as the following:
881−`^- (quip move +>)`
882−Or (sadly) more commonly:
883−`^- {(list move) _+>.$}`
884−
885−These arms are producing both side-effects and new state. To do this, their code has to simultaneously figure out "how does this poke/diff/whatever change our state?" and "what side-effects does this change have?"
886−
887−You'll find that the logic relating to these two often becomes tangled, making the flow of the whole more difficult to understand. And the side-effects more often than not relate to subscriptions, for which the developer may be writing a lot of boilerplate code. Gall currently does not help in either of these places.
888−
889−> The main significant cost of software development is the cost of untangling what the computer is doing, and or is supposed to be doing, over and over again in your head. Any way of lowering this untangling cost is extremely welcome.
890−
891−**~sorreg-namtyv**
892−
893−### Solutions
894−
895−Let's imagine a world in which Gall **does** help, in both of those places.
896−
897−It would be wonderful if Gall could take care of all standard subscription management logic for you, and direct the flow of code as it concludes is appropriate. Applications, then, would have to help Gall by providing the different parts of this flow, and providing the checks that allow Gall to make the right decisions. This takes some work out of the developer's hands and results in more structured application code.
898−
899−If we expand on that a bit, then we can even have Gall help us in untangling state changes from side effects. We do so by separating state changes into two phases: **analyzing** what changes need to be made, and **applying** those changes.
900−
901−But where do the side-effects go, then? We need to realize there's two kinds: side-effects that are subscription updates, and side-effects that aren't. The latter get produces by applying state changes, while the former get integrated into the Gall flow we described above.
902−
903−Since subscriptions are essentially queries to an app, requesting a specific part of its data/state, we can deduce subscription updates from state changes. We merely provide the logic, and Gall chains it all together. Having Gall support all this allows us to cleanly and structurally untangle state change analysis, application, and subscription logic into their own arms.
904−
905−For trivial apps, this might result in some arms with trivial code. Though it may feel like writing cruft, it makes understanding the app just as simple as it actually as. For more complex apps, all logic is no longer a big chunk of "what do we do when x happens?" Rather, it's a few smaller chunks, like "x happened, how does that change our state?" and "if our state changes like y, what does that mean for subscription z?" These are precisely the kinds of questions that application developers should be asked.
906−
907−
908−## As seen in new Gall
909−
910−Of course, for the above to be made into reality, Gall will need to see some changes. Let's outline the new structures and the arms they get passed between.
911−
912−### Structures
913−
914−This wouldn't be Urbit if we didn't have cool terminology for people to learn. These ones are (for the most part) semantically sensible, and you might already see how they relate to the story above.
915−
916−`brain`: application state.
917−`delta`: change to application state.
918−`opera`: side-effect, operation, move.
919−`query`: request (to an app) for data on a specific path.
920−`prize`: query result.
921−`rumor`: change to a query result.
922−
923−These should be fairly straightforward. Like packets are to Urbits, `delta`s are to `brain`s and `rumor`s are to `prize`s. If one diligently updates the `prize` they received using all the `rumor`s that are relevant to it, they will always have the same `prize` as if they queried for it all over again.
924−
925−### Arms
926−
927−This also wouldn't be Urbit if we couldn't boil that down to a few simple pseudocode functions. Let's try, shall we?
928−
929−```hoon
930−++ bake |= {brain delta} ^- {brain opera}
931−++ peek |= {brain query} ^- (unit (unit prize))
932−++ feel |= {query delta} ^- (unit rumor)
933−++ gain |= {prize rumor} ^- prize
934−
935−:: for any given brain, delta and query:
936−.= (peek brain:(bake brain delta) query)
937− (gain rumor:(feel query delta) prize:(peek brain query))
938−```
939−
940−There. In the first three arms we already have the bulk of new Gall! `++gain` won't be part of it, since most applications don't need to keep track of `prize`s directly. Those that do may still implement and hook it up themselves though.
941−
942−Of course, these aren't all of the new Gall arms. Most important to still mention is `++leak`, which takes a `ship` and `query` and checks if the former has permission to ask for the latter.
943−
944−There's also `++look` for asynchronous reads, `++hear` for subscription updates (rumors), `++fail` for dealing with process errors, `++cope` for dealing with transaction results, and `++pour` for dealing with responses from Arvo.
945−`++prep`, `++poke` and `++pull` continue to function as they do right now.
946−
947−For a more verbose specification of all of these, see the new Gall spec.
948−
949−
950−## By example
951−
952−To help solidify this and see what this would looks like in the wild, let's make a very simple example app. It's a counter that can go up and down, and can be queried for its value, or whether or not its value is a multiple of x. First we write all the structures that will support our app, and then we implement the arms that operate on them.
953−(The app code in its entirety can be found [here](example).)
954−
955−### State & deltas
956−
957−Below is the application state, and the deltas we'll be using to modify it.
958−
959−```hoon
960−|%
961−++ brain {num/@ud $~} :< application state
962−++ delta :> state change
963− $% {$increment $~} :< +1
964− {$decrement $~} :< -1
965− == ::
966−```
967−
968−Fairly simple, right? We store a number, and every change either in- or decrements it.
969−
970−### Queries & rumors
971−
972−Let's also define the queries we'll be supporting, their results, and the changes to their results. Instead of only allowing people to query the current number, let's make it a tad more interesting by allowing them to query whether or not the current number is a multiple of something.
973−
974−```hoon
975−++ query :> valid queries
976− $% {$number $~} :< current number
977− {$mul-of val/@ud} :< is num multiple of?
978− == ::
979−++ prize :> query results
980− $% {$number num/@ud} :< /number
981− {$mul-of mul/?} :< /mul-of
982− == ::
983−++ rumor :> query result changes
984− $% {$number delta} :< /number
985− {$mul-of mul/?} :< /mul-of
986− == ::
987−--
988−```
989−
990−You'll see the `rumor` for a `/number` query just contains a delta. In this specific case, a change in state maps directly to a change to `prize`. For `/mul-of` queries, things aren't that simple.
991−
992−### Responding to queries
993−
994−Now, let's implement all the arms that will be called as things start happening. First, we want to implement `++leak`, which checks if a given `ship` is allowed to make a certain `query`. In this case, we're fine with everyone checking out our application's data.
995−
996−```hoon
997−|_ {bol/bowl brain}
998−::
999−++ leak :> read permission
1000− |= {who/ship qer/query}
1001− ^- ?
1002− & :: everyone's allowed
1003−```
1004−
1005−Next, let's create the `prize`s for the folks that make it through `++leak`. We'll be producing a `(unit (unit prize))` so we can potentially say `~` for "unavailable" and `[~ ~]` for "invalid query."
1006−
1007−```hoon
1008−++ peek :> synchronous read
1009− |= qer/query
1010− ^- (unit (unit prize))
1011− ?- -.qer
1012− $number ``[%number num]
1013− $mul-of ?: =(0 mul.qer) [~ ~]
1014− ``[%mul-of =(0 (mod num mul.qer))]
1015− ==
1016−```
1017−
1018−
1019−### Updating state & query results
1020−
1021−Our app can be queried! If they're interested enough, they'll want to receive updates on that whenever relevant state changes. First, let's see how state changes happen. We still have regular old `++poke` arms, let's use that to prompt our application to change its state.
1022−
1023−```hoon
1024−++ poke-loob :> regular old poke
1025− |= inc/?
1026− ^- (list delta)
1027− :_ ~
1028− ?: inc [%increment ~]
1029− [%decrement ~]
1030−::
1031−++ bake :> apply delta to state
1032− |= del/delta
1033− ^- (quip opera +>)
1034− :- ~
1035− ?- -.del
1036− $increment +>(num +(num))
1037− $decrement +>(num (dec num))
1038− ==
1039−```
1040−
1041−`delta`s get redirected into `++bake` so that our state can get changed as described. After this happens the same `delta`s get, for each active query, routed into `++feel`. That then figures out what the `rumor` relevant to the query is, if applicable.
1042−
1043−```hoon
1044−++ feel :> delta to rumor
1045− |= {qer/query del/delta}
1046− ^- (unit rumor)
1047− ?- -.qer
1048− $number
1049− `[%number del]
1050− ::
1051− $mul-of
1052− :: since we only want to send a rumor if result
1053− :: changed, we need to deduce the old state from
1054− :: the current state and the delta. depends on the
1055− :: fact that state changes before ++feel. funky!
1056− :: we could, of course, store mul/? in state, and
1057− :: make a delta for it, but should we need to?
1058− =/ old
1059− .= 0
1060− %+ mod
1061− ?- -.del
1062− $increment (dec num)
1063− $decrement +(num)
1064− ==
1065− mul.qer
1066− =/ new =(0 (mod num mul.qer))
1067− ?: =(old new) ~
1068− `[%mul-of new]
1069− ==
1070−```
1071−
1072−As we saw earlier, for `/number` queries the `delta`s match one-on-one with the relevant `rumor`s. For `/mul-of` queries we do a little bit of work to see if anything actually changed. No need to send a `rumor` if it hasn't.
1073−
1074−
1075−## Criticism
1076−
1077−- Where event arms currently get passed a `wire`, and the new Gall described above passes them a custom `query` structure, the original new Gall spec gave them `(list coin)`, a "pre-parsed wire". These structures (eg `[%$ p=[p=~.ud q=123]]`) are uncomfortable to work with. Even with a "coin list parsing library" it still doesn't feel ideal. Because of custom structures being easier to work with than lists of `++knot`s or `++coin`s, writing a `++path-to-query` arm by hand is a small cost for huge gains.
1078−
1079−- Why do `prize` units mean what they do? One would expect `~` to mean "invalid" and `[~ ~]` to mean "unavailable" as opposed to the other way around.
1080−
1081−- The original new Gall spec mentions output lists (like `(list delta)` etc.) to be in reverse order. This was done because adding to the head of a list (`[item list]`) is easier than appending to the tail of a list (`(weld list [item ~])` or other). While it's technically easier to produce a list in reverse order, semantically it's yet another thing to keep in mind. Luckily, most of the "add to x, produce all of it later" code is set-and-forget, so probably not a huge deal. But do we really fear a few stray `++flop`s that much?
1082−
1083−- There's some weirdness with relation to relying on old state in `++feel` to determine whether a query result actually changed. Just relying on state in general for delta-to-rumor conversion may or may not violate the new Gall spec.
1084−
1085−- The original new Gall spec specifies `++leak` as taking a `(unit (set ship))`, where `~` means public. Is there a use case for checking more than just a single ship?
1086−
1087−- Gall should probably cache `++feel` results during a single pass, to avoid the cycles of generating what it can be certain of is the same `(unit rumor)`. (But then for eg `/circle/nom/13` and `/circle/nom/14` it would still recalculate. Better than nothing.)
1088−
1089−
1090−## The original new-Gall spec
1091−
1092−`~sorreg-namtyv`
1093−
1094−```hoon
1095−=> |%
1096− --
1097−|* $: :> vinyl: historical state (including version)
1098− :> brain: working state of the application (not including version)
1099− :> delta: grain of change across all state
1100− :> prize: (pair mark noun) for namespace value
1101− :> rumor: (pair mark noun) for namespace diff
1102− :> opera: (pair bone card) for operation (old ++move)
1103− :>
1104− vinyl/mold
1105− brain/mold
1106− delta/mold
1107− prize/mold
1108− rumor/mold
1109− opera/mold
1110− ==
1111−|_ $: :> ops: pending operations, in reverse order
1112− :> ego: current state
1113− :>
1114− ops/(list opera)
1115− ego/brain
1116− ==
1117−:: :: ++bake
1118−++ bake :< apply delta
1119− |= $: :> del: change
1120− :>
1121− del/delta
1122− ==
1123− :> core after change (including operations)
1124− ^- _+>
1125− !!
1126−:: :: ++cope
1127−++ cope :< transaction result
1128− |= $: :> weg: forward identity
1129− :> het: success or error report
1130− :>
1131− weg/(list coin)
1132− het/(unit tang)
1133− ==
1134− :> actions in reverse order
1135− :>
1136− ^- (list delta)
1137− !!
1138−:: :: ++fail
1139−++ fail :< process error
1140− |= $: :> why: error dump
1141− :>
1142− why/tang
1143− ==
1144− :> actions in reverse order
1145− :>
1146− ^- (list delta)
1147− !!
1148−:: :: ++feel
1149−++ feel :< update
1150− |= $: :> del: change
1151− :> pex: preparsed path, inside-first
1152− :>
1153− del/delta
1154− pex/(list coin)
1155− ==
1156− :> query updates in reverse order
1157− :>
1158− ^- (list rumor)
1159− !!
1160−:: :: ++hear
1161−++ hear :< subscription update
1162− |= $: :> weg: forward identity
1163− :>
1164− weg/(list coin)
1165− ==
1166− :> actions in reverse order
1167− :>
1168− ^- (list delta)
1169− !!
1170−:: :: ++pull
1171−++ pull :< subscription cancel
1172− |= $: :> weg: forward identity
1173− :> het: error report, if any
1174− :>
1175− weg/(list coin)
1176− het/(unit tang)
1177− ==
1178− :> actions in reverse order
1179− :>
1180− ^- (list delta)
1181− !!
1182−:: :: ++leak
1183−++ leak :< check access
1184− |= $: :> lec: leakset (~ means public)
1185− :> pex: preparsed path, inside-first
1186− :>
1187− lec/(unit (set ship))
1188− pex/(list coin)
1189− ==
1190− :> if path `pex` is visible to ships in `lec`
1191− ^- ?
1192− !!
1193−:: :: ++load
1194−++ look :< asynchronous read
1195− |= $: :> pex: preparsed path, inside-first
1196− :>
1197− pex/(list coin)
1198− ==
1199− :> actions in reverse order
1200− ^- _+>
1201− !!
1202−:: :: ++prep
1203−++ prep :< load system
1204− |= $: old/vinyl
1205− ==
1206− :> core after boot
1207− ^- _+>
1208− !!
1209−:: :: ++peek
1210−++ peek :< synchronous read
1211− |= $: :> pex: preparsed path, inside-first
1212− :>
1213− pex/(list coin)
1214− ==
1215− :> value at `pec`; ~ for unavailable, [~ ~] for invalid
1216− :>
1217− ^- (unit (unit prize))
1218− !!
1219−:: :: ++poke
1220−++ poke :< generic poke
1221− |= $: :> ost: opaque cause
1222− :> msg: message with mark and vase
1223− :>
1224− ost/bone
1225− msg/cage
1226− ==
1227− :> actions in reverse order
1228− :>
1229− ^- (list delta)
1230− !!
1231−:: :: ++pour
1232−++ pour :< arvo response
1233− |= $: :> weg: forward identity
1234− :> sin: response card
1235− :>
1236− weg/(list coin)
1237− sin/sign
1238− ==
1239− :> actions in reverse order
1240− :>
1241− ^- (list delta)
1242− !!
1243−--
1244−```
1245−
1246−## A new-Gall example app
1247−
1248−```hoon
1249−:: counter app
1250−:: new gall example, may or may not compile.
1251−::
1252−|%
1253−++ query :> valid queries
1254− $% {$number $~} :< current number
1255− {$mul-of val/@ud} :< is num multiple of?
1256− == ::
1257−++ prize :> query results
1258− $% {$number num/@ud} :< /number
1259− {$mul-of mul/?} :< /mul-of
1260− == ::
1261−++ rumor :> query result changes
1262− $% {$number delta} :< /number
1263− {$mul-of mul/?} ::TODO or just flip? :< /mul-of
1264− == ::
1265−:: the above would ordinarily be placed in sur/, ::
1266−:: since other apps might want to use it. ::
1267−++ brain {num/@ud $~} :< application state
1268−++ delta :> state change
1269− $% {$increment $~} :< +1
1270− {$decrement $~} :< -1
1271− == ::
1272−--
1273−::
1274−|_ {bol/bowl brain}
1275−::
1276−++ leak :> read permission
1277− |= {who/ship qer/query}
1278− ^- ?
1279− & :: everyone's allowed
1280−::
1281−++ peek :> synchronous read
1282− |= qer/query
1283− ^- (unit (unit prize))
1284− ?- -.qer
1285− $number ``[%number num]
1286− $mul-of ?: =(0 mul.qer) [~ ~]
1287− ``[%mul-of =(0 (mod num mul.qer))]
1288− ==
1289−::
1290−++ poke-loob :> regular old poke
1291− |= inc/?
1292− ^- (list delta)
1293− :_ ~
1294− ?: inc [%increment ~]
1295− [%decrement ~]
1296−::
1297−++ bake :> apply delta to state
1298− |= del/delta
1299− ^- (quip opera +>)
1300− :- ~
1301− ?- -.del
1302− $increment +>(num +(num))
1303− $decrement +>(num (dec num))
1304− ==
1305−::
1306−++ feel :> delta to rumor
1307− |= {qer/query del/delta}
1308− ^- (unit rumor)
1309− ?- -.qer
1310− $number
1311− `[%number del]
1312− ::
1313− $mul-of
1314− :: since we only want to send a rumor if result
1315− :: changed, we need to deduce the old state from
1316− :: the current state and the delta. depends on the
1317− :: fact that state changes before ++feel. funky!
1318− :: we could, of course, store mul/? in state, and
1319− :: make a delta for it, but should we need to?
1320− =/ old
1321− .= 0
1322− %+ mod
1323− ?- -.del
1324− $increment (dec num)
1325− $decrement +(num)
1326− ==
1327− mul.qer
1328− =/ new =(0 (mod num mul.qer))
1329− ?: =(old new) ~
1330− `[%mul-of new]
1331− ==
1332−::
1333−:: not pictured: ++path-to-query
1334−--
1335−```
learn/azimuth.mddeleted−12
@@ -1,12 +0,0 @@
1−+++
2−title = "Azimuth"
3−weight = 2
4−template = "doc.html"
5−aliases = ["/docs/learn/azimuth"]
6−+++
7−
8−Azimuth is a general-purpose public-key infrastructure (PKI) on the Ethereum blockchain, used as a decentralized ledger for Urbit identities that we call **Urbit identities**. Having an identity is necessary to use the Urbit network, which makes it important to have a neutral ledger to determine who owns what.
9−
10−Azimuth is not, however, part of the Arvo stack. Azimuth is a parallel system that be used as a generalized identity system for other projects. Azimuth "touches" the Urbit ecosystem when an identity is used to boot a virtual computer on the Urbit network for the first time. When that happens, the identity considered **linked** to Azimuth and the identity’s full powers are available for use. Once an identity is linked, it cannot be unlinked.
11−
12−A metaphor might make the relationship between these two systems easier to understand: Azimuth is the bank vault that stores the deed to your house. The Urbit network is the neighborhood that you live in.
learn/hoon/hoon-tutorial/_index.md → learn/hoon-tutorial/_index.mdrenamed+3−1
@@ -47,7 +47,9 @@ Chapter 2 covers the type system, and writing apps, and the workings of the Arvo
4747
4848## Other Resources
4949
50−Consult the [standard libary documentation](@/docs/hoon/library/_index.md) or [rune reference](@/docs/hoon/hoon-expressions/_index.md) to look up any unknown rune or standard library function you don't understand.
50+Want to know how to style your code? Check out the [style guide](../style).
51+
52+Consult the [standard library documentation](@/docs/hoon/library/_index.md) or [rune reference](@/docs/hoon/hoon-expressions/_index.md) to look up any unknown rune or standard library function you don't understand.
5153
5254As you work your way through these lessons you may want to work on example problems from the [Hoon Workbook](@/docs/hoon/workbook/_index.md) for practice. Once you finish the lessons here you may want to write more versatile Hoon programs which can make use of more of your urbit's environment, in which case you'll want to check out the [Generators](@/docs/hoon/hoon-tutorial/generators.md) documentation. Or maybe you'd like to learn how to write a [Gall app](@/docs/arvo/gall.md). Learn about [Udon](@/docs/arvo/sail-and-udon.md), Urbit's stripped-down version of Markdown. Or learn [Sail](@/docs/arvo/sail-and-udon.md), a subset of Hoon used for generating XML nodes.
5355
learn/hoon/hoon-tutorial/ackermann.md → learn/hoon-tutorial/ackermann.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/arms-and-cores.md → learn/hoon-tutorial/arms-and-cores.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/atoms-auras-and-simple-cell-types.md → learn/hoon-tutorial/atoms-auras-and-simple-cell-types.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/bank-account.md → learn/hoon-tutorial/bank-account.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/caesar.md → learn/hoon-tutorial/caesar.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/conditionals.md → learn/hoon-tutorial/conditionals.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/doors.md → learn/hoon-tutorial/doors.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/egg-timer.md → learn/hoon-tutorial/egg-timer.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/fibonacci.md → learn/hoon-tutorial/fibonacci.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/gall.md → learn/hoon-tutorial/gall.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/gates.md → learn/hoon-tutorial/gates.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/generators.md → learn/hoon-tutorial/generators.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/hoon-syntax.md → learn/hoon-tutorial/hoon-syntax.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/iron-polymorphism.md → learn/hoon-tutorial/iron-polymorphism.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/lead-polymorphism.md → learn/hoon-tutorial/lead-polymorphism.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/libraries.md → learn/hoon-tutorial/libraries.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/list-of-numbers.md → learn/hoon-tutorial/list-of-numbers.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/lists.md → learn/hoon-tutorial/lists.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/molds.md → learn/hoon-tutorial/molds.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/nouns.md → learn/hoon-tutorial/nouns.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/recursion.md → learn/hoon-tutorial/recursion.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/setup.md → learn/hoon-tutorial/setup.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/structures-and-complex-types.md → learn/hoon-tutorial/structures-and-complex-types.mdrenamed

The content is the same.

learn/hoon/style.md → learn/hoon-tutorial/style.mdrenamed+1−1
@@ -1,6 +1,6 @@
11+++
22title = "Hoon Style Guide"
3−weight = 3
3+weight = 100
44template = "doc.html"
55aliases = ["docs/learn/hoon/style/"]
66+++
learn/hoon/hoon-tutorial/the-subject-and-its-legs.md → learn/hoon-tutorial/the-subject-and-its-legs.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/trees-sets-and-maps.md → learn/hoon-tutorial/trees-sets-and-maps.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/type-checking-and-type-inference.md → learn/hoon-tutorial/type-checking-and-type-inference.mdrenamed

The content is the same.

learn/hoon/hoon-tutorial/type-polymorphism.md → learn/hoon-tutorial/type-polymorphism.mdrenamed

The content is the same.

learn/hoon/workbook/_index.md → learn/hoon-tutorial/workbook/_index.mdrenamed

The content is the same.

learn/hoon/workbook/bomb.md → learn/hoon-tutorial/workbook/bomb.mdrenamed

The content is the same.

learn/hoon/workbook/digits.md → learn/hoon-tutorial/workbook/digits.mdrenamed

The content is the same.

learn/hoon/workbook/eightball.md → learn/hoon-tutorial/workbook/eightball.mdrenamed

The content is the same.

learn/hoon/workbook/traffic-light.md → learn/hoon-tutorial/workbook/traffic-light.mdrenamed

The content is the same.

learn/hoon/_index.mddeleted−24
@@ -1,24 +0,0 @@
1−+++
2−title = "Hoon"
3−weight = 2
4−sort_by = "weight"
5−template = "sections/docs/chapters.html"
6−aliases = ["docs/learn/hoon/"]
7−+++
8−Hoon is a high-level, statically typed, functional programming language, custom-designed for use with Urbit. For a functional language it has a surprisingly imperative style, and mastering it doesn't require knowing any advanced mathematics.
9−
10−Hoon is an unusual language in several respects, both in syntax and semantics. It uses runes (i.e., ASCII digraphs) in place of keywords, and the spacing rules are a bit strict. A great deal can be expressed in few lines, though excessively compressed code tends to be hard to read. Hoon has surprisingly simple semantics, but mastering it requires learning concepts that don't have close analogues in other languages.
11−
12−In this section, you'll find useful resources on the Hoon programming language.
13−
14−## [The Hoon Tutorial](@/docs/hoon/hoon-tutorial/_index.md)
15−
16−This section is the place to learn the fundamentals of the language, from the very beginning.
17−
18−## [The Hoon Workbook](@/docs/hoon/workbook/_index.md)
19−
20−The workbook lets you dive right into code walkthroughs.
21−
22−## [The Style Guide](@/docs/hoon/style.md)
23−
24−This guide shows you how to write code in the correct way.
using/sail-and-udon.md → learn/sail-and-udon.mdrenamed

The content is the same.

using/ship-troubleshooting.md → learn/ship-troubleshooting.mdrenamed

The content is the same.

reference/arvo-glossary.md+1−1
@@ -328,7 +328,7 @@ with this functionality learn what syntax is kosher.
328328
329329### desk
330330
331−A desk is independently revision-controlled branch of urbit filesystem.
331+A desk is independently revision-controlled branch of urbit filesystem.
332332
333333_See [filesystem](@/operations.md#filesystem) and [Clay](@/docs/arvo/clay.md)._
334334
using/_index.mddeleted−18
@@ -1,18 +0,0 @@
1−+++
2−title = "Using"
3−weight = 2
4−sort_by = "weight"
5−template = "sections/docs/chapters.html"
6−+++
7−This section contains guides to using your urbit.
8−
9−- [Creating a Development Ship](creating-a-development-ship) will show you how to set up the environment for coding on Urbit.
10−- [Creating a Comet](creating-a-comet) will show you how to create a comet: quick, disposable 128-bit identities on the Urbit network.
11−- [Admin and Operation](admin) is a guide to the basic commands used to interact with your ship.
12−- [Messaging](messaging) tells you how to use Talk, our chat system.
13−- [Shell](shell) is a guide to using Dojo, our command-line interface.
14−- [Introduction to the Filesystem](filesystem) explains the basics of using use Clay, our revision-control filesystem.
15−- [Source Layout](layout) walks you through the various directories of the Arvo operating system.
16−- [Sail](sail) is a guide to Sail: Hoon markup that's used to build web pages with XML.
17−- [Udon](udon) is a guide to Udon, which is our take on Markdown.
18−- [Generators](generators) will explain how to use the "generator," a kind of file that's the easiest way to run Hoon programs.
using/admin.mddeleted−213
@@ -1,213 +0,0 @@
1−+++
2−title = "Admin and Operations"
3−weight = 2
4−template = "doc.html"
5−+++
6−Your urbit (also called your _ship_) is a persistent Unix process that you
7−mainly control from the console. For some things, a browser will also work.
8−
9−## Shutdown
10−
11−You can turn your urbit off with `Ctrl-d` from the Talk or Dojo prompts.
12−
13−You can force-quit your urbit with `Ctrl-z` from anywhere.
14−
15−## Restart
16−
17−To restart your urbit simply pass the name of your pier:
18−
19−```
20−$ urbit some-planet
21−```
22−
23−or
24−
25−```
26−$ urbit comet
27−```
28−
29−## Logging
30−
31−To log an urbit's command line output to a file, use `script`:
32−
33−```
34−$ script urbit.log urbit your-urbit
35−```
36−
37−## Moving your pier
38−
39−Piers are designed to be portable, but it _must_ be done while the urbit
40−is turned off. Urbit networking is stateful, so you can't run two copies
41−of the same urbit in two places.
42−
43−To move a pier, simply move the contents of the directory it lives in.
44−To keep these files as small as possible we usually use the `--sparse`
45−option in `tar`. With a pier `your-urbit/`, something like this should work:
46−
47−```
48−tar -Scvzf ~/your-urbit.tar.gz ~/your-urbit/
49−scp your-old-server:~/your-urbit.tar.gz your-new-server:~
50−```
51−
52−Then to unzip it, on your other Unix server, run:
53−
54−```
55−tar xfvz your-urbit.tar.gz
56−```
57−
58−Delete the tar file, and, after installing Urbit on your new server,
59−start your urbit back up with:
60−
61−```
62−urbit your-urbit
63−```
64−
65−## Console
66−
67−Your Urbit terminal is separated into two parts: the prompt (the bottom
68−line) and the record (everything above that). The record is shared; all
69−the output from all the apps in your command set appears in it. The
70−prompt is multiplexed.
71−
72−In the CLI, Urbit apps can process your input before you hit return. To
73−see this in action try entering `)` as the first character at the Dojo
74−prompt. Since there is no Dojo command or Hoon expression that starts
75−with ')', the Dojo rejects it.
76−
77−`Ctrl-x` - Switches the prompt between running console apps.
78−
79−`Ctrl-c` - Crash current event. Processed at the Unix layer and prints a stack.
80−trace.
81−
82−`Ctrl-d` - From Talk or Dojo, stops your Urbit process.
83−
84−`Ctrl-z` - Stops the Urbit process from _anywhere_.
85−
86−`↑` / `↓` - History navigation.
87−
88−`Backspace` - Interrupts running commands. For example, if you have begun a multiline Hoon expression and then press backspace, it will discard the already-written code, or if you press backspace while a request is still pending it will cancel it and print `! cancel /hand`.
89−
90−The following emacs-style key bindings are available:
91−
92−```
93−Ctrl-a Cursor to beginning of the line (Home)
94−Ctrl-b Cursor one character backward (left-arrow)
95−Ctrl-e Cursor to the end of the line (End)
96−Ctrl-f Cursor one character forward (right-arrow)
97−Ctrl-g Beep; cancel reverse-search
98−Ctrl-k Kill to end of line
99−Ctrl-l Clear the screen
100−Ctrl-n Next line in history (down-arrow)
101−Ctrl-p Previous line in history (up-arrow)
102−Ctrl-r Reverse-search
103−Ctrl-t Transpose characters
104−Ctrl-u Kill to beginning of line
105−Ctrl-y Yank from kill buffer
106−```
107−
108−Full coverage of the Urbit shell, the Dojo is covered in the
109−[Shell walkthrough](@/docs/using/shell.md).
110−
111−## Web
112−
113−On startup Urbit tries to bind to `localhost:80`. If you're already
114−running something on port `80` -- such as any other HTTP server, or another urbit -- you'll find the urbit
115−that you just started on `8080`, `8081`, and so on. For planets only, we also proxy web
116−domains through Urbit's own servers. Any planet `~your-urbit` is also at
117−`your-urbit.arvo.network`, but only after you [set up DNS](../dns-proxying).
118−
119−Your urbit serves a simple homepage from `http://localhost` or
120−`https://your-urbit.arvo.network` that should be self-explanatory. Since
121−our HTTPS isn't audited / battle tested, we just call it "secure" HTTPS.
122−You can find that on `8443`. Or `8444` (and so on) if you're already
123−running something on `8443`.
124−
125−## Moons {#moons}
126−
127−Planets can spawn moons, which are meant for connected devices: phones, smart
128−TVs, digital thermostats. The basic idea is: your planet runs permanently in a
129−data center somewhere and moons run on all your devices. Each planet can issue
130−~4 billion (`2^32`) moons.
131−
132−To generate a random moon from your planet, run:
133−
134−```
135−~sampel-palnet:dojo> +moon
136−moon: ~faswep-navred-sampel-palnet
137−\/~.0wd.rZU67.3jSny.z1vda.7sr-s.EL1Jt.-76Nj.ugXxY.g6-Bx.HvKZl.G53oV.hPnXe.7U3E3.J4CEe.MEVuq.~08Nt\/
138− .zNT0K.k-Ab~.Nn90d.OZ2fT.-XlQQ.Cfrkf.y6~K0.2Do09.EaE3W.BSK--.5Q~9N.y3QIP.eokH-.T6lwz.gg8MX.7LU5
139− x.DJROE.IzQsy.OXOLr.IOE3a.-QI40.H5ukK.Cw-u4.uxE-y.V-o1F.Q84g0.effP0.de01g.600g1
140−\/ \/
141−```
142−
143−You must manually edit the output of `+moon` to get
144−the correct format for the `<key>`:
145−
146−- strip out the `\/`
147−
148−- combine into one line, omitting spaces
149−
150−- trim the leading `~.`
151−
152−`<key>` would be `0wd.rZU67.3jSny.z1vda ... <snip> ... effP0.de01g.600g1`
153−in this example.
154−
155−Put `<key>` in a file and that file becomes `<keyfile>`.
156−
157−Another way of generating `<keyfile>` is:
158−
159−```
160−~sampel-palnet:dojo> @moon/key +moon
161−moon: ~faswep-navred-sampel-palnet
162−```
163−
164−`<keyfile>` will be at `path/to/sampel-palnet/.urb/put/moon.key`
165−and does not need editing to be used with the `-k` option.
166−
167−You can use the resulting output in the same installation flow from the
168−[Booting a Ship](@/docs/getting-started/booting-a-ship.md) guide, following the same scheme as for booting a planet. That scheme is:
169−
170−```
171−$ urbit -w <moonname> -G <key> -c <piername>
172−```
173−
174−or
175−
176−```
177−$ urbit -w <moonname> -k <keyfile> -c <piername>
178−```
179−
180−The `-c <piername>` argument is not required, but it is recommended; otherwise,
181−the resulting directory is a rather unwieldy moon name.
182−
183−Here's how an example moon might be booted:
184−
185−```
186−$ urbit -w faswep-navred-sampel-palnet -G <key> -c mymoon
187−```
188−
189−or
190−
191−```
192−$ urbit -w faswep-navred-sampel-palnet -k <keyfile> -c mymoon
193−```
194−
195−Moons are automatically synced to their parent `%kids` desk, and can control
196−applications on their parent planet using `|link`. You can read more about
197−those operations in the [filesystem](@/docs/using/filesystem.md) and [console](@/docs/using/shell.md)
198−walkthroughs, respectively.
199−
200−
201−## Continuity breaches
202−
203−While the Urbit network is in this alpha state, we sometimes have to
204−reboot the whole network. This happens either when major changes need
205−to be shipped or we hit a bug that can't be fixed over the air.
206−
207−Because Urbit networking is stateful we call this a _continuity breach_.
208−Everything has to be restarted from scratch. Your pier will continue to
209−function after we have breached, but it wont connect to the rest of the
210−Urbit network.
211−
212−When this happens, back up any files you'd like to save, shut down your
213−urbit and recreate it (as if you were starting for the first time).
using/arvo-network-dns.mddeleted−52
@@ -1,52 +0,0 @@
1−+++
2−title = "Arvo.network DNS"
3−weight = 2
4−template = "doc.html"
5−+++
6−
7−We have a system that lets you request a domain name for your ship in the form of `ship.arvo.network`, where `ship` is your ship's name minus the `~`. This allows users to access their ships remotely using Landscape, our graphical web interface.
8−
9−Stars and planets follow the same process DNS proxying process, and galaxies have their own requirements. Moons and comets are not supported.
10−
11−## Planets and Stars
12−
13−For a planet or star's DNS proxying request to be made and fulfilled, they must be hosting their ship someplace with a public IP address, and its HTTP server must be listening on port 80.
14−
15−To get `ship.arvo.network` on a planet or star, you must set up DNS routing with its parent ship by starting the `:dns` app.
16−To do so, simply run this command in your ship's Dojo:
17−
18−```
19−> :dns|request
20−```
21−
22−You'll then be prompted to enter the public IP address of your ship. You can also pass the IP address as an argument, using the .0.0.0.0 (`@if`) syntax. For example:
23−
24−```
25−> :dns|request .1.2.3.4
26−```
27−
28−`:dns`, running locally, will make an HTTP request to that IP address on port 80 to confirm that it is itself available at that IP and port. If that fails, you'll receive a `%bail-early` message in `:talk`; this request will retry a few times. If the self-check is successful, the request is relayed to `~zod`, and you'll receive a message saying, `request for DNS sent to ~zod`. Once `~zod` has acknowledged receipt of the request, your local `:dns` app will send a `:talk` message saying `awaiting response from ~zod`.
29−
30−The request will be picked up shortly, and the `ship.arvo.network` DNS record will be set to the given IP address. Once that's setup, `~zod` will be notified, and `~zod` will, in turn, notify your ship. That ship will now try to verify that it can reach itself on `ship.arvo.network` over port 80. If it can't, it'll send a message saying `unable to access via ship.arvo.network`. If it can, it will configure itself with that domain, and say `confirmed access via ship.arvo.network`.
31−
32−Great! You're set up now. Try accessing your `ship.arvo.network` in your browser to use Landscape; we recommend using Chrome or Brave.
33−
34−## Galaxies
35−
36−Galaxies are already required to have separate DNS entry at galaxy.urbit.org. There's no automated process for getting that binding, so if you're a galaxy-holder, get in touch with us at support@urbit.org.
37−
38−There is a command for galaxies that will try to re-use their already-necessary Ames DNS entry for HTTPS:
39−
40−```
41−> :dns|auto
42−```
43−
44−This will make HTTP-requests to self-check availability over `galaxy.$AMES-DOMAIN` (currently galaxy.urbit.org), where `galaxy` is the galaxy's name minus the `~`.
45−
46−Otherwise, `:dns|auto` works the same as `:dns|ip` does with stars and planets: if it's available or unavailable, talk messages, and so on.
47−
48−## More Information
49−
50−Configuring a ship's domain causes the `:acme` app to request an HTTPS certificate for that domain from LetsEncrypt. Note that LetsEncrypt also requires that the HTTP server be listening on port 80. If the certificate request fails, `:acme` will send a `:talk` message with an explanation. Once the certificate is successfully retrieved, `:acme` will install it, causing the HTTP servers to restart. A secure server will be started on port 443 (the HTTPS default) if it's available. Otherwise, it will try 8443, and then increment to the next port until it can successfully bind one.
51−
52−The built-in logic for listening on port 80 similar. Urbit tries to bind port 80; if it cannot, it tries 8080, then increments until it can bind a port. Port 80 is available to unprivileged process on recent version of macOS. Otherwise, the process needs to either be run as root, or be given special permission (CAP\_NET_BIND on Linux).
using/creating-a-comet.mddeleted−29
@@ -1,29 +0,0 @@
1−+++
2−title = "Creating a Comet"
3−weight = 1
4−template = "doc.html"
5−+++
6−
7−**Comets** are urbits whose names are 128-bits or 16 syllables, such as:
8−
9−`~dasres-ragnep-lislyt-ribpyl--mosnyx-bisdem-nidful-marzod`
10−
11−Comet names aren't quite as memorable as others, but they're disposable identities that anyone can make for free to join the live network.
12−
13−## Booting a Comet
14−
15−To boot your comet, go into the command line and run the following command from the directory that was created during Urbit installation:
16−
17−```
18−$ urbit -c mycomet
19−```
20−
21−This will take a few minutes and will spin out a bunch of boot messages. Toward the end, you'll see something like:
22−
23−```
24−ames: on localhost, UDP 31337.
25−http: live (insecure, public) on 8080
26−http: live ("secure", public) on 8443
27−http: live (insecure, loopback) on 12321
28−~dasres_marzod:dojo>
29−```
using/creating-a-development-ship.mddeleted−69
@@ -1,69 +0,0 @@
1−+++
2−title = "Creating a Development Ship"
3−weight = 0
4−template = "doc.html"
5−+++
6−
7−To do work with Hoon and with the system, we recommended using a "fake" ship -- one not connected to the network.
8−
9−Because such a ship has no presence on the network, you don't need an Azimuth identity for its purposes. You just need to have [installed our software](@/docs/getting-started/installing-urbit.md).
10−
11−To create a fake ship named `~zod`, run the command below. You can replace `zod` with any valid Urbit ship-name.
12−
13−```
14−urbit -F zod
15−```
16−
17−Now you should see a block of boot messages, starting with the Urbit version number. Welcome!
18−
19−## Basic Operations
20−
21−Welcome to your ship! There's a few things you should do to become oriented.
22−
23−### The Dojo
24−
25−Let's try out the Dojo, the Arvo command line and Hoon REPL:
26−
27−```
28−~sample-planet:dojo> (add 2 2)
29−```
30−
31−Should produce:
32−
33−```
34−> (add 2 2)
35−4
36−```
37−
38−Good.
39−
40−### Mounting
41−
42−Your ship's filesystem being "mounted" means that its filesystem can be interacted with through Unix. This makes things much easier for you.
43−
44−The Arvo filesystem isn't mounted to Unix by default. Switch to the Dojo prompt and run:
45−
46−```
47−~sample-planet:dojo> |mount %
48−```
49−
50−This should produce:
51−
52−```
53−> |mount %
54−>=
55−```
56−
57−which indicates that the command was processed.
58−
59−`|mount %` will cause a `home/` directory to appear inside your _pier_ folder in Unix (the "pier" is our shorthand for the directory whose name corresponds to your Azimuth point). Changes to these files can be committed to your pier by running `|commit %home` once you're done.
60−
61−### Shutting Down and Restarting
62−
63−You can turn your ship off with `ctrl-d` from the Talk or Dojo prompts.
64−
65−To restart your ship, simply pass the name of your pier:
66−
67−```
68−urbit some-planet
69−```
using/filesystem.mddeleted−471
@@ -1,471 +0,0 @@
1−+++
2−title = "Filesystem"
3−weight = 5
4−template = "doc.html"
5−+++
6−Urbit has its own revision-controlled filesystem, Clay. Clay is a typed, global,
7−referentially transparent namespace. An easy way to think about it is like typed
8−`git`.
9−
10−The most common way to use Clay is to mount a Clay node in a Unix directory. The mounted directory is always at the root of your
11−pier directory.
12−
13−## Quickstart
14−
15−This quick-start guide will walk you through some common commands. Follow along
16−using your Dojo. When you get a `>=` message after entering a command, this means
17−that the command was successful.
18−
19−When developing it's a good idea to use a separate desk. Create a `%sandbox`
20−desk based on the `%home` desk:
21−
22−```
23−~your-urbit:dojo> |merge %sandbox ~your-urbit %home
24−```
25−
26−Running `our` produces your ship-name, meaning that you can run the following
27−command instead of typing out the entire thing. Useful for comets, due to their
28−very long names.
29−
30−```
31−~your-urbit:dojo> |merge %sandbox our %home
32−```
33−
34−Most of the time we want to use Clay from Unix. Mount the entire contents of
35−your `sandbox` desk to Unix:
36−
37−```
38−~your-urbit:dojo> |mount /=sandbox=
39−```
40−
41−To explore the filesystem from inside Urbit `+ls` and `+cat` are useful. `+ls`
42−displays files in the current directory, and `+cat` displays the contents of
43−a file.
44−
45−We can use `%` to mean "current directory." The result of the command below
46−is just like using `ls` in a Unix terminal.
47−
48−```
49−~your-urbit:dojo> +ls %
50−```
51−
52−Notice how `+cat %` does the same thing. That's because everything in Clay,
53−including directories, is a file.
54−
55−Let's explore the `/web` directory of the `%sandbox` desk.
56−
57−```
58−~your-urbit:dojo> +ls /=sandbox=/web
59−```
60−
61−Let's see the contents of `/=sandbox=/web/404/hoon`:
62−
63−```
64−~your-urbit:dojo> +cat /=sandbox=/web/404/hoon
65−```
66−
67−Now let's navigate to `/web` on `%sandbox` using `=dir`, which is like `cd` in Unix.
68−
69−```
70−~your-urbit:dojo> =dir /=sandbox=/web
71−```
72−
73−You'll notice that your prompt is now
74−`~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web>`.
75−
76−```
77−~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web> +ls %
78−```
79−
80−To change back to our home directory, we use `=dir` without any path.
81−
82−```
83−~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web> =dir
84−```
85−
86−Sync from your friend `~some-ship`'s `%experiment` desk to your
87−`%sandbox` desk:
88−
89−```
90−~your-urbit:dojo> |sync %sandbox ~some-ship %experiment
91−```
92−
93−If and when your sync is successful, you will receive a message:
94−
95−```
96−activated sync from %experiment on ~some-ship to %sandbox
97−```
98−
99−The ship that you sync from will get their own message indicating that you're
100−both connected as peers:
101−
102−```
103−; ~your-urbit is your neighbor.
104−```
105−
106−---
107−
108−## Manual
109−
110−### Paths
111−
112−A path in Clay is a list of URL-safe text, restricted to the characters
113−`[a z]`,`[0 9]`, `.`, `-`, `_`, and `~`. Formally this is a `(list knot)`,
114−meaning that each segment, delineated by `/`, is of the `knot` ASCII-text type.
115−In other words, paths are expressed as `/foo/bar/baz`. File extensions are
116−separated from file names with `/`, not `.`. Extensions are syntactically
117−identical to subdirectories, except that they must terminate the path.
118−
119−Paths begin with a piece of data called a `beak`. A beak is formally a
120−`(p=ship q=desk r=case)`; it has three components, and might look like
121−`/~dozbud-namsep/home/11`.
122−
123−The first `beak` component is `ship`, which is, as you might guess, the name of
124−an Urbit ship. The second component is `desk`, which is a workspace meant to
125−contain other directories; the default desk is `%home`. The third component is
126−`case`, which represents version information in various ways: date and time;
127−a version sequence, which is a value incremented by one whenever a file on the
128−given `desk` is modified; or an arbitrary plaintext label.
129−
130−You can find what your `beak` is at any given moment by
131−typing `%` in the Dojo and looking at the first three results.
132−
133−We use `beak`s because, unlike the current internet, the Urbit network uses a
134−global namespace. That means that a file named `example.hoon` in the `/gen`
135−directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
136−universal address to anyone else on the network:
137−`/~lodleb-ritrul/home/186/gen/example/hoon`. That, of
138−course, doesn't mean that everyone on the network has privileges to access that
139−path.
140−
141−The structure that combines a `beak` with further path information is called a
142−`beam`.
143−
144−#### Relative paths
145−
146−The `%` command, which we gestured at in the above section, represents the
147−**relative path**, which is the path where you are currently working. If your
148−working directory is just your home desk, indicated by the
149−prompt `~your-planet:dojo>`, then running the command below will print your
150−working directory's `beam` information: your `beak`, and a `~` that represents
151−the empty list since no path is present.
152−
153−```
154−~your-urbit:dojo> %
155−```
156−
157−`%`s can be stacked to indicate one level further up in the hierarchy for each
158−additional `%`. Try the following command:
159−
160−```
161−~your-planet:dojo> %%%
162−```
163−
164−You'll probably notice that it only has your ship name and the empty list. The
165−two additional `%`s abandoned the `case` and the `desk` information by moving
166−up twice the hierarchy.
167−
168−There are no local relative paths. `/foo/bar` must be written as
169−`%/foo/bar`.
170−
171−#### Substitution
172−
173−You don't need to write out the explicit path every time you want to reference
174−somewhere outside of your working directory. You can substitute `=` for the
175−segments of a path.
176−
177−Recall that a full address in the the Urbit namespace is a `beam`: the
178−`/ship/desk/case/path`. If you've switched to another desk before, you're
179−already familiar with substitution syntax:
180−
181−```
182−~your-urbit:dojo> =dir /=sandbox=
183−```
184−
185−The above command substitutes uses substitution to use your current `ship` and
186−`case`; only the `desk` argument, which is located between the other two, is
187−given something new. Without substitution, you would need to write:
188−
189−```
190−~your-urbit:dojo> =dir /~your-urbit/home/85
191−```
192−
193−Substitutions work the same way in `beak`s (the `ship/desk/case` part) and
194−paths. For example, if you are in the `/gen` directory, you can reference a file
195−in the `/app` directory like below. (`+cat` displays the contents of a file).
196−
197−```
198−~your-urbit:dojo> =dir %/gen
199−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> +cat /===/app/curl/hoon
200−```
201−
202−Note what was substituted out, and note that we don't need to separate `=` with
203−`/`.
204−
205−If we changed our working directory to something called `/gen/gmail`, we could
206−access a file called
207−
208−```
209−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %/gmail
210−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /===/app/=/split/hoon
211−```
212−
213−Because both paths share a directory named `/gmail` at the same position in the
214−address hierarchy -- which, if you recall, is just a `list` -- the above command
215−works!
216−
217−We can do the same thing between desks. If `%sandbox` has been merged with
218−`%home`, the following command will produce the same results as the above
219−command.
220−
221−```
222−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /=sandbox=/app/=/split/hoon
223−```
224−
225−Most commonly this is used to avoid having to know the current revision
226−number in the `dojo`: `/~lodleb-ritrul/home/~2018.10.2..00.35.44..d7e8/gen/example/hoon`
227−
228−#### Changing directories
229−
230−Change the working directory with `=dir`. It's our equivalent of the Unix `cd`.
231−
232−For example, the syntax to navigate to `/home/gen/ask` is:
233−
234−```
235−~your-urbit:dojo> =dir /=home=/gen/ask
236−```
237−
238−This command will turn your prompt into something like this:
239−
240−```
241−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask>
242−```
243−
244−Using `=dir` without anything else uses the null path, which returns you to
245−your home desk.
246−
247−```
248−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask> =dir
249−```
250−
251−Your dojo prompt will turn back into `~your-urbit:dojo>`.
252−
253−To go up levels in the path hierarchy, recall the relative path expression
254−`%`. Stacking them represents another level higher in the hierarchy than
255−the current working directory for each `%` beyond the initial. The command below
256−brings you one level up:
257−
258−```
259−~your-urbit:dojo> =dir %/gen
260−~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %%
261−```
262−
263−### Revision-control
264−
265−#### Mount
266−
267−Syntax: `|mount /clay/path [Unix-name]`
268−
269−Mount the `clay-path` at the Unix mount point `Unix-name`.
270−
271−**Examples:**
272−
273−```
274−|mount %/web
275−```
276−
277−Mounts `%/web` to `/web` inside your pier directory.
278−
279−```
280−|mount %/gen generators
281−```
282−
283−Mounts `%/gen` to `/generators` inside your pier directory.
284−
285−#### Unmount
286−
287−```
288−|unmount [clay-path || Unix-name]
289−```
290−
291−Unmount the path or name from Unix.
292−
293−**Examples:**
294−
295−```
296−|unmount %/web
297−```
298−
299−Unmounts the path `%/web` from whatever name it was mounted as.
300−
301−```
302−|unmount %generators
303−```
304−
305−Unmounts the Unix path `/generators`.
306−
307−#### Merge
308−
309−```
310−|merge desk beak[, =gem strategy]
311−```
312−
313−Merges a `beak` into a `desk` using an optional merge `strategy`.
314−
315−A `beak` is a ship-desk-case triple, encoded as a
316−path(`/~dozbud/home/2`)
317−
318−**Examples:**
319−
320−```
321−|merge %home-work /=home=, =gem %fine
322−```
323−
324−Merge `/=home=` into `%home-work` using merge strategy `%fine`.
325−
326−```
327−|merge %examples ~wacbex-ribmex %examples
328−```
329−
330−Merge the `%examples` desk from `~waxbex-ribmex`
331−
332−#### Sync
333−
334−```
335−|sync desk plot [plot-desk]
336−```
337−
338−Subscribe to continuous updates from remote `plot` on local `desk`.
339−`plot-desk` can specify the remote `desk` name. When omitted it is
340−defaulted to being the same as `desk`. Non-comet urbits have
341−`|sync %home ~parent %kids` automatically set up (where `~parent` is the
342−planet that issued a moon, the star that issued a planet, or the galaxy
343−that issued a star).
344−
345−**Examples:**
346−
347−```
348−|sync %home-local ~dozbud %home
349−
350−|sync %home ~doznec
351−```
352−
353−#### Unsync
354−
355−```
356−|unsync desk plot [plot-desk]
357−```
358−
359−Unsubscribe from updates from remote `plot` on local `desk` with
360−optional `plot-desk`. Arguments must match original `|sync` command.
361−
362−Example:
363−
364−```
365−|unsync %home-local ~dozbud %home
366−```
367−
368−#### Label
369−
370−```
371−|label desk name`
372−```
373−
374−Label the current version of `desk` `name`.
375−
376−Example:
377−
378−```
379−|label %home release
380−```
381−
382−### Merge strategies
383−
384−`%init` - Used if it's the first commit to a desk. Also can be used to
385−"reinitialize" a desk -- revision numbers keep going up, but the new
386−revision isn't necessarily a descendent of the previously numbered
387−version, allowing merges to be rerun.
388−
389−`%this` - Keep what's in Bob's desk, but join the ancestry.
390−
391−`%that` - take what's in Alice's desk, but join the ancestry. This is
392−the reverse of `%this`. This is different from `%init` because the new
393−commit has both sides in its ancestry.
394−
395−`%fine` - "fast-forward" merge. This succeeds if and only if one head is in the
396−ancestry of the other.
397−
398−`%meet`, `%mate`, and `%meld` - find the most recent common ancestor to
399−use as our merge base.
400−
401−A `%meet` merge only succeeds if the changes from the merge base to
402−Alice's head (hereafter, "Alice's changes") are in different files than
403−Bob's changes. In this case, the parents are both Alice's and Bob's
404−heads, and the data is the merge base plus Alice's changed files plus
405−Bob's changed files.
406−
407−A `%mate` merge attempts to merge changes to the same file when both
408−Alice and Bob change it. If the merge is clean, we use it; otherwise, we
409−fail. A merge between different types of changes -- for example,
410−deleting a file vs changing it -- is always a conflict. If we succeed,
411−the parents are both Alice's and Bob's heads, and the data is the merge
412−base plus Alice's changed files plus Bob's changed files plus the merged
413−files.
414−
415−A `%meld` merge will succeed even if there are conflicts. If there are
416−conflicts in a file, then we use the merge base's version of that file,
417−and we produce a set of files with conflicts. The parents are both
418−Alice's and Bob's heads, and the data is the merge base plus Alice's
419−changed files plus Bob's changed files plus the successfully merged
420−files plus the merge base's version of the conflicting files.
421−
422−`%auto` - meta-strategy. Check to see if Bob's desk exists, and if it
423−doesn't we use an `%init` merge. Otherwise, we progressively try
424−`%fine`, `%meet`, and `%mate` until one succeeds. If none succeed, we
425−merge Bob's desk into a scratch desk. Then, we merge Alice's desk into
426−the scratch desk with the `%meld` option to force the merge. Finally, we
427−annotate any conflicts, if we know how.
428−
429−### Manipulation
430−
431−#### +cat
432−
433−Syntax: `+cat path [path ...]`
434−
435−Similar to Unix `cat`. `+cat` takes one or more `path`s, and prints their
436−contents. If that `path` is a file, the contents of the file is printed. If the
437−`path` terminates in a directory, the list of names at that path is produced.
438−
439−#### +ls
440−
441−Syntax: `+ls path`
442−
443−Similar to Unix `ls`. `+ls` takes a single `path`.
444−
445−Produces a list of names at the `path`.
446−
447−```
448−~your-urbit:dojo> +cat %/our/home/gen/curl/hoon
449−```
450−
451−#### |rm
452−
453−Syntax: `|rm path`
454−
455−Remove the data at `path`. `path` must be a path to actual node, not a
456−'directory'
457−
458−#### |cp
459−
460−Syntax: `|cp to from`
461−
462−Copy the file at `from` into the path `to`.
463−
464−#### |mv
465−
466−Syntax: `|mv to from`
467−
468−Move the file at `from` into the path `to`.
469−
470−In Clay, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
471−doesn't happen unless the `|cp` succeeds.
using/messaging.mddeleted−315
@@ -1,315 +0,0 @@
1−+++
2−title = "Messaging"
3−weight = 2
4−template = "doc.html"
5−+++
6−
7−Chat (also called "chat-cli") is the built-in messaging app for Urbit.
8−
9−For the time being come join us in `~dopzod/urbit-help` by using the
10−'quickstart' section below. `~dopzod` is the host ship, and `/urbit-help` is the
11−channel on that ship.
12−
13−### Quickstart
14−
15−The most common uses of `:chat-cli` right now are communicating over a public chat channel on `~dopzod/urbit-help`, and sending direct messages. Everyone is more than welcome in `~dopzod/urbit-help`. It's the place to get help, ask questions and chat about Urbit in general.
16−
17−There are two ways of using `:chat-cli`: from the terminal running the Urbit process, or through the Landscape web UI available from your ship’s URL address, mentioned earlier in this guide.
18−
19−### Joining a chat
20−
21−In `:chat-cli`, any kind of medium for a message is called a _chat_. There are four types of chats: the _channel_ (public with blacklist), _village_ (private with whitelist), the _journal_ (publicly readable, privately writable), and the _mailbox_ (privately readable, publicly writable). But for now we'll be dealing with the _channel_, a publicly accessible chatroom for general use. We'll discuss the other three kinds in the [manual](#messaging-manual) section later on.
22−
23−Let's join the `~dopzod/urbit-help` channel. Use `ctrl-x` to switch from the Dojo prompt to the Chat prompt.
24−
25−Then:
26−
27−```
28−~your-urbit:chat-cli> ;join ~dopzod/urbit-help
29−```
30−
31−Scrolling down your terminal window, you'll probably see a playback of previous `~dopzod/urbit-help` messages that you missed. You c
32−
33−Post a line to `~dopzod/urbit-help:`
34−
35−```
36−~your-urbit:chat-cli= Hello, world!
37−```
38−
39−You'll see your message printed below messages from others that came before it. You can always type `;chats` in the `chat-cli` prompt to list all the chats you're in:
40−
41−
42−
43−Glyphs will be automatically assigned to channels, but have the option of binding a glyph (single non-alphanumeric character) to the channel you're joining; the syntax is in the form of `;join ~dopzod/books +`. The chosen glyph will be the symbol that ends your prompt, and it will be what you use as a shortcut to switch to this channel.
44−
45−```
46−~your-urbit:chat-cli= ;+
47−~your-urbit:chat-cli+
48−```
49−
50−Use `;leave` to unsubscribe from a channel:
51−
52−```
53−~your-urbit:chat-cli= ;leave ~dopzod/urbit-help
54−```
55−
56−Now, let's create a channel we can invite some friends to:
57−
58−```
59−~your-urbit:chat-cli= ;create channel /my-channel
60−```
61−
62−Now you can tell your friends to `;join ~your-urbit/my-channel`.
63−
64−### Direct messaging
65−
66−To send a direct message to someone, first set your audience:
67−
68−```
69−~your-urbit:chat-cli= ;~talsur-todres
70−```
71−
72−You'll see your prompt change:
73−
74−```
75−~your-urbit:chat-cli[~talsur-todres]
76−```
77−
78−Now you and `~talsur-todres` can exchange messages directly.
79−
80−```
81−~your-urbit:chat-cli[~talsur-todres] Hey buddy!
82−```
83−
84−To set your audience back to `~dopzod/urbit-help`:
85−
86−```
87−~your-urbit:chat-cli[~talsur-todres] ;~dopzod/urbit-help
88−```
89−
90−You'll see your prompt change back:
91−
92−```
93−~your-urbit:chat-cli=
94−```
95−
96−#### Hoon
97−
98−You can use Chat to evaluate Hoon code and share the results with everyone in a chat. To do so, preface your Hoon with `#`.
99−
100−```
101−~your-urbit:chat-cli= #(add 2 2)
102−```
103−
104−will print as
105−
106−```
107−~your-urbit# (add 2 2)
108−4
109−```
110−
111−### Creating and managing chats
112−
113−As mentioned before, any urbit can host any number of chats. Existing chats can be deleted or modified with various commands. All commands in this section should be sent from the `chat-cli>` prompt.
114−
115−#### Create
116−
117−Syntax: `;create [type] /name +`, where `+` represents an optional glyph.
118−
119−Creates and joins a chat, where `[type]` is any of the following:
120−- `channel`: public chat. Has a blacklist for write control.
121−- `village`: invite-only chat.
122−- `journal`: publicly readable, invite-only for writing.
123−- `mailbox`: publicly writeable, can only be read by its host.
124−
125−Let's create an example mailbox:
126−
127−```
128−sampel-palnet:chat-cli> ;create mailbox /coolbox ^
129−```
130−
131−#### Delete
132−
133−Syntax: `;delete /name`
134−
135−Deletes a chat.
136−
137−### Status
138−
139−You'll see status notifications when people enter or leave chats you're subscribed to.
140−
141−#### Notifications off
142−
143−Syntax: `;set quiet`
144−
145−Turn off status (and config) notifications.
146−
147−#### Notifications on
148−
149−Syntax: `;unset quiet`
150−
151−Turn on status (and config) notifications.
152−
153−#### Chat glyphs
154−
155−Glyphs are found at the end of your prompt to as a quick indicator of where
156−your messages will be sent.
157−
158−Glyphs are assigned by chat hash out of the following list:
159−
160−```
161−> = + - } ) , . " ' ^ $ % & @
162−```
163−
164−Alphanumeric characters and `|#;:*~_` are reserved; all others (the
165−above list, and `\/!?({<`) can be manually assigned.
166−
167−For example, `-` the glyph at the end of the prompt below might indicates that
168−messages sent from this prompt will go to some chat with that glyph:
169−
170−```
171−~sampel-palnet:chat-cli-
172−```
173−
174−To see what chat is bound to a glyph, use the `;what` command followed by the
175−glyph in question, or use `;what` without specifying a glyph to see all of your
176−subscriptions which are bound to glyphs. For example, to see `=`:
177−
178−```
179−~sampel-palnet:chat-cli> ;what =
180−~dopzod/urbit-help
181−```
182−
183−To see all of your glyph-bound subscriptions:
184−
185−```
186−~sampel-palnet:chat-cli> ;what
187−> ~paldev/numismatic-forum
188−. ~middev/ny-martians
189−= ~dopzod/urbit-help
190−```
191−
192−Not every audience has a glyph, however. When the audience doesn't have a glyph,
193−such as in the case of direct-messaging a ship, we see their name at the end of
194−the prompt instead. Here we're talking directly to `~dannum-mitryl`:
195−
196−```
197−~sampel-palnet:chat-cli[~dannum-mitryl]
198−```
199−
200−#### Bind
201−
202−Syntax: `;bind [glyph] /chat-name`
203−
204−Assigns the chosen glyph to a chat owned by your ship.
205−
206−For example:
207−
208−```
209−~sampel-palnet:chat-cli> ;bind + /my-chat
210−```
211−
212−#### Unbind
213−
214−Syntax: `;unbind [glyph] /chat-name`
215−
216−Unassigns the chosen glyph from a chat owned by your ship.
217−
218−For example:
219−
220−```
221−~sampel-palnet:chat-cli> ;unbind + /my-chat
222−```
223−
224−#### Prefixes
225−
226−Received posts are prefixed with a glyph to let you know what the
227−audience is. You can activate an individual post to see the full
228−audience.
229−
230−There are a few special-purpose glyphs:
231−
232−- `|` - Informational messages
233−- `:` - Posts directly to you
234−- `;` - Posts to you and others (a multiparty conversation)
235−- `*` - Posts to a complex audience that doesn't directly include you.
236−
237−
238−### Configuration
239−
240−#### Set audience
241−
242−`;~ship/chat`
243−
244−Set audience to `~ship/chat`.
245−
246−#### Set audience by glyph
247−
248−Syntax: `;[glyph]`
249−
250−Set audience to the chat previously bound to the chosen glyph.
251−
252−#### Set audience to ship
253−
254−syntax `;~ship`
255−
256−Set audience to another ship.
257−
258−#### Set audience to own chat
259−
260−Syntax: `;%chat`
261−
262−Set audience to a chat on your own ship.
263−
264−#### Set audience and send message
265−
266−Syntax: `;~dannum-mitryl this is a private message`
267−
268−Set the audience and send a post in the same line. This works for all of the
269−above audience commands.
270−
271−Your audience is configured with regard to the following rules (in order):
272−
273−- if you manually set the audience, that audience.
274−- if you activated a post, the post you activated.
275−- audience of the last post sent.
276−
277−### Miscellaneous configuration
278−
279−#### Show timestamps
280−
281−Syntax: `;set showtime`
282−
283−Show the timestamp for each message. This is set by default.
284−
285−#### Hide timestamps
286−
287−Syntax: `;unset showtime`
288−
289−Stop showing the timestamp for each message.
290−
291−#### Change timezone
292−
293−Syntax: `;set timezone [+/-][hours]`
294−
295−Adjust the display of timestamps to a specific timezone. Relative to UTC.
296−
297−#### Sound notification on
298−
299−Syntax: `;set notify`
300−
301−Emit a terminal bell sound if your six-syllable ship name is mentioned in
302−a message. This is set by default.
303−
304−#### Sound notification off
305−
306−Syntax `;unset notify`
307−
308−Do not notify when your ship name is mentioned.
309−
310−#### Set width
311−
312−Syntax: `;set width [number]`
313−
314−Set the rendering width of `:chat-cli` to a specific number of characters.
315−(Minimum of 30.)
using/operating-a-star.mddeleted−49
@@ -1,49 +0,0 @@
1−+++
2−title = "Operating a Star"
3−weight = 6
4−template = "doc.html"
5−+++
6−A _ship_ is an instance of the Arvo operating system that is used as a personal server on the Arvo network. Stars are a type of ship that act as infrastructure for the Arvo network. In the Arvo ship-hierarchy, stars are below galaxies and above planets.
7−
8−Parallel to the Arvo network is Azimuth, the Urbit identity system that uses the Ethereum blockchain. All ships must boot with a corresponding _point_ -- an Azimuth identity -- to use the Arvo network.
9−
10−Important star operations happen on both the Arvo side and the Azimuth side. On the Arvo side, these operations come in the form of Dojo commands. On the Azimuth side, operations happen by making changes to smart-contracts on the blockchain via a point.
11−
12−## Powers of a Star
13−
14−Stars are above planets in the network hierarchy in the sense that each star sponsors some number of planets: stars discover peers for planets, route packets for planets, provide DNS routing for planets, and push software updates to planets. A star that fulfills this is called the **sponsor** of planets that receive such services from the star; those planets, in turn, are called **dependents** of that star.
15−
16−Stars are also the "parents" of planets. A new planet comes into existence only when spawned by a parent star. A parent planet is the sponsor of its children planets by default. This can change if a planet chooses to find a new sponsor (see the "Escaping a Sponsor" section below).
17−
18−Planets must have a sponsor star to use most features of the Arvo network. A planet cannot boot without a sponsor, and cannot make new connections to peers as long as it is not connected to a sponsor. Planets without a sponsor will still be able to message discovered peers until any such peers change their IP addresses.
19−
20−## Responsibilities
21−
22−Like with real-life infrastructure, the operation of Arvo infrastructure comes with unique responsibilities. For reasons stated above, stars should be always be online on a reliable cloud service, such as Amazon Web Services or Google Cloud Platform. These systems have layers of redundancies that make them much more resilient than local machines, so stars hosted on the cloud are unlikely to leave their dependents in the dark.
23−
24−## Operations
25−
26−Below are some handy operations for the use and maintenance of your star.
27−
28−### arvo.network DNS Records
29−
30−We have a system that lets users request a domain name for their star under `arvo.network`, in the form of `shipname.arvo.network`, where `shipname` is their ship's name, so that it can be accessed remotely via our Landscape web interface. To find out how to do this, take a look at the [DNS Proxying](../dns-proxying) documentation.
31−
32−### Maintaining Connectivity
33−
34−Occasionally, your star might lose network connectivity due to a known timer issue or by falling out of sync with the Ethereum blockchain. When this happens, there are a few things to try:
35−
36−1. Enter the `|bonk` command in the Dojo to reset the timer and restore connectivity.
37−2. Run `|start %eth-manage`, then `:eth-manage %look-ethnode` to ensure that your star is synced up to the latest block.
38−
39−When in doubt, contact [support@urbit.org](mailto:support@urbit.org).
40−
41−### Escaping a Sponsor
42−
43−Planets are, of course, able to change sponsors. To do this, they must request that a different star takes them on as a dependent and that star must accept the request. Planets cannot emancipate themselves from a sponsor without having a new sponsor lined up.
44−
45−All of these actions happen on Azimuth. There will be Bridge functionality to handle these actions in the future, but for now users will need to interact directly with the contracts with MetaMask, through services such as [Etherscan.io](https://etherscan.io/address/ecliptic.eth#writeContract). A sketch of the process is listed below; for now, only the Ethereum-savvy should act on these steps.
46−
47−+ The planet calls the `escape` function in the Ecliptic contract and writes the resulting data to the blockchain.
48−+ If the chosen star wants to become the planet's sponsor, it calls the `adopt` function in the Ecliptic contract.
49−+ The Arvo network notices the change, and the operation is complete.
using/shell.mddeleted−440
@@ -1,440 +0,0 @@
1−+++
2−title = "Shell"
3−weight = 4
4−template = "doc.html"
5−+++
6−The Dojo is our shell; it processes system commands and returns output. It's a
7−good place to quickly experiment with Urbit. On the surface the Dojo is just a
8−Hoon REPL. On the inside, the Dojo is a system for operating on and transforming
9−data in Urbit.
10−
11−
12−## Quickstart
13−
14−You can use the Dojo to run arbitrary Hoon code, as well as non-Hoon system
15−commands.
16−
17−### Math
18−
19−Evaluate a Hoon expression (whitespace matters):
20−
21−```
22−~your-urbit:dojo> (add 2 2)
23−~your-urbit:dojo> %+ add 2 2
24−```
25−
26−Tall-form Hoon may require multiple lines:
27−
28−```
29−~your-urbit:dojo> %+ add
30−~your-urbit:dojo< 2
31−~your-urbit:dojo< 2
32−```
33−
34−Hoon uses something called [the subject](@/docs/learn/hoon/hoon-tutorial/the-subject-and-its-legs.md).
35−The Dojo has its own subject, and that's where Hoon's equivalent of variables,
36−called faces, are stored.
37−
38−Use `=var` to save faces to the Dojo subject.
39−
40−```
41−~your-urbit:dojo> =foo (add 2 2)
42−```
43−
44−Note, however, that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
45−face in a `.hoon` file in this way.
46−
47−### System Commands
48−
49−Use `=dir` to set the current working directory:
50−
51−```
52−~your-urbit:dojo> =dir %/web
53−```
54−
55−(`%` represents your current directory. For a complete explanation on urbit
56−paths, see the [filesystem section](@/docs/using/filesystem.md))
57−
58−Generators (files in `/gen`) are run with `+`:
59−
60−```
61−~your-urbit:dojo> +hello 'world'
62−```
63−
64−Save output to a file in `%clay` with `*`:
65−
66−```
67−~your-urbit:dojo> *some/file/path/hoon 'hello world'
68−```
69−
70−Run system commands from `:hood`, like `reload`, using `|`:
71−
72−```
73−~your-urbit:dojo> |reload %eyre
74−```
75−
76−## Generators
77−
78−Generators are short Hoon scripts, saved as `.hoon` files in the `/gen`
79−directory. Many Dojo commands exist in the form of generators. The syntax for
80−running a generator is `+genname` for a generator saved as `genname.hoon`.
81−
82−### +cat
83−
84−Accepts a path and displays the file. Similar to Unix `cat`.
85−
86−```
87−~your-urbit:dojo> +cat %/gen/curl/hoon
88−```
89−
90−### +code
91−
92−Generates a code that is used to remotely log into your ship. No
93−arguments.
94−
95−```
96−~your-urbit:dojo> +code
97−```
98−
99−### +curl
100−
101−Retrives data from a URL. Accepts a `tape`. Similar to Unix `curl`.
102−
103−```
104−~your-urbit:dojo> +curl "http://nyt.com"
105−```
106−
107−### +hello
108−
109−Just prints the argument. Accepts a `@ta`.
110−
111−```
112−~your-urbit:dojo> +hello 'mars'
113−```
114−
115−### +ls
116−
117−Similar to Unix `ls`. Accepts a path.
118−
119−```
120−~your-urbit:dojo> +ls %/web
121−~your-urbit:dojo> +ls /~talsur-todres/home/2/web/notes
122−```
123−
124−### +moon
125−
126−Generates a random moon from a planet. No arguments.
127−
128−```
129−~your-urbit:dojo> +moon
130−```
131−
132−### +solid
133−
134−Compile the current state of the kernel and output a
135−noun. Usually downloaded to a file in unix. No arguments.
136−
137−```
138−~your-urbit:dojo> .urbit/pill +solid
139−```
140−
141−### +test
142−
143−Testrunner. Can test multiple generators at once, conventionally ones
144−in the `/test` folder. Takes a path.
145−
146−```
147−~your-urbit:dojo> +test /lib
148−```
149−
150−### +ticket
151−
152−Generate a ticket for an urbit ship. Takes an urbit name (`@p`).
153−
154−
155−```
156−~your-urbit:dojo> +ticket ~talsur-todres-your-urbit
157−```
158−
159−### +tree
160−
161−Generate a recursive directory listing. Takes a path.
162−
163−```
164−~your-urbit:dojo> +tree %/web
165−```
166−
167−## Hood
168−
169−The hood is the system daemon. See `gen/hood` and `app/hood`.
170−
171−`|hi` - Sends a direct message. Sort of like Unix `write`. Accepts
172−an urbit name (`@p`) and a string (`tape`, which is text wrapped with double-quotes).
173−
174−```
175−~your-urbit:dojo> |hi ~binzod "you there?"
176−```
177−
178−`|link` / `|unlink` - Link / unlink a remote app. Accepts an
179−Urbit name and an app name.
180−
181−```
182−~your-urbit:dojo> |link ~talsur-todres %octo
183−```
184−
185−`|mass` - Prints the current memory usage of all the kernel modules.
186−No arguments.
187−
188−```
189−~your-urbit:dojo> |mass
190−```
191−
192−`|reload` - Reloads a kernel module (vane) from source. Accepts any
193−number of vane names.
194−
195−```
196−~your-urbit:dojo> |reload %clay %eyre
197−```
198−
199−`|reset` - Reloads `hoon.hoon` and all modules. No arguments.
200−
201−```
202−~your-urbit:dojo> |reset
203−```
204−
205−`|start` - Starts an app. Accepts an app name.
206−
207−```
208−~your-urbit:dojo> |start %curl
209−```
210−
211−---
212−
213−## Manual
214−
215−## Sources and sinks
216−
217−A Dojo command is either a **source** or a **sink**. A source is just something
218−that can be printed to your console or the result of some computation. A
219−sink is an **effect**: a change to the filesystem, a network message, a
220−change to your environment, or typed message to an app.
221−
222−Sources can be chained together, but we can only produce one effect per
223−command.
224−
225−### Sinks
226−
227−#### `=` - Set variable
228−
229−Set any environment variable:
230−
231−```
232−~your-urbit:dojo> =foo 42
233−~your-urbit:dojo> (add 2 foo)
234−
235−44
236−```
237−
238−Make sure to note that `=var` is Dojo syntax, not Hoon syntax. You cannot bind a
239−variable in a `.hoon` file in this way.
240−
241−#### Special Variables
242−
243−There are a few special variables that the Dojo maintains.
244−
245−#### `:` - Send to app
246−
247−`:app` goes to a local `app`, `:~ship/app` goes to the `app` on `~ship`.
248−
249−Send a `helm-hi` message to `hood`:
250−
251−```
252−~your-urbit:dojo> :hood &helm-hi 'hi'
253−```
254−
255−Apps usually expect marked data, so `&` is often used here.
256−
257−#### `*` - Save in `%clay`
258−
259−Save a new `.udon` ([Udon](@/docs/using/sail-and-udon.md)) file in `web`:
260−
261−```
262−~your-urbit:dojo> *%/web/foo/udon '# hello'
263−```
264−
265−The last component of the path is expected to be the mark (or mime
266−type).
267−
268−#### `.` - Export to Unix
269−
270−Export a noun to Unix with `.`:
271−
272−```
273−~your-urbit:dojo> .foo/bar/baz (add 2 2)
274−```
275−
276−Which creates a file at `pier/.urb/put/foo/bar.baz`.
277−
278−This is very often used with `+solid`:
279−
280−```
281−~your-urbit:dojo> .urbit/pill +solid
282−```
283−
284−Which outputs a new `urbit.pill` to `pier/.urb/put/urbit.pill`
285−
286−### Sources
287−
288−#### `&` - Mark conversion
289−
290−Convert between marks using `&`, with the destination mark first. You can stack multiple mark conversions together, and some marks can only be converted to specific other marks. In this example, [Udon](@/docs/using/sail-and-udon.md#udon) is converted to `&hymn` (a mark which supplies the `html`, `head`, `body` and closing tags) first, before being converted to HTML:
291−
292−```
293−~your-urbit:dojo>&html &hymn &udon ';h1#hello: hello'
294−'<html><head></head><body><h1 id="hello">hello</h1></body></html>'
295−```
296−
297−Performing a conversion straight from Udon to the `&hymn` mark reveals a bit more about its mark conversion:
298−
299−```
300−~your-urbit:dojo>&hymn &udon ';h1#hello: hello'
301−[[%html ~] [[%head ~] ~] [[%body ~] [g=[n=%h1 a=~[[n=%id v="hello"]]] c=~[[g=[n=%$ a=~[[n=%$ v="hello"]]] c=~]]] ~] ~]
302−```
303−
304−As does converting straight from Udon to HTML:
305−
306−```
307−~your-urbit:dojo>&html &udon ';h1#hello: hello'
308−';h1#hello: hello'
309−```
310−
311−#### `_` - Run a function
312−
313−Use `_` to run a gate (or function):
314−
315−Write an arbitrary function and pass data to it:
316−
317−```
318−~your-urbit:dojo> _|=([a=@] (mul a 3)) 3
319−9
320−```
321−
322−Use a function to get the status code from an http request:
323−
324−```
325−~your-urbit:dojo> _|=([p=@ud q=* r=*] p) +http://google.com
326−301
327−```
328−
329−#### `+` `-` - HTTP requests
330−
331−`+http[s]://example.com` - sends a GET request
332−
333−`+http[s]://example.com &json [%s 'hi']` - sends a POST request with the
334−JSON `"hi"` in the body.
335−
336−`-http[s]://example.com &json [%s 'hi']` - sends a PUT request with the
337−JSON `"hi"` in the body.
338−
339−Note that the first of these is a source while the last two are sinks.
340−
341−#### `+` - Generators
342−
343−Generators are simple Hoon scripts loaded from the filesystem. They live
344−in `gen/`.
345−
346−An example of a generator that is built into your urbit is `+code`. It produces
347−the code needed to log into your ship remotely.
348−
349−```
350−~your-urbit:dojo> +code
351−fintyr-haldet-fassev-solhex
352−```
353−
354−### Variables
355−
356−You can use `=` to set an environment variable in Dojo, but there are
357−a few reserved names that have special uses.
358−
359−#### dir
360−
361−Current working `%clay` desk and revision. Read / write.
362−
363−**Examples:**
364−
365−```
366−~your-urbit:dojo> =dir %/web
367−~your-urbit:dojo> +ls %
368−404/hoon docs/ dojo/hoon lib/ listen/hoon md static/udon talk/ testing/udon tree/main/ unmark/ womb/
369−```
370−
371−#### lib
372−
373−Current set of libraries (`/lib`) in your environment. Can be set
374−with `/+`. Read / write.
375−
376−**Examples:**
377−
378−```
379−~your-urbit:dojo> /+ number-to-words
380−```
381−Now we can use arms from lib/number-to-words.hoon
382−```
383−~your-urbit:dojo> (to-words:eng-us:number-to-words 123.456)
384−```
385−
386−#### sur
387−
388−Current set of structures (`/sur`) in your environment. Can be set
389−with `/-`. Read / write.
390−
391−**Examples:**
392−
393−```
394−~your-urbit:dojo> /- sole
395−```
396−Now we can use arms in sur/sole.hoon.
397−```
398−~your-urbit:dojo> `sole-effect:sole`[%bel ~]
399−```
400−
401−#### now
402−
403−The current (128-bit `@da`) time. Read-only.
404−
405−**Example:**
406−
407−```
408−~your-urbit:dojo> now
409−~2016.3.21..21.10.57..429a
410−```
411−
412−#### our
413−
414−The current urbit ship. Read-only.
415−
416−**Example:**
417−
418−```
419−~your-urbit:dojo> our
420−~your-urbit
421−```
422−
423−#### eny
424−
425−512 bits of entropy. Read-only.
426−
427−**Example:**
428−
429−```
430−~your-urbit:dojo> eny
431−\/0vnt.d474o.gpahj.jcf3o.448fh.2lamb.82ljm.8ol8u.b02vi.mrvvp.b7et2.knb7m.l8he\/
432− 8.8qb9s.drm36.77n9b.a0qst.30g03.l5lb5.nvsbc.v39tn
433−\/
434−```
435−
436−## Troubleshooting
437−
438−If you encounter `%dy-edit-busy` while entering commands, it is
439−because your Dojo is blocked on a timer or an HTTP request. Type backspace
440−and your Dojo will end the blocked command.