mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 18:43:46 +03:00
Merge branch 'develop' into next/kelvin/412
This commit is contained in:
commit
8565fb5f8b
@ -2699,6 +2699,7 @@
|
||||
+$ gift :: outgoing result
|
||||
$% [%boon payload=*] :: ames response
|
||||
[%done error=(unit error:ames)] :: ames message (n)ack
|
||||
[%flub ~] :: not ready to handle plea
|
||||
[%unto p=unto] ::
|
||||
== ::
|
||||
+$ task :: incoming request
|
||||
|
@ -1227,7 +1227,7 @@
|
||||
$>(%wake gift:behn)
|
||||
==
|
||||
$: %gall
|
||||
$>(%unto gift:gall)
|
||||
$>(?(%flub %unto) gift:gall)
|
||||
==
|
||||
$: %jael
|
||||
$> $? %private-keys
|
||||
@ -1279,6 +1279,7 @@
|
||||
::
|
||||
+$ message-sink-task
|
||||
$% [%done ok=?]
|
||||
[%flub ~]
|
||||
[%drop =message-num]
|
||||
[%hear =lane =shut-packet ok=?]
|
||||
==
|
||||
@ -1761,6 +1762,31 @@
|
||||
+.u.ship-state
|
||||
::
|
||||
+| %tasks
|
||||
:: +on-take-flub: vane not ready to process message, pretend it
|
||||
:: was never delivered
|
||||
::
|
||||
++ on-take-flub
|
||||
|= =wire
|
||||
^+ event-core
|
||||
?~ parsed=(parse-bone-wire wire)
|
||||
:: no-op
|
||||
::
|
||||
~> %slog.0^leaf/"ames: dropping malformed wire: {(spud wire)}"
|
||||
event-core
|
||||
?> ?=([@ her=ship *] u.parsed)
|
||||
=* her her.u.parsed
|
||||
=/ peer-core (abed-got:pe her)
|
||||
?: ?& ?=([%new *] u.parsed)
|
||||
(lth rift.u.parsed rift.peer-state.peer-core)
|
||||
==
|
||||
:: ignore events from an old rift
|
||||
::
|
||||
%- %^ ev-trace odd.veb her
|
||||
|.("dropping old rift wire: {(spud wire)}")
|
||||
event-core
|
||||
=/ =bone
|
||||
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
||||
abet:(on-flub:peer-core bone)
|
||||
:: +on-take-done: handle notice from vane that it processed a message
|
||||
::
|
||||
++ on-take-done
|
||||
@ -3065,6 +3091,11 @@
|
||||
:- >[bone=bone message-num=message-num meat=meat]:shut-packet<
|
||||
tang.u.dud
|
||||
abet:(call:(abed:mu bone) %hear [message-num +.meat]:shut-packet)
|
||||
::
|
||||
++ on-flub
|
||||
|= =bone
|
||||
^+ peer-core
|
||||
abet:(call:(abed:mi:peer-core bone) %flub ~)
|
||||
:: +on-memo: handle request to send message
|
||||
::
|
||||
++ on-memo
|
||||
@ -4004,6 +4035,11 @@
|
||||
?- -.task
|
||||
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
||||
%done (done ok.task)
|
||||
%flub
|
||||
%= sink
|
||||
last-heard.state (dec last-heard.state)
|
||||
pending-vane-ack.state ~(nap to pending-vane-ack.state)
|
||||
==
|
||||
::
|
||||
%hear
|
||||
|^ ?: ?| corked
|
||||
@ -4855,6 +4891,8 @@
|
||||
[@ %boon *] (on-take-boon:event-core wire payload.sign)
|
||||
::
|
||||
[%behn %wake *] (on-take-wake:event-core wire error.sign)
|
||||
::
|
||||
[%gall %flub ~] (on-take-flub:event-core wire)
|
||||
::
|
||||
[%jael %turf *] (on-take-turf:event-core turf.sign)
|
||||
[%jael %private-keys *] (on-priv:event-core [life vein]:sign)
|
||||
|
@ -865,6 +865,14 @@
|
||||
=. mo-core (mo-track-ship ship)
|
||||
=? mo-core ?=(%u -.ames-request) (mo-give %done ~)
|
||||
::
|
||||
=/ yok=(unit yoke) (~(get by yokes.state) agent-name)
|
||||
?~ yok
|
||||
(mo-give %flub ~)
|
||||
?: ?=(%nuke -.u.yok)
|
||||
(mo-give %flub ~)
|
||||
?: ?=(%.n -.agent.u.yok)
|
||||
(mo-give %flub ~)
|
||||
::
|
||||
=/ =wire /sys/req/(scot %p ship)/[agent-name]
|
||||
::
|
||||
=/ =deal
|
||||
|
@ -7,7 +7,4 @@
|
||||
^- form:m
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
;< code=@p bind:m (scry:strandio @p /j/code/(scot %p our.bowl))
|
||||
%- pure:m
|
||||
!> ^- tape
|
||||
%+ slag 1
|
||||
(scow %p code)
|
||||
(pure:m !>(code))
|
||||
|
@ -9,4 +9,4 @@
|
||||
=/ [who=ship message=@t]
|
||||
?@(arg [who.arg ''] [who.arg (crip mez.arg)])
|
||||
;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message))
|
||||
(pure:m !>("hi {<who>} successful"))
|
||||
(pure:m !>((crip "hi {<who>} successful")))
|
||||
|
@ -14,5 +14,5 @@
|
||||
;< =riot:clay bind:m
|
||||
(warp:strandio ship desk ~ %sing care case target-path)
|
||||
?~ riot
|
||||
(pure:m !>("nothing"))
|
||||
(pure:m !>('nothing'))
|
||||
(pure:m q.r.u.riot)
|
||||
|
@ -61,7 +61,7 @@
|
||||
?+ flow=(~(get by sub) which) `0/sub
|
||||
~ [~[(pine which)] 0/(~(put by sub) which ~)]
|
||||
[~ ~] [~[(pine which)] 0/sub]
|
||||
[~ ~ [* %& * *]] [~[(scry `+(aeon.u.u.flow) which)] 0/sub]
|
||||
[~ ~ [* %& * *]] [~[(pine which)] 0/sub]
|
||||
==
|
||||
++ quit (corl (lead %0) ~(del by sub)) :: Unsub from [ship dude path].
|
||||
++ read :: See current subscribed states.
|
||||
@ -95,7 +95,7 @@
|
||||
[~ ~ *]
|
||||
=. stale.u.u.flow &
|
||||
:_ 0/(~(put by sub) current u.flow)
|
||||
~[(on-rock-poke current u.u.flow ~)]
|
||||
~[(on-rock-poke fake=& current u.u.flow ~)]
|
||||
::
|
||||
[~ ~]
|
||||
:_ 0/(~(del by sub) current) :_ ~
|
||||
@ -105,77 +105,53 @@
|
||||
[path ship dude]:current
|
||||
==
|
||||
==
|
||||
:: :: Check if we're still interested
|
||||
:: :: in a wave. If no, no-op.
|
||||
:: :: If yes, scry.
|
||||
++ behn :: (See https://gist.github.com/belisarius222/7f8452bfea9b199c0ed717ab1778f35b)
|
||||
|= [ship=term =dude aeon=term path=paths]
|
||||
^- (list card:agent:gall)
|
||||
%- fall :_ ~ %- mole |.
|
||||
=/ ship (slav %p ship)
|
||||
=/ aeon (slav %ud aeon)
|
||||
?: (lte aeon aeon:(fall (~(got by sub) ship dude path) *flow)) ~
|
||||
~[(scry `aeon ship dude path)]
|
||||
::
|
||||
++ apply :: Handle response from publisher.
|
||||
|= res=(response:poke lake paths)
|
||||
^- (quip card:agent:gall subs)
|
||||
%- fall :_ `0/sub %- mole |.
|
||||
=* current [src.bowl dude.res path.res]
|
||||
=/ old=flow (fall (~(got by sub) current) *flow)
|
||||
?- type.res
|
||||
%tomb
|
||||
?: ?=(%tomb what.res)
|
||||
=/ =flow old(stale &)
|
||||
:_ 0/(~(put by sub) current `flow) :_ ~
|
||||
(on-rock-poke current flow ~)
|
||||
(on-rock-poke fake=& current flow ~)
|
||||
::
|
||||
%yore
|
||||
:_ 0/sub :_ ~
|
||||
(pine src.bowl dude.res path.res)
|
||||
::
|
||||
%nigh
|
||||
:_ 0/sub :_ ~
|
||||
(behn-s25 [dude aeon path]:res)
|
||||
::
|
||||
%scry
|
||||
=/ [wave=(unit wave:lake) =flow]
|
||||
=/ [wave=(unit wave:lake) new=(unit flow)]
|
||||
?- what.res
|
||||
%rock ?> (gte aeon.res aeon.old)
|
||||
[~ [aeon.res | | rock.res]]
|
||||
%wave ?> =(aeon.res +(aeon.old))
|
||||
[`wave.res [aeon.res | | (wash:lake rock.old wave.res)]]
|
||||
==
|
||||
:_ 0/(~(put by sub) current `flow)
|
||||
:~ (on-rock-poke current flow wave)
|
||||
(scry `+(aeon.res) src.bowl dude.res path.res)
|
||||
==
|
||||
%rock ?: (lte aeon.res aeon.old) [~ ~]
|
||||
[~ `[aeon.res | | rock.res]]
|
||||
%wave ?: (lte aeon.res aeon.old) [~ ~]
|
||||
?> =(aeon.res +(aeon.old))
|
||||
[`wave.res `[aeon.res | | (wash:lake rock.old wave.res)]]
|
||||
==
|
||||
?~ new `0/sub
|
||||
:_ 0/(~(put by sub) current new) :_ ~
|
||||
(on-rock-poke fake=& current u.new wave)
|
||||
::
|
||||
++ handle-fake-on-rock
|
||||
|= =(on-rock:poke lake paths)
|
||||
^- (list card:agent:gall)
|
||||
?~ flow=(~(get by sub) [src from path]:on-rock) ~
|
||||
?~ u.flow ~
|
||||
?. =([stale fail rock]:u.u.flow [stale fail rock]:on-rock) ~
|
||||
~[(on-rock-poke fake=| [src from path]:on-rock u.u.flow wave.on-rock)]
|
||||
::
|
||||
:: Non-public facing arms below
|
||||
::
|
||||
++ behn-s25
|
||||
|= [=dude =aeon path=noun]
|
||||
++ pine
|
||||
|= [who=ship which=dude where=paths]
|
||||
^- card:agent:gall
|
||||
:* %pass (zoom behn/(scot %p src.bowl)^dude^(scot %ud aeon)^path)
|
||||
%arvo %b %wait (add ~s25 now.bowl)
|
||||
==
|
||||
++ pine |= [ship dude paths] (scry ~ +<)
|
||||
++ scry
|
||||
|= [when=(unit aeon) who=ship which=dude where=paths]
|
||||
^- card:agent:gall
|
||||
=/ when ?~ when ~ (scot %ud u.when)
|
||||
:* %pass (zoom scry-request/(scot %p who)^which^when^where)
|
||||
:* %pass (zoom scry-request/(scot %p who)^which^where)
|
||||
%agent [who which]
|
||||
%poke %sss-to-pub :- result-type ^- result
|
||||
[where dap.bowl ^when]
|
||||
%poke sss-to-pub/[result-type `result`[where dap.bowl]]
|
||||
==
|
||||
++ on-rock-poke
|
||||
|= [[=ship =dude path=paths] flow wave=(unit wave:lake)]
|
||||
|= [fake=? [=ship =dude path=paths] flow wave=(unit wave:lake)]
|
||||
^- card:agent:gall
|
||||
:* %pass (zoom on-rock/(scot %ud aeon)^(scot %p ship)^dude^path)
|
||||
:* %pass %+ zoom ?:(fake %fake %on-rock)
|
||||
(scot %ud aeon)^(scot %p ship)^dude^path
|
||||
%agent [our dap]:bowl
|
||||
%poke %sss-on-rock on-rock-type ^- from
|
||||
[path ship dude stale fail rock wave]
|
||||
%poke ?:(fake %sss-fake-on-rock %sss-on-rock)
|
||||
on-rock-type `from`[path ship dude stale fail rock wave]
|
||||
==
|
||||
--
|
||||
++ du :: Manage publications.
|
||||
@ -184,28 +160,78 @@
|
||||
|%
|
||||
+$ into (request:poke paths)
|
||||
+$ result (response:poke lake paths)
|
||||
+$ rule [rocks=_1 waves=_5] :: Retention policy
|
||||
+$ rule $~ [`5 5]
|
||||
[horizon=(unit @ud) frequency=@ud] :: Retention policy
|
||||
+$ tide
|
||||
$: rok=((mop aeon rock:lake) gte)
|
||||
wav=((mop aeon wave:lake) lte)
|
||||
rul=rule
|
||||
mem=(mip ship dude @da)
|
||||
mem=(jug ship dude)
|
||||
==
|
||||
+$ buoy
|
||||
$: tid=$~(*tide $@(aeon tide))
|
||||
alo=(unit (set ship))
|
||||
==
|
||||
+$ pubs [%0 (map paths buoy)]
|
||||
++ pubs
|
||||
=< $>(%1 versioned)
|
||||
|%
|
||||
++ update
|
||||
|= =versioned
|
||||
^- pubs
|
||||
?- -.versioned
|
||||
%1 versioned
|
||||
%0
|
||||
:- %1
|
||||
%- ~(run by +.versioned)
|
||||
|= =buoy-0:^versioned
|
||||
^- buoy
|
||||
%= buoy-0
|
||||
tid
|
||||
?@ tid.buoy-0 tid.buoy-0
|
||||
^- tide
|
||||
%= tid.buoy-0
|
||||
rocks.rul
|
||||
?: =(waves.rul.tid.buoy-0 0) ~
|
||||
`(mul [+(rocks) waves]:rul.tid.buoy-0)
|
||||
::
|
||||
mem
|
||||
^- (jug ship dude)
|
||||
%- ~(run by mem.tid.buoy-0)
|
||||
|= =(map dude @da)
|
||||
^- (set dude)
|
||||
~(key by map)
|
||||
==
|
||||
==
|
||||
==
|
||||
++ versioned
|
||||
=< $% [%0 (map paths buoy-0)]
|
||||
[%1 (map paths buoy)]
|
||||
==
|
||||
|%
|
||||
+$ buoy-0
|
||||
$: tid=$~(*tide-0 $@(aeon tide-0))
|
||||
alo=(unit (set ship))
|
||||
==
|
||||
+$ tide-0
|
||||
$: rok=((mop aeon rock:lake) gte)
|
||||
wav=((mop aeon wave:lake) lte)
|
||||
rul=[rocks=@ud waves=@ud]
|
||||
mem=(mip ship dude @da)
|
||||
==
|
||||
--
|
||||
|= [pub=pubs =bowl:gall result-type=type]
|
||||
=> .(pub +.pub)
|
||||
--
|
||||
--
|
||||
|= [pub=versioned:pubs =bowl:gall result-type=type]
|
||||
=> .(pub +:(update:pubs pub))
|
||||
=* rok ((on aeon rock:lake) gte)
|
||||
=* wav ((on aeon wave:lake) lte)
|
||||
|%
|
||||
++ rule :: Set new retention policy.
|
||||
|= [path=paths =^rule]
|
||||
^- pubs
|
||||
:- %0
|
||||
:- %1
|
||||
%- fall :_ (~(put by pub) path %*(. *$<(aeon buoy) rul.tid rule))
|
||||
%- mole |.
|
||||
%+ ~(jab by pub) path
|
||||
|= =buoy
|
||||
?@ tid.buoy buoy
|
||||
@ -214,11 +240,11 @@
|
||||
++ wipe :: Create new rock and wipe rest.
|
||||
|= path=paths
|
||||
^- pubs
|
||||
:- %0
|
||||
:- %1
|
||||
%+ ~(jab by pub) path
|
||||
|= =buoy
|
||||
?@ tid.buoy buoy
|
||||
%* . buoy(tid (form tid.buoy(rul [0 1])))
|
||||
%* . buoy(tid (form tid.buoy(rul [`0 1])))
|
||||
rul.tid rul.tid.buoy
|
||||
wav.tid ~
|
||||
==
|
||||
@ -232,29 +258,31 @@
|
||||
?> ?=(^ tid.buoy)
|
||||
=* tide tid.buoy
|
||||
=/ next=aeon +((latest tide))
|
||||
:- %+ murn ~(tap bi mem.tide)
|
||||
|= [=ship =dude =@da]
|
||||
?: (lth da now.bowl) ~
|
||||
`(send scry/wave/wave ship dude next path)
|
||||
:- %0
|
||||
:- %- zing
|
||||
%+ turn ~(tap by mem.tide)
|
||||
|= [=ship =(set dude)]
|
||||
%+ turn ~(tap in set)
|
||||
|= =dude
|
||||
(send wave/[next wave] ship dude path)
|
||||
:- %1
|
||||
%+ ~(put by pub) path
|
||||
=/ last=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
||||
=. wav.tide (put:wav wav.tide next wave)
|
||||
=. mem.tide ~
|
||||
?. =(next (add aeon.last waves.rul.tide)) buoy
|
||||
?. =(next (add aeon.last frequency.rul.tide)) buoy
|
||||
buoy(tid (form tide))
|
||||
::
|
||||
++ fork :: Fork a pub into an empty path.
|
||||
|= [from=paths to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
:- %1
|
||||
?< (~(has by pub) to)
|
||||
(~(put by pub) to (~(got by pub) from))
|
||||
::
|
||||
++ copy :: Fork a sub into an empty path.
|
||||
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
:- %1
|
||||
?< (~(has by pub) to)
|
||||
%+ ~(put by pub) to
|
||||
%* . *$<(aeon buoy)
|
||||
@ -263,7 +291,7 @@
|
||||
::
|
||||
++ perm :: Change permissions with gate.
|
||||
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
|
||||
^- pubs
|
||||
^- (quip card:agent:gall pubs)
|
||||
%+ edit where
|
||||
|= =buoy
|
||||
=/ new=_alo.buoy (diff alo.buoy)
|
||||
@ -272,21 +300,21 @@
|
||||
alo new
|
||||
mem.tid ?~ new mem.tid.buoy
|
||||
%. mem.tid.buoy
|
||||
~(int by (malt (turn ~(tap in u.new) (late *(map @ @)))))
|
||||
~(int by (malt (turn ~(tap in u.new) (late *(set @)))))
|
||||
==
|
||||
++ public (curr perm _~) :: Make list of paths public.
|
||||
++ secret (curr perm _`~) :: Make list of paths secret.
|
||||
:: :: Block ships from paths.
|
||||
++ block :: No-ops on public paths.
|
||||
|= [who=(list ship) whence=(list paths)]
|
||||
^- pubs
|
||||
^- (quip card:agent:gall pubs)
|
||||
%+ perm whence
|
||||
|= old=(unit (set ship))
|
||||
?~ old ~ `(~(dif in u.old) (sy who))
|
||||
:: :: Allow ships to paths.
|
||||
++ allow :: Any public paths will no-op.
|
||||
|= [who=(list ship) where=(list paths)]
|
||||
^- pubs
|
||||
^- (quip card:agent:gall pubs)
|
||||
%+ perm where
|
||||
|= old=(unit (set ship))
|
||||
?~ old ~ `(~(gas in u.old) who)
|
||||
@ -313,37 +341,51 @@
|
||||
=/ =buoy (~(gut by pub) path.req *buoy)
|
||||
?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
|
||||
?@ tid.buoy
|
||||
:_ 0/pub :_ ~
|
||||
(send tomb/~ src.bowl dude.req tid.buoy path.req)
|
||||
?~ when.req
|
||||
:_ 1/pub :_ ~
|
||||
(send tomb/~ src.bowl dude.req path.req)
|
||||
:_ 1/pub :_ ~
|
||||
=/ last (fall (pry:rok rok.tid.buoy) *[=key =val]:rok)
|
||||
:_ 0/pub :_ ~
|
||||
(send scry/rock/val.last src.bowl dude.req key.last path.req)
|
||||
?^ dat=(get:wav wav.tid.buoy u.when.req)
|
||||
:_ 0/pub :_ ~
|
||||
(send scry/wave/u.dat src.bowl [dude u.when path]:req)
|
||||
?: %+ lte u.when.req
|
||||
key::(fall (ram:wav wav.tid.buoy) (pry:rok rok.tid.buoy) [=key val]:wav)
|
||||
:_ 0/pub :_ ~
|
||||
(send yore/~ src.bowl [dude u.when path]:req)
|
||||
?> =(u.when.req +((latest tid.buoy)))
|
||||
:- ~[(send nigh/~ src.bowl [dude u.when path]:req)]
|
||||
:- %0
|
||||
%+ ~(put by pub) path.req
|
||||
(send rock/last src.bowl dude.req path.req)
|
||||
::
|
||||
++ tell
|
||||
|= [[ship=term =dude aeon=term path=paths] =sign:agent:gall]
|
||||
^- (quip card:agent:gall pubs)
|
||||
?> ?=(%poke-ack -.sign)
|
||||
?^ p.sign `1/pub
|
||||
=/ =buoy (~(gut by pub) path *buoy)
|
||||
?< &(?=(^ alo.buoy) !(~(has in u.alo.buoy) src.bowl))
|
||||
?@ tid.buoy
|
||||
:_ 1/pub :_ ~
|
||||
(send tomb/~ src.bowl dude path)
|
||||
::
|
||||
=> .(aeon +((slav %ud aeon)))
|
||||
?^ dat=(get:wav wav.tid.buoy aeon)
|
||||
:_ 1/pub :_ ~
|
||||
(send wave/[aeon u.dat] src.bowl dude path)
|
||||
=/ last (fall (pry:rok rok.tid.buoy) [=key =val]:rok)
|
||||
?: (lte aeon key.last)
|
||||
:_ 1/pub :_ ~
|
||||
(send rock/last src.bowl dude path)
|
||||
:- ~
|
||||
:- %1
|
||||
%+ ~(put by pub) path
|
||||
%= buoy
|
||||
mem.tid (~(put bi mem.tid.buoy) src.bowl dude.req (add ~s25 now.bowl))
|
||||
mem.tid (~(put ju mem.tid.buoy) src.bowl dude)
|
||||
==
|
||||
::
|
||||
:: Non-public facing arms below
|
||||
::
|
||||
++ send
|
||||
|= [payload=_|3:*(response:poke lake paths) =ship =dude =aeon path=paths]
|
||||
|= [payload=_|2:*(response:poke lake paths) =ship =dude path=paths]
|
||||
^- card:agent:gall
|
||||
=* mark (cat 3 %sss- name:lake)
|
||||
:* %pass (zoom scry-response/(scot %p ship)^dude^(scot %ud aeon)^path)
|
||||
=/ callback=^path
|
||||
?: ?=(%tomb what.payload) (zoom tomb-response/(scot %p ship)^dude^path)
|
||||
(zoom scry-response/(scot %p ship)^dude^(scot %ud aeon.payload)^path)
|
||||
:* %pass callback
|
||||
%agent [ship dude]
|
||||
%poke mark result-type ^- (response:poke lake paths)
|
||||
[path dap.bowl aeon payload]
|
||||
[path dap.bowl payload]
|
||||
==
|
||||
++ latest
|
||||
|= =$@(aeon tide)
|
||||
@ -354,31 +396,49 @@
|
||||
::
|
||||
++ edit
|
||||
|= [ps=(list paths) edit=$-(buoy buoy)]
|
||||
^- pubs
|
||||
:- %0
|
||||
^- (quip card:agent:gall pubs)
|
||||
%- ~(rep in (sy ps))
|
||||
|= [path=paths =_pub]
|
||||
%- fall :_ pub %- mole |.
|
||||
(~(jab by pub) path edit)
|
||||
|= [path=paths caz=(list card:agent:gall) %1 =_pub]
|
||||
?~ old=(~(get by pub) path) [caz 1/pub]
|
||||
=/ new=buoy (edit u.old)
|
||||
:_ 1/(~(put by pub) path new)
|
||||
%- weld :_ caz
|
||||
^- (list card:agent:gall)
|
||||
?@ tid.u.old ~
|
||||
?@ tid.new
|
||||
%- zing
|
||||
%+ turn ~(tap by mem.tid.u.old)
|
||||
|= [=ship =(set dude)]
|
||||
(turn ~(tap in set) |=(=dude (send tomb/~ ship dude path)))
|
||||
?~ alo.new ~
|
||||
=/ new-alo=(jug ship dude)
|
||||
(malt (turn ~(tap in u.alo.new) (late *(set @))))
|
||||
%- zing
|
||||
%+ turn ~(tap by (~(dif by mem.tid.u.old) new-alo))
|
||||
|= [=ship =(set dude)]
|
||||
(turn ~(tap in set) |=(=dude (send tomb/~ ship dude path)))
|
||||
::
|
||||
++ form
|
||||
|= =tide
|
||||
^+ tide
|
||||
=/ max-rock=[=aeon =rock:lake] (fall (pry:rok rok.tide) *[key val]:rok)
|
||||
=/ max-wave (fall (bind (ram:wav wav.tide) head) 0)
|
||||
=. rok.tide
|
||||
%+ gas:rok +<-:gas:rok
|
||||
%- tab:rok :_ [~ +(rocks.rul.tide)]
|
||||
?: ?| =(waves.rul.tide 0)
|
||||
(lth max-wave (add aeon.max-rock waves.rul.tide))
|
||||
=? rok.tide :: Create new rock.
|
||||
?& !=(frequency.rul.tide 0)
|
||||
(gte max-wave (add aeon.max-rock frequency.rul.tide))
|
||||
==
|
||||
rok.tide
|
||||
%+ put:rok rok.tide
|
||||
%+ roll (tab:wav wav.tide `aeon.max-rock max-wave)
|
||||
|: [*[now=aeon =wave:lake] `[prev=aeon =rock:lake]`max-rock]
|
||||
~| %aeon-awry
|
||||
?> =(now +(prev))
|
||||
[now (wash:lake rock wave)]
|
||||
=. rok.tide
|
||||
?~ horizon.rul.tide :: Only keep genesis and latest.
|
||||
(gas:rok ~ (murn ~[(ram:rok rok.tide) (pry:rok rok.tide)] same))
|
||||
%^ lot:rok rok.tide :: Delete beyond horizon.
|
||||
~
|
||||
(mole |.((sub max-wave (max [u.horizon frequency]:rul.tide))))
|
||||
~| %rock-zero
|
||||
tide(wav (lot:wav wav.tide (bind (ram:rok rok.tide) |=([r=@ *] (dec r))) ~))
|
||||
--
|
||||
|
@ -581,8 +581,9 @@
|
||||
++ check-for-file
|
||||
|= [[=ship =desk =case] =spur]
|
||||
=/ m (strand ,?)
|
||||
;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
|
||||
(pure:m ?=(^ riot))
|
||||
;< =riot:clay bind:m (warp ship desk ~ %sing %u case spur)
|
||||
?> ?=(^ riot)
|
||||
(pure:m !<(? q.r.u.riot))
|
||||
::
|
||||
++ list-tree
|
||||
|= [[=ship =desk =case] =spur]
|
||||
|
@ -10,25 +10,21 @@
|
||||
--
|
||||
+$ aeon @ud
|
||||
+$ dude dude:agent:gall
|
||||
+$ what ?(%rock %wave)
|
||||
++ poke
|
||||
|%
|
||||
++ request
|
||||
|* paths=mold
|
||||
$: path=paths
|
||||
=dude
|
||||
when=(unit aeon)
|
||||
==
|
||||
++ response
|
||||
|* [=(lake) paths=mold]
|
||||
$: path=paths
|
||||
=dude
|
||||
=aeon
|
||||
$% [type=?(%nigh %yore %tomb) ~]
|
||||
$: type=%scry
|
||||
$% [what=%rock =rock:lake]
|
||||
[what=%wave =wave:lake]
|
||||
== == == ==
|
||||
$% [what=%tomb ~]
|
||||
[what=%rock =aeon =rock:lake]
|
||||
[what=%wave =aeon =wave:lake]
|
||||
== ==
|
||||
++ on-rock
|
||||
|* [=(lake) paths=mold]
|
||||
$: path=paths
|
||||
|
21
sh/release
21
sh/release
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage: release
|
||||
|
||||
# Create a static tarball under ./release named with the current git revision.
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
cd "${0%/*}/.."
|
||||
|
||||
rev="$(git rev-parse HEAD)"
|
||||
sha="${rev:0:5}"
|
||||
ver="$(cat pkg/urbit/version)"
|
||||
tgz="release/urbit-v${ver}-${sha}.tar.gz"
|
||||
out="$(nix-build -A tarball --arg enableStatic true --no-out-link)"
|
||||
|
||||
mkdir -p release
|
||||
|
||||
cp -f "$out" "$tgz"
|
||||
|
||||
chmod 0644 "$tgz"
|
Loading…
Reference in New Issue
Block a user