mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 04:11:49 +03:00
arvo side of getting subs to boot
This commit is contained in:
parent
8777772efa
commit
55e8072b3b
138
arvo/clay.hoon
138
arvo/clay.hoon
@ -53,10 +53,10 @@
|
|||||||
== ::
|
== ::
|
||||||
++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range
|
++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range
|
||||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||||
++ nako $: gar=(map ,@ud tako) :: new ids
|
++ nako $: gar=(map aeon tako) :: new ids
|
||||||
let=@ud :: next id
|
let=aeon :: next id
|
||||||
lar=(set yaki) :: new commits
|
lar=(set yaki) :: new commits
|
||||||
bar=(set blob) :: new content
|
bar=(set plop) :: new content
|
||||||
== ::
|
== ::
|
||||||
++ note :: out request $->
|
++ note :: out request $->
|
||||||
$% $: %a :: to %ames
|
$% $: %a :: to %ames
|
||||||
@ -137,6 +137,7 @@
|
|||||||
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
|
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
|
||||||
fod=(map duct ,@ud) :: current requests
|
fod=(map duct ,@ud) :: current requests
|
||||||
haw=(map mood (unit cage)) :: simple cache
|
haw=(map mood (unit cage)) :: simple cache
|
||||||
|
nak=(unit nako) :: pending validation
|
||||||
== ::
|
== ::
|
||||||
++ room :: fs per ship
|
++ room :: fs per ship
|
||||||
$: hun=duct :: terminal duct
|
$: hun=duct :: terminal duct
|
||||||
@ -613,18 +614,22 @@
|
|||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ edis :: apply subscription
|
++ apply-foreign-update :: apply subscription
|
||||||
|= nak=nako
|
|= $: gar=(map aeon tako) :: new ids
|
||||||
|
let=aeon :: next id
|
||||||
|
lar=(set yaki) :: new commits
|
||||||
|
bar=(set blob) :: new content
|
||||||
|
==
|
||||||
^+ +>
|
^+ +>
|
||||||
%= +>
|
%= +>
|
||||||
hit.dom (~(uni by hit.dom) gar.nak)
|
hit.dom (~(uni by hit.dom) gar)
|
||||||
let.dom let.nak
|
let.dom let
|
||||||
lat.ran %+ roll (~(tap in bar.nak) ~)
|
lat.ran %+ roll (~(tap in bar) ~)
|
||||||
=< .(yeb lat.ran)
|
=< .(yeb lat.ran)
|
||||||
|= [sar=blob yeb=(map lobe blob)]
|
|= [sar=blob yeb=(map lobe blob)]
|
||||||
=+ zax=(blob-to-lobe sar)
|
=+ zax=(blob-to-lobe sar)
|
||||||
%+ ~(put by yeb) zax sar
|
%+ ~(put by yeb) zax sar
|
||||||
hut.ran %+ roll (~(tap in lar.nak) ~)
|
hut.ran %+ roll (~(tap in lar) ~)
|
||||||
=< .(yeb hut.ran)
|
=< .(yeb hut.ran)
|
||||||
|= [sar=yaki yeb=(map tako yaki)]
|
|= [sar=yaki yeb=(map tako yaki)]
|
||||||
%+ ~(put by yeb) r.sar sar
|
%+ ~(put by yeb) r.sar sar
|
||||||
@ -652,7 +657,7 @@
|
|||||||
:: let.dom
|
:: let.dom
|
||||||
:: (echa:wake:(checkout-ankh hed))
|
:: (echa:wake:(checkout-ankh hed))
|
||||||
::
|
::
|
||||||
++ knit :: external change
|
++ take-foreign-update :: external change
|
||||||
|= [inx=@ud rot=riot]
|
|= [inx=@ud rot=riot]
|
||||||
^+ +>
|
^+ +>
|
||||||
?> ?=(^ ref)
|
?> ?=(^ ref)
|
||||||
@ -683,13 +688,78 @@
|
|||||||
=+ nex=(~(get by haw.u.ref) nez)
|
=+ nex=(~(get by haw.u.ref) nez)
|
||||||
?~ nex +>+.^$
|
?~ nex +>+.^$
|
||||||
?~ u.nex +>+.^$ :: should never happen
|
?~ u.nex +>+.^$ :: should never happen
|
||||||
|
=. nak.u.ref `((hard nako) q.q.u.u.nex)
|
||||||
=. +>+.^$
|
=. +>+.^$
|
||||||
=+ roo=(edis ((hard nako) q.q.u.u.nex))
|
=+ roo=(validate-plops for bar:(need nak.u.ref))
|
||||||
?>(?=(^ ref.roo) roo)
|
?>(?=(^ ref.roo) roo)
|
||||||
%= $
|
%= $
|
||||||
haw.u.ref (~(del by haw.u.ref) nez)
|
haw.u.ref (~(del by haw.u.ref) nez)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ validate-plops
|
||||||
|
|= [him=ship pop=(set plop)]
|
||||||
|
^+ +>
|
||||||
|
=- %_(+>.$ tag [- tag])
|
||||||
|
:* hen
|
||||||
|
[%foreign-plops (scot %p who) (scot %p for) syd ~]
|
||||||
|
%f %exec who ~ %tabl
|
||||||
|
^- (list (pair silk silk))
|
||||||
|
%+ turn (~(tap in pop))
|
||||||
|
|= a=plop
|
||||||
|
?- -.a
|
||||||
|
%delta
|
||||||
|
:- [%done ~ %blob !>([%delta p.a q.a *cage])]
|
||||||
|
[%vale p.r.a him q.r.a]
|
||||||
|
::
|
||||||
|
%direct
|
||||||
|
:- [%done ~ %blob !>([%direct p.a *cage])]
|
||||||
|
[%vale p.q.a him q.q.a]
|
||||||
|
::
|
||||||
|
%indirect ~| %foreign-indirect-not-implemented !!
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ take-foreign-plops
|
||||||
|
|= res=(each bead (list tank))
|
||||||
|
^+ +>
|
||||||
|
?> ?=(^ ref)
|
||||||
|
?> ?=(^ nak.u.ref)
|
||||||
|
?: ?=(%| -.res)
|
||||||
|
%_ +>.$
|
||||||
|
yel
|
||||||
|
:_ yel
|
||||||
|
:* hen %note '!' %rose [" " "" ""]
|
||||||
|
leaf/"validate foreign plops failed"
|
||||||
|
p.res
|
||||||
|
==
|
||||||
|
==
|
||||||
|
=+ cay=q.p.res
|
||||||
|
?@ p.cay ~| %plop-bad-marc !!
|
||||||
|
=+ |- ^- lat=(list blob)
|
||||||
|
?~ p.p.cay
|
||||||
|
~
|
||||||
|
:_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
|
||||||
|
?. ?=(%blob p.i.p.p.cay)
|
||||||
|
~| %plop-strange-marc-a
|
||||||
|
!!
|
||||||
|
?. ?=(@ q.i.p.p.cay)
|
||||||
|
~| %plop-strange-marc-b
|
||||||
|
!!
|
||||||
|
=+ coy=(slot 2 q.cay)
|
||||||
|
?@ q.coy
|
||||||
|
~| %plop-strange-coy
|
||||||
|
!!
|
||||||
|
=+ bob=((hard blob) -.q.coy)
|
||||||
|
?- -.bob
|
||||||
|
%delta [-.bob p.bob q.bob q.i.p.p.cay (slot 3 coy)]
|
||||||
|
%direct [-.bob p.bob q.i.p.p.cay (slot 3 coy)]
|
||||||
|
%indirect ~| %plop-indirect-not-implemented !!
|
||||||
|
==
|
||||||
|
%^ apply-foreign-update
|
||||||
|
gar.u.nak.u.ref
|
||||||
|
let.u.nak.u.ref
|
||||||
|
[lar.u.nak.u.ref (sa lat)]
|
||||||
|
::
|
||||||
++ mabe :: maybe fire function
|
++ mabe :: maybe fire function
|
||||||
|* [rov=rove fun=$+(@da _+>.^$)]
|
|* [rov=rove fun=$+(@da _+>.^$)]
|
||||||
^+ +>.$
|
^+ +>.$
|
||||||
@ -828,6 +898,16 @@
|
|||||||
%delta [%pact $(a q.bob) [%done ~ r.bob]]
|
%delta [%pact $(a q.bob) [%done ~ r.bob]]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ blob-to-plop
|
||||||
|
|= a=blob
|
||||||
|
^- plop
|
||||||
|
=> a
|
||||||
|
?- -
|
||||||
|
%delta [- p q [p q.q]:r]
|
||||||
|
%direct [- p [p q.q]:q]
|
||||||
|
%indirect [- p [p q.q]:q [p q.q]:r s]
|
||||||
|
==
|
||||||
|
::
|
||||||
++ make-direct :: make blob
|
++ make-direct :: make blob
|
||||||
|= p=cage
|
|= p=cage
|
||||||
^- blob
|
^- blob
|
||||||
@ -1031,11 +1111,14 @@
|
|||||||
::
|
::
|
||||||
++ make-nako :: gack a through b
|
++ make-nako :: gack a through b
|
||||||
|= [a=aeon b=aeon]
|
|= [a=aeon b=aeon]
|
||||||
^- [(map aeon tako) aeon (set yaki) (set blob)]
|
^- nako
|
||||||
:^ hit.dom
|
:^ hit.dom
|
||||||
let.dom
|
let.dom
|
||||||
(sa `(list yaki)`(turn (~(tap by hut.ran)) |=([tako yaki] +<+)))
|
(sa `(list yaki)`(turn (~(tap by hut.ran)) |=([tako yaki] +<+)))
|
||||||
(sa `(list blob)`(turn (~(tap by lat.ran)) |=([lobe blob] +<+)))
|
:: XX overkill
|
||||||
|
%- sa ^- (list plop)
|
||||||
|
(turn (~(tap by lat.ran)) |=([lobe blob] (blob-to-plop +<+)))
|
||||||
|
:: XX overkill
|
||||||
::
|
::
|
||||||
++ query :: query:ze
|
++ query :: query:ze
|
||||||
|= ren=?(%u %v %x %y %z) :: endpoint query
|
|= ren=?(%u %v %x %y %z) :: endpoint query
|
||||||
@ -2015,13 +2098,11 @@
|
|||||||
=^ mos ruf
|
=^ mos ruf
|
||||||
?: (~(has by fat.ruf) who)
|
?: (~(has by fat.ruf) who)
|
||||||
=+ une=(un who now hen ruf)
|
=+ une=(un who now hen ruf)
|
||||||
=+ ^= zat
|
=+ zat=(take-patch:(di:wake:une syd) p.q.hin)
|
||||||
(take-patch:(di:wake:une syd) p.q.hin)
|
|
||||||
=+ zot=abet.zat
|
=+ zot=abet.zat
|
||||||
[-.zot abet:(pish:une syd +.zot ran.zat)]
|
[-.zot abet:(pish:une syd +.zot ran.zat)]
|
||||||
=+ zax=(do now hen [who who] syd ruf)
|
=+ zax=(do now hen [who who] syd ruf)
|
||||||
=+ ^= zat
|
=+ zat=(take-patch:zax p.q.hin)
|
||||||
(take-patch:zax p.q.hin)
|
|
||||||
=+ zot=abet.zat
|
=+ zot=abet.zat
|
||||||
[-.zot (posh who syd +.zot ruf)]
|
[-.zot (posh who syd +.zot ruf)]
|
||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
@ -2037,15 +2118,28 @@
|
|||||||
=+ zot=abet.zat
|
=+ zot=abet.zat
|
||||||
[-.zot abet:(pish:une syd +.zot ran.zat)]
|
[-.zot abet:(pish:une syd +.zot ran.zat)]
|
||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
|
::
|
||||||
|
%foreign-plops
|
||||||
|
?> ?=([@ @ @ ~] t.tea)
|
||||||
|
=+ our=(slav %p i.t.tea)
|
||||||
|
=+ her=(slav %p i.t.t.tea)
|
||||||
|
=* syd i.t.t.t.tea
|
||||||
|
=^ mos ruf
|
||||||
|
=+ zax=(do now hen [our her] syd ruf)
|
||||||
|
=+ zat=(take-foreign-plops:zax p.q.hin)
|
||||||
|
=+ zot=abet.zat
|
||||||
|
[-.zot (posh her syd +.zot ruf)]
|
||||||
|
[mos ..^$]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%waft
|
%waft
|
||||||
?> ?=([@ @ ~] tea)
|
?> ?=([@ @ ~] tea)
|
||||||
=+ syd=(need (slaw %tas i.tea))
|
=+ syd=(slav %tas i.tea)
|
||||||
=+ inx=(need (slaw %ud i.t.tea))
|
=+ inx=(slav %ud i.t.tea)
|
||||||
=+ ^= zat
|
=+ ^= zat
|
||||||
=< wake
|
=< wake
|
||||||
(knit:(do now hen p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
|
%- take-foreign-update:(do now hen p.+.q.hin syd ruf)
|
||||||
|
[inx ((hard riot) q.+.q.hin)]
|
||||||
=^ mos ruf
|
=^ mos ruf
|
||||||
=+ zot=abet.zat
|
=+ zot=abet.zat
|
||||||
[-.zot (posh q.p.+.q.hin syd +.zot ruf)]
|
[-.zot (posh q.p.+.q.hin syd +.zot ruf)]
|
||||||
@ -2062,8 +2156,8 @@
|
|||||||
::
|
::
|
||||||
%writ
|
%writ
|
||||||
?> ?=([@ @ *] tea)
|
?> ?=([@ @ *] tea)
|
||||||
=+ our=(need (slaw %p i.tea))
|
=+ our=(slav %p i.tea)
|
||||||
=+ him=(need (slaw %p i.t.tea))
|
=+ him=(slav %p i.t.tea)
|
||||||
:_ ..^$
|
:_ ..^$
|
||||||
:~ :- hen
|
:~ :- hen
|
||||||
[%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]]
|
[%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]]
|
||||||
|
@ -9799,7 +9799,7 @@
|
|||||||
++ sled $+ [(unit (set monk)) term beam] :: namespace function
|
++ sled $+ [(unit (set monk)) term beam] :: namespace function
|
||||||
(unit (unit cage)) ::
|
(unit (unit cage)) ::
|
||||||
++ slad $+ [(unit (set monk)) term beam] :: undertyped
|
++ slad $+ [(unit (set monk)) term beam] :: undertyped
|
||||||
(unit (unit (cask ,*))) ::
|
(unit (unit (cask))) ::
|
||||||
++ slut $+(* (unit (unit))) :: old namespace
|
++ slut $+(* (unit (unit))) :: old namespace
|
||||||
++ vile :: reflexive constants
|
++ vile :: reflexive constants
|
||||||
$: typ=type :: -:!>(*type)
|
$: typ=type :: -:!>(*type)
|
||||||
@ -9996,7 +9996,7 @@
|
|||||||
ren=care
|
ren=care
|
||||||
bed=beam
|
bed=beam
|
||||||
==
|
==
|
||||||
^- (unit (unit (cask ,*)))
|
^- (unit (unit (cask)))
|
||||||
:: ~& [%arvo-scry ren bed]
|
:: ~& [%arvo-scry ren bed]
|
||||||
=+ ^= old
|
=+ ^= old
|
||||||
:* fur
|
:* fur
|
||||||
@ -10006,7 +10006,7 @@
|
|||||||
`coin`[%$ r.bed]
|
`coin`[%$ r.bed]
|
||||||
(flop s.bed)
|
(flop s.bed)
|
||||||
==
|
==
|
||||||
^- (unit (unit (cask ,*)))
|
^- (unit (unit (cask)))
|
||||||
=+ pro=(slym (slap rig [%cnzy %scry]) old)
|
=+ pro=(slym (slap rig [%cnzy %scry]) old)
|
||||||
?~ q.pro ~
|
?~ q.pro ~
|
||||||
?~ +.q.pro [~ ~]
|
?~ +.q.pro [~ ~]
|
||||||
@ -10073,11 +10073,11 @@
|
|||||||
++ beck
|
++ beck
|
||||||
^- slad
|
^- slad
|
||||||
|= [fur=(unit (set monk)) ron=term bed=beam]
|
|= [fur=(unit (set monk)) ron=term bed=beam]
|
||||||
^- (unit (unit (cask ,*)))
|
^- (unit (unit (cask)))
|
||||||
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
|
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
|
||||||
=+ lal=(end 3 1 ron)
|
=+ lal=(end 3 1 ron)
|
||||||
=+ ren=(care (rsh 3 1 ron))
|
=+ ren=(care (rsh 3 1 ron))
|
||||||
|- ^- (unit (unit (cask ,*)))
|
|- ^- (unit (unit (cask)))
|
||||||
?~ q.niz ~
|
?~ q.niz ~
|
||||||
?. =(lal p.i.q.niz) $(q.niz t.q.niz)
|
?. =(lal p.i.q.niz) $(q.niz t.q.niz)
|
||||||
%- scry:(wink:(vent lal vil bud p.niz q.i.q.niz) now (shax now) ..^$)
|
%- scry:(wink:(vent lal vil bud p.niz q.i.q.niz) now (shax now) ..^$)
|
||||||
|
@ -2743,9 +2743,10 @@
|
|||||||
lys=@da :: last sent
|
lys=@da :: last sent
|
||||||
pac=rock :: packet data
|
pac=rock :: packet data
|
||||||
== ::
|
== ::
|
||||||
++ blob $% [%delta p=lobe q=lobe r=cage] :: delta on q
|
++ blob :: fs blob
|
||||||
[%direct p=lobe q=cage] ::
|
$% [%delta p=lobe q=lobe r=cage] :: delta on q
|
||||||
[%indirect p=lobe q=cage r=cage s=lobe] ::
|
[%direct p=lobe q=cage] :: immediate
|
||||||
|
[%indirect p=lobe q=cage r=cage s=lobe] :: both
|
||||||
== ::
|
== ::
|
||||||
++ boat ,[(list slip) tart] :: user stage
|
++ boat ,[(list slip) tart] :: user stage
|
||||||
++ boon :: fort output
|
++ boon :: fort output
|
||||||
@ -3068,6 +3069,11 @@
|
|||||||
++ pail ?(%none %warm %cold) :: connection status
|
++ pail ?(%none %warm %cold) :: connection status
|
||||||
++ plan (trel view (pair ,@da (unit ,@dr)) path) :: subscription
|
++ plan (trel view (pair ,@da (unit ,@dr)) path) :: subscription
|
||||||
++ plea ,[p=@ud q=[p=? q=@t]] :: live prompt
|
++ plea ,[p=@ud q=[p=? q=@t]] :: live prompt
|
||||||
|
++ plop :: typeless blob
|
||||||
|
$% [%delta p=lobe q=lobe r=(cask)] :: delta on q
|
||||||
|
[%direct p=lobe q=(cask)] :: immediate
|
||||||
|
[%indirect p=lobe q=(cask) r=(cask) s=lobe]:: both
|
||||||
|
== ::
|
||||||
++ pork ,[p=(unit ,@ta) q=(list ,@t)] :: fully parsed url
|
++ pork ,[p=(unit ,@ta) q=(list ,@t)] :: fully parsed url
|
||||||
++ pred ,[p=@ta q=@tas r=@ta ~] :: proto-path
|
++ pred ,[p=@ta q=@tas r=@ta ~] :: proto-path
|
||||||
++ prod ,[p=prom q=tape r=tape] :: prompt
|
++ prod ,[p=prom q=tape r=tape] :: prompt
|
||||||
|
Loading…
Reference in New Issue
Block a user