on 7ad4e83 help sign in
urbit.org/using/messaging.md
677 lines 15 kB history raw
1+++
2title = "Messaging"
3weight = 2
4template = "doc.html"
5+++
6Talk is the built-in frontend for the Urbit messaging and notifications
7protocol, Hall. Today we use Hall to chat and coordinate, but it's really
8a general purpose piece of infrastructure.
10For the time being come join us in `/urbit-help` by using the
11'quickstart' section below.
13Today, Hall is sort of like a distributed, encrypted Slack that can be
14used from the CLI and the browser. There’s no central Hall server.
15Any urbit can host one.
17Hall is a general purpose tool for both aggregating and publishing
18streams of messages. Applications can use Hall as their transport
19protocol, API connectors can push disparate data sources into Hall,
20and so on. There are lots of things a distributed message protocol can
21be used for that we haven't even thought of.
23Here we'll be discussing how to operate the default CLI frontend, Talk,
24to send and receive messages. For a more in-depth look at Hall's internals,
25take a look at its [documentation](../hall).
27## Quickstart
29The most common use of talk right now is as a single-instance of Slack: one main
30channel (`/urbit-help`) and direct messages. Everyone is more than welcome
31in `/urbit-help`. It's the place to get help, ask questions and chat about
32Urbit in general.
34There are two ways of using Talk: from the terminal running the Urbit process,
35or through a web UI available at `http://localhost:8080/~~/talk`. This
36quick-start guide will cover the first method.
38##### Joining a Channel
40In Hall, a medium for a message is called a _circle_. There are four types of
41circles, but we for now we'll be dealing with the _channel_: a publicly
42accessible chatroom for general use. We'll discuss the other three
43kinds in the [manual](#manual) section.
45Let's join the `/urbit-help` channel. Use `ctrl-x` to switch from Dojo to Talk.
46Then, :
48```
49~your-urbit:talk> ;join /urbit-help
50```
52You'll see something like:
54```
55--------------| ;join /urbit-help
56--------------| :: onn /urbit-help
57--------------| bound '=' {[hos=~binzod nom=%urbit-help]}
58--------------| new = /urbit-help
59--------------| /urbit-help: cap: For Urbit-related discussion. Politically
60 | correct and safe for work. Don't be rude.
61--------------| /urbit-help: fit: caps:n unic:n
62~your-urbit:talk=
63```
65Scrolling down your terminal window, you'll probably also see the playback of
66previous `/urbit-help` messages that you missed.
68Post a line to `/urbit-help`:
70```
71~your-urbit:talk= Hello, world!
72```
74You'll see your message printed below messages from others that came before it:
76```
77~your-urbit= Hello, world!
78```
80##### Direct Messaging
82To send a direct message to someone, first set your audience:
84```
85~your-urbit:talk= ;~talsur-todres
86```
88You'll see your prompt change:
90```
91~your-urbit:talk[~talsur-todres]
92```
94Now you and `~talsur-todres` can exchange messages directly.
96```
97~your-urbit:talk[~talsur-todres] Hey buddy!
98```
100To set your audience back to `/urbit-help`:
102```
103~your-urbit:talk[~talsur-todres] ;/urbit-help
104```
106You'll see your prompt change back:
108```
109~your-urbit:talk=
110```
112You can also use the ASCII "glyph" assigned to your `/urbit-help` circle as a shortcut:
114```
115~your-urbit:talk[~talsur-todres] ;=
116~your-urbit:talk=
117```
119(Your ship may have a different glyph than `=` for your circle)
121Use `;leave` to unsubscribe from a channel:
123```
124~your-urbit:talk= ;leave /urbit-help
125```
127The web UI ships as compiled JavaScript on your urbit, but has its own
128source repo [here](https://github.com/urbit/talk).
130Last, let's create a channel we can invite some friends to:
132```
133~your-urbit:talk= ;create channel %my-channel 'Some description.'
134```
136Now you can tell your friends to `;join ~your-urbit/my-channel`.
138---
140<span id="manual"></span>
141## Manual
143Hall's design is similar in spirit to
144[NNTP](https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol),
145the underlying protocol for Usenet.
147Our design is pretty simple: Hall messages are called _posts_. Posts
148go to _circles_. Any urbit can host or subscribe to any number of circles.
150There are four kinds of circles: a write-only `%mailbox` for direct
151messages, an invite-only `%village` for private conversation, a read-only
152`%journal` for curated content, and a public-access `%channel` for
153general use.
155### Posts
157A post can be a variety of different data structures. Let's look at the
158ones you can use from within Talk: lines, URLs, Hoon and replies.
160##### Lines
162A line is simply a string of text. Depending on the filtering rules set
163by the circle's host, these may or may not include uppercase and Unicode
164characters (see [filter](#filter)).
166If the line starts with `@`, it's an action (like `/me` in IRC).
168```
169~your-urbit:talk= @sends a message.
170```
172will print as
174```
175~your-urbit sends a message.
176```
178##### URLs
180A URL is any valid URL.
182```
183~your-urbit:talk= https://example.com/
184```
186##### Hoon
188You can use Talk to evaluate Hoon code and share the result with everyone in a
189Hall circle. To do so, preface your Hoon with `#`.
191```
192~your-urbit:talk= #(add 2 2)
193```
195will print as
197```
198~your-urbit# (add 2 2)
200```
202##### Replies
204To indicate what you're saying is in direct response to a specific
205message, select the message (see Activating Lines below) and type your
206response.
208```
209~some-urbit= Hello! How are you?
210~your-urbit:talk= ; Well, thanks!
211```
213will print as
215```
216~your-urbit=^ Well, thanks!
217```
219### Activating Lines
221A line number identifying the **subsequent** line is displayed every 5
222lines.
224```
225---------[0]
226~your-urbit= This is my message.
227~your-urbit= This is another message.
228~your-urbit sends a message.
229~your-urbit/ http://example.com/
230~your-urbit# (add 2 2)
231 4
232---------[5]
233~your-urbit=^ That's my message!
234```
236You can use a line number to **activate** a line:
238```
239~your-urbit:talk= ;5
240```
242which prints the number, line identifier, timestamp, sender, audience,
243and contents:
245```
246? 0
2470v3.hl51p.jhege.amhec.vb37r.3rejr at ~2016.6.24..04.48.21..a235
248~your-urbit to ~another-urbit
249in reply to: ~your-urbit:
250> This is my message.
251That's my message!
252```
254If information got truncated — like what happens for long URLs or expressions,
255or if there's additional information available — as is the case with
256replies and attachments (e.g. stack traces) — activating the message will show
257you all the details.
259You can also activate the most recent line with `;`, the second-most recent
260with `;;`, and so on.
262### Creating and managing circles
264As mentioned before, any urbit can host any number of circles. Existing circles
265can be deleted or modified with various commands. All commands in this section
266shoild be sent from the `talk>` prompt.
268###### Create
270Syntax: `;create [type] %name 'description'`
272Creates and joins a circle, where `[type]` is any of the following:
273- `channel`: public circle. Has a blacklist for write control.
274- `village`: invite-only circle.
275- `journal`: publicly readable, invite-only for writing.
276- `mailbox`: publicly writeable, can only be read by its host.
278Let's create an example mailbox:
280```
281sampel-palnet:talk> ;create mailbox %coolbox 'cool messages only'
282```
284Something like this should print:
286```
287--------------| ;create mailbox %coolbox 'cool messages only'
288--------------| :: onn %coolbox
289--------------| bound '>' {[hos=~sampel-palnet nom=%coolbox]}
290--------------| %coolbox: see ~sampel-palnet hear
291--------------| new > %coolbox
292--------------| %coolbox: cap: cool messages only
293--------------| %coolbox: fit: caps:Y unic:✔
294```
296###### Delete
298Syntax: `;delete %name 'optional reason'`
300Deletes a circle. If a reason is specified, that gets sent to all
301subscribers before the circle gets deleted.
303To delete our example above:
305```
306sampel-palnet:talk> ;delete %coolbox 'people sent uncool messages'
307```
309###### Change Description
311Syntax: `;depict %name 'description'`
313Changes the description of an existing circle `%name`.
315For example:
317```
318sampel-palnet:talk> ;depict %coolbox 'cool messages only. NO EXCEPTIONS.'
319```
321<span id="filter"></span>
322###### Filter
324Syntax: `;filter %name [capitals] [unicode]`
326Configures the message filter for circle `%name`: whether to allow
327capital and/or unicode characters. `y`/`&`/`true` for allowed,
328`n`/`|`/`false` for disallowed.
330So, to allow capital letters and disallow unicode in the circle `%coolbox`:
332```
333sampel-palnet:talk> ;filter %coolbox & |
334```
335or
336```
337sampel-palnet:talk> ;filter %coolbox y n
338```
340And we get the output:
342```
343--------------| ;filter %coolbox & |
344--------------| %coolbox: fit: caps:Y unic:n
345```
347###### Invite
349Syntax: `;invite %name ~someone`
351Invites someone into your circle `%name`. If they were previously banished,
352removes them from the blacklist.
353Can also invite multiple ships at once, `~comma, ~separated`.
355For example:
357```
358~sampel-palnet:talk> ;invite %coolbox ~lodleb-ritrul
359```
361###### Banish
363Syntax: `;banish %name ~someone`
365Removes someone from your circle `%name`. If they were previously invited,
366removes them from the whitelist.
367Can also banish multiple ships at once, `~comma, ~separated`.
369###### Source
371Syntax: `;source %name ~other/circle`
373Adds `~other/circle` as a source for circle `%name`. This causes all
374messages sent to `~other/circle` to also appear in `%name`.
376For example:
378```
379~sampel-palnet:talk> ;source %coolbox ~marzod/urbit-help
380```
382###### Unsource
384Syntax: `;unsource %name ~other/circle`
386Removes `~other/circle` as a source for circle `%name`.
388For example:
390```
391~sampel-palnet:talk> ;unsource %coolbox ~marzod/urbit-help
392```
394### Circle Membership
396If you have joined a circle, you can make this information publicly
397available to help others find that circle as well.
399###### Show Membership
401Syntax: `;show ~some/circle`
403Adds a circle to your public membership list on your Hall profile. Hall profiles
404are not used yet.
406###### Hide Membership
408Syntax: `;hide ~some/circle`
410Removes a circle from your public membership list on your Hall profile. Hall
411profiles are not used yet.
413### Status
415You'll see status notifications when people enter or leave circles you're
416subscribed to.
418###### Notifications Off
420Syntax: `;set quiet`
422Turn off status (and config) notifications.
424###### Notifications On
426Syntax: `;unset quiet`
428Turn on status (and config) notifications.
430###### Who
432Syntax: `;who`
434List everyone in all your subscribed circles. Optionally specify a
435specific circle to list members of just those: `;who ~some/circle`
437For example:
439```
440~sampel-palnet:talk> ;who ~marzod/urbit-help
441```
443###### Attend
445Syntax: `;attend ~some/circle [presence]`
447Manually set your presence to show up as one of the following. (In the
448future, a sufficiently advanced client can automatically set these for
449you.)
451- `talk` - typing
452- `hear` - listening
453- `idle` - inactive
454- `gone` - not present
456For example:
458```
459~sampel-palnet:talk> ;attend ~marzod/urbit-help idle
460```
462###### Set Display Name
464Syntax: `;name ~some/circle 'my handle'`
466Set a handle ("name") for yourself in a specific circle. It will display
467to users who have done `;set nicks`, but gets truncated if it's longer
468than 14 characters.
470## Audience
472An audience consists of one or more messaging targets. These can be
473circles or ships. (In the latter case, it's secretly the `~ship/inbox`
474circle.)
476#### Circle Glyphs
478Glyphs are found at the end of your prompt to as a quick indicator of where
479your messages will be sent.
481Glyphs are assigned by circle hash out of the following list:
483```
484> = + - } ) , . " ' ^ $ % & @
485```
487Alphanumeric characters and `|#;:*~_` are reserved; all others (the
488above list, and `\/!?({<`) can be manually assigned.
490For example, `-` the glyph at the end of the prompt below might indicates that
491messages sent from this prompt will go to some circle with that glyph:
493```
494~sampel-palnet:talk-
495```
497To see what circle is bound to a glyph, use the `;what` command followed by the
498glyph in question. For example, to see `=`:
500```
501~sampel-palnet:talk> ;what =
502/urbit-help
503```
505Not every audience has a glyph, however. When the audience doesn't have a glyph,
506such as in the case of direct-messaging a ship, we see their name at the end of
507the prompt instead. Here we're talking directly to `~dannum-mitryl`:
509```
510~sampel-palnet:talk[~dannum-mitryl]
511```
513###### Bind
515Syntax: `;bind [glyph] /circle-name`
517Assigns the chosen glyph to a circle owned by your ship.
519For example:
521```
522~sampel-palnet:talk> ;bind + /my-circle
523```
525###### Unbind
527Syntax: `;unbind [glyph] /circle-name`
529Unassigns the chosen glyph from a circle owned by your ship.
531For example:
533```
534~sampel-palnet:talk> ;unbind + /my-circle
535```
537### Prefixes
539Received posts are prefixed with a glyph to let you know what the
540audience is. You can activate an individual post to see the full
541audience.
543There are a few special-purpose glyphs:
545- `|` - Informational messages
546- `:` - Posts directly to you
547- `;` - Posts to you and others (a multiparty conversation)
548- `*` - Posts to a complex audience that doesn't directly include you.
551### Configuration
553###### Set Audience
555`;~ship/circle`
557Set audience to `~ship/circle`.
559###### Set Audience by Glyph
561Syntax: `;[glyph]`
563Set audience to the circle previously bound to the chosen glyph.
565###### Set Audience to Ship
567syntax `;~ship`
569Set audience to another ship.
571###### Set Audience to Own Circle
573Syntax: `;%circle`
575Set audience to a circle on your own ship
577###### Set Audience + Send Message
579Syntax: `;~dannum-mitryl this is a private message`
581Set the audience and send a post in the same line. This works for all of the
582above audience commands.
584Your audience is configured with regard to the following rules (in order):
586- if you manually set the audience, that audience.
587- if you activated a post, the post you activated.
588- audience of the last post sent.
590### Local nicknames
592###### See Nicknames
594Syntax: `;nick`
596List all local nicknames.
598###### Find Nickname
600Syntax: `;nick ~some-urbit`
602Look up a nickname using the known ship-name.
604###### Reverse Find Nickname
606syntax: `;nick plato`
608Find a ship's name using its nickname.
610###### Set Nickname
612Syntax: `;nick ~some-urbit plato`
614Create a new nickname.
616###### Clear Nickname
618Syntax: `;nick ~some-urbit ~`
620Clear an assigned nickname.
622###### Display Nicks, Not Ship-Names
624Syntax: `;set nicks`
626Show nicknames instead of ship-names. If no local nickname is set, uses
627that user's handle. If the user has no handle, just the urbit name.
629###### Display Ship-Names, Not Nicks
631Syntax: `;unset nicks`
633Show ship-names instead of nicknames.
635Nicknames and handles longer than 14 character will be truncated in
636output. Nicknames are strictly local - like the names on entries in a
637phonebook.
639### Miscellaneous configuration
641###### Show Timestamps
643Syntax: `;set showtime`
645Show the timestamp for each message.
647###### Hide Timestamps
649Syntax: `;unset showtime`
651Stop showing the timestamp for each message.
653###### Change Time Zone
655Syntax: `;set timezone [+/-][hours]`
657Adjust the display of the timestamps to a specific timezone. Relative to UTC.
659###### Sound Notification On
661Syntax: `;set notify`
663Emit a terminal bell sound if your six-syllable ship name is mentioned in
664a message.
666###### Sound Notification Off
668Syntax `;unset notify`
670Do not notify when your ship name is mentioned.
672###### Set Width
674Syntax: `;set width [number]`
676Set the rendering width of `:talk` to a specific number of characters.
677(Minimum of 30.)