Merge branch 'back-with-license', remote-tracking branches 'ohaitch/unlink-misvale', 'frodwith/wyt', 'ohaitch/ford-platform-dependencies', 'ohaitch/fix-rss', 'Fang/talk-who-fix' and 'Fang/talk-showtime' into maint-20160818

Backport of LICENSE.txt
Hack around a broken mark-subscription edge case
Hint +-wyt:in
Add /===/mar and /===/arvo to %core req dependents
Change .rss-xml to use correct urls, metadata
Fix talk's parsing of ;who
Talk setting: message timestamps
This commit is contained in:
Raymond Pasco 2016-12-12 16:40:36 -08:00
10 changed files with 198 additions and 57 deletions

21
LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Urbit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -289,6 +289,7 @@
%- perk :~
%noob
%quiet
%showtime
==
++ work
%+ knee *^work |. ~+
@ -300,7 +301,7 @@
qut
==
::
;~(plug (perk %who ~) ;~(pose para (easy ~)))
;~(plug (perk %who ~) ;~(pose ;~(pfix ace para) (easy ~)))
;~(plug (perk %bind ~) ;~(pfix ace glyph) (punt ;~(pfix ace para)))
;~((glue ace) (perk %join ~) para)
;~((glue ace) (perk %leave ~) para)
@ -436,8 +437,8 @@
::
++ sh-rend :: print on one line
|= gam/telegram
=+ lin=~(tr-line tr man.she (~(has in settings.she) %noob) gam)
(sh-pass:(sh-fact %txt lin) q.q.gam)
=+ lin=~(tr-line tr man.she settings.she gam)
(sh-pass:(sh-fact %txt lin) q.q.gam)
::
++ sh-numb :: print msg number
|= num/@ud
@ -1003,7 +1004,7 @@
++ activate :: from %number
|= gam/telegram
^+ ..sh-work
=+ tay=~(. tr man.she (~(has in settings.she) %noob) gam)
=+ tay=~(. tr man.she settings.she gam)
=. ..sh-work (sh-fact tr-fact:tay)
sh-prod(active.she `tr-pals:tay)
::
@ -2089,7 +2090,7 @@
::
++ tr :: telegram renderer
|_ $: man/knot
nob/?
sef/(set knot)
who/ship
sen/serial
aud/audience
@ -2106,9 +2107,18 @@
=+ ^= baw
:: ?: oug
:: ~(te-whom te man tr-pals)
?. nob
?. (~(has in sef) %noob)
(~(sn-curt sn man [who (main who)]) |)
(~(sn-nick sn man [who (main who)]))
?: (~(has in sef) %showtime)
=+ dat=(yore now.hid)
=+ ^= t
|= a/@ ^- tape
%+ weld
?: (lth a 10) "0" ~
(scow %ud a)
=+ ^= time :(weld "~" (t h.t.dat) "." (t m.t.dat) "." (t s.t.dat))
:(weld baw txt (reap (sub 67 (lent txt)) ' ') time)
(weld baw txt)
::
++ tr-meta ^- tang

View File

@ -1136,6 +1136,7 @@
&((slob %grow p.pro) (slob too p:(slap pro [%limb %grow])))
:: ~$ link-grow
:: =< $ ~% %grow link-jet ~ |.
%+ cool |.(leaf+"ford: grow {<for>} to {<too>}")
%+ cope (keel cof pro [[%& 6]~ vax]~)
|= {cof/cafe pox/vase}
(maim cof pox [%per [%limb %grow] [%limb too]])
@ -1316,6 +1317,12 @@
::
$core
%+ cool |.(leaf+"ford: core {<(tope p.kas)>}")
:: code runtime behaviour is frequently affected by marks
:: TODO: track this more formally
%+ flag [bek /mar]
:: until /? is in use, any hoon may implicitly depend on arvo types
%+ flag [bek /arvo/hoon]
%+ flag [bek /arvo/zuse]
(cope (lear cof p.kas) (flux |=(a/vase [%& %core a])))
::
$diff

View File

@ -29,23 +29,37 @@
-- ::
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: %gall state
::::::::::::::::::::::::::::::::::::::::::::::::::::::
++ axle-n ?(axle axle-1) :: upgrade path
++ axle-1 {$1 pol/(map ship mast-1)} ::
++ axle-n ?(axle-1 axle-2 axle-3 axle-4) :: upgrade path
++ axle-1 {$1 pol/(map ship mast-1)} ::
++ mast-1 ::
(cork mast |=(mast +<(bum (~(run by bum) seat-1)))) ::
(cork mast-2 |=(mast-2 +<(bum (~(run by bum) seat-1)))) ::
++ seat-1 ::
(cork seat |=(seat +<+)) ::
(cork seat-2 |=(seat-2 +<+)) ::
++ axle-2 {$2 pol/(map ship mast-2)} ::
++ mast-2 (cork mast-3 |=(mast-3 +<+)) ::
++ seat-2 seat-3 ::
++ axle-3 {$3 pol/(map ship mast-3)} ::
++ mast-3 ::
(cork mast-4 |=(mast-4 +<(bum (~(run by bum) seat-3)))) ::
++ seat-3 ::
(cork seat-4 |=(seat-4 +<+)) ::
++ axle-4 axle ::
++ mast-4 mast ::
++ seat-4 seat ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: state proper
::::::::::::::::::::::::::::::::::::::::::::::::::::::
++ axle :: all state
$: $2 :: state version
$: $4 :: state version
pol/(map ship mast) :: apps by ship
== ::
++ gest :: subscriber data
$: sup/bitt :: incoming subscribers
neb/boat :: outgoing subscribers
qel/(map bone @ud) :: queue meter
qel/(map bone @ud) :: queue meter
== ::
++ mast :: ship state
$: sys/duct :: system duct
$: mak/(unit duct) :: ames awaiting crash
sys/duct :: system duct
sap/(map ship scad) :: foreign contacts
bum/(map dude seat) :: running agents
wub/(map dude sofa) :: waiting queue
@ -64,9 +78,15 @@
$: p/@ud :: bone sequence
q/(map duct bone) :: by duct
r/(map bone duct) :: by bone
== ::
== ::
:: ::
:: XX a hack, required to break a subscription loop ::
:: which arises when an invalid mark crashes a diff. ::
:: See usage in ap-misvale. ::
++ misvale-data (set wire) :: subscrs w/ bad marks
++ seat :: agent state
$: vel/worm :: cache
$: misvale/misvale-data :: bad reqs
vel/worm :: cache
mom/duct :: control duct
liv/? :: unstopped
toc/torc :: privilege
@ -225,6 +245,9 @@
:: to this returning pump.
::
+>
?: ?=($peer-not -.q.caz)
:: short circuit error
(mo-give %unto %reap (some p.q.caz))
=^ num +>.$ (mo-bale him)
=+ ^= roc ^- rook
?- -.q.caz
@ -438,9 +461,11 @@
$out ?: ?=({$f $made *} q.hin)
?- -.q.+>.q.hin
$tabl ~|(%made-tabl !!)
$& ap-abet:(ap-pout:pap t.t.t.pax %diff +.q.+>.q.hin)
$& =. ap.pap (mo-resume-mack:pap ~)
ap-abet:(ap-pout:pap t.t.t.pax %diff +.q.+>.q.hin)
$|
=+ why=p.q.+>.q.hin
=. ..ap ap-abet:(ap-misvale:pap t.pax)
=. why (turn why |=(a/tank rose+[~ "! " ~]^[a]~))
~> %slog.`rose+[" " "[" "]"]^[>%mo-cook-fail< (flop why)]
~& [him=q.q.pry our=our pax=pax]
@ -456,7 +481,7 @@
:: %+ mo-pass
:: [%use pax]
:: [%g %deal [q.q.pry our] XXX %pull ~]
!!
(mo-resume-mack ~ >%mo-cook-fail< p.q.+>.q.hin)
==
?. ?=({$g $unto *} q.hin)
~& [%mo-cook-weird q.hin]
@ -466,6 +491,9 @@
%+ mo-pass
[%use pax]
[%f %exec our ~ byk.pap %vale +.p.q.hin]
?: ?=($quit +>-.q.hin)
=. ap.pap (mo-resume-mack:pap ~)
ap-abet:(ap-pout:pap t.t.t.pax +>.q.hin)
ap-abet:(ap-pout:pap t.t.t.pax +>.q.hin)
==
::
@ -503,6 +531,8 @@
%+ mo-pass
[%sys %val (scot %p q.q.pry) dap ~]
[%f %exec our ~ (mo-beak dap) %cast p.cub %$ q.cub]
?: ?=($peer-not -.cub)
(mo-give %unto %reap (some p.cub))
ap-abet:(ap-club:(ap-abed:ap dap pry) cub)
::
++ mo-club :: local action
@ -530,13 +560,27 @@
::
++ mo-gawd :: ames backward
|= {him/@p dap/dude num/@ud ron/roon}
=. +> (mo-give %mack ~)
=. mak (mo-defer-mack hen)
=. hen (mo-ball him num)
?- -.ron
$d (mo-give %unto %doff p.ron q.ron)
$x (mo-give %unto %quit ~)
==
::
++ mo-defer-mack :: future %mack
|= hon/duct ^+ mak
~& mo-defer+hon
?~ mak `hon
~|(double-mak+[u.mak hon] !!)
::
++ mo-resume-mack :: route %mack
|= a/(unit tang) ^+ +>.$
~& mo-resume+[mak ?=($~ a)]
?^ mak
+>.$(mak ~, moz :_(moz [u.mak %give %mack a]))
?~ a +>.$
(mean >%gall-mack< u.a) :: XX unnecessary?
::
++ ap :: agent engine
~% %gall-ap +> ~
|_ $: $: dap/dude
@ -670,6 +714,7 @@
$peer (ap-peer +.cub)
$puff !!
$punk !!
$peer-not !!
$pull ap-pull
$pump ap-fall
==
@ -895,6 +940,11 @@
=+ pux=((soft path) +>+.q.vax)
?. &(?=(^ pux) (levy u.pux (sane %ta)))
[%| (ap-suck "peel: malformed path")]
?: (~(has in misvale) p.p.yep)
=/ err [leaf+"peel: misvalidation encountered"]~
:^ %& sto %pass
:- p.p.yep
[%send q.p.yep r.p.yep %peer-not err]
:^ %& sto %pass
:- p.p.yep
[%send q.p.yep r.p.yep %peel u.mar u.pux]
@ -908,6 +958,11 @@
=+ pux=((soft path) +>.q.vax)
?. &(?=(^ pux) (levy u.pux (sane %ta)))
[%| (ap-suck "peer: malformed path")]
?: (~(has in misvale) p.p.yep)
=/ err [leaf+"peer: misvalidation encountered"]~
:^ %& sto %pass
:- p.p.yep
[%send q.p.yep r.p.yep %peer-not err]
:^ %& sto %pass
:- p.p.yep
[%send q.p.yep r.p.yep %peer u.pux]
@ -977,7 +1032,7 @@
++ ap-peer :: apply %peer
|= pax/path
^+ +>
=. +> (ap-peon pax)
=. sup.ged (~(put by sup.ged) ost [q.q.pry pax])
=+ cug=(ap-find %peer pax)
?~ cug +>.$
=+ old=zip
@ -988,12 +1043,6 @@
=. zip (weld zip `(list cove)`[[ost %give %reap cam] old])
?^(cam ap-pule +>.$)
::
++ ap-peon :: add subscriber
|= pax/path
%_ +>.$
sup.ged (~(put by sup.ged) ost [q.q.pry pax])
==
::
++ ap-poke :: apply %poke
|= cag/cage
^+ +>
@ -1024,6 +1073,11 @@
+>.$
+>.$
::
++ ap-misvale :: broken vale
|= wir/wire
~& [%ap-blocking-misvale wir]
+>(misvale (~(put in misvale) wir))
::
++ ap-pour :: generic take
|= {pax/path vax/vase}
^+ +>
@ -1074,6 +1128,10 @@
^+ +>
=^ gac +>.$ (ap-prop vux)
%= +>.$
misvale
~? !=(misvale *misvale-data) misvale-drop+misvale
*misvale-data :: new app might mean new marks
::
dub
:_(dub ?~(gac [%& dap ?~(vux %boot %bump) now] [%| u.gac]))
==
@ -1249,7 +1307,7 @@
::
$init
:: ~& [%gall-init p.q.hic]
[~ ..^$(pol.all (~(put by pol.all) p.q.hic [hen ~ ~ ~]))]
[~ ..^$(pol.all (~(put by pol.all) p.q.hic %*(. *mast sys hen)))]
::
$west
?. (~(has by pol.all) p.p.q.hic)
@ -1289,11 +1347,30 @@
++ load :: recreate vane
|= old/axle-n
^+ ..^$
?: ?=($2 -.old) ..^$(all old)
%= $
old => |=(seat-1 `seat`[*worm +<])
=> |=(mast-1 +<(bum (~(run by bum) +>)))
old(- %2, pol (~(run by pol.old) .))
?- -.old
$4 ..^$(all old)
$3
%= $
old ^- axle-4
=> |=(seat-3 `seat-4`[*misvale-data +<])
=> |=(mast-3 +<(bum (~(run by bum) +>)))
old(- %4, pol (~(run by pol.old) .))
==
::
$2
%= $
old ^- axle-3
=> |=(mast-2 [*(unit duct) +<])
old(- %3, pol (~(run by pol.old) .))
==
::
$1
%= $
old ^- axle-2
=> |=(seat-1 `seat-2`[*worm +<])
=> |=(mast-1 +<(bum (~(run by bum) +>)))
old(- %2, pol (~(run by pol.old) .))
==
==
::
++ scry
@ -1326,8 +1403,8 @@
?> ?=({@ ?($sys $use) *} tea)
=+ our=(need (slaw %p i.tea))
=+ mow=(mo-abed:mo our hen)
?: ?=($sys i.t.tea)
mo-abet:(mo-cyst:mow t.t.tea q.hin)
?> ?=($use i.t.tea)
mo-abet:(mo-cook:mow t.t.tea hin)
?- i.t.tea
$sys mo-abet:(mo-cyst:mow t.t.tea q.hin)
$use mo-abet:(mo-cook:mow t.t.tea hin)
==
--

View File

@ -2579,7 +2579,9 @@
$(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
::
+- wyt :: size of set
|- ^- @
=< $
~% %wyt + ~
|. ^- @
?~(a 0 +((add $(a l.a) $(a r.a))))
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

View File

@ -2946,6 +2946,7 @@
{$pull $~} :: unsubscribe
{$punk p/mark q/cage} :: translated poke
{$pump $~} :: pump yes+no
{$peer-not p/tang} :: poison pill peer
== ::
++ cuft :: internal gift
$% {$coup p/(unit tang)} :: poke result

View File

@ -9,8 +9,8 @@
::
++ grow :: convert to
|%
++ mime [/application/json (taco txt)] :: convert to %mime
++ txt (crip (pojo jon))
++ mime [/application/json (tact (pojo jon))] :: convert to %mime
++ txt (lore (crip (pojo jon)))
--
++ grab
|% :: convert from

View File

@ -3,32 +3,55 @@
:::: /hoon/rss-xml/ren
::
/? 310
/= sum /&snip&elem&/|(/elem/ /~[;div;])
/= kid /^ (map knot {marl marl})
/_ /&snip&/elem/
/$ |=({bem/beam *} [our=p.bem tub=(slag 1 (flop s.bem))])
/= our /$ |=({bem/beam *} p.bem)
/= top
/. /= pax /$ |=({bem/beam *} (slag (lent /web) (flop s.bem)))
/= inf /% /&front&/|(/front/ /~[~])
==
/= kid /^ :(map knot knot cord)
/% /_ /front/
!:
:::: ~fyr, ~tasfyn-partyv
::
::~& [sum=sum kid=kid]
:: Link from relative path
=+ hok=.^(hart %e /(scot %p our)/host/real)
=+ ref=|=(a/path (earn hok `(weld tub a) ~))
:: urb:front attrs confuse RSS validators, readers
=+ no-meta=|=(a/marl ^+(a ?~(a ~ ?.(?=($meta n.g.i.a) a $(a t.a)))))
|%
++ relative-link
=/ external-host
~+(.^(hart %e /(scot %p our)/host/real))
|= a/path ^- tape
(earn external-host `(weld pax.top a) ~)
::
++ parse-front
|= a/(map cord cord)
:* title=(fall (~(get by a) %title) '')
preview=(fall (~(get by a) %preview) '')
author=(fall (~(get by a) %author) '')
date=(fall (~(get by a) %date) '')
==
--
::
::::
::
%- crip %- poxo
;rss(version "2.0")
;channel
;title: *{hed.sum}
;link: {(ref /)}
;description: *{(no-meta tal.sum)}
;* =/ a (parse-front inf.top)
;=
;title: {(trip title.a)}
;link: {(relative-link /)}
;description: {(trip preview.a)}
==
;* %+ turn (~(tap by kid))
|= {nom/@t hed/marl tal/marl}
|= {fyl/@t inf/(map knot cord)}
=/ a (parse-front inf)
;item
;title: *{hed}
;description: *{(no-meta tal)}
;link: {(ref /[nom])}
;link: {(relative-link /[fyl])}
;title: {(trip title.a)}
;author: {(trip author.a)}
;description: {(trip preview.a)}
;* %- drop
%+ bind (slaw %da date.a)
|= b/@da ^- manx
[/'pubDate' ;/((dust (yore b))) ~]
==
==
==

View File

@ -3,7 +3,7 @@
::
::
/? 310
/= tub /$ |=({bem/beam *} (flop s.bem))
/= tub /$ |=({bem/beam *} (slag (lent /web) (flop s.bem)))
/= aut
/$ %+ cork fuel :: after parsing params,
|= gas/epic ^- ? :: check that the fcgi

View File

@ -3,7 +3,7 @@
:::: /hoon/tree/urb/ren
::
/? 310
/= hed /# /% /: /===/ren /tree-head/ :: XX static
/= hed /# /% /tree-head/
/= bod /# /% /tree-body/
^- {hed/{@uvH marl} bod/{@uvH marl}}
[hed bod]