on ea58a74 help sign in
urbit.org/using/messaging.md
680 lines 16 kB history raw
1+++
2title = "Messaging"
3weight = 2
4template = "doc.html"
5+++
7Talk is the built-in frontend for the Urbit messaging and notifications
8protocol, Hall. Today we use Hall to chat and coordinate, but it's really
9a general purpose piece of infrastructure.
11For the time being come join us in `~dopzod/urbit-help` by using the
12'quickstart' section below. `~dopzod` is the host ship, and `/urbit-help` is the
13channel on that ship.
15Today, Hall is sort of like a distributed, encrypted Slack that can be
16used from the CLI and the browser. There’s no central Hall server.
17Any urbit can host one.
19Hall is a general purpose tool for both aggregating and publishing
20streams of messages. Applications can use Hall as their transport
21protocol, API connectors can push disparate data sources into Hall,
22and so on. There are lots of things a distributed message protocol can
23be used for that we haven't even thought of.
25Here we'll be discussing how to operate the default CLI frontend, Talk,
26to send and receive messages. For a more in-depth look at Hall's internals,
27take a look at its [documentation](@/docs/learn/arvo/hall.md).
29## Quickstart
31The most common uses of Talk right now are communicating over a public chat channel called `~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.
33There are two ways of using Talk: from the terminal running the Urbit process, or through the Landscape web UI available at `http://localhost/~~/landscape`.
35If you're using Landscape for the first time, you'll need to enter a code to gain access. You can obtain this code by running `+code` from the Dojo.
37### Joining a Channel
39In Hall, a medium for a message is called a _circle_. There are four types of circles, but we 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](#manual) section.
41Let's join the `~dopzod/urbit-help` channel. Use `ctrl-x` to switch from Dojo to Talk.
43Then:
45```
46~your-urbit:talk> ;join ~dopzod/urbit-help
47```
49Scrolling down your terminal window, you'll probably see the playback of
50previous `~dopzod/urbit-help` messages that you missed.
52Post a line to `~dopzod/urbit-help:`
54```
55~your-urbit:talk= Hello, world!
56```
58You'll see your message printed below messages from others that came before it:
60```
61~your-urbit= Hello, world!
62```
64### Subscribing to a Channel in Landscape
66In Landscape, you can always navigate to a channel by opening the menu, or using the shortcut `cmd-k`, then typing `go ~host-urbit/channel-name`. However, if you want to see messages in your inbox, you'll need to join from the Talk terminal.
68Again, that's:
70```
71;join ~dopzod/urbit-help
72```
74Now, navigate to `localhost/~~/landscape`. You should see recent messages under the "Recent" tab, and if you navigate to the "All" tab, you should see your subscription to `~dopzod/urbit-help` under "Chats".
76### Direct Messaging
78To send a direct message to someone, first set your audience:
80```
81~your-urbit:talk= ;~talsur-todres
82```
84You'll see your prompt change:
86```
87~your-urbit:talk[~talsur-todres]
88```
90Now you and `~talsur-todres` can exchange messages directly.
92```
93~your-urbit:talk[~talsur-todres] Hey buddy!
94```
96To set your audience back to `~dopzod/urbit-help`:
98```
99~your-urbit:talk[~talsur-todres] ;~dopzod/urbit-help
100```
102You'll see your prompt change back:
104```
105~your-urbit:talk=
106```
108You can also use the ASCII "glyph" assigned to your `~dopzod/urbit-help` circle as a shortcut:
110```
111~your-urbit:talk[~talsur-todres] ;=
112~your-urbit:talk=
113```
115(Your ship may have a different glyph than `=` for your circle)
117Use `;leave` to unsubscribe from a channel:
119```
120~your-urbit:talk= ;leave ~dopzod/urbit-help
121```
123The web UI ships as compiled JavaScript on your urbit, but has its own
124source repo [here](https://github.com/urbit/talk).
126Last, let's create a channel we can invite some friends to:
128```
129~your-urbit:talk= ;create channel %my-channel 'Some description.'
130```
132Now you can tell your friends to `;join ~your-urbit/my-channel`.
134---
136## Manual
138Hall's design is similar in spirit to
139[NNTP](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol),
140the underlying protocol for Usenet.
142Our design is pretty simple: Hall messages are called _posts_. Posts
143go to _circles_. Any urbit can host or subscribe to any number of circles.
145There are four kinds of circles: a write-only `%mailbox` for direct
146messages, an invite-only `%village` for private conversation, a read-only
147`%journal` for curated content, and a public-access `%channel` for
148general use.
150### Posts
152A post can be a variety of different data structures. Let's look at the
153ones you can use from within Talk: lines, URLs, Hoon and replies.
155#### Lines
157A line is simply a string of text. Depending on the filtering rules set
158by the circle's host, these may or may not include uppercase and Unicode
159characters (see [filter](#filter)).
161If the line starts with `@`, it's an action (like `/me` in IRC).
163```
164~your-urbit:talk= @sends a message.
165```
167will print as
169```
170~your-urbit sends a message.
171```
173#### URLs
175A URL is any valid URL.
177```
178~your-urbit:talk= https://example.com/
179```
181#### Hoon
183You can use Talk to evaluate Hoon code and share the result with everyone in a
184Hall circle. To do so, preface your Hoon with `#`.
186```
187~your-urbit:talk= #(add 2 2)
188```
190will print as
192```
193~your-urbit# (add 2 2)
195```
197#### Replies
199To indicate what you're saying is in direct response to a specific message, select the message (see Activating Lines below) and type your response.
201```
202~some-urbit= Hello! How are you?
203~your-urbit:talk= ; Well, thanks!
204```
206will print as
208```
209~your-urbit=^ Well, thanks!
210```
212### Activating Lines
214A line number identifying the **subsequent** line is displayed every 5
215lines.
217```
218---------[0]
219~your-urbit= This is my message.
220~your-urbit= This is another message.
221~your-urbit sends a message.
222~your-urbit/ http://example.com/
223~your-urbit# (add 2 2)
224 4
225---------[5]
226~your-urbit=^ That's my message!
227```
229You can use a line number to **activate** a line:
231```
232~your-urbit:talk= ;5
233```
235which prints the number, line identifier, timestamp, sender, audience,
236and contents:
238```
239? 0
2400v3.hl51p.jhege.amhec.vb37r.3rejr at ~2016.6.24..04.48.21..a235
241~your-urbit to ~another-urbit
242in reply to: ~your-urbit:
243> This is my message.
244That's my message!
245```
247If information got truncated — like what happens for long URLs or expressions,
248or if there's additional information available — as is the case with
249replies and attachments (e.g. stack traces) — activating the message will show
250you all the details.
252You can also activate the most recent line with `;`, the second-most recent
253with `;;`, and so on.
255### Creating and managing circles
257As mentioned before, any urbit can host any number of circles. Existing circles
258can be deleted or modified with various commands. All commands in this section
259shoild be sent from the `talk>` prompt.
261#### Create
263Syntax: `;create [type] %name 'description'`
265Creates and joins a circle, where `[type]` is any of the following:
266- `channel`: public circle. Has a blacklist for write control.
267- `village`: invite-only circle.
268- `journal`: publicly readable, invite-only for writing.
269- `mailbox`: publicly writeable, can only be read by its host.
271Let's create an example mailbox:
273```
274sampel-palnet:talk> ;create mailbox %coolbox 'cool messages only'
275```
277Something like this should print:
279```
280--------------| ;create mailbox %coolbox 'cool messages only'
281--------------| :: onn %coolbox
282--------------| bound '>' {[hos=~sampel-palnet nom=%coolbox]}
283--------------| %coolbox: see ~sampel-palnet hear
284--------------| new > %coolbox
285--------------| %coolbox: cap: cool messages only
286--------------| %coolbox: fit: caps:Y unic:✔
287```
289###### Delete
291Syntax: `;delete %name 'optional reason'`
293Deletes a circle. If a reason is specified, that gets sent to all
294subscribers before the circle gets deleted.
296To delete our example above:
298```
299sampel-palnet:talk> ;delete %coolbox 'people sent uncool messages'
300```
302#### Change Description
304Syntax: `;depict %name 'description'`
306Changes the description of an existing circle `%name`.
308For example:
310```
311sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
312```
315#### Filter
317Syntax: `;filter %name [capitals] [unicode]`
319Configures the message filter for circle `%name`: whether to allow
320capital and/or unicode characters. `y`/`&`/`true` for allowed,
321`n`/`|`/`false` for disallowed.
323So, to allow capital letters and disallow unicode in the circle `%coolbox`:
325```
326sampel-palnet:talk> ;filter %coolbox & |
327```
328or
329```
330sampel-palnet:talk> ;filter %coolbox y n
331```
333And we get the output:
335```
336--------------| ;filter %coolbox & |
337--------------| %coolbox: fit: caps:Y unic:n
338```
340#### Invite
342Syntax: `;invite %name ~someone`
344Invites someone into your circle `%name`. If they were previously banished,
345removes them from the blacklist.
346Can also invite multiple ships at once, `~comma, ~separated`.
348For example:
350```
351~sampel-palnet:talk> ;invite %coolbox ~lodleb-ritrul
352```
354#### Banish
356Syntax: `;banish %name ~someone`
358Removes someone from your circle `%name`. If they were previously invited,
359removes them from the whitelist.
360Can also banish multiple ships at once, `~comma, ~separated`.
362#### Source
364Syntax: `;source %name ~other/circle`
366Adds `~other/circle` as a source for circle `%name`. This causes all
367messages sent to `~other/circle` to also appear in `%name`.
369For example:
371```
372~sampel-palnet:talk> ;source %coolbox ~marzod/urbit-help
373```
375#### Unsource
377Syntax: `;unsource %name ~other/circle`
379Removes `~other/circle` as a source for circle `%name`.
381For example:
383```
384~sampel-palnet:talk> ;unsource %coolbox ~marzod/urbit-help
385```
387### Circle Membership
389If you have joined a circle, you can make this information publicly
390available to help others find that circle as well.
392#### Show Membership
394Syntax: `;show ~some/circle`
396Adds a circle to your public membership list on your Hall profile. Hall profiles
397are not used yet.
399#### Hide Membership
401Syntax: `;hide ~some/circle`
403Removes a circle from your public membership list on your Hall profile. Hall
404profiles are not used yet.
406### Status
408You'll see status notifications when people enter or leave circles you're
409subscribed to.
411#### Notifications Off
413Syntax: `;set quiet`
415Turn off status (and config) notifications.
417#### Notifications On
419Syntax: `;unset quiet`
421Turn on status (and config) notifications.
423#### Who
425Syntax: `;who`
427List everyone in all your subscribed circles. Optionally specify a
428specific circle to list members of just those: `;who ~some/circle`
430For example:
432```
433~sampel-palnet:talk> ;who ~marzod/urbit-help
434```
436#### Attend
438Syntax: `;attend ~some/circle [presence]`
440Manually set your presence to show up as one of the following. (In the
441future, a sufficiently advanced client can automatically set these for
442you.)
444- `talk` - typing
445- `hear` - listening
446- `idle` - inactive
447- `gone` - not present
449For example:
451```
452~sampel-palnet:talk> ;attend ~marzod/urbit-help idle
453```
455#### Set Display Name
457Syntax: `;name ~some/circle 'my handle'`
459Set a handle ("name") for yourself in a specific circle. It will display
460to users who have done `;set nicks`, but gets truncated if it's longer
461than 14 characters.
463## Audience
465An audience consists of one or more messaging targets. These can be
466circles or ships. (In the latter case, it's secretly the `~ship/inbox`
467circle.)
469### Circle Glyphs
471Glyphs are found at the end of your prompt to as a quick indicator of where
472your messages will be sent.
474Glyphs are assigned by circle hash out of the following list:
476```
477> = + - } ) , . " ' ^ $ % & @
478```
480Alphanumeric characters and `|#;:*~_` are reserved; all others (the
481above list, and `\/!?({<`) can be manually assigned.
483For example, `-` the glyph at the end of the prompt below might indicates that
484messages sent from this prompt will go to some circle with that glyph:
486```
487~sampel-palnet:talk-
488```
490To see what circle is bound to a glyph, use the `;what` command followed by the
491glyph in question, or use `;what` without specifying a glyph to see all of your
492subscriptions which are bound to glyphs. For example, to see `=`:
494```
495~sampel-palnet:talk> ;what =
496~dopzod/urbit-help
497```
499To see all of your glyph-bound subscriptions:
501```
502~sampel-palnet:talk> ;what
503> ~paldev/numismatic-forum
504. ~middev/ny-martians
505= ~dopzod/urbit-help
506```
508Not every audience has a glyph, however. When the audience doesn't have a glyph,
509such as in the case of direct-messaging a ship, we see their name at the end of
510the prompt instead. Here we're talking directly to `~dannum-mitryl`:
512```
513~sampel-palnet:talk[~dannum-mitryl]
514```
516#### Bind
518Syntax: `;bind [glyph] /circle-name`
520Assigns the chosen glyph to a circle owned by your ship.
522For example:
524```
525~sampel-palnet:talk> ;bind + /my-circle
526```
528#### Unbind
530Syntax: `;unbind [glyph] /circle-name`
532Unassigns the chosen glyph from a circle owned by your ship.
534For example:
536```
537~sampel-palnet:talk> ;unbind + /my-circle
538```
540### Prefixes
542Received posts are prefixed with a glyph to let you know what the
543audience is. You can activate an individual post to see the full
544audience.
546There are a few special-purpose glyphs:
548- `|` - Informational messages
549- `:` - Posts directly to you
550- `;` - Posts to you and others (a multiparty conversation)
551- `*` - Posts to a complex audience that doesn't directly include you.
554### Configuration
556#### Set Audience
558`;~ship/circle`
560Set audience to `~ship/circle`.
562#### Set Audience by Glyph
564Syntax: `;[glyph]`
566Set audience to the circle previously bound to the chosen glyph.
568#### Set Audience to Ship
570syntax `;~ship`
572Set audience to another ship.
574#### Set Audience to Own Circle
576Syntax: `;%circle`
578Set audience to a circle on your own ship
580#### Set Audience + Send Message
582Syntax: `;~dannum-mitryl this is a private message`
584Set the audience and send a post in the same line. This works for all of the
585above audience commands.
587Your audience is configured with regard to the following rules (in order):
589- if you manually set the audience, that audience.
590- if you activated a post, the post you activated.
591- audience of the last post sent.
593### Local nicknames
595#### See Nicknames
597Syntax: `;nick`
599List all local nicknames.
601#### Find Nickname
603Syntax: `;nick ~some-urbit`
605Look up a nickname using the known ship-name.
607#### Reverse Find Nickname
609syntax: `;nick plato`
611Find a ship's name using its nickname.
613#### Set Nickname
615Syntax: `;nick ~some-urbit plato`
617Create a new nickname.
619#### Clear Nickname
621Syntax: `;nick ~some-urbit ~`
623Clear an assigned nickname.
625#### Display Nicks, Not Ship-Names
627Syntax: `;set nicks`
629Show nicknames instead of ship-names. If no local nickname is set, uses
630that user's handle. If the user has no handle, just the urbit name.
632#### Display Ship-Names, Not Nicks
634Syntax: `;unset nicks`
636Show ship-names instead of nicknames.
638Nicknames and handles longer than 14 character will be truncated in
639output. Nicknames are strictly local - like the names on entries in a
640phonebook.
642### Miscellaneous configuration
644#### Show Timestamps
646Syntax: `;set showtime`
648Show the timestamp for each message.
650#### Hide Timestamps
652Syntax: `;unset showtime`
654Stop showing the timestamp for each message.
656#### Change Time Zone
658Syntax: `;set timezone [+/-][hours]`
660Adjust the display of the timestamps to a specific timezone. Relative to UTC.
662#### Sound Notification On
664Syntax: `;set notify`
666Emit a terminal bell sound if your six-syllable ship name is mentioned in
667a message.
669#### Sound Notification Off
671Syntax `;unset notify`
673Do not notify when your ship name is mentioned.
675#### Set Width
677Syntax: `;set width [number]`
679Set the rendering width of `:talk` to a specific number of characters.
680(Minimum of 30.)