Merge branch 'master' of github.com:urbit/urbit into newdoc

This commit is contained in:
Galen Wolfe-Pauly 2015-11-03 14:03:35 -08:00
commit adea97c3a5
9 changed files with 98 additions and 47 deletions

View File

@ -154,7 +154,7 @@
::
++ stan :: station
;~ pose
(cold [our.hid man.she] tis)
(cold [our.hid man.she] col)
;~(pfix cen (stag our.hid sym))
;~(pfix fas (stag (sein our.hid) sym))
::
@ -179,7 +179,10 @@
++ nump :: number reference
;~ pose
;~(pfix hep dem:ag)
;~(plug (cook lent (plus (just '0'))) dem:ag)
;~ plug
(cook lent (plus (just '0')))
;~(pose dem:ag (easy 0))
==
(stag 0 dem:ag)
==
::
@ -356,7 +359,7 @@
:: =+ pad=(sub 36 (lent bun))
:: =+ now=`@da`(dis now.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000)
%+ sh-fact %txt
(runt [(sub 15 (lent bun)) '-'] "[{bun}]")
(runt [(sub 13 (lent bun)) '-'] "[{bun}]")
::
++ sh-repo-house-diff
|= [one=shelf two=shelf]
@ -1055,7 +1058,9 @@
=. ..sh-fact (sh-fact %txt "? {(scow %s (new:si | +(num)))}")
(activate (snag num grams.roy))
?. (gth q.num count.roy)
=+ msg=(deli count.roy num)
?~ count.roy
(sh-lame "0: no messages")
=+ msg=(deli (dec count.roy) num)
=. ..sh-fact (sh-fact %txt "? {(scow %ud msg)}")
(activate (snag (sub count.roy +(msg)) grams.roy))
(sh-lame "…{(reap p.num '0')}{(scow %ud q.num)}: no such telegram")
@ -1748,7 +1753,7 @@
^- tape
?: =(p.one our.hid)
?: =(q.one man)
"="
":"
['%' (trip q.one)]
?: =(p.one (sein our.hid))
['/' (trip q.one)]
@ -1841,16 +1846,24 @@
++ te-whom :: render sender
(~(ta-show ta man (need te-best)) ~ te-maud)
::
++ ta-dire :: direct message
|= pan=partner ^- ?
?& ?=(& -.pan)
=(p.p.pan our.hid)
::
=+ sot=(~(get by stories) q.p.pan)
&(?=(^ sot) ?=(%brown p.cordon.shape.u.sot))
==
::
++ te-pref :: audience glyph
^- tape
=+ cha=(~(get by nik) lix)
?^ cha ~[u.cha ' ']
?. ?=([[& ^] ~ ~] lix) "* "
=+ sta=p.n.lix
=+ sot=(~(get by stories) q.sta)
?: &(=(p.sta our.hid) ?=(^ sot) ?=(%brown p.cordon.shape.u.sot))
": "
?. (lien (~(tap by lix)) ta-dire)
"* "
?: ?=([[& ^] ~ ~] lix)
": "
"; "
--
::
++ tr :: telegram renderer
@ -1944,7 +1957,10 @@
%lin
=+ txt=(trip q.sep)
?: p.sep
(weld ~(te-pref te man tr-pals) txt)
=+ pal=tr-pals
=. pal ?: =(who our.hid) pal
(~(del in pal) [%& who (main who)])
(weld ~(te-pref te man pal) txt)
?: oug
(weld "@ " txt)
(weld " " txt)

View File

@ -700,7 +700,7 @@
^- [? _.]
=+ suy=(fall (~(get by qel.ged) ost) 0)
?: =(20 suy)
~& [%ap-fill-full [our dap] q.q.pry ost]
:: ~& [%ap-fill-full [our dap] q.q.pry ost]
[%| +]
:: ~? !=(20 suy) [%ap-fill-add [[our dap] q.q.pry ost] +(suy)]
[%& +(qel.ged (~(put by qel.ged) ost +(suy)))]

View File

@ -89,6 +89,3 @@ Run `make`:
make
(On FreeBSD, use `gmake` instead.)
The executable is `bin/urbit`. Install it somewhere, or just use
it where it is.

View File

@ -59,7 +59,7 @@ be anyone, so you have zero reputation. You have no official
access to any Urbit services. Any connectivity you may enjoy
could be shut off at any time, and it probably will be. If the
Internet has proven one thing, it's that positive default
reputation and effectively infinite identity don't mix.
reputation and effectively infinite number of identities don't mix.
## Substrate interactions

View File

@ -11,10 +11,10 @@ argument, which is the pier directory (`$PIER`). This is your
planet name if you have a planet, or the name you used with `-c`
if you have a comet:
urbit fintud-macrep
bin/urbit fintud-macrep
or
urbit mycomet
bin/urbit mycomet
Piers are portable. You can move a pier anywhere. But never,
*ever* run the same urbit in two places at once. (If you try to
@ -83,7 +83,8 @@ filesystem. `+ls` is a generator; it produces a value.
## Converse: your `:talk` appliance
To use Urbit as a social network, switch to `:talk`:
To use Urbit as a social network, switch to `:talk` (remember, use ^x to
switch between appliances):
~fintud-macrep:talk()
@ -95,6 +96,8 @@ You're on the air! You should see some backlog to give you
context. Please remember our code of conduct: don't be rude.
Also, `urbit-meta` is politically correct and safe for work.
For more instructions on how to use `:talk`, see the [`:talk` manual](http://urbit.org/docs/user/talk)
## Using the filesystem
The Urbit filesystem, `%clay`, is a revision-control system (like

View File

@ -138,13 +138,23 @@ Any post you see reached you in one of three ways. Either it was
sent directly to just you; to you and others; or to a station you
subscribe to.
Posts to just you are `:`. Posts to you and others (a multiparty
conversation) are `*`, unless you've bound this conversation to a
glyph. Posts to a station use that station's glyph.
Informational messages are `|`. Posts directly to you are `:`. Posts to
you and others (a multiparty conversation) are `;`, unless you've bound
this conversation to a glyph. Posts to a station use that station's
glyph. Posts to a complex audience that doesn't directly include you are
`*`.
### Station Glyphs
Glyphs are assigned by station hash out of the lists `>=+-`, `}),.`,
``"'`^``, and `$%&@`, in decreasing order of preference, and cycling
back to the first in case of sufficient collisions.
You can see a list of glyph bindings with `;what`. Write
`;what >` to see what station `>` is bound to, or
`;what /urbit-meta` to see if `/urbit-meta` has a binding.
Alphanumeric characters and `|#;:*~_` are reserved; all others (the above
lists, and `\/!?({<`) can be manually assigned. `;bind > /urbit-test`
will assign the `>` annotation to `/urbit-test`.
### Audience selection
@ -228,6 +238,8 @@ most recent; etc.
### Nicknames
<mark>Not yet implemented</mark>
Sometimes you know your Urbit friends by other names, on or
offline. Use the `;nick` command to assign or look up
nicknames.
@ -253,6 +265,8 @@ lists everyone in that station.
### Typing indicator
<mark>Not yet implemented</mark>
If one or more urbits in your audience is typing, `:talk`'s
presence system will detect it and change the prompt:
@ -260,6 +274,10 @@ presence system will detect it and change the prompt:
### Creating and managing stations
<mark>Non-channel stations, and managing white/blacklists,
are a planned feature that is not yet implemented</mark>
To create your own mailbox, party, journal or board:
;create party %myfunparty
@ -284,10 +302,3 @@ To ban from `%bizarre-board`:
To appoint a coauthor of `%serious-journal`:
;author %serious-journal ~lagret-marpub
#### Station glyphs
Station are assigned out of the list `:|}>`, then
randomly out of it and the sets `-+*.`, ``,=`'^\/``,
`$%&@`, and `{<[]()`, in decreasing order of probabilty.
Alphanumeric characters and `!#?;~_` are reserved.

View File

@ -94,7 +94,7 @@ module.exports = recl
stations:StationStore.getStations()
configs:StationStore.getConfigs()
typing:MessageStore.getTyping()
glyph:StationStore.getGlyphMap()
glyphs:StationStore.getGlyphMap()
}
getInitialState: -> @stateFromStore()
@ -198,10 +198,10 @@ module.exports = recl
div {id: "messages"}, _messages.map (_message,k) =>
nowSaid = [_message.ship,_message.thought.audience]
glyph = window.util.getGlyph @state.glyphs, _.keys _message.thought.audience
{station} = @state
mess = {
station, @_handlePm, @_handleAudi,
glyph: @state.glyph[(_.keys _message.thought.audience).join " "]
glyph, station, @_handlePm, @_handleAudi,
unseen: lastIndex and lastIndex is k
sameAs: _.isEqual lastSaid, nowSaid
}

View File

@ -385,7 +385,7 @@ module.exports = recl({
stations: StationStore.getStations(),
configs: StationStore.getConfigs(),
typing: MessageStore.getTyping(),
glyph: StationStore.getGlyphMap()
glyphs: StationStore.getGlyphMap()
};
},
getInitialState: function() {
@ -508,14 +508,15 @@ module.exports = recl({
id: "messages"
}, _messages.map((function(_this) {
return function(_message, k) {
var mess, nowSaid, ref4;
var glyph, mess, nowSaid, ref4;
nowSaid = [_message.ship, _message.thought.audience];
glyph = window.util.getGlyph(_this.state.glyphs, _.keys(_message.thought.audience));
station = _this.state.station;
mess = {
glyph: glyph,
station: station,
_handlePm: _this._handlePm,
_handleAudi: _this._handleAudi,
glyph: _this.state.glyph[(_.keys(_message.thought.audience)).join(" ")],
unseen: lastIndex && lastIndex === k,
sameAs: _.isEqual(lastSaid, nowSaid)
};
@ -6293,10 +6294,13 @@ if (!window.util) {
_.merge(window.util, {
mainStations: ["court", "floor", "porch"],
mainStationPath: function(user) {
if (user == null) {
user = window.urb.user;
}
return "~" + user + "/" + (window.util.mainStation(user));
},
mainStation: function(user) {
if (!user) {
if (user == null) {
user = window.urb.user;
}
switch (user.length) {
@ -6308,10 +6312,22 @@ _.merge(window.util, {
return "porch";
}
},
getGlyph: function(glyphs, audi) {
return glyphs[audi.join(" ")] || (function() {
switch (false) {
case !!_.contains(audi, window.util.mainStationPath()):
return "*";
case audi.length !== 1:
return ":";
default:
return ";";
}
})();
},
clipAudi: function(audi) {
var ms, regx;
audi = audi.join(" ");
ms = window.util.mainStationPath(window.urb.user);
ms = window.util.mainStationPath();
regx = new RegExp("/" + ms, "g");
audi = audi.replace(regx, "");
return audi.split(" ");
@ -6319,7 +6335,7 @@ _.merge(window.util, {
expandAudi: function(audi) {
var ms;
audi = audi.join(" ");
ms = window.util.mainStationPath(window.urb.user);
ms = window.util.mainStationPath();
if (audi.indexOf(ms) === -1) {
if (audi.length > 0) {
audi += " ";

View File

@ -2,10 +2,10 @@ if not window.util then window.util = {}
_.merge window.util,
mainStations: ["court","floor","porch"]
mainStationPath: (user) -> "~#{user}/#{window.util.mainStation(user)}"
mainStationPath: (user = window.urb.user) ->
"~#{user}/#{window.util.mainStation(user)}"
mainStation: (user) ->
if not user then user = window.urb.user
mainStation: (user = window.urb.user) ->
switch user.length
when 3
return "court"
@ -14,16 +14,24 @@ _.merge window.util,
when 13
return "porch"
getGlyph: (glyphs, audi)->
glyphs[audi.join " "] or switch
when not _.contains audi, window.util.mainStationPath()
"*"
when audi.length is 1
":"
else ";"
clipAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.user
ms = window.util.mainStationPath()
regx = new RegExp "/#{ms}","g"
audi = audi.replace regx,""
audi.split " "
expandAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.user
ms = window.util.mainStationPath()
if audi.indexOf(ms) is -1
if audi.length > 0
audi += " "