mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 11:08:45 +03:00
Merge remote-tracking branches 'anton/talkfix', 'anton/talk-audi' and 'curtis/no-ap-full' into pending
This commit is contained in:
commit
586f97adc3
@ -179,7 +179,10 @@
|
|||||||
++ nump :: number reference
|
++ nump :: number reference
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(pfix hep dem:ag)
|
;~(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)
|
(stag 0 dem:ag)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -356,7 +359,7 @@
|
|||||||
:: =+ pad=(sub 36 (lent bun))
|
:: =+ pad=(sub 36 (lent bun))
|
||||||
:: =+ now=`@da`(dis now.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000)
|
:: =+ now=`@da`(dis now.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000)
|
||||||
%+ sh-fact %txt
|
%+ sh-fact %txt
|
||||||
(runt [(sub 15 (lent bun)) '-'] "[{bun}]")
|
(runt [(sub 13 (lent bun)) '-'] "[{bun}]")
|
||||||
::
|
::
|
||||||
++ sh-repo-house-diff
|
++ sh-repo-house-diff
|
||||||
|= [one=shelf two=shelf]
|
|= [one=shelf two=shelf]
|
||||||
@ -1055,7 +1058,9 @@
|
|||||||
=. ..sh-fact (sh-fact %txt "? {(scow %s (new:si | +(num)))}")
|
=. ..sh-fact (sh-fact %txt "? {(scow %s (new:si | +(num)))}")
|
||||||
(activate (snag num grams.roy))
|
(activate (snag num grams.roy))
|
||||||
?. (gth q.num count.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)}")
|
=. ..sh-fact (sh-fact %txt "? {(scow %ud msg)}")
|
||||||
(activate (snag (sub count.roy +(msg)) grams.roy))
|
(activate (snag (sub count.roy +(msg)) grams.roy))
|
||||||
(sh-lame "…{(reap p.num '0')}{(scow %ud q.num)}: no such telegram")
|
(sh-lame "…{(reap p.num '0')}{(scow %ud q.num)}: no such telegram")
|
||||||
@ -1748,7 +1753,7 @@
|
|||||||
^- tape
|
^- tape
|
||||||
?: =(p.one our.hid)
|
?: =(p.one our.hid)
|
||||||
?: =(q.one man)
|
?: =(q.one man)
|
||||||
"="
|
":"
|
||||||
['%' (trip q.one)]
|
['%' (trip q.one)]
|
||||||
?: =(p.one (sein our.hid))
|
?: =(p.one (sein our.hid))
|
||||||
['/' (trip q.one)]
|
['/' (trip q.one)]
|
||||||
@ -1841,16 +1846,24 @@
|
|||||||
++ te-whom :: render sender
|
++ te-whom :: render sender
|
||||||
(~(ta-show ta man (need te-best)) ~ te-maud)
|
(~(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
|
++ te-pref :: audience glyph
|
||||||
^- tape
|
^- tape
|
||||||
=+ cha=(~(get by nik) lix)
|
=+ cha=(~(get by nik) lix)
|
||||||
?^ cha ~[u.cha ' ']
|
?^ cha ~[u.cha ' ']
|
||||||
?. ?=([[& ^] ~ ~] lix) "* "
|
?. (lien (~(tap by lix)) ta-dire)
|
||||||
=+ sta=p.n.lix
|
|
||||||
=+ sot=(~(get by stories) q.sta)
|
|
||||||
?: &(=(p.sta our.hid) ?=(^ sot) ?=(%brown p.cordon.shape.u.sot))
|
|
||||||
": "
|
|
||||||
"* "
|
"* "
|
||||||
|
?: ?=([[& ^] ~ ~] lix)
|
||||||
|
": "
|
||||||
|
"; "
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ tr :: telegram renderer
|
++ tr :: telegram renderer
|
||||||
@ -1944,7 +1957,10 @@
|
|||||||
%lin
|
%lin
|
||||||
=+ txt=(trip q.sep)
|
=+ txt=(trip q.sep)
|
||||||
?: p.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
|
?: oug
|
||||||
(weld "@ " txt)
|
(weld "@ " txt)
|
||||||
(weld " " txt)
|
(weld " " txt)
|
||||||
|
@ -700,7 +700,7 @@
|
|||||||
^- [? _.]
|
^- [? _.]
|
||||||
=+ suy=(fall (~(get by qel.ged) ost) 0)
|
=+ suy=(fall (~(get by qel.ged) ost) 0)
|
||||||
?: =(20 suy)
|
?: =(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)]
|
:: ~? !=(20 suy) [%ap-fill-add [[our dap] q.q.pry ost] +(suy)]
|
||||||
[%& +(qel.ged (~(put by qel.ged) ost +(suy)))]
|
[%& +(qel.ged (~(put by qel.ged) ost +(suy)))]
|
||||||
|
@ -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
|
sent directly to just you; to you and others; or to a station you
|
||||||
subscribe to.
|
subscribe to.
|
||||||
|
|
||||||
Posts to just you are `:`. Posts to you and others (a multiparty
|
Informational messages are `|`. Posts directly to you are `:`. Posts to
|
||||||
conversation) are `*`, unless you've bound this conversation to a
|
you and others (a multiparty conversation) are `;`, unless you've bound
|
||||||
glyph. Posts to a station use that station's glyph.
|
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
|
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
|
### Audience selection
|
||||||
|
|
||||||
@ -228,6 +238,8 @@ most recent; etc.
|
|||||||
|
|
||||||
### Nicknames
|
### Nicknames
|
||||||
|
|
||||||
|
<mark>Not yet implemented</mark>
|
||||||
|
|
||||||
Sometimes you know your Urbit friends by other names, on or
|
Sometimes you know your Urbit friends by other names, on or
|
||||||
offline. Use the `;nick` command to assign or look up
|
offline. Use the `;nick` command to assign or look up
|
||||||
nicknames.
|
nicknames.
|
||||||
@ -253,6 +265,8 @@ lists everyone in that station.
|
|||||||
|
|
||||||
### Typing indicator
|
### Typing indicator
|
||||||
|
|
||||||
|
<mark>Not yet implemented</mark>
|
||||||
|
|
||||||
If one or more urbits in your audience is typing, `:talk`'s
|
If one or more urbits in your audience is typing, `:talk`'s
|
||||||
presence system will detect it and change the prompt:
|
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
|
### 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:
|
To create your own mailbox, party, journal or board:
|
||||||
|
|
||||||
;create party %myfunparty
|
;create party %myfunparty
|
||||||
@ -284,10 +302,3 @@ To ban from `%bizarre-board`:
|
|||||||
To appoint a coauthor of `%serious-journal`:
|
To appoint a coauthor of `%serious-journal`:
|
||||||
|
|
||||||
;author %serious-journal ~lagret-marpub
|
;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.
|
|
||||||
|
@ -94,7 +94,7 @@ module.exports = recl
|
|||||||
stations:StationStore.getStations()
|
stations:StationStore.getStations()
|
||||||
configs:StationStore.getConfigs()
|
configs:StationStore.getConfigs()
|
||||||
typing:MessageStore.getTyping()
|
typing:MessageStore.getTyping()
|
||||||
glyph:StationStore.getGlyphMap()
|
glyphs:StationStore.getGlyphMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
getInitialState: -> @stateFromStore()
|
getInitialState: -> @stateFromStore()
|
||||||
@ -198,10 +198,10 @@ module.exports = recl
|
|||||||
|
|
||||||
div {id: "messages"}, _messages.map (_message,k) =>
|
div {id: "messages"}, _messages.map (_message,k) =>
|
||||||
nowSaid = [_message.ship,_message.thought.audience]
|
nowSaid = [_message.ship,_message.thought.audience]
|
||||||
|
glyph = window.util.getGlyph @state.glyphs, _.keys _message.thought.audience
|
||||||
{station} = @state
|
{station} = @state
|
||||||
mess = {
|
mess = {
|
||||||
station, @_handlePm, @_handleAudi,
|
glyph, station, @_handlePm, @_handleAudi,
|
||||||
glyph: @state.glyph[(_.keys _message.thought.audience).join " "]
|
|
||||||
unseen: lastIndex and lastIndex is k
|
unseen: lastIndex and lastIndex is k
|
||||||
sameAs: _.isEqual lastSaid, nowSaid
|
sameAs: _.isEqual lastSaid, nowSaid
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ module.exports = recl({
|
|||||||
stations: StationStore.getStations(),
|
stations: StationStore.getStations(),
|
||||||
configs: StationStore.getConfigs(),
|
configs: StationStore.getConfigs(),
|
||||||
typing: MessageStore.getTyping(),
|
typing: MessageStore.getTyping(),
|
||||||
glyph: StationStore.getGlyphMap()
|
glyphs: StationStore.getGlyphMap()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
@ -508,14 +508,15 @@ module.exports = recl({
|
|||||||
id: "messages"
|
id: "messages"
|
||||||
}, _messages.map((function(_this) {
|
}, _messages.map((function(_this) {
|
||||||
return function(_message, k) {
|
return function(_message, k) {
|
||||||
var mess, nowSaid, ref4;
|
var glyph, mess, nowSaid, ref4;
|
||||||
nowSaid = [_message.ship, _message.thought.audience];
|
nowSaid = [_message.ship, _message.thought.audience];
|
||||||
|
glyph = window.util.getGlyph(_this.state.glyphs, _.keys(_message.thought.audience));
|
||||||
station = _this.state.station;
|
station = _this.state.station;
|
||||||
mess = {
|
mess = {
|
||||||
|
glyph: glyph,
|
||||||
station: station,
|
station: station,
|
||||||
_handlePm: _this._handlePm,
|
_handlePm: _this._handlePm,
|
||||||
_handleAudi: _this._handleAudi,
|
_handleAudi: _this._handleAudi,
|
||||||
glyph: _this.state.glyph[(_.keys(_message.thought.audience)).join(" ")],
|
|
||||||
unseen: lastIndex && lastIndex === k,
|
unseen: lastIndex && lastIndex === k,
|
||||||
sameAs: _.isEqual(lastSaid, nowSaid)
|
sameAs: _.isEqual(lastSaid, nowSaid)
|
||||||
};
|
};
|
||||||
@ -6293,10 +6294,13 @@ if (!window.util) {
|
|||||||
_.merge(window.util, {
|
_.merge(window.util, {
|
||||||
mainStations: ["court", "floor", "porch"],
|
mainStations: ["court", "floor", "porch"],
|
||||||
mainStationPath: function(user) {
|
mainStationPath: function(user) {
|
||||||
|
if (user == null) {
|
||||||
|
user = window.urb.user;
|
||||||
|
}
|
||||||
return "~" + user + "/" + (window.util.mainStation(user));
|
return "~" + user + "/" + (window.util.mainStation(user));
|
||||||
},
|
},
|
||||||
mainStation: function(user) {
|
mainStation: function(user) {
|
||||||
if (!user) {
|
if (user == null) {
|
||||||
user = window.urb.user;
|
user = window.urb.user;
|
||||||
}
|
}
|
||||||
switch (user.length) {
|
switch (user.length) {
|
||||||
@ -6308,10 +6312,22 @@ _.merge(window.util, {
|
|||||||
return "porch";
|
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) {
|
clipAudi: function(audi) {
|
||||||
var ms, regx;
|
var ms, regx;
|
||||||
audi = audi.join(" ");
|
audi = audi.join(" ");
|
||||||
ms = window.util.mainStationPath(window.urb.user);
|
ms = window.util.mainStationPath();
|
||||||
regx = new RegExp("/" + ms, "g");
|
regx = new RegExp("/" + ms, "g");
|
||||||
audi = audi.replace(regx, "");
|
audi = audi.replace(regx, "");
|
||||||
return audi.split(" ");
|
return audi.split(" ");
|
||||||
@ -6319,7 +6335,7 @@ _.merge(window.util, {
|
|||||||
expandAudi: function(audi) {
|
expandAudi: function(audi) {
|
||||||
var ms;
|
var ms;
|
||||||
audi = audi.join(" ");
|
audi = audi.join(" ");
|
||||||
ms = window.util.mainStationPath(window.urb.user);
|
ms = window.util.mainStationPath();
|
||||||
if (audi.indexOf(ms) === -1) {
|
if (audi.indexOf(ms) === -1) {
|
||||||
if (audi.length > 0) {
|
if (audi.length > 0) {
|
||||||
audi += " ";
|
audi += " ";
|
||||||
|
@ -2,10 +2,10 @@ if not window.util then window.util = {}
|
|||||||
_.merge window.util,
|
_.merge window.util,
|
||||||
mainStations: ["court","floor","porch"]
|
mainStations: ["court","floor","porch"]
|
||||||
|
|
||||||
mainStationPath: (user) -> "~#{user}/#{window.util.mainStation(user)}"
|
mainStationPath: (user = window.urb.user) ->
|
||||||
|
"~#{user}/#{window.util.mainStation(user)}"
|
||||||
|
|
||||||
mainStation: (user) ->
|
mainStation: (user = window.urb.user) ->
|
||||||
if not user then user = window.urb.user
|
|
||||||
switch user.length
|
switch user.length
|
||||||
when 3
|
when 3
|
||||||
return "court"
|
return "court"
|
||||||
@ -14,16 +14,24 @@ _.merge window.util,
|
|||||||
when 13
|
when 13
|
||||||
return "porch"
|
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) ->
|
clipAudi: (audi) ->
|
||||||
audi = audi.join " "
|
audi = audi.join " "
|
||||||
ms = window.util.mainStationPath window.urb.user
|
ms = window.util.mainStationPath()
|
||||||
regx = new RegExp "/#{ms}","g"
|
regx = new RegExp "/#{ms}","g"
|
||||||
audi = audi.replace regx,""
|
audi = audi.replace regx,""
|
||||||
audi.split " "
|
audi.split " "
|
||||||
|
|
||||||
expandAudi: (audi) ->
|
expandAudi: (audi) ->
|
||||||
audi = audi.join " "
|
audi = audi.join " "
|
||||||
ms = window.util.mainStationPath window.urb.user
|
ms = window.util.mainStationPath()
|
||||||
if audi.indexOf(ms) is -1
|
if audi.indexOf(ms) is -1
|
||||||
if audi.length > 0
|
if audi.length > 0
|
||||||
audi += " "
|
audi += " "
|
||||||
|
Loading…
Reference in New Issue
Block a user