kiln: cleanup

This commit is contained in:
Philip Monk 2020-05-22 14:32:32 -07:00
parent 25bd1340f6
commit a4a44f1e21
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
8 changed files with 49 additions and 26 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4bd63360c1b2fab69a35f71d360db6b9c71a796965d1826f919cf271e990bad2
size 15816973
oid sha256:a571650a0bec9d9368c7290a245cec1546fdd73bcf3982a73f6f6e6e6d5cee55
size 15819552

View File

@ -1,3 +1,3 @@
:- %say
|= [^ ~ ~]
|= *
[%spider-kill ~]

View File

@ -7,8 +7,9 @@
:- %noun
=<
:~
[%kids-hash .^(@uv %cz (pathify ~.kids ~))]
[%base-hash base-hash]
[%home-hash .^(@uv %cz (pathify ~.home ~))]
[%kids-hash .^(@uv %cz (pathify ~.kids ~))]
::
(info %our our)
(info %sponsor sponsor)
@ -40,4 +41,9 @@
life=lyfe
rift=ryft
==
::
++ base-hash
=/ parent (scot %p (sein:title our now our))
=+ .^(=cass:clay %cs /[parent]/kids/1/late/foo)
.^(@uv %cz /[parent]/kids/(scot %ud ud.cass))
--

View File

@ -165,6 +165,19 @@
~
[>p.u.error< q.u.error]
::
:: If destination desk doesn't exist, need a %init merge. If this is
:: its first revision, it probably doesn't have a mergebase yet, so
:: use %that.
::
++ get-germ
|= =desk
=+ .^(=cass:clay %cw /(scot %p our)/home/(scot %da now))
?- ud.cass
%0 %init
%1 %that
* %mate
==
::
++ poke
|= arg=(unit [=ship =desk])
abet:(poke-internal arg)
@ -221,11 +234,7 @@
(poke-internal `[ship desk]:u.ota)
=? aeon.u.ota ?=($w p.p.u.p.sign-arvo)
ud:;;(cass:clay q.q.r.u.p.sign-arvo)
=/ =germ
=+ .^(=cass:clay %cw /(scot %p our)/home/(scot %da now))
?: =(0 ud.cass)
%init
?:((gth 2 ud.cass) %that %mate)
=/ =germ (get-germ %home)
=. ..abet (render-ket "beginning OTA to %home" ~)
%: emit
%pass (make-wire /merge-home) %arvo %c
@ -249,15 +258,11 @@
=. aeon.u.ota +(aeon.u.ota)
%: emit
%pass (make-wire /sync) %arvo %c
%warp ship.u.ota desk.u.ota `[%sing %y ud+aeon.u.ota /]
%warp ship.u.ota desk.u.ota `[%sing %z ud+aeon.u.ota /]
==
=. ..abet (render-ket "OTA to %home succeeded" ~)
=. ..abet (render-ket "beginning OTA to %kids" ~)
=/ =germ
=+ .^(=cass:clay %cw /(scot %p our)/kids/(scot %da now))
?: =(0 ud.cass)
%init
?:((gth 2 ud.cass) %that %mate)
=/ =germ (get-germ %kids)
%: emit
%pass (make-wire /merge-kids) %arvo %c
%merg %kids ship.u.ota desk.u.ota ud+aeon.u.ota germ
@ -281,7 +286,7 @@
=. aeon.u.ota +(aeon.u.ota)
%: emit
%pass (make-wire /sync) %arvo %c
%warp ship.u.ota desk.u.ota `[%sing %y ud+aeon.u.ota /]
%warp ship.u.ota desk.u.ota `[%sing %z ud+aeon.u.ota /]
==
--
::

View File

@ -3274,7 +3274,7 @@
|= [=message-num =message-blob]
^- (list static-fragment)
::
=/ fragments=(list fragment) (rip 13 message-blob)
=/ fragments=(list fragment) (rip 23 message-blob)
=/ num-fragments=fragment-num (lent fragments)
=| counter=@
::
@ -3299,7 +3299,7 @@
$(index +(index), sorted [(~(got by fragments) index) sorted])
::
%- cue
%+ can 13
%+ can 23
%+ turn (flop sorted)
|=(a=@ [1 a])
:: +bind-duct: find or make new $bone for .duct in .ossuary

View File

@ -2502,7 +2502,7 @@
$t ~| %requesting-foreign-directory-is-vaporware !!
$u ~| %prolly-poor-idea-to-get-rang-over-network !!
$v ~| %weird-shouldnt-get-v-request-from-network !!
$z ~| %its-prolly-not-reasonable-to-request-ankh !!
$z `(validate-z r.rand)
$w `(validate-w r.rand)
$x (validate-x [p.p q.p q r]:rand)
$y `[p.r.rand !>(;;(arch q.r.rand))]
@ -2535,6 +2535,15 @@
%- (slog >%validate-x-failed< p.vale-result)
~
`-.p.vale-result
::
:: Make sure the incoming data is a %z response
::
++ validate-z
|= =page
^- cage
?> ?=(%uvi p.page)
:- p.page
!>(;;(@uvI q.page))
--
::
:: A full foreign update. Validate and apply to our local cache of
@ -3283,7 +3292,7 @@
++ read-s
|= [yon=aeon pax=path]
^- (unit (unit cage))
?. ?=([?(%yaki %blob %hash %cage %open) * ~] pax)
?. ?=([?(%yaki %blob %hash %cage %open %late) * ~] pax)
`~
?- i.pax
%yaki
@ -3318,6 +3327,12 @@
::
%open
``open+!>(prelude:(ford:fusion ank.dom ~ ~ lat.ran fod.dom))
::
%late
:^ ~ ~ %cass
?~ let.dom
!>([0 *@da])
!>([let.dom t:(~(got by hut.ran) (~(got by hit.dom) let.dom))])
==
:: +read-t: produce the list of paths within a yaki with :pax as prefix
::

View File

@ -1,7 +1,6 @@
:: :: %gall, agent execution
!? 163
::
::::
|= pit=vase
=, gall

View File

@ -7,14 +7,12 @@
^- form:m
:: Parse arguments as ship, desk, and path
::
=+ !<([=target=path ~] arg)
=+ !<([=care:clay =ship =desk =case =target=path ~] arg)
:: Read the file, possibly asyncrhonously
::
;< =bowl:spider bind:m get-bowl:strandio
;< =riot:clay bind:m
(warp:strandio our.bowl %home ~ %sing %a [%da now.bowl] target-path)
(warp:strandio ship desk ~ %sing care case target-path)
?~ riot
~& %nothing
(pure:m !>("nothing"))
%- (slog leaf+"got writ" (sell !<(vase q.r.u.riot)) ~)
(pure:m !<(vase q.r.u.riot))
(pure:m q.r.u.riot)